English
Appearance
English
Appearance
Related references:
Environment maps are mainly used to improve reflections and overall material quality, especially for PBR glTF models.
const envMap = await api.createEnvMapByHDR('/assets/studio.hdr');Passing an ArrayBuffer is also supported.
const model = await api.getObject('rabbit');
const envMap = await api.createEnvMapByHDR('/assets/studio.hdr');
await api.useEnvMapForObj(model, envMap, 1);The third parameter is the intensity. Its default value is 1.
The current implementation traverses the target object and its children, then writes the environment map to their materials. It is most effective on model-type objects.
Environment maps usually need to be tuned together with:
That combination tends to produce more stable results.