Versions Compared

Key

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

This page provides information on the Phoenix Foam Texture.

 

Page Contents

Table of Contents
stylecircle

 

Overview


Section
Column
width50%

The Phoenix Foam Texture can be used in combination with the Ocean Texture to create the effect of foam appearing at the crests of the infinite ocean's waves. This happens at render time and the simulation does not need to be run again. If you use a Phoenix Ocean Mesh in Pure Ocean mode, then simulation might not be needed at all.

The foam mask is generated behind the wave crests and its lifespan is controllable. The texture outputs a color that represents the foam color both above and below the liquid surface, and the texture also outputs an alpha channel which must be used to blend between the regular liquid material and the color of the Foam Texture. This way you can use the Foam Texture to color the material of the ocean mesh and there are examples at the bottom of the page showing how to set it up.

Column
width5%

 

Column
width45%

 

Section
UI Expand
titleUI Path: ||Material Editor window|| > Material/Map Browser > Maps > PhoenixFD > PhoenixFDFoamTex


Parameters


 

 

Ocean Texture | ocean – The waves used as a base for the foam texture. You can only specify a Phoenix Ocean Texture here - the foam mask is calculated using internal information from the Ocean Texture which makes it impossible to use the Foam Texture with any other maps.

Life Span (sec.) | life – The time in seconds it takes for the foam to disappear after the wave crest has subsided.

Birth Threshold | thr  – The relative wave height needed to produce foam. The higher the value, the less foam you will get.

Pattern Strength | ptrn – The foam texture has a built-in pattern generator and this parameter controls the view of the patterns. Higher values make the patterns them more string-like, and lower values make them look like holes in the foam. At value zero, all the patterns are disabled and you can use the texture as just a mask for a custom designed patterns - you can multiply it by a noise map or a more complex texture setup.

Pattern Length | ptrnszx  – The  size of the patterns along the wave crests.

Pattern Width | ptrnszy  –  The  size of the patterns behind the wave crests.

Underwater Foam | uwfoam – Controls the alpha value in the holes of the patterns. High alpha means better visibility of the underwater foam.

Foam Color | foamcolor – The color that will appear in the parts where the generated foam is above water.

Underwater Foam Tint | tint – The color that will appear in the pattern holes.

Use the original non displaced vertices |  useuvw – Intended to achieve better foam movement together with a displaced Phoenix Ocean Mesh. Real foam is shifted by the water movement, so if we map the Foam Texture to the mesh directly using world coordinates, the foam will move unnaturally. To achieve the effect of foam locked to the moving liquid surface, we have to sample the texture using the non-displaced positions of the mesh vertices, and this is what this option does. This option would work only with a Phoenix Simulator with Phoenix Displacement, and won't be able to produce the same results when used for surfaces generated in any other way, e.g. by using Ocean Texture with V-Ray Displacement.

 

Texture Setup


Here are the basic ways to setup the Foam Texture using a standard Blend material or a VRayBlendMtl. This will be the material you would apply over the Ocean Mesh.

The overall idea is to have a Phoenix Ocean Texture feeding into the Foam Texture. This same Ocean Texture should be used for the displacement of the ocean surface. The 'Water' material would be the same material you would use for shading a water surface. A standard water shader is a material with full reflection and refraction, index of refraction of 1.33, and usually fog color is also needed for large scale ocean surfaces. The 'Foam' material can be less refractive/opaque than the water material and it would represent the areas where foam appears over the wave crests. The Foam Texture serves as a mask for a blend material, so that the Foam material is applied over the wave crests, and the rest of the liquid mesh uses the regular Water material.

 

The Blend Material setup below is used for the Defscanline renderer.


Blend material (click to zoom)

 

 

The V-Ray Blend Material setup below is used for the V-Ray renderer. The V-Ray setup uses a Color Correction map to produce the proper input required by the VRayBlendMtl, so the three color channels are set to the Alpha of the Foam Texture, and the Alpha channel is set to One (opaque).

 


VRayBlendMtl
 material (click to zoom)