Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Wave effect on fluid surface
#1
Hi! I would need to create a wave effect on the fluid surface, is that possible? I need also to create a distortion of the image below the fluid (like the refraction but something of the whole liquid and not of the single particle)

Thank you
Reply
#2
(06-05-2020, 02:08 PM)Guybrush Wrote: Hi! I would need to create a wave effect on the fluid surface, is that possible? I need also to create a distortion of the image below the fluid (like the refraction but something of the whole liquid and not of the single particle)

Thank you

Are we talking 2D or 3D?

Waves are entirely possible, but depending on the quality you want to achieve and your performance budget, it might just be too expensive.

Refraction is implemented, and it works on the entire liquid. Not sure what you mean by "refraction of the single particle".
Reply
#3
(06-05-2020, 02:28 PM)josemendez Wrote: Are we talking 2D or 3D?

Waves are entirely possible, but depending on the quality you want to achieve and your performance budget, it might just be too expensive.

Refraction is implemented, and it works on the entire liquid. Not sure what you mean by "refraction of the single particle".

Hi! Thank you for the answer!
We are talking about 3D (but 2D could be interesting too). How do you suggest to make waves? 

In the attached file I show you an example of refrection. It has an exaggerated value but I used it for explain what I mean by "refraction of the single particle". I can clearly see that there are a lot of "bubbles". I would love to have something smoother, is that possible?

Thank you!


Attached Files Thumbnail(s)
   
Reply
#4
(08-05-2020, 10:43 AM)Guybrush Wrote: Hi! Thank you for the answer!
We are talking about 3D (but 2D could be interesting too). How do you suggest to make waves? 

In the attached file I show you an example of refrection. It has an exaggerated value but I used it for explain what I mean by "refraction of the single particle". I can clearly see that there are a lot of "bubbles". I would love to have something smoother, is that possible?

Thank you!

I assume we are talking about breaking waves here, as you'd see at the beach.  Surface-only, ripple like effects (think of raindrops falling on a puddle) are much easier to get using a shallow water, cell-based simulator. I happen to have one as the background of my ages-old website: http://jose.virtualmethodstudio.com. Is that what you're looking for? In that case I wouldn't even consider a particle-based simulator.

Getting accurate breaking wave formation in 3D would require an extremely high amount of particles (we're talking about hundreds of thousands), so not exactly an use case Obi is intended for. Not even GPU implementations of the same technique are able to get 3D waves at decent frame rates (see this for reference, the bunny video that shows some wave-looking behavior runs at 4-8 fps using CUDA: http://joelgross.me/projects/pbf.html)

To have smoother refraction, try increasing the maximum particle anisotropy in the solver (so that particles fit the surface better, see: http://obi.virtualmethodstudio.com/tutor...olver.html). Also try increasing the FluidRenderer's smoothing parameter, this will smooth out the surface a bit more.
Reply
#5
(08-05-2020, 11:05 AM)josemendez Wrote: I assume we are talking about breaking waves here, as you'd see at the beach.  Surface-only, ripple like effects (think of raindrops falling on a puddle) are much easier to get using a shallow water, cell-based simulator. I happen to have one as the background of my ages-old website: http://jose.virtualmethodstudio.com. Is that what you're looking for? In that case I wouldn't even consider a particle-based simulator.

Getting accurate breaking wave formation in 3D would require an extremely high amount of particles (we're talking about hundreds of thousands), so not exactly an use case Obi is intended for. Not even GPU implementations of the same technique are able to get 3D waves at decent frame rates (see this for reference, the bunny video that shows some wave-looking behavior runs at 4-8 fps using CUDA: http://joelgross.me/projects/pbf.html)

To have smoother refraction, try increasing the maximum particle anisotropy in the solver (so that particles fit the surface better, see: http://obi.virtualmethodstudio.com/tutor...olver.html). Also try increasing the FluidRenderer's smoothing parameter, this will smooth out the surface a bit more.

Yes I'm talking about something similar to the first link. I need to make continue movement on the fluid surface
Reply
#6
(08-05-2020, 11:57 AM)Guybrush Wrote: Yes I'm talking about something similar to the first link. I need to make continue movement on the fluid surface

Then you should avoid particle-based approaches, as they simulate the entire fluid volume and are quite expensive. Cell-based approaches that only simulate the surface, are much better suited for this.

A colleague is working on a cell-based simulator called WaveMaker, pretty much the same algorithm I used in the first link. Not available on the store yet, but will be released shortly: https://www.youtube.com/watch?v=ikbfeQ2dzVM
Reply
#7
(08-05-2020, 12:17 PM)josemendez Wrote: Then you should avoid particle-based approaches, as they simulate the entire fluid volume and are quite expensive. Cell-based approaches that only simulate the surface, are much better suited for this.

A colleague is working on a cell-based simulator called WaveMaker, pretty much the same algorithm I used in the first link. Not available on the store yet, but will be released shortly: https://www.youtube.com/watch?v=ikbfeQ2dzVM

The problem is that I need to clear the surface from the fluid when an interaction with another object happens (as you can see on the left of the image of the previous post). I think the particle-based is better, no? So is there no way to make a movements on the surface?
Reply
#8
(08-05-2020, 01:18 PM)Guybrush Wrote: The problem is that I need to clear the surface from the fluid when an interaction with another object happens (as you can see on the left of the image of the previous post). I think the particle-based is better, no? So is there no way to make a movements on the surface?

I don't think I understand...what do you mean by "clear the surface from the fluid"? Do you want certain regions of the fluid to disappear?

Particle based approaches calculate fluid dynamics for the entire volume of fluid. Think of particles as water "atoms". This is good for topological changes and complex fluid interfaces, but very expensive. If you're only interested in the surface, I see no reason to use a particle-based system. Calculating only the surface dynamics is orders of magnitude faster.
Reply
#9
(08-05-2020, 02:07 PM)josemendez Wrote: I don't think I understand...what do you mean by "clear the surface from the fluid"? Do you want certain regions of the fluid to disappear?

Particle based approaches calculate fluid dynamics for the entire volume of fluid. Think of particles as water "atoms". This is good for topological changes and complex fluid interfaces, but very expensive.  If you're only interested in the surface, I see no reason to use a particle-based system. Calculating only the surface dynamics is orders of magnitude faster.

This is an example: https://drive.google.com/open?id=1pm14Wm...FATGK7LKEb

I just don't want that the liquid ever stops. And I would love to have a better refrections if it is possible...
Reply
#10
(08-05-2020, 02:26 PM)Guybrush Wrote: This is an example: https://drive.google.com/open?id=1pm14Wm...FATGK7LKEb

I just don't want that the liquid ever stops. And I would love to have a better refrections if it is possible...

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
Reply