Clone Object at Export or at Load Time.

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Klunk
Posts: 264
Joined: Mon Jan 10, 2011 5:21 pm

Clone Object at Export or at Load Time.

Post by Klunk »

what are your thoughts on this ? Do you clone the geometry in the editor at export time and live with potentially huge files with lots of duplicated meshes. Or just export the root meshes along with the transform data for each clone, and live with potentially slower load times, and more complicated level loading code (re mesh batching etc).
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

um, by editor do you mean irrEdit, or blender and 3dsMax?
ent1ty wrote: success is a matter of concentration and desire
Butler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
at a cost measure in computer resources ;)
Klunk
Posts: 264
Joined: Mon Jan 10, 2011 5:21 pm

Post by Klunk »

in this case 3ds max, but the editor isn't really relevant to the question.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

In 3DSMAX you can instance objects so there is only one mesh in memory and it is posible to have lots of duplicate meshes in the scene. But in the exporting process all the instances become actual meshes, so you have to keep in mind that.

On the other hand, if you speak of building your own editor, the most reasonable way of action is to store a single mesh definition in the file, and that the scene objects reference that meshbuffer. A further optimization would consist on creating a large single meshbuffer which stored all the duplicates, and removing the originals, if these aren't meant to change.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Klunk
Posts: 264
Joined: Mon Jan 10, 2011 5:21 pm

Post by Klunk »

In 3DSMAX you can instance objects so there is only one mesh in memory and it is posible to have lots of duplicate meshes in the scene. But in the exporting process all the instances become actual meshes, so you have to keep in mind that.
that completely depends on how you handle instances in your exporter. I actually handle a lot of the scene objs by using particle flow and just reference the particle transforms as my object positions. I made no mention of creating my own editor and have no plans to do so. I fully understand the potential for mesh buffers, the question is, as originally asked when do you create them @ export time or at load time.
Post Reply