XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Wed Jun 28, 2017 10:12 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Resident Evil animations
PostPosted: Fri Feb 24, 2017 7:27 pm 
Offline
n00b
User avatar

Joined: Sun Sep 07, 2014 1:33 pm
Posts: 17
Has thanked: 5 times
Have thanks: 0 time














You can make the ads go away by registering

daemon1 wrote:
Checked RE6 files. Unfortunately they are too much changed. They are not simple anymore, like it was in RE5.

So probably I will not be able to convert anything in near future.


Oh, that's a shame :( But you still did a great job with RE5 so thank you very much.

Ps. I guess RE4's are even more different than 6's


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sat Feb 25, 2017 2:12 am 
Offline
advanced
User avatar

Joined: Sun Apr 15, 2012 1:08 am
Posts: 69
Has thanked: 26 times
Have thanks: 12 times
Hey daemon1, where do you get the locations from? I could get the rotations right thanks to PredatorCZ template and your tip about dividing by 4096.

Also, this data is not associated with a bind pose, right? I don't know how animations work in video games, but if you animate in a 3d software all rotations will be relative to the bind pose so mostly only rotations are needed.
My final goal is to be able to export animations back to the game, so I need to understand the format pretty well. Probably I have to start reading a lot about how game engines work.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sat Feb 25, 2017 7:35 am 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
Meguido wrote:
Ps. I guess RE4's are even more different than 6's

They are not "more" different, but probably simpler. Anyway, RE6 is still quite possible, but to do that I need to do more research and install the game myself. So maybe later. In addition to split body parts they have many compression types and arm IK-chains too (which I could expect).

Bastien wrote:
Hey daemon1, where do you get the locations from? I could get the rotations right thanks to PredatorCZ template and your tip about dividing by 4096.

Also, this data is not associated with a bind pose, right? I don't know how animations work in video games, but if you animate in a 3d software all rotations will be relative to the bind pose so mostly only rotations are needed.
My final goal is to be able to export animations back to the game, so I need to understand the format pretty well. Probably I have to start reading a lot about how game engines work.

Locations are plain floats. There are only a few locations: root, origin, and toe locations (because they are IK drivers). I don't know how animations work in 3d software, but I don't think you need "reading a lot", because in games its all very simple. I'm not sure what do you mean by "associated with a bind pose", but if you give me some example, I can try explaining it.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sat Feb 25, 2017 4:16 pm 
Offline
advanced
User avatar

Joined: Sun Apr 15, 2012 1:08 am
Posts: 69
Has thanked: 26 times
Have thanks: 12 times
daemon1 wrote:
RE6 is still quite possible, but to do that I need to do more research and install the game myself.

There's a free benchmark/demo.

daemon1 wrote:
Locations are plain floats. There are only a few locations: root, origin, and toe locations (because they are IK drivers).


I was looking at id/figdata/fig01/fig01.lmt from fig01.arc. It's a static pose, and time 0 has all locations and no rotations. I can't seem to find where to get that info while parsing.
I know from PredatorCZ template that some keyframes are of type 'location', and those are the ones that change in time 1.

Code:
<snip>
end
skeleton
time 0
0  0.000000 0.000000 0.000000  0 0 0
1  0.000000 114.000000 0.000000  0 0 0
2  0.000000 1.000004 -0.001327  0 0 0
3  0.000000 17.000000 -1.338673  0 0 0
4  -0.000002 24.000020 -2.100001  0 0 0
5  -0.000002 8.999998 1.100000  0 0 0
6  -2.839997 7.362676 9.415515  0 0 0
7  2.840005 7.362280 9.415408  0 0 0
<snip>


I think once I can reproduce the SMD output you get I can explain the 'bind pose' problem better.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sat Feb 25, 2017 5:09 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
Bastien wrote:
I know from PredatorCZ template that some keyframes are of type 'location'


I'm not using templates, but there are no such thing as separate location keyframes. There are location tracks, each track may have many keyframes, and they all will be location keyframes.

The fig01.lmt file contains 3 location tracks: for root and 2 toes. And a lot of rotation tracks for all bones, including root and toes. Time 0 is the frame I'm using for initial pose which is taken completely from the model. It has all rotations as zero, because models in RE5 are all made that way.

Now at time 1 I'm combining first frames all of animation tracks that are present, leaving the missing bones in default position/rotation.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 2:48 am 
Offline
advanced
User avatar

Joined: Sun Apr 15, 2012 1:08 am
Posts: 69
Has thanked: 26 times
Have thanks: 12 times
daemon1 wrote:
Time 0 is the frame I'm using for initial pose which is taken completely from the model.


Got it, thanks. I was able to reproduce your SMD output.

Now, the problem I'm trying to figure out is this:

Image

The left is imported from SMD, the right is imported directly from the .mod + applying the pose.
* Same bone hierarchy, same rotations in all bones, however the pose is clearly wrong
* The skeleton from SMD has no 'bind pose', e.g. going to edit mode in the skeleton shows the bone all in the origin.
* The skeleton on the right has a bind pose, so the locations are not part of the pose

I have a feeling why this happens (different spaces in bones), but that's the part where I have to investigate a little more before posting conclusions. Any help is appreciated.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 5:05 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
Bastien wrote:
The skeleton from SMD has no 'bind pose'

Sorry, I don't understand what it means... Can't help.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 5:39 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 333
Has thanked: 64 times
Have thanks: 210 times
It's customary in a lot of animation formats that the first frame of the animation is the default pose the skeleton is in when not animated.

For example in the SMD spec it mentions ( https://developer.valvesoftware.com/wik ... a#Skeleton ) :
Quote:
Position data for each bone in each animation frame. In a reference SMD there is only one frame, which contains the model's default posture.


This is called the rest pose by some, and seems 'bind pose' is a Maya term. Maya's description of "bind pose':

Quote:
The bind pose is the pose that the skeleton is in when you bind skin. When you pose a character's skeleton after skinning, the skeleton's actions cause deformations to the skin. The only pose that does not cause deformations to the skin is the bind pose.


So basically the animation conversions may not have this initial rest/bind pose frame, but a lot of tools and formats expect it.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 6:33 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
He's talking about something different. Because that SMD skeleton surely has bind pose in these terms.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 7:17 pm 
Offline
n00b
User avatar

Joined: Sun Sep 07, 2014 1:33 pm
Posts: 17
Has thanked: 5 times
Have thanks: 0 time
daemon1 wrote:
He's talking about something different. Because that SMD skeleton surely has bind pose in these terms.


Indeed every SMD skeleton imported from RE5 has a bind pose of one frame for every animation (inside the same SMD file). So yeah he's probably talking about something different.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 7:46 pm 
Offline
advanced
User avatar

Joined: Sun Apr 15, 2012 1:08 am
Posts: 69
Has thanked: 26 times
Have thanks: 12 times
Yes, SMD has a first frame defining the rest/bind pose. However, that's not how you'd animate in Blender, so there are some transformation to be applied if I want to be able to export animations back to the game.
I just realized I should read the code for exporting SMD. I'll post back when I have more info/a solution. Sorry for the noise.

A simpler question for daemon1 is: did you figure out all uknowns in the structure? That also will be necessary to export back animations.
Code:
typedef struct
{
   uint offset;
   uint bonecount;
   uint framecount;
   uint unk;
   float ufl;
   float ufl;
   float ufl;
   uint unk;
   uint unk;
   uint unk;
   uint unk;
   float ufl;
   uint unk;
   uint unk;
       // There's more here before seeking to the offset
}AniBlockHeader


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 8:21 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
There are 8 floats, for additional rotation and position for whole animation.

After that, 2 sets of notifications or "events". For sounds probably. Or something else too.

Each set is offset for notification track, count, and 32 event IDs. 32 because events are triggered by bits in 32-bit words, allowing up to 32 different events in every set. Events timing is usual, same as for animation tracks.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Sun Feb 26, 2017 9:11 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Sun Jul 06, 2014 6:30 am
Posts: 333
Has thanked: 64 times
Have thanks: 210 times
Ok I get what he's talking about then. It's described here:
http://peyman-mass.blogspot.com/2013/09 ... acter.html
I'm not positive but I think you should just be able to use the correct skeleton and transfer the animation to it. That's what Blender's pose library is for.


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Mon Mar 06, 2017 3:21 pm 
Offline
n00b
User avatar

Joined: Sun Sep 07, 2014 1:33 pm
Posts: 17
Has thanked: 5 times
Have thanks: 0 time
Sorry to ask but,
Any progress on the research for RE6 @daemon1?


Top
 Profile  
 
 Post subject: Re: Resident Evil animations
PostPosted: Mon Mar 06, 2017 5:26 pm 
Offline
double-veteran
double-veteran

Joined: Tue Mar 24, 2015 8:12 pm
Posts: 1180
Has thanked: 19 times
Have thanks: 492 times
I'm not working on this anymore. Maybe i will return to it someday, but as I said, it will not be in near future.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Doramin, Google [Bot], mikulover39, onelove1210 and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group