Jump to content

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
Link to comment
Share on other sites

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 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...