x


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.

Quantum Conundrum Demo Vid

I kinda don't know which way to go, so I would really appreciate help :).

-- David

more ▼

asked Aug 30 '11 at 09:02 AM

Dávid Debnár gravatar image

Dávid Debnár
730 42 47 54

Ugh, okay that was painful to watch. The reviewer seemed as bored out of her mind as I was watching. About a minute in.

Aug 30 '11 at 09:59 AM Waz

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.

Aug 30 '11 at 10:07 AM Dávid Debnár

Yes, I was writing my answer. Next time you post a video, including a timestamp would help.

Aug 30 '11 at 10:14 AM Waz

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.

Aug 30 '11 at 10:18 AM Waz

Lol, yeah.. There is a timestamp, I added it just after post, but you were faster :D.

Aug 30 '11 at 11:46 AM Dávid Debnár
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 30 '11 at 10:13 AM

Waz gravatar image

Waz
6.4k 22 33 70

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 coming from one side of scene to another leaving everything swapped... Maybe painting on collision? I will think about it.. I'll write later when I figure something out.

Aug 30 '11 at 11:52 AM Dávid Debnár

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 :)

Aug 31 '11 at 08:25 AM Dávid Debnár

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?

Nov 29 '12 at 09:09 AM Malygon
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2194
x811
x262
x103
x18

asked: Aug 30 '11 at 09:02 AM

Seen: 1286 times

Last Updated: Nov 29 '12 at 09:09 AM