group in copy sop

   6981   4   1
User Avatar
Member
2 posts
Joined: June 2008
Offline
hey all,

this is probably very obvious, but how do you make the copy sop make a group for every copied object?
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Enable the option “Create Output Groups” then in the Copy Groups string field:

copyGroup$CY
where $CY is the current copy number.

–or–

copyGroup$PT
where $PT is the point number of the template point in the right input.
or
copyGroup$ID
if the right input contains a particle system with id point attributes.

You can use any of the Copy SOP's local variables in here plus any valid hscript or python expression.
There's at least one school like the old school!
User Avatar
Member
2 posts
Joined: June 2008
Offline
thanks Jeff,

the variable for the template point number threw me off - I just left it on $CY and it only created one group. Is there any way to view all variables being passed from one SOP to another? Or to see all local variables in a SOP? Apart from in the help I mean, something more immediate, like middle clicking on the SOP itself or similar?

Thanks again for your help…
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Is there any way to view all variables being passed from one SOP to another?

Yes there is. You can either MMB (Middle Mouse Button) on any SOPs icon to see what attributes are currently present in it's cache: Vertex, Point, Primitive and Detail Attributes. You can also open up a Geometry Spreadsheet (Details View) for any operator to see all the attributes present.
In order for a SOP to pass an attribute, it has to be present in that SOPs cache.

This answers your question but not quite what you wanted…


There are a set of “default” attributes for verticies, points and primitives that are simply “assumed”. It is quite easy to see all these default attributes too. Just put down a Vertex SOP and start adding all the possible vertex attributes.
Same for a Point SOP to see the default point attributes. There are a lot of them here.
And finally a Primitive SOP for all the primitive attributes.
Doing this you can both query what the attribute “name” looks like with the MMB info on the SOP as well as the actual variable used to access the attribute in the parameter adding that attribute.
The name is invariably all lower case whereas the variable accessing the attribute is all upper case and is preceded with a $ dollar sign.

One thing that confuses new users is when to use the attribute name or it's variable. It's quite simple: You use the upper case $ variable in any floating point parameter (those parameters that take a value by default). For example the color parameters of a Point SOP.
You would use the actual name of the attribute in a string field designed to take in a specific attribute name. For example the Attribute Transfer has an attribute field as well as the Copy SOP.

To complete the story, you can also put down a POP Network SOP and you get a bunch more “default” attributes like id, age, life, and more. Add a Property POP, Sprite POP and others to add even more attributes.

Mix in custom attributes and you have a complete field day. No wonder there isn't a complete list of attributes. It is simply too dynamic and fluid to capture in one place. You really have to look at each SOPs local attributes in the help to get a complete picture.
Still users wish for a box to place all the attributes in. WIP.
Where it is easy we do it. For example each and every POP has a listing of all local attributes. Easy when they are all of one class: point attributes.


Another thing to consider is if a SOP actually supports varying variables. Surely a Point SOP does, but one is surprised to find that any VEX or VOP SOP doesn't accept varying variables in it's parameter interface. Nor does an Edit SOP. Most SOPs do take varying variables but don't be surprised when you come across one that doesn't.

Some SOPs take only a specific type of Attribute. For example, a Primitive SOP can't access a Point attribute. You have to use an Attribute Promote SOP to move the attribute to the correct type.

Once you get comfortable with Attributes in Houdini, that's pretty much it. Houdini turns in to a really neat geometry playground to experiment with ideas in a great many ways.

Good luck.
There's at least one school like the old school!
User Avatar
Member
252 posts
Joined:
Offline
Hi, I know this is quite old, I just wanted to say thanks for the lengthy reply, it touched upon quite a few quirks that users new to Houdini might find really useful.

I agree, “When to use the Attribute name or the Variable name” got me confused — it still does sometimes.

Another thing that confused new users like me is the use of the terms “Points” and “Vertices”.. I almost always thought of those as one.
But after reading the help [sidefx.com] a couple of times (and through tests/exercises), it made more sense.


EDIT: I found another very insightful (although lengthy - but worth the read) thread regarding insights on Houdini - from the same author!
http://forums.odforce.net/index.php?/topic/17105-short-and-sweet-op-centric-lessons/#entry104263 [forums.odforce.net]
  • Quick Links