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 / [SOLVED] Help needed in getting my 1st 3D character to animate

Author
Message
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 26th Sep 2021 14:51
Hi, i hope someone can help me get started with my 1st 3D character to animate.
I've downloaded a character from Mixamo in both fbx and dae formats and also a basic "walk" in both formats to try to get him to move in AGK.
I have also imported into Blender and then exported as .obj as a third format option.
No problems using LoadObject to get the character displayed just standing but i seem to have tried everything to get the "walk" part loaded and working but without any success whatsoever.

Could someone point me in the right direction to get the animation part to work?

Thank you




The author of this post has marked a post as an answer.

Go to answer

tboy
11
Years of Service
User Offline
Joined: 1st Jan 2013
Location: UK
Posted: 26th Sep 2021 15:18
You need to use LoadObjectWithChildren for animation and found you need
to call SetObjectScalePermanent to adjust the size of the model.

I currently use this function to animate the object.



Hope it helps.
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 26th Sep 2021 16:17
Hi tboy
Many thanks for your coding.
Although i get some animation, mainly flashing object, its not really animating for me.
I have tried to simplify your coding and applied it directly but animation speed may be far far far too fast or something else is wrong.
Even trying to adjust animation speed to 0.01 doesn't change anything for the better, a value of "0" doesn't do anything either.


Can you spot anything in my code which is causing it not to work?

Thanks again
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 26th Sep 2021 16:50 Edited at: 26th Sep 2021 16:51
Hmm stranger and stranger.
Loading object using LoadObject( loads the object as expected but unfortunately static
Loading object using LoadObjectWithChildren( totally distorts the object beyond recognition but it does give some sort of motion.

However loading the dae object back into Blender allows perfect image with animation.

Still stuck i'm afraid.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 26th Sep 2021 17:41
The Mixamo to AppGameKit workflow can be a bit of a pain, you need to export the files from blender v2.79 else you get the distortion thing going on, I have not managed to get any animated models at all with versions above 2.79 to work

I always use FBX for best results

When exporting from blender 2.79 make sure FBX scale is set, that should take care of the scaling issue

I believe the distortion comes from bones being scaled in the animation but what I can not figure out is why animations with no bone scaling still distort (and if you run in debug you get an error saying the bones are scaled), it seems blender 2.79 does not export the bone scaling and works fine

Like I said, its a pain
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 26th Sep 2021 18:25
Hi PartTimeCoder
I'm using Blender v2.8 but did what you said and it works but minus the textures.
i'll spend a few days trying to sort that out then i should be ok.

Thank you all very much for your help
tboy
11
Years of Service
User Offline
Joined: 1st Jan 2013
Location: UK
Posted: 26th Sep 2021 18:29 Edited at: 26th Sep 2021 18:40
@Battoad

I had the distortion problem before, but I found out that if you export the FBX file from mixamo as FBX 7.4 format it seems to correct the issue, I don't use Blender.

In terms of speed, I usually enable VSync but export the character animation from mixamo using 30 FPS.

Let me know how you get on.

This is what I am working on at the moment.

Attachments

Login to view attachments
Battoad
AGK Developer
17
Years of Service
User Offline
Joined: 12th Feb 2007
Location: A Dark Place
Posted: 26th Sep 2021 18:39
This post has been marked by the post author as the answer.
@tboy
Yes brill. downloading from Mixamo as fbx v 7.4 works without having to go back into Blender.
I forgot that i didnt load the textures before but that works as well.

Its cracked, a big thank you
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 26th Sep 2021 19:11
Quote: "Yes brill. downloading from Mixamo as fbx v 7.4 works without having to go back into Blender."


Awesome, but when I download from Mixamo I usally load into blender and add a bone or 2 for attachments, a sword, a gun,, hat, backpack etc etc, does it affect blenders output or does it still distort?
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee

Login to post a reply

Server time is: 2024-05-04 18:32:35
Your offset time is: 2024-05-04 18:32:35