Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Milkshape3d loader ?
#1
anyone know if someone coded an ms3d loader for gl ?

wuld be kinda nice to have or an 3ds one.

reson why i'm posting a question about this is coz i rly dont want an extra dll file or simular just to be able to load it and i kinda feal the need to be able to edit the loaders code if it wuld be needed.

when it's a precompiled lib file with basicly just an include file it feals like a one way street so that's why i'm asking Smile

thanks in advance.
lt;_[_[_[_T-B-B-W_]_]_]_>
[Image: bfd2.gif]
Reply
#2
Gotta remember that this forum isn't worksafe.
Reply
#3
Quote:Gotta remember that this forum isn't worksafe.
big f-ing deal Wink
lt;_[_[_[_T-B-B-W_]_]_]_>
[Image: bfd2.gif]
Reply
#4
I was working on a Lightwave loader, a while back, but I never fnished it because we realized that .obj could get the job done just fine, and we already had a working prototype. It shouldn't be too hard to make 3DSMax loader... And I think Syn9 has already written a Milkshape loader, but don't hold me to that. Wink
Reply
#5
well lightwave take's to long to learn.
and ms3d is kinda simple compared to other 3d modlers out there.

my brother had an atempt on 3d loader but it seemed that it skipped a row of text in the middle of loading.
and we tryed reading byte by byte and input and line input...
frustration got to much so we desided to look for one instead.

i mean someone musta made one already.
wuld be nice if i culd have a lookie on it Smile
lt;_[_[_[_T-B-B-W_]_]_]_>
[Image: bfd2.gif]
Reply
#6
You mean a Milkshape loader, or what? A lookie, on what? :lol:
Reply
#7
Quote:You mean a Milkshape loader, or what? A lookie, on what? :lol:
lookie lookie lotz of looks!

nah what i ment whas to get my hands on the source code of a ms3d->ogl loader to have a look at it Smile
lt;_[_[_[_T-B-B-W_]_]_]_>
[Image: bfd2.gif]
Reply
#8
Ok... so it was blender.

http://forum.qbasicnews.com/viewtopic.ph...ht=#123152

I haven't messed with Milkshape because I think anything less then Lightwave isn't worth paying for... but I'm spoiled. :lol:
Reply
#9
Quote:I haven't messed with Milkshape because I think anything less then Lightwave isn't worth paying for... but I'm spoiled. :lol:

u know if u where next to me.... i wuld slap u Wink

and yeh ogl+sdl in the combo like u showed the link to is kinda what i'm after.
but it's no object loader like ms3d lol Smile
lt;_[_[_[_T-B-B-W_]_]_]_>
[Image: bfd2.gif]
Reply
#10
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:

[Image: shot21.jpg][Image: shot1.jpg]
[Image: shot3.jpg][Image: uShot1.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)