---
title: "Effervescent Tablet"
canonical: "https://documentation.chaos.com/space/PHX4MAYA/125636903/Effervescent+Tablet"
format: markdown
---
This page provides a tutorial on creating an effervescent tablet simulation in Maya.

## **Overview**

---

> ℹ️ This is an Entry Level tutorial which requires no previous knowledge of Phoenix. A basic understanding of Maya would be helpful but is not a prerequisite for being able to follow along.

The instructions on this page guide you through the process of setting up an effervescent tablet simulation.


This simulation requires** Phoenix 4.41 Nightly Build from 27 August 2021** and **V-Ray 5, Update 1.1** for Maya 2018 at least. You can download nightlies from [https://nightlies.chaos.com](https://nightlies.chaos.com/) or get the latest official Phoenix and V-Ray from [https://download.chaos.com](https://download.chaos.com/).  If you notice a major difference between the results shown here and the behavior of your setup, please reach us using the [Support Form](https://www.chaosgroup.com/help/contact/support/general).


<span style="color: #272727">To download project files: </span>[Download Project Files](https://drive.google.com/uc?export=download&id=16pGx2i2xjdu5oTCCFQdK1z403sQSRZ_-)


---


Want to follow along but don’t have a license?: [Download Free Trial](https://www.chaos.com/free-trial?utm_campaign=docs-tutorials&utm_medium=website&utm_source=docs.chaos.com)



![image](media://26e87965-3e69-4918-a9e9-4127fc791718)


## **Units Setup**

---

Scale is crucial for the behavior of any simulation. The real-world **size of the Simulator **in **units **is important for the simulation dynamics. Large-scale simulations appear to move more slowly, while mid-to-small scale simulations have lots of vigorous movement. When you create your Simulator, you must check the **Grid** rollout where the real-world extents of the Simulator are shown. If the size of the Simulator in the scene cannot be changed, you can cheat the solver into working as if the scale is larger or smaller by changing the **Scene Scale** option in the **Grid** rollout.

Go to **Window → Settings and Preferences → Preferences**.

On the Settings tab, set the **Working Units** to **centimeter**.

![image](media://081f527a-379a-44f6-9e81-f19763134c5c)

##   
**Glass Geometry**

---

To generate the glass, find a suitable reference image and trace it with the CV Curve Tool.

Make sure to trace both the inner and outer layer of the glass.

![image](media://8f66d4c7-0770-4e13-ac3b-37eb3ae6fb67)


---


With the generated curve selected, go to **Surfaces → Revolve**. 

![image](media://11a7d607-aa06-4ba0-8fa9-3150257c10d7)


---


As Phoenix can't use the generated NURBS surface directly, we need to convert it to polygons.  
Select the generated surface and go to **Modify → Convert → NURBS to Polygons (options)**.  
Set the **Tessellation method** to **Control points**.

![image](media://28039010-fd0a-4a3a-8e5f-e25a0f32df8e)


---


The resulting geometry is likely to be very low-res so consider subdividing it before using it for simulation.   
Go to **Mesh → Smooth (options)** and set the **Division** **Levels** to **2**.

![image](media://644f54fb-0853-4904-8d9c-254ffee7eef9)


---


It would be a good idea to save the curve and the NURBS surface that you created earlier in a group node which you can then hide.  
Rename the glass to *glass_geo_01*.

![image](media://13326a7d-481a-4988-b5a6-42b3357445b9)


## **Initial Fill Geometry**

---

To generate the Initial Fill geometry, select the inner faces of the glass.

> ✅ Tip: To easily select the inner faces, select a single ring on the bottom and use the **Shift + .(dot)** hotkey to grow the selection.

![image](media://e1983d9d-6622-4310-997a-a94358939d01)


---


Go to **Edit Mesh → Duplicate**.

![image](media://4b850823-2878-4e73-932a-61c19127afe1)


---


Use the **Mesh → Fill Hole** command to fill the top of the generated geometry. Phoenix can't use an open mesh as a source.

Be sure to reverse the normals of the geometry as it is very likely that they will be pointing inwards. To do so, go to **Mesh Display → Reverse**.

![image](media://858da6a1-73c8-4e75-bccd-54a8abbd7877)


---


Clean up the scene by deleting the history on the polygon glass and the initial fill geometry, and unparenting them from the group node created by the Duplicate command.

Delete the history on the polygon objects by pressing Alt+Shift+D.

Rename the initial fill geometry to *glass_initial_fill_01*.

![image](media://907f3ef7-9fcc-42c9-bae7-9ca68e8c2275)


---


Select the *glass_initial_fill_01* geometry and in the **Attribute Editor**, go to its Shape node tab.

Under **Attributes → Phoenix FD → Phoenix FD Node Properties**.

Enable **Initial Liquid Fill** on the **Extra Phoenix FD Attributes** tab. This will fill the geometry with liquid at the very beginning of the simulation.

![image](media://10e266ee-6e44-4faf-9b84-03d3ff625105)


## **Tablet Geometry**

---

You could use a 3rd party plugin to create a comprehensive RBD simulation of a tablet dissolving into smaller and smaller pieces as they travel upwards and use that.

We use a simple polygon cylinder to represent the tablet.

Rename the tablet geometry to *source_geo_01*.

![image](media://01f5f3d4-cde9-48a2-b05c-f3e692022a32)


---


Make sure to give the tablet some motion.

The tablet in the scene is animated to swirl around inside the glass. Doing this may seem tedious and unnecessary but it is a very important piece of the puzzle. Without any motion coming from the Source, your simulation will look uninteresting.

![image](media://c2f4ff22-0b49-49f3-b34f-e73e89d6eb00)


---


The tablet has an animated Solid option, so the geometry is a Solid object till frame 24 and then it becomes a Non-Solid object.

Select the tablet geometry and go to **Attributes → Phoenix FD → Phoenix FD Node Properties → Extra Phoenix FD Attributes**. As you can see the Solid option is enabled by default.

Go to frame **24**, leave the **Solid** option enabled and **Set Key**. Then, go to frame **25**, disable the **Solid** option and **Set Key**.

![image](media://0fc2b010-5ed8-4ef6-b761-2f537282ec11)


## **Phoenix Simulation**

---

### **Phoenix Source**

---

Create a **Phoenix Liquid Source** and rename it to *phx_source_01*.

The Liquid Source is a Phoenix helper node used to tell the Simulator which objects in the scene will emit liquid, how strong the emission will be, etc.

  
Rename the generated set to *phx_source_set*.  
Add the *source_geo_01* node to the *phx_source_set*.

![image](media://61f58caa-9725-48fc-9aa1-6c8ea4207edd)


---


Set the **Emit Mode** to **Surface Force** and **disable** **Emit Liquid**. We are not looking to add more fluid into the simulation. The Source is used to generate bubbles only.

  
Lets animate the **Discharge value**:** **

Frame **14**: **0**;  
Frame **40**: **1**;  
Frame **100**: **1.5**;  
Frame **200**: **1**;  
Frame **250**: **0.5**.


Set the **Noise** to **1**.

This option varies the Discharge across the surface or the volume of the emitting geometry or particle. The variation also changes over time. This is a shorthand for using an animated Noise texture in the Mask slot.

  
Enable **Particles** and set the **Particles Type** to **Foam**.  
The amount of born Foam particles is animated in time so that the Foam is emitted only when the tablet geometry is underwater:

  
Frame **15**: **0**;  
Frame **17**: **9**;  
Frame **18**: **12**;  
Frame **61**: **10**;  
Frame **200**: **6**;  
Frame **250**: **0**.


When the **Motion Velocity** checkbox is enabled, the moving tablet geometry will affect the velocity of the foam particles and make them follow the emitter. As we want this effect to be less pronounced we will lower its value.

Enable **Motion Velocity** and set its value to **0.2**.

![image](media://b5f54b75-34b8-4c48-9314-952c8741c297)


### **Phoenix Simulator**

---

Create a **Phoenix Fluid Simulator** that encompasses the glass and rename it to *phx_simulator_01*.

  
Rename the generated sets as well:

- *phx_sim_set*;
- *phx_force_prv_set*;
- *phx_light_set*.

![image](media://bcdd48e4-4de7-48f4-a9b9-3831fd2a211e)


---


Go to the **Liquid** tab and select **Enabled**.

> ⚠️ This is required, because the Simulator in Maya is able to generate both Fire/Smoke and Liquid simulations.

![image](media://ae3d965f-b520-4cde-acfe-2b077711d6fe)


---


Navigate to the **Grid** rollout and set the **Scene Scale** to **4**. When working with small scale water simulations, it's often hard to control the tiny jittering that tends to occur near collision objects without increasing the Steps Per Frame to prohibitively high values. Therefore, it's faster and easier to simply increase the Scene Scale a little.

  
Set the **Cell Size** to **0.2**. Working with a low Grid Resolution allows for much faster iteration and playback.

  
Set the **Container Walls** to **Jammed Both** for X and Z, and **Jammed(-)** for Y. When the walls are set to Jammed Both, the simulation behaves as if there is a solid boundary in both directions and the liquid collides with the side walls of the Simulator. Setting the walls to Jammed(-), means that the simulation behaves as if there is a solid boundary in the negative direction. In our case, the liquid is colliding with the bottom and side walls of the Simulator and the liquid is not flowing right through the glass walls.


The scene uses a very low Grid Resolution - only 600K voxels, because the liquid does not need much detail and the main focus is on the Foam particles.

![image](media://1e5b518f-fa21-4993-b369-5462598bc063)


---


<span style="color: #202124">Go to the </span><span style="color: #202124">**Scene Interaction → Exclude List**</span><span style="color: #202124">. This option determines which objects will be ignored or processed by the simulation. If you have a large (complex) scene and you wish only certain objects to participate in the simulation, you can disable the Exclude List and add the objects in the Simulation Set.</span>

> ⚠️ We take advantage of the Exclude List for better visibility in this example scene, but you can also use the default settings of the Scene Interaction rollout.


In the **Scene Interaction** tab, uncheck **Exclude List** and **Exclude Hidden Objects**. This gives us full control over what goes into the Phoenix simulation and thus, if any issues arise, makes troubleshooting much easier.


Now that Exclude List is unchecked, the phx_sim_set works as an include list - in other words, we need to add any geometry or source that will be used in the simulation to that set.

  
Add ***source_geo_01***, ***phx_source_01***, ***glass_initial_fill_01*** and ***glass_geo_01*** to the ***phx_sim_set***.

![image](media://1a1544b4-a97f-4855-9423-67f98bae8a28)


---


Go to the **Foam** tab and select **Enable Foam**.

Maya will ask if you want a new **Phoenix Particle Shader** generated - choose **Yes**.

![image](media://1b8f5d5c-0b38-45d2-8acb-d4727ad7dccd)


---


Rename the generated PhoenixFDPrtShader1 node to *phx_foam_shader_bubbles_01*.

Rename the generated phxParticle_set1 node to *phx_bubbles_particle_set*. Inside this set, rename the *PG_phx....* node to *pg_foam*.

![image](media://740bdd6e-89dc-4d15-b6d4-3b77c30bd308)


---


Set the **Foam Amount** to **0**. The Foam generation will be handled by the Liquid Source, not the Simulator. This parameter is responsible for generating foam from turbulent liquids and we're not interested in doing that.

Set **Half Life** to **0**. This parameter controls the total lifespan of the Foam. However, because our foam is generated inside the liquid, it won't die until it reaches the surface - which is exactly the desired behavior.

Set the **Size** to **0.09**. Foam **Variation Small** is set to **8**, while **Variation Large** is set to **0.7**, so that the smallest bubbles would be much smaller than the Foam Size, while bigger bubbles would not be much larger or they would appear unnatural.

The **Size Distribution** is set as high as **400**, so that there will be a very large number of small bubbles, but not many larger ones.

Set the **B2B Interaction** to **100**. The Bubble-To-Bubble interaction helps the Foam particles stick together rather than behaving like individual points in space.

Set the **Rising Speed **to** 8**. This option affects only the foam particles which are inside the liquid volume. This is the maximal speed of ascent of the average-sized bubbles. Bubbles larger than the Size parameter rise faster and smaller bubbles rise more slowly. If the Rising Speed is too high, foam particles will shoot past the liquid surface into the air.

Set the **Surface Lock** to** 1**. This allows you to control the behavior of the foam inside the liquid. If the Surface Lock is set to 1, the foam will be forced to float exactly at the liquid surface, regardless of any motion that may otherwise temporarily force it to sink into the water. Setting it to 0 disables this behavior and the values in-between act as a multiplier for the effect.

![image](media://bbdc565b-23f3-4da8-adff-0598701aa8c3)


---


Go to the **Dynamics** rollout and set the **Steps Per Frame** to **12**. Higher Steps Per Frame values will result in a smoother liquid at the cost of increased simulation times.

In general, you should try to keep this as low as possible without compromising on the quality of your simulation.

![image](media://9ae884a3-abc1-4c8d-b192-2425892cc262)


## **Particle Shader Setup**

---

The **Particle Shader** is used to shade particles such as splash and foam. Usually, it is targeted to the particles exported by the Simulator, but it can also shade any Particle System in Maya as well.

Select the **Phoenix Particle Shader** and set the **Mode** to **Bubbles**. When using this mode, each particle will be shaded as a spherical, transparent, reflective foam bubble, which is exactly what we need in this setup.

Set the **Color** to **RGB (233, 233, 233)**.

![image](media://3fab7293-7b69-410d-a256-9bbd5e5f7970)


---


Enable the **Volume Light Cache**.

Set the **Light Cache Speedup** to **0.990**.

In this example scene, the Volume Light Cache is used for speeding up the rendering process. 

You may experiment with the Light Cache Speedup value to see which value works best with your setup.

Check the [Particle Shader](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125830144) page for more information about the Volume Light Cache option.

![image](media://a78abc66-f0d3-4459-9cc7-e44ef42e5bd9)


---


Go to the** Bubbles | Cellular | Splashes** tab:

- set **Refraction Index** to **1.2**;  
- set **Bounces** to** 6**;  
- set **Reflection Cut Off** to **0.01**;  
- set **Highlights Width** to **0.5**;  
- set **Highlights Strength** to **1**;   
- set **Pressure Variation** to **5**.


All of those can and should be modified to fit your needs. Lower Highlights Width values will produce glossy bubbles. The Highlights Strength controls the brightness of the reflection.

> ✅ Disable the visibility of the Simulator and the glass geometry when working on a Particle Shader. It's much faster to render the Particle Systems on their own. You can also disable the visibility of individual particle systems by hiding their Particle Shaders.

![image](media://54272ef9-7aeb-4ad4-88e4-fe75dd8f2c54)


---


<span style="color: #202124">Go to the </span><span style="color: #202124">**Simulator → Rendering**</span><span style="color: #202124"> rollout and set the </span><span style="color: #202124">**Render Mode**</span><span style="color: #202124"> to </span><span style="color: #202124">**Isosurface**</span><span style="color: #202124">. This will create a procedural isosurface without polygons at render time using the Isosurface Level option. Note that this method requires V-Ray.</span>

<span style="color: #202124">Compared to the Mesh mode, the Isosurface is always smooth but it will take longer to render. In case you use Mesh mode and your mesh is too jagged and edgy, and smoothing it out is too slow or impossible, this means you should switch to Isosurface mode instead.</span> 

The Isosurface Level is deliberately set below the default 0.5 - down to **0.3** - so that the liquid volume would expand and would entirely intersect the glass geometry. This way the Render Cutter would clearly cut the liquid without any remaining air pockets between the liquid and the glass.

If you hit Render at this point, you might notice noise present on the surface of the liquid. To resolve such issues, Phoenix provides you with the option to use the glass geometry as a **Render Cutter** geometry. A Render Cutter geometry is a polygon geometry that will clip the rendering only to inside its volume.

Enable **Use Render Cutter** and select the **glass geometry**. Nothing notable will happen in the Viewport but in the Rendering tab of the Simulator, the Cutter geometry field will be populated by the name of the object that you chose as a cutter.

As mentioned earlier, the Cutter clips the liquid such that only the parts of it inside the volume of the Render Cutter geometry are considered at render time, so you may notice that the liquid only appears between the walls of the glass.

To resolve this, enable the **Invert Cutter** option from the **Rendering** tab of the Simulator.

Check [Using Initial Liquid Fill with Containers](https://docs-chaos.atlassian.net/wiki/spaces/PHX4MAYA/pages/125964825) for more information on setting up rendering of such scenes.

![image](media://53feeb01-60c6-419d-bd38-6a392f0ed678)


---


The Particle Shader has the glass mesh set as **Glass Geometry** so that bubbles touching the glass walls would be rendered correctly.

![image](media://b7edb48f-9a88-4207-9bad-485dec5c0f98)


## **Materials**

---

### Water

---

For the water material applied over the Simulator, set the **Diffuse Color** to **RGB (0, 0, 0)**.  
  
Set the **Reflection** and **Refraction Color **to **RGB (255, 255, 255)**, and the **Refraction IOR** to **1.33**.

Enable **Affect Shadows** - without this option, the bubbles will appear black in the rendered image.

![image](media://00c44a86-ebfc-4241-912b-721b17bd781b)


### Glass

---

For the Glass itself, set the **Diffuse Color** to **RGB (0, 0, 0)**.

Set the **Reflection** and **Refraction Color **to **RGB (255, 255, 255)**, and the **Refraction IOR** to **1.4**.

Enable **Affect Shadows**.

You may experiment with the Refraction Glossiness value to create blurred refractions if that is the style you're trying to recreate.

![image](media://47ff9c7d-06a8-4f44-9ef8-d36f9663b93a)


---


Navigate to the **Reflection - advanced** rollout and set the **Max depth** to **5**.

You can leave the Max depth parameter at its default value of **8** or switch it to a higher value. <span style="color: #222222">The Reflection Max depth specifies the number of times a ray can be reflected.</span>

<span style="color: #202124"> In this example scene, the Reflection Max depth is set to 5, as this value works good for the scene setup and we save on some render time.</span>

![image](media://fe893df3-c285-40a2-91d0-346b54d9e379)


---


Scroll to the **Refraction - advanced** rollout and set the **Max depth** to **10**.

<span style="color: #222222">You can leave the Max depth parameter at its default setting of </span><span style="color: #222222">**8**</span><span style="color: #222222"> or switch it to a higher value. The Refraction Max depth specifies the number of times a ray can be refracted. </span>

> ⚠️ Glass and liquid materials look better with higher Max depth values, but keep in mind that higher values will increase the render time.

![image](media://05af34a2-dd7d-4c57-8445-9c540e51d838)


## **Lighting and Camera**

---

Create a standard **V-Ray Rectangular Light** and position it above the glass geometry.

The exact **position** of the **light** in the scene is **[ X: 0, Y: 55, Z: 0 ] **and the **rotation** is **[ X: -85, Y: 0, Z: 0 ]**.

Set the **Intensity multiplier** to **0.7**.

Set the **Directional** value to **0.8**.

![image](media://082cbe11-b1e5-40e1-bbd8-016690e76fe7)


---


For this setup a standard **Camera and Aim **are used.

The **Angle of View** is set to **39.6**.

The **Focal Length** is set to **50**.


The exact **position** of the **Camera** is **[ 0, 16, 62 ]** and of the **Camera Aim** is **[ 0, 7, -5 ]**.

![image](media://65f50d03-c730-4fa2-b86b-40bef655ebe6)


## **Rendering**

---

Set the V-Ray** Sampler type** to **Bucket**.

Set the **Min subdivs** to **1** and the **Max subdivs** to **6**.

Set the **Threshold** to **0.001**.

Set the **Render region division** to **16**.

![image](media://50d5a122-7e96-4df2-b0ef-a0cf487658fe)


---


Navigate to the **GI **tab and **enable** the **Global Illumination**.

Disable the **Reflective Caustics**. In this example scene, the Reflective GI caustics don't have much of an effect on the final rendering, but disabling the option makes the render a bit faster.

Set the **Engine** to **Light cache**.

Set the Light cache **Subdivs** to **500**. <span style="color: #202124">The Subdivs are decreased to 500, because this value works good for the scene setup and we save on some render time.</span>

![image](media://b10f4a0f-c680-480e-8785-589dc0f6862a)


---


To enable the **Motion Blur**, go to the **Overrides** tab of the V-Ray Render Settings and under **Camera**, select **Motion blur**.

The **Duration (frames)** and the **Interval center** are set to **0.5** in the example scene, but you can experiment with the value in order to achieve the desired look.

![image](media://ab5d6020-df83-4176-8660-d87ee61de4bc)


---


Scroll to the **Environment** tab and enable **Override Environment**. When Override Environment is enabled, V-Ray overrides the default Maya environment and renders with the options selected below.

Plug a **Ramp** texture in the **Background **texture Map slot. this option sets the map to act as a background during rendering. 

Plug a **Ramp** texture in the **GI **texture Map slot. Sets the map to be used during Indirect Illumination(GI) calculation. The effect of changing the GI texture is similar to a skylight.

Plug a** Ramp** texture** Reflection** and **Refraction** texture Map slots. This group allows you to override the 3ds Max Environment settings when reflections and refractions are calculated.

Check the [Environment Overrides](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111739583) page for more information.

![image](media://bc25b6b1-7b78-4104-8b73-28a24ff8918a)


---


The **Ramp** texture in this example scene is set as follows:

Type: **Circular Ramp**;

Interpolation: **Exponential Up**;

The **first poin**t has the **U Wave** set to **0**, and the **Selected Color** is set to **RGB (135, 202, 255)**.

![image](media://d05e79d1-f460-4795-851a-dfc329ef692e)


---


The **second point** has the **U Wave** set to **0.8**, and the **Selected Color** is set to **RGB (21, 94, 255)**.

![image](media://471c4895-0fd2-4b95-8258-d63bf7545466)


## **V-Ray Frame Buffer**

---

For the final render, some corrections are made in the V-Ray Frame Buffer.

Create **Hue/Saturation** Layer and set the **Saturation** to **0.1**.

Create **Curves** Layer and set the points to the following positions:

- **first** point to **(0.004, 0.017)**;
- **second** point to **(0.984, 1)**.

Feel free to use other values for the post effects depending on your preferences.

![image](media://3bccf719-8e7f-4cb4-a770-05bea41c321d)


---


And here is the final animation.