LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: darknet on April 20, 2007, 01:47:44

Title: Need 3D model formats info..
Post by: darknet on April 20, 2007, 01:47:44
I need help that I pretty new at this. I don't know what type of format to work on. Can any one help me out? Read some forums but it not easy to know which one. i don't even know how the code work for loading objects..
Title: Re: Need 3D model formats info..
Post by: Matzon on April 20, 2007, 05:30:47
You should use a scenegraph that handles all of this for you. please take a look at:
http://www.jmonkeyengine.com/
http://xith.org/
Title: Re: Need 3D model formats info..
Post by: bobjob on April 20, 2007, 08:23:35
if you understand the basics of opengl and want to load a file type extention, i personally would recommend the ".obj" look it up in google, its a script layout really easy to work with. Has all the important information regarding 3d objects, such as: Vertex Point, Texture co-ordinate, Normal.
Title: Re: Need 3D model formats info..
Post by: darknet on April 20, 2007, 14:39:40
Well i wanted to code the my own way and test out if the code work for the object format file ext. any more about java codes object would help more ^-^.
Title: Re: Need 3D model formats info..
Post by: Rainer on April 26, 2007, 05:34:15
is there some sample code to load .obj files?
sounds interesting :)
Title: Re: Need 3D model formats info..
Post by: Jon on April 26, 2007, 06:45:01
http://www.cokeandcode.com/node/324
Title: Re: Need 3D model formats info..
Post by: Rainer on April 27, 2007, 08:03:04
thanks, now i succeded to render the asteroid spaceship into my scene.
but something is strange, if i render the model, my scene becomes very dark.
the model itself is rendered with the correct lighting.
what could be the reason?
Title: Re: Need 3D model formats info..
Post by: kappa on April 27, 2007, 12:10:42
its the lighting, switch it off after you have rendered the model, GL11.glDisable(GL11.GL_Lighting) thing.
Title: Re: Need 3D model formats info..
Post by: Rainer on April 27, 2007, 12:37:34
if i just switch of lighting after the model, i have no lighting at all in the actual scene?
i tried switching on/of lighting at different locations, but with no success.
Title: Re: Need 3D model formats info..
Post by: Rainer on April 27, 2007, 13:14:19
mhh, possibly i got some problems with normals, if i remove normals from the model my scene looks like before. (and the model appears just bright, without any shadowing).