parti volume shaders pt1

6
Parti volume shaders & 3dsmax Prepared by: Jeff Patton First and foremost, this document is not intended to represent “official documentation” from either Autodesk or mental images. It’s merely a compilation of my own personal notes and experiences with using the parti volume shaders & 3dsmax. I’ve prepared this information to help demystify & explain some common usages of the parti volume shaders. I also assume that users reading this document will have a basic understanding of mental ray and 3dsmax. If not, be sure to spend some time with the official documentation that ships with 3dsmax.

Upload: daniel-reiher

Post on 12-Mar-2015

137 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Parti Volume Shaders Pt1

Parti volume shaders & 3dsmaxPrepared by: Jeff Patton

First and foremost, this document is not intended to represent “official documentation” from either Autodesk or mental images. It’s merely a compilation of my own personal notes and experiences withusing the parti volume shaders & 3dsmax. I’ve prepared this information to help demystify & explain some common usages of the parti volume shaders. I also assume that users reading this document will have a basic understanding of mental ray and 3dsmax. If not, be sure to spend some time with the official documentation that ships with 3dsmax.

Page 2: Parti Volume Shaders Pt1

Parti volume camera effect

To create volumetric lighting effects, you can use the parti volume camera shader. While this shader is applied globally to your entire scene, you can have some control over the effect by specifying which lights contribute to the volume effect from within the Parti Volume shader settings.

First, take a look at some real world examples of “volume lights” in action:

Both images were found on Google.com

Light scattering due to moisture particles in air

Typical volume light setup using the parti volume camera shader:Begin by adding a Parti Volume camera shader to the Volume Camera Shader slot in the Camera Effects rollout. Then instance copy this Parti Volume shader to your material editor. Doing so will allow you to edit the parameters of this shader.

Page 3: Parti Volume Shaders Pt1

Now that you’ve instanced the Parti Volume shader to the material editor (MEDIT), you can see & adjust the settings. Here’s a simple explanation of the basic Parti Volume settings:

Values = 0 or 1. This If this is set at 1, then you’ll use the height setting to specify where scattering can occur. For more info, see the height note below. If mode is left at 0 (default), then scattering will occur throughout the “volume”.

Scatter color = volume color. Example, if you set this color to red, then the volume/scatter effect will be red.

Extinction controls how much light is absorbed or scattered in the medium. Higher values will make a denser/darker effect. Lower values will make a brighter effect. 0.0 will make no effect.

R, G1 (-1.0 to 0), and G2 (0 to +1.0) set the type of scattering. If left at the default values, isotropic (equal scattering) scattering occurs. Non-isotropic scattering can be configured here as well:

Rayleigh: R 0.50, G1 -0.46, G2 0.46Hazy Mie: R 0.12, G1 -0.50, G2 0.70

Murky Mie: R 0.19, G1 -0.65, G2 0.91

Non Uniform setting defines whether the volume effect is uniform or not. Valid range = 0.0 (uniform), to 1.0 (cloud-like density). Values in-between 0 and 1 will mix this effect.

Height is used only when mode = 1. When defined, scattering occurs BELOW the specified height setting.

Min/Max step length basically determines the scattering accuracy. Smaller numbers = more accurate effects, but slower renders. Higher values will speed up the render, but can create artifacts.

Min = 0.05 / Max = 0.1 Min = 1.0 / Max = 5.0

More information on scattering modes (non 3dsmax related):http://www.imagico.de/pov/water/water04.html

Page 4: Parti Volume Shaders Pt1

I’ve supplied a sample file here: http://jeffpatton.net/Postings/Max9-Parti-volume-camera.zipDownload, unzip, and open the file in Max9.

If you render the scene as is, here is the result you should see:

The render is fairly quick, however there are noticeable artifacts. These are stepping artifacts; to remove them you can modify the minimum and maximum step length parameters of the Parti Volume shader. Currently the settings are 1.0” minimum, and 5.0” maximum. Make the following changes to the Parti Volume shader and render again:

Minimum Step Length = 0.1Maximum Step Length = 0.5

Resulting render:

Notice how the stepping artifacts are now eliminated. However, I’m sure you also noted the increase in render time. Therefore, your min/max step length settings will provide a way for you to balance speed vs. quality.

Page 5: Parti Volume Shaders Pt1

Now, some important information on the actual construction of this scene.

You can use any light source you wish. HOWEVER, there currently seems to be a problem (bug?) when using photometric lights and the Parti Volume shader. While the volume area appears in the render, there are no volumetric shadows produced. A bug report has been submitted on this.

I’ve added a light shader to the photometric light source in this scene as a band-aid fix for the problem. However, doing so is actually changing the light type…so is it still considered a photometric light? I can’t say for certain, but I doubt it.

There’s a single sided plane at the “back” of the scene. The normals of this plane are facing towards the camera. This is important because if there were no geometry behind the light, the Parti Volume camera effect would not be visible. You don’t have to use a plane like this, you can use any geometry you like…just make sure something is behind the volume effect.

Page 6: Parti Volume Shaders Pt1

I think that covers the basics of using the Parti Volume camera effect shader. For good measure, I’ll include another sample file that illustrates how to use the shader list to build multiple volume effects.

Render result :(using low quality stepping for faster rendering)

Download link: http://jeffpatton.net/Postings/Max9-Parti-volume-camera2.zip

Part 2 coming soon