3D model reversing compilation

Post questions about game models here, or help out others!
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 34 times

Re: 3D model reversing compilation

Post by Satoh » Tue Sep 04, 2012 6:54 am

In my case I've found that a lot of mesh data has a similar visual pattern when viewed as an image, particularly as a 8bpp image with an arbitrary color palette (such as viewed in GGD by default)

It's not always an accurate way to tell where things are, but it is a lot easier on the eyes than scanning a bunch of monochromatic text. It gives a fairly good indication of when files are compressed or where certain blocks of data begin and end as well.

Viewing as an image helps to highlight the patterns, and as I work with files, patterns are very important toward figuring out what is what.

tomatopasta
beginner
Posts: 32
Joined: Thu Aug 16, 2012 7:49 pm
Has thanked: 1 time
Been thanked: 1 time

Re: 3D model reversing compilation

Post by tomatopasta » Fri Nov 16, 2012 4:49 pm

Reversing/translating into obj are preferable, it save you a load heck of formats war, just my 2cents.

Darkfox
VVIP member
VVIP member
Posts: 689
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: 3D model reversing compilation

Post by Darkfox » Fri Dec 21, 2012 10:52 am

Sorry to pop in here but I must take a stab argument against OBJ. Its a very basic format, which is both its charm and ultimately its greatest flaw. OBJ will not save rigging or skinning which would defeat the purpose of reversing most models as they would be unusable if you wanted to put them back into the game at a later point. I think preservation should be as important as convenience. FBX is a better choice if you want to go the way of a supported format, it keeps rigging, skinning, and has animation support.

There are also a number of other thoroughly documented game formats that are also good intermediaries. ActorX and MD5 for example.

All choices here give a lessened amount of data loss in translation and are convenient alternatives to the lossy OBJ format.

Edit: Sorry again, it is just a pet peeve of mine with people still referencing the archaic OBJ as the best 3D choice. What it can't do turns me off in the grand scheme except in regards to very early 3D, static meshes, or map geometry. Those three are only good reasons I can see for OBJ.

pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: 3D model reversing compilation

Post by pixellegolas » Fri Jan 04, 2013 9:49 am

Darkfox, don't worry I agree with you totally. Obj is only good for static meshes because you have to recreate everything as you say. I love fbx but the problem is there are so many versions and it keeps changing so hard to unify it. But hopefully the tools become better and more unified so people will use it as the first choice

Darkfox
VVIP member
VVIP member
Posts: 689
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: 3D model reversing compilation

Post by Darkfox » Tue Jan 08, 2013 5:07 am

That is true. I lost track of the revisions on FBX. I guess one can hope a standardized version will be agreed upon. I know there are other formats out there, though.

vladikkgg
ultra-n00b
Posts: 7
Joined: Tue Nov 01, 2011 1:44 pm
Has thanked: 5 times

Re: 3D model reversing compilation

Post by vladikkgg » Sun Sep 07, 2014 9:42 pm

Someone,help please with convertation file js to obj. https://www.whiteclouds.com/sites/defau ... ort.js.txt this file

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2605
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 638 times
Been thanked: 1332 times

Re: 3D model reversing compilation

Post by shakotay2 » Sun Sep 14, 2014 9:49 pm

u should have posted in a suiting thread. Here your post seems to have been overlooked. :D
o0DemonBoy0o found the basic structure for such models using tris and quads (search for webgl in the forum).

Anyway these webgl-type models are rather useless without uv data:
dodge_webgl.JPG
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

godskin
veteran
Posts: 92
Joined: Thu Nov 05, 2015 2:45 pm
Has thanked: 10 times
Been thanked: 2 times

Re: 3D model reversing compilation

Post by godskin » Fri Sep 02, 2016 8:35 pm

@shakotay2 not helper not good
more showoff not fuuly help

magister
n00b
Posts: 10
Joined: Thu Nov 06, 2014 8:52 pm
Been thanked: 1 time

Re: 3D model reversing compilation

Post by magister » Thu Dec 22, 2016 12:45 pm

Need extract files from this unity packages in .obj or .fbx formats
If i try Assetsbundleextractor or unityEx - compressed meshes are not supported
UPD: Nobody helped me. Well, i did it by myself.
I used unitystudio 0.5.0.0 for meshes (body and hand weights unfortunately not saved), and unityex 1.5.7 and pvrtextool for textures.
Models scaled up to 60.
Image
DL: http://rgho.st/6x2Jsvwn7
You do not have the required permissions to view the files attached to this post.

