
It should allow u to extract 3D models with simple formats.
Means such games like Mafia2 or SleepingDogs not to be supported.
Before using hex2obj on a difficult format try out some of the dozens of simple samples on Xentax
to understand HOW it's going. Searching for "simple" over all of my posts, you'll find something like this:
Link to hex2obj (zip parts 2 and 3 in adjacent posts):
- preliminary -
Ok, the truth is - there are two things you should understand:
the hexadecimal numeral system (base 16) using the "numbers" 0..9, A..F
So 0x123 is 291 decimal.
(To avoid confusion with other numbering systems the hex numbers are marked with 0x or an 'h'.)
Secondly you should be able to use a hex editor.
If you don't have these two skills leave now, and come back as soon as you gained them.
(If you don't have a clue which hex editor to use: TinyHexer or HexEdit by A.W. Phillips should do the trick.)
See list here and comments in the following posts:
--------------------------------------
As I said you don't need to learn "basics" but you'll have to understand
"the structures" to use hex2obj.
o So here is a short tutorial on it's use.
You don't need to know the technical terms - I just use them habitual.
Simple 3D models consist of vertices and faces.
hex2obj needs the following infos to perform it's task:
the startaddress of the vertices and the one of the faceindices.
(Some experience is required to find them but it's not too hard.)
Secondly we need the vertices count and the faceindices count.
I will explain this with a model example soon but now for the structures -
the two most common are:
a) "sequential"
Code: Select all
v x,y,z
v x,y,z
v x,y,z
v x,y,z
...
vn x,y,z
vn x,y,z
vn x,y,z
vn x,y,z
...
vt x,y
vt x,y
vt x,y
vt x,y
...
With a sequential model you only need to provide the above mentioned counts.
b) "blocked"
Code: Select all
v x,y,z
vn x,y,z
vt x,y
v x,y,z
vn x,y,z
vt x,y
...
(And 'yes': the order might be v, vt, vn for example)
If you don't understand anything you'll have to do a trial 'n error (No, no I really don't recommend this.

Or you calculate the FVF size: each coordinate (x, y or z) consists of 4 bytes.
So the above two blocks have a blocksize of 32 (8x4) each.
It might be a little bit more difficult if there are DWORDs contained in the blocks.
But anyway the most common blocksizes are 32, 40, 52. Sometimes 24, 44, 48 whatever.
o the v,vn,vt patterns to search for
well, to identify what is v, vn or vt is the tricky part. This is for little endian
(for big endian the patterns are in reverse order of course).
v: xx xx xx nn with nn= 42..44 (these are rough values only, can also be 3F, 40)
vn: value of each component 0.0 .. 1.0 (1.0 = 00 00 80 3F)
square sum of components is 1.0 (autocalculated by hex2obj)
vt: value of each component 0.0 .. 1.0
It's important to know that half floats use two bytes only.
------------------------------------------------------
o Now lets start analysing our first model
------------------------------------------------------
(We don't care for normals because they can be autogenerated in most 3D tools.)
We leave the "LitE" button as it is (little endian data).
The face indices are very easy to find since parts of the indices block look like a scrambled alphabet.
If we scroll through hw_bu_000.bm in a hex editor we'll find this:

To find the correct ending of the list is a very important step.
Here it's rather easy (0x4845) because it's bound by a string size (09 000000)
and the corresponding string.
address mapping of the tutorial example:
- 0x56 ..0x15C1 vertices
- 0x15C2..0x2B2D normals
- 0x2B2E length DWord and string "Texture"
- 0x2B39..0x3980 uvs, length: 0xE48
to get full use of the tutorial.
---------- version 0.24e3, "end of project, more or less" ----------
Since uploadmb is down atm (as of 7th of March, 2021) here's a temporary hosting of version 0.24e3:
Medium font version (for laptops with high DPI screens for example):
will be added to above link as soon as someones needs it (nobody requested it so far)
---------- version 0.24d, autogenerated FIs ---------- (.exe only, as a fallback)
http://forum.xentax.com/viewtopic.php?f ... ed#p119417
Since there a still some downloads after all the years I feel obliged to tell you guys once again:
hex2obj is NOT a one-click-solver tool - it was designed to help people to help themselves.
If you don't have a basic understanding of 3D model formats you surely will get better results using a 3D ripper (for PC).
With this said I think it's time to make a check list for noobs concerning the analyzing of 3D models:
Code: Select all
1) is the data compressed?
Try offzip if your unsure (works for zip compressed data only) or search for a decompressing tool.
(There's also Quickbms scripts for many archive formats.)
2) is it model data, texture data or animation data?
Use TextureFinder for textures.
Some 3D models may contain both: model data and texture(s)
3) Before using hex2obj on a difficult format try out some of the dozens of simple samples on Xentax.
4) Then try out to get a point cloud from your specific model as a first step.
Look for continuous data sections with a size of 1 kB at least (0x400).
Yeah, what the heck does that mean: "continuous data"?
Hard to explain - in fact you'll need experience for that.
If there's gaps with more than 10 zero bytes for example I'd say it's not continuous data.
While float data is easy to recognize (with some experience) it's
rather hard to find vertex data in short/Word format.
---------- >>> version 0.24c <<< ----------
(zippyshare link, blocked in some countries now, in mine, too

hex2obj_0.24c.zip
- uv preview
- allows face indices > 65535 (for non-tristripped meshes)
-----------------------------------------------------------------
known bugs:
v0.22: for rare cases when there is a '.' in a folder name:
........ model names without extension require a .mdl to be added before loading the model
v0.23c - f intermediate versions with bug, don't use!
v0.24a uvs preview (float/VB)
reported bugs:
v0.21: wrong clipping for HF uvs
........ kao issue
v0.24: libgcc_s_dw2-1.dll missing on W7, W8 (due to CodeBlocks/MinGW update)
fixes
Fixed a bug (prior to v 0.24e3) with triStrips not resetting on parameter change
todo list
project finished , more or less
(or call it "abandoned" since there are better tools from Bigchillghost and Lazov)
HTH,
shak-otay