2

I want to create a robot and want to move it in OpenGL. I will create the model in 3DsMax. I was wondering about importing and moving it in OpenGL.

In which format should I save my file in 3ds Max so that I can import it in OpenGL?

Should I use pivots or save each part of the robot as a seperate file? Does OpenGL support pivots?

Bart
  • 19,692
  • 7
  • 68
  • 77
require_once
  • 1,995
  • 3
  • 21
  • 29
  • You don't say what language/environment this is for either. For example, if you're using C++, you can import the library with AssImp. However *you* still need to provide all of the code to correctly draw it. I think perhaps don't run before you can walk. Loading in a 3D model and drawing it with OpenGL is not a trivial exercise. – Robinson Mar 17 '12 at 15:46

1 Answers1

9

OpenGL has surprisingly little to do with the answer. OpenGL is only used to draw your geometry. It is not a rendering/game engine/scenegraph in itself. Therefore loading a mesh and animating it is something you should take care of, subsequently informing OpenGL what it has to draw.

You can however make your life a bit easier by looking for OpenGL based rendering/game engines/scenegraphs out there that already provide the support you desire. But you'll have to take a look at that yourself. Then export your mesh in whatever suitable format your engine supports. OpenGL itself holds no relevance to whatever file format you wish to use. If you or your engine can deal with it and get all the relevant information out of it, you can use it.

Bart
  • 19,692
  • 7
  • 68
  • 77
  • 1
    can i perform anumating like moving the arms etc in open gl? – require_once Mar 17 '12 at 15:13
  • 4
    Yes and no. In a sense what you're asking is "can I paint Rembrandt's Night Watch with this brush". The answer is "yes", but it's not the brush itself that will let you do it. In a similar sense OpenGL provides you with the means to draw and partially manipulate meshes, but it in itself does not give you the functionality to animate. If this is your first step into OpenGL, I would recommend you read [this excellent online book](http://www.arcsynthesis.org/gltut/) to get a bit more of an idea what OpenGL really is. – Bart Mar 17 '12 at 15:19
  • @Bart before that i created models in opengl by using built in functions like GL_LINE etc and i moved them by gltranslate but this is the first time I am using another tool to create the models (3dsMax) and then importing it in opengl.I was wondering that do i need to put some attention while creating model in 3dsMAx.I mean if i develop a model and later i cam to know Ah this can't be imported in open gl etc.that's why i need some suggestions from you – require_once Mar 17 '12 at 15:30
  • 1
    The format is unimportant for OpenGL. It's important for the engine you use or are going to write. You need something which will store all relevant information (mesh, skeleton, animation data, etc.) you need to animate your model. Then it's up to you to load it in your appropriate data structures and use that to tell OpenGL what to draw. Given your experience however, I would really advice you to read the book I linked to and especially with regards to positioning. What you'll end up doing for your robot is not a single transformation, but a whole hierarchy of them. So start simple. – Bart Mar 17 '12 at 15:39