DINO and POVray Tutorial


Material Settings: Transparency

DINO Homepage

- Introduction
- Exporting from DINO
- File contents
- Rendering the scene
Scene Settings
- Camera
- Light Sources
- Background
- Depth Effect
Material Settings
- Overview
- Finish modifiers
- Normal modifiers
- Finish + Normal
- Transparency
- Predefined Textures
- Overview
- Detail

last updated 14 Sep 2016

Transparency is a powerful feature which allows objects obscured by another object to become partially visible, by allowing light to pass through the obscuring object, revealing whats behind it.

Transparency in DINO is relatively simple: From a transparent object, only the frontmost part is drawn, using the t value to combine it with the already present objects in the scene. The order in which objects are created and drawn is important, and already using more than one transparent object can be cumbersome and the result unsatisfactory. To properly implement transparency in realtime visualization, the 3D primitives must be first sorted from back to front for every scene update. This would unacceptably slow down the visualization for already modestly complex scenes, therefore only a simplified transparency is implemented in DINO.

Ratracing on the other hand can treat transparency in a much more realistic way. As a ray hits a transparent surface, both the reflected ray as well as the ray passing through the surface are followed. In POVray, there are two types of transparency: transmit and filter. The former only diminishes the amount of light, irrespective of the color of the surface. The latter filters out some colors, subtracting them from the light passing through the surface. The transparency effect in DINO is based on transmitting light, not filtering it.

Going from the simplistic transparency in DINO to the complex one in POVray is not straighforward. Below is an example of an active site with a bound inhibitor (2OAT). The goal is to show both the structural detail of the inhibitor protein interaction as well as the shape of the binding pocket created by the active site residues. On the left is the picture as displayed in DINO, with a transparency value of 0.5. On the right is the POVray rendered scene with the written out values, using transmit of 0.5. The values for transmit and filter can be set for each object by the appropriate variable declared below the material definition, such as:

#declare _s_s_tp = 0.500;  // transmit value
#decalre _s_s_fi = 0.000;  // filter value

DINO output with render t=0.5

Default POVray output with _tp=0.5

Two tweak the display of the transparency, the surface is first rendered fully opaque. This is done by setting the transmit variable to zero, exactly opposite as in DINO. (left) Then, the finish settings are adjusted in a way that the diffuse light shapes each bump while reducing the ambient light contribution as much as possible. The specular contribution is turned off. (right)

_tp = 0.0

_tp = 0.0
ambient 0.05 diffuse 0.60 brilliance 1.7 specular 0.00 roughness 0.01

Next, the transmit value is adjusted in a way that the objects behind the surface become clearly visible but their intensity is still reduced enough so its obvious they are obscured by the surface. Also, the diffuse setting might be adjusted so that the surface itself is still fairly visible. (left) Finally, some hilight is added with the specular light contribution, just so much that the hilight does not interfere with the objects behind the surface but still adds to the surface plasticity. (right)

_tp = 0.6
diffuse 0.80

specular 0.15 roughness 0.06

The final settings:

finish {
 ambient 0.05
 diffuse 0.80  brilliance 1.7
 specular 0.15 roughness 0.06

#declare _s_s_tp = 0.6;

(c) 2001-2005 Ansgar Philippsen