Web Analytics Made Easy - Statcounter
Skip to content

Materials#

In SAMSON, a material controls how a data graph node and its descendants should look when rendered.

Use materials when your extension needs to change visual appearance without changing the underlying scientific data. Materials are part of the rendering-side description of an object.

Key class#

The main class is SBDDataGraphNodeMaterial.

Materials can be attached to nodes and inherited by descendants, which makes them a convenient way to apply a consistent visual style to a whole subtree of the data graph.

Material appearance presets#

You can use already available material appearance presets or create your own via SBDDataGraphNodeMaterialAppearance.

Materials and color schemes#

A material is often used together with a color scheme.

The material describes rendering-related appearance, while the color scheme determines how colors are chosen. For example, a color scheme may color atoms:

  • by residue
  • by chain
  • by atom type
  • by a node property such as temperature factor or velocity

This separation is useful because it lets you vary coloring logic without redesigning the rest of the rendering style.

When to use materials#

Choose materials when you want to:

  • override or customize the appearance of a model
  • propagate a visual style through a node hierarchy
  • build a visualization mode that should not alter the underlying model state

If your extension needs a fundamentally different geometric representation, a visual model is often the right companion abstraction.

Example scenario#

Suppose your extension displays a custom nanostructure and you want to highlight regions by a computed scalar value:

  • the visual model provides the geometry
  • the material defines how that geometry is rendered
  • the color scheme maps the scalar value to colors

That split keeps rendering concerns explicit and reusable.

See also#