Does anyone here knows how to create this format.
If its not . Im thinking about creating a utility which will
convert 3DS and X files into my own 3D format which wiil be easily loaded
in PB .
What do you goys think . Is there is a point to do that ?
ORGE 3D MESH FORMAT ?
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
A secret? No:
uhm here is a saving procedure:
Well, you see it consists in floats.
U, V = Texturecoords:
uhm here is a saving procedure:
Code: Select all
Structure Tri3D
Vert.f[3]
U.f[3]
V.f[3]
EndStructure
Structure Point3D
X.f
Y.f
Z.f
EndStructure
Procedure.f GetVertexX(Vert)
SelectElement(Vert(), Vert)
ProcedureReturn Vert()\X
EndProcedure
Procedure.f GetVertexY(Vert)
SelectElement(Vert(), Vert)
ProcedureReturn Vert()\Y
EndProcedure
Procedure.f GetVertexZ(Vert)
SelectElement(Vert(), Vert)
ProcedureReturn Vert()\Z
EndProcedure
Procedure SaveZM(ID, Filename.s)
If CreateFile(ID, Filename.s)
ForEach Tri()
WriteFloat(Tri()\U[0])
WriteFloat(Tri()\V[0])
WriteFloat(GetVertexX(Tri()\Vert[0]))
WriteFloat(GetVertexY(Tri()\Vert[0]))
WriteFloat(GetVertexZ(Tri()\Vert[0]))
WriteFloat(Tri()\U[1])
WriteFloat(Tri()\V[1])
WriteFloat(GetVertexX(Tri()\Vert[1]))
WriteFloat(GetVertexY(Tri()\Vert[1]))
WriteFloat(GetVertexZ(Tri()\Vert[1]))
WriteFloat(Tri()\U[2])
WriteFloat(Tri()\V[2])
WriteFloat(GetVertexX(Tri()\Vert[2]))
WriteFloat(GetVertexY(Tri()\Vert[2]))
WriteFloat(GetVertexZ(Tri()\Vert[2]))
Next
CloseFile(ID)
EndIf
EndProcedureU, V = Texturecoords:
UVert1
VVert1
XVert1
YVert1
ZVert1
UVert2
VVert2
XVert2
YVert2
ZVert2
UVert3
VVert3
XVert3
YVert3
ZVert3
bye,
Daniel
Daniel


