Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Lo-res Water Demo

    Creation share codes
    6
    8
    481
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vinicity
      vinicity F last edited by vinicity

      I stumbled across this article:

      https://web.archive.org/web/20160418004149/http://freespace.virgin.net/hugo.elias/graphics/x_water.htm

      ...and I thought I would have a go at implementing a water ripple effect in Fuze.

      So this is the result! The uploadImage() function made the whole thing very easy to implement. The performance wasn’t the best, though, so I had to scale down the image a lot. I currently get about 10 fps for an image with size 42 * 24 pixels. I then scale up the image to full screen.

      Actually, the uploadImage function is pretty fast, the bottleneck is the amount of calculations needed to calculate averages for each pixel.

      I originally had the code below 50 lines, but now it’s slightly bigger since I added in a lot of explanatory comments. Control the ripples with the touch screen!

      ID: 4F863MND5C

      1 Reply Last reply Reply Quote 15
      • L
        LucasJG25 last edited by

        Really Nice! Keep up the good work.

        1 Reply Last reply Reply Quote 1
        • JMM161437
          JMM161437 F last edited by

          hmm I wonder if this can be converted into height mapping for terrain... wonderful job I love the effect!

          vinicity 1 Reply Last reply Reply Quote 1
          • vinicity
            vinicity F @JMM161437 last edited by

            @JMM161437 said in Lo-res Water Demo:

            hmm I wonder if this can be converted into height mapping for terrain... wonderful job I love the effect!

            Thanks! Feel free to use the code if you want to!

            1 Reply Last reply Reply Quote 1
            • JMM161437
              JMM161437 F last edited by

              Thanks @vinicity!

              1 Reply Last reply Reply Quote 0
              • Gothon
                Gothon F last edited by Gothon

                This demo is too good for me to ignore the possibility I saw of making it high resolution using blend mode arithmetic to get the GPU to do the heavy lifting. I sort of had it working but due to the low bits of precision and GPU rounding I couldn't get the waves to damp. The ripples would just propagate and reflect until the screen was filled with static noise. However, I just now discovered a way to damp the waves with the threshold render effect.

                So now I have the demo working at 60fps at the full 720p resolution. The calculations aren't perfect because the pixels (probably) have only 8 bits per colour channel so the ripples don't get big enough to fill the screen and bounce off the edge. Even so, the result was too mind blowing to not share it.

                High-res water Demo
                ID: R4663MND9L

                (sorry @vinicity for taking your demo and your thread)

                1 Reply Last reply Reply Quote 7
                • pianofire
                  pianofire Fuze Team last edited by

                  Absolutely Stunning!

                  1 Reply Last reply Reply Quote 0
                  • spikey
                    spikey F last edited by

                    @vinicity @Gothon not sure if you know the guy on youtube, but what you produced here, made me feel like seeing a double rainbow 🌈 very cool, keep going, your work is inspiring, love to see such code/demos/achievements

                    1 Reply Last reply Reply Quote 8
                    • First post
                      Last post