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 Studio Chat / [SOLVED] Character With Animation Deform

Author
Message
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 27th Apr 2020 13:23
Hi guys,

Anyone knows why my character that has just one animation, deforms like this? Maybe are the fbx export settings?

Thank you!

www.alexmatei.com

Attachments

Login to view attachments

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

Go to answer

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Apr 2020 15:36
It looks like you might have used SetObjectScale(). If so, try using SetObjectScalePermanent() instead.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Apr 2020 15:57
It could be that the model has had parts scaled differently which is a problem
im not sure of the export settings for fbx but chafari has a great thread if your
using blender and you export as .x https://forum.thegamecreators.com/thread/223848

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 27th Apr 2020 19:09
Hey guys,

I didn't used setobjectscale in any form. Just loaded the model with children, assigned a play speed and start looping the animation.

.x plugin has been deleted in 2.8+ .

Maybe there is about some parts scaled incorrectly. One more thing: When exported directly from Mixamo, it works ok. But, when exported from Blender WITHOUT any modifications, the problem above appears
www.alexmatei.com
Bored of the Rings
User Banned
Posted: 27th Apr 2020 23:01
Probably a skin weights issue
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Apr 2020 23:33 Edited at: 27th Apr 2020 23:59
Quote: ".x plugin has been deleted in 2.8+"

Previous versions available
https://download.blender.org/release/
I don't recall having to change anything in blender fbx export from Mixamo but there may be an option not set right

Steps I used for combining animations
1>open blender and import your first animation
2>open a second window showing dopesheet
3>change dopesheet to action editor
4>in the action editor name the first animation something better than mixamo does
5>import your next animation
6>rename the animation to something useful
7>now you can delete the object for the second animation it wont delete the animation
8>repeat steps 5 to 7 until all animations are loaded
9>change the dope sheet to the nla editor
10>in the nla editor i click the down arrow so it shows like a button of the animation
11>with your first animation in the nla editor chose your pathline positions and add action script and select your second animation
12>repeat steps 10 to 11 for all of your animations
13>export your animation as FBX

PS the mixamo settings I use
1>Format FBX
2>With Skin
3>Frames per second 30
4>Keyframe reduction none

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 28th Apr 2020 12:28
Fubarpk,

At least now I know how to combine the animations which I have been looking for! Thank you so much!

One problem: The animation timeline ends at 550 and in AppGameKit it resets at 500, although on the same line I have Idle animation and Walking animation.

www.alexmatei.com
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Apr 2020 12:44
Your animation probably uses scaling as part of its keyframes. Internally, AppGameKit uses quaternions for its animation data which doesn't include scale. If the keyframes in your model's animation data are stored as matrix, or poision/rotation/scale, AppGameKit will just ignore any scale data and convert the rest to quaternions. You might want to look for export options to remove scaling or to save keyframes as quaternions. You can also possibly go in and remove any scaling from your keyframes (which might require you to also adjust the position/rotation), but that also might be lots of work.

Ron
a.k.a WOLF!
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 28th Apr 2020 15:19
So, I will try some settings with FBX export, but for now, I must see why the animation, although is set to maximum of 550, agk resets it at 500.

Ron Erickson, yes, I will try for learning purposes to tweak the positions, rotations. I'll take them step by step.
www.alexmatei.com
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 28th Apr 2020 20:05
Any ideas on why it resets at 500?
Thank you!
www.alexmatei.com
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 29th Apr 2020 22:08
Sorry for insisting. Is the animation placement in Blender ok? Is the placement's fault that the animations resets at 500?

Thank you!
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 29th Apr 2020 22:11 Edited at: 29th Apr 2020 22:26
Quote: "Is the placement's fault that the animations resets at 500?"

I never noticed the problem hence why I haven't answered but there is a trim function in mixamo
that could help cut down the frames and also the frame rate export

Edit just a thought what renderer are you using perhaps try basic

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 30th Apr 2020 11:10
I am fiddling with your tips and come back soon.

PS: I use AppGameKit Classic.
www.alexmatei.com
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 30th Apr 2020 16:37
So, I tried with trim from Mixamo, but, still. If I have two animations in the same timeline as you saw above in the screenshot, it ends at the first animation and the second one ignores it. It makes sense?
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 30th Apr 2020 17:01 Edited at: 30th Apr 2020 17:07
not sure whats happening but when I played the animations for my zombie I did it like
PlayObjectAnimation(zombie.ID, GetObjectAnimationName(zombie.ID, 1), 1, -1, 1, 0)

Edit the different animations need to have different names
you would then need index to be 2 for the second anim GetObjectAnimationName( objID, index )

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 30th Apr 2020 17:18 Edited at: 30th Apr 2020 17:19
So, that was the problem, I wasn't adding the animation name in playobjectanimation... "headbang". At least one problem has been solved thanks to you! I will fiddle around with the fbx settings and convice myself if the problems of the object being deform are from there.

