3d model texture/colour laoding problems-plz help

Started by ug02070, November 30, 2004, 13:18:06

Previous topic - Next topic

ug02070

Hi all,
I am trying to load a 3ds file into an opengl window using lwjgl. Unfortunately I have not been given much time to do this so I have not got the time to learn as much as I would like about opengl and lwjgl before i start this, i have to jump straight in really, I have no choice icon_sad.gif
Anyway, I have managed to output the vertices by outputting to a raw file and I have managed to store these in an array and I can get the model to display. Now this is where my problems begin!

If I load the 3ds model using 3d studio max then it loads up textures, colours everything, just the way that my model alien should look but unfortunately if I load it up in Rhino which is what I'm using then no colours are displayed, only the mesh icon_sad.gif

Anyway, I was thinking that I could set the colour of the vertices as I'm drawing them but I would lose marks for this as it's a crap way of doing it. So basically I'm hoping that anyone could please help me out and tell me if there is code out there that I could use to either get my model from 3dsmax into my window and remember all of the vertex information so I know where each alien is,
OR if i there is a way that I could colour the model myself in rhino and then somehow export this data and load it into my lwjgl code
OR if I would be better off just using the jmonkey engine.
the jmonkey engine looks great but the thing is I am doing a final year project on making a game using lwjgl and if i use jmonkey then i think i might get crap marks as it does everything for me.

I need to somehow just get the code to do what i want otherwise i will just have to use jmonkey and say that i couldn't do it, I am not very good at opengl i will admit but i would really like to get this done.

If it cant be done though as I have tried loads of ideas such as outputting as obj file and such, with no luck, then i would like to know off someone who knows the capabilities but i'm hoping that someone will step in to save my skin.

Anyway if it can be done or if there is code, please please let me know, otherwise plz let me know and i'll use jmonkey, probably lose laods of marks but at least it will be completed

Thanks to everyone who replies
Danny icon_smile.gif

the2bears

Quote from: "ug02070"...and if i use jmonkey then i think i might get crap marks as it does everything for me.

I thought that's what you wanted :wink:

Bill
the2bears - the indie shmup blog

the2bears

My Serious reply is to apologize that I can't give you the pointers you need to get going in the right direction.  I'm using LWJGL exclusively for 2D stuff at the moment and I admit I'm absolutely an idiot when it comes to loading in models and the like.

Good luck though!  What school is this for, sounds interesting?

Bill
the2bears - the indie shmup blog

CaptainJester

There is a tutorial on loading 3DS files at http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm.  It is written in C, but it should give an idea what to do.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)