1

I need help with a live a surface shader camera projection. This video, using maya, shows exactly what I want to do in blender: https://www.youtube.com/watch?time_continue=1&v=JsnPYpDqhRk

would be thankful for any help

batFINGER
  • 84,216
  • 10
  • 108
  • 233
Ryan We
  • 13
  • 5

3 Answers3

3

The accepted answer suffers from distorsion because it only ensures that the projection is correct at the vertices but not in the middle of faces, which is a problem for coarse meshes. Here is a shader that precisely does camera mapping with live update:

Camera Mapping Group

Usage: Use the Object output of the Texture Coordinates nodes with the object being set to the projection camera. Fov, Width and Height must also match the projection camera.

Camera Mapping group used in a shader

Details:

A. Projection

Projection

B. Apply Field of View

Apply Field of View

C. Apply Aspect Ratio

Apply Aspect Ratio

D. Remap from [-1,1] to [0,1]

Remap coordinates

Lithy
  • 281
  • 2
  • 5
  • The best camera mapping I have seen. Thank you ... with a few drivers very powerful shader https://blender.stackexchange.com/a/226920/2214 – vklidu Jun 08 '21 at 13:00
1

You need the UV Project Modifier.

  1. Make a Material with your Texture
  2. In the Object Data Tab of the Properties create a new UV Map
  3. In the Modifier Tab add the UV Project Modifier, select your Image and your UV and check Override Image.
  4. Add a new Camera to the Scene and put it in the UV Project Modifier Tab as Projector
  5. Go into Textured Mode (AltZ)
HenrikD
  • 2,271
  • 8
  • 10
  • unfortunately the projection stops when going into edit mode. I guess there is no solution for this huh? – Ryan We Mar 11 '18 at 16:06
  • no just activate that little button in the header of the Modifier for activating it in Editmode. I tried it and it work absolutely fine. – HenrikD Mar 11 '18 at 16:08
  • alright its working. i found out before adding the modifier the object has already to be in edit mode. if not the button you mentioned is not working. at least in my blender version – Ryan We Mar 11 '18 at 16:25
-3

This is the node tree you are looking for :

To apply on a selection only, use material assignment or vertex colors.

Hadriscus
  • 793
  • 4
  • 11