Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Wave effect on fluid surface
#11
(08-05-2020, 02:47 PM)josemendez Wrote: Using particles for this is absolute overkill imho, and you have the additional drawback that no matter how much you smooth out the surface, the particle-based nature of the simulation will always be visible in the refraction. A simple mesh with a refraction shader would suffice, something like this?:
https://jasonjhayes.azurewebsites.net/We.../GLRipple2

I tried but I need to remove the water when something interact. In the video you can see that the fluid disappears and then come back. With a 2d ripple effect I think that I can't achieve that...
Reply
#12
(08-05-2020, 02:52 PM)Guybrush Wrote: I tried but I need to remove the water when something interact. In the video you can see that the fluid disappears and then come back. With a 2d ripple effect I think that I can't achieve that...

You could simply draw the interacting objects to a mask/stencil buffer, and generate ripples only outside of the mask. Or you could force the water "height" to zero inside the mask. Most 2D wave effects allow for something similar to this, it's pretty easy to achieve, and much more performant than particles.
Reply
#13
(08-05-2020, 03:08 PM)josemendez Wrote: You could simply draw the interacting objects to a mask/stencil buffer, and generate ripples only outside of the mask. Or you could force the water "height" to zero inside the mask. Most 2D wave effects allow for something similar to this, it's pretty easy to achieve, and much more performant than particles.

Ok,  I'll try! Thank you! Do you know some good 2d effect that I could use?

Scuse me, I've another question. Is it possible to use an image for the refrection with the simple2dfluid shader?
Reply