Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Water drops on glass, How?
#4
(03-05-2019, 05:18 PM)Farzin Wrote: I need a real-time waterdrop effect, hence animated or pre-baked shaders do not work in this case.

Why not? an animated shader *is* fully real-time and dynamic. Something similar to this one, but with some velocity in the Y direction. This one is only 6 lines of code, so it's extremely simple:

https://www.shadertoy.com/view/ldSfDW

You could even keep track of the path followed by previous drops in a texture, to increase the probability of other drops following it, just like it happens in real life. Or have a texture to define obstacles, etc.

There's very little actual fluid dynamics involved in this effect. The resulting look it's mostly due to light refraction and the physical behavior is the result of adhesion (which a 2D shader does not even have to calculate, as it works on a plane) and surface tension forces. We will look into making a sample scene that mimics this effect in Obi so that you can follow it as a guideline. However, I still think a shader would be a far easier, faster, cheaper, and overall more practical approach to this.
Reply


Messages In This Thread
Water drops on glass, How? - by Farzin - 03-05-2019, 07:04 AM
RE: Water drops on glass, How? - by josemendez - 03-05-2019, 02:20 PM
RE: Water drops on glass, How? - by Farzin - 03-05-2019, 05:18 PM
RE: Water drops on glass, How? - by josemendez - 03-05-2019, 08:41 PM
RE: Water drops on glass, How? - by Farzin - 04-05-2019, 07:56 AM