[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGL / Collada demo




On Thu, 10 Mar 2011 23:48:11 +0100, Chris Marrin <cmarrin@apple.com> wrote:


On Mar 10, 2011, at 9:18 AM, Erik Möller wrote:


...I dumped the dae containing just the skeleton here in case someone wants to check if their neat viewer can get it right. http://people.opera.com/~emoller/anim_walk_GDC.dae

I'm no Collada expert, but This file looks really ripe for optimization. It contains a bazillion of these:


<float_array id="bj_R_wrist-translate-animation-outtanX-array" count="31">
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
</float_array>


and another bazillion of these:

<Name_array id="bj_R_wrist-translate-animation-interpolationX-array" count="31">
BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER BEZIER
</Name_array>


I'm not sure if that's the exporter being substandard, or a fundamental issue with Collada. Hopefully you can find a way to reduce its size to make the download more pleasant.

-----
~Chris
cmarrin@apple.com




Yeah it stems from the fact that my character rig contains inverse kinematics and other controls driving the skeleton which is beyond Collada (?) and so I had to bake the animation in Maya before exporting. I'm actually using Collada as a intermediary format and converting the animation data to a json via python script so I optimize all unnecessary data like zero-rotations, one-scales and intermediary keys that don't contribute out.
The 680kB walk cycle gets cut back to 72kB which is still pretty large for a single walk cycle. json is a bit wordy, but wonderful to work with though, don't get me wrong. Deflate it and you're down to about 11kB which is looking really reasonable, pretty close to what you'd expect from a binary file.


--
Erik Möller
Core Developer
Opera Software
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------