Skeleton Animation - Error #3607

Software: Away3D 4.x

Avatar
80prozent, Sr. Member
Posted: 08 August 2011 08:27 PM   Total Posts: 430

i am trying to create a skeleton animation by importing data from a xml-file i created in c4d using python.

creating the skeleton and the skinnedsubgeometry works without throwing errors, but when i try to assign “geometry.animation” i get this error:

Error #3607: Stream 2 is set but not used by the current vertex program

my skeleton consists of 24 joints
number of joint per vert is 2

weights and joint_indicies buffer are both assigned

this is the line that produces the error:

geometry.animation = new SkeletonAnimation(skeletonjoints_per_vert); 


thanx for any help

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Richard Olsson, Administrator
Posted: 09 August 2011 06:32 AM   Total Posts: 1192   [ # 1 ]

Have you tried to set the animationState property of the mesh instead of modifying the geometry directly?

   

Avatar
80prozent, Sr. Member
Posted: 09 August 2011 09:58 AM   Total Posts: 430   [ # 2 ]

hi
thanx for your help

i replaced

geometry.animation = new SkeletonAnimation(skeletonjoints_per_vert); 

with this:

var mySkeletonanimation:SkeletonAnimation= new SkeletonAnimation(skeletonjoints_per_vert);
main_mesh.animationState= new SkeletonAnimationState(mySkeletonanimation); 

still the same error is thrown.
any other ideas ?

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Richard Olsson, Administrator
Posted: 09 August 2011 09:59 AM   Total Posts: 1192   [ # 3 ]

Hi,

Then it definitely does sound like your buffers are off. What are the lengths of your vertex, index/triangle, normal, uv, weights and joint index buffers?


Cheers
/R

   

Avatar
80prozent, Sr. Member
Posted: 09 August 2011 10:40 AM   Total Posts: 430   [ # 4 ]

my mesh data:

verts:  3816
triangles:  5370

only one submesh

vertex:  3816 * 3
index: 5370 * 3
uv: 3816 * 2
weights: 3816 * 2
joint index: 3816 * 2

i dont upload any normalbuffer, could that by my mistake ?

i have set a normal map in the material.
if i do not try to apply animation, the mesh is created, with the normal map working correct.

i do not use the away3d loader classes for importing my data.
i just load a xml, load all needed textures, and then i create meshes and materials.
to create skinnedsubgeometry without using away3ds-build in parsers, i needed to switch the namespace of the skinnedsubgeometrys methods “uploadJointWeightsData” and “updateJointIndexData” from “arcane” to “public”, to make them available from within my code.
maybe thats causing the problem?

whats the parentIndex of the root-joint supposed to be?
0 or -1 ?

i think a example for creating skeleton animation without using away3ds loader/importer classes would really help me out…
so if anyone got something like that, please share
(of cause i am going to share my c4d to as3 solution as soon as i got the skeletonanimation to work, and cleaned up the code)

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
80prozent, Sr. Member
Posted: 10 August 2011 09:01 AM   Total Posts: 430   [ # 5 ]

i really keep trying, but cant get it working.

i spend a lot of time comparing my buffers to the buffers used in working example (md5stresstest) and i am pretty shure that my buffers are correct.

the skeleton seems to be correct too.

i guess it must be something about assigning the skeletonanimation to the mesh/geometry thats causing the error.

even if i use exactly the same buffers used in the md5stresstest example, i got the same error

i gonna post my code later (i am not on my pc right now).

maybe someone can have a look at it.

 

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
80prozent, Sr. Member
Posted: 10 August 2011 11:13 PM   Total Posts: 430   [ # 6 ]

searching for a solution, i modified the “md5stresstest” example.

after importing the mesh i do not clone it, but build a new mesh out of the cloned buffers (using concat()) of the mesh.

i build a new skeleton using new_skeleton.joints=old_skeleton.joints.concat()

still (altough using cloned buffers) if i apply the animation, i get the error.

anyone whos intrested in helping me, please download:

MD5StressTest_modified.as

if you compile it within your away3d 4 example folder, it should work and show the original md5 mesh (moving) and the new created mesh (standing still).

if you uncomment one of the two “outcommented” lines of code (apply animation) it throughs the error.

please help

thanx

 Signature 

sorry…i hope my actionscript is better than my english…

   

sparkdsd, Newbie
Posted: 01 November 2011 07:52 AM   Total Posts: 3   [ # 7 ]

this example does not work with a last build

i think i found the solution. it is very strange. but if you swap assignment the animation and assignment the material it will work.

in other words material shoud be assigned after animation is set.

—-
sorry for my bad english

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X