KhronosGroup / glTF-Sample-Viewer

Physically-Based Rendering in glTF 2.0 using WebGL
Apache License 2.0
1.29k stars 238 forks source link

gltf sample viewer cannot use IBL in gltf #528

Closed hyc0612 closed 10 months ago

hyc0612 commented 10 months ago

As in the test EnvironmentTest/gltf-IBL, there are ibl images (mipmap chains) in the gltf file already. Therefore, in the gltf-Sampler-Viewer-Release, the environment maps are load but ignored, and one envmap is set via the "Display - Active Environment", and the one which is in the gltf cannot be used, only preset envmap can be selected.

But according the old webnar video "Khronos gltf Tools" from 2020, https://www.youtube.com/watch?v=OnzLA_S8DfI, https://www.khronos.org/assets/uploads/developers/library/2020-webinar-gltf-tools-from-khronos/glTF-tools-webinar_Jan20.pdf the viewer could use the in embedded ibl.

image

UX3D-kanzler commented 10 months ago

At the moment there is no ratified extension to embed environment maps in the glTF file itself. However, glTF Sample Viewer calculates IBLs directly from hdr panorama images. You can drag and drop your own .hdr panorama image into the viewport to apply it to the current scene.