GLBasic forum

Main forum => GLBasic - en => Topic started by: djtoon on 2010-Aug-22

Title: animated textures and video as background
Post by: djtoon on 2010-Aug-22
is three a way to use animated textures ?
and
is there a way to load a video and draw on top of it 3d objects?
10x
Title: Re: animated textures and video as background
Post by: Schranz0r on 2010-Aug-22
Try VIEWPORT to "animate" your texture!
Title: Re: animated textures and video as background
Post by: Quentin on 2010-Aug-22
Think he's looking for animated textures for 3D objects. Try X_SETTEXTUREOFFSET for this. Use one texture with your animated steps
Title: Re: animated textures and video as background
Post by: Schranz0r on 2010-Aug-22
i think he wants to animate a texture like a speaking mouth...
Title: Re: animated textures and video as background
Post by: Quentin on 2010-Aug-22
hmm, guess we should ask him what he really wants   =D
Title: Re: animated textures and video as background
Post by: Schranz0r on 2010-Aug-22
maybe!  :good:
Title: Re: animated textures and video as background
Post by: matchy on 2010-Aug-23
Quote from: djtoon on 2010-Aug-22
is three a way to use animated textures ?
and
is there a way to load a video and draw on top of it 3d objects?
10x

To cycle animated existing set of textures, load them in to an array an cycle through them.
To project a movie on to a 3D or poly, convert each frame to png and buffer load them. Perhaps there is another way and I would be very, very interested to know.
To created texture in real-time, Schranz0r VIEWPORT suggestion is interesting because I have not tried that, but generally you can reserve a sprite by CREATESCREEN and USESCREEN to draw on in loop.
  ;)
Title: Re: animated textures and video as background
Post by: Quentin on 2010-Aug-23
sure you can use X_SETTEXTUREOFFSET  for aminations, if you set the texture coordinates well and use a texture with the animation frames.
Title: Re: animated textures and video as background
Post by: djtoon on 2010-Aug-23
well iwas thinking about loading an mpeg and useing it as a texture but :( no
Title: Re: animated textures and video as background
Post by: matchy on 2010-Aug-23
Quote from: djtoon on 2010-Aug-23
well iwas thinking about loading an mpeg and useing it as a texture but :( no
Now that would be awesome.
Title: Re: animated textures and video as background
Post by: Kitty Hello on 2010-Aug-24
You can't load video files. You can however load a set of images and set the correct texture for each showscreen with a simple MOD(GETTIMERALL()/100, number_of_frames)
Title: Re: animated textures and video as background
Post by: Ian Price on 2010-Aug-24
Rather than loading a video file, can you not play the video onto a virtual/hidden screen and grab the screen for use as a texture?
Title: Re: animated textures and video as background
Post by: Marmor on 2010-Aug-24
its too slow imho , my tipp is hack your avi into  bmp (avi2bmp.exe) and play the image game