iDevGames Forums
Milkshape model loading on a Mac? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: Milkshape model loading on a Mac? (/thread-7649.html)



Milkshape model loading on a Mac? - Mars_999 - Jul 24, 2002 03:38 AM

Ok, on PC their is a program called milkshape that has been used in quite a few FPS games I guess. I would like to use this program to make mechs, tanks type models and load the model on the Mac. Do to I am unsure where I could get a good tutorial on how to code a correct .obj or .3ds function for loading models. If I could code a () to load .obj files then I would not need milkshape and could use any Mac 3D rendering program. I don't know for sure if .mesh files hold the textures info or not? I thought .obj files or .3ds files have the textures data stored with it? Maybe I am completely off base and dreaming of something else? =)


Milkshape model loading on a Mac? - GoodDoug - Jul 24, 2002 10:31 AM

Milkshape can export to MD2 and MD3 formats, for which there are many code examples to load those. There's even an MD2 loader in Apple's sample code archive (not a great one though, it is very parochial about which models it will accept).

Also, at chumbalum's website there is an sdk and a model parser: <http://www.swissquake.ch/chumbalum-soft/files/MsViewer.zip>

One of those options should work for you.


Milkshape model loading on a Mac? - Mars_999 - Jul 24, 2002 12:12 PM

Thanks I will check it out.


Milkshape model loading on a Mac? - Namoreh - Jul 24, 2002 02:22 PM

NeHe has a tutorial on loading both MD2 and Milkshape models, I haven't read it, so I don't know how how much would have to be done differently to get it to run on Mac though.
The tutorial's at:
http://nehe.gamedev.net/trentp/gametutorials/lesson04.asp

Namoreh


Milkshape model loading on a Mac? - Ian Kerr - Aug 15, 2002 08:52 PM

I don't know if you're still interested but I ported the NeHe code to the Mac a long time ago. Here is the code

http://www.mnsi.net/~rkerr/source/md2.h
http://www.mnsi.net/~rkerr/source/md2.cpp
http://www.mnsi.net/~rkerr/source/normal.h
http://www.mnsi.net/~rkerr/source/normal.cpp

It's pretty messy and you'll have to edit it a bit since it was modified for my old engine. You aren't going to want the MD2 class to inherit from Object so you'll have to take that stuff out. The Endian conversion methods are in a header file included with CodeWarrior. Search your HD for them if you can't find them. I also modified it to interpolate the animation so that it's smoother.


Milkshape model loading on a Mac? - kberg - Dec 10, 2003 03:26 PM

if you want .obj file loading with support for textures, you could always use this as well:

http://www.sfu.ca/~kberg/Code/ObjLoader.tgz


Milkshape model loading on a Mac? - kelvin - Dec 10, 2003 04:07 PM

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=31

There's a Cocoa port of this tutorial available for download at the bottom of the page.


Milkshape model loading on a Mac? - MacFiend - Jan 3, 2004 06:23 AM

Just wanted to let you know that the NeHe port doesn't appear to compile properly with Xcode and 10.3.2.


Milkshape model loading on a Mac? - kelvin - Jan 3, 2004 10:40 PM

MacFiend Wrote:Just wanted to let you know that the NeHe port doesn't appear to compile properly with Xcode and 10.3.2.
I got it to compile with minor tweaking.