That is a very useful info you fetched here . So let me ask you something:
if the parser is going to read from bytearray , do you think the parse time
would get shorter? Or it can't read from bytearray at all and in this case
we have to deserialize the data as DAE and then parse , and then nothing
changes?

On Wed, Apr 28, 2010 at 8:18 PM, Ken Railey <[email protected]> wrote:

> Well I can only speak for my own projects, but in my case with a large
> animated Collada file the loading is measured in ms, while the parsing is
> measured in seconds (sometimes approaching 10, depending on the mesh
> complexity).
>
> I am also interested in any techniques anyone has found to speed up the
> parsing step, particularly in the animated Collada case.  It seems like
> exporting the model directly to as3 using something like Prefab would be a
> significant win, but I don't believe that animations are supported
> currently.  At least, they weren't the last time I attempted to test it.
>
> -Ken
>
>
> On Wed, Apr 28, 2010 at 7:50 AM, Michael Iv <[email protected]> wrote:
>
>> Thinking of what you have just said my question is how much of those 3
>> seconds is loading time vs actual parsing(supposing that you load your
>> models) ? Because if i bring in serialized model file with bytearray , it
>> still needs to get parsed , but if the loading part is swift we can spare
>> more time on the whole routine .
>>
>>
>> On Wed, Apr 28, 2010 at 3:29 PM, tarwin <[email protected]> wrote:
>>
>>> If you've got animation in there you're up against a whole other
>>> problem. One thing I've been looking (actively working on) at is
>>> loading one Collada animation and substituting Vertex data (just a
>>> quick replace in the XML) for the model I want, then using a hack of
>>> Katopz' MD2Buidler creating AnimatedMeshs out of it. The two slowest
>>> parts here are the parsing of the Collada and then the creation of the
>>> AnimatedMesh, but I think (and this is where I'm still unsure)
>>> creating some kind of pre-parsed Collada format might help a lot here.
>>>
>>> The idea is to build a serialized version of the Collada object
>>> (Away3D object) that I can build into a Collada super quick, rather
>>> than building it directly from the XML which is super slow (mostly
>>> because XML reading is slow). If you have the serialized Collada
>>> object in memory already hopefully you could just replace parts of it
>>> (vertex data) and have it done super quick.
>>>
>>> It currently takes over 3 seconds to process a Collada and then create
>>> an AnimatedMesh (1500 verts, lots of bones and 5 seconds of animation)
>>> but I'm guessing this could be cut down quite considerably if you have
>>> the cached Collada (maybe 1 second which could then be hidden with
>>> some kind of transition).
>>>
>>> Thoughts anyone? How would YOU hold Collada info to create one
>>> quickly, but also minimize file size? How about just creating a Class
>>> wihich has a bunch of lines like:
>>>
>>> // not working code, just a quick idea !!
>>> c = new Collada();
>>> m = collada.addMesh(Vector(123,43,.34,-34,34,-343));
>>> m.addBones(Vector(123,43,.34,-34,34,-343));
>>>
>>
>>
>>
>> --
>> Michael Ivanov ,Programmer
>> Neurotech Solutions Ltd.
>> Flex|Air |3D|Unity|
>> www.neurotechresearch.com
>> Tel:054-4962254
>> [email protected]
>> [email protected]
>>
>>
>


-- 
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
Tel:054-4962254
[email protected]
[email protected]

Reply via email to