Hi,
we’re in the process of upgrading to USD 24.11 and we were on 24.03 before, so we skipped 24.05 and 24.08. As we’re testing things we’ve noticed a behavior change with the SBSAR dynamic file format plugin: USD-Fileformat-plugins/sbsar at main · adobe/USD-Fileformat-plugins · GitHub
I suspect the behavior change is due this big change: Compose dynamic file format arguments through all non-dynamic arcs. · PixarAnimationStudios/OpenUSD@4076951 · GitHub
It’s from May 10th by @diyajoy. But I’m not 100% sure, since it’s hard to revert individually. But it seems to be the only change in that space.
We have a simplified procedural material setup using dynamic payloads that looks like this:
#usda 1.0
over "SbsarMaterial_prototype" (
active = false
)
{
custom int2 procedural_sbsar:_outputsize = (9, 9)
custom float procedural_sbsar:procParam = 0.123
# Material network definition goes here
}
def Material "SbsarMaterial" (
active = true
prepend references = </SbsarMaterial_prototype>
variants = {
string resolution = "res0016x0016"
}
prepend variantSets = "resolution"
)
{
variantSet "resolution" = {
"res0016x0016" (
prepend payload = @/path/to/SbsarMaterial.sbsar:SDF_FORMAT_ARGS:depth=1@</SbsarMaterial>
) {
custom int2 procedural_sbsar:_outputsize = (4, 4)
}
}
}
Note the two procedural attributes: procedural_sbsar:_outputsize
and procedural_sbsar:procParam
, which both exist on the /SbsarMaterial
prim and are originally coming in via the references
arc from /SbsarMaterial_prototype
. Also note that procedural_sbsar:_outputsize
is set to a different value inside of the resolution variant.
When the dynamic file format is called with ComposeFieldsForFileFormatArguments()
we use the PcpDynamicFileFormatContext::ComposeAttributeDefaultValue()
to get the default values of these procedural attributes.
With 24.03 we get a default value for both attributes: (4, 4)
and 0.123
respectively.
With 24.11 we get only a default value for procedural_sbsar:_outputsize
and the value is (4, 4)
.
That is the behavior change. We’re curious if that happened to work in the past, to get the default values that came via the references
arc, but is actually incorrect and that the new behavior is correct. Or if it should actually provide all default values of attributes that exist on the /SbsarMaterial
prim?
I did some experiments to change the setup and put the default values directly on the /SbsarMaterial
prim (instead of on the /SbsarMaterial_prototype
prim ) and that works as before. Authoring overrides on this attributes on stronger layers also works.
I also removed the resolution variant and that works as before, while still having the references
arc in there.
#usda 1.0
over "SbsarMaterial_prototype" (
active = false
)
{
custom int2 procedural_sbsar:_outputsize = (9, 9)
custom float procedural_sbsar:procParam = 0.123
# Material network definition goes here
}
def Material "SbsarMaterial" (
active = true
prepend references = </SbsarMaterial_prototype>
prepend payload = @/path/to/SbsarMaterial.sbsar:SDF_FORMAT_ARGS:depth=1@</SbsarMaterial>
)
{
}
Some guidance around the expectations for this would be helpful.
(My best guess might be that this an unexpected LIVRPS effect of having the payload on the variant and then the payload doesn’t see the R part of the prim, since it is still evaluating the V part.)
Thanks so much,
Florian