Limit UV Project Modifier/UV From Object To One Side Object

I am using empties to map decals onto my object but I am trying to find a way to limit the projection to just one side of the model. The problem is shown here:

I have included this file. In it there is a ball using the uv projection modifier to map the decal and a ball using the object texture coordinate node for the projection.

objectmapping.blend (1.1 MB)

Thanks for your help

Make sure the object origin is inside your object, to indicate a desired direction, then mix with object.Z > 0 (or < 0):

Concave shapes can still be a problem. No real solution to that other than creating a mask.

2 Likes

Thanks this works well. I think that leaving the empty on the surface and using negative z values works well as a depth control.

side note… any way to duplicate the object/material and retain link to the new empty?

Ye, you can pretty much create your own offset for the mask using math nodes.

objectmapping.blend (249.0 KB)

2 Likes

Technically, yes. Typically (i.e. with default preferences) materials aren’t duplicated when you duplicate the object, so of course the object reference will stay the same. However, you can go into Preferences -> Editing and enable material duplication. Then, if you duplicate both the object and the empty, the reference in the newly duplicated material should update to the new empty. But that’s a rather drastic measure, IMHO, since usually you want to keep that setting off.