Page 1 of 3

Iron Man 3 model files

Posted: Mon Feb 24, 2014 12:58 am
by Nintynuts
Hello,
I have been researching how to read the model files from the gameloft game Iron Man 3 (in my case for android).
So far I have:
- Extracted the OBB
- Extracted the model (bdae) and texture (pvr) archives
- Converted the textures
- Identified the useful parts of the model files

Other users on this forum; renato (who also frequents http://www.therpf.com/f78/iron-man-3-su ... ea-183397/ as Balmung) and zaramot have made progress on this already.

Here is my problem...
I can generate a mesh with UV coordinates from a single file by manually tweaking a max script to select different areas of the file, but I would like to understand the file structure better in order to be able to navigate to this point based on data in the file, and possibly also get more from it like bones, skinning (for animation) and materials (mainly so I know it inverts the normals for the mirrored half). At the moment only the first 3 floats and the last long are being used from the 52 bytes of each vertex, and I'd like to know what they are (I expect probably normals and stuff, but haven't tested)
As well as knowing the patterns to look for in the hex to do it manually, I have also found the array lengths in the file too, but only relative to the mesh/vertex data, not the start of the file as it moves.

I am attaching an excel spreadsheet with the analysis I have been trying to do on the file.
- Sheet 1 - High Level: this page summarises what sections I (think I) have identified in the file structure, two examples the Mk 2 and Mk 42 (first and last in the game)
- Sheet 2 - Header Analysis (Low Level): this page contains dumps of each armour file's header section. I have identified very little of it, but I have managed to identify patterns and try to break it into sections based on this. The left hand column details the min, median, max and mode values for each long in the file (taking into consideration the gaps I have made to try to mark sections). To the best of my understanding, most of this seems to be junk. The values usually just increase by 4 from an initial starting number marked in red at the top. You will notice on the left there is also a percentage. I find this useful to see where there are file-unique numbers which might be useful. One thing to bear in mind is that I'm mostly taking interest in the DIFFERENCES between the long in the file and the previous long, not the actual value. One last note - Mark 38 (Igor) doesn't seem to match up with any of this. Don't ask me why...

If this header data is indeed junk, at least the last 4 longs in each file are identical, so that lets me jump to the strings, which are easy to navigate through.

I would really appreciate any assistance in decoding these files further from someone with more experience with binary file reverse engineering.

NOTE: The zipped excel sheet has a macro for converting hex to a float I found on the net. Nothing dodgy. I had to remove all the formulas in the second column of each file to reduce the file size to upload, so just copy the formula down for each file to restore it (I don't know why excel can't compress this somehow).

Re: Iron Man 3 model files

Posted: Tue Feb 25, 2014 1:48 pm
by zaramot
Hi Nintynuts, I recieved your message, so I'm working on this now. I'm going to finish maxscript if I will have time. I've got models imported for all Iron Man costumes with bones+weights. still must finish script for all data types+nice skeleton hierarchy (didn't find parenting info yet).

Re: Iron Man 3 model files

Posted: Tue Feb 25, 2014 11:06 pm
by Nintynuts
zaramot wrote:Hi Nintynuts, I recieved your message, so I'm working on this now. I'm going to finish maxscript if I will have time. I've got models imported for all Iron Man costumes with bones+weights. still must finish script for all data types+nice skeleton hierarchy (didn't find parenting info yet).
Hey, thanks for replying. Glad to see you're making progress. Did you get to have a look at my spreadsheet? Does any of my structural analysis seem right to you (does it match what you've found)?

I would be very interested in any hints you could give me. I would like to try and figure as much out for myself as I can, but as I'm new to this I'm a bit stuck.

Re: Iron Man 3 model files

Posted: Wed Feb 26, 2014 9:12 pm
by zaramot
Hi, no I haven't checked your spreadsheet yet, but I will. I will share info a bit later. As I understand this format .bdae is pretty common for android, game Batman: The Dark Knight Rises uses same format and it's similar to Iron Man. Just different version I guess.

Re: Iron Man 3 model files

Posted: Fri Mar 07, 2014 10:48 am
by zaramot
Here's simple script to import Iron Man's armors with bones/weights and to analyze format a bit. Don't try it on files with _noskin at the end of the file's name, they aren't skinned meshes (no skeleton inside) - script will crush!

Re: Iron Man 3 model files

Posted: Sat Mar 08, 2014 1:06 am
by Nintynuts
zaramot wrote:Here's simple script to import Iron Man's armors with bones/weights and to analyze format a bit. Don't try it on files with _noskin at the end of the file's name, they aren't skinned meshes (no skeleton inside) - script will crush!
Thanks, I'll look at it this weekend hopefully. Did you get around to looking at my spreadsheet? (I guess I'll see whether I'm right when I look at your script)

Re: Iron Man 3 model files

Posted: Wed Jun 11, 2014 11:17 pm
by Tosyk
zaramot, great work on the script. can you look into Knight Rival's files, seems same .bdae, but your script don't wont import geometry, not crashing though

Re: Iron Man 3 model files

Posted: Thu Jun 12, 2014 8:57 pm
by zaramot
Maybe you could provide samples? If those .bdaes are more similiar to Iron Man's ones, it will be not hard to get models.

Re: Iron Man 3 model files

Posted: Thu Jun 12, 2014 10:19 pm
by Tosyk
zaramot wrote:Maybe you could provide samples? If those .bdaes are more similiar to Iron Man's ones, it will be not hard to get models.
sure, here it is
http://www.mediafire.com/download/jcgtv ... armors.zip

btw, i got dark knight rises, but your script doesn't work with it, can you tell me why?

Re: Iron Man 3 model files

Posted: Fri Jun 13, 2014 8:43 am
by zaramot
I didn't released Dark Knight Rises script, .bdae format there differs much from Iron Man's

Re: Iron Man 3 model files

Posted: Fri Jun 13, 2014 9:55 am
by Tosyk
zaramot wrote:I didn't released Dark Knight Rises script, .bdae format there differs much from Iron Man's
would you release script for dark knight? the game has so many rare models.

Re: Iron Man 3 model files

Posted: Sun Jan 01, 2017 6:34 pm
by xtrem1275
Hello good morning and happy new year,my name is Cesar Diaz Espinosa, I'm from Mexico, and I'm new to the page, I hope to be able to contribute, looking at the network on the iron man armor 3 of the android game, to make the armor in papercraf, to scale, I found this page, and extracted some of the armors, but could tell me How to extract the textures, the armatures I extracted are mark 15,18,19,20,24,27,28,32,36,43, the mark 31 marks me error in the script, thanks I hope someone could guide me, and If anyone wants the models they will gladly share them

Re: Iron Man 3 model files

Posted: Sun Jan 01, 2017 6:42 pm
by zaramot
If you extracted android version, than textures are just .tga files. So, you could rename texture extension into .tga and use any image software you like. And be prepared for some uv's edits, when I was working on these sample I didn't have textures, they may look nice, though - they are a bit off xD

P.S. I advice you to use iOS version of the game, textures there are twice bigger in size than in android version

Re: Iron Man 3 model files

Posted: Sun Jan 01, 2017 7:50 pm
by xtrem1275
Hello zaramot, the files of the iron man 3 game that I have, the textures comes in .and format, I am not an expert on the subject, but I like to learn to do new things, you could guide me how to convert them or change the format to tga, bmp Or jpg, thanks for your quick response

Re: Iron Man 3 model files

Posted: Sun Jan 01, 2017 8:36 pm
by zaramot
This "conversion" will be extremely easy xD Just change .and extension to .tga and you will see, that those .and files are just .tga files which you could open with photoshop for example