Hi Everybody….
I am trying to create a Terrain Shader. I have written Displacement shader, and facing a problem while writing surface shader. I want to shade the surface based on the slope, say Green for Horizontal surface and Red for vertical surface. Polygon Normal's Y component varies from 0 to 1 for Horizontal To Vertical. So I have a Spline which has Normal.Y as the input. It is giving me result, but the shader is changing as I move the camera. I tried all space combinations inside Vops. But not working. What can be the problem???
—-iamjaideep80
Jaideep Khadilkar
TD, Sciclone Motion Graphics
Shader Based On Normals
3771 2 2-
- iamjaideep80
- Member
- 82 posts
- Joined: April 2019
- Offline
-
- Serg
- Member
- 513 posts
- Joined:
- Offline
If you cant find a node that does what you want, you could try something I've done before. Just put $NY into the the color of a Point Sop, then inport that into your vop network with a Parameter node (put Cd in the name).
But this will only work if you are also distorting the geometry itself, no good if your landscape is done entirely in displacements.
But this will only work if you are also distorting the geometry itself, no good if your landscape is done entirely in displacements.
-
- Simon
- Member
- 2199 posts
- Joined: July 2005
- Offline
Just using the global N or Ng if you want the geometric normal, with the direction space change vop to get it in object space. N by default will already be in camera space so you need to use the direction space change if you don't want it to change when the camera moves.
The trick is finding just the right hammer for every screw
-
- Quick Links


