3D Model Loader

Started by
25 comments, last by Surfman19 17 years, 9 months ago
Quote:Original post by Surfman19
hey,

thx, now its works fine;) why do you define a const int MAX_OBJECTS? my texture is a .bmp and it only works with GL_BGRA at the glTexImage2D!

bye


I use MAX_OBJECTS to set the array length. It is a value I use often, so it is easier to set it once than reading the whole code and change every occurrence.

And about GL_BGRA vs. GL_RGB that's strange... I got a seg fault without it, but it could have been another point of the code. It seems that your .bmp is a 32 bit image (what is the pourpose of the .jpg, by the way?) so you're right: GL_BGRA should be the correct flag. But I would expect you to use 4 bytes in the texture creation function, not 3...
Well, the important thing is that it works. Understanding also 'how' and 'why' would be asking too much ;-)
Advertisement
hey,
my .bmp is a 32 bit image!! first i thought i could use .jpg too;)

3ds is not right format for animation? where do you use your 3ds loader, in a game? how about Bone-Animation aka Skinning?

bye
hi,
i want to made a 3d model with bone animation! does someone has some good tutorials or informations about?

bye
Quote:Original post by Surfman19
hey,
my .bmp is a 32 bit image!! first i thought i could use .jpg too;)

3ds is not right format for animation? where do you use your 3ds loader, in a game? how about Bone-Animation aka Skinning?

bye


I wrote the 3ds loader because I was bored by trianges and cubes. But pretty soon I was annoyed by some limitations of the format, so I'm writing a script for lightwave to export the models to a custom format.
I think that you may try COLLADA or X formats: they seem to be supported by most 3d apps and should support all the features you need (and many more).

EDIT: if you want to make creatures with animations, why not giving a look to MD2/MD3 (quake formats)? They appear to be widely used for this task, though I'm not sure how they model the charachters because I don't think 3ds, lw, maya and others provide a md2 exporter (but perhaps blender or milkshape do).
Quote:Original post by Surfman19
hi,
i want to made a 3d model with bone animation! does someone has some good tutorials or informations about?

bye


You should have a look at the Cal3D Library ( http://home.gna.org/cal3d ). It is a C++ library to load 3D models (from 3DS or others) and performs bones animation. It works transparently with OpenGL and DirectX. Tutorials are included.
jma
hi, thanks a lot jmaupay, i will take a look on it!

by the way .md2 format use key frame animation! i think .md5 use bones animation!?

bye
hi, i need more information, turorials about Skeletal/Bone Animation!! does someone has good resources?

bye

This topic is closed to new replies.

Advertisement