Jump to content

LoadAnimation doesn't work


ParaToxic
 Share

Recommended Posts

Hei I have rigged my character and made a little testanimation.In one file is the character, rigged with joints but no animations and a second file are only the animated joints.

When I load the animation with LoadAnimation to the mesh it doesn't work.

I also downloaded the Soldier from the Asset store and it doesn't work too.

Maybe you can tell me where the problem is...

 

TModel base = LoadModel("abstract::soldier.gmf");
PositionEntity(base,Vec3(0,0,2));
int seq = LoadAnimation(base,"abstract::idle.gmf");


// Spin cube until user hits Escape
while( !KeyHit() && !AppTerminate() )	
{			
if( !AppSuspended() )
{
Animate(base,AppTime()/100.0f,1.0f,seq);

UpdateFramework();			
RenderFramework();			
Flip( 0 );	
}
}			

Link to comment
Share on other sites

so your 100% sure the entire hierarchy in both gmf files is exactly the same mesh and bones included?

 

also why are you animating it witb frame AppTime()/100 I bet theres a chance that that is stuffing it up as well

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

The soldier has LODs so you have to use the new LOD commands to access them (GetChild() no longer gives access to LODs). Also, if the script for the soldier is still there then more than likely it already loaded all of the animations which could be causing a problem for you. And LoadAnimation does work, as I just tried the soldier script myself. If you look at the download for the soldier in the asset store, you will see that I posted a link at the bottom of the post that has a hastily updated version of the soldier script that shows the new commands. And ken is right... dividing AppTime() by 100 as your frame is probably screwing it up as well...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Just quickly looking at this, the skeletons are not the same between the two GMF's. The base.gmf's highest bone is UD3Mesh with children bones called Null-Objekt and Root. The sk_anim.gmf's highest bone starts at Root. If you notice the soldier model and its animations all have the exact same skeleton.

 

EDIT: Also, you might want to take a look at the right leg... there is an issue with some of the vertices... maybe a flipped normal as well... or just a vert whose weight is not placed correctly...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

So I have to move the Null-Objekt down to the bottom ? Because in C4D this is the Skin-object, which is converted to this "Null-Objekt".

Yes the right leg isn't right yet, it is only a testcharacter, the final follows

 

EDIT: It seems that the soldier mesh hasn't got a mesh in it , but only the bones, because the hierarchy show's that this file contains only the bones ???

 

Look at that :

 

post-2191-0-53660200-1350159570.jpg

Link to comment
Share on other sites

Ahhh now I know the problem.When exporting a mesh with a joint in it to fbx and use the fbx2gmf converter I become the same result as in the soldier mesh.When load it in U3D and save it as gmf it creates an other object at the top of all others.The normal mesh becomes an other object a layer underneath....

 

I will try to make it with fbx2gmf converter, maybe it works ;:)

Link to comment
Share on other sites

YES IT WORKS :) :) :) Thanks. The trick is that you export the whole mesh without animations, convert it throug UU3D.The second thing is that you animate the mesh in C4D with the mesh and materials like the other, export it to u3d.Then you open UU3D and delete the groups and select all vertices and delete them too.Thats it.

Thanks again ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...