Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How do we Set up and export animated character from blender to AGK

Author
Message
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 9th Dec 2015 22:13 Edited at: 9th Dec 2015 23:12
Hi there
Does anybody know how to set up and export an animated character with a bone rig to AppGameKit?
What is the best format to export to? And what export options should be ticked?

I have successfully imported a character from Mixamo fuse into Blender with animation. I have exported it both as a .dae (collada) file and as a .fxb file.
The model comes up in agk. But I can't seem to animate it. GetObjectAnimationName() returns empty.

There is a lot of factors in this question, but if anybody have any experience with this....please throw them at me

Tim

EDIT: attached my blender test file

Attachments

Login to view attachments
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Dec 2015 01:52
I am not sure if the .fbx or .dae formats export animation data in Blender you would need to do some research.
I am not an expert with Blender but I did export your model from Blender in the .x format and it contains animation.
I tested it in AppGameKit and the animation works. FYI your model contains 48 bones I believe there is a 40 bone limit in AGK
so you may want to reduce the number of bones. I have attached the .x file. Hope this helps.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Dec 2015 08:23 Edited at: 10th Dec 2015 08:24
I would really like to know how to do this as well.

For that oldman file, the .x version you posted looks like the attached image. It does play the animation.

The .blend file loads into Blender and plays the animation.

A .obj file exported from Blender loads into AGK2, but does not animate.

The .blend file seems to load into AGK2, but I cannot see anything. All .blend files that I save in the current Blender version have this behavior. I have been able to load and see some .blend files that I believe were made with earlier version of Blender.

Is there some trick to loading in current .blend files? Or getting .x files exported from Blender to look right?

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 10th Dec 2015 09:07
Hi

I think the "Collada" import doesn't works in AppGameKit (with animation).

The .x is ok, but the animation is always named "global". All animations must be in one action, not several.
And we have to choose the animation with the frame we want (ex : walk -> frame 1-20, die -> 21-30, hit -> 3 -40...).
AGK2 tier1 - http://www.dracaena-studio.com
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Dec 2015 13:28
Blendman, have you been able to load a Blender file exported to .x file with children (animations) into AGK2?

Any .x file I export from Blender doesn't load correctly with the "with children" command.

If you can, would you mind posting a .x file exported from Blender, with any animation, that you have been able to load into AGK2?

I am trying to find out if it's a problem with AGK2, or maybe a problem with my computer.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 10th Dec 2015 13:35 Edited at: 10th Dec 2015 15:01
Rich Dersheimer : I have made a very simple animation (with blender 2.76) to test the export .x from blender to agk2 and it works fine.
AGK2 load the model and its animation.
Here is my test file :
http://www.dracaena-studio.com/images/games/dev/bug/animation.x

I haven't found how to export the oldman.blend in this thread. it doesn't work for me, with the 2.76, in the .x format.
AGK2 tier1 - http://www.dracaena-studio.com
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Dec 2015 13:39 Edited at: 10th Dec 2015 13:50
Link

Thanks for posting that, I will check it right away!

EDIT: Rats! That link just opens a web page with the text on it. I'll copy and paste though.

EDIT 2: The very first time I loaded your test object, some of the face vanished. Every time after that it looks fine, the animation plays. Is there some special settings that you had to use to get the .x export out of Blender to work correctly?
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 10th Dec 2015 15:04 Edited at: 10th Dec 2015 15:15
For the export, i have checked : exports meshes, normals, uv coordinnates, export skin weights, amatures bones, rest position, animation, animation as animationset.

For the link, I have attached the file, I don't know why it open a web page with text ^^.
AGK2 tier1 - http://www.dracaena-studio.com

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Dec 2015 15:08
Thanks, Blendman! Using those settings, I have just exported my first .x file from Blender into AGK2 that actually shows up and animates! Woot!
Yodaman Jer
User Banned
Posted: 10th Dec 2015 20:59
Can a mod sticky this thread so that other people may benefit from it? Lots of useful stuff in here that will certainly help me out in the near future!

Forum President until June 20th, 2016.
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 11th Dec 2015 06:12 Edited at: 11th Dec 2015 06:13
look here....
https://forum.thegamecreators.com/thread/215791
maybe can util
using AppGameKit V2 tier 1
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 13th Dec 2015 02:42 Edited at: 13th Dec 2015 04:41
Hi there and thanks Blendman and Stab in the dark.

