Versions Compared

Key

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

...

Section
Column
width45%

In this tutorial, we are going to show you how to create a nebula with Phoenix. Since a nebula is a giant cloud of dust and gas in space, we will simulate it as smoke and then we will add lights to give it the appearance of a nebula. After simulating with a single Simulator, we will duplicate it into five additional instances, to have six simulation grids in total.

For better rendering performance, we will render the scene using V-Ray GPU.

The simulation requires using Phoenix 4.41.00, and V-Ray 5 Update 1 for Maya 2018 at least. If you notice a major difference between the results shown here and the behavior of your setup, please send an email to support@chaosgroup.com.

 

The Download button below provides you with an archive containing the start and end scenes.

UI Button
sizelarge
icondownload
titleDownload Project Files
urlhttps://drive.google.com/uc?export=download&id=1lpjpGJJMkKRsPIj3HJuWjn_bpJySN9Dr

Column
width55%
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/mfVbIBU6f9M?version=3&loop=1&playlist=mfVbIBU6f9M" frameborder="0" allowfullscreen></iframe> 

Units Setup

 

 

...

Section
Column
width40%

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 slower, while mid-to-small scale simulations have lots of vigorous movements.

As the focus of this tutorial is a large-scale simulation, setting the units to Meters is a reasonable choice.

Go to Windows → Settings/Preferences → Preferences and then click on Settings. Underneath the Working Units, change the Linear dropdown to meter and click Save.

UI Text Box
typetip

The Phoenix solver is not affected by how you choose to view the Maya Working Units - it is just a matter of convenience.

Column
width60%

 

...

 

Section
Column
width40%

Note that 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.

Column
width60%

 

 

Color Management Settings

...

Section
Column
width40%

If you're using Maya 2022, the Color Management settings have been changed to ACEScg by default.

We need to switch them to sRGB settings, so that the render results in this tutorial remain consistent with earlier versions of Maya as well.

In the Color Management section, change the Rendering Space to scene-linear Rec.709-sRGB.

Set the Display to sRGB.

Set the View to Raw.

UI Text Box
typeinfo

This way, Color Correction presets that have been provided with the Nebula project file will work as expected. We'll take a look at them later on in the tutorial.

Column
width60%

 

Scene Layout

...

Section
Column
width40%
UI Text Box
typeinfo

In this tutorial, we will create a single simulation for the initial setup and then duplicate it five times as an instance for the final setup.

Initial scene setup consists of the following elements:

  1. A deformed Torus Knot geometry that is used for the smoke source.
  2. Phoenix Fluid Simulator (PhoenixFDSim1).
  3. Phoenix Fire/Smoke Source (PhoenixFDSrc1) emitting Smoke from the Torus Knot geometry.
  4. VRayLightSphere1 light for lighting.
  5. Camera1 for look-development rendering.
  6. Phoenix Turbulence (PhoenixFDTurb1) for adding variation to the Smoke's motion.
Column
width60%

...

Section
Column
width40%

The geometry used for the smoke emission is a custom Torus Knot, which you can feel free to use in your scene as well. It was deformed to give it a more organic look.

UI Text Box
typeinfo

You can replace the Torus Knot with any other geometry you like, e.g. a donut geometry. The emitter geometry determines the initial shape of the nebula.

UI Text Box
typenote

In the later stages of the tutorial, we will blow away the nebula smoke using Phoenix Turbulence to add more variation, but the geometry still plays an important role in affecting the final appearance of the nebula.

UI Text Box
typetip

Note that the Torus Knot is set to be non-renderable, from its Render Stats options in Maya. This way, when we render we'll only see the results of the nebula, and the geometry will not be visible.

 

 

Column
width60%

 

Lights, Cameras and Environment

...

UI Text Box
typetip

In this tutorial we have many steps to follow. To keep it concise, let's focus only on the Phoenix related steps. Feel free to use the camera and light settings in the provided sample scene.

For your reference, below you can find the light, camera and VrayLightMtl settings for the nParticles.

 

Expand
titleClick here to see the Camera and Light Settings...


