Texture Animation

Started by
1 comment, last by Blue*Omega 23 years, 6 months ago
I heard once that in OpenGL there was a way to kind of "cut and past different parts of a texture over eachother. For example: have a texture that has a face and several different mouths across the bottom. I''d like to be able to switch between these mouths buy simply copying them over the original one. Any ideas how? ----------------------------- Blue*Omega (Insert Witty Quote Here)
// Tojiart
Advertisement
well this might not be the exact solution you are looking for but it seems to me that you could achieve this effect very easily if the top of the face and the mouth are on seperate polygons - all you would have to do is change the texture coordinates for the polygons with the mouth on it. Perhaps I misunderstood the question... this seems too simple, but the simple solutions are usually the best, right?. It sounds like a lot of hassle to cut and paste bits of textures over each other but now that I think about it, it could be useful - I suppose you have to know how to get the rgb information for a specific pixel in a texture, and also how to change this data so you can make one specific pixel the same as another (perhaps here I am missing an easier solution) - being able to create composite textures like this could save loads of texture memory. Say you have three different plain stone textures and a brick texture, you could get the lines that seperate the bricks and paste them onto your stone textures and use these composite images as different types of brick, otherwise you would have to store another three textures for the different types of brick - unfortunately I don''t really know how to go about this either!

Geocyte Has Committed Suicide.
Geocyte Has Committed Suicide.
Sorry cant remember exactly but I think you looking for something like, glReplaceImage() or glSubImage().

This topic is closed to new replies.

Advertisement