-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the same .tscn with the same .mesh multiple times in the instancer combines them into only one foliage object. #617
Comments
Godot MMIs do not have material overrides. They have a mesh reference, which has a material. When you apply a mesh scene, we extract a reference to the mesh from the first MeshInstance3D within the scene. We take the material on the mesh, or the material override in the scene, or our material override, apply it to the mesh and insert it into the MMI. We don't duplicate the mesh resource. So if you insert the same mesh resource the MMIs are going to be linked to the same mesh resource and the material overwritten on subsequent instances. We could look at duplicating the mesh. |
I wouldn't make it a high priority. Since the workaround is so simple. Anw. Also wanted to say that this actually works really well and I am quite happy about it! |
We take in packed scenes, not just tscn. No plans to change that. |
…ll material if using generated; Duplicate mesh to fix TokisanGames#617
This will be fixed by #604, |
Terrain3D version
0.9.3a
System information
Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA; 32.0.15.6636) - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)
Is the issue reproducable in the demo?
Not applicable
Issue description
My use case:
I have three differently colored types of bushes all using the same mesh.
Therefore, I load the .tscn that contains the mesh 3x into the foliage instancer each time with a differently colored material.
However, in the end, all three of these foliage slots show the same object with the same material. Painting in the world also paints only one of the three variations.
Workaround:
duplicate the bush .tscn and give each foliage slot a different .tscn to refer to, even when they use the same mesh.
Logs
No response
The text was updated successfully, but these errors were encountered: