Phun - 2D physics sandbox - forum

Official Forum

You are not logged in.

#1 2009-04-03 12:11:31

Kilinich
Phuntastic!
From: Russia
Registered: 2009-02-26
Posts: 692

Animated textures

Just imagine - now we can build animated texture for anything.

http://www.phunland.com/phunbox/upload/image/18587_Earth.png
Author: Kilinich
Title: Earth (texture matrix demo)
File Size: 1.44 MB
http://www.phunland.com/phunbox/theme/img/download_bar_red_part.pnghttp://www.phunland.com/phunbox/theme/img/download_bar_blue_part.png


BR, phunners!
-over-

Offline

 

#2 2009-04-03 12:34:35

metalmuncher
Respected Member
From: UK
Registered: 2008-04-04
Posts: 129

Re: Animated textures

How do you do it? its great!


http://s5.tinypic.com/6fqh3s.jpg
http://i350.photobucket.com/albums/q427/RicH0864/MBCSig.png
http://img377.imageshack.us/img377/5985/userbar762145.gif

Offline

 

#3 2009-04-03 12:41:10

Kilinich
Phuntastic!
From: Russia
Registered: 2009-02-26
Posts: 692

Re: Animated textures

6smith wrote:

How do you do it? its great!

There is a parameters for texture in Script menu named "textureMatrix". Try to modify it to see how it works.
In particular case I've set horizontal shift depends on system.time {[x, x, x, system.time/50 ,x ,x ,x ,x, x]}


BR, phunners!
-over-

Offline

 

#4 2009-04-03 13:27:51

metalmuncher
Respected Member
From: UK
Registered: 2008-04-04
Posts: 129

Re: Animated textures

Kilinich wrote:

6smith wrote:

How do you do it? its great!

There is a parameters for texture in Script menu named "textureMatrix". Try to modify it to see how it works.
In particular case I've set horizontal shift depends on system.time {[x, x, x, system.time/50 ,x ,x ,x ,x, x]}

Oh thanks!


http://s5.tinypic.com/6fqh3s.jpg
http://i350.photobucket.com/albums/q427/RicH0864/MBCSig.png
http://img377.imageshack.us/img377/5985/userbar762145.gif

Offline

 

#5 2009-04-03 14:10:43

Kasper Hviid
Member
Registered: 2009-03-31
Posts: 19

Re: Animated textures

I wondered about the texture matrix a few minutes ago. Then it came up here. Funny.

Here is the values I understand. I could not get any reaction from the last three.


[x-size, x-distort, x-displace, y-distort, y-size, y-displace, wont-work, wont-work, wont-work]

Offline

 

#6 2009-04-03 14:40:57

Iggyhopper
Respected Member
From: CA
Registered: 2009-03-22
Posts: 151

Re: Animated textures

The last couple have to be about rotation or something, right?

Killinch, you are an excellent phunner (lol, phunner).

Game = Gamer
Phun = Phunner

Last edited by Iggyhopper (2009-04-03 14:42:01)


Tutorials: Trampoline

http://internets.tj09.ath.cx/image/1735.png

Offline

 

#7 2009-04-03 23:48:51

RBS
Post Addict
From: State of Denial
Registered: 2008-08-27
Posts: 733

Re: Animated textures

Kasper Hviid wrote:

I wondered about the texture matrix a few minutes ago. Then it came up here. Funny.

Here is the values I understand. I could not get any reaction from the last three.


[x-size, x-distort, x-displace, y-distort, y-size, y-displace, wont-work, wont-work, wont-work]

The last 3 do something with polygon textures. It's hard to say what though.

EDIT: Actually the last parameter seems to change the scale.

Last edited by RBS (2009-04-03 23:50:16)


It's hard to remember to live before you die.

Offline

 

#8 2009-04-05 18:03:24

Dakta
Post Addict
From: Behind the Play Button
Registered: 2008-10-05
Posts: 578
Website

Re: Animated textures

But does this mean that we can have animated GIFs as textures?


.          ,__,_______
.         /  __.==--"                 ""
.        /#(-'
.        `-'   From http://www.ascii-art.de/. Modded by me to work in Arial.                                                                                                                                 http://www.sloganizer.net/en/style5,Dakta.png

Offline

 

#9 2009-04-05 18:09:01

RBS
Post Addict
From: State of Denial
Registered: 2008-08-27
Posts: 733

Re: Animated textures

Dakta wrote:

But does this mean that we can have animated GIFs as textures?

No. Here the texture is all the same image just it's position on the shape is being modified.


It's hard to remember to live before you die.

Offline

 

#10 2009-04-05 19:01:36

Kilinich
Phuntastic!
From: Russia
Registered: 2009-02-26
Posts: 692

Re: Animated textures

Dakta wrote:

But does this mean that we can have animated GIFs as textures?

Well, yes we can but it's pretty tricky. You need large texture with all frames and function that will instantly switch texture position in particular time.


BR, phunners!
-over-

Offline

 

#11 2009-04-05 22:58:48

Iggyhopper
Respected Member
From: CA
Registered: 2009-03-22
Posts: 151

Re: Animated textures

Animated .gif could as well be very easy, depending on how many frames it is, and how big it is.

The file size would definitely be a problem if it was a big .gif.

What is actually going to happen is you will need file names like "img1.gif", "img2.gif", "img3.gif", "img4.gif". Play those over again by increasing and resetting the number.

There is another way, which might be easier. You will need to split up the .gif, then append all the frames into one image, horizontally. You can then edit the texture matrix, I would think that is much easier.


Tutorials: Trampoline

http://internets.tj09.ath.cx/image/1735.png

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

Phun and Phunland.com is copyright of Algoryx