Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Hybrido is RealFlow's Hybrido solver is able to process many millions (even hundreds of millions) of particles and this huge amount has to be handled during several procedures: exporting, displaying and meshing. It is a real challenge to create high-quality meshes from a hundred million (or more!) particles within a reasonable time frame. Our new “Hybrido Mesh” engine uses state-of-the-art algorithms and powerful techniques to exceed your expectations in terms of speed, quality and file size. The “Hybrido Mesh” tool catches even the finest structures and splashes with a minimum of parameters and settings.technology for the simulation of large-scale fluids. When you perform Hybrido simulations you have to differentiate between the so-called core fluid and secondary elements. The core fluid represents the main body of water including larger waves, e.g. rolling or breaking waves, but also the fluid's main splashes.

But in most cases, the core fluid's structures are not detailed enough for a believable representation of an ocean surface or a river. In order to enhance the simulation's quality and level of detail, smaller splashes, foam, bubbles, and mist are added using dedicated emitters – the secondary elements. Smaller wave structures and ripples are added with the Hybrido's “Ocean Statistical Spectrum” feature.

The core fluid is normally meshed with the “Hybrido Mesh” engine, while the secondaries are rendered as particles. The fluid's displacement can be added either as a displacement map or baked to the Hybrido mesh directly.

 

Info
RealFlow's "Particle Mesh" supports interactive meshing. For more information, please click here.

Experienced users will find a set of new parameters under the mesh node's “Filter” panel. Basically, these settings can be split into two main parts. The parameters of the first part are used to adjust the grid fluid's splashes. Please note that here, we are really talking about the splashes of the grid fluid, not the secondary HySPH particles. These elements are rendered either as particles or treated with the “Particle Mesh” tool. With the splash-related parameters of the “Hybrido Mesh” engine you can create ultra-realistic structures with thin borders. In the second part you will find parameters to reduce the “rounded borders” effect in the main fluid body.

The well-known relaxation and tension filters are still available, but we recommend using the splash- and core-related parameters only, because they are highly optimized for Hybrido grid fluids and produce accurate results.

To get you off to a good start we have added a comprehensive description about how these parameters work, which dependencies they have, and how they finally affect the mesh. We also want to encourage you to perform some tests to become familiar with the filter's mode of operation. It will certainly take a few attempts to understand the principle behind these settings, but once you got it, you will be able to create stunning results.

How to Configure the “Hybrido Mesh” Engine

For most cases, there is a standard workflow that can be used to define the initial main parameters. These values can be used for further tests and for fine-tuning the mesh. The “Filters” parameters, in particular “Core smoothing” and Splash thinning”, play a very important role here. The “Hybrido Mesh” engine can detect which areas of the fluid are considered the main body of the fluid (also called core fluid) and which parts are splashes. Based on this differentiation, it is possible to apply separate filters on the mesh and treat these parts individually.

Core smoothing”

Let's start with “Core smoothing”. Each vertex of the mesh has a certain property that ranges between 0 and 1. A value of 0 (or close to 0) means that a vertex does not have any core characteristics, while 1 tells the engine that it has full core attributes. This value acts like a scale factor which is eventually responsible for the smooth transitions between the mesh's different core areas. With the “@ core threshold” value it is possible to control this transition, because it determines when the smoothing process will start:

If you enter a threshold of 0.4, for example, all vertices with values greater than 0.4 will be taking into account. The “Core smoothing” filter will be only applied to vertices with values between 0.4 and 1.0. One of the key features is that these candidates will not simply receive the same amount of smoothing, but each vertex will be treated individually to create clean transitions. Good starting values for “@ core threshold” range between 0.2 and 0.4.

Finally, there is “@ smoothing steps”. The value determines how of the “Core smoothing” filter will be applied to the mesh. It is important to know that this parameter is resolution-dependant. For high-resolution meshes, values between 100 and 150 should work. With increasing quality, the number of steps has to be raised as well.

Splash thinning”

The “Splash thinning” filter, on the other hand, is very important to increase the mesh's level of detail and to create a realistic look. The idea behind this filter is actually the same as with “Core smoothing”: each vertex carries a value between 0 (no splash) and 1 (full splash characteristics). Again, the associated “@ splash threshold” parameter determines when the thinning effect should start and creates a smooth transition. Vertices with a value smaller than the threshold will not be filtered, while vertices with values between “@ splash threshold” and 1.0 will receive an appropriate amount of filtering/thinning. Good values range between 0.8 and 1.0.

@ thinning size” tells the engine how much you finally want to thin out the splashes and is used to avoid rounded borders. Technically, the mesh engine “pushes” the mesh's vertices closer to the fluid particles. Since the position of the vertices also define the edges of the mesh's triangles you have to be careful with high values close to 1.0, because you might see flipped polygons or intersecting areas. Good initial values are between 0.5 and 0.6.

Image Removed

There is a simple rule you can follow: a “@ thinning size” value of 0.0 represents a particle radius of 0, while 1.0 exactly matches the radius. Or: the maximum thinning size equals the particle’s radius. The current thinning size is calculated as:

Total thinning size = @ thinning size * particle radius

How to Adjust the Mesh's Polygon Size?

If you do not want to use the “Hybrido Mesh” engine's “Auto polygon size” feature (it can be found under the “Mesh” panel) then there is often the problem of which starting value you should use? To avoid guessing, there is an easy formula to calculate the mesh's polygon size. The result can be used as a starting point to decrease the size of the triangles. For this calculation the particle radius rp is required:

Polygon size <= rp / sqr( 3 )

Please bear in mind that “@ polygon size” should never be greater than the particle radius. The particle radius can be calculated with this formula – the “Cell size” and “Particle sampling” parameters are properties of the “HY_Domain” node:

...

Splash vs. Splash

When we talk about splashes in conjunction with Hybrido fluids then we do not mean the secondary structures created by the “Splash” or “Splash & Foam” emitter. In this case we are talking about parts of the core fluid which behave like splashes – you can see them when the core fluid is interacting with objects, or when waves are breaking. In the image below you can see a Hybrido core fluid simulation with splash-like structures:

 

Image Added

Splash and Core Fluid Attributes

Every mesh vertex carries a so-called “Splashity” value. This channel tells the mesh and render engines whether a vertex is has full core fluid attributes, or if it behaves more like a splash. “Splashity” ranges between 0 (no splash, full core fluid attributes) and 1 (full splash, no core fluid attribute). The “Splashity” channel is used by the “Splash Thinning” filter to create splashes with thin and spiky ends.

For core fluid vertices there is a similar attribute: a value of 0 means that a vertex has no core fluid attributes, and it can be considered a splash. 1 tells the mesh engine that the vertex has full core fluid attributes. The criterion is used by the “Core Smoothing” filter in order to remove unwanted ripples and create a smoother surface.

Splash and Core Fluid Filters

One of the most sophisticated elements of the Hybrido is the filter set. There, you can find the “Splash Thinning” and “Core Smoothing” filters mentioned above. Both filters provide a threshold parameter telling the mesh engine which vertices will be affected by the thinning and smoothing filters. The filters are applied gradually:

  • With a “@ splash threshold” value of 0.4, for example, vertices with a “Splashity” of 0.4 receive the lowest amount of filtering, while vertices with 1.0 get the maximum. Vertices with values smaller than 0.4 are not filtered at all.

  • For core fluid vertices it is pretty much the same: With a “@ core threshold” of 0.6 the filter is applied gradually to all vertices with a core fluid attribute between 0.6 (minimum) and 1.0 (maximum). Again, vertices with values smaller than 0.6 do not receive any filtering.

Try to avoid very high values with “@ splash threshold”, because you might see intersecting polygons.

Displacement (AKA “Ocean Statistical Spectrum”)

Both terms have exactly the same meaning: they describe an additional “layer” on top of a Hybrido simulation in order to create smaller structures and cresting waves. This layer can be either exported to a series of TIFF files, or baked to the Hybrido mesh directly. In the latter case, you can make use of the Hybrido mesh engine's “Displacement” parameter set.

Please bear in mind that the displacement/ocean statistical spectrum is a feature of the Hybrido domain, and not activated by default.

The displacement is applied to the mesh's top and bottom. This leads to a large number of surplus polygons which are normally not needed when you render the fluid. In order to remove these parts, the “Open Boundary” option should be enabled. In conjunction with the Hybrido domain's → projection plane you can define a clipping plane, where all polygons outside this area will be removed.

Attenuation

There is one term you will come across very often in conjunction with the mesh's displacement feature is “attenuation”. There are circumstances where the displacement waves are simply not wanted: Imagine a thin splash with surface ripples, or fast moving parts of the fluid with cresting waves. The mesh engine's attenuation settings allow you to fade and finally remove the small waves based on four properties: speed, vorticity, height, and splashity. With these parameters you have full control where the statistical waves will finally appear and how fast they will be vanishing.

The Meshing Process

Meshing speed mainly depends on four factors: number of Hybrido particles, “@ polygon size”, “@ particle radius”, and displacement quality. The number of particles is crucial in order to get a decent amount of details, so you should try to use as much particles as possible for the fluid simulation. The quality of the displacement is also very important: the higher the displacement's quality, the more polygons the mesh will finally have.

Polygon size is a measure for the number of polygons as well. With small polygons you will be able to get more details, but meshing time will increase as well. Particle radius, on the other hand, determines whether your mesh has a muddy appearance with rounded borders, or if it looks torn.

The meshing process will be very fast if both, “@ polygon size” and “@ particle radius”, are the same. There is also a rule of thumb for adjusting these parameters:

@ polygon size = Hybrido domain's “Cell size” * 0.5

@ particle radius = @ polygon size * 1.7

We also recommend setting “Weight normalization” to “Yes” to get a better representation of the underlying particles.