Sie sind auf Seite 1von 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. Its merely a compilation of my own personal notes and experiences with using the parti volume shaders & 3dsmax. Ive 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.

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.

Now that youve instanced the Parti Volume shader to the material editor (MEDIT), you can see & adjust the settings. Heres a simple explanation of the basic Parti Volume settings:
Values = 0 or 1. This If this is set at 1, then youll 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.46 Hazy Mie: R 0.12, G1 -0.50, G2 0.70 Murky Mie: R 0.19, G1 -0.65, G2 0.91
More information on scattering modes (non 3dsmax related):

http://www.imagico.de/pov/water/water04.html

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

Ive supplied a sample file here: http://jeffpatton.net/Postings/Max9-Parti-volume-camera.zip Download, 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.1 Maximum Step Length = 0.5


Resulting render:

Notice how the stepping artifacts are now eliminated. However, Im 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.

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. Ive 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 typeso is it still considered a photometric light? I cant say for certain, but I doubt it.

Theres 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 dont have to use a plane like this, you can use any geometry you likejust make sure something is behind the volume effect.

I think that covers the basics of using the Parti Volume camera effect shader. For good measure, Ill 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

Das könnte Ihnen auch gefallen