Lights Settings

 

 


Section
Column
width40%

Final details for the four VRayLightSphere lights.

 

*Note: For preview purposes, we will initially set the VRayLightSphere1 Multiplier to 10, until we enable the rest of the lights later on and lower its multiplier.

Column
width60%
 PositionMultiplierRGB ColorRadius
VRayLightSphere12.5, 12.0, 0.010* (4.0 at finish)146, 168, 2394.0
VRayLightSphere2-30.0, 33.0, 1.06.023, 81, 2302.0
VRayLightSphere3-32.5, 8.5, -7.00.447, 89, 2242.0
VRayLightSphere438.7, 12.3, 1.01.083, 132, 2308.0

 


 

 

 

 

 

Section
Column
width40%

In the Options for all of the VRayLightSphere lights, enable the invisible checkbox, so that we do not see the light source directly.

Column
width60%

 

nParticle Settings

 


Section
Column
width40%

An nParticle system is used for the stars. To mimic stars, a VRayLightMtl is applied to it. The Color is set to RGB (255, 255, 255) and the Color Multiplier to 100.0.

Column
width60%

 

Camera Settings

 

 


Section
Column
width40%

We have two cameras in the scene, both set to the Camera and Aim control mode. Camera1 is static, and Camera2 is moving along the Semi-circular Curve.

Camera1 has a starting position that we will later update to a new position. For now, we want it to focus on the main Nebula simulator, so we get a nice preview as we work.

The starting position of Camera1:

Focal Length is set to 35.0.

Camera Aperture (mm) is set to 36.0.

The exact position of Camera1 is XYZ: [ -31.3, 10, -65.5 ].

The exact position of the Camera1_aim is XYZ: [ -0.9, 11.4, -5.7 ].

 

UI Text Box
Note that the final position of Camera1 will change later on in the tutorial, once we have created multiple Nebulas. The new coordinates will be given at that step.


Column
width60%

 


 

Section
Column
width40%

Camera2:

Focal Length is set to 45.0.

Camera Aperture (mm) is set to 36.0.

The exact starting position of Camera2 is XYZ: [ -21.0, 38.1, -125.6 ].

The exact position of the Camera2_aim is XYZ: [ 0.1, 19.2, 1.3 ].

 

Circular Curve:

Camera2 is also path constrained to a Semi-circular Curve.

The exact position of the Semi-circular Curve is XYZ: [ -10.5, 38.1, 39.4 ].

Its rotation is set to XYZ: [ 0, 4.5, 0 ].

Column
width60%

 

 


 

Section
Column
width40%

Camera2 motion path:

From frames 0 to 72, the Camera2 motionPath2_uValue is constricted so that the camera is animated along a certain section of the curve. The value at frame 0 is set to 0.0044, and frame 72 is set to 0.00487. The InTan Type and OutTan Type are both set to Linear.

 
Column
width60%

 

 

Phoenix Simulation

...

Section
Column
width40%

Go to the menu for PhoenixFD → Create → 3D Simulator.

The exact position of the Phoenix Simulator in the scene is XYZ: [ -2.0, -0.17, 0.0 ].

Open the Grid rollout and set the following values:

Fancy Bullets
typecircle
  • Scene Scale: 1.0.
  • Cell Size: 0.086 m.
  • Size XYZ: [ 363, 261, 371 ] - we keep the Simulator size small enough to cover only the emission geometry.
Column
width60%

...

 

...

 

Section
Column
width40%
Fancy Bullets
typecircle
  • Adaptive Grid: Smoke - the Adaptive Grid algorithm allows the bounding box of the simulation to dynamically expand on-demand.
    • Set a Threshold of 0.02, so that the Simulator expands when the Cells near the corners of the simulation bounding box reach a Smoke value of 0.02 or greater;
  • Extra Margin: 5.
    • The Extra Margin option is useful when the Adaptive Grid algorithm is unable to expand fast enough to accommodate quick movement in the simulation (e.g. an explosion). The Extra Margin attempts to remedy this by expanding the grid preemptively with the specified number of voxels on each side.
  • Enable Expand and Don't Shrink - this way the Adaptive grid will not contract back when there is very thin smoke at the borders of the grid.
  • In the Manual Adaptation Limits rollout, check on Enable Limits and set the values to: X: (500, 500), Y: (500, 500), Z: (500, 500) - to save memory and simulation time by limiting the Maximum Size of the simulation grid.
