hi everyone,
I want to make each cvex hair different satuation. I created a parameter vop in texture hair shader(want to modify it), name it “hairid”, then wire it into random vop, it should generate 0-1 numbers based on each hair, right? After that, I wire the random into multiply vop of the hair diffuse color, but no hairid based result, only global effect.
I tried with vex too, but the same result.
….
int hairid = 0;
….xxx = random(hairid);
final color = ambient() + diff() + xxx..;
Thanks for any answer!
hairid for color difference question
4135 4 0- ykcosmo
- Member
- 288 posts
- Joined: July 2005
- Offline
- derrick
- Staff
- 329 posts
- Joined: July 2005
- Offline
The fur geometry likely does not have a “hairid” attribute. The Fur SOP and procedural make this value available to the CVEX shaders but do not create it on the resulting geometry. You could modify one of the CVEX shaders to copy the value to another attribute or use the “Set Hair ID” parameter that will be available in Houdini 9.1.216.
- ykcosmo
- Member
- 288 posts
- Joined: July 2005
- Offline
- derrick
- Staff
- 329 posts
- Joined: July 2005
- Offline
ykcosmo
what's the differences between cvex shader and vex surface shader?
how to creat a cvex shader?
The different types of shaders in Houdini manipulate different types of data and have different sets of information available to them. For example, a VEX Surface Shader knows about lighting, surface coordinates, etc. and manipulates interplolated attribute data used to construct individual pixels.
CVEX is a generic type of shader that was recently added to Houdini. The Fur SOP and Mantra Fur Procedural use CVEX shaders to manipulate primitive and vertex attributes on the generated hairs. They know nothing about lighting, surface coordinates, etc. and the manipulated data is geometry attributes themselves, not interpolated values.
In Houdini 9.1, CVEX shaders need to be compiled from .vfl files. You can write a .vfl file and compile it into an OTL with a command like this:
$ vcc -l my_cvex_shader.otl my_cvex_shader.vfl
You can see an exmaple of what the .vfl file should look like by putting down a Fur Density Map SHOP, right clicking on the node, choosing “Type Properties…”, and navigating to the “Code” folder.
- ykcosmo
- Member
- 288 posts
- Joined: July 2005
- Offline
-
- Quick Links