When a molecular view feels flat: use light and shadows to reveal depth

A molecular scene can contain all the right structural detail and still be hard to read. At a glance, overlapping ribbons or atoms may seem to lie in one plane, and it can be difficult to tell which parts are in front or behind. The solution is not always to change the molecular model. A few rendering effects can make depth and relative position easier to perceive while you work.

In SAMSON, two useful effects for this problem are ambient occlusion and shadows. They help in different ways: ambient occlusion adds depth cues within the molecular structure, while shadows help clarify how objects are positioned relative to one another. They are real-time viewport effects, so you can adjust them as you explore a scene.

Start with ambient occlusion

Ambient occlusion darkens regions that are less accessible to light, giving the eye a cue about creases, close contacts, and depth. It can make a ribbon model easier to read without changing the structure itself.

For a quick test, switch on screen-space ambient occlusion from Visualization > Options. Compare the same view with the effect off and on. The example below shows the Ribbons visual model of 1AF6 before and after screen-space ambient occlusion.

Ribbons visual model without ambient occlusion

Ribbons visual model with screen-space ambient occlusion

Screen-space ambient occlusion is an efficient approximation, but it is sensitive to camera distance. If its appearance changes as you zoom, that is expected. SAMSON also supports object-space ambient occlusion, which is more realistic but slower. If you need to tune the effect, open Preferences > Rendering > Ambient occlusion.

Use shadows to read spatial relationships

Ambient occlusion helps reveal depth within a form; shadows are especially helpful when judging the position of one object relative to another. For example, a protein in front of a graphene sheet may be difficult to distinguish from the sheet if the viewport has few depth cues. Shadows make that separation easier to interpret.

Try switching shadows on in Visualization > Options and compare the two views below. The documented example uses 1YRF and a graphene sheet.

1YRF and graphene sheet without shadows

1YRF and graphene sheet with shadows

If you want to adjust the effect, use Preferences > Rendering > Shadows. On an older graphics card, the documentation recommends disabling shadows or choosing a lower preset if performance is an issue.

A practical comparison routine

  1. Keep the camera and scene fixed. Compare effects from the same viewpoint so you can judge what each change contributes.
  2. Enable one effect at a time. First test ambient occlusion for depth within the molecule; then test shadows for the positions of separate objects.
  3. Check more than one view. Since screen-space ambient occlusion depends on camera distance, inspect the scene at the zoom level you actually use.
  4. Choose based on the task. If close structural regions look flat, try ambient occlusion. If the relative placement of a molecule and another object is unclear, try shadows.

These effects are tools for making an interactive view easier to interpret, not substitutes for checking the structure or choosing an appropriate visual model. You can switch them off again whenever they obscure details or affect performance.

For more rendering effects and parameter locations, see the SAMSON rendering effects documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.