Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:46:55+00:00 2026-05-24T23:46:55+00:00

How can I import 3D models from 3D modelling software like MAYA into OpenGL

  • 0

How can I import 3D models from 3D modelling software like MAYA into OpenGL especially for PC rather than for Iphone development ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:46:56+00:00Added an answer on May 24, 2026 at 11:46 pm

    Maybe this surprises you, but OpenGL has no such thing qualifying as “models”. What OpenGL does is, it accepts a bunch of data and it is upon you to make OpenGL access this data so that the operations it performs on that data will result in a nice image on the screen.

    So after that introduction, let’s say you got a model, like a cube. A cube consists of 6 faces with 4 corners each. While each corner positions is shared by 3 faces each, the face direction, the so called Normal, is very different on that corner depending which face you’re looking at. Position, Normal and a few other attributes form what is known as a vertex. Thus for a cube we have 6 * 4 = 24 vertices (capital position, lower normal)

    X,   Y,  Z,  x,  y,  z
    -1, -1, -1, -1,  0,  0
    -1, -1,  1, -1,  0,  0
    -1,  1,  1, -1,  0,  0
    -1,  1, -1, -1,  0,  0
     1, -1, -1,  1,  0,  0
     1, -1,  1,  1,  0,  0
     1,  1,  1,  1,  0,  0
     1,  1, -1,  1,  0,  0
    …
    

    And so on, I hope you get the idea. Each line forms a vertex vector. The format of this vector is arbitrary. You can place those attributes (Position, Normal, etc.) in one common, interleaved array, or you use multiple arrays for each attribute in its own array. Interleaved arrays oftenly are more efficient though.

    Together with the list of vertices you also have a list of faces, i.e. tuple of vertex indices, which for a face, so in the case of a cube those tuples, designating quadrilaterals would be

    0, 1, 2, 3
    4, 5, 6, 7
    ...
    20, 21, 22, 23
    

    Loading a model means, you write some program that reads the data from a model file format (preferably a documented one, or one you came up with yourself and wrote an exporter for your modelling program for). The read data is then placed into memory in such a way as outlined above so that OpenGL can make use of it.

    You then supply this data to OpenGL. There are two options: You keep the data in your program’s process address space (Client Side Vertex Arrays), or you upload the data into a OpenGL buffer object (Vertex Buffer Object).

    Then you tell OpenGL to fetch its geometry data.

    In the case of Client Side Vertex Arrays this is done in the following way

    GLenum primitive_mode;
    GLfloat *vertex_data;
    GLushort *indices_data;
    int face_count;
    
    
    void load_model(...)
    {
        /* ... */
        read_vertex_data_from_file(&vertex_data, 
                                   &indices_data, 
                                   &face_count, 
                                   &primitive_mode, ...);
    
    }
    
    /*...*/
    
    void draw_model()
    {
        glEnableClientState(GL_VERTEX_ARRAY);
        glEnableClientState(GL_NORMAL_ARRAY);
    
        glVertexPointer(
                        3, /* we're supplying vectors of which the 3 first elements are to be used for vertex position */
                        GL_FLOAT, /* the type of each vector element is GLfloat */
                        sizeof(GLfloat)*6, /* the beginnings of vectors in vertex_data are 6 * sizeof(GLfloat) apart */
                        vertex_data + 0 /* the pointer to the data, positions are offset 0 */
        );
    
        glNormalPointer( /* normals always have 3 elements, no size given */
                        GL_FLOAT, /* the type of each vector element is GLfloat */
                        sizeof(GLfloat)*6, /* the beginnings of vectors in vertex_data are 6 * sizeof(GLfloat) apart */
                        vertex_data + 3 /* the pointer to the data, normals are offset 3 */
        );
    
        glDrawElements(primitive_mode, face_count, GL_UNSIGNED_SHORT, indices_data);
    
    }
    

    It is upon you to either implement the model loader yourself, or use some third party library for this task.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A user can import data into our website from a file. The data normally
How can I import models and views from Django Site1 to Site2 using the
I inherited form the django user model like so: from django.db import models from
I have an application fileman with models.py like so: from django.db import models from
I can import MySQLdb from the interactive python command line but Zope gives me
How can you import a new chunk of code (an Emacs lisp library) into
How can I import a variable from an external file? What I want to
Two questions: How can I import a file from a web address, without a
I have the following models code : from django.db import models from categories.models import
In django is there way to import all modules ex: from project.models import *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.