3D models with C++ OpenGL
#1
Posted 24 October 2009 - 03:47 AM
I have been trying to learn from the VideoTutorialRocks website but I find it doesn't teach everything I think I need to know. I don't like Nehe because they use glaux...
I want to learn from scratch how to build my own 3D model loader, texture loader and viewers but I do not know how I should attempt to do this. I do know that I need information about the file types I want to use but beyond that and trying to code it is puzzling me. I do think it is beyond my current c++ level but I need to learn somehow.
Also right now I am using VS C++ 2008 EE but I will be trying to do my programming on the new Ubuntu 9.10 so I want to keep my code multi-platform compatible as much as possible.
Thanks a lot for taking the time to read this and for any help you provide! I really want to develop FOSS but I need to get the skills first.
#2
Posted 24 October 2009 - 04:10 AM
#3
Posted 24 October 2009 - 04:39 AM
Is there any particular part of the problem where you are getting stuck?
#4
Posted 24 October 2009 - 08:49 AM
source code fragments, i am also improving and adding details to my model loader / optimizer.
May i give you and advice ? first of all build a robust mesh data structure to hold the 'parsed' file data , then you can specialize ( sp ?? ) when you have to load different file formats, same story for textures, many models include bmp or jpg texturs, so you need to add different image loaders for every different model.
#5
Posted 24 October 2009 - 05:53 PM
poita: The main issue I have had while trying to use any of the sample code for importing models and textures is - LNK2019.
error LNK2019: unresolved external symbol "int __cdecl LoadBitmap(char *)" (?LoadBitmap@@YAHPAD@Z) referenced in function "public: void __thiscall Game::init(void)" (?init@Game@@QAEXXZ) Game.obj
fatal error LNK1120: 1 unresolved externals C:\Documents and Settings\Luke\Desktop\Class_openGL_3dsbmp\Debug\Class_openGL.exe 1
These errors happen with my obj, md2 and attempt to us 3ds. If you want to see my code I can try to send it to you in a bit.
#6
Posted 25 October 2009 - 02:59 PM
If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D
#7
Posted 25 October 2009 - 03:25 PM
Is LoadBitmap a windows function? You'll need to link the windows PSDK if it isn't done automatically (which I know VC++ Express didn't do at some point).
#8
Posted 25 October 2009 - 05:33 PM
#9
Posted 27 October 2009 - 06:09 PM
#10
Posted 03 November 2009 - 03:08 AM
edit: I didn't realize I had to include memory.h lol so I now have my obj loader working with netbeans on Ubuntu. Does anyone know how animating works with c++ and obj files?
#11
Posted 03 November 2009 - 06:48 PM
#12
Posted 03 November 2009 - 07:30 PM
#13
Posted 04 November 2009 - 02:25 AM
#14
Posted 04 November 2009 - 07:28 AM
For loading skeletal animation data, it's also a lot of work. I'm in the finishing phases of writing a Collada animation loader and that's around 1000 lines of code alone. However, plain animation sequence loader is pretty poor system alone and you need few other components for comprehensive skeletal animation system.
#15
Posted 04 November 2009 - 12:42 PM
#16
Posted 04 November 2009 - 01:02 PM
Edit: Just for clarification, I mean obj format doesn't support skeletal animation for characters. You can of course animate rigid body objects with physics for example.
#17
Posted 04 November 2009 - 02:15 PM
I can rig the model in a 3D program but how can I make use of that? Do I need to load the bones as parent/child 3D models inside the obj character model to make it animate?
#18
Posted 04 November 2009 - 03:15 PM
#19
Posted 04 November 2009 - 03:36 PM
What other model file formats support animations? or should I just Google that too? I want to make sure that this is all OpenGL and Blender compatible too.
#20
Posted 04 November 2009 - 03:46 PM
I have a new issue. I have to get a new model loader for .dae now.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












