Have you ever opened a complex molecular model in SAMSON, added lights to enhance your rendering, and still ended up with a mysteriously dark or underlit scene? You’re not alone. One common challenge molecular modelers face is understanding why lights they’ve added to the scene aren’t showing any visible effect.
This issue may be due to visibility settings, which are precisely what the Node Specification Language (NSL) for lights in SAMSON is designed to help with. In this post, we’ll walk you through a few critical light visibility attributes that can save you precious time—and possibly your lighting setup.
Why You Might Not Be Seeing Your Lights
In SAMSON, all nodes—including light nodes—can be toggled visible or hidden through specific attributes. These include straightforward ones like visible, but also deceptively subtle ones like visibilityFlag and hidden. Even if a light node exists in your scene, it may not contribute to illumination if any of these settings are wrong.
li.v – The visible attribute
This one is most direct. If li.v is false, your light is effectively off the stage. For example:
|
1 |
li.v |
…returns all visible light nodes. Use:
|
1 |
not li.v |
…to find the ones that are currently hidden.
li.vf – The visibilityFlag attribute
This flag can override the default visibility of a light node. Think of it as a more abstract toggle controlled potentially by external factors or inherited visibility states. If it’s false, this can prevent your light from appearing even if li.v is true.
|
1 |
li.vf false |
…lets you detect lights that have been turned off via this flag.
li.h – The hidden attribute
This is inherited from the generic node specification, and applies to all nodes, including lights. It might sound redundant, but it’s another gatekeeper of visibility. Hidden lights won’t show effects either.
|
1 |
li.h |
…gives currently hidden lights. Try toggling this attribute if your scene still isn’t lighting up.
Workflow Tip: Diagnosing Light Node Issues Quickly
If you suspect some lights in your scene aren’t active, run a few NSL queries like:
not li.vli.vf falseli.h
This will help you detect lights that are present but not contributing. You can then adjust their attributes directly or through your scripts to restore proper lighting.
Wrap-up
Understanding how the visible, visibilityFlag, and hidden attributes interact gives you full control over lighting in complex molecular scenes. This is especially useful when creating presentations, performing visual analyses, or preparing publication-ready materials.
To dive deeper into all NSL light attributes, check the official documentation: SAMSON NSL Light Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
