Hi,
I`m still learning Houdini and try to build a Snow-Shader in VOBs.
The snow should lay an flat areas of a mountain and not on steeply faces.
So I need a ramp controlling the coverage, but how!?
Slope or Fallof in VOBs
6818 8 2- lichtengel
- Member
- 6 posts
- Joined: July 2005
- Offline
- rjpieke
- Member
- 65 posts
- Joined: July 2005
- Offline
lichtengel
Hi,
I`m still learning Houdini and try to build a Snow-Shader in VOBs.
The snow should lay an flat areas of a mountain and not on steeply faces.
So I need a ramp controlling the coverage, but how!?
One quick way to get started is to take the dot product of the geometry's normal and some global “up” vector (or, if up is along a certain axis - say Y - just take that component of the normal). This “steepness” factor can then be used as the input to drive colour blends, etc.
Cheers!
- lichtengel
- Member
- 6 posts
- Joined: July 2005
- Offline
- rjpieke
- Member
- 65 posts
- Joined: July 2005
- Offline
I'm posting a screenshot of a simple VOPs network that might get you started. Two things to notice:
The normalized normal needs to be converted from object space to world space before you grab a component.
I'm using the Smooth VOP with a small range to generate the contrast (ie very little falloff between earth and snow)
Hope this helps!
The normalized normal needs to be converted from object space to world space before you grab a component.
I'm using the Smooth VOP with a small range to generate the contrast (ie very little falloff between earth and snow)
Hope this helps!
- Jim Ellis 2001
- Member
- 60 posts
- Joined: July 2005
- Offline
Seems like I'm always learning Houdini,
I had to check out Rjpieke's example, and deconstruct it.
Here's what I built.
A) a simple poly sphere with a high frequency for poly-quality
b) a Point sop to add normals
c) A Vex Moutain sop to add some bump to the surface in all directions
d) The Shop/Shader sop that refrences the shader that was built from the Vop network that Rjieke designed.
I have a few basic question that came out of this.
If anyone cares to answer it would thrill me to the bone :wink:
Hope they aren't too simple.
1) Why is the “Space Change” vop used?
I added a Transform sop both before and after the Shader/Shop sop,
and in 180 degrees in Z… swapping out which one was rotated.
It seemed to make no difference if the “Space Change” Vop was in the vop network or not, the render looked the same.
The snow always stayed on top.
2) Why the “Normalize” Vop?
Is this just done out of standard practice?
I had no problem grabbing the $NY straight from the “Global Variables” Vop.
Again the rendered results looked the smae with or without the “Normalize” vop.
3) I added normals in the “Point” sop, but I can deactive that node in the chain, and there is no difference in the output.
I have some ideas as to why this may be, but if anyone cares to explain this one to me, I would say many thanks.
thanks
Jim
I had to check out Rjpieke's example, and deconstruct it.
Here's what I built.
A) a simple poly sphere with a high frequency for poly-quality
b) a Point sop to add normals
c) A Vex Moutain sop to add some bump to the surface in all directions
d) The Shop/Shader sop that refrences the shader that was built from the Vop network that Rjieke designed.
I have a few basic question that came out of this.
If anyone cares to answer it would thrill me to the bone :wink:
Hope they aren't too simple.
1) Why is the “Space Change” vop used?
I added a Transform sop both before and after the Shader/Shop sop,
and in 180 degrees in Z… swapping out which one was rotated.
It seemed to make no difference if the “Space Change” Vop was in the vop network or not, the render looked the same.
The snow always stayed on top.
2) Why the “Normalize” Vop?
Is this just done out of standard practice?
I had no problem grabbing the $NY straight from the “Global Variables” Vop.
Again the rendered results looked the smae with or without the “Normalize” vop.
3) I added normals in the “Point” sop, but I can deactive that node in the chain, and there is no difference in the output.
I have some ideas as to why this may be, but if anyone cares to explain this one to me, I would say many thanks.
thanks
Jim
Jim Ellis
www.emsh.calarts.edu/~jim
www.emsh.calarts.edu/~jim
- rjpieke
- Member
- 65 posts
- Joined: July 2005
- Offline
- Jim Ellis 2001
- Member
- 60 posts
- Joined: July 2005
- Offline
thanks Rjpeike for the schooling.
Anyone care to comment on question 3?
School me… searve me… leave me out to dry.
Anyone care to comment on question 3?
School me… searve me… leave me out to dry.
Jim Ellis
www.emsh.calarts.edu/~jim
www.emsh.calarts.edu/~jim
- rjpieke
- Member
- 65 posts
- Joined: July 2005
- Offline
Jim Ellis 2001
thanks Rjpieke for the schooling.
Anyone care to comment on question 3?
School me… searve me… leave me out to dry.
Mantra is probably just nice enough to use the geometric normals if none are specified. I bet if you use the Point SOP and create really crazy normals (try replacing ‘$NX’ with ‘rand($PT)’) it'll look different
Cheers!
- Rob
- lichtengel
- Member
- 6 posts
- Joined: July 2005
- Offline
-
- Quick Links