Lighting#
- class ansys.stk.core.graphics.Lighting#
Lighting in the 3D scene.
Overview#
Get or set whether or not lighting is enabled. |
|
Get or set the ambient intensity throughout the scene. |
|
Get or set the diffuse intensity from the sun. |
|
Get or set the overall brightness for the night lightβs image overlay, night overlay. |
Examples#
Control the Lighting of the 3D scene
# Scenario scenario: Scenario object
# Modify the lighting levels
manager = scenario.scene_manager
lighting = manager.scenes.item(0).lighting
lighting.ambient_intensity = 0.20 # Percent
lighting.diffuse_intensity = 4 # Percent
lighting.night_lights_intensity = 5 # Percent
Set Vehicle Lighting Properties
# Satellite satellite: Satellite object
lighting = satellite.graphics.lighting
# Settings for vehicle in sunlight
sunlight = lighting.sunlight
sunlight.visible = True
sunlight.color = Colors.Yellow
sunlight.line_width = LineWidth.WIDTH4
# Settings for vehicle in penumbra
penumbra = lighting.penumbra
penumbra.visible = True
penumbra.color = Colors.Orange
penumbra.line_width = LineWidth.WIDTH3
# Settings for vehicle in umbra
umbra = lighting.umbra
umbra.visible = True
umbra.color = Colors.Red
umbra.line_width = LineWidth.WIDTH2
Import detail#
from ansys.stk.core.graphics import Lighting