Currently, many objects (e.g. gold chests) generate excessive draw calls due to being split into multiple small submeshes.
This is done for 3 reasons:
- using multiple textures to go beyond the original game's 128x128 texture size limit.
- different material flags (e.g. for shiny metal or double-sided parts like the imp's pickaxe)
- mesh is larger than the 255 vertices submesh limit (e.g. 3DFE_GemHolder.kmf)
Implement batching and/or instancing where possible to reduce draw calls.
- Starting with partially batching those mesh groups that use the same texture and the same flags.
- Then groups with the same texture but different flags, ignoring flags that don't make a big difference for rendering.
- Finally for full batching of the whole mesh you'd need to work around jME's 1 texture per material restriction, e.g. with texture atlases or array textures.
Keep in mind that this has implications for modding/asset replacement, particularly for high-res textures.
Currently, many objects (e.g. gold chests) generate excessive draw calls due to being split into multiple small submeshes.
This is done for 3 reasons:
Implement batching and/or instancing where possible to reduce draw calls.
Keep in mind that this has implications for modding/asset replacement, particularly for high-res textures.