Results 1 to 6 of 6

Thread: 3d Studio Max importing!?

  1. #1
    Member Newbie
    Join Date
    Jan 2001
    Location
    Plymouth,NH
    Posts
    40

    3d Studio Max importing!?

    I need a straight forward approach to get my 3d studio max images into my open gl program. I've tried converters but I don't know what everything is for and what I need, do I need faces, meterails, ect? Can anyone shine some lite on this subject?

  2. #2
    Member Contributor
    Join Date
    Mar 2000
    Posts
    94

    Re: 3d Studio Max importing!?

    Export them in .ASE format. This is a text file with all the info you need to recreate your model in opengl. Then just write a text parser for this file to read in and store the info. Simple as that. Search for ASE file format if you don't understand what the file means (or this board)

  3. #3
    Member Newbie
    Join Date
    Jan 2001
    Location
    Plymouth,NH
    Posts
    40

    Re: 3d Studio Max importing!?

    I understand that, the problem I am having is how to use all those values in my program. I have all the vertex's and faces, ext...but I don't know how to involve those in my code.

  4. #4
    Member Contributor
    Join Date
    Mar 2000
    Posts
    94

    Re: 3d Studio Max importing!?

    Here's a simple approach.

    1-You have a list of vertices.
    2-You also have a list of faces.
    (I assume you've already read all this info from the file and stored it in an array or something)


    Each face has a list of 3 numbers.
    These are the different vertex points to use for "that" individual triangle.

    Each face is a triangle composed of 3 points.

    If for face 0, you have 7, 8, 1, this means look at your previous list of vertices
    and use the values for vertex 7 (some x, y, and z value), vertex 8 (yet another x, y, and z value) and vertex 1 (the third x, y, and z ) value.

    Voilla! You now have a triangle drawn from your model. Just loop through all the faces and construct the triangles from the vertex index values provided for each face.

    And you have your whole model.

    Trivial (not efficient) would be just a loop the cycles through all the face values. You'll read these 3 values in each loop. Then take these valiues and get the corresponding vertex numbers (an x,y,and z coordinate) for each value. Then draw a triangle with these 3 points.

    I learned all of this from http://nate.scuzzy.net/docs/ase.html

    Hope it's clearer

  5. #5
    Member Newbie
    Join Date
    Jan 2001
    Location
    Plymouth,NH
    Posts
    40

    Re: 3d Studio Max importing!?

    Yes that makes it a lot clearer. Another thing is how about the color, how can I keep the same textures and colors I have in my model? Also, like is says on http://nate.scuzzy.net/docs/ase.html do I have to reverse the values when I read them in from say an ASE file, does 3d studio max have a different XYZ plane then openGL?

  6. #6
    Member Contributor
    Join Date
    Mar 2000
    Posts
    94

    Re: 3d Studio Max importing!?

    Yeah, you can export textures info and the mapping coordinates, normals, etc.. (I'm pretty sure color too) Texture mapping your triangles works nearly the same way as drawing them.

    1-You have a list of Texture vertics
    2-You also have a list of Texture Faces

    Just match them up as before.

    Start small though. Get the model in there first..Then try to add loading the texture vertex/Face values...Then normals etc...

    When you export the ASE, I think you check the "Generate Mapping Coordinates", "Normals", etc..options. Just check whatever you want and it will appear in the ASE file (look for yourself).


    The Y and Z values are switched. I guess it's how you look at it. It's all about what coordinate system you use. 3D Studio Max uses a different system then how I set it up in OpenGL. Your model will still load, It will just look strange.

    I found that by switching the Vertex Y and Z, (from your list of vertices) my models would look correct.

Similar Threads

  1. Importing .OBJ with GLM
    By karko in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-30-2010, 11:06 AM
  2. Replies: 10
    Last Post: 10-27-2006, 09:05 AM
  3. Importing DXF
    By Mr.Freeze in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 01-31-2002, 01:02 AM
  4. 3d studio max importing
    By detzel in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 01-23-2001, 07:53 AM
  5. Importing 3D studio max models
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-07-2000, 04:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean