The instructions on this page guide you through the process of creating a nebula using Chaos Phoenix 4 and V-Ray GPU.

Overview


This is an Intermediate Level tutorial. Even though no previous knowledge of Phoenix is required to follow along, re-purposing the setup shown here to another shot may require a deeper understanding of the host platform's tools, and some modifications of the simulation settings.

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 six instances. For better rendering performance we will render the scene using V-Ray GPU.

The simulation requires Phoenix 4.30 Official Release and V-Ray 5 Official Release for 3ds Max 2017 at least. You can download official Phoenix and V-Ray from 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.

 

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

Download Project Files

 

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

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.

The Phoenix solver is not affected by how you choose to view the Display Unit Scale - it is just a matter of convenience.

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

Go to Customize → Units Setup and set Display Unit Scale to Metric Meters. Also, set the System Units so that 1 Unit equals 1 Meter.

 

Scene Layout


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

The initial scene setup consists of the following elements:

  1. Torus Knot geometry used for the smoke source.
  2. Phoenix Fire/Smoke Simulator (PhoenixFDFire001).
  3. Phoenix Fire/Smoke Source emitting Smoke from the Torus Knot geometry.
  4. Omni 001 light for lighting.
  5. V-Ray Camera 001 for look-development rendering.
  6. PHXTurbulence for adding variation to the Smoke's motion.

 


 

The final scene setup consists of the following elements:

  1. Five instances of Phoenix Fire/Smoke Simulator (PhoenixFDFire002 ~ 006).
  2. Two more Omni lights (Omni 002 and Omni 003) for lighting.
  3. Circle shape.
  4. V-Ray Camera 002 for final rendering, the camera is path constrained to the Circle shape.
  5. PCloud particle system used as stars.

The Omni002 and Omni003 lights are turned off, and the PCloud is hidden in the "nebula_max2017_start.max" scene.

 


 

The geometry used for the smoke emission is a Torus Knot. To give it a more organic look, we have applied a Noise modifier to it.

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.

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

 

Lights, Cameras and Environment


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 environment particle settings.

 


Lights Settings


Details for the three Omni lights.

 

Position

Multiplier

RGB Color

Decay Type

Start

Omni001

2.5, 0.0, 12.0

2.0

146, 168, 239

Inverse Square

1.0

Omni002

-30.0, 1.0, 33.0

3.0

23, 81, 230

Inverse Square

0.3

Omni003

-32.5, -7.0, 8.5

0.4

47, 89, 224

Inverse Square

1.0

 


 

For every Omni light, we enable the Atmosphere Shadows option in the Shadow Parameters rollout.

Make sure Atmosphere Shadows is enabled when using native 3ds Max lights in the scene. Otherwise, the volumetric effects won't cast shadows.

 

Environment Particle Settings


A PCloud particle system is used for the stars. To mimic stars, a VRayLight Material is applied to it. The color is set to RGB (255, 180, 107) and the Multiplier to 0.5.

 

Camera Settings


We have two cameras in the scene. VRayCam001 is static and VRayCam002 is moving along the Circle shape. Both cameras are set to:

Film speed is set to 800.0.

F-Number is set to 1.4.

Shutter speed is set to 50.0.

 

The exact position of the VRayCam001 is XYZ: [ 3.0, 105.0, 8.0 ].

The exact position of the VRayCam001.Target is XYZ: [ 2.0, -2.5, 12.8 ].


The exact position of the VRayCam002 is XYZ: [ 2.302, 106.991, 12.0 ].

The exact position of the VRayCam002.Target is XYZ: [ 0.5, -2.0, 23.0 ].

 


 

VRayCam 002 is path constrained to the Circle shape.

From frame 0 to frame 60, the %AlongPath is keyframed and animated from 21.0 to 25.0.

 

The exact position of the Circle shape is XYZ: [ 0, -3, 12.0 ].

Its orientation is set to XYZ: [ 0, 0, 13.2 ].

 

Phoenix Simulation


Go to Modify Panel → Create → Geometry → PhoenixFD → FireSmokeSim.

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

Open the Grid rollout and set the following values:

  • Scene Scale: 1.0.
  • Cell Size: 0.086 m.
  • Size XYZ: [ 363, 371, 261 ] - we keep the Simulator size small enough to cover only the emission geometry.
  • Adaptive Grid: Smoke - the Adaptive Grid algorithm allows the bounding box of the simulation to dynamically expand on-demand. With a Threshold of 0.02, 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.
  • Enable Max Expansion: X: (500, 500), Y: (500, 500), Z: (500, 500) - to save memory and simulation time by limiting the Maximum Size of the simulation grid.

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

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

 


 

Select the Phoenix Simulator → Output rollout and enable the output of Smoke, Wavelet, and Velocity Grid Channel

Any channel that you intend to use after the simulation is complete, needs to be cached to disk. For example:

  • Velocity is required at render time for Motion Blur.
  • Temperature is usually used at render time to generate Fire.
  • Wavelet is used for Wavelet turbulence when performing a Resimulation.

 

Adding PCloud to the Exclude List


Select the Phoenix Simulator → Go to Scene Interaction rollout. Add the PCloud to the exclusion list. 

Though every hidden object is excluded by default, in later steps, we will unhide the PCloud. However, there is a chance to forget to hide it again and it may affect our fluid simulation. Therefore, we added the PCloud to the exclude list as a precautionary step.

 

Adding Fire/Smoke Sources


Create a Phoenix Fire/Smoke Source in the scene: Modify Panel → Create → Helpers → PhoenixFD → PHXSource.

Press the Add button to choose which geometry to emit and select the Torus Knot entry in the Scene Explorer.

 


 

For PHXSource:

Set the Emit Mode to Surface Force, Outgoing Velocity to 1.0 and Smoke to 4.0. Disable the Temperature option.

As we want our nebula to appear more opaque in its core, we give the smoke a higher amount.

 


 

Set the Simulator → Simulation rollout → Stop Frame to 38.

The Timeline checkbox needs to be disabled for the numerical field to become untemplated. By default, the Timeline checkbox specifies the Start Frame as the first frame on the Timeline.

The shape of the simulated smoke changes over time. You can use more or less frames for the simulation, to get the desired formation of the smoke (nebula). In this case, we choose to simulate to frame 38.

 


 

Here is a Preview Animation of the simulation up to this step. It looks a bit dull now. It isn't anything like a nebula at all.

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

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

 

Adding Phoenix Turbulence


Create Helpers Phoenix FD PHXTurbulence.

Position to XYZ: [ -2.5, 9.0, 14.0 ].

Set the Strength to 350.0 and the Size to 30.0 m.

Reduce the Fractal Depth to 1.

Set the Decay type to Inv square.

Then go to the Fire/Smoke Simulator and run the simulation again.

The position of the Phoenix Turbulence does affect the result of the simulation. If you didn't set the exact position as mentioned above, you probably won't get the exact same results.

 


 

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

 

Input


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 Mode to Cache Index. Set the Direct Cache Index to 38.0.

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

 


 

Due to the sheer amount of the cache data, if your viewport become less responsive, you can select the Phoenix SimulatorGo to Preview rollout → Read Cache for Preview, and temporarily change it to Don't Preview the Caches. Just be sure to switch back to Always when you need to see the cache preview.

In the final scene "nebula_max2017_final.max", the simulators are set to Don't Preview Caches for the same reason.

 

Volumetric Shading Settings


Go to the Fire/Smoke SimulatorRendering rollout, click on Volumetric Options.

For the Fire rollout, set the Based on option to Disabled.

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

For the Smoke Opacity rollout, set the Based on option to Smoke. Adjust the curve as shown in the image.

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

 



Alternatively you can simply load up a Rendering Preset from the nebula_rendering_preset.tpr file that is provided in the sample scene.

 

GPU Rendering


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

The scene contains only three omni lights. To speed up rendering of volumetric effects, go to V-Ray Settings → Global Switches → Adaptive lights drop-down to Full Lights Evaluation.

 



Here is a test rendering up to this step. 

For test rendering, we set the Time Limit to 10.0 for the V-Ray GPU renderer. You can adjust the time limit depending on your hardware.

The lights in the provided scene file are carefully positioned in the crevices of the smoke formation. If you didn't follow the exact steps of this tutorial (i.e: smoke is emitted from a different geometry), your render may be completely dark. You can nudge the lights to a sparse space so they won't be occluded by the smoke.

 



If we move the Omni 001 light a little behind or move it towards the camera, notice how the nebula dramatically changes, by just changing the light's position.
Comparison images from left to right, with different light positions: Behind (2.5, -12, 12), Center (2.5, 0, 12), Front (2.5, 12, 12).

 

Buffered Conservation


Select the Phoenix Simulator. Disable the Gravity since a nebula supposedly forms in outer space. Change the Conservation Method to Buffered, with a Quality of 40. Set the Steps Per Frame to 2. The Buffered method has the weakest conservation strength and shortest range, but produces nice details. For in-depth information, check the Conservation documentation.

