Contents

ModelDebugOptionsComponent.VisualizationMode.emissive

A mode that displays the emissive channel of a material as the surface color.

Declaration

case emissive

Discussion

Add a ModelDebugOptionsComponent with a visualization mode of emissive to an entity to tell RealityKit to draw that entity’s calculated emissive values as its surface color. The emissive channel indicates which parts of the entity emit light. When using this mode, RealityKit draws any part of the entity that emits light in the color of the light it emits and draws any part of the entity that doesn’t emit light as black.

RealityKit calculates emissive for entities with a SimpleMaterial and for entities imported from a USDZ file. For other entities, this option has no effect.

Here’s how to enable roughness visualization for an entity:

if let television = try? await ModelEntity(named: "tv_retro") {
    let component = ModelDebugOptionsComponent(visualizationMode: .emissive)
    television.components.set(component)
}

None

emissive

[Image]

[Image]

See Also

Visualization modes