Author Topic: About animating textures.  (Read 3239 times)

Offline Wolf17

  • int
  • **
  • Posts: 77
    • View Profile
About animating textures.
« on: November 14, 2012, 11:53:37 pm »
Is it Possible to animate Textures of 3d object so that i can show something like progress bar etc?If so  then How and can i have a code snippet or/& link for the same?

Offline KittenKoder

  • int
  • **
  • Posts: 66
  • I Am No One Else
    • View Profile
    • Kitt Games Wiki
Re: About animating textures.
« Reply #1 on: November 15, 2012, 04:12:21 am »
I know the PC jPCT has not native method, not sure about AE though.

I created a texture sequence class, which holds a list of texture names and textures as well as other information about the animation, then the animation system for the object just "flips" to the next texture after some time has passed based on the sequence settings. Sort of like a movie.
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.

Offline Wolf17

  • int
  • **
  • Posts: 77
    • View Profile
Re: About animating textures.
« Reply #2 on: November 15, 2012, 06:11:07 am »
thanks for the reply ,
do you think that paulscode gif animator would fulfill my task ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: About animating textures.
« Reply #3 on: November 15, 2012, 08:27:49 am »
I'm not sure if a progress bar has to be done by using an animated texture. Why not simply use a scaled or truncated blit of a static texture for that?

Offline Wolf17

  • int
  • **
  • Posts: 77
    • View Profile
Re: About animating textures.
« Reply #4 on: November 15, 2012, 08:56:41 am »
sir,
can u please tell me how? . the truncation of texture ...

And yes its not exactly like progress bar i want to achieve . What I exactly want to do is hologram like plane containing texture like in dead space game etc ... which can be animated when triggered.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: About animating textures.
« Reply #5 on: November 15, 2012, 08:57:30 pm »
sir,
can u please tell me how? . the truncation of texture ...
Just blit only a part of the texture using the blit-methods in FrameBuffer.

Offline Wolf17

  • int
  • **
  • Posts: 77
    • View Profile
Re: About animating textures.
« Reply #6 on: November 15, 2012, 09:50:57 pm »
And,   if I want to make something like explosion effect etc ? sir..

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: About animating textures.
« Reply #7 on: November 15, 2012, 10:08:46 pm »
You can add multiple explosions to one texture and either blit them one after the other in some animation loop (if they don't belong to an object) or assign that texture to a plane and either change the texture matrix or the uv-coordinates to do the animation. For example, all explosions in the video are done that way: http://www.youtube.com/watch?v=7vwhszWvzj8