Introduction

Envrionment map is the standard way to simulate reflection on curved surface without raytrace. But how to take occluion into account? In the areas that are self-occluded or blocked by other objects in the scene, objects can't reflect environment.

This problem can still be solved by the ambient occlusion approach. The occlusion information is computed by shooting rays at R-the direction of reflection. If the ray hits any object, the result will be 0;if it hits nothing, we will get 1 and the environment map is reflected.

New Features

The template occsurf has be slightly modified. You can control:

Turn on "userefl". Set very large "maxdistance" and small "maxangle". Then the occpass of reflection can be rendered.

maxangle=0.0 (perfect mirrored)

maxangle=6.0 (blurred)

maxangle=24.0 (except for the cube)

How to Use It

There are several ways to compute environment reflection in PRMan, but the basic idea is same: to add some color onto the base surface. If the color is black there is no reflection, so a very dark object can hardly be seen in reflection.

1.Create a Environment Light in palette and attach it to a Maya ambient light. So it has a global effect.

2.Select occenvmap in the pop-up menu of "Environment". Of course the template should be installed first.

3.The function has a string box "occpass" in which you can load the image containing the occlusion information. As long as our animation doesn't change we can keep reusing it.

4.Suppose you finish the surface Plastic_5, use it as the Base of a AdditiveFX. Connect a Collect_Reflections to its ch1. Then attach the AdditiveFX to your object instead of Plastic_5.

5.Collect_Reflections is a special function only response to Environment Light. But you can't preview the effect by render its icon. It's time to launch the final render.

Environment without occlusion:

Occlusion pass:

Environment with occlusion:

Conclusion

Reflection occlusion can produce some complexity of a full ray-traced render, partly at least, but without the expense of the latter.


Go to my homepage for more details about ambient occlusion.

Nov 25,2002