[ODE] trimesh and making your own mesh
Aras Pranckevicius
nearaz at interamotion.com
Thu Jul 17 22:34:02 2003
> Is there a easy way to go from making a 3d model in MAX to exporting to
use
> for trimesh?
Some basic steps:
1. export the model from 3dsMax into some-convenient-for-you format (.asc,
.obj, .x, .3ds etc.)
2. load the mesh
3. feed mesh data to tri-mesh (that usually means: feed the vertices, and
feed the triangle indices).
4. that's all :)
Eg. under DirectX probably the easiest way is to export from 3dsMax into .X
format, load it via D3DX utility functions, make a copy of vertex coords /
indices (lock buffer, copy needed data, unlock), and supply that to
tri-mesh.
<spam>
Source code for DX case could be found eg. at LTGameJam2003 -
http://jammy.sourceforge.net/2003 : download 'dingus' engine, sources at
dingus/resource/CollisionMeshBundle.cpp and
dingus/collider-ode/CollisionMesh.cpp
</spam>
Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/