Hi ,
You can make a global variable like $RENDERPASS. in a switch shop
Then create in a ROP > scripts tab
:- pre render set $RENDERPASS = 1 ; varchange
:- post render set $RENDERPASS = 0 ; varchange
This is in a few rops were I want objects rendered using different shaders. All seems good but every now and then after making changes I notice the $RENDERPASS variable seems to stick and the ROPs ignore the post script values. Has anyone else had this weirdness or am I going insane believing this could happen ?
Rop> scripts tab variables
3768 6 1- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- rafal
- Staff
- 1454 posts
- Joined: July 2005
- Offline
perhaps a bit unrelated but you may be better off specifying the variable name in ‘varchange’ command:
set $RENDERPASS = 1 ; varchange RENDERPASS
This way Houdini does not attempt to dirty nodes that use other variables (ie, it's a bit more efficient). But, that should not be related to your problem (though it might).
set $RENDERPASS = 1 ; varchange RENDERPASS
This way Houdini does not attempt to dirty nodes that use other variables (ie, it's a bit more efficient). But, that should not be related to your problem (though it might).
- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
- keyframe
- Member
- 1533 posts
- Joined: July 2005
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
Thanks for the suggestions, I did think of using takes but then there might some issues created with the farm and rendering.
It has been suggested that opparm could really help as this can be used in the pre/post render scripts tab to hard wire the shader in.Then I can just do away with the variables . Yet to test it though , something like below might work
opparm /obj/Geo_In shop_materialpath (../shopnet1/simpleLambert)
r
It has been suggested that opparm could really help as this can be used in the pre/post render scripts tab to hard wire the shader in.Then I can just do away with the variables . Yet to test it though , something like below might work
opparm /obj/Geo_In shop_materialpath (../shopnet1/simpleLambert)
r
Gone fishing
- Ondrej
- Staff
- 1080 posts
- Joined: July 2005
- Offline
circusmonkey
All seems good but every now and then after making changes I notice the $RENDERPASS variable seems to stick and the ROPs ignore the post script values. Has anyone else had this weirdness or am I going insane believing this could happen ?
I'm not sure, but the scripts may be executed in their own context, and variables set via the ‘set’ command are local by default. You might try the -g option.
- artzor
- Member
- 47 posts
- Joined: Dec. 2008
- Offline
i've been using these little scripts for a while now, except i do it slightly differently.
i use:
opset -r ON “../../render_null1”
or something to that effect, then for the object i'm rendering i assign different shaders using material sops and point to a null. that script just sets the render flag on one of those nulls.
you can also use the `opparm` command in render scripts to avoid using takes.
i use:
opset -r ON “../../render_null1”
or something to that effect, then for the object i'm rendering i assign different shaders using material sops and point to a null. that script just sets the render flag on one of those nulls.
you can also use the `opparm` command in render scripts to avoid using takes.
to a man with only a hammer every problem looks like a nail.
-
- Quick Links