Capítulo 209 de 859

Chapter 209: UltraHDRLoader

Core Idea

A loader for the Ultra HDR Image Format.

Existing HDR or EXR textures can be converted to Ultra HDR with this tool.

Current feature set:

  • JPEG headers (required)
  • XMP metadata (legacy format, supported)
  • ISO 21496-1 metadata (current standard, supported)
  • XMP validation (not implemented)
  • EXIF profile (not implemented)
  • ICC profile (not implemented)
  • Binary storage for SDR & HDR images (required)
  • Gainmap metadata (required)
  • Non-JPEG image formats (not implemented)
  • Primary image as an HDR image (not implemented)

Key Concepts

  • type : HalfFloatType | FloatType: The texture type.

Code Examples

const loader = new UltraHDRLoader();
const texture = await loader.loadAsync( 'textures/equirectangular/ice_planet_close.jpg' );
texture.mapping = THREE.EquirectangularReflectionMapping;
scene.background = texture;
scene.environment = texture;
  • What it demonstrates: Typical usage of UltraHDRLoader.

Reference Tables

Constructor

Signature
new UltraHDRLoader( manager : LoadingManager )

Properties

PropertyDescription
`.type : HalfFloatTypeFloatType`

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) : DataTextureStarts loading from the given URL and passes the loaded Ultra HDR texture to the onLoad() callback.
.parse( buffer : ArrayBuffer, onLoad : function )Parses the given Ultra HDR texture data.
`.setDataType( value : HalfFloatTypeFloatType ) : UltraHDRLoader`

Key Takeaways

  1. UltraHDRLoader extends: Loader
  2. Most relevant properties: type.
  3. Key methods: load, parse, setDataType.

Connects To