ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Apr 27, 2018 5:01 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Mar 27, 2017 8:16 am 

Joined: Sun Dec 14, 2014 3:56 pm
Posts: 113
This should be a very easy one to do since several different tools I've tried find the textures right off the bat. The issue with those tools is they don't preserve the filenames, which is needed in order to make use of them (I have an extracted OBJ of the level map with an MTL file but no textures to go with it).

https://www.dropbox.com/s/wplbnln1s7cft ... g.p3d?dl=1

Oh, and when you look at the file in a hex editor I see mentions of the PNG format, which is what every tool I've tried extracts them as. The file names are in plain sight, too.


Top
   
PostPosted: Tue Mar 28, 2017 8:51 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 468
i've got a script that can extract and name all, the image named "MISSING_IMAGE" was stored twice in the p3d,
and at least 6 share the same name except for the capitalization, so 3 were renamed by Quickbms.

NEW_road__t.png
NEW_Road__t_00000001.png
NEW_road__t_1.png
NEW_Road__t_1_00000001.png
NEW_road__t_2.png
NEW_Road__t_2_00000001.png

the ones with the capital 'R' are likely the ones you want, just remove the last 9 characters from the name.


here is the bms script :)
Code:
# script for QuickBMS http://quickbms.aluigi.org

findloc PNG binary "\x89\x50\x4E\x47"
do
    goto PNG
    savepos OFFSET
    goto -0x31 0 seek_cur
    get check byte
    if check == 0x4
        get NAME string
    else
        goto -0x5 0 seek_cur
        get check byte
        if check == 0x8
            get NAME string
        else
            goto -0x5 0 seek_cur
            get check byte
            if check == 0xc
                get NAME string
            else
                goto -0x5 0 seek_cur
                get check byte
                if check == 0x10
                    get NAME string
                else
                    goto -0x5 0 seek_cur
                    get check byte
                    if check == 0x14
                        get NAME string
                    else
                        goto -0x5 0 seek_cur
                        get check byte
                        if check == 0x18
                            get NAME string
                        else
                            goto -0x5 0 seek_cur
                            get check byte
                            if check == 0x1c
                                get NAME string
                            else
                                goto -0x5 0 seek_cur
                                get check byte
                                if check == 0x20
                                    get NAME string
                                else
                                    goto -0x4 0 seek_cur
                                    get NAME string
                                endif
                            endif
                        endif
                    endif   
                endif
            endif
        endif
    endif
    goto OFFSET
    goto -0x8 0 seek_cur
    get NEXT_TEX long
    get SIZE long
    string NAME + .png
    log NAME OFFSET SIZE
    get SKIP long
    findloc PNG binary "\x89\x50\x4E\x47" 0 ""
while PNG != ""


Last edited by Acewell on Sun Jan 07, 2018 10:51 pm, edited 1 time in total.

Top
   
PostPosted: Tue Mar 28, 2017 9:20 pm 

Joined: Sun Dec 14, 2014 3:56 pm
Posts: 113
Thank you so much!


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

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited