ModelDebugOptionsComponent.VisualizationMode.bitangent
A mode that displays the surface bitangent vectors as a color.
Declaration
case bitangentDiscussion
Add a ModelDebugOptionsComponent with a visualization mode of bitangent to an entity to tell RealityKit to draw that entity’s calculated surface bitangent vectors as its surface color. A bitangent vector is an imaginary line that’s orthagonal to both the normal and tangent vectors. RealityKit draws a bitangent vector by using its X, Y, and Z values as the R, G, and B components of the color.
RealityKit calculates bitangents for entities with a VideoMaterial, UnlitMaterial, or SimpleMaterial as well as for entities imported from a USDZ file. If an entity doesn’t fall within those parameters, this option has no effect on the rendering.
Here’s how to enable bitangent visualization for an entity:
if let television = try? await ModelEntity(named: "tv_retro") {
let component = ModelDebugOptionsComponent(visualizationMode: .bitangent)
television.components.set(component)
}
| |
|---|---|
[Image] | [Image] |
See Also
Visualization modes
ModelDebugOptionsComponent.VisualizationMode.noneModelDebugOptionsComponent.VisualizationMode.normalModelDebugOptionsComponent.VisualizationMode.tangentModelDebugOptionsComponent.VisualizationMode.baseColorModelDebugOptionsComponent.VisualizationMode.textureCoordinatesModelDebugOptionsComponent.VisualizationMode.finalColorModelDebugOptionsComponent.VisualizationMode.finalAlphaModelDebugOptionsComponent.VisualizationMode.roughnessModelDebugOptionsComponent.VisualizationMode.metallicModelDebugOptionsComponent.VisualizationMode.ambientOcclusionModelDebugOptionsComponent.VisualizationMode.specularModelDebugOptionsComponent.VisualizationMode.emissiveModelDebugOptionsComponent.VisualizationMode.clearcoatModelDebugOptionsComponent.VisualizationMode.clearcoatRoughnessModelDebugOptionsComponent.VisualizationMode.lightingDiffuse