- Home /
Animating from texture to texture
Hey guys! I had hard time figuring out the title... I think a vid will be easier to understand than my text. Basically what I want to do is change textures (and some other things) when a key is pressed. Changing texture is a cake but what I want is harder.
I kinda don't know which way to go, so I would really appreciate help :).
David
Ugh, okay that was painful to watch. The reviewer seemed as bored out of her $$anonymous$$d as I was watching. About a $$anonymous$$ute in.
So? I mean, did you get what kind of thing I want? If you want to suggest new title, just write it.. But I really don't know which way to go, and the reviewer is the creator itself.
Yes, I was writing my answer. Next time you post a video, including a timestamp would help.
Checked the byline, yes, she's the Creative Director. Seemed even more bored. That's the trouble with puzzle games - pretty boring after you've play tested the exact same scene 50 times.
Lol, yeah.. There is a timestamp, I added it just after post, but you were faster :D.
Answer by Waz · Aug 30, 2011 at 10:13 AM
Looked like an textured threshold wipe to me. One way to do that, you need to use a shader (just during the transition) that takes 3 textures: A, B, and a greyscale texture with a smooth ramp from black to white, plus a threshold control choosing whether to use the sample from A or B (if ramp is less than threshold, use A, else use B). Animate the threshold from 0 to 1, then switch the material back to a simple shader just using texture B.
The shader itself is pretty trivial to write if you just base it on one of the existing shaders, which will depend on your actual case. You might, for example, only change between two base (RGBA) images, or you might also need to swap normal maps, or whatever.
Gotcha.. Hmm.. Yeah so when the "C" is black show A, when white show B, and then I can animate C however I want..But what about global? Because I have a scene with many objects that are moving, and I want the whole scene to animate seamlessly... Like imagine a line co$$anonymous$$g from one side of scene to another leaving everything swapped... $$anonymous$$aybe painting on collision? I will think about it.. I'll write later when I figure something out.
Thanks for help :), but I figured it out bit differently...I don't have to make a big transition at all. What I do is I change a static var color, that is used by every object. And what the color does is it fills up every white space on scene, like specular stuff, or white textures and it looks quite better, I will post a link so you guys can see :)
This textured threshold wipe sound exactly like something I need... however I'm a complete noob when it comes to shaders and have no idea how to achieve something like that. If you read this can you somehow help me with this problem?