Unread post
by battlefeel1942 » Sun Feb 25, 2024 11:08 pm
The extra 2/3 objects were the light and camera I forgot to delete out.
I just cant quite work out how the 3D Studio Max importer is using the UV and face data within 0x4200, with the vertex data at 0x4110.
This is an output from a script I wrote to read the i3d file.
Object Name: ~03dvereh4
0x4110
Number of vertices: 8
Expected total length of POINT_ARRAY block: 98 bytes
Vertex: X=-0.5000002384185791, Y=-0.04999801144003868, Z=0.0
Vertex: X=0.51291823387146, Y=-0.049997761845588684, Z=0.0
Vertex: X=-0.49999991059303284, Y=0.05000046268105507, Z=0.0
Vertex: X=0.51291823387146, Y=0.050000712275505066, Z=0.0
Vertex: X=-0.5000002384185791, Y=-0.04990645870566368, Z=3.0032970905303955
Vertex: X=0.51291823387146, Y=-0.049906209111213684, Z=3.0032970905303955
Vertex: X=-0.49999991059303284, Y=0.050095830112695694, Z=3.0032970905303955
Vertex: X=0.51291823387146, Y=0.05009607970714569, Z=3.0032970905303955
0x4120:
Number of faces: 12
Face 0: Vertex Indices = 0, 1, 5, Flag = 3
Face 1: Vertex Indices = 5, 4, 0, Flag = 3
Face 2: Vertex Indices = 3, 2, 6, Flag = 3
Face 3: Vertex Indices = 6, 7, 3, Flag = 3
Face 4: Vertex Indices = 0, 2, 3, Flag = 3
Face 5: Vertex Indices = 3, 1, 0, Flag = 3
Face 6: Vertex Indices = 4, 5, 7, Flag = 3
Face 7: Vertex Indices = 7, 6, 4, Flag = 3
Face 8: Vertex Indices = 1, 3, 7, Flag = 3
Face 9: Vertex Indices = 7, 5, 1, Flag = 3
Face 10: Vertex Indices = 2, 0, 4, Flag = 3
Face 11: Vertex Indices = 4, 6, 2, Flag = 3
0x4130
Material name: dverepredek
Number of faces using this material: 4
Face index: 0
Face index: 1
Face index: 2
Face index: 3
Material name: dverebok
Number of faces using this material: 8
Face index: 4
Face index: 5
Face index: 6
Face index: 7
Face index: 8
Face index: 9
Face index: 10
Face index: 11
0x4150
Smoothing Groups: (1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4)
0x4200
Channel index: 1
Number of UV coordinates: 24
UV[0]: U=0.0004994571208953857, V=0.0004995763301849365
UV[1]: U=0.9994996786117554, V=0.0004995167255401611
UV[2]: U=0.0004994571208953857, V=0.0004995763301849365
UV[3]: U=0.9994996786117554, V=0.0004995167255401611
UV[4]: U=0.0005002915859222412, V=0.9995004534721375
UV[5]: U=0.9995005130767822, V=0.9995003938674927
UV[6]: U=0.0005002915859222412, V=0.9995004534721375
UV[7]: U=0.9995005130767822, V=0.9995003938674927
UV[8]: U=5.368080139160156, V=-41.38868713378906
UV[9]: U=6.383701324462891, V=-41.38869094848633
UV[10]: U=5.368080139160156, V=-40.23325729370117
UV[11]: U=6.383701324462891, V=-40.23326110839844
UV[12]: U=5.368080139160156, V=-41.38868713378906
UV[13]: U=6.383701324462891, V=-41.38869094848633
UV[14]: U=5.368080139160156, V=-40.23325729370117
UV[15]: U=6.383701324462891, V=-40.23326110839844
UV[16]: U=0.5446206331253052, V=-19.281972885131836
UV[17]: U=0.54462069272995, V=-19.281972885131836
UV[18]: U=0.54462069272995, V=-18.110013961791992
UV[19]: U=0.54462069272995, V=-18.110013961791992
UV[20]: U=-0.4513844847679138, V=-19.281959533691406
UV[21]: U=-0.4513844847679138, V=-19.281959533691406
UV[22]: U=-0.4513844847679138, V=-18.10999870300293
UV[23]: U=-0.45138442516326904, V=-18.10999870300293
Number of faces: 12
Face[0]: Vertex Indices = (0, 1, 5)
Face[1]: Vertex Indices = (5, 4, 0)
Face[2]: Vertex Indices = (3, 2, 6)
Face[3]: Vertex Indices = (6, 7, 3)
Face[4]: Vertex Indices = (8, 10, 11)
Face[5]: Vertex Indices = (11, 9, 8)
Face[6]: Vertex Indices = (12, 13, 15)
Face[7]: Vertex Indices = (15, 14, 12)
Face[8]: Vertex Indices = (17, 19, 23)
Face[9]: Vertex Indices = (23, 21, 17)
Face[10]: Vertex Indices = (18, 16, 20)
Face[11]: Vertex Indices = (20, 22, 18)