Jump to content
marque_pierre

HeightField geometry data driving shader?

Recommended Posts

Hello gents,

I was pointed to these forums by one of our Houdini TDs. Myself I am a texture artist/3D generalist eagerly diving into Houdini for the first time (while being in a production, as it happens).

My question:

So I have a piece of terrain generated by the new Height Field nodes (see attached image). Lovely. What I want, is for the mask data (the red in the 3D viewport is an example of one of the masks based on height) to drive the shader live, not through a static exported image file. As I see this problem, how do I cross that divide (from the SOP (I guess) world to the SHOP (or is it VOP) world?

One suggestion I have received was to use the Attribute Promote node, to sort of flag the data I want on the geometry side, and using a Bind node on the shader side to bring that data into the shader. In reality I haven't managed to make it work. There are around 18 different attributes on the bottom most nodes - which one to flag? Is it a data conversion type problem perhaps (trying to fit a round peg into a square hole)? Or do I need to bake the HeightField into actual geometry first perhaps? Or am I looking at this the wrong way around?

I sincerely hope you can help...

houdini_terrain003.thumb.jpeg.4f91e9fcaff0713b969da0774ecc5481.jpeg

 

Edited by marque_pierre

Share this post


Link to post
Share on other sites
vtrvtr    38

Not sure if this is the recommended way. For some reason I can't seem to import the fields in the /mat/ context. However, if you use the height field convert node, you'll get a polygonal version of your terrain with all the attributes. Once you have that you can simply use a bind to import that attribute and control whatever you want in the /mat/ context

 

G3NcedI.png

Share this post


Link to post
Share on other sites

Thanks vtrvtr. That approach seems to work up to a certain point.

If you only have two different features you want to texture, then a single mask will do.

But if you have several features each with their own "mask" attribute... I have tried renaming each of the mask with the Rename Attribute node, so instead I end up with mask1, mask2, mask3 etc. each addressing a part of my geometry, but Houdini complains that there is a mismatch of attributes with the same name (mask)...

 

Share this post


Link to post
Share on other sites
vtrvtr    38

Check the shelf examples. They are good to get a grasp to what SESI thinks it's the best workflow

But apparently it seems to be something like this

 8ufxnxh.png

The HF Clip node has another setup for if you want to "promote" a mask using the copy layer and layer nodes

 

 

 

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

×