Jump to content

Convert Color to terrain mask

Recommended Posts

I thought this would be simple but I seem to be having more trouble with this than I expected. How can I convert point or prim color (grays) values into a terrain layer mask? 

I have played with volume wrangle and and volume vop but seem to only get a uniform value of say prim 0 applied to the whole terrain.

Edited by Spaz8
Link to comment
Share on other sites

If you put a wrangle down that does something like this:

if (@Cd.r > greyvalue[0] && @Cd.g > greyvalue[1] && @Cd.b > greyvalue[2]) {

    @mask = 1;    //I'm not totally sure about the exact name of the attribute, but if I remember correctly I used this before


But becareful, because I believe the terrain geometry already comes with a @Cd by default on all the points/prims when you paint it,

you can do a @Cd = 0; wrangle before you start painting and then do your paint, and then the above code

I know my solution is kind of convoluted, but I have trouble with converting painted geometry to other stuff too.  I wish I could do something in Houdini similar to UE4 when you have a master material and paint the terrain to assign different foilage.


If anyone else has a better solution, please share, I would be interested in knowing.

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.

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