Page 1 of 1
Clone Object at Export or at Load Time.
Posted: Sat May 07, 2011 1:47 pm
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).
Posted: Sat May 07, 2011 3:26 pm
by ChaiRuiPeng
um, by editor do you mean irrEdit, or blender and 3dsMax?
Posted: Sat May 07, 2011 4:46 pm
by Klunk
in this case 3ds max, but the editor isn't really relevant to the question.
Posted: Sun May 08, 2011 12:13 pm
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.
Posted: Sun May 08, 2011 3:14 pm
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.