Local variables created in VOPSOP

   5926   6   0
User Avatar
Member
9 posts
Joined: May 2012
Online
Hello all,
i'm testing houdini and i'm trying out some stuff that i usually do in softimage. All was well till i hit my first wall: i create a variable in a vopsop with addattrib, i give it a name in the attribute field and the same name only capital letters in the local variable name field. But i can't access that variable in for eg. extrude sop (with $). It works fine in a group sop. I then tried to just create a test attribute with attribcreate sop and i can't access that in extrude sop too (in Depth scale parameter as an example). It seems that extrude accepts only a limited amount of variables (can't use $PR too?)
So…what am i doing wrong?: )
User Avatar
Member
339 posts
Joined: Aug. 2007
Offline
You should use PolyExtrude instead of Extrude, that will accept $PR and other primitive attributes. The attribute you are creating in VOPs is a point class so I beleive you'll need to use an Attribute Promote SOP to make it primitive class if you plan to use it with PolyExtrude. Hope that helps!
Jesse Erickson
Fx Animator
WDAS
User Avatar
Member
9 posts
Joined: May 2012
Online
Thanks a lot! So extrude works on detail level or it doesn't iterate through anything? I wonder why it doesn't accept those variables (trying to get more familiar with what's under the hood).

PS: on an unrelated note when i tear of the network window, put it on a separate monitor and try to create sop or any nodes for that matter it works…weird: houdini always asks where would i like to put the node in 3D viewport, gives error messages and etc.
User Avatar
Member
1814 posts
Joined: Oct. 2010
Offline
Hey andzelmas, I am a fellow soft image user who started using Houdini a while back and loving it so far

I remember hitting this wall before actually. Houdini operators work at certain levels (ie detail, primitive, point, vertex). This is actually based on a hierarchy, where if the operator operates on points, for example, a primitive variable is ok, but a primitive operator cannot use a point variable (as these will vary depending on the points on the prim)

You can use attribPromote to change an attribute class. You can also use the point() or prim() or global() hscript expression too to get an actual attribute variable at a certain element I'd, or even use pointavg() to get the average value of a point attribute

I do believe extrude operates at the global level as it is meant mostly for extrusions on curves and shapes such as text. You can get around this by using a forEach and set the iteration type to each primitive (then you can extract your prim or point attribute by just pinging index 0)

Hope this helps!
-G
User Avatar
Member
9 posts
Joined: May 2012
Online
Thanks! I actually got a grasp (i think) of the different Houdini contexts since they are a bit similar to softimage ICE's contexts. Knowing what nodes work in what way is the hard part for me right now. It's sort of a trial and error: try to enter variable - can't do it, well probably the wrong context for this SOP, time to try a different approach to the problem.
But even though I've been trying Houdini only for a week or so i like it - and extensive free tutorials really add to the experience.
User Avatar
Member
339 posts
Joined: Aug. 2007
Offline
Also you can find what local variables are available for most SOPs at the bottom of their help cards.
Jesse Erickson
Fx Animator
WDAS
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Exactly what Jesse said. The Help card for every operator will list if that operator uses local variables and what they are used for.

What's happening under the hood makes sense for VOPs as they are used to construct an operator but not for SOPs as they are an application in them selves.
It's up to the SOP geometry node itself. It gets the previous SOPs geometry and then processes it with it's own programme. Once you can wire a few SOPs together and you understand the basics, time to master each SOP node by reading it's help card and looking at the many example files at the bottom for most of the nodes. Almost all SOPs when decimating geometry will re-construct all attributes for you so no need to worry about that.

If that SOP doesn't support local variables (after looking at the help) and you really want it to, submit a “Request For Enhancement” or RFE to Support. Many times this is all that it takes if it makes sense to add to that SOP.

The Extrude SOP doesn't support local variables. Why? Most likely because it's 25 years old and ported from PRISMS, SESI's previous animation package. Should it support local variables? Pitch your case in an email as an RFE in to Support.
As for the Poly Extrude SOP, it also didn't support local variables until it was added in Houdini8.0 I believe.

Since each SOP is in itself it's own application or plugin running inside the Houdini framework, each SOP will have it's own unique default local variables but will also support other user-created variables if they match the same type (vertex, point, primitive, detail). This is why all Houdini users will flip up a help card on a SOP if they haven't used it in a while to quickly get a handle on how that operator works.

Hope that helps clear things up.
There's at least one school like the old school!
  • Quick Links