READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Diablo 3 Animation files

Post questions about game models here, or help out others!
User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 585
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Diablo 3 Animation files

Post by Wobble » Fri May 25, 2012 9:56 pm

[out]
Last edited by Wobble on Sun Mar 12, 2017 12:18 pm, edited 1 time in total.

User avatar
Wobble
ultra-veteran
ultra-veteran
Posts: 585
Joined: Tue Jan 04, 2005 9:47 pm
Has thanked: 43 times
Been thanked: 112 times

Re: Diablo 3 Animation files

Post by Wobble » Mon May 28, 2012 1:56 am

[out]
Last edited by Wobble on Sun Mar 12, 2017 12:18 pm, edited 1 time in total.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Mon Dec 30, 2013 1:04 am

Hi guys, been breaking my head on this animation file format, almost have everything cleared out, yet the rotation seems to me like a blur...

I downloaded the Ultimate Unwrap 3D Pro demo to check what the result should be of a chest that has an Open animation.

With the ani file nearly figured out, I came across some issue to find the correct angle

in Max I use the following code:

Code: Select all

eu = eulerangles 180 -9.457 180
rotate $hinge eu 
this works, but this is data from Unwrap 3D,
now for the angle I have the following data in the ani file

Code: Select all


 00 00   8F 7F   00 00   73 F5
   x         y       z       w
   0    0.996597    0    0.0824342

these x y z w, I think represent a quat

and if so they sould be converted to the number underneath them,
I mean

y= 8F 7F and should become 0.996597
w= 73 F5 and should become 0.0824342

Any help is appreciated !!

T.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2768
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 688 times
Been thanked: 1427 times

Re: Diablo 3 Animation files

Post by shakotay2 » Mon Dec 30, 2013 9:33 am

out of context noone can help you, I guess.

You're having 8 bytes to be converted into 4 values.
(what is the connection to the angles 180 -9.457 180?)

Firstly the format of the bytes is to be solved: is it half floats, is it words (unsigned16)?
edit: ok, it's signed, of course :cry:

Secondly the required math conversion must be found.
Is it Euler angles to Quaternion for example?
Last edited by shakotay2 on Mon Dec 30, 2013 12:54 pm, edited 1 time in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Mon Dec 30, 2013 10:34 am

Here is what I did:

I opened Unwrap 3D, and imported the app model file with the appropriate ani file. ( that would be the rare chest with the open animation )
and in Unwrap 3D, I get to see that the animation on the Hinge Bone is set to eulerangles (180 -9.457 180)

Everything seems to add up if I follow the structure in multiple animation file like position, rotation and scale.

here I mean that the number of frames etc match the data I find in Unwrap 3D....

the only thing that is missing, is that I have eight bytes ,
00 00 8F 7F 00 00 73 F5

which should represent, or be converted to, the eulerangles above :/

I know that the format of the app file is sometimes weird ( like the uv's, you need to substract 32767 and then devide it by 512 ... )

They are not half floats, I checked.

Now if I convert the above eulerangles to a quaternian,
it results in:

quat 0 0.996597 0 0.0824342

so I presume there must be a way to convert 8F7F to 0.996597 and 73F5 to 0.0824342

tried already lots of stuff, but, maybe I'm just not smart enough, cause the guys from Unwrap 3D did it ....

So,some more help would be hardly appreciated..

T.

timkango
ultra-n00b
Posts: 4
Joined: Sat Feb 12, 2011 9:16 am
Has thanked: 1 time
Been thanked: 2 times

Re: Diablo 3 Animation files

Post by timkango » Mon Dec 30, 2013 12:26 pm

TaylorMouse, I'm having some trouble following your post, so apologies if I've misread it.

The 8 byte data block looks like a quaternion stored as 4 signed 16 bit integers (divide by 32767 to get the quat).


From your sample:

XYZ Euler angles in degrees [180 -9.457 180] is XYZW quaternion [0.0000 0.9966 0.0000 -0.0824].

Data block [00 00 8F 7F 00 00 73 F5] is 4 signed shorts [0 32655 0 -2701]. Divide by 32767 -> [0.0000 0.9966 0.0000 -0.0824].

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Mon Dec 30, 2013 12:49 pm

OMG, yes that is it, How could have been so f*** stupid!

well, it was 01:15 in the morning when I got to this :)

I'll try that this evening!

thnks Timkango!

T.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Mon Dec 30, 2013 11:37 pm

Yep it works!!!

Next on my todo list, is read the ani file into Max
then apply the animations to the correct bone in the right frame :)

Keep you guys posted

T.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Thu Jan 02, 2014 12:25 am

Hi guys, done some progress...

I succeeded in importing and animating the Diablo III Rare chest.

Yet it only has 2 bones, and the root bone doesn't do anything, so I was really happy to see that work.

Then I went over to another model, adria.app ( included in the attachment )
ran the 2 scripts (both included in the attachment ),
[*]One for importing the app file
[*]One for importing the ani file

I tried the Adria Run animation file adria_run_01.ani ( included in the attachment ), she runs, but it looks like crap !!

I tried the same on the adria_walk_01.ani( included in the attachment ), it looks even more like crap!!!

