Slope or Fallof in VOBs

   6818   8   2
User Avatar
Member
6 posts
Joined: July 2005
Offline
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!?
____________

andre
User Avatar
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!
User Avatar
Member
6 posts
Joined: July 2005
Offline
Thank you rjpieke,

so far the theory.

Everytime I try this, the result is depending by the view and not locked on global direction.
Don't know what is wrong, may anyone help a beginner ops:

Attachments:
VOB.gif (32.2 KB)

____________

andre
User Avatar
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!

Attachments:
snow.jpg (162.5 KB)

User Avatar
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
Jim Ellis
www.emsh.calarts.edu/~jim
User Avatar
Member
65 posts
Joined: July 2005
Offline
Jim Ellis 2001
Seems like I'm always learning Houdini,
1) Why is the “Space Change” vop used?
2) Why the “Normalize” Vop?

1) This should compensate for a moving camera. Without this VOP, if you tumble your camera around the object, the snow will move.

2) Better safe than sorry, and force of habit

- Rob
User Avatar
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.
Jim Ellis
www.emsh.calarts.edu/~jim
User Avatar
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
User Avatar
Member
6 posts
Joined: July 2005
Offline
Yes, thanks rjpieke

I got the “Magic of Houdini”-Book and made some 3DBuzz tutorials, but VOBs are a little rare!?

Now I will try to fuzz the edges a bit… hope to get it.
____________

andre
  • Quick Links