GRiNDERKILLER
advanced
Posts: 71
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 10 times
Been thanked: 23 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER » Thu Feb 16, 2017 7:52 pm

Can someone please take a look on this file. I tried hex2obj and unsuccessful. Apparently i am more than n00b. xD
File is from SGW3 which run on CryEngine. It's different from other CGF files from latest CE games. I hope it's not encrypted.

Some data looks fine to me but I can't correctly process them. Only some scrambled shapes.

This is what I got so far :think:
Image
Shape is ok but faces are messed up.
You do not have the required permissions to view the files attached to this post.

User avatar
Acewell
VIP member
VIP member
Posts: 1186
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2330 times
Been thanked: 689 times

Re: 3D model reversing compilation

Post by Acewell » Fri Feb 17, 2017 5:35 am

GRiNDERKILLER wrote:Can someone please take a look on this file.
osv_96_muzzle_brake_01_fp_cgf.png
the counts (4bytes) are stored 16 bytes before each start address and the stride (4bytes) is stored right after the count
:D
You do not have the required permissions to view the files attached to this post.

GRiNDERKILLER
advanced
Posts: 71
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 10 times
Been thanked: 23 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER » Fri Feb 17, 2017 12:52 pm

Holly s*hit! I thought you did it as first.
But anyway thank you very much for provided infos. :wink:

EDiT: I think this time I succeeded. Once again thank you Ace!

Maya render.
Image
You do not have the required permissions to view the files attached to this post.
Last edited by GRiNDERKILLER on Fri Feb 17, 2017 11:36 pm, edited 1 time in total.

GRiNDERKILLER
advanced
Posts: 71
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 10 times
Been thanked: 23 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER » Fri Feb 17, 2017 8:11 pm

Just last question AceWell. How to flip UV's verticaly? I mean through hex2obj.

Thanks!

User avatar
Acewell
VIP member
VIP member
Posts: 1186
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2330 times
Been thanked: 689 times

Re: 3D model reversing compilation

Post by Acewell » Sat Feb 18, 2017 12:22 am

you don't, you have to do that in your 3d program of choice :D

User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 47 times

Re: 3D model reversing compilation

Post by blackracer » Tue Feb 21, 2017 8:21 pm

I need your assistance conditional, I spent a lot of time on this, but I can not find a solution, I can read any file with using hex2obj but their project contains of several thousand, I decided to explore the noesis but I did not get to do one-stop solution for all model files ((
Here I made a template, you can help me fix it to read model with names of the textures.
This file is a container it can contain and textures, but I have learned to extract textures using QuickBMS Script from AceWell


Sample Models: https://www.dropbox.com/s/qucdzdy26xz7v ... s.zip?dl=0

Image

Code: Select all

from inc_noesis import *
import noesis
import rapi

def registerNoesisTypes():
    handle = noesis.register("TestScriptGame", ".img")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadModel(handle, noepyLoadModel)
    #noesis.logPopup()
    return 1

NOEPY_HEADER = "IMGE"
	
def noepyCheckType(data):
   bs = NoeBitStream(data)
   if len(data) < 8:
      return 0
   if bs.readBytes(8).decode("ASCII").rstrip("\0") != NOEPY_HEADER:
      return 0
   return 1  

def noepyLoadModel(data, mdlList):
    ctx = rapi.rpgCreateContext()
    bs = NoeBitStream(data)
    fileName = rapi.getLocalFileName(rapi.getInputName()).rstrip(".img")
    rapi.rpgSetName(fileName)
    bs.seek(0x4, NOESEEK_ABS)
    VBytes = 36            
    VCount = bs.readUInt() // VBytes
    VBuf = bs.readBytes(VCount * VBytes)
    skip = bs.readBytes(8)
    FCount = bs.readUInt() // 2
    IBuf = bs.readBytes(FCount * 2) 
    rapi.rpgBindPositionBufferOfs(VBuf, noesis.RPGEODATA_SHORT, VBytes, 0)   
    rapi.rpgBindUV1BufferOfs(VBuf, noesis.RPGEODATA_SHORT, VBytes, 28)   
    rapi.rpgCommitTriangles(IBuf, noesis.RPGEODATA_USHORT, FCount, noesis.RPGEO_TRIANGLE, 1) #SHORT for word indices
    mdl = rapi.rpgConstructModel()                                                          
    mdlList.append(mdl)
    rapi.rpgClearBufferBinds()
    return 1

Post Reply