You should tell where you got stuck with the tutorial so that I can improve it.
There is no general recipe how to get the vertices, even for simple models.
For the face indices (FIs) the rule is: search for a scrambled alphabet.
Problem is: not every scrambled alphabet you find in 3D data represents FIs.
Simple 3D model formats use floats (4 bytes) for the vertices. (Half float vertices
or even shorts (WORD, 2 bytes) are harder to recognize.)
To find vertices (v) you'll need to find patterns.
From the tutorial it says:
v: xx xx xx nn with nn= 42..44 (these are rough values only, can also be 3F, 40)
where v is a 4 bytes little endian value.
And 'yes', nn can also be 3D, 3E, or even 37 - my bad.
(Also BD if the MSB is set but that's beyond this tutorial.)
Don't know what this is: bytes, floats, endianess? Google for it.
But you don't need to know it. All you have to know is how to recognize patterns.
(If you can't: well, then you're lost - as simple as that.)
Let's have another look at the tutorial sample,
hw_bu_000.bm.mod
The scrambled alphabet is to be found somewhere at file offset 0x3B00.
These face indices are integer numbers - they just count the vertices.
The integers consist of two bytes here. 20 00 (little endian) is 0x0020 or 32 decimal.
First vertex has the number 00 so search for the start of the face indices list
at 0x398D. There it reads 00 00 01 00 02 00, this is 0, 1, 2 in decimal.
This means that the vertices 0, 1 and 2 are used to construct the first face (triangle)
of the model.
(Won't bother how to find the end of the face indices list. It's at 0x4844.)
Now for the vertices - I've randomly marked some of them by rectangles:
tut_sample_hw_bu.jpg
You'll find the start address 0x56 by experience or trial & error.
In
hex2obj toggle the 'noPtC' (no PointCloud) button to 'PtCld'.
Enter 56 (without the 0x) as
vertices startaddress in step 3.
Leave the mode button in step 2 as 'seq' (sequential).
Press the 'mesh' button.
The point cloud of the upper body pops up.
Enter 398D as a
face indices start address in step 1. Switch back to 'noPtC'.
Change the
count from 500 to 100 or 150, as you wish.
Scroll down in the lower left list box. It reads: max face index: 142.
Enter this value as a count in step 3.
Press the 'go3' button. You happen to see a mesh, don't you?
Looks broken? Yeah, because we didn't use all FIs.
Calculate the number of FIs in two steps: a) you've to subtract the FIs' startaddress (0x398D)
from the endaddress+1 (0x4845) -> 0xEB8= 3768 bytes.
That's the size of the
face indices block. b) Divide it by two (since the FIs
are two byte integers) -> FIs count= 1884.
hex2obj: enter 1884 as a count in step 1. Press 'go1', in the listbox there's a
max face index of 457 displayed. It's the highest vertex number.
So we enter this value as a count in step 3.
Pressing 'go3' shows the full upper body of the model.