nodes that iterate

   4246   2   0
User Avatar
Member
224 posts
Joined: June 2009
Offline
I am trying to figure out which SOP nodes iterate - over points, or over primitives, or both. One way to interpret this is to ask, does the node have a $PT or $PR variables. (Although I still wonder about SOPs like Measure - they seem to iterate, but they don't expose the local variables - but for the moment, I will ignore these, otherwise the list will get too long.) Can anyone help me add to the lists below - I have just put in a couple that I know off the top of my head.

Iterate over points
Point

Iterate over primitives
Polyextrude
Primitive

Iterate over either
Partition
Patrick
User Avatar
Member
224 posts
Joined: June 2009
Offline
The Delete SOP node seems to iterate and have $PR and $PT variables, even though they are not mentioned in the docs. Is that right?
Patrick
User Avatar
Member
224 posts
Joined: June 2009
Offline
Five years on from the original question, and I still see people on the forum asking similar questions. It still all seems rather opaque, and when trying to teach Houdini to others, it makes it difficult.

Now in H15 it is more complex, since we can now also use the “@” method in some parameter fields, similar to the $PT and $PR (or “@ptnum” and “@primnum”). So basically, this is what I have figure out for SOP nodes.

Group Parameters
============
For “Group” parameter fields, you can use the “@” method in all nodes. This also includes “@intrinsic:”

Other Parameters
===========
For other parameter fields, you can only use the “@” method in some nodes, i.e. in the nodes that iterate. However, note that in these cases “@intrinsic:” does not work. So far the iterating SOP nodes I know of are as follows:
- Attribcreate
- Point
- Primitive
- Partition
- Delete
- Group

For nodes that do not iterate but where iteration is required, the solution is to create an explicit loop, and use a “point”, “prim”. or “detail” HScript function.

Please let me know if I am wrong on any of this.
Patrick
  • Quick Links