Results 1 to 6 of 6

Thread: how to animate a texture !?

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    2

    how to animate a texture !?

    hello eveybody!
    I want to move a sky's texture, as if I am a tower in the sky, but for now I do not know how to animate a texture, if you know how to post your answer! it's really urgen

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2011
    Location
    Paris, France
    Posts
    281

    Re: how to animate a texture !?

    Hi,

    You can move/animate texture coordinates into a spheric or 3D texture for example.


    @+
    Yannoo

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2011
    Location
    Paris, France
    Posts
    281

    Re: how to animate a texture !?

    For to animate the clouds on the sky, you can update the content of the texture on each frame or use slices in a 3D texture (where each slice can be mapped to a sphere for to have a spherical map for example)

    You can find a tutorial for clouds generation on http://www.gamedev.net/reference/art...rticle2085.asp

    And/or use multiple textures and bind/interlace sequentially each texture one after the other (in a PAL/SECAM video, we use 25 even fields and 25 odd fields per seconds for to display a video at 50 fps)

    @+
    Yannoo

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Karachi, Pakistan
    Posts
    810

    Re: how to animate a texture !?

    Quote Originally Posted by dr death
    hello eveybody!
    I want to move a sky's texture, as if I am a tower in the sky, but for now I do not know how to animate a texture, if you know how to post your answer! it's really urgen
    If you want to move, rotate, scale your texture then u can use the texture matrix http://www.tar.hu/gamealgorithms/app02lev1sec4.html
    Regards,
    Mobeen

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    2

    Re: how to animate a texture !?

    thanks for your answers !
    My idea is to fly a robot, why I want to move the sky like fate as the animation gives the impression that the robot flies! So if you can, give me the code to animat sky ! PLZ

  6. #6
    V-man
    Guest

    Re: how to animate a texture !?

    It would be something like
    glMatrixMode(GL_TEXTURE);
    glLoadIdentity();
    glTranslatef(x, y, z);

    It isn't difficult.

Similar Threads

  1. the best way to animate
    By !!!!!! in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 07-13-2009, 02:39 AM
  2. Animate md5 model?
    By Ninja in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 05-15-2003, 04:07 AM
  3. how 2 animate
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 10-10-2002, 05:56 AM
  4. best way to animate "2D" sprite...
    By architekt in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-12-2002, 12:13 PM
  5. How to animate 2D textures ?
    By MarsuGL in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-02-2001, 11:54 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