Hi
I am trying to understand how the Bind VOP option “Use input value if not bound” works.
I'd have thought that when this option is checked, and an attribute with the same name exists on the geometry (bound is active), then the value of this attribute would be used instead of the input.
So I created an attribute “height” with an Attribute Wrangle just before the Attribute VOP, so that it is bound.
And whether I activate this wrangle node (attribute bound) or deactivate the wrangle (attribute not bound), the VOP always uses the Bind VOP input value.
Is there something I am missing?
I set up this hip file, and hopefully the stickies are clear enough.
I would love to have this explained.
Thanks for your help.
ps : On the Bind VOP, the Export In Context parameter is always deactivated, whatever option I set on the Export menu. How do you activate and change it? Or maybe there is only one context one can export a parameter to?
Bind VOP - Use input value if not bound
2831 4 0- bebe
- Member
- 53 posts
- Joined: June 2009
- Offline
- tamte
- Member
- 8539 posts
- Joined: July 2007
- Offline
I don't see any hip but
1. default Bind VOP doesn't have any input
- if bound it outputs bound value
- if unbound it outputs Default value
2. if you check “Use Input Value If Bound”, the input appears
- if you don't connect anything to it then it's the same as 1.
- if you connect value to input then that value is used if not bound
3. now, if you have Bind VOP with just Export set to other than Never
- input appears as well and works the same as 2.
- however by setting export the attribute may be created/modified (following Export parm setting)
- so if you want to avoid modification and still use input value, that's when you use 2.
4. Export context is available in multi-context VOP networks like Material SHOP
- since Attrib VOP is just CVEX context you can't really switch
- but in Material SHOP you can export to surface, displacement, fog, light contexts etc.
1. default Bind VOP doesn't have any input
- if bound it outputs bound value
- if unbound it outputs Default value
2. if you check “Use Input Value If Bound”, the input appears
- if you don't connect anything to it then it's the same as 1.
- if you connect value to input then that value is used if not bound
3. now, if you have Bind VOP with just Export set to other than Never
- input appears as well and works the same as 2.
- however by setting export the attribute may be created/modified (following Export parm setting)
- so if you want to avoid modification and still use input value, that's when you use 2.
4. Export context is available in multi-context VOP networks like Material SHOP
- since Attrib VOP is just CVEX context you can't really switch
- but in Material SHOP you can export to surface, displacement, fog, light contexts etc.
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- bebe
- Member
- 53 posts
- Joined: June 2009
- Offline
Tamte, thanks for your clear answer
Not sure what happened with my file, trying to uploaded it again, sorry about that
I set up your 3 cases along side with my initial example in the same .hip file
And I don’t get your 3rd case
When I activate or deactivate attribwrangle_height2 the result stays the same
Beside this, I don't get your 3rd case second point either:
Related question, that might mess it all:
I see the same options on the Parameter VOP, I guess this works the same as Bind VOP?
I can’t mix them though right?
Seems like I can't have a Parameter VOP having the same name as a Bind VOP
Thanks!
Not sure what happened with my file, trying to uploaded it again, sorry about that
I set up your 3 cases along side with my initial example in the same .hip file
And I don’t get your 3rd case
When I activate or deactivate attribwrangle_height2 the result stays the same
Beside this, I don't get your 3rd case second point either:
however by setting export the attribute may be created/modified (following Export parm setting)Would you mind developing?
Related question, that might mess it all:
I see the same options on the Parameter VOP, I guess this works the same as Bind VOP?
I can’t mix them though right?
Seems like I can't have a Parameter VOP having the same name as a Bind VOP
Thanks!
Edited by bebe - Feb. 20, 2017 16:22:25
- tamte
- Member
- 8539 posts
- Joined: July 2007
- Offline
bebe
And I don’t get your 3rd case
When I activate or deactivate attribwrangle_height2 the result stays the same
it does because you have export on and as I said if the export is on it behaves the same as 2. and that regardles of whether Use Input Value If Bound is on or off
do you really want to be exporting it?
bebeexport simply means that an attribute of the same name and type will be created and populated with the input value or even default value if export is set to Always
Beside this, I don't get your 3rd case second point either:
however by setting export the attribute may be created/modified (following Export parm setting)
that as well means that it will overwrite the value of that attribute if it already existed
and yes, Bind is just stripped off Parmeter VOP, we used to use Parameter VOP with invisible option for that before Bind was introduced
both bind to attributes by name/type, both can export values, but Parameter VOP can show as parameter on your Vopnet and Bind can't
Edited by tamte - Feb. 20, 2017 17:31:57
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- bebe
- Member
- 53 posts
- Joined: June 2009
- Offline
Thanks Tamte, I think I get it now
So this raises two questions, and hopefully the last ones :
1) is there a way, in VOP, to use input value if not bound, and replace the attribute by the input value if bound?
In /obj/parameter_binding__parm_and_bind_VEX I built a VEX example (in green) where I can chose what to do when parameter is bound:
2) I am trying to reproduce in VEX the “Use input value if not bound” option:
is this correct?
Thanks.
So this raises two questions, and hopefully the last ones :
1) is there a way, in VOP, to use input value if not bound, and replace the attribute by the input value if bound?
In /obj/parameter_binding__parm_and_bind_VEX I built a VEX example (in green) where I can chose what to do when parameter is bound:
- Use attribute
- Multiply attribute
- Replace attribute
2) I am trying to reproduce in VEX the “Use input value if not bound” option:
float @height = 0.0; if (!isbound("height")) { @height = ch("height"); }
Thanks.
Edited by bebe - Feb. 21, 2017 15:12:45
-
- Quick Links