Importing Models Into A OpenGL Project

后端 未结 4 883
别那么骄傲
别那么骄傲 2021-02-04 08:41

I am taking an OpenGL course and we have the option to create models to use in our assignments with a 3D modeling application, like Maya or Blender.

I am not

4条回答
  •  我寻月下人不归
    2021-02-04 09:10

    I'd suggest not worrying about the scale of the objects for right now.

    Now, the thing you're going to have to do is settle on a format for the 3D file. There are MANY options when exporting from a 3D program like Maya or Blender.

    Might I recommend attempting a simple COLLADA importer. Specification information is here: http://www.khronos.org/files/collada_spec_1_4.pdf

    Another spec I've been using lately would also probably be suitable for this is OBJ.

    The specification for OBJ is located here: http://local.wasp.uwa.edu.au/~pbourke/dataformats/obj/

    Also, there are several free sample 3D OBJ files located here. This will allow you to see the format of the files and really see how easy they can be to parse.

    Keep in mind, OBJ can not support animation, and it is rather inefficient for rendering large scenes.

提交回复
热议问题