XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Sep 22, 2017 1:58 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Sun Sep 10, 2017 8:17 am 
Offline
advanced
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 65
Has thanked: 12 times
Have thanks: 17 times














You can make the ads go away by registering

If you've skimmed my previous extraction guides on this game you should find it really time consuming and tedious to extract all submeshes manually through Hex2Obj.
So I have to creat some tools to automate the process.

Tools have already been finished a few weeks ago but I'd just tested most of the archives from both platform several das ago. The conclusion is that these tools are
not perfect as there always could pop up a few exceptions that it cannot handle. But it's more than sufficient if you want just the character models.

Change log:
Code:
11.09.2017
- Improved the Noesis texture script to support PS3 ambient maps thanks to AceWell's assistance.
14.09.2017
- Updated the BMS unpacking script to skip the unnecessary files so that the process is much simpler.
17.09.2017
- Fixed some bugs in the mesh extractor, now it'll work correctly for Xbox 360 version .


See below for the instructions.


Attachments:


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


_________________
Go make every game into a puzzle-solving one!


Last edited by Bigchillghost on Sun Sep 17, 2017 10:47 am, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Sun Sep 10, 2017 8:32 am 
Offline
advanced
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 65
Has thanked: 12 times
Have thanks: 17 times
As you can see there're 5 files in the folder. Now follow these steps to reach your goal:

Preparations

The first thing we need to do is unpack the archive. Let the attached BMS script (IM2_Unpacker_EXT.bms) get its job done.
Now locate to the output folder. For those big archive some files are named differently, which acquire you to make some slight modifications. Here the condition I've met:
Code:
1. Misspelling "AmbientOcc[b]l[/b]usion" as AmbientOccusion, or use "AO" for short. Rename their EXT. to "AmbientOcclusion".
2. Ambiguous extension "Surfaces" in the same folder locating .SurfaceResident files. Rename them to "*.SurfaceResident"


Models Extraction

The tool we can use to extract meshes is IM2.exe, or IM2_O.exe, but they have different usage. IM2.exe is for for convenience of characters/NPCs/boss models' extraction
as it places all submeshes into one obj file. Use the following batch commands:
Code:
@echo off
for %%f in (*.ib) do IM2.exe "%%f"
pause

But if you're trying to extract scene objects like cars, buildings or SHIELD's Helecarrier, you gotta use IM2_O.exe. It allows you to optionally decide how the obj file should be stored.
Here the batch commands:
Code:
@echo off
for %%f in (*.ib) do IM2_O.exe Num "%%f"
pause

The Num is a one-byte variable represents the order of the underline "_" in the filename from left to right. The string before (not include) it will be taken as the output obj filename.
Change this value base on your judgments of which files should belong together. If it's set to 1 then it has no difference with IM2.exe. Also if you set it to a value greater than the amount
of "_" in the filename it won't have any effects. No file will be merged then.
These tools together can handle all meshes from both platforms without issues. But for Xbox360 it take more memory to expand the tristrip to triangle indices list.
I didn't test the tools on those huge archives from Xbox360 except the suit files, so feel free to report any issues when you meet one.

Textures Extraction

The textures are stored as headerless data files. So we gotta add them the needed headers. Place IM2T.Processor.exe to the output folder and run the following batch commands:
Code:
@echo off
for %%f in (*.SurfaceResident) do IM2T.Processor.exe Ver "%%f"
pause

Remember to change "Ver" to your game version, either "PS3" or "X360". After the batch process you can find .IM2T files in the same folder. Then use the Noesis script tex_IM2T.py to preview
and convert them to any format you want.
There're some issues with the lower resolusion images coz their headers are not correct. No time for that.

For PS3 version the AmbientOccusion map is down to half size, so yes the X360 version has larger ambient maps.

_________________
Go make every game into a puzzle-solving one!


Last edited by Bigchillghost on Wed Sep 20, 2017 12:55 am, edited 5 times in total.

Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Sun Sep 10, 2017 8:33 am 
Offline
advanced
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 65
Has thanked: 12 times
Have thanks: 17 times
Just created some renders for some of them.

ImageImage
ImageImage

_________________
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Sun Sep 10, 2017 4:52 pm 
Offline
VIP member
VIP member

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 866
Has thanked: 1851 times
Have thanks: 448 times
Bigchillghost wrote:
For PS3 version the AmbientOccusion map is not handled. Don't know what to do with it.

try this :D
Code:
        elif MapType == 8:
            untwid = bytearray()
            for x in range(imgWidth):
                for y in range(imgHeight):
                    idx = noesis.morton2D(x, y)
                    untwid += data[idx * 4:idx * 4 + 4]
            data = rapi.imageDecodeRaw(untwid, imgWidth, imgHeight, "r8 g8 b8 p8")
            texFmt = noesis.NOESISTEX_RGBA32

_________________
Noesis
Hex2obj
QuickBMS
TextureFinder
Unity Assets Bundle Extractor


Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Mon Sep 11, 2017 1:16 am 
Offline
advanced
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 65
Has thanked: 12 times
Have thanks: 17 times
AceWell wrote:
try this :D

This's what I got:
Image

Am I doing it wrong?
Code:
   if Platform == 0:   # PS3
      if MapType == 0:
         texFmt = noesis.NOESISTEX_DXT1
      elif MapType == 3 or MapType == 6:
         texFmt = noesis.NOESISTEX_DXT5
      elif MapType == 8:
         untwid = bytearray()
         for x in range(imgWidth):
            for y in range(imgHeight):
               idx = noesis.morton2D(x, y)
               untwid += data[idx * 4:idx * 4 + 4]
         data = rapi.imageDecodeRaw(untwid, imgWidth, imgHeight, "r8 g8 b8 p8")
         texFmt = noesis.NOESISTEX_RGBA32

_________________
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Mon Sep 11, 2017 1:40 am 
Offline
VIP member
VIP member

Joined: Wed Nov 05, 2008 12:16 pm
Posts: 866
Has thanked: 1851 times
Have thanks: 448 times
looks ok but the texture size should be 512x512 me thinks, you can see the repeat :)
guess you have to do something like this
Code:
    elif imgFmt == 8:
        imgWidth = imgWidth // 2
        imgHeight = imgHeight // 2
        untwid = bytearray()
        for x in range(imgWidth):
            for y in range(imgHeight):
                idx = noesis.morton2D(x, y)
                untwid += data[idx * 4:idx * 4 + 4]
        data = rapi.imageDecodeRaw(untwid, imgWidth, imgHeight, "r8 g8 b8 p8")
        texFmt = noesis.NOESISTEX_RGBA32

edit
is all in this thread obsolete now?
viewtopic.php?f=16&t=16580

_________________
Noesis
Hex2obj
QuickBMS
TextureFinder
Unity Assets Bundle Extractor


Top
 Profile  
 
 Post subject: Re: Model & Texture Tools for PS3/Xbox360 Iron Man II
PostPosted: Mon Sep 11, 2017 2:38 am 
Offline
advanced
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 65
Has thanked: 12 times
Have thanks: 17 times
AceWell wrote:
looks ok but the texture size should be 512x512 me thinks, you can see the repeat :)

Oh right, didn't realize that. :D
edit: looks like there's something wrong with my browser :D
AceWell wrote:
is all in this thread obsolete now?
viewtopic.php?f=16&t=16580


It shows almost all necessary info of the process of these tools. So if someone's gonna support bones and
anims of this game some day it might come in handy. But for now it indeed is obsolete.

_________________
Go make every game into a puzzle-solving one!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: niishimo and 4 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