UI Text Box
typenote

Later in the tutorial we are going to duplicate the Simulator a few times and scatter the instances in the scene.

As we don't want to see any seams where the Simulators overlap, using the Adaptive Grid with the Enable Limits option will prevent us from creating a cropped volume at the Simulator's boundary.

Column
width60%

...

Section
Column
width40%

Here is a Preview Animation of the simulation up to this step. It looks a bit dull now and does not yet resemble anything like a nebula. 

UI Text Box
typetip

To enable the GPU Preview as seen in the video, select the Phoenix Simulator → Preview rollout → GPU Shade Preview → Enable GPU Preview.

UI Text Box
typeinfo

At this step, the nebula appears blue because the color of the VRayLightSphere1 is set to a light blue color.

Column
width60%
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/1fuEc3JceAw?version=3&loop=1&playlist=1fuEc3JceAw" frameborder="0" allowfullscreen></iframe> 

 

Adding Phoenix Turbulence

...

Section
Column
width40%

Here is a Viewport Preview showing the result of the simulation so far.

Column
width60%
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/j-m2JJa5TJQ?version=3&loop=1&playlist=j-m2JJa5TJQ" frameborder="0" allowfullscreen></iframe> 

 

Input

...

Section
Column
width40%

Once the simulation is complete, go to the Phoenix Simulator → Input rollout.

For this tutorial we need only a static nebula, switch the Time Bend Controls → Playback Mode to Cache Index. Set the Direct Cache Index to 29.0.

UI Text Box
typetip

You can set the Direct Cache Index to any other frame you like. Different frames create different characteristics for the nebula. Later frames will have a more dispersed and smoky look, due to the Turbulence force.

Column
width60%

 

Volumetric Shading - Smoke Color

...

Section
Column
width45%

For the Smoke Color rollout, set the Based on option to Smoke. Adjust the color gradient as shown in the image.

UI Text Box
typeinfo

The Color gradient is set to blue-pink-red-purple-black, representing the smoke color at different smoke densities, from sparsest to densest. Feel free to customize the color gradient according to your preference.

Column
width55%

 

Smoke Opacity

...

...

Section
Column
width45%

For the Smoke Opacity rollout, set the Based on option to Smoke.

Column
width55%

...

Section
Column
width45%

Then, adjust the Opacity curve below, as shown in the image.

Column
width55%

...

 

...


Section
Column
width45%

Alternatively, you can simply load up a Rendering Preset using the Nebula_Rendering_Preset.mel file, that is provided with the sample scene.

Note that there is an additional .mel preset file as well, which contains additional tweaks that we'll create near the end of the tutorial.

Column
width55%

 

GPU Rendering

 

...

Section
Column
width45%

Since we are going to render a very heavy volumetric scene, we will use V-Ray GPU as our renderer.

Since Global Illumination does not contribute a lot to this scene, let's disable theGI in the Render Settings → GI tab.

Column
width55%

 

...

 

Section
Column
width45%

For preview purposes, let's make sure that only the VRayLightSphere1 is enabled. Set its Intensity multiplier to 10 for now, until we enable the other lights later on.

Column
width55%

 

 

...


Section
Column
width45%

Here is a test rendering up to this step. 

UI Text Box
typeinfo

For test rendering, we set the Sampler type to Progressive and set the Maximum render time (min) to 10.0 for the V-Ray GPU renderer. You can adjust the time limit depending on your hardware.

Column
width55%

...

Section
Column
width45%
UI Text Box
typenote

If we move the VRayLightSphere1 a little behind the nebula, or move it towards the camera, notice how the appearance of the nebula dramatically changes by simply changing the light's position.
Here are a few comparison images from left to right, with different light positions: Behind (2.5, 12, 12), Center (2.5, 12, 0), Front (2.5, 12, -12).

