Results 1 to 5 of 5

Thread: How to read models from different files and arrange them in a scene?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2006
    Posts
    4

    How to read models from different files and arrange them in a scene?

    I want to read some models from diefferent files and want to arrange them in a scene.Is there any convenient way to do?
    If I want to adjust models' size and position relatively,what should I do?
    Thank you!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: How to read models from different files and arrange them in a scene?

    Get yourself a tutorial on transformations in OpenGL (google or this website for example).

    You do something like this in your rendering code:
    Code :
     // For each model you want to render
     glPushMatrix();
     glTranslate( ...);
     glScale( ...);
     // render one model here
     glPopMatrix();
    And repeat for each model, you can of course also put in a glRotate( ...) when you need to rotate your model, make sure you put the rotate/translate/scale calls in the correct order depending on the effect you want.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2006
    Posts
    4

    Re: How to read models from different files and arrange them in a scene?

    mikael_aronsson,thanks for your help.But I have another question,is it possible to change the model itself which i want to read,other than change the view-model matrix or projection matrix. For example, how to use program to change the model from 3ds file?

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2004
    Location
    Delhi
    Posts
    2

    Re: How to read models from different files and arrange them in a scene?

    U can do this,
    first u need to make a common data structure which can represent the scene, (can think of scene graphs); then try building the translators.. which can convert all u'r files into this data structures.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2006
    Posts
    4

    Re: How to read models from different files and arrange them in a scene?

    I don't understand your meaning exactly.Would you please say it in more details?
    Thank you!

Similar Threads

  1. How to read the .spec files (for transformation)
    By Veksi in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-14-2010, 10:47 PM
  2. how read colors in .3ds files ?
    By airseb in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-14-2005, 07:16 AM
  3. how to read 16bit targa files?
    By urban debugger in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 10-17-2002, 03:44 PM
  4. HOW CAN I READ DXF FILES??THANKS!!!
    By simba in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-07-2002, 10:40 PM
  5. Read *.dat files
    By Nico in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 06-13-2000, 06:47 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