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.

DarkBASIC Professional Discussion / Enhanced animation strangeness

Author
Message
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 28th May 2015 05:39 Edited at: 28th May 2015 05:41
Just got enhanced animations and replaced my model with the default in the thebasics demo. Looks good, except during the transition time my model seems to rotate. Except neither the camera or object register as moving.

While animations are playing the view is like the top screen, but while transitioning it switches to the bottom, then back as soon as it's done.
Also, I haven't changed any code except for the model and frames, and although it seems like it must be my model I can't see how it could be.
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 28th May 2015 07:01
All right, I'm just gonna attach what I've got (model and exe) and hope that somebody can figure it out. I need sleep.
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 28th May 2015 18:00
Loading the model and looping it seems to be everything fine, the only weird thing is that loading into a 3d software the model is face down, usually when characters are built they are on feet
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 28th May 2015 18:47
I'm not sure what could be causing that, I've checked the model in 3ds max and fragmotion and it seems fine. Did the same glitch occur for you running the exe?
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 28th May 2015 19:08
I didn't tried the exe actually, but if it works normally looping the object probably there must be something wrong in your code
Chris Ritchie
19
Years of Service
User Offline
Joined: 7th Jan 2006
Location: Norn Iron
Posted: 28th May 2015 19:41
I tried the exe and it does the same thing for me. The model looks fine in all my 3d software so I assume something with the code, I would check the camera commands in the code make sure they are not doing something odd.


Lead programmer ULIDIA
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th May 2015 20:02
Hello wattywatts,

I'm the author of Enhanced Animations. Can you post your code? My guess is that you are either referencing the wrong limbs or something isn't quite right about the frames that you are using in the transition commands.

Thanks!

Ron

a.k.a WOLF!
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 28th May 2015 20:03 Edited at: 28th May 2015 20:06
I checked the camera and object pos/rotation and they don't change, if you just replace the model in the first enhanced animations demo with mine I think the same thing will happen (again, that's all I did, I didn't change anything else.)

Edit
Hey Ron, thanks for posting. I'll attach the code when I get off work tonight.
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th May 2015 20:09
Sounds good!

a.k.a WOLF!
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th May 2015 20:42 Edited at: 28th May 2015 20:44
Quote: "Did the same glitch occur for you running the exe?"


As far as I can tell the demo exe runs fine except for a brief moment after changing animation when the model seems to be rotated 90 degrees around the camera's x axis, i.e. you are briefly looking at the soles of the character's shoes as in the image. This was taken immediately after pressing <space>.





Powered by Free Banners
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2015 21:17 Edited at: 28th May 2015 21:22
Hey, wattywatts.

I had a similar issue with Cosmic Prophet's Troopers in FPS Creator. The model and animations appeared fine in Fragmotion. Exporting the model in Fragmotion with these settings seem to have solved the problem.

wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 29th May 2015 01:09
Here's the code, I've commented out a lot to try to isolate the problem.


@wickedx no dice unfortunately, still the same.
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 29th May 2015 21:31
I just tried to look at the problem again. No matter what I do, I get the same funky distortion when transitioning from one animation to another. Can you tell me what you used to create the 3D model? There might be something strange about how the rotation information is saved for the animations that is causing the problem when I try to interpolate between the 2 animation frames.

a.k.a WOLF!
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 29th May 2015 21:51
I used mixamo's auto rigger to set the bones and weights, converted from fbx to x in 3ds max, then animated with fragmotion. If you run a forum search for oacAnimTransition there's one thread with some information about the issue (i'd link to it but my phone has gone from 4g to 1x and I'm not having much luck finding it ATM)
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 29th May 2015 23:02
Does 3DS Max now support exporting directly to .x, or do you still have to use something like PandaSoft's DirectX Exporter?

a.k.a WOLF!
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 29th May 2015 23:15 Edited at: 30th May 2015 06:17
Yeah I had to use a third party exporter, there are two that work with the current version, I can get their names when I get home if you need.

EDIT
So this is the post I was referencing before, although I think you've already found it: http://forum.thegamecreators.com/?m=forum_view&t=185237&b=22

And the directx exporter I used is kW X-Porter written by Bond1.
Hopefully that helps somewhat.

EDIT 2
I rigged the model again in mixamo with symmetry turned off as the linked post lead me to believe it could cause this, but unfortunately the results are the same. Also tried AXE exporter (panda is too old to work with the trial version of max I'm running), no change.
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 30th May 2015 22:21
There has to be something funny about how the model or animations are being saved. To transition from one animation to the other, I interpolate from one frame to the other based on how far it is in the transition. It is strange that both animations play fine by themselves but go crazy when figuring out a rotation between them. This is going to take some investigating on my part. I'll have to examine the actual animation data and try to figure our what is going on. Sorry. I don't think it will be an easy fix. I'll see what I can do though. Just give me some time!

Ron

a.k.a WOLF!
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 30th May 2015 23:18
I appreciate you looking at it, no rush. I'll just work on some other stuff in the meantime. I think I'm more curious than anything; it seems like the parent bone must be at fault for the whole model to rotate like that.
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 1st Jun 2015 18:04
OK. I found the problem and a work-around. I first tried playing around with different limbs of your model. If I applied the animations directly to an arm, a leg, or the torso, everything worked fine. The problem only occurred when applying the animation to the entire model. There are only 2 limbs that are at the root of everything:
Limb 1 is named Root.
Limb 2 is named Crotch.

I figured it had something to do with scaling because how the 3d model looked during transitions. I had a look at the animation data and noticed that the Crotch limb was scaled at: 0.393701 on the X, Y and Z axis for all frames of animation. I tried to make those all set to 1.00000, but it made no difference. So, then I looked at the actual limb data and noticed that the 3D matrix behind the limb was also scaled at 0.393701.

If you open your model in notepad, here is the rotation matrix data for the Crotch limb (2):

Frame Crotch {
FrameTransformMatrix {
0.393701,0.000000,0.000000,0.000000,
0.000000,-0.000000,-0.393701,0.000000,
0.000000,0.393701,-0.000000,0.000000,
0.007862,13.917475,0.123880,1.000000;;
}

If I modify the matrix data to remove the scale, everything works:

Frame Crotch {

FrameTransformMatrix {
1.000000,0.000000,0.000000,0.000000,
0.000000,-0.000000,-1.000000,0.000000,
0.000000,1.000000,-0.000000,0.000000,
0.007862,13.917475,0.123880,1.000000;;
}

I've attached a new version of your model with the modifications made to it. I'm not sure which step in the conversion process is causing the problem. I'm afraid that you may have to manually "fix" your models this way to get them to work properly with Enhanced Animations. I hope this helps!

Ron

a.k.a WOLF!
wattywatts
16
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 1st Jun 2015 23:36
Ah man, thanks so much! I really appreciate all your help, manually fixing the models is no problem whatsoever and a small price to pay.

Login to post a reply

Server time is: 2025-08-09 02:29:32
Your offset time is: 2025-08-09 02:29:32