Jump to content
  • Advertisement
Sign in to follow this  
ManTis

animated textures

This topic is 5409 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I wanted to ask is it possible (and in which model formats) to have simple animated textures on them (I'm thinking about blinking eyes a'la Mario64, or changing screen on tv).

Share this post


Link to post
Share on other sites
Advertisement
Hi!

If you have a periodically changed texture, like a traffic light or something, you can load all the different stages and bind them one at a time. This also works with videos, but it'll use up alot of memory.

Hope that helps!

Cheers,
Drag0n

Share this post


Link to post
Share on other sites
and what if I'd like to have couple different animations, but of facial regions only. do I have to always load whole new texture?

Share this post


Link to post
Share on other sites
Basically there are a few ways.

1) For short animations (1-10 frames)
You can either store all the 10 frames in 1 big texture and then change the UV coordinates to display the next frame. Or you can create 10 diff textures and bind the corresponding texture before rendering your model.

Eg
glBindTexture(1);
RenderModel();
then
glBindTexture(2);
RenderModel();

2) Large animations
I once made a format for displaying video(any size), they way i displayed it was to use glTexSubImage2D and upload the next frame. This is probably the fastest way i can think of for large animations where preloading all the frames as a texture will eat up way too much video memory.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!