brlrt / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

[Away3DLite] Collada bone animation failure #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Export a Collada file with bones who's name attributes do not match
their id, e.g.:

 <node id="Bip01-node" name="Bip01" sid="bone11" type="JOINT">

2. Import file and call update() on animation 
3. See that animations fail to update

What is the expected output? What do you see instead?

Animations fail when node and id labels do not match in the skeleton. The
animations appear to work correctly in the Advanced_MultiMario example
because the skeleton names and ids match e.g.:

  <node id="neck" name="neck" sid="bone0" type="JOINT">

The bones are referenced via their id in the animation channels, like so:

  <channel source="#Bip01.translate_Bip01-node_translate.Y-sampler"
target="Bip01-node/translate.Y"/>

So that in Collada.as:buildAnimations(), the assignment: channel.target =
_containers[channel.name];

Sets the channel target to null instead of a Bone object.

I was able to rectify this issue by simply changing the following (from
Collada.as:parseNode()):

//ColladaMaya 3.02
if(String(node.@name) != "")
{
    _objectData.name = String(node.@name);
}else{
    _objectData.name = String(node.@id);
}

to just:

_objectData.name = String(node.@id);

In my local working copy with no apparent ill effects. This does not appear
to break the Advanced_MultiMario example. 

What version of the product are you using? On what operating system?

URL: http://away3d.googlecode.com/svn/trunk/fp10/Examples/Away3DLite/as/src
Revision: 1933

Please provide any additional information below.

My model was exported via latest ColladaMaya/Maya 8.5

Original issue reported on code.google.com by ken.rai...@gmail.com on 13 Oct 2009 at 7:38

GoogleCodeExporter commented 8 years ago
this can be break ColladaMaya 3.02 support, but i'll fix it anyway because 3.02 
is
seem to be useless this day ;)

btw, what's the number of your ColladaMaya plug-in version please?
or any simple dae for test this would be nice

Original comment by katopz on 10 Dec 2009 at 7:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by katopz on 10 Dec 2009 at 8:37