Important information: this site is currently scheduled to go offline indefinitely by end of the year.

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: 38 times

Re: 3D model reversing compilation

Post by Satoh »

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 »

Reversing/translating into obj are preferable, it save you a load heck of formats war, just my 2cents.
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: 3D model reversing compilation

Post by Darkfox »

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 »

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: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: 3D model reversing compilation

Post by Darkfox »

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: 6
Joined: Tue Nov 01, 2011 1:44 pm
Has thanked: 5 times

Re: 3D model reversing compilation

Post by vladikkgg »

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: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: 3D model reversing compilation

Post by shakotay2 »

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.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
godskin
veteran
Posts: 98
Joined: Thu Nov 05, 2015 2:45 pm
Has thanked: 11 times
Been thanked: 3 times

Re: 3D model reversing compilation

Post by godskin »

@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 »

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
veteran
Posts: 92
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 12 times
Been thanked: 32 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER »

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.
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: 3D model reversing compilation

Post by Acewell »

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
veteran
Posts: 92
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 12 times
Been thanked: 32 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER »

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
veteran
Posts: 92
Joined: Thu Jul 12, 2012 12:24 pm
Has thanked: 12 times
Been thanked: 32 times

Re: 3D model reversing compilation

Post by GRiNDERKILLER »

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

Thanks!
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: 3D model reversing compilation

Post by Acewell »

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: 49 times

Re: 3D model reversing compilation

Post by blackracer »

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