The Autodesk.Revit.DB.SkyBackgroundSettings class represents the settings for the sky background of a Revit project.
doubleThe height of the horizon above the ground plane.
doubleA value between 0 and 1 that determines the brightness of the sky.
ColorThe color of the ground plane.
boolWhether the ground plane is visible or not.
ColorThe color of the sky at the zenith.
ColorThe color of the sky.
GlareSettingsThe settings for glare effect.
To set the sky background settings of a Revit project, create a new instance of Autodesk.Revit.DB.SkyBackgroundSettings, set the desired properties, and assign it to the Autodesk.Revit.DB.RenderingImageSettings.SkyBackgroundSettings property.
Example:
SkyBackgroundSettings skySettings = new SkyBackgroundSettings();
skySettings.HorizonHeight = 5;
skySettings.SkyBrightness = 0.8;
skySettings.GroundColor = new Color(100, 100, 100);
skySettings.GroundPlaneVisible = true;
skySettings.ZenithColor = new Color(150, 150, 255);
skySettings.SkyColor = new Color(255, 255, 255);
skySettings.GlareSettings = new GlareSettings(0.5, 5, true);
imageSettings.SkyBackgroundSettings = skySettings;
The sky background settings can affect the appearance of renderings, walkthroughs, and elevations in a Revit project. By adjusting the horizon height, sky brightness, and colors, you can create different lighting conditions and moods. By enabling the glare effect, you can simulate the visual sensation of looking directly at the sun. The sky background settings can also be exported to a panoramic image file for use in virtual reality applications.