Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  OBI7 Surface Texture Rendering (Lava) discussion
#3
(08-05-2024, 04:47 AM)spikebor Wrote: My texture maybe not enough to do this, but essentially what I aim for is this effect
This cannot be done with current small foam particles since it will need an absurd amount of them.
They're very big foam card with dissolve over time technique.
[Image: 62dfb1e19938c.gif]

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.

(08-05-2024, 04:47 AM)spikebor Wrote: I wonder why do you not use VFX graph for foam? Is this about compatibility with low-end devices?
Unity vfx graph can read Compute Buffer since 2021 LTS so I think it's very well suit for Obi7.

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.
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 josemendez - 08-05-2024, 07:43 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