i use blender(free) for all my models with a .obj loader i wrote that will import the material properties also.
here is the code:
http://syn9.thingie.net/download/objFile.zip
you'll also see a couple functions for displaying the model
heres an example:
Code:
' in blender ----
file->export->wavefront .obj->export wavefront .obj
only set 'Apply Modifiers, Normals, UVs, Materials, Objects'
' loading code
dim modelHandle, modelDL as gluint
modelHandle = objFile_load ("file.obj")
modelDL = glGenLists(1)
model_renderToList modelHandle, modelDL
'---- or ----
modelData[modelHandle].displayList = glGenLists(1)
model_renderToList modelHandle, modelData[modelHandle].displayList
' rendering code
glCallList modelDL
'---- or ----
glCallList modelData[modelHandle].displayList
'---- or -- render w/o material data
glColor3f 1, 1, 1
model_renderPlain modelHandle
'---- or -- render w/ material data, but not to a list
model_render modelHandle
modelData is a dynamic array that can be cleared using
Code:
model_deallocateModels
The number of indicies of modelData is contained in the variable
numModels
There are also a few supplimentary routines that ive found pretty usefull
Code:
'reposition all points around the averaged point
declare sub model_center (modelHandle)
'copy the memory structure of one array index to another
declare sub model_copyHandleAllocation (srcHandle, dstHandle)
'a routine that i use a lot that works the same as model_renderToList, but draws all
'polies at half the color intensity
declare sub model_renderToList_wire (modelHandle, displayList as gluint)
'a routine that you'd use to scale the model data if you didnt want to use glScalef
declare sub model_scale (modelHandle, scale!)
'normalize the model scale. takes the furthest point from the center and divides all
'center->point vectors by this length. great for auto scaling models before using them
'in an engine so they're all a standard size
declare sub model_scaleAuto(modelHandle)
ive use this system extensively on my recent works and it has helped shave development and testing of models in game considerably
some examples: