Milkshape model loading on a Mac?

Mars_999
Unregistered
 
Post: #1
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? =)
Quote this message in a reply
Member
Posts: 104
Joined: 2002.04
Post: #2
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/...Viewer.zip>

One of those options should work for you.
Quote this message in a reply
Mars_999
Unregistered
 
Post: #3
Thanks I will check it out.
Quote this message in a reply
Namoreh
Unregistered
 
Post: #4
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/gametutor...sson04.asp

Namoreh
Quote this message in a reply
Member
Posts: 49
Joined: 2002.05
Post: #5
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.
Quote this message in a reply
kberg
Unregistered
 
Post: #6
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
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #7
http://nehe.gamedev.net/data/lessons/les...?lesson=31

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

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #8
Just wanted to let you know that the NeHe port doesn't appear to compile properly with Xcode and 10.3.2.
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #9
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.

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Post Reply