Provides high performance mesh instancing.
|AABB||get_aabb ( ) const|
|Color||get_instance_color ( int instance ) const|
|Transform||get_instance_transform ( int instance ) const|
|void||set_instance_color ( int instance, Color color )|
|void||set_instance_transform ( int instance, Transform transform )|
MultiMesh provides low level mesh instancing. If the amount of Mesh instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of MeshInstance nodes may affect performance by using too much CPU or video memory.
For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
Return the visibility AABB.
Get the color of a specific instance.
Return the transform of a specific instance.
Set the color of a specific instance.
Set the transform for a specific instance.
© 2014–2018 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.