![]() |
[WIP] Animations For SH4
Project:
To finally crack the animations format in SH4. Reward: Not a danged thing except knowing you worked on it. Goal: Create a way to place new animations into SH4. For an idea of what level of work I'm talking about: http://www.subsim.com/radioroom/showthread.php?t=176928 |
No takers so I'll use this thread to babble on as a record for the future.
Plus I forget alot of things and always never keep notes! :haha: I been doing some 'animation' type work for other reasons and learned alot about how Bipeds work and alot of other boreing file structure stuff. This all klicked in my head a few days ago so I started looking at the SH4 animation areas again. This is not about props rotation but the animated people stuff. So don't ask! :D A Biped is defined in the SH4 file Secondary.dat It's listed as Body Parts in S3D. You'll only know what those body parts are if you look at that chunk in Hex. There's a bunch of them. All with a bip name. To be continued..................................... |
Babble on! I haven't used a hex editor since my Apple II days so I wouldn't be a lot of help. But if you keep babbling, I might learn something and be of some help in the future.
I do volunteer to serve in my traditional function of crash test dummy though. If you have something that needs trying out let me know and I'll give you a report on how it works. |
Hey Mate!
Saw you was out and about again. :up: Still have an old e-mail address for you. That bad now? :hmmm: I did PM a new Member that want's to learn and that I have exchanged with lately. We'll see how things go. One thing I do very well is to figure out file structures. A lot of it is pattern recognition. I've seen the pattern outside of SH4. I only need to figure out the details now. |
FYI I am sorely tempted, having done some hex editing in the days before pack3d. Unfortunately, I don't think I'll have the time! If things change I'll let you know, and thanks for your continuing work on this dinosaur of a game. :cool:
|
And thanks for YOURS IABL! I sure hope to see your Wolves of the Kaiser working soon!
|
Quote:
|
I use SweetScape 010 Editor mostly now.
http://www.sweetscape.com/010editor/ It's not free but well worth the few bucks if you use it as much as I do. :D |
Biped stuff listed in the Secondary.dat
Bip01 Bip01 Footsteps Bip01 Pelvis Bip01 Spine Bip01 L Thigh Bip01 R Thigh Bip01 Spine1 Bip01 L Calf Bip01 L Foot Bip01 L Toe0 Bip01 L Toe0Nub Bip01 R Calf Bip01 R Foot Bip01 R Toe0 Bip01 R Toe0Nub Bip01 Spine2 Bip01 Neck Bip01 Head Bip01 L Clavicle Bip01 R Clavicle Bip01 HeadNub Bip01 L UpperArm Bip01 L Forearm Bip01 L Hand Bip01 L Finger0 Bip01 L Finger0Nub Bip01 R UpperArm Bip01 R Forearm Bip01 R Hand Bip01 R Finger0 Bip01 R Finger0Nub A Biped I created with Maxscript showing Parent/Child relationships. http://i108.photobucket.com/albums/n...iped-image.jpg http://i108.photobucket.com/albums/n...oincidence.jpg |
4 x 7 x 31
I've nearly got the extracted data ready to import to 3ds Max. If this does work out the animations will be opened to extract/replace and add new animations. :rock: |
Quote:
|
I've got quite a bit of the animations format figured out so far.
Not as much as I'd like, but it's moveing along each day. Alot of it I figure out by NOT working on it. :haha: It's kind of 2 steps forwards and one back right now. |
Took a break today to go listen to some friends in a bunch of bands play.
While talking about some equipment the old "Dang! I should of thought of that!" hit me. I came home and did a little experiment and SAW the biped from SH4 for the first time!! :o http://i108.photobucket.com/albums/n.../SH4-Biped.jpg :rock: It don't look like much but it's proof positive! I can now start converting it to a common format that most programs will handle. The format, as it is in SH4, is 7 floats. X Y Z RX RY RZ W The base biped is NOT transitional!! That's where I wasted alot of time and banged my head against a wall. I'm guessing the animation frames will be the transitional stuff. There are 31 parts so now you get my math. 4 x 7 x 31 The base biped is 868 bytes and each animation frame is 868 bytes. :) The format I find closest to universal is the Collada dae. It allows X Y Z RX RY RZ W to be exported. It can also be parsed and converted to a format that can be placed into SH4. |
I'll explain about transitional stuff a bit now.
If you use say even the dae format? each position adds to it's parents positional data to find it's actual position. This is not true for the base biped in SH4. Each position is actual position so we need to do the math and subtract from the parent chain to move the data to a useable format such as dae, bvh, etc. We need to know what is that parent-child chain. I'm not totally convinced it's as the biped is listed in SH4 Secondary.dat. I also did not render it that way. Once an animation is exported and added to the base biped I have I'll know for sure. Once this is all understood as We did for SH3? SH5 will be the next target. :D |
I sent a message to Skwasjer about the animations last night.
I know he did an update to S3D that he never released concerning SH5. Not that I expect him to do anything to S3D but I figured he'd like to know things have progressed somewhat. :) I've got a script started for 010 that rips the animations into a readable vertex7 format. Another script I'm working on rips the base Biped and does all the math needed to plant the results in a dae file so it can be imported to different 3D programs. |
I am clueless on this but good luck, it could unlock a lot of things for this sim of ours.Let me know if can be of any help:salute:
|
Just renewed my license for 010 Editor and upgraded to version 5.
It rocks! :rock: They added a whole bunch of new stuff that makes things so much easier now. Also contacted another of the original Devs for SH4 with a question. He's told me he'll see if he can get the answer to that question. :) Those Guys are just to Cool! I may have to move to Romania! :salute: |
The responce I received this morning confirms I'm working in the right direction.
The scripts I've got for 010 do the crudest of conversions at this point so it may be awhile before I release them to the public. I take the info and still do a lot by hand rather then wast time scripting what I'm not sure of. So they are pretty useless to most people. If you really want to play with them and have fun laughing at my crude scripting skills just PM me and I'll send them. :haha: |
Back when skwasjer was working on S3D many of the Hex Editor Guys helped him with info in many areas. One big one being animations in SH3.
None of us had much of a clue about the skeletal animations in SH4 at the time sadly. I'm going to start getting 'Hex technical' now as to the SH4 Biped and animations as used by Secondary characters. Those are the itty bitty people you see on Ships and such. :D Open the SECONDARY.dat with S3D and find the BodyParts. Under that is 2 Unknowns. Export the BodyParts and the 2 unknowns as chunks. We will be talking about those. Make sure the header box is checked when you export. There's info there We need to understand that does not follow standard SH structures as We 'knew' them. One thing I did do? I contacted my Friend Anvart and made him aware of this WIP. He is the only one I can think of still active that WILL double check me. And correct me as needed. He is also one of my Mentors for all things Hex in SH Games. :D |
When I exported the rawchunks I named them as below.
BodyParts Body BodyEnd I'll be useing those names so re-name or remember how you named them. It's easier to work with those chunks rather then the whole Secondary.dat by the way. I'll be useing 010 with scripts to do alot of the 'heavy lifting' but I'll do my best to answer questions if you use a 'lesser' Hex Editor. :D BodyParts contain the names, in order, of the biped I'm after. (Who would of thunk that! :haha:) Body contains the positional elements to build the biped. The X Y Z RX RY RZ W data that SH4 uses as the base position/stance of the biped. BodyEnd I suspect is how the parts are connected as to Parent-Child? :hmmm: (Corrections welcome) We have the basic structure of SH files as to it's 'Node' ID, info size etc in each. What We do have is a different Parent-Child ID structure. It's no longer 8 bytes but 4 bytes. Look at the BodyParts in Secondary.dat and you'll see the ID listed but no Parent ID. That's right and wrong for this reason. BodyParts has no Parent but it's ID is NOT 8 bytes long. It also has no place for a Parent ID as it IS the Top most Parent. S3D will not show those Parent-Child ID's in the Unknowns so lets look at them in Hex. BodyParts 02 D1 66 5A 00 00 00 00 = Node type 1516687618/0 C3 01 00 00 = 451 (how much data we need to read AFTER this float) 41 FF 53 59 = ID of this whole chunk. 1F 00 00 00 = 31. Number of parts! NOT the Parent as there is no Parent! All data after that is just the names of the 31 parts to a standard Biped. (I posted those earlier so you might want to copy and paste from that post) Body 72 15 7B 30 00 00 00 00 = Node type 813372786/0 6C 03 00 00 = 876 (how much data we need to read AFTER this float) D5 F4 B6 D0 = ID of this whole chunk. 41 FF 53 59 = Parent Chunk! See the change here? Check the ID above!! (SH Games have used an 8 byte ID structure since SH3 at lest to my knowledge. Now it's different which may have contributed to earlier fails at breaking the animations. Not the only one though!) BodyEnd You should be able to see the info with a clear understanding at this point. :D |
All times are GMT -5. The time now is 05:12 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.