I think it has something to do with the material import settings- I’d like to use a USD Lit Shader if possible, but I feel like even so it should at least load the textures.
Hi @fusobotic , the textures are not loaded by default. You need to pass ImportSceneAsGameObject a SceneImportOptions argument with its materialImportMode set to MaterialImportMode.ImportPreviewSurface.
var importOptions = new SceneImportOptions();
importOptions.materialImportMode = materialImportMode.ImportPreviewSurface;
this.Model = ImportHelpers.ImportSceneAsGameObject(sc, Selection.activeGameObject, importOptions);
That works to make the material URP but the textures still aren’t assigning- at least not all of them. Looks like Normal and Metallic are but Albedo isn’t. Also it looks like it’s copying the textures to the project (in the Assets folder) as the game is running? I don’t want it to work this way since I want these to load at runtime from another location locally or from a URL. Is there another, better way to import besides ImportHelpers? Thanks!
What is the status on this for USD 3.0? The textures are still not applying to the imported USD. Not through code and not even if unity’s USD plugin exports a FBX as a USDZ will not have its textures imported through the USD drop down import option from that same file it just exported.
Hey, why aren’t textures imported when importing a USD file? And even when the textures are imported manually and applied to the material on the model, they don’t show? Does Unity not remap USD’s “st” values to proper “uv” values for rendering textures?