Column
width55%

 

Buffered Conservation

...

Section
Column
width45%

Select the Phoenix Simulator. Disable the Gravity, since a nebula supposedly forms in outer space.

UI Text Box
typeinfo

Note that since we simulated without the Temperature channel, there is no difference in the simulation results with or without gravity.

Column
width55%

...

Section
Column
width40%

Here is a test render up to this step. As you can see, after the Resimulation, we got more details in the smoky cloud, while maintaining the overall pattern formation from the base simulation.

Column
width60%

 

Simulator Duplication & Positioning

...

Section
Column
width40%

Rotate the PhoenixFDSim1 simulator -20 degrees on the Y axis.

Now we will have a more noticeable gap in the center of the nebula, for V-RayLightSphere1 to shine through. This will help to create a more pleasing composition, in tandem with the additional duplicated nebulas.

Also rotate theTorus Knot geometry -20 degrees on the Y axis as well. That way if you decide to simulate again later, the Torus Knot will already be rotated.

Column
width60%

...

 

...

 

 

Section
Column
width40%
UI Text Box
typeinfo

The table on the right provides the exact location and rotation of each Simulator instance. You can customize the transformation of each Simulator according to your preference.

Column
width60%

 

Position

Rotation

PhoenixFDSim1

-2, -0.17, 0

0, -20, 0

PhoenixFDSim2

38.5, 0, -11.5

0, 125, 0

PhoenixFDSim3

-37, 0, -3

0, -136, 0

PhoenixFDSim4

-3, 50.5, 0

121.5, 0, 0

PhoenixFDSim5

-25, 35.5, -3

87.5, -103.5, 0

PhoenixFDSim6

41.5, 54, 0

156, -58, 0

 

Final Lighting Setup

 

...

Section
Column
width40%

To make the image more interesting, turn on the other three VRayLightSphere lights (VRayLightSphere2 - 4) in the scene.

Column
width60%

...

Section
Column
width40%

Now both the lighting and volumetric simulation are ready for rendering. We'll then do some Color Corrections in the V-Ray Frame Buffer, to bring out the detail and make the image more dynamic.


Also, to render out the stars, make sure to unhide the nParticles in the scene, and then do a render and proceed to the next step.

Column
width60%

 

V-Ray Frame Buffer & Color Corrections

 

...

Section
Column
width45%

Open the V-Ray Frame Buffer and use the Create Layer icon to add layers for Filmic Tonemapping, Color Balance, Curves, White Balance and Lens Effects.

UI Text Box
typetip

Using V-Ray 5 as a render engine gives us the advantage of using Filmic tonemapping directly in the new VFB. However, if you are using an older version of V-Ray for Maya, you can get a similar effect by using a proper LUT.

Column
width55%

...

Section
Column
width45%

Alternatively, you can simply load up the Color Corrections Preset from the Nebula_VFB_CC.vfbl file that is provided in the sample scene.

Column
width55%

 

Smoke Color Absorption

 

...

Section
Column
width45%

As a final step and to further enhance the realism of the nebula, let's also introduce some Color Absorption, which controls the color of the volumetric shadows and the tint for the objects seen through the volume. Select the Phoenix Simulator, go to Rendering  Smoke Opacity.

Set the Absorption Constant Color to a green RGB (91, 96, 55).

UI Text Box
typeinfo

The absorption color here is basically complimentary to the purple color of the nebula. However, you can feel free to choose another color.

Note that when the Constant Color is set to a darker color, it will appear more opaque (dense). Meanwhile, brighter colors make the volume more transparent. You can play with this parameter to find something that suits your preference.

Column
width55%

 

...

 

Section
Column
width40%

Alternatively, you can load in the final preset file Nebula_Rendering_Preset_02.mel which contains the final Absorption Constant Color as well.

Column
width60%

 

Final Results

...

...

Section
Column
width40%

Here is the final rendered image with the Absorption Color and Color Corrections we set up earlier.

Column
width60%

...