Versions Compared

Key

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

...

Section
Column
width40%

A Checker texture is plugged into the Map parameter of the Mapper. When you Start a simulation, the Mapper will look at this texture to determine what values to apply to the voxels of the Simulator. Note that if this is Liquid Simulator, the FLIP liquid particles will be affected and not just the voxels.

The Mapping parameter for the texture is set to Planar from Object XYZ. The Mapper works in a volume, so the default Explicit Map Channel does not make sense because it affects only the surface of objects, and the Simulator has no UV coordinates to map the Checker to.

Buildup Time is set to 0 so the Mapper will instantly set the voxels of the Phoenix FD Simulator to the values of the texture for each frame of the simulation.

The Channel option is set to Smoke so the Mapper will set the texture values only for the Smoke Channel. If you want to affect multiple channels simultaneously, you need to set up multiple Mapper nodes.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

A Gradient Ramp is used as a Mask for the Mapper. The Mask specifies where the Map values are applied inside the Phoenix FD Simulator.

The poly plane above the simulator has a Composite Texture applied to it such that the Checker is multiplied by the Gradient Ramp. This is essentially what happens with the Map + Mask parameters of the Mapper.

Imagine this plane projected over the Phoenix FD Simulator from the front - the white values will set the Smoke Channel to 1, the Black values will set it to 0.

Note that the Mapping for the Gradient Ramp is also set to Planar from Object XYZ for the same reason - because the simulator has no UV coordinates, the texture has to be projected from one of the XY / YZ or ZX planes.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

The mask functionality becomes quite useful when you start using a V-Ray Distance Texture.

The Distance Texture takes Input Geometry and returns a black and white texture based on how far the Input Geometry is from the object that the Distance Texture is applied to.

A regular Poly Sphere is created and placed inside the Simulator to be used as Input Geometry for the V-Ray Distance Texture.

UI Text Box
typeinfo

The Mapper works directly on each voxel or particle of the Simulator. When the Distance Texture is evaluated, it looks at each voxel or particle and checks 'How far is the Sphere from that voxel'. If the answer (in this case) is 'Greater than 5', then the value returned to the Mapper is equal to the Far Color parameter (black). Thus, the voxels of the Simulator which are farther than 5 units from the Sphere geometry are not affected - the value for the Mask there is black.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

You can use the Mapper to affect any grid or particle channel.

The video to the right shows the Mapper affecting the Grid RGB Channel instead of the Smoke density grid channel, and a V-Ray User Color texture with a solid Green color set as the Map parameter for the Mapper.

Once the smoke passes through the volume of the sphere geometry, it inherits the RGB color set by the Mapper for that region of the Simulator.

For this setup to work, a Phoenix FD Source is created to emit Smoke and RGB (the color is set to Gray). On the Phoenix FD Simulator → Output roll-out, RGB Grid Channel export is Enabled.

Column
width60%

Videoautoplayloop
0PHXMY_Mapper_result.mp4
1100%
2100%
3true
4false
5true

 

 

...