[Sidefx-houdini-list] Exporting deep rasters from VEX Layered Surface SHOP

Olex P hoknamahn at gmail.com
Thu Jun 24 05:14:54 EDT 2010


Just a small addition to what the guys where saying - export keyword is not
tied to the body of a shader nor to deep rasters. It's a general way of
exporting the values from any function, similar to C++ references.
For instance function that does addition of two numbers could be written as:

void add(float a; float b; export float c) { c = a + b }

surface
example(float a = 0.5f; float b = 0.1f)
{
    float c;

    add(a, b, c);
    Cf = c;
}

On Thu, Jun 24, 2010 at 9:32 AM, Daniel Jenkins <thedj28 at googlemail.com>wrote:

> Hi Phil,
>
> If you want to export variables from a VEX shader, you need to add the
> export keyword before the variable you want to export out of the
> shader, in the shaders main function parameters. e.g.
>
>
> surface
> layered(
>        vector  Ca=1, Cd=1, Cs=1, Cr=0;
>        export vector  Ct=1;
>        float   Alpha=1;
>        float   apara=1;
>        export vector myCd = 1;
> )
>
> This will export the variables Ct and myCd, allowing you to access
> them from your mantra ROP node
>
> Hope that helps,
>
> Daniel
>
>
> On 24 June 2010 09:12, Phil Spicer <PSpicer at bournemouth.ac.uk> wrote:
> > Hi,
> >
> > I want to export deep rasters from the VEX Layered Surface SHOP. I can
> get access to the VEX code from the Edit Operator Type Properties, but
> wondered what the VEX code is to create the export itself... Any thoughts?
> >
> > Kind regards,
> >
> > Phil.
> >
> > BU - the UK's Number One New University
> > The Guardian University Guide 2009 & 2010
> > This email is intended only for the person to whom it is addressed and
> may contain confidential information. If you have received this email in
> error, please notify the sender and delete this email, which must not be
> copied, distributed or disclosed to any other person.
> > Any views or opinions presented are solely those of the author and do not
> necessarily represent those of Bournemouth University or its subsidiary
> companies. Nor can any contract be formed on behalf of the University or its
> subsidiary companies via email.
> >
> >
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list