Reflection Planes

You can create reflections in your scene by enabling the simple reflection rendering option. This option gives you the ability to specify not only the coordinates of the reflection plane but the fading and opacity as well. When fading is enabled, the reflection plane fades when viewed from a very shallow angle.

A scene rendered with a reflection plane and the fade option enable. On the right, the reflection is fading as the camera moves away from it.

You can use the opacity parameter to specify the transparency of the reflection plane. Setting the opacity to 1 creates a completely opaque reflection plane while setting the opacity to 0 creates an entirely translucent plane. In most cases, you will want the opacity to be somewhere in between. The default value is 0.5.

In addition to these two parameters, HOOPS provides blurring and attenuation under the DirectX driver. When blurring is on, the entire reflection is softened uniformly. You can set a blurring value that ranges from 1 to 31. This value determines the size of the blur region.

On the other hand, attenuation is an effect where the model's reflection fades as it moves away from the reflection. With attenuation, you set the hither and yon planes (also known as near and far planes) which are defined as orthogonal distances from the reflection's location. At the hither plane, the image is the most opaque. As it moves toward the yon plane, attenuation is applied linearly until the model is no longer visible beyond that distance. Each pixel's overall alpha value is calculated by multiplying the model's alpha, the reflection's opacity, fading (if enabled) and the attenuation value (if enabled).

HC_Set_Rendering_Options("simple reflection=(on,plane=(0,1,0,1),fading=on,opacity=0.5,attenuation=(hither=1,yon=2),blur=2)");

The above code snippet uses the simple reflection rendering option to create a reflection plane with fading, opacity and blur turned on. The attenuation is enabled with hither and yon distances defined as well.

An urn rendered with a reflection plane with attenuation enabled such that the top of the urn fades away in the reflection.

Prior to Release 17, the reflection plane rendered exactly what was set to visible in the model. Thus, if lines were visible, then lines would be rendered in the reflection plane. Now, the simple reflection feature has its own visibility suboption that allows you to control what is rendered in the reflection plane. As a result, you can use the visibility suboption to independently control whether edges, faces, lines, text, polygon, images, vertices and markers are rendered. The default setting is "visibility= (everything=off, faces=on, lights=on)".

The figure shows a model rendered with edges visible while the model in the reflection plane has the visiblity for edges turned off.

top_level:2 prog_guide:0 prog_guide/3DGS:5