Home Unreal Engine
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

Scroll a flipbook texture

polycounter lvl 10
Offline / Send Message
tuxmask75 polycounter lvl 10
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.

Replies

  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    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.

    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.
  • tuxmask75
    Offline / Send Message
    tuxmask75 polycounter lvl 10
    JamesWild wrote: »
    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.

    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="http://www.youtube.com/watch?v=KH9KSi8bFpo&list=HL1356747284&feature=mh_lolz"]GHZ 2.5D Build 11 Features showcase (Sage 2012) - YouTube[/ame]
  • imbueFX
    Offline / Send Message
    imbueFX polycounter lvl 5
    Hey Tux,

    Have you tried setting it up like this?

    http://youtu.be/D75jXs0d6WI
  • tuxmask75
    Offline / Send Message
    tuxmask75 polycounter lvl 10
    yeah actually, I did :P

    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
  • imbueFX
    Offline / Send Message
    imbueFX polycounter lvl 5
    Out of curiosity, why didn't you go that route? Was it because you wanted more specific control through a parameter?
  • tuxmask75
    Offline / Send Message
    tuxmask75 polycounter lvl 10
    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
  • imbueFX
    Offline / Send Message
    imbueFX polycounter lvl 5
    Gotcha, glad you got it going though!
Sign In or Register to comment.