3D item to code
-
Is there a way to import an object created with a 3d-modeling program (ex. Google Sketchup) to an OpenGL application and use it? If yes what file type must it be (.obj?) and how? I'm new at this :)
-
Is there a way to import an object created with a 3d-modeling program (ex. Google Sketchup) to an OpenGL application and use it? If yes what file type must it be (.obj?) and how? I'm new at this :)
Lampros G wrote:
Is there a way to import an object created with a 3d-modeling program (ex. Google Sketchup) to an OpenGL application and use it?
In most cases people try not to reinvent the wheel, there are numerous tutorials on how to write a .obj loader for OpenGL to display it, even a couple that included material and surface normals. But then you get into rewriting what others have done for model loading for years. When you get to this point, I would recommend (you don't have to if you don't want to), switch to your openGL code on a higher level library/framework. This might be SDL, Open Scene Graph, Delta3D (highly recommended). Just as an example, Delta3D is based on OpenSceneGraph which is based on OpenGL. It loads: 3dc ac3d directx dw flt geo Inventor ive lib3ds logo lwo lws md2 obj osg pfb
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)