3D Models

Started by NickyP101, March 01, 2006, 07:37:26

Previous topic - Next topic

NickyP101

Hey all,

Im using Java with OpenGL (using lwjgl) to create a 3D shooter.

Its come to the time where i need to implement some 3D models into my game, ive found some good ones on the internet in .3ds format. i have no idea how i can implement these models into my game??

Im really not sure what steps i need to take.

Any help would be greatly appreciated.

Thanks in advance, Nick

Fool Running

Unfortunatly, the best way to do it is to write a model loader yourself. This will allow you to load the model in a way that your engine understands best. If you search Google you can find the file format for .3ds files.

Otherwise you can try to find a loader and adapt it into your engine.

In my opinion model loading is one of the most annoying things that a programmer has to deal with when making a game engine. :lol:
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

elias4444

I'd also check out the source code (or just use the engine itself) for jMonkeyEngine or Xith3D. I spent a whole lot of time writing model loaders, and only afterwards learned that others had already done it. Go figure. :P
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

napier

This class reads verts and triangles from a 3DS file:
   http://potatoland.com/glart/week6/glmodel/GL_3DS_Reader.java

   see: load3DSFromStream()

This does a pretty basic load of vertices, triangles and texture mapping.  For the moment it assumes there is one object in the file, but could be easily extended to load multiple objects.  This class just loads data into ArrayLists, so you can take it from there.
penGL/Java/LWJGL demos and code: http://potatoland.org/code/gl

NickyP101

Thanks guys, ill get started :)

crash0veride007

See my post here:
http://www.javagaming.org/forums/index.php?topic=14021.0

My stuff is in JOGL but should be easily ported to LWJGL.