My current project requires a very large railway map with lots of trees alongside for scenery. My team has created meshes and textures for low-poly realistic style trees that we can use, however, we want to get the optimal performance. One option is to use a SpecialMesh and a texture object, and another option is to upload it as a MeshPart with a low transparency value - 0.02 (otherwise half of the tree faces would be black).
I have read on here that transparent parts are not instanced and also that SpecialMeshes are not instanced. I have also read that the texture object is less efficient than using the texture property on the developer hub page about performance.
Another separate thing I could do is stream in vegetation. I am unable to use StreamingEnabled though due to its limitations.
What are your thoughts on which option we should use? Have you attempted something like this yourself? How did it turn out, and what do you think about the effectiveness of a streaming system would be?
Try not to use Special Meshes for props in your game, or things that you plan to be collided with. It’s fine to do this with things like leaves but you miss out on a ton of performance-boosting benefits that MeshParts bring, as well as approximated collision boxes.
It’s a bad idea to just apply a texture instance on top of a mesh. Try and utilise the Texture property wherever you can!
Using a MeshPart brings a lot of benefits, such as RenderFidelity. It’d be useful to know the triangle count on those trees to make a full judgement, but in general, if you set the RenderFidelity of any of the leaves to automatic, it’ll improve the performance by degrading far away details slightly. While the tree itself may not look very detailed from far away, your users will thank you for the performance benefits that LoD brings.
Thank you. I believe triangle count is around 60 though I’d have to double check. I forgot to mention that the trees will not be collidable. I think the triangle count is too low to utilise automatic LOD.
60 triangles is very very low so you’ve done a good job handling it on that end. You should have minimal issues with performance, but try using RenderFidelity and CollisionFidelity, and if it’s too low then you must be doing something right!
What do you think about a streaming system? There could be hundreds of thousands of trees in the map. When finished the routes could be 100k studs long and our scale is about 2/5th of the 1ft:1stud scale. I’m not sure if loading and unloading trees constantly would be great for performance either though.