name of object SHOP is attached to

   2682   2   1
User Avatar
Member
176 posts
Joined: May 2006
Offline
how can I get the name of the object/sop/etc. attached to given SHOP?
for example if i want to have a single shadow shader that takes different shadow maps from channels on lights it attached to.
Also i want to see animated texture on sprites in opengl preview, driven by point attribute?
is it possible? i know how to setup it for rendering but what about opengl?
is there any variable available for SHOP, for example, $ATTACHED_OBJ or something like that to make me know what object is processed?
I haven't found any documentation about variables for SHOPs….
User Avatar
Member
12523 posts
Joined: July 2005
Offline
In SHOPs, you have a $OBJ which is the object to which the shader is bound.

A typical setting for a VEX Shadow SHOP applied to many lights might have this in it's Depth Map field:

`chs(“/obj/$OBJ/depthmap”)`

…in this way you can apply one shadow shader to many lights, applying the relevant depthmaps defined in each Light Object.

Also, in VEX, you might be interested in the renderstate() function, particularly “object:name”. Read here: http://www.sidefx.com/docs/content/vex/functions/renderstate.xml [sidefx.com]

Hope this helps,
Jason
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
176 posts
Joined: May 2006
Offline
i knew it should be there, thanks!!
what about another part of my question, how to get animated opengl texture to be driven by per-particle attribute?
if something like $PT or $ID variable available in SHOP context, i suppose i can use point() function to query attribute i need…
  • Quick Links