Discover Channel Rendering in RealFlow

January 12, 2017 Technology, Tips 0 Comments

Hello everyone,

We are back after the holidays. We wish you an amazing year ahead and hope you will check in to see all the posts we have planned to share with you. Here we go! 🙂

OpenGL previews from fluid particles and meshes are great, but they cannot compete with a crisp and detailed render. For this purpose, RealFlow comes bundled with an implementation of our renowned Maxwell Render. But did you know that it is possible with Maxwell Render to render a fluid’s properties, for example velocity, age, or a particle’s number of neighbors? These properties are also known as channels and they are the icing on the cake when you render fluids. Before we dig deeper let’s take a look at how channels are stored and shown inside RealFlow.

What are Channels?

As mentioned in the introduction, a channel is a fluid’s property. The number of channels is different for each of RealFlow’s solver types. If you want to see which channels are supported you just have to open an emitter’s or domain’s “Export” tab (or Export Central), and expand the RPC or ABC export resource, because here you have the possibility of choosing which channels should be written to the cache files:

If you want to use vorticity and normal data you have to be careful, because both channels have to be activated before the simulation starts. Otherwise, the channels will not be calculated:

Making Channels Visible

Whenever you perform a fluid simulation in RealFlow’s GUI with an active viewport you will see the velocity channel. The differences in the particles’ velocities are shown as a color gradient ranging from blue (slow) to white (fast). To change the gradient you simply define new colors in the emitter’s or domain’s “Display” tab. But sometimes you will hardly notice any difference in the particles’ colors, for example with viscous fluids or with a strong “Drag Force” daemon. In such case it is a good idea to remap the color values by adjusting the channel’s range of values:

Deactivate “Automatic range” and – this is normally enough – decrease “Max range”. Let’s say, the actual maximum velocity is 14 m/s and now you enter something like 5 m/s. This means that all particles with velocities of 5 m/s and higher will be displayed with the gradient’s right color – white in this case. This quick workflow enhances the contrast between the particles and you will have a better view of the channel’s differences. Under “Property” you choose which channel you want to see with the fluid, but please bear in mind that some channels might be empty or they have constant values. This results in a uniform color.

Rendering Particle Channels

Now it is time to render the particles and this is just a matter of a few clicks:

  • First, change the emitter’s or domain’s “UV channel” to “Velocity” or one of the other channels provided.
  • Now start the “FIRE” engine from the “Render” shelf.
  • The particles’ size is controlled automatically, but it is possible to change this value by switching to “Constant radius” and entering a new value.

Here is a rendered example from a RealWave mesh with activated “Particle layer”:

Channels and Meshes

Channels are not restricted to particles, and meshes are able to store this information as well. Create a mesh container and make your settings, then open the “Particle Channels” panel where you will see a couple of preselected settings. Again, only those channels, which have been calculated and stored during simulation, can be used. There is no possibility of adding them in a post process!

The remaining steps are very similar to what you have done with particles already, but there is one important difference: a material is required to make a channel visible. Everything you need is located in the mesh container’s “Maxwell Render” panel:

  • Choose one of the “_foamXX” materials, for example “atlantic_foam30”. The suffix number represents the foam’s opacity, e.g. 30% (translucent) or 100% (opaque).
  • Decide, which channel you want to render.
  • Adjust the colour gradient (or not).
  • The “Min range” and “Max range” parameters have exactly the same purpose as their counterparts. In most cases it is enough to decrease “Max range” to get better results.
  • Evaluate your settings with the “FIRE” engine.

You might have noticed that some channels cannot be rendered inside RealFlow – this is reserved to Maxwell Render’s full suite or your 3D application.

And finally an example from a Hybrido simulation with displacement, and the “atlantic_foam60” material applied: