Game Development Community

Instancing questions

by Peter Dwyer · in Torque Game Engine Advanced · 08/13/2005 (4:15 am) · 4 replies

How easy would it be to add instancing to TSE. I have a lot of objects that I need to blast to screen.

Sorry to be a bit vague but, I have to keep things wrapped until nearer release so I'm trying to get a question answered while giving away the least amount of project related info :oP

#1
08/13/2005 (12:28 pm)
It has instancing in the general "load a mesh once and then reuse it for each rendered object" sense.

In the shader model 2.0/3.0 highly batched render sense, I imagine it would be fairly trivial to add an object that did instanced rendering. You'd have to extend the GFX interface, or just call the appropriate DX9 calls on your own.

In general, implementing a specific instanced object renderer in TSE isn't going to be much harder than implementing a stand alone version of the same effect.

If you want to integrate it with the editor so you can move each object independently and so forth it might take a little more work and cleverness.
#2
08/13/2005 (2:48 pm)
Thanks Ben.
#3
08/13/2005 (8:55 pm)
Cmon Peter, really.. you COULD have said more than that... :)

Hey Ben, is that what the forest code did? Did it just render itself but render multiple instances at once while it did it?

Is there any batching going on in TSE now?
#4
08/16/2005 (2:27 pm)
@Phil - in terms of lots of little objects being batched up and drawn together - no. The interiors and tsMesh objects batch up Materials per instance, but not across instances.

Batching in that way is more of a game-specific issue and can be best tuned according to the particular game. At least for dynamic objects. We can do a better job with static objects for sure, and a new scenegraph will help with that a bunch.