Jump to content
marque_pierre

Gradient ramp along Y-axis in shader

Recommended Posts

Houdini_img_shader1.thumb.jpeg.9b3d152b54b5f3e95f2b88aecdc71f1e.jpeg

Hello guys,

I am trying to build a shader, that in addition to what I have in the image, layers a black and white gradient in along the Y-axis. I am certain it must be very straight forward for anybody with more than a week of Houdini experience. Could anybody please point me in the right direction or outline the steps?

Thanks in advance!

Edited by marque_pierre

Share this post


Link to post
Share on other sites
blushan    1

gradientAlongY.thumb.jpg.b9abd8609d3ce277971f9aca532c955d.jpg

Quick answer while waiting for render at work. 
Grab the global var P, transform it from current-space to world-space and grab the Y component.
My example here is hard set to a certain range in world-space, the const1-node. That would mean your trees in your scene would all have the same ramp, no matter the individual height of the tree.

You could probably plug the fit1 directly in to the multiply2, I just have a ramp-parameter cause it was easier to read what's going on with the colors.
 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×