As we simulated without the Temperature channel, in this specific case, there is no difference in the simulation results with or without gravity.

 



Here is a test render up to this step. We can see a better pattern formation, compared to the results with default Dynamics settings.

 

Resimulation


Open the Phoenix Simulator → Resimulation rollout and enable Grid Resimulation.

Note that when you enable Resimulation, Phoenix will try to read the cache files for preview and rendering from the Resimulation Output Path, instead of the 'regular' Output. Don't worry if the Viewport goes blank and the preview disappears - you can always go back to the original cache files by disabling the Resimulation.

Set the Amp.Resolution to 0.2. This parameter is used to increase the resolution of the grid during the Resimulation process.

Set Amp. Method to Wavelet Nice and Wavelet Strength to 1.0.

Press Simulator → Simulation rollout → Start to begin the Resimulation.

We set the Wavelet Strength to 1.0 instead of 3 (default value), because we want to add details to our base simulation, but without overdoing it.

You can set the Amp.Resolution to an even higher value to get a more detailed result.

 


 

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.

 

Simulator Duplication


With the Phoenix Simulator selected, hold down the Shift key and using the Move Tool drag the Simulator to the side. Then in the Clone Options set the object type to Instance. Number of Copies to 5. Press OK.

Now we have six Phoenix Simulators in the scene (PhoenixFDFire001~006).

Alternatively you can use the Edit / Clone dropdown menu to duplicate the Simulator. The benefit of the Shift-Clone method we have mentioned above is that the Cloned Simulators won't be created in the same position. This way it will be easier for us to select them in the viewport.

 


 

Now move and rotate the Simulator instances in the scene, arrange them as the screenshot on the right.

Switch the render camera to V-Ray Camera 002. It is the camera that moves along the circle shape.

As all the six Simulators are exactly the same, we will have to rotate them in order to avoid any obvious repetition patterns.

 


 

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.

 

 

Position

Rotation

PhoenixFDFire001

-2, 0, -0.17

0, 0, 0

PhoenixFDFire002

38.5, -11.5, 0

0, 0, 125

PhoenixFDFire003

-37, -3, 0

0, 0, -136

PhoenixFDFire004

-3, 0, 50.5

121.5, 0, 0

PhoenixFDFire005

-25, -3, 35.5

87.5, 0, -103.5

PhoenixFDFire006

41.5, 0, 54

156, 0, -58

 


 

Here is a test render up to this step. With six Simulators in the scene, we can see the nebula now expanding to a larger region.

 


 

To make the image more interesting, turn on the other two Omni lights (Omni002 and Omni003) in the scene.

 


 

Here is a test render up to this step. Now both the lighting and volumetric simulation are ready for final rendering.


To render out the stars, unhide the PCloud in the scene, then proceed to the next step.

 

V-Ray Frame Buffer


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

Using V-Ray 5 as a render engine gives us the advantage of Filmic tonemap directly in the new VFB. However, if you are using an older version of V-Ray or 3ds Max 2017 or lower, you can get a similar effect by using a proper LUT.

 



The image is rendered using the V-Ray Frame Buffer with the color corrections and post effects set to:

Filmic tonemap:

  • Type - Hable;

  • Shoulder strength: 0.670;

  • Linear strength: 0.070;

  • Linear angle: 0.490;

  • Toe strength: 0.270;

  • White point: 7.880.

Color Balance:

  • Cyan-Red: -0.090;
  • Magenta-Green: -0.026;
  • Yellow-Blue: -0.082.

Curve: (as shown in the screenshot)

White Balance:

  • Temperature: 5429.100

Lens Effects:

  • Size: 11.110;

  • Intensity: 0.500;

  • Bloom: 0.500;

  • Threshold: 0.570.

The Filmic tonemap allows you to simulate the film response to light within the VFB.

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

 


 

Alternatively you can simply load up a Rendering Preset from the nebula_VFB.vccglb file that is provided in the sample scene.

 

Smoke Color Absorption


To further enhance the realism of the nebula, select the Phoenix Simulator, go to Rendering rollout → Volumetric Options. In the Smoke Opacity rollout, set the Absorption Constant Color to RGB (91, 96, 55).

The absorption color set here is basically complimentary to the purple color of the nebula. However, you can choose other color.

 


 

Here is the final image. You can see additional details in the nebula color thanks to the smoke absorption color settings.

 


 

And here is the final rendered result.