You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If users want to use image-based lighting, they currently need to do a lot of complicated pre-processing on the environment map image before Cesium can use it.
Current workflow
To use an environment map for image-based lighting, a user currently needs to do the following:
It would be much simpler if we could use only 1 software. The options I can think of are:
Use KhronosGroup/glTF-IBL-Sampler for both specular and diffuse. It does not generate spherical harmonic coefficients, so we would have to switch Cesium over to using diffuse maps instead
Use google/filament for both specular and diffuse. It outputs KTX1 only, and Cesium only supports KTX2
Implement both parts inside Cesium, so a user could directly load an HDR or EXR environment map. The required shaders wouldn't be too hard, but we would lose the benefits of KTX2 compression
The optimum solution might be a combination of the above. Cesium could directly load HDR or EXR environment maps for quick testing. But Cesium would still accept pre-processed KTX files and SH coefficients, for users who want to optimize load times.
What other engines do
The glTF Sample Viewer provides a simple interface to "Add new HDR" (under "Display" --> "Image based lighting") which quietly takes care of all the required pre-processing of an uploaded .hdr file.
BabylonJS has an HDRCubeTexture constructor which handles all the required pre-processing of a .hdr file. However, the documentation recommends pre-processing to a .env or .dds file for faster load times.
The text was updated successfully, but these errors were encountered:
Feature
If users want to use image-based lighting, they currently need to do a lot of complicated pre-processing on the environment map image before Cesium can use it.
Current workflow
To use an environment map for image-based lighting, a user currently needs to do the following:
This process is described in the code comments in the Image-based lighting Sandcastle.
Potential improvements
It would be much simpler if we could use only 1 software. The options I can think of are:
The optimum solution might be a combination of the above. Cesium could directly load HDR or EXR environment maps for quick testing. But Cesium would still accept pre-processed KTX files and SH coefficients, for users who want to optimize load times.
What other engines do
The glTF Sample Viewer provides a simple interface to "Add new HDR" (under "Display" --> "Image based lighting") which quietly takes care of all the required pre-processing of an uploaded
.hdr
file.BabylonJS has an
HDRCubeTexture
constructor which handles all the required pre-processing of a.hdr
file. However, the documentation recommends pre-processing to a.env
or.dds
file for faster load times.The text was updated successfully, but these errors were encountered: