Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  OBI7 Surface Texture Rendering (Lava) discussion
#5
(08-05-2024, 07:43 AM)josemendez Wrote: Those in your gif are not foam cards/particles (or at least, not just particles), that's crossfaded texture coordinate advection.

This is a technique that advects two sets of texture coordinates using fluid velocity, crossfading between them and  periodically resetting them to avoid too much stretching. We have this in FluXY, maybe this is what you meant in your other post about advecting mesh vertices?

For heightmap-based fluids this is very easy to do, since UV coords can be just top-down projected. For arbitrary 3D meshes however one must device a way to procedurally generate base texture coordinates for the mesh - triplanar mapping would be the basic way to approach this.

Obi does not support this yet, but likely will in the future: all that's needed to be able to do this in a shader is for the fluid mesh to contain velocity information in its vertices, which is very simple to do (at the cost of increased surface chunk memory usage).

Compared to particle based foam, this is quite limited though since it confines foam to the surface: foam can't be underwater, and can't splash out of the water. The good news is that both methods can be combined.


Tried using it, but the workflow for reading/writing data to/from compute shaders is honestly not very good. Coupled with the fact that we also needed support for CPU simulation for Burst and precise control over how velocity-based billboard stretching is done (in VFX graph it results in weird distortion when the velocity vector faces the camera forward vector, which breaks the illusion of foam splashing around) we decided it would be easier and faster to roll our own GPU/CPU particle system and include it with the asset.

Hi, that's not what you think. The technique you used and same as that Catlike Coding's blog post result in an unpleasing periodically resetting effect in the foam life duration, while the gif I show you does not have that.
Those actually are splash cards, same as advected particle, but bigger, and have orientation follow the movement.
You can take a read on this blog
Working with Niagara Fluids to Create Water Simulations (80.lv)

H
aft way through the blog, they reveal the splash card representation
Water surface + caustic
[Image: 62dfae9267d17.gif]
Water surface+caustic+splash cards
[Image: 62dfaea46cf4f.gif]
splash cards visualized.
[Image: 62dfaecca9831.gif]

If you can do this, the advected particles number can be reduced by a lot since their size can be very big, like that 3rd gif.
Reply


Messages In This Thread
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 04:47 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:18 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:30 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 08:35 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 08-05-2024, 03:56 PM
RE: Bigger foam with Alpha dissolve - by spikebor - 10-05-2024, 08:57 AM
RE: Bigger foam with Alpha dissolve - by spikebor - 16-05-2024, 05:17 PM
RE: Bigger foam with Alpha dissolve - by spikebor - 21-05-2024, 03:04 PM