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

Share this post

Link to post
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.

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