3 ms·
Variations of this design are quite common in realtime rendering engines after people realised that putting everything into a single giant scene graph isn't a g
by flohofwoe 10y ago
Variations of this design are quite common in realtime rendering engines after people realised that putting everything into a single giant scene graph isn't a good idea (so at least since the very early 2000's).
For instance in our engines (Nebula2 and 3) there are so-called "frameshader" files (XML, nowadays it would be JSON of course) which describes a frame as a sequence of passes, the result of a pass is a valid render target texture or the final visible image, and a pass consists of per-material batches (or buckets).
Higher up are 'stages, views, and entities', a stage is a collection of graphics entities, a view is a 'view into a stage' (a view owns a camera and a frameshader), and entities can be models, lights and cameras. Multiple views can be attached to the same stage, and views can depend on each other (although in the >10 years we use this concept, dependent views were hardly needed).
- Mayzie 10y ago> people realised that putting everything into a single giant scene graph isn't a good idea (so at least since the very early 2000's). Why?
- flohofwoe 10y agoGo to Tom Forsyth's blog here: https://tomforsyth1000.github.io/blog.wiki.html https://tomforsyth1000.github.io/blog.wiki.html and find the "Scene Graphs - just say no" post (I failed at providing a direct link, apologies).
- detaro 10y agodirect link: https://tomforsyth1000.github.io/blog.wiki.html#%5B%5BScene%20Graphs%20-%20just%20say%20no%5D%5D https://tomforsyth1000.github.io/blog.wiki.html#%5B%5BScene%...
- theprotocol 10y agoA high-level intuitive, if simplistic answer, would be that you want to do batching based on type, and a monolithic scene graph does not arrange things by type; nor is it in general a valuable abstraction for rendering graphics, which are ultimately highly non-hierarchical and undermined by the constant need for sophisticated traversal logic.