![]() |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The LightSource
command places the lightsource and configures shadow casting and the ambient influence on lighting.
The Alpha and Gamma parameters define the lightsource position in YASARA's
global coordinate system. The initial lightsource position is
(0/0/-infinity). It is then rotated by Alpha degrees about the X-axis, and then by Gamma degrees about the Z-axis.
The Ambience parameter defines how much ambient light is blocked by the atoms on its way into a protein. If
'Ambience' is set to 100%, atoms inside a protein will appear completely dark. If
'Ambience' is disabled, atoms inside will have the same brightness as those on the surface. Note that ambient lighting is calculated separately for each object,
so objects do not cast ambient shadows onto each other.
The Shadow parameter defines how much direct light coming from the lightsource is blocked by atoms in its way,
causing them to cast shadows onto other atoms in the scene. If 'Shadow' is set to
100%, atoms in the shadow will be completely dark. The ShadowSpeed parameter
is hardly used, since it allows to speed up shadow calculations at the cost of visual
'blinking' artifacts. When working with very large proteins, these artificts may become unnoticeable.
Both parameters, 'Ambience' and 'Shadow', affect only individual atoms
, but not ribbons, surfaces or other objects. If shadows seem to be missing on individual atoms
, even though the 'Shadow' parameter has been set correctly, this can have two reasons: first your OpenGL driver may not support the required extensions
(then install an update), or second, the shadow calculation may exhaust the available memory. The latter problem mainly occurs if there is an error in the atom coordinates,
placing one or more atoms far away from the rest (for example when reading from a corrupted
XTC trajectory). The color of darkened atoms is the same as the color of distant atoms in the
fog and can thus be changed with ColorFog
. Choosing a color other than black will lead to an unrealistic impression.
Example 1:LightSource Alpha=0,Gamma=0 Place lightsource in your back. Example 2:LightSource Alpha=45,Gamma=45 Place lightsource in the top left corner. Example 3:LightSource Alpha=180,Gamma=0 Place lightsource just in front of you, at infinite distance
(that is 'behind' all atoms). Example 4:LightSource Ambience=0 Disable ambient lighting, atoms inside a protein will be equally bright as on the surface.
Example 5:LightSource Ambience=85 Activate strong ambient lighting, atoms inside a protein will be
85% darkened. Example 6:LightSource Shadow=0 Disable shadow casting. Example 7:LightSource Shadow=65 Example macro:# EXAMPLE LightSource Clear # Style 5TIM as a ribbon LoadPDB 5tim Style Ribbon # Move lightsource to the back, so that it becomes visible LightSource Alpha=161,Gamma=49 Pos 0,-2,75 Ori -93,33,57 AutoRotate Y=0.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||