defineDomeLight#

Fully qualified name: usdex::core::defineDomeLight

pxr::UsdLuxDomeLight usdex::core::defineDomeLight(
pxr::UsdStagePtr stage,
const pxr::SdfPath &path,
float intensity = 1.0f,
std::optional<std::string_view> texturePath = std::nullopt,
const pxr::TfToken &textureFormat = pxr::UsdLuxTokens->automatic,
)#

Creates a dome light with an optional texture.

A dome light represents light emitted inward from a distant external environment, such as a sky or IBL light probe.

Texture Format values:

  • automatic - Tries to determine the layout from the file itself.

  • latlong - Latitude as X, longitude as Y.

  • mirroredBall - An image of the environment reflected in a sphere, using an implicitly orthogonal projection.

  • angular - Similar to mirroredBall but the radial dimension is mapped linearly to the angle, for better sampling at the edges.

  • cubeMapVerticalCross - Set to “automatic” by default.

Note

The DomeLight schema requires the dome’s top pole to be aligned with the world’s +Y axis. In USD 23.11 a new UsdLuxDomeLight_1 schema was added which gives control over the pole axis. However, it is not widely supported yet, so we still prefer to author the original DomeLight schema and expect consuming application and renderers to account for the +Y pole axis.

Parameters:
  • stage – The stage in which the dome light should be authored

  • path – The path which the dome light prim should be written to

  • intensity – The intensity value of the dome light

  • texturePath – The path to the texture file to use on the dome light.

  • textureFormat – How the texture should be mapped on the dome light.

Returns:

The light if created successfully.