FreneticLLC / FreneticGameEngine

A powerful C# based 3D and 2D game engine.
MIT License
41 stars 6 forks source link

Static World Mesh Property #14

Open mcmonkey4eva opened 7 years ago

mcmonkey4eva commented 7 years ago

Need a way to represent and render static world meshes. They'd render in one single call-to-GPU (as opposed to one per shape). If more than one texture is used, they should combine all textures into a reference atlas (Probably with easy methods to share the atlas between different property instances, esp. for ones with similar texture sets)

This would be used to accelerate static world rendering.

Would need an easy init/destroy set for EG level changes, or world geometry updates.

Would be nice to have a utility to take a set of models and their position/scale/orientation, and convert them to a single property data set for use with the above.

FutureMaximus commented 8 months ago

Instancing sounds like the perfect job for this we could easily render thousands of static meshes however changing all that data frequently even through modifying the active buffer with buffersubdata is computationally expensive if there are a lot of meshes and changes but maybe we could implement a queue system for instanced mesh updates like say 100 meshes every 10ms or something also the amount of instances would likely need to be fixed as well for the buffer size. Below are 2 examples of me using it for 100,000 spheres my FPS was completely stable.

8hvxvl

8hvzd4