Jump to content

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

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

Link to comment
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)...

 

Link to comment
Share on other sites

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

 

 

 

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...