Mastering Light Attributes in SAMSON’s Node Specification Language

As a molecular modeler, are you struggling to efficiently control light nodes in your molecular scenes? Understanding light in molecular visualization can be key to highlighting crucial details in a project, but knowing how to apply specific attribute controls to light nodes isn’t always intuitive. That’s where SAMSON’s Node Specification Language (NSL) comes in handy. The light attribute space within NSL provides precise tools to manage light nodes effectively. In this blog post, let’s explore the essential light attributes available in SAMSON.

The light attribute space in SAMSON matches only light nodes and allows users to control their properties. This space has a dedicated short name, li, which can be combined with various attributes for concise and effective queries. Below is a breakdown of the most important light attributes and how to utilize them:

Attribute Name Short Name Possible Values Examples
hidden h true, false li.h, not li.h
name n Strings in quotes li.n "A", li.n "L*"
selected true, false li.selected, not li.selected
selectionFlag sf true, false li.sf false, li.sf
visibilityFlag vf true, false li.vf false, li.vf
visible v true, false li.v, not li.v

Key Use Cases

These attributes allow users to conduct powerful searches or manipulations in SAMSON. For instance:

  • Check visibility: Use li.v to focus on light nodes that are visible and filter out invisible ones.
  • Group by names: Filter light nodes with specific naming conventions like li.n "Spotlight" or patterns like li.n "L*" to organize your lighting setup.
  • Handle selections: To interact only with selected light nodes, use li.selected. This simplifies workflows in complex visualizations.
  • Manage visibility flags: Tweak light node states with li.vf false or li.vf true without complicated navigation.

Key Differences Across Attributes

One thing to note is how certain attributes differ in usage. For example, the selected attribute in the light space does not have a short name like s, even though it is inherited from the node attribute space. Familiarizing yourself with such nuances can save time and avoid potential confusion.

Why Focus on Light Attributes?

Light plays an essential role in molecular visuals, significantly impacting how details are perceived and interpreted. By learning to control and query light nodes using NSL, you can enhance your visualization workflow, making key aspects of your models stand out clearly and elegantly.

To dive deeper, visit the light attribute documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at www.samson-connect.net.

Comments are closed.