Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: which is Best 3D model file to learn and use.

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2011
    Location
    Nepal
    Posts
    7

    which is Best 3D model file to learn and use.

    Hi! every body .I just started to learn Blender and I want to design the video game teheran in Blender and load it with GLUT.So,please give me the information about which is best 3d model file that I have to choose to export in blender and easy to load and highly used.
    Thank you!

  2. #2
    Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    334

    Re: which is Best 3D model file to learn and use.

    For beginners, I would suggest WaveFront OBJ. It is supported by most 3d authoring packages, and you can find many sample models on the web.

    OBJ files are plain text, so they are relatively easy to debug, although you must write a parser to read these files. But that may be easier than parsing binary formats such as .3ds (not recommended) as they can be pretty complex. For your OBJ parser you can decide for yourself what data you need, and only implement those features.

    You can probably find OBJ parsing code samples on the web as well.

  3. #3
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: which is Best 3D model file to learn and use.

    I hate the OBJ format. I'll let you decide on what you want to use.

    http://www.opengl.org/wiki/FAQ#What_...hould_I_use.3F
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: which is Best 3D model file to learn and use.

    Quote Originally Posted by V-man
    I hate the OBJ format.
    Can you provide some clues why ? I think it has a good balance between features and complexity.

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2011
    Posts
    3

    Re: which is Best 3D model file to learn and use.

    OBJ because is very simple to load/use/debug. Almost all 3d packages support OBJ format. It has all the basic stuff you need: Position, normal, Texcoord, material information. If you need something more complex or something with animation create your own format. I wouldn't recomend you to use COLLADA, FBX etc.

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2011
    Location
    Nepal
    Posts
    7

    Re: which is Best 3D model file to learn and use.

    Thanks everyone!I have ask this question in other forum also .Many friends gave suggestion to use OBJ format,so I decided to start learning OBJ format.

  7. #7
    Member Regular Contributor
    Join Date
    Mar 2007
    Location
    CA
    Posts
    407

    Re: which is Best 3D model file to learn and use.

    Have you looked into the Open Asset Import Library? The loader is fine for cross-platform ie linux windows etc but the viewer is windows specific. If you are importing 3D models into your own GLUT code then it is a good cross platform choice.

  8. #8
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948

    Re: which is Best 3D model file to learn and use.

    OBJ because is very simple to load/use/debug.
    Except that it's not, because OBJ uses multiple indices, which is not allowed by OpenGL and D3D. So, every time you load a mesh, you have to rebuild it with single indices. Which is a big pain, and not something that most new users know how to do.

  9. #9
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: which is Best 3D model file to learn and use.

    Writing a OBJ importer is quite time consuming. It is text based which is the biggest problem. Furthermore, there are some differences between what software you use to export. I found one that would write a o at tge start and a o at the end if the object definition.

    I found that dumping indices and vertices to my own binary file is far more easier. Eventually, it went through some evolution of course.

    The biggest downside to obj is probably what Alfonse said.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  10. #10
    Junior Member Newbie
    Join Date
    Sep 2008
    Location
    France
    Posts
    17

    Re: which is Best 3D model file to learn and use.

    I think the problem of Dinesh is (was?) to find a format that is both easy to read with his own code, and easy to export with his 3D modeling software.

    There's not that many match. The old quake formats (md2, md3) were simple enough, but it's probably hard to find an exporter for blender 2.60. There's an exporter for the more recent MD5, but it's text based and slightly more complex.

    There's also the "inter-quake model format" (which comes with a blender 2.60 exporter); I've never used it so I don't know if it's complex or not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •