Rhino 7 Datasmith Randomly Instanced Materials

I am very new to unreal engine but I have watched a couple tutorials on instanced materials. I think these are incredibly useful, however I am having trouble understanding material instances in my datasmith imported model.

I am working in Rhino 7 and have assigned all of my materials based on Layers. After exporting to Datasmith and importing to unreal the geometry looks good but when I try to edit my materials things get weird.

Some of my materials have a parent with the same name as the instance, Sphere_1 and the Maryland Flag Cylinder for example. while others seem to be arbitrarily instanced to parent materials. Sphere_2 is the parent for Sphere_3 and Sphere_1 is the parent for the Ground Plane.

Is there any way to control this Parent Child relationship in Rhino? And is there any way to avoid material instancing while using Datasmith? If I import as an FBX I don’t get instanced materials.

Hey AVandr4w !

In Rhino (and in 3dsMax) we generate materials on the fly depending on properties the DCC software gives us, instead of using predefined master materials or creating a master per new material.

Each time there is a new material type, a master is generated with a different hash, and used for all the other materials using the same properties as instances. Here you have three different material types, one with a texture (flag), two with color and roughness (the sphere 2/3) and two with just a color parameter (sphere 1 and ground plane).

This was a decision with the SDK a couple years ago to avoid having too much master materials (which added a big performance overhead/drawcalls depending on the number of materials in the scene with all the shaders compiling)

There is no current way to disable material instancing in Datasmith, but we are looking into solutions to simplify the material setup in UE5.

Cheers !