Reference LOP creates sublayer?

   1728   8   2
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
In the file attached, I used the reference LOP to reference or payload in a sphere, then add a variant, however, the variant appears to do nothing even though variants are stronger than references and payloads. So, I checked the composition and

  1. The Reference LOP seems to be creating a SubLayer and I'm guessing that its opinions are beating out the variant, is that so?
  2. Why is the reference LOP a SubLayer here?
  3. Are composition arcs the only thing that causes a LOP to create a new in-memory layer?

Attachments:
ref_lop_and_composition_arcs.hiplc (70.4 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
7762 posts
Joined: Sept. 2011
Offline
traileverse
The Reference LOP seems to be creating a SubLayer and I'm guessing that its opinions are beating out the variant, is that so?
Why is the reference LOP a SubLayer here?

don't all nodes create sublayers? The reference node would sublayer a layer with a reference. The usdrop set to flatten implicit layers removes these node layers.
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
jsmack
traileverse
The Reference LOP seems to be creating a SubLayer and I'm guessing that its opinions are beating out the variant, is that so?
Why is the reference LOP a SubLayer here?

don't all nodes create sublayers? The reference node would sublayer a layer with a reference. The usdrop set to flatten implicit layers removes these node layers.

Yeh I'm seeing that all nodes create sublayers, I didn't understand this, but now I'm understanding why the last LOP node in the chain usually is the strongest opinion because of this sub-layering. So to confirm, that's the reason why I'm not seeing the result of the variant in this case?
hou.f*ckatdskmaya().forever()
User Avatar
Member
7762 posts
Joined: Sept. 2011
Offline
traileverse
So to confirm, that's the reason why I'm not seeing the result of the variant in this case?

I'll defer to someone with more usd knowledge than I on that one. Maybe Chris R is around? @goldleaf
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
jsmack
traileverse
So to confirm, that's the reason why I'm not seeing the result of the variant in this case?

I'll defer to someone with more usd knowledge than I on that one. Maybe Chris R is around? @goldleaf

yeah, I really want to get a more comprehensive understanding of how LOPS treats these composition arcs
hou.f*ckatdskmaya().forever()
User Avatar
Staff
451 posts
Joined: June 2020
Offline
If you look at the active layer, it should look something like this:
def "sphere1" (
customData = {
int[] HoudiniPrimEditorNodes = [14, 13]
}
prepend payload = @anon:0x7ff56b02c080:LOP:rootlayer@</sphere1>
variants = {
string model = "sphere_moved"
}
prepend variantSets = "model"
)
{
matrix4d xformOp:transform:transform2 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (-1.2, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:transform2"]
variantSet "model" = {
"sphere_moved" (
customData = {
int[] HoudiniPrimEditorNodes = [14, 12]
}
prepend payload = @anon:0x7ff56b02c080:LOP:rootlayer@</sphere1>
) {
matrix4d xformOp:transform:transform1 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (2.6, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:transform1"]

}
}
}

The variant's transform isn't doing anything because you've directly specified a transform on the prim (via your transform2 node). If you move transform2 above the reference node (i.e., so it affects the sphere being referenced - vs the sphere after it's been referenced), the variant will take priority.

Hopefully this makes things more and not less confusing

The addvariant node should be giving you a warning that your variant is authoring opinions which are weaker than existing ones.
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
robp_sidefx
If you look at the active layer, it should look something like this:
def "sphere1" (
customData = {
int[] HoudiniPrimEditorNodes = [14, 13]
}
prepend payload = @anon:0x7ff56b02c080:LOP:rootlayer@</sphere1>
variants = {
string model = "sphere_moved"
}
prepend variantSets = "model"
)
{
matrix4d xformOp:transform:transform2 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (-1.2, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:transform2"]
variantSet "model" = {
"sphere_moved" (
customData = {
int[] HoudiniPrimEditorNodes = [14, 12]
}
prepend payload = @anon:0x7ff56b02c080:LOP:rootlayer@</sphere1>
) {
matrix4d xformOp:transform:transform1 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (2.6, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:transform1"]

}
}
}

The variant's transform isn't doing anything because you've directly specified a transform on the prim (via your transform2 node). If you move transform2 above the reference node (i.e., so it affects the sphere being referenced - vs the sphere after it's been referenced), the variant will take priority.

Hopefully this makes things more and not less confusing

The addvariant node should be giving you a warning that your variant is authoring opinions which are weaker than existing ones.

what about the fact that variants are stronger than references?
hou.f*ckatdskmaya().forever()
User Avatar
Staff
451 posts
Joined: June 2020
Offline
traileverse
what about the fact that variants are stronger than references?

The scene, as provided, doesn't contribute transformations via a reference arc. There are local opinions (transform2) and variant opinions. As-is, the local ones win.

If transform2 is moved between the sphere & reference LOP, then its opinion is being referenced, and the stronger variant one wins.
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
robp_sidefx
traileverse
what about the fact that variants are stronger than references?

The scene, as provided, doesn't contribute transformations via a reference arc. There are local opinions (transform2) and variant opinions. As-is, the local ones win.

If transform2 is moved between the sphere & reference LOP, then its opinion is being referenced, and the stronger variant one wins.
understood, thanks @robp_sidefx
hou.f*ckatdskmaya().forever()
  • Quick Links