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

guillaume laforge guillaume.laforge.3d at gmail.com
Thu Oct 11 14:46:58 EDT 2007


>in a later build of Houdini, attributes will be automatically created as
needed.

Great !

Thanks for you explanation Derrick.

gl


On 10/11/07, Derrick Moser <derrick at sidefx.com> wrote:
>
> Guillaume,
>
> In your "gl_cvex_g_furrandomscale" example, the "0.5" from the "float
> scale=0.5" bit means: Use "0.5" if the provided data did not have a value
> for "scale".  This default can be changed by modifying parameters in the
> SHOP node.  When using CVEX shaders for fur, "provided data" means
> attributes interpolated from the skin and guide geometry (with some special
> cases to support the "Density" and "Set ID" parameter).
>
> The requirement for an existing "Cd" attribute in your
> "gl_cvex_s_colormap" example is an issue that will be addressed soon.  In a
> later build of Houdini, attributes will be automatically created as needed.
>
> Cheers,
> Derrick
>
> guillaume laforge wrote:
> > 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
> >>
> >>
> >
> >
> >
> >
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
Guillaume Laforge



More information about the Sidefx-houdini-list mailing list