Crystal Space
Welcome, Guest. Please login or register.
July 30, 2014, 04:18:21 am

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8256 Members
Latest Member: Lrusshan091
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  Trouble Animation animesh Without Creating A FSM First
« previous next »
Pages: [1] Print
Author Topic: Trouble Animation animesh Without Creating A FSM First  (Read 737 times)
KK
Newbie
*
Posts: 5


View Profile WWW
« on: June 03, 2012, 05:21:05 am »

I'm trying to use Blender to crate my own 3D character. I made a mesh in Blender, recoded an action called "walk" and exported it to the CS format using the io_scene_cs addon from the crystalspace repository. I can view it inside the viewmesh program and animate it. This indicated to me that I exported everything correctly.

Next I replaced the cally character with my character inside the walktut app. However when I move the character forward, the walk animation doesn't play at all. I also tried to start animating as soon as the mesh is loaded, by adding the following line right after the mesh is loaded:

Code:
pcmesh->SetAnimation("walk",true);

I poked around the iPcMesh code and the viewmesh code, to see what the difference between the two is. I found out that viewmesh first creates an FSM for all animations, and then uses that to play them. iPcMesh just checks if an FSM exists, and if not it it does something else. I found that if I copy-pasted the code from viewmesh's AnimeshAsset::RebuildAnimationTree() function to create an FSM and execute it before I set the walk animation inside walktut, everything starts working normally.

My question is, what is the proper way to use animations of an animesh? Do I need to create an FSM manually before I do anything?
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.193 seconds with 17 queries.