[Sidefx-houdini-list] H9 : CVEX shader question

guillaume laforge guillaume.laforge.3d at gmail.com
Thu Oct 11 10:27:55 EDT 2007


Sorry for the noise, I think I understand my mistake now...

In example 2, scale is just a parameter used for the result (P). It looks
like the standard houdini behaviour to "override" this parameter if an
attribute got the same name and type.
CVEX is not so easy to understand for me :P.

Cheers

Guillaume.

On 10/11/07, guillaume laforge <guillaume.laforge.3d at gmail.com> wrote:
>
> 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
>



-- 
Guillaume Laforge



More information about the Sidefx-houdini-list mailing list