Animate parented DisplayObject3D from DAE
This is an exemple of DisplayObject3D and its childrend animated with pv3d.It uses sceneX and sceneY properties to rotate and scale its children. Just using trigonometry, and trick is done. Unfortunately, switching from maya to papervision, some differences may appear.
When importing DAE / COLLADA files into flash using Papervision3D DAE or Collada, if your 3D object owns others objects, It might be that you will have some troubles / bug.
So I will try to show the steps to fix it, to increase community ressources.Why those changes appears ?
I don't exactly know. But I guess, when parenting some 3DObjects to other one, it changes the registration point of the current DisplayObject3D in pv3d. If I'am wrong, feel free to tell me. I'm always glad to improve my knowledge.How to setup a DAE scene with parented objects in pv3d ?
- Modelise
- Create UV maps
- Make Occlusion (if you need)
- Delete history
- Organise parenting
- Freeze transforms
- Export as Collada/DAE
By parenting, I mean to create some kind of hierarchy between Objects, something like this picture.Now, the funniest part ! Testing and Adjusting.
To be sure, run a test with your DAE, as stupid as it is, make a script to load your DAE and rotate all the children you need to animate.If thoses are rotating around an unwanted axis, you have got troubles... Else, you can be happy, even if troubles may come later.
Launch this test to display wrong behavior using parented Objects.
How to adjust ?
To be honest, I've already unsuccessfully tried : Center Pivot - Moving Pivot - Reset Transformations but the only way I can control and fix it, is by moving all vertex of the shape near the rotation axis used by Papervision3D.
- Localise rotation center from papervision
- Select Vertex
- Move Vertex to rotation center
- Move Object at its right position
0 comments about this entry