I've spent all day attempting to get a flip book texture to pan and also play its animation at the same time without any luck.
Anyone done this before?
What i'm wanting to do is use flipbook for water or magma Plus have it pan.
I think that a flipbook is internally stored as one texture and changing which "page" you are viewing just alters the UVs to focus on a specific area.
This means you're going to have to wrap the UVs yourself because otherwise it'll just bleed onto the next animation tile in the direction you're scrolling.
It becomes crazy complex, you'll have more luck doing all the UV work manually.
I assume you're doing Sonic-esque scrolling animated water. Lay your animation tiles out in a horizontal strip.
Texture Coordinate -> component mask (R) -> multiply by number of frames -> frac -> add (time->multiplied by frame rate->floor) -> divide by number of frames
Texture coordinate -> component mask (G) -> add time
Append the two together, feed as uv input to your texture sheet
Totally untested, but done something similar for a counting clock before.
I think that a flipbook is internally stored as one texture and changing which "page" you are viewing just alters the UVs to focus on a specific area.
This means you're going to have to wrap the UVs yourself because otherwise it'll just bleed onto the next animation tile in the direction you're scrolling.
It becomes crazy complex, you'll have more luck doing all the UV work manually.
I assume you're doing Sonic-esque scrolling animated water. Lay your animation tiles out in a horizontal strip.
Texture Coordinate -> component mask (R) -> multiply by number of frames -> frac -> add (time->multiplied by frame rate->floor) -> divide by number of frames
Texture coordinate -> component mask (G) -> add time
Append the two together, feed as uv input to your texture sheet
Totally untested, but done something similar for a counting clock before.
Already attempted something similar to that, without using the flipbook texture, did not work out so well.,
Will give it a try thanks...
I have another idea , using my sprite animation system that i built in kismet, It uses individual textures that change instead of scroll like flipbook,
I could than just scroll that perhaps.
Also yeah I'm working on 2 sonic projects,, how did you know ? lol
The sprites for sonic are done with large scrolling textures. horizontal and vertical rows.
Enemies are done by changing individual textures with kismet.
well that and , the limitations of flip book itself.
bumped into issues where 2 flipbook material instances of a master would all play the same FPS , and or frames of the master material, even if the flip books were set up to have different play speeds and have different frame counts.
( actually i could not get the scrolling to work, of the animated strip) (scroll of an already scrolling texture)
I gave up on that matter. X__x
Replies
This means you're going to have to wrap the UVs yourself because otherwise it'll just bleed onto the next animation tile in the direction you're scrolling.
http://www.polycount.com/forum/showthread.php?t=91942
It becomes crazy complex, you'll have more luck doing all the UV work manually.
I assume you're doing Sonic-esque scrolling animated water. Lay your animation tiles out in a horizontal strip.
Texture Coordinate -> component mask (R) -> multiply by number of frames -> frac -> add (time->multiplied by frame rate->floor) -> divide by number of frames
Texture coordinate -> component mask (G) -> add time
Append the two together, feed as uv input to your texture sheet
Totally untested, but done something similar for a counting clock before.
Already attempted something similar to that, without using the flipbook texture, did not work out so well.,
Will give it a try thanks...
I have another idea , using my sprite animation system that i built in kismet, It uses individual textures that change instead of scroll like flipbook,
I could than just scroll that perhaps.
Also yeah I'm working on 2 sonic projects,, how did you know ? lol
The sprites for sonic are done with large scrolling textures. horizontal and vertical rows.
Enemies are done by changing individual textures with kismet.
[ame="
Have you tried setting it up like this?
http://youtu.be/D75jXs0d6WI
Ended up making a custom material with scaler params that scroll a texture strip.
Can play frames in any order threw the power of matin
bumped into issues where 2 flipbook material instances of a master would all play the same FPS , and or frames of the master material, even if the flip books were set up to have different play speeds and have different frame counts.
( actually i could not get the scrolling to work, of the animated strip) (scroll of an already scrolling texture)
I gave up on that matter. X__x