Question about LOPs Merge index

   1849   3   0
User Avatar
Member
209 posts
Joined: 11月 2013
オフライン
I've noticed that in SOPs, the index order of a merge is based on the order in which nodes are connected as inputs. However, in LOPs, the index order actually takes the Scene Graph Tree hierarchical order, which by default is alphabetical. Is this intentional?

An example would be if I had an instancer lop and set the Prototype Index to 'Index', and chose index zero. The assumption would be that the first prim input would be the prim that is instanced. Eg: if my prototype input was a merge node with 3 prims plugged into it, you would assume that the first prim plugged into the merge would be Index 0.

Repro attached in next post.
User Avatar
Member
209 posts
Joined: 11月 2013
オフライン
Here is the repro. Not saying it's a bug, but just asking whether it's intentionally designed like that.

Attachments:
index_repro.hipnc (110.0 KB)

User Avatar
Member
8173 posts
Joined: 9月 2011
オフライン
Hamilton Meathouse
I've noticed that in SOPs, the index order of a merge is based on the order in which nodes are connected as inputs. However, in LOPs, the index order actually takes the Scene Graph Tree hierarchical order, which by default is alphabetical. Is this intentional?

An example would be if I had an instancer lop and set the Prototype Index to 'Index', and chose index zero. The assumption would be that the first prim input would be the prim that is instanced. Eg: if my prototype input was a merge node with 3 prims plugged into it, you would assume that the first prim plugged into the merge would be Index 0.

Repro attached in next post.

Prims don't have indices, or other implied order. The instancer has no idea how the prototype stage is composed. It could be multiple lops merged, it could be multiple layers referenced in many possible ways, many of which would not result in a well defined prim order. The instancer lop's index is based on alphabetical sorting because there isn't any other implied order. The instancer also allows defining the order explicitly with the name attribute.

The order of inputs to a merge affects layer strength. Think of as the list of files to the sublayer command. Since multiple layers can modify the same prims, this strength order determines which layer 'wins' for a given primitive.
User Avatar
Member
209 posts
Joined: 11月 2013
オフライン
Thanks Jmack - makes sense. It caught one or two people out (myself included) who were coming from a traditional Houdini background. If you're merging inside an instancer (ie; Sops) and jump up a level to lops, you could be forgiven for assuming merges would have similar behaviour.

Good to know, especially the part about strength ordering!
Edited by Hamilton Meathouse - 2021年10月3日 16:57:34
  • Quick Links