Since this is my first tryout on making animations with 3DS Max scripts, I could really use some help here.

So please take a look at the scripts and tell me what I'm missing/doing wrong...

PS: script written in Max 2011 and it needs to work in 2011 or above

Thanks in advance

T.
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2768
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 688 times
Been thanked: 1427 times

Re: Diablo 3 Animation files

Post by shakotay2 » Thu Jan 02, 2014 9:54 am

from a first glance I found only the first bone having all frames;
the rest is like this:
(TranslationAnimation BoneId:2 KeyFrame:0 position:[0.0401016,0,0.143678])
(TranslationAnimation BoneId:2 KeyFrame:22 position:[0.0401016,0,0.143678])

Don't know whether this being an issue.
(Could you upload the Rare chest app&ani, please?)

btw: is it given somewhere or did you get the anim format all by yourself?
(if the latter: great work so far :) )
Last edited by shakotay2 on Thu Jan 02, 2014 10:06 am, edited 1 time in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 79 times

Re: Diablo 3 Animation files

Post by TaylorMouse » Thu Jan 02, 2014 10:00 am

Hey Chakotay2, thanks for the quick reply, I will do that this evening, since I'm at work for the moment.

What I tried additionally, was applying the rotation quaternion from the app file, but no luck there.

Question: I needed to add the parent position to the child bone position to get it right, do I need to do this with the rotation as well ?

T.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2768
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 688 times
Been thanked: 1427 times

Re: Diablo 3 Animation files

Post by shakotay2 » Thu Jan 02, 2014 10:25 am

TaylorMouse wrote:What I tried additionally, was applying the rotation quaternion from the app file, but no luck there.
you mean the q1 that isn't used in your uploaded Import Diablo III App.ms?
Question: I needed to add the parent position to the child bone position to get it right, do I need to do this with the rotation as well ?
would make sense, but I'm just a beginner with animations, so not sure.

from my previous (overlapping) edit:
could you upload the Rare chest app&ani, please?

btw: is it given somewhere or did you get the anim format all by yourself?
(if the latter: great work so far :) )

edit: well, from this thread viewtopic.php?f=16&t=7337
it seems BoyC being the first one working on the app format.
Last edited by shakotay2 on Thu Jan 02, 2014 11:16 am, edited 1 time in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

ZeroGravity
n00b
Posts: 10
Joined: Sat Nov 26, 2011 10:29 pm
Been thanked: 7 times

Re: Diablo 3 Animation files

Post by ZeroGravity » Thu Jan 02, 2014 10:57 am

http://rghost.ru/51350599
it script for diablo 3 app/ani export. i'm not so good in max script. but it work. no materials/textures yet. i upload new script when i write some changes. feel free to modify.
Sorry for bad english

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2768
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 688 times
Been thanked: 1427 times

Re: Diablo 3 Animation files

Post by shakotay2 » Thu Jan 02, 2014 11:46 am

ZeroGravity wrote:[...] but it work. no materials/textures yet. i upload new script when i write
mesh import is fine. Which animation did you try?
For me Adria_walk_01.ani is a little bit better than with T.'s script:
Image

(But may be due to my Max2013, which I broke using some outdated scripts/dll-plugins and couldn't fix again. :cry: )

There's also different animation keyframes per bone:
BoneID 1: "keyfr. = 22"
BoneID 2: "keyfr. = 22"
"keyfr. = 22"
"keyfr. = 20"
"keyfr. = 21"
"keyfr. = 6"
"keyfr. = 5"
"keyfr. = 13"
"keyfr. = 10"
"keyfr. = 2"
"keyfr. = 18"
"keyfr. = 11"
"keyfr. = 16"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 15"
"keyfr. = 9"
"keyfr. = 8"
"keyfr. = 16"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 2"
"keyfr. = 22"
"keyfr. = 22"
"keyfr. = 22"
"keyfr. = 12"
"keyfr. = 22"
"keyfr. = 21"
"keyfr. = 22"
"keyfr. = 16"
boneID 40: "keyfr. = 21"

As I said I'm just an animation noob, but my experience tells me that there should be the same count of keyframes for every bone.

If we don't have enough we might create dummy frames with "no motion" but that's just a wild guess of mine.

Maybe an expert can give a statement?

edit: ok, silly me. I looked at the rotations only. For the positions it's the same count for all boneIDs (except for boneID 1, see my next post)
Last edited by shakotay2 on Thu Jan 02, 2014 12:54 pm, edited 1 time in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

ZeroGravity
n00b
Posts: 10
Joined: Sat Nov 26, 2011 10:29 pm
Been thanked: 7 times

Re: Diablo 3 Animation files

Post by ZeroGravity » Thu Jan 02, 2014 12:28 pm

i use max 2009 and just tested it with adria
all good
http://postimg.org/image/58joy12y9/
http://postimg.org/image/taz31k7rj/
and no bones have diferent count of keyframes
root bone have keyframes for every frame, but children bones can have even zero keyframes

Edit: found bug in skinning, first bone unskined

edit 2: fixed bug in skinning, script http://rghost.ru/51353010
Last edited by ZeroGravity on Thu Jan 02, 2014 1:00 pm, edited 1 time in total.

Post Reply