Jump to content

vm_volumeuniform in VEX


jkunz07

Recommended Posts

Hey, I'm trying to make a particle shader based on the volume cloud shader.

I noticed it's used for spray particles in the SESI waterfall render video. In the video it's brought into a subnetwork along with a properties node, on the interface of the properties node the parameter "vm_volumeuniform" is added and then enabled.

I was hoping to do this in vex code but haven't had any success

I have

#pragma hint    vm_volumeuniform   hidden

and in the surface shader function

export int vm_volumeuniform = 1

Any ideas?

Link to comment
Share on other sites

I don't think you can set rendering properties in vex.

Rendering properties are added straight to the ifd, and are evaluated before the vex shader would run.

I think the best way to include it would be to wrap your vex shader and a properties shop into the same Material SHOP.

Link to comment
Share on other sites

I don't think you can set rendering properties in vex.

Rendering properties are added straight to the ifd, and are evaluated before the vex shader would run.

I think the best way to include it would be to wrap your vex shader and a properties shop into the same Material SHOP.

Thanks, that may be it.

Looking at the GI Light Shader code it looks like it can be done (__nonspecular), but it's possible it only works with light shaders or something like that.

#pragma opname          v_gilight
#pragma oplabel         "Global Illumination Light"

#pragma label light_color       "Light Color"
#pragma label istyle            "Irradiance Style"
#pragma label dobackground      "Enable Ray Background"
#pragma label envmap            "Environment Map"
#pragma label envtint           "Environment Tint"
#pragma label envnull           "Null Object"
#pragma label background        "Background Color"
#pragma label samples           "Sampling Quality"
#pragma label doraysamples      "Use Ray Samples"
#pragma label doadaptive        "Adaptive Sampling"
#pragma label maxdist           "Max Ray Distance"
#pragma label cone_angle        "Sampling Angle"
#pragma label objmask           "Object Mask"
#pragma label mapfile           "Photon File"
#pragma label mapsamples        "Photon Samples"
#pragma label filter            "Photon Filter"
#pragma label cachedirect       "Photon Map Stores Direct Lighting"
#pragma label prefilter         "Prefiltered Photon Map"
#pragma label minlevel          "Minimum Photon Diffuse Level"
#pragma label threshold         "Photon Distance Threshold"

#pragma group "Irradiance" light_color istyle doraysamples samples doadaptive
#pragma group "Irradiance" domaxdist maxdist cone_angle doobjmask objmask
#pragma group "Irradiance" dobackground envmap envtint envnull background
#pragma group "Photon Maps" mapfile mapsamples filter cachedirect prefilter minlevel threshold

#pragma hint light_color        color
#pragma hint dobackground       toggle
#pragma hint envmap             image
#pragma hint envtint            color
#pragma hint background         color
#pragma hint envnull            oppath  obj/null
#pragma hint mapfile            file
#pragma hint cone_angle         angle
#pragma hint doobjmask          toggle
#pragma hint doobjmask          joinnext
#pragma hint doobjmask          nolabel
#pragma hint objmask            oplist  obj
#pragma hint doraysamples       toggle
#pragma hint doadaptive         toggle
#pragma hint cachedirect        toggle
#pragma hint prefilter          toggle
#pragma hint domaxdist          toggle
#pragma hint domaxdist          joinnext
#pragma hint domaxdist          nolabel

#pragma hint overridedirect     hidden
#pragma hint overrideindirect   hidden
#pragma hint __nonspecular      hidden

#pragma range   cone_angle      0 90
#pragma range   minlevel                0 1
#pragma range   threshold               0 10
#pragma range   mapsamples              1 200
#pragma range   maxdist                 0 100

#pragma choice  istyle  "off"           "No Irradiance"
#pragma choice  istyle  "occlusion"     "Ambient Occlusion"
#pragma choice  istyle  "opacity"       "Transparent Ambient Occlusion"
#pragma choice  istyle  "full"          "Full Irradiance"

#pragma choice  filter  "convex"        "Convex Hull"
#pragma choice  filter  "sphere"        "Sphere"

#pragma disablewhen samples             { istyle "off" }
#pragma disablewhen doadaptive  { istyle "off" }
#pragma disablewhen cone_angle  { istyle "off" }
#pragma disablewhen objmask             { istyle "off" }
#pragma disablewhen objmask             { doobjmask 0 }
#pragma disablewhen envmap              { istyle "off" }
#pragma disablewhen envtint             { istyle "off" }
#pragma disablewhen envnull             { istyle "off" }
#pragma disablewhen background  { istyle "off" }
#pragma disablewhen envtint             { envmap '""' }
#pragma disablewhen envnull             { envmap '""' }
#pragma disablewhen samples             { doraysamples 1 }
#pragma disablewhen maxdist             { domaxdist 0 }

#pragma disablewhen envmap              { dobackground 0 }
#pragma disablewhen envtint             { dobackground 0 }
#pragma disablewhen envnull             { dobackground 0 }
#pragma disablewhen background  { dobackground 0 }

light
gilight(vector  light_color=1;
        string  istyle="occlusion";
        int     doraysamples=0;
        int     samples=256;
        int     doadaptive=0;
        float   cone_angle=90;
        int     domaxdist=0;
        float   maxdist=10;
        int     doobjmask=0;
        string  objmask="*";
        int     dobackground=1;
        string  envmap="";
        vector  envtint=1;
        string  envnull="";
        vector  background={1,1,1};
        string  mapfile="";
        int     mapsamples=1;
        string  filter="convex";
        int     prefilter=1;
        int     cachedirect=1;
        int     minlevel=1;
        float   threshold=1;
        export int overridedirect=0;
        export int overrideindirect=0;
        export int __nonspecular=1)

Link to comment
Share on other sites

The properties SHOP like a null SOP in that by itself it doesn't do anything. Any rendering parameters on it will be applied to your geometry though, unless you have the same parameter on your geometry node.

The documentation here can tell you more about rendering property inheritance:

http://www.sidefx.com/docs/houdini12.1/props/

Also I think it's super helpful to have this page bookmarked to see all the properties (I think the layout of this page is much better in the h11 docs then h12):

http://www.sidefx.com/docs/houdini11.0/props/mantra

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...