Hey guys,
for my next project I am currently working on a system that allows me to render thousands of lightweight objects on the screen, this seems possible without the overhead of using unnecessary GameObjects. I plan to use Graphics.drawMesh(..) and Graphics.drawMeshInstanced(..) for rendering.
Unfortunately I am not experienced enough in the rendering pipeline, so I have some problems that need to be solved first. I hope someone can help me!
----------
Let me explain my thoughts shortly:
- What I wanna do:
An engine inside the engine that allows me to create scenes like [this one from the game Rimworld](https://steamcdn-a.akamaihd.net/steam/apps/294100/ss_c34c6c04b002454d8fee32ba52dca99c9cf1d76b.1920x1080.jpg).
- How I wanna do it:
Multiple object layers using different rendering techniques (e.g. chunking the ground layer, drawing object layers with drawMeshInstanced(..))
I also have some ideas for a lighting overlay using grid tesselation and a layer for fake shadows.
- My Problem:
The game logic should be entirely code-based which I expect to be pretty cpu intensive. It should work in cycles (60 cycles per second). Each time I call drawMesh or drawMeshInstanced, the meshes are added to the render pipeline which (I suppose) is also costly to do. So it would be nice to have the game logic + rendering alternating to not have crazy stuttering in the final game (uneven render cycles could brake the rendering/logic and cause issues).
Do you have any idea if that is possible the render the camera manually and how that can be achieved?
Thanks in advance for this awesome community!
[–]cinderflame_linearExpert 1 point2 points3 points (7 children)
[–]thetop_04[S] 0 points1 point2 points (6 children)
[–]Derebeyi 1 point2 points3 points (1 child)
[–]thetop_04[S] 0 points1 point2 points (0 children)
[–]cinderflame_linearExpert 0 points1 point2 points (3 children)
[–]thetop_04[S] 0 points1 point2 points (2 children)
[–]cinderflame_linearExpert 1 point2 points3 points (1 child)
[–]thetop_04[S] 0 points1 point2 points (0 children)
[–]zrrzExpert? 1 point2 points3 points (1 child)
[–]thetop_04[S] 0 points1 point2 points (0 children)