How to Add Texture to Intersection Mesh

I made a die that’s the intersection of a cube and a sphere and now I’d like to add material to it so there’s an image on each face of the die.

I started with a box and a sphere and then converted them to CSGs and took the intersection. I was able to apply the material to the new Mesh and by messing with the faceUVs for the original box mesh, I was able to get the images to appear on the box faces of the new intersection shape but I don’t want any of the image to appear on the parts that were the sphere. I played around with sideOrienation, frontUV, and backUV options for the original sphere mesh but to no avail.

I have an example below for where I’m at and I’d like to make the material I’m applying to the combined cube+sphere Mesh only appear on the “faces” of the new shape. (It’s currently appearing on the “sphere” parts on the bottom of the shape, so you may need to flip it around to see the issue.)

Here’s my playground

Thanks

Hey there. :slight_smile: An easy fix is to set the sphere’s UVs to all zeroes like this.

5 Likes

This works an absolute treat. Thank you!!