Skip to content

Environmental Settings Profile โ€‹

Environmental Settings Profiles store a variety of settings that affect how a scene is rendered. The main advantage of environmental settings profiles is that they make it easy to load presets into a camera. Use FxCamera to load and save profiles.

Properties โ€‹

NameTypeDefaultAccessDescription
atmIntensity1f1.0๐ŸŸฉ๐ŸŸฅAtmospheric scattering intensity
atmMieColor1c0xFFFFFFFF๐ŸŸฉ๐ŸŸฅAtmospheric scattering mie color
atmMieDensity1f1.0๐ŸŸฉ๐ŸŸฅAtmospheric scattering mie density
atmOzoneColor1c0xFF69FF6E๐ŸŸฉ๐ŸŸฅAtmospheric scattering ozone color
atmOzoneDensity1f1.0๐ŸŸฉ๐ŸŸฅAtmospheric scattering ozone density
atmPhase1f1.0๐ŸŸฉ๐ŸŸฅAtmospheric scattering phase (aka MieG)
atmRayleighColor1c0xFF2D68FF๐ŸŸฉ๐ŸŸฅAtmospheric scattering rayleigh color
atmRayleighDensity1f1.0๐ŸŸฉ๐ŸŸฅAtmospheric scattering rayleigh density
bgColor1c0xff555555๐ŸŸฉ๐ŸŸฅBackground color
bgVisible1btrue๐ŸŸฉ๐ŸŸฅTurn on background
groundColor1c0xFF4444๐ŸŸฉ๐ŸŸฅGround color
groundHorizon1f0.4๐ŸŸฉ๐ŸŸฅGround horizon size
groundVisible1btrue๐ŸŸฉ๐ŸŸฅDisplay ground
iblBlur1f0.0๐ŸŸฉ๐ŸŸฅImage base lighting blur amount
iblFile1s"default"๐ŸŸฉ๐ŸŸฅImage base lighting Cubemapย FileID (no list, wildcard or filter)
iblIntensity1f1.0๐ŸŸฉ๐ŸŸฅImage base lighting intensity
iblRotationi10๐ŸŸฉ๐ŸŸฅImage base lighting cubemap rotation angle in degrees
skyModei10๐ŸŸฉ๐ŸŸฅSkyMode
sunAzimuth1f-110๐ŸŸฉ๐ŸŸฅSun azimuth in degrees
sunCastShadows1btrue๐ŸŸฉ๐ŸŸฅTurn on shadows cast by sun
sunColor1c0xffffffff๐ŸŸฉ๐ŸŸฅSunlight color
sunDiskVisible1btrue๐ŸŸฉ๐ŸŸฅShow sun disk
sunDiskRadius1f10๐ŸŸฉ๐ŸŸฅRadius of the sun disk
sunElevation1f50๐ŸŸฉ๐ŸŸฅSun inclination in degrees
sunIntensity1f0.5๐ŸŸฉ๐ŸŸฅSunlight intensity
unilightColor1c0xffffffff๐ŸŸฉ๐ŸŸฅUniform lighting color
unilightIntensity1f0.5๐ŸŸฉ๐ŸŸฅUniform lighting intensity
Details

Type
1b: boolean
1c: color (integer)
1i: integer
1f: float
1s: string
2b: 2-component boolean vector
2i: 2-component integer vector
2f: 2-component float vector
3b: 3-component boolean vector
3i: 3-component integer vector
3f: 3-component float vector

Access
๐ŸŸฉ : Property value can be read with FxFile.Get
๐ŸŸฅ : Property value can be changed with FxFile.Set
โŒ : Property value is read-only and can't be changed

Create โ€‹

To create a new environmental settings profile use FxFile.Create with FileType 557.

lua
profileID = FxFile.Create(557);
profileID = FxFile.Rename(557, profileID, "MyProfile"); -- rename new profile
FxFile.Open(557, profileID); -- open new profile

Files โ€‹

The global environmental settings profile is located at documents\Foxel\default.fxlenv. It saves the settings of the main editing viewport. Other custom profiles are saved as shared files in Shared\EnvironmentalSettings\ with the extension .fxlenv.