@Jamie.Hayes Hey Jamie, sorry for the direct tag - first of all, thanks for the tutorials and the work on this subject.
I’m trying to get the NaniteAssemblyExternalRefAPI to work, but the example appears to be broken. - trying to just replace the Box Prototype with the external ref as instructed and copying the ObjectPath (with or without the .ObjectName), I get an undefined error that has no further explanation in the logs as well:
”Failed to import ‘…\examples\nanite_assembly_houdini_tutorial_hip\static_test_externalref.usda’. Failed to create asset ‘/Game/externalreftest/static_test_externalref’.
Please see Output Log for details.” (but neither in the log files nor in the message console or wherever are any details).
I was previously trying to use this on a skeletal mesh assembly, which doesn’t throw an error, but simply ignores the prototype if it’s specified via ExternalRefAPI.
I see it as extremely crucial to have this feature if this ought to be used on anything other than experiments.
Here the example without ExternalRef:
#usda 1.0
def Xform “Example_Assembly” (
apiSchemas = [“NaniteAssemblyRootAPI”]
kind = “group”
)
{
def PointInstancer “Sphere_Instancer” (
kind = “group”
)
{
rel prototypes = </Example_Assembly/Sphere_Instancer/Prototypes/Box>
int
protoIndices = [0, 0, 0]
point3f
positions = [(0, 10, 0), (-10, 0, -10), (10, -10, 10)]
float3
scales = [(2.5, 2.5, 2.5), (3.33, 3.33, 3.33), (4.5, 4.5, 4.5)]
def Scope "Prototypes" (
kind = "group"
)
{
def Xform "Box" (
kind = "component"
)
{
def Mesh "SM_Box"
{
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
int[] faceVertexIndices = [2, 0, 1, 3, 2, 3, 7, 6, 6, 7, 5, 4, 1, 0, 4, 5, 3, 1, 5, 7, 6, 4, 0, 2]
uniform token orientation = "leftHanded"
point3f[] points = [(1.0, -1.0, -1.0), (1.0, -1.0, 1.0), (1.0, 1.0, -1.0), (1.0, 1.0, 1.0), (-1.0, -1.0, -1.0), (-1.0, -1.0, 1.0), (-1.0, 1.0, -1.0), (-1.0, 1.0, 1.0)] (
interpolation = "vertex"
)
uniform token subdivisionScheme = "none"
}
}
}
}
}
and here the example with the code snippet for the ref included, throwing the error:
#usda 1.0
def Xform “Example_Assembly2” (
apiSchemas = [“NaniteAssemblyRootAPI”]
kind = “group”
)
{
def PointInstancer “Sphere_Instancer” (
kind = “group”
)
{
rel prototypes = </Example_Assembly/Sphere_Instancer/Prototypes/Box>
int
protoIndices = [0, 0, 0]
point3f
positions = [(0, 10, 0), (-10, 0, -10), (10, -10, 10)]
float3
scales = [(2.5, 2.5, 2.5), (3.33, 3.33, 3.33), (4.5, 4.5, 4.5)]
def Scope "Prototypes" (
kind = "group"
)
{
def Xform "Box" (
apiSchemas = ["NaniteAssemblyExternalRefAPI"]
kind = "component"
)
{
uniform token unreal:naniteAssembly:meshAssetPath = "/Game/externalreftest/static_test/StaticMeshes/SM_Box.SM_Box"
}
}
}
}
Is there anything I’m missing, or something that’s missing from the tutorial? The reference points to the prior import of the USDA without the external ref. I did try to remove the .SM_Box to match the example but same result.
Best,
Tilman