I am reverse engineering a 3d file format for a game. I know the file is a mesh since I was able to identify the XYZ Coordinates for each vector as well as the MeshFaces. Each Vector XYZ Coordinate has 3 floats like so:
[this is pulled from an actual file]
41FC39C0 73480640 3AC87240 6038BF3E DF545D3F E620ACBE 00000000 0000403F
And this is the float representation of the hex:
-2.9060214 2.0981719 3.7934709 = X Y Z
0.37347698 0.86457628 -0.3361885 0.0 0.75 = Not sure what this this is.
I want to say the first 2 values could possibly be tU
, tV
values, but from what I know with DirectX, texture coordinates are usually between 0 and 1. Even though this file, the numbers fit between, I could bring up another file when those first 2 numbers are something like -.50 or even above 1 so I can't say they are text coordinates for sure.
The last 3 values I have no idea.
This 3d Mesh File is for a online game that uses a custom built DirectX 9 engine and from what I gather so far, is loosely based on Direct3D's .X file specifications.
I am able to pull out the XYZ coordinates into a list that can be imported into Cinema 4D and I have confirmed the XYZ is accurate based on the object that is drawn. In this case, a rock.
Here is floats for the first 3 data points within this file:
1. -2.9060214 2.0981719 3.7934709 0.37347698 0.86457628 -0.3361885 0.0 0.75
2. -2.7679636 2.0897043 2.6395969 0.16878456 0.98563963 5.1173517e-003 0.0 0.5
3. -2.7679636 6.2550635 2.7174740 0.20584901 -0.96193141 -0.17976092 1.0 0.5
From my experience with reverse engineering 3D date, if a floating point number is exponential, it most likely is being read wrong, so the '5.1173517e-003' on the 2nd line towards the end may not even be a floating point number, but then its other possible values:
INT8 117
UINT8 117
INT16 -20619
UINT16 44917
INT32 1000845173
UINT32 1000845172
HALF FLOAT -0.11651611
don't make much sense either.