Exporting it to x format works for me. I don´t know why .dae or .fbx does not show animation....
As Stab in the Dark pointed out - the mixamo fuse characters has over 40 bones so I guess thats why the hands get distorted. I reduced the number of bones down to 42 by only using 2 bones for the hands. So now only one hand is distorted. I think Mixamo fuse is a great way to make som placeholder prototype animations, but to use them you have to either remove the hand bones (then you're down to 25 bones - but you get stiff hands) or remove some bones manually in blender (but then you f**k up the mixamo animations)...

Thanks for the help....I´m a huge step closer thanks to you guys...and I´ll post any solution to the bone limitation for Mixamo fuse - if I find any.

Attached is the exported .x model with 42 bones - but agk reduce them to 40 and thats why (I think) one hand is distorted.
Also - exporting to .x format rotates the model - so its upside down.

EDIT: attached another model: woman.x with only 25 bones (stiff hands). Works fine. No distortion. So I´m pretty sure now that the number of bones is why the oldman.x model is distorted.

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 13th Dec 2015 13:01
@ TimShark : how do you use your .dae in agk ?
in PlayObjectAnimation(), the startTime and EndTime is in second, not in frame. I did this error when I tried to open a .dae animation
AGK2 tier1 - http://www.dracaena-studio.com
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 14th Dec 2015 09:20
Blendman, yes, the .dae file shows up but it only plays the current animation set during export. I cannot access the other animations "actions" by name as I can with .x.
My model includes 10 different animations.

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 14th Dec 2015 18:05
Tim, I think you should use the StartTime and StartEnd.
It's possible that blender doesn't export the animation set name, so it's better to use the frame for your animation.

For example, in blender, you should have :
Total frame (for 10 animation of 20 frame) : 200 frames
- frame 0 to 20 : walk
- frame 21 to 40 : run
- frame 41 to 60 : die
and so...

In AppGameKit, you can use :
walk -> framend = 20 /200 or 0.1 -> PlayObjectAnimation(objid,"",0,0.1,1,0)
Run -> framend = 40 /200 or 0.2 -> PlayObjectAnimation(objid,"",21/200,0.2,1,0)
die -> framend = 60 /200 or 0.3 -> PlayObjectAnimation(objid,"",41/200,0.3,1,0)
and so

I don't know if it works, but I think that it does .
Tell me if it's ok for you, I'm curious to know if this technic works ^^.
AGK2 tier1 - http://www.dracaena-studio.com
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 14th Dec 2015 23:22 Edited at: 14th Dec 2015 23:24
Blendman, I read your post inside the agk snippets thread and learned that you need to have all your animation on the same timeline, instead of separate actions when you export to .dae.
That´s my problem - else .dae works much better with agk
I have to stack my animations different now - some work to do.
Thanks for all the help
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Dec 2015 21:12
Please can someone send me a .dae file with multiple animations, each with a different name, as this is something thought the Asset Import Library would support, and I want to check out what is happening.
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 18th Dec 2015 16:01 Edited at: 18th Dec 2015 16:04
Paul, I´ve searched around and I found this:
http://gamedev.stackexchange.com/questions/43221/blender-multiple-animations-and-collada-export

Where the answer is :"The Collada exporter in blender does not support what Collada calls "animation clips", so only the current animation will be exported."
The answer is from 2012 though.
Anyway - here is my test file. Both in blender and the exported collada (.dae) file.
Maybe someone else has a working .dae file with "animation clips"

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 18th Dec 2015 18:43
Hi Paul

I use blender to export my animations and 3D models, and unfortunaltely, Blender doesn't export the animation names, I don't know why.

But here is a file (dae) with multiples animations (but I guess with no names), an AppGameKit file and the blend file.
http://www.dracaena-studio.com/images/games/dev/AGK_Animation_dae.zip

In the AppGameKit file, you will see that I use the animations Frames to set the animations (attack/die/wait).
I hope this will help you .

AGK2 tier1 - http://www.dracaena-studio.com
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 19th Dec 2015 11:27
Paul, since agk uses the "open assets import Library" - why does it not show blend files? Could it be that the importer is not updated to blender 2.7xx?

Login to post a reply

Server time is: 2024-11-25 13:34:45
Your offset time is: 2024-11-25 13:34:45