FastHDR

Most 3D scenes are lit by an HDRI – this is called image-based lighting. We found a way to make HDRI loading in three.js and Needle really nice.

HDR environments in the FastHDR format load 10x faster than EXR and 5x faster than UltraHDR. They also use 95% less GPU memory, and don't cause stuttering during loading.

On this page, you find free-to-use environments in this format. You can use them in Needle Engine, or any three.js-based app.

"KTX2-supercompressed Prefiltered Mipmapped Radiance Environment Maps in UASTC HDR 4x4 format" just doesn't roll off the tongue, but if you want to learn more, stay tuned for our technical deep-dive.


View Environments
download
Download 1.9 MB
link
Copy URL

How to use FastHDR environments

FastHDR environments are preprocessed PMREM files, supercompressed in the GPU-friendly KTX2 format. They make startup of your app faster, by a lot. Select your tool below to learn more.

Environment maps in three.js are loaded using EXRLoader or HDRLoader, and then processed with PMREMGenerator for physically plausible reflections and background blur. When using FastHDR files, you can skip the PMREM generation step – directly load the files using KTX2Loader, and assign them to the scene's environment and background.

Three.js: KTX2Loader

import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';

// Initialize KTX2 loader. The transcoder path can come from three.js or Needle.
const ktx2Loader = new KTX2Loader();
ktx2Loader.setTranscoderPath('https://cdn.needle.tools/static/three/0.179.1/basis2/');
ktx2Loader.detectSupport(renderer);

// Load an HDRI image in FastHDR format
ktx2Loader.load('https://cdn.needle.tools/static/hdris/ballroom_2k.pmrem.ktx2', (texture) => {
    // Make sure to assign the correct mapping
    texture.mapping = THREE.CubeUVReflectionMapping;
    scene.environment = texture;
    scene.background = texture;
});

Live Example on Stackblitz

Company Roadmap FAQ Compare Articles HDRIs Report Problem

Send us a message

Please enter your message below. We will get back to you as soon as possible.
Contact

Send us a message

Please enter your message below. We will get back to you as soon as possible.
Imprint