As you know, Directx has a feature called 'Instancing', which is quite wonderful actually. But how to use it properly is an entirely different chapter. And that's why I'm here.
Imagine Crysis or some other game where high level of vegetation is needed, as grass, and you need to render that. What I would do, and what I actually do:
When creating the scene:
When Creating the scene:
- Add all instances of grass
- Split all instances into different patches
- Create Instance Buffers
When Rendering the scene:
- Do some range testing and frustum culling for all patches, and all valid are added to a list.
- Render each individual element in the list
Now that method works fine for me when using static non destroyable or creatable objects, but imagine if one object has to be created? Do I recalculate the respective buffer for the bullets location.
Also in the Crysis Sandbox, or CryEngine 3 SDK, when placing/painting vegetation over the terrain, they appear lightning fast! If you have time, how does produceal vegetation work in a nutshell?
But what if we are simulating a space ship, IN SPACE! Where the space is almost unlimited, and then the player shoots, I can't have buffers for an unlimited space! (I could create buffers dynamically for where I am, but I'm not sure if that's efficient).
So, now, I ask you, what, if it exists, is the most efficient way of handeling instances of an object?
Thank You, again...