Edit: Possibly to be as Ron said, but it is worth a try
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 30th Apr 2020 17:25
your welcome I also used an older version of blender I think it was 2.7 not sure
but I pasted the links to the older versions above. They wont upset your current
installed version as they will just unzip and you double click blender.exe to run
Not sure why unless you changed the default settings it shouldn't just work. but
definitely would be a setting. But scaling always has been a problem Ron explains
that quite well above. If you cant get FBX to work you could try .X then

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 30th Apr 2020 19:39 Edited at: 30th Apr 2020 20:54
Right, so, I switched over to Blender 2.79b just for the characters. I try to export it as DirectX. The model shows as transparent and the animations cannot be played as suggested by you. No matter what animation name I choose, the first one plays and doesn't even finish till the end. I assume there are some settings problems. Do you know what settings I should choose?




Update: Managed to make the animation play as intended. Still not managed to make the second animation play and the object is transparent. I can see the children object through the parent object

Update 2: The new settings with the following problems: Cannot choose the animations (I have 2). Transparent object, still...


www.alexmatei.com

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 30th Apr 2020 23:30
The first one missed some setting the second had some it shouldnt

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 30th Apr 2020 23:41 Edited at: 1st May 2020 00:15
Ive attached my settings for the fbx that works for me
I also have not tried to scale the model in blender and only joined animations
I used SetObjectScalePermanent(ID,.1,.1,.1) in my proggy

I just tested the below in blender 2.81 and it worked perfectly using AGKs 3d viewer (comes with model pack)

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

Attachments

Login to view attachments
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 1st May 2020 13:34
The settings are like mine. So, you used mixamo and added some animations and then exported it as fbx?

Ps: I didn't scaled anything in my object, is just plain raw object as exported from mixamo.
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st May 2020 14:54
Quote: "he settings are like mine. So, you used mixamo and added some animations and then exported it as fbx?"

I created an animation in Mixamo and then loaded it and exported it in blender and the exported version worked the same
I also did the same with a previous created one with animations

So possibly its the model your using or you have made some change to it

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 1st May 2020 14:56
Oh, alright, so clearly is a problem with Makehuman's rig. I exported it from Makehuman with the "Game Engine" rig.
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st May 2020 15:37
the only other thing I can think of is that perhaps the version of blender (they may have had an issue and fixed or destroyed etc)
Sorry that we didn't get your model working, sometimes I have found resaving in another program can fix models but don't see
that helping here. Perhaps you could change a setting in blender but that's not something ide have a clue about


fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 1st May 2020 16:08
I understand.

Do you think makehuman's rig contributed to deforming?
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st May 2020 16:18
It sure could've if it doesn't abide by the scaling rules for agk not that ive ever heard of "makehumans rigs"
but why it works straight from mixamo I don't know. And if other formats don't work that's also strange

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd May 2020 05:06
This post has been marked by the post author as the answer.
Just a thought are you importing your character as an obj into Maximo in the first place
the object format should help with compatabilities

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 2nd May 2020 12:04 Edited at: 2nd May 2020 12:22
Applause to you, fubarpk!

So, exporting as obj (thus eliminating any armature from the application that I exported it), and importing the object to mixamo and then exporting the animations as fbx for Blender, merging the animations like in your suggestions above and then exporting it as fbx and then into AppGameKit works as an absolute charm. The object itself is tiny (so this means that, for the bones, that was the actual correct scale of the mesh), but, I scaled it in AppGameKit and the object is as it should.

Edit: If I want to add more stuff on the model through blender, like nails, or clothes, the objects become immense in AGK. I attach the object with parenting mode, by parenting the object and a certain bone on the model. I choose the "Bone" parenting button. Maybe is because it's a parent and not a detectable mesh by AppGameKit?
www.alexmatei.com
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd May 2020 18:11
We got there in the end that's the main thing



That's about my limit of knowledge in blender tho so cant help with the below but attachments I do tend to add in AppGameKit like a characters hit points above there head etc
Quote: "Edit: If I want to add more stuff on the model through blender, like nails, or clothes, the objects become immense in AGK. I attach the object with parenting mode, by parenting the object and a certain bone on the model. I choose the "Bone" parenting button. Maybe is because it's a parent and not a detectable mesh by AppGameKit?"


fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 2nd May 2020 18:39
Quote: "We got there in the end that's the main thing"


True.

I figured it out. I do the following steps: Export from Makehuman as .obj and import it into Blender. Once there, we create the additional objects, place them onto the main character and join the meshes together. Export the final model as .obj again, but this time with "Material Groups" selected in the export window. Import it in Mixamo and download the animations as fbx, merge them into Blender and import them into AGK. We can then texture the object by settings the object's mesh image.
www.alexmatei.com

Login to post a reply

Server time is: 2024-04-25 13:55:54
Your offset time is: 2024-04-25 13:55:54