bypass SOPs

   9509   14   1
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
Hi there.

I was asking my self, is it possible to bypass SOP Nodes with
an expression? Or create a similiar “activate” parameter as it exists
in some POP Nodes (0 == Off, 1 == On).

'd be great if someone could help me along,

all the best,

Manuel
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
186 posts
Joined: 1月 2006
Offline
Yes, you can branch from the SOP before to a null, then plug both the null and the now by-passable SOP into a switch SOP. Using the switch SOP slider you can now toggle a bypass of the SOP (by making it switch to the null instead).

cheers,
Abdelkareem
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
very neat solution, should have thought of it myself

cheers from Munich, very nice to see some other active German users!

Manuel
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
678 posts
Joined: 7月 2005
Offline
You can use something like this “opset -b on opobj/geo1/polyextrude1” but I failed (It's 3 AM where i live so this maybe the case .) to make this work in script menu, works only in textport. Maybe somebody knows a way to join this with if expresion or something similar.
Edited by - 2009年12月2日 21:29:43
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
same here, it's the middle of the night, you're not that far away i guess ^^
can't even find “opset” in the exhelp ?!
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
1921 posts
Joined: 11月 2006
Offline
opset is an hscript command, not an expression function.

To view its help you need to just do “help opset”.

To run an hscript command in the expression context you need to wrap it in an execute() expression function.

execute(“opset -b on /obj/geo1/file1”)

Depending on what you are doing, the switch method is usually better because if you wanted to do something like this inside an asset you wouldn't be able to because you can't change the flag on a node inside when it is locked.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
ah ok.

actually i wanted to do something like this:

if(ch(“./onoff”) == 1, execute(“opset -b on opobj/box_object1/visibility1”), don't bypass the SOP node)

but as you mentioned once the bypass is set, it can't be undone.
So guess i have to stick with the Null solution, although i love to keep my amount of nodes as low as possible -.-
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
7868 posts
Joined: 7月 2005
Offline
Both the Null and Switch SOPs will attempt to just reference (as opposed to copying) the geometry if possible. So most of time, those nodes incur minimal overhead.
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
ok. different approach.
Say i have plugged my geometry into a visibility SOP.
Further i have a Null SOP which has all the controls of my scene in it.
Can i access the visibility SOP's “action” parameters (hide and expose) via expressions and control them maybe with an on/off toggle ?
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
678 posts
Joined: 7月 2005
Offline
Just make switch(or if you prefer menu) on you asset ,copy paramater and paste it as reference into action slot of visibilitySOP.
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
isn't that easy!
the visibility SOP has no slot, it has a drop down Menu instead of a field where you can type in stuff.

maybe the chs() expression can help somehow?
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
678 posts
Joined: 7月 2005
Offline
asnowcappedromance
isn't that easy!
the visibility SOP has no slot, it has a drop down Menu instead of a field where you can type in stuff.\

Actually it's that easy

It just does't matter. Still zero means first option in menu and one means second option in menu.

In attached otl I just made RMB+copyParameter and then pasted it into action slot/menu of visibilitySOP.

Attachments:
VisibilityExample.otl (3.2 KB)

User Avatar
Member
512 posts
Joined: 7月 2009
Offline
haha you're right,
it IS that easy ))

thanks a lot )
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
678 posts
Joined: 7月 2005
Offline
asnowcappedromance
, it has a drop down Menu instead of a field where you can type in stuff.

RMB on function name and choose “Expression/Edit Expresion” And there you have your slot
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
very slick,
that was exactly what i was looking for,
thank you

regards,

Manuel
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
  • Quick Links