Clone Object at Export or at Load Time.
Clone Object at Export or at Load Time.
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).
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
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.
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
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.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.