0
$\begingroup$

I need help figuring out a specific behaviour of the Camera Mapping process in Blender 2.93.1 .

When projecting an image on a closed volume, such as a sphere, the image appears on both sides of the sphere.

I need to have the image projected onto the first surface the camera encounters while projecting, and then not appearing anywhere else.

image

cam map face

other side

I could bake the UV cam map modifiers and tweak the face islands ; I could also duplicate the sphere, set an alpha channel, delete the faces where the second projection appears, and have them on top of the over to work around the issue.

But if there's a way to have it projected on the front of the sphere and stop right there without further work, it would be great and help me a lot.

Blend scene :

$\endgroup$
3
  • $\begingroup$ can u provide blend file? $\endgroup$
    – Chris
    Commented Jan 4, 2022 at 11:43
  • $\begingroup$ What method did you use for projecting the texture? If you used Unwrap>Project from View, then you need to select only the faces you want the texture on before unwrapping. $\endgroup$ Commented Jan 4, 2022 at 11:50
  • $\begingroup$ Thanks a lot for your idea ! I'm trying to make this work with the UV project modifier for the need of my current project. The reasons are that I can sculpt the mesh, and even remesh it with voxels while having the image projected on it. I can also move the projecting camera around and the texture follows dynamically. I will give it a shot with the unwrap>project from view, and see how it goes. $\endgroup$
    – MGLVVG
    Commented Jan 4, 2022 at 11:59

1 Answer 1

2
$\begingroup$

One thing is (as you can see) UV Projection modifier generates smaller image in front side to closer camera and bigger image on opposite side due conical shape of projection from point - so distance of camera matters.

In this case I would suggest to use Texture Coordinates > Object and use another object like Empty to control position. To position it smoothly around surface - enable Snapping > Face with Align Rotation to Target.

enter image description here

To prevent appearance on opposite side - use Empty's Z coordinate and clamp it with like Less Than node and use it as a mask for back part of a mesh.

enter image description here

enter image description here


Note: If you are still interested in projection technique see Rich Sedman's answer he used OSL script in shader to free back faces from projection. Blend file included (seems to me quite complicated, probably could be handled better in these days, but it is over my knowledge so I can't help with that).

$\endgroup$
1
  • 1
    $\begingroup$ @Rich Sedman created the entire projection without using the UV Project Modifier at all. Phew! ... If OSL is an option, there's a little script here which can be used in combination with UV Project , testing for 'In Front of camera', and 'Occlusion' $\endgroup$
    – Robin Betts
    Commented Jan 4, 2022 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .