March 29, 2024, 00:50
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: AnimSequence to PSA  (Read 5399 times)
warrantyvoider
Full Member
***
Posts: 109


View Profile
« on: December 04, 2012, 22:14 »

Hi,
I hope you can help me, if you dont want to tell me because of code, im ok with it. I reversed your psa import script for max and made myself a PSA viewer:



now I searched the object for it in the pcc file and found this:



the above is the PSA file and below is the binary where its from (I guess), its stripped from properties already. I think that one struct in the binary has a length of 18 bytes, the total length of the binary is the yellow field. Now I think red and green are the location vector and in red is also the rotationquad, except its w component... how do I get that and the time for each PSA entry? I first try to make an simple exporter before I want to try to import them back in. Any hint would be much appreciated.

greetz WV
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #1 on: December 05, 2012, 16:27 »

Hi.

There's no direct mapping from AnimSequence to psa file because psa is made with a lot of conversion work.

Original AnimSequence object consists of property data and single binary data block stored as array of bytes. This block consists of translation data, rotation data, optionally time information, and for some quaternion types - range information used for quaternion decoding. Translation and rotation tracks are pointed by CompressedTrackOffsets array. Item[0] points to translation data for 1st bone track, Item[1] points to rotation data for this track, Item[2] points to translation data for 2nd bone track and so on. Interpretation of track data varies depending on TranslationCompressionFormat and RotationCompressionFormat fields. Presence of time track controlled by KeyEncodingFormat variable: AKF_ConstantKeyLerp distributes keys uniformly in a time interval, AKF_VariableKeyLerp tells engine that each track has either 1-byte or 2-byte time values (depending on the number of keys).

AKF_PerTrackCompression tells that data stored in more complex format which I don't want to discuss here (because of complexity). By the way I suppose that Mass Effect 3 uses older engine version which doesn't have AKF_PerTrackCompression key encoding.
Logged
warrantyvoider
Full Member
***
Posts: 109


View Profile
« Reply #2 on: December 05, 2012, 21:40 »

wowowow, thanks alot for this flood of information! yeah I noticed the long arrays in properties, but couldnt made sense of it. This helps alot, Ill see what I can make out of it Cheesy
THANK YOU  Grin

greetz WV
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS