MayaMan Help Contents

# PRMan 13.0.4/13.5

PRMan13.0.4/13.5 has improved point based occlusion and colour bleed mechanisms. These typically involve creation of a point cloud file in a prepass and then use it during the beauty phase to acheive the actual effect.

MayaMan supports 3 modes related to point clouds. Technical Baking which is useful for advanced users who want to create special point clouds for special purposes. A two pass solution for cases where the resulting point clouds are going to be used repeatedly so there is motivation to compute them once. An automatic prepass mode that is as easy to use as a per-frame shadow map.

The current implementation also makes provision for baking area lights into the point cloud.

## Two Pass (Disk Cached) Point Based Occlusion/Bleed

Switch the renderer to it's bake form.

Hide objects that are not to considered. MayaMan doesn't elide non-shadow casting objects as that would make it difficult to have light emit from objects that don't cast shadows... for example, light bouncing off walls of a closed environment (as they normally don't cast shadows but do need to be in the point cloud).

Put the path to a .ptc file in the 'SaveFile' box in the Global Illumination panel. Use the #f notation if you plan to generate per-frame cache files. Also enter the same value in the 'SeedFile' so that rendering in non-bake contexts will know where to look. When reusing the point clouds in other scenes you'll only need to fill in the SeedFile slot.

Use the smallest possible maxdist value, in a closed environment (ie: inside a room) you'll probably want it to be between 10 and 30% of the height of the room. Smaller maxdist values result in faster computations.

Turn on Radiance and optionally Colour Bleed in the Global Illumination panel. If you later switch on Colour Bleed you'll have to regenerate the point cloud(s), if you start with it on then the point clouds will be larger but you can use it for occlusion only without recomputing.

Choose a suitable view of the scene, control the amount of data by manipulating the render resolution.... note, there is a format scale and shading rate scale in the global illumination panel.

Do the render the create the point cloud file.

Switch back to the non-bake form of the renderer.

In both occlusion and bleed mode the ambient lights in the scene will be modulated by the occlusion amount.

#### Ray Hit Color

In occlusion mode this parameter is ignored.

#### Ray Miss Color

In occlusion mode this parameter causes an additional ambient light to be inserted into the scene if there is Miss Color' control a basic ambient intensity, if your scene is already rigged with ambient lights then it may make sense to set this to black, otherwise set it to non-black or no effect will be seen. If an environment map is present then the miss color needs to be non-black as it's used to scale the environment map lookup... that is to say, the environment map is an extra ambient light and it's intensity needs gain control.

In bleed mode the 'Ray Hit Colour' scales the amount of bounced light so it will need to be non-black for any bleed to be seen. Ray Miss colour works as explained for occlusion mode.

Render again, the scene will now contain the lighting effects.

### PTFiltering

When 'use ptfilter' is turned on the energy transfer is performed using ptfilter. Two input point clouds are created, one for the geo and one for the camera and the occlusion/bleed is only computed at those locations. When ptfilter is not being used the computation happens at render time. Pros to using ptfilter, good multi-threading, keeps expensive computations outside a context that requires a prman license. Render time application is cheap. Cons to using ptfilter, have to rebake input point clouds to change some parameters. Does not allow sophisticated environment lookups. Pros to avoiding ptfilter, good environment map handling. Less turnaround time to try coarse adjustments on some parameters. Cons to avoiding ptfilter, more memory and time used during render.

### Source Location pass

#### Bake Camera

The camera through which to compute sample. If not specified then the number of bounces and the maxdist are used to compute an adjusted location for the main camera which should be close to ideal.

#### Dice Through Main Camera

If using a bake camera then you can ask for the geo to be diced according to the main camera... this may improve point density distribution when using a bake camera.

#### Spherical Dice

If dicing through the main camera, should spherical dicing be used?

#### Add Ray Traced Indirect

In colour bleed mode this will, when enabled, add the ray traced indirect light shader to the scene during radiance baking. This can provide a good basic amount of energy in the scene though of course raytracing overhead is introduced. Keep the number of samples small.

#### Extra Ambient

This provides a way to insert some extra energy into the scene during radiance bake without the expense of raytracing but set too high will cause the geometry to appear to glow.

#### Area Light Gain

How much to ramp up the gain on area lights when computing radiance samples.

### Ptfilter Camera Locations

When enabled an extra point cloud is created through the main camera that is used to define the locations at which to compute the effect otherwise the effect is computed at every location as seen through the bake camera.

The camera location point cloud does not include locations that are not visible to the camera (ie: places that may be seen only through reflection or refraction will not have the effect computed for them.... when reflection/refraction rays are going to probe the scene then you should probably compute the effect at all locations.

### BrickMaps

If the 'seed file' name ends with '.bkm' then the resulting point cloud file will be converted to a brickmap. Brickmaps have better render time memory characteristics. The 'MaxError' setting in the Ray Traced Occlusion/Bleed Quality section is passed as the maxerror parameter to brickmake (actually, it's this value / 10 so that the useful range is slightly more sensible).

### Materials

Sometimes you might want to use a different material during computation of the the radiance point clouds (ie: more sensitive to light, or less, or differently tinted, or emmissive, etc.). If you are not using custom shaders then it's easy to do by attaching a mayaman material attributes node to the material and attaching the desired shading network to the Indirect Shader input.

## Even Easier To Use Point Based Occlusion/Bleed

This usage scenario is close to ideal and the easiest to use and is appropriate when a per-frame bake is required as it amounts to little more than a couple of extra shadow passes.

Turn on the 'Auto Bake' and setup as above except you should choose a seed/save file name that is on the temp (non-network) disk. To hide objects from the prepass use the 'Visible To Indirect Rays' toggle in the Global Illumination section of a mayaman attributes node associated with the object.

MayaMan will perform two prepasses that are much like a shadow run. The first one is rendered through the 'bake camera' and this should be set to a camera that can see all the objects that you want to be included in the computation (ie: wide enough to take in geo that will spill light into the scene), this prepass can optionally be diced with the main camera but it's not clear that there is any advantage in this and it appears to make it difficult to control the number of points generated in this pass.

The second prepass is through the main camera and is used to determine the locations at which to compute the effect. Hide objects from this pass by turning off the 'Receives Indirect' flag in the Global Illumination section of a mayaman attributes node associated with the object.

Note, of course we're not actually using ray tracing but the sentiment the toggles mentioned in the previous paragraphs expresses is exactly what is desired.

Usage scenario, tweaking lights in ambient occlusion mode... if you're just moving around lights and/or setting their colour, intensity or shadow mapping properties then turn off 'Auto Bake' after the first preview, subsequent previews will be using the same geo so there is no need to recompute the occlusion data.

## Notes on Area Lights

For efficiency, occlusion only mode point cloud generation ensures that all lights of all types are disabled.

In bleed mode the lights are evaluated normally during point cloud generation (including area lights with a reduced number of shadow samples) so that energy is injected into the scene.

When using bleed mode and the Area Light Gain is 0 then area lights are still handled the old way. If the Area Light Gain is not 0 then the point cloud generation phase will also include a bright chunk of geometry that models the light. The area lights are then suppressed during the beauty pass as the energy from it will come from the data in the point cloud.

Note that the shadows produced this way often leave something to be desired :(.

## Technical Baking

No matter what high level convenience mechanisms are in place it will sometimes be desirable to create a point cloud for subsequent manual processing. To accomidate this there are new options in the BakeChans dropdown of the MayaManMaterialAttributes node that allow baking of various types of point cloud file. Typically this process involves:

Add a MayaMan Material Attributes node to all materials that will be involved in computation and make the appropriate 3d bake channel selection.... remember, you can add one node to many materials!

Set the output directory to some location that will persist (ie: usually not the ribdir as it will often be destroyed at the end of a farmed render).

Configure the 'One Bake For All Time' flag depending upon the type of geo that this material is attached to... typically it can only be switched on for all static geo and constant lighting (ie: architectural models).

Turn on 'Consider During Bake' or it will be skipped (useful if a single scene is used to create multiple types of point clouds).

Use 'Force Bake' if you want to overwrite existing maps.

All other parameters in the Baking section are irrelevant in this mode.

NB: Turn off global illumination options like radiance/color bleed.

Choose the 'bake' form of the renderer in the basic options panel.

Control the amount of resulting data by modifying the render resolution, often a small render will catch all the detail required and will result in small point cloud files.

Render a single frame if all materials are set to One Base For All Time, otherwise render the sequence.

You will now have one or more point cloud files that contains area and (optionally) radiosity/Cs information that can be used as input to some hand crafted tool chain.

MayaMan Help Contents