Scrolling Tiled Animated Distortmap

Post your own tutorials, guides and demos.

Post » Fri Jun 17, 2011 7:29 pm

This is an example of how to make a animated sprite distortmap tile using U&V, and scroll using pv's.
The thing to remember is your distortmap columns/ rows must equal the size of the scaled size divided by the size of the original texture. In this case 512/128, or 4.
But you must also remember that a distortmap starts at 0, so when you set the columns/ rows subtract one from the total to take that into account.
Then you also have to set the loop to reflect that, 0 to 3, instead of 1 to 4, etc.
Note you will need Lucid's Math Plug( link below) to open the cap.
The lerp used to interpolate the texture uses Get T which make it much easier to get a percentage from 1 to 100 from the loopindex.

[url:21foai52]http://dl.dropbox.com/u/666516/tiled-distortmap-scroll.cap[/url:21foai52]

Math Plug:
[url:21foai52]http://www.scirra.com/forum/viewtopic.php?f=29&t=9155[/url:21foai52]

Its not exactly easy, and you cant just use any texture since you cant have floats in columns/ rows, but the results are kind of nice with all the vram saved, and it is capable of animation.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Fri Jun 17, 2011 7:54 pm

Wow....I think I feel seasick :o
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,849
Reputation: 48,299

Post » Fri Jun 17, 2011 9:21 pm

*look at the cap inside*
*starts pooping bricks and vomiting ranbows*
B
16
S
5
G
4
Posts: 211
Reputation: 3,767

Post » Fri Jun 17, 2011 9:33 pm

Careful now, wouldn't want to make a double rainbow.
Course that's another plug altogether.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Fri Jun 17, 2011 10:43 pm

Wow :shock: Nice effect newt :wink:
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Sat Jun 18, 2011 5:01 am

[quote:begkhcrf]Careful now, wouldn't want to make a double rainbow[/quote:begkhcrf]
:D anything but that!
B
16
S
5
G
4
Posts: 211
Reputation: 3,767


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests