[Sidefx-houdini-list] H9 : CVEX shader question
guillaume laforge
guillaume.laforge.3d at gmail.com
Thu Oct 11 10:10:18 EDT 2007
Hi,
I'm learning the new workflow with the CVEX shaders and fur (sop and
procedural) in Houdini 9.
I don't understand completely how it works. Sometime the CVEX shader can
modify an attribute and sometime it creates this attribute.
Example 1 : a CVEX applied in the skin shader parameter of a fur sop :
If I create a Cd attribute on the rest skin geometry and add this cvex
shader on the fur sop it changes the fur color based on a color map file.
If I remove the Cd attribute, it doesn't work anymore.
Code :
cvex
gl_cvex_s_colormap(
vector uv = 0;
export vector Cd = 1;
string map = "";)
{
Cd = colormap(map,uv);
}
Example 2 : a CVEX applied in the guide shader parameter of a fur sop:
If I add a scale attribute on the rest skin geometry, this code does
nothing. I must remove the scale attribute to see the effect.
Code :
cvex
gl_cvex_g_furrandomscale(
export vector P=1;
vector origin = 1;
int fur_id = 0;
float scale=0.5;
)
{
float r = random(fur_id);
P += scale * r * (P - origin);
}
Why an existing attribute is needed in example 1 and not example 2 ?
Any explanation on the CVEX shaders is welcome !
Cheers,
--
Guillaume Laforge | La Maison
More information about the Sidefx-houdini-list
mailing list