|
sirpedroec, Newbie
Posted: 18 January 2013 10:31 PM Total Posts: 26
Hey Guys,
So I’ve been testing with Away3D 4.1 and an iPod 4th Generation. Everything seems to work very fast up until I start playing my skeleton animation, that’s when frame rates drop from 30fps to around 6fps.
Has anyone been able to play fast Skeleton Animations?
Any tips for optimization/best format to export from prefab?
Thank you for your time everyone.
-Peter
|
Fabrice Closier, Administrator
Posted: 18 January 2013 10:55 PM Total Posts: 1265
[ # 1 ]
Skeleton animation are known as heavy on these devices, that’s why for the AS3 exports a converter from skeletal to vertex animation was added in the first place.
Your app will gain a few bytes extra because of the keyframes stored, but you will gain on init time. The tests I’ve made showed that anims were running faster and smoother. (tested on my old 3GS, N7 tablet, Ipad2 and different Galaxy phones). Especially on phones. The N7 wasn’t displaying any noticable differences. (awesome tablet btw)
That having said, that doesn’t apply to every animations. For the same price you would get the inverse results. Its up to you to pick what runs best for your case. Modify the model in your editor…
Atm, Prefab cannot offer any edits or finetuning on skeleton animations. You can only play it back to test and export to awd2. Export to AS3 & asd will be added very soon too (without conversion). Hopefully sometimes this year, I hope to have at least the first draft of a full animation generator for these.
Unfortunatly, atm there is nothing more that Prefab can do for you…
|
sirpedroec, Newbie
Posted: 18 January 2013 11:10 PM Total Posts: 26
[ # 2 ]
Ahh. So the best solution is to export to an AS format for a speed increase?
|
Fabrice Closier, Administrator
Posted: 19 January 2013 12:44 AM Total Posts: 1265
[ # 3 ]
Its not giving you any speed increase once all is serialized. But it gives you a significant boost on init compared to any of the formats, because it doesn’t require a loader/parsing as you do for regular external data files.
This has nothing to do with the animation performance.
Vertex animation are not very demanding for the gpu, but they do take more memory space. As you publish as an app, the few extra kb’s on file size doesn’t really matter either. The bones animations demand more power runtime than vertexanimations. Tho again, you might get different results than me.
It depends on animation itself, its geometry, the overal performance of the app, the device etc…
Code wize for the AS3 outputs, a simple scene.addChild(new MyClass()) is enough to construct everything. The classes also hold meshes, materials and containers vectors that you can loop on if you need to.
Best way is to try. If it runs better, you are done. If its giving you same results or slower: back to drawingboards
|
sirpedroec, Newbie
Posted: 29 January 2013 06:11 PM Total Posts: 26
[ # 4 ]
That worked! Thank you. Though for some reason if I have a short animation (8 frames) it will play it just fine, but if I load in my character with all of his animations it seems to crash on my iPod 4th Generation. There is 130 frames in his full animation with each ASD around 26kbs. Model is small too, 2780 tris. Any optimization pointers you could give or workarounds would be greatly appreciated. Thanks Fabrice!
-Peter
|
Fabrice Closier, Administrator
Posted: 29 January 2013 07:03 PM Total Posts: 1265
[ # 5 ]
You could open your animation in Prefab’s Vertexanimator, and remove a few frames, especially the one that do not require motion that describe curves. (interpolation is linear). Almost 3k faces for an animated model, is not that small especially with 130 frames.That’s a bunch of data.
Does it crash before be displayed, or do you see it at least one render?
Try watch the ram usage.
Another thing that you could try is to have different classes per animations. This way you could swap/destroy unused data.
I would as said above look at the “when” does it runs, by making a few class outputs after being destructive in the vertexanimator. Just to see if just related to amount of data or if there is another cause.
Try to remove the animations one by one, and inspect them, make sure names of state are also correctly set.
If you still have issues after this test, please send me your prefab project so I can take a look at it.
|
sirpedroec, Newbie
Posted: 29 January 2013 07:20 PM Total Posts: 26
[ # 6 ]
Yes it crashes before anything display. If I cut down my animations to 2 animations, and set it on an animation that is larger then 8 frames, it will load Away3d but won’t show the model. Very strange.
I’ve exported an awd from Maya, I’ve opened it in Prefab, selected the model, and when I go to Vertex -> Vertex Animation Editor none of my animations shown. Perhaps I am missing a step. Thank you Fabrice.
|
Fabrice Closier, Administrator
Posted: 29 January 2013 10:29 PM Total Posts: 1265
[ # 7 ]
Ah, I assumed it was already vertex… and I again forgot to add the “convert” btn to player..
So please export as md2, it will convert it, then reimport this md2 file. and proceeed as describe above.
|
sirpedroec, Newbie
Posted: 30 January 2013 04:10 PM Total Posts: 26
[ # 8 ]
Hmmm. I seem to be getting another problem, not sure if it’s because I upgraded to prefab 2.14. For some reason when import the AWD I exported from maya, there’s an offset in my animation’s keyframes. When I press play they seem to start from the center of their respective timelines. Wondering what I’m doing wrong? Thank you Fabrice.
|