Hi, guys! I’m facing a problem when loading 3DS model from already loaded data (using loader.loadData and context.mapUrlToData). Everything works fine, but parsing time is too long. My 3DS file is quite big and contains many meshes, and the delay between loader.loadData() and the first AssetEvent.MESH_COMPLETED firing is about 15-30 seconds. After that all other meshes are loaded. As far as I can see, this may happen because Away3D parsers use frameLimit to limit time for parsing per frame. I tried to change this value directly, but it did not help. I’d actually better freeze for 1-2 seconds than wait 15 seconds to parse 3DS data “asynchronously”... But maybe the reason is different. Hope someone helps to solve this. Thanks in advance! And also I’d like to thank Away3D team for developing a fantastic engine (despite some minor issues everythings works really well!)
Loading 3DS data delaySoftware: Away3D 4.x |
||
|
||
Andrey, Newbie
Posted: 09 November 2011 01:16 AM Total Posts: 5 [ # 1 ] I think I found the reason. Consider the following example. I have a 3DS file, containing 50 meshes. There are 5 textures (there are several meshes with the same texture in 3DS). When we map url to data (byte arrays) we tell the asset loader to load assets from this source. That is, even if 10 meshes use the same texture, it will be parsed 10 times (ByteArray -> BitmapData), slowing down entire model loading. I think it is a case for optimisation (i.e. caching BitmapDatas), because this case should be quite common (hair, trees, plants, etc.). Can something be done about it? |