Wasn’t sure if this fits better as a help topic or a more general discussion.
I have a .glb file containing multiple objects. My usual workflow is to right-click the file and choose New Inherited Scene. In the scene tree of this new scene, all the names of the MeshInstance3D nodes are displayed in yellow. What exactly does the yellow color indicate? Does it mean they represent external data? On the other hand, if I use the import Action Set Mesh Save Paths to extract all meshes as .res files, I can drag and drop these mesh resources into a scene. In this case, the name of the MeshInstance3D is white.
So now I have both white and yellow MeshInstance3D nodes in my scene, and they seem to behave identically. For instance, both get updated automatically whenever the .glb is re-exported. What is the exact technical difference between them (e.g., regarding memory or performance), and what is the preferred workflow when working with .glb files in Godot?
I have read this thread:
Shouldn’t be the mesh res be yellow too? And write protected as long as it’s not local? Isn’t the mesh res not inherited, too? Would this be the solution for the OP of the other thread (working with the Res meshes)?
EDIT: Maybe by writing this down I got it. The quote by gertkeno is the reason, and they are not that equal as I thought. And you have the additional res files. I guess Godot has something similar in the cache for the glb.
Yellow nodes means that the scene is being inherited which has some limitations:
When you import a 3D file (.gltf, .glb, .fbx,…) Godot creates a scene file internally in the .godot/imported folder. This scene file is the one used as the base of the inherited scene.
When you save the mesh as a Resource (.res or .tres file) a copy of that mesh is saved. You can do whatever you want with it but if you re-import the source glb file again, without disabling saving that mesh to a file, those modifications will be lost as the file will be overwritten.
Yep, but I want to keep the dependency. I like to reexport the glb and all meshes get updated.
I was surprised, that I can generate the res meshes with the action, and they are updated with the new glb. At first glance it looks the same as an inherited scene, with the benefit of having every object in the glb as a single mesh. That’s helpful for some kind of library. The MeshLibraries itself are only for GridMaps, right?
I’m looking for the best workflow with multiple objects in one glb to use them as separate objects and be able to update the glb.afterwards. That’s why I have explored the workflow with Set Mesh Save Paths. Wasn’t sure about the differences and benefits.
All got its own limit.
Inheritance for character models is not good idea as often you have to work with make it editable children.
Save Mesh Path for static meshes, yeah this make sense if you might made minor adjustments and update it without need to replace entire scene inside your existing level.
MeshLibrary you can still override meshes, I typically use original Blender file ( I know internally it gets to gltf) but it’s faster to extract and use it for multimesh3d, but again not seeing a point of keeping source file here as this won’t get updated and requires action of resaving MeshLibrary.
I don’t like to use .blend direct in Godot. I always have additional objects (like helper or original models as non destructive parametric objects) in the blend file. I have a collection for the objects I want to export. I have the blends in my project folder, but ignore them in Godot with a .gdignore file.
Does Godot do this also in case of the saved meshes as res in the importer? That wouldn’t make any sense. I would like to avoid the double meshdata, if it is stored in the res, I wouldn’t need it to be cached in .godot/imported. But would like to keep the dependency.
3D files are more than one mesh. They can have multiple meshes, animations, lights, cameras,… So no, they are different. Inherited scenes from 3D files keep the structure and settings of the original 3D file while saving only the meshes will keep only the meshes themselves. You can read more about this here:
When you save the mesh the saved imported scene will use that mesh resource instead so there’s no data duplication.
When you export your project the original 3D files (.gltf, .glb,…) aren’t exported and only the .godot/imported files are added to the pck file. The same happens with other files like textures, fonts,…