What would be a good way of loading a PhysicallyBasedMaterial from a USD file that I have configured with Reality Composer Pro? Ideally I would like to host several materials in a single file and load them from code to be assigned to my generated geometry. With a ShaderGraphMaterial
this is possible using init(named: String, from: String, in: Bundle?) async throws
but PhysicallyBasedMaterial does not seem to have a similar mechanism.
For now I am stuck with defining my material & a dummy object (one each per USD file), loading that object as ModelEntity and grabbing the material from its model component – and then disposing the dummy object.
1