Open leewz opened 7 years ago
/ping @bhouston
there used to be a dds loader in the past, but it might not work with the custom mapping that clara people integrated
I under the gun on a few projects right now. We have some code for a single image cubemap that we would like to contribute back once I or someone else on the team get some time. Sorry for the delay.
hope that to be finished...like sketchfab's background hdr envmap.
Since three.js
properly supports equirectangular textures now (meaning by auto-converting them to the cube map format and directly by PMREMGenerator
), is this issue still relevant?
Yes, cube maps can be organized in a single file but I've seen different layouts in the past e.g. vertical and horizontal cross, column and row layouts. Is it desirable to support those? I'm afraid I'm not sure how common they are...
If these layouts are not that relevant it feels more appropriate to guide users towards the equirectangular format.
It seems like there are two parts to this:
examples/jsm
for themThe KTX 2 format (used in glTF for Basis compressed textures) also supports cubemaps, but I haven't implemented that in THREE.KTX2Loader because glTF doesn't need them. That would be an option for (1), although i'm not sure about the best internal data format for HDR data in KTX, or the layout.
I've seen different layouts in the past e.g. vertical and horizontal cross, column and row layouts. Is it desirable to support those?
There has been no demand for those, as far as I am aware.
Consequently, I'd suggest removing webgl_panorama_cube.html
, or modifying it, as it uses row layout.
Consequently, I'd suggest removing webgl_panorama_cube.html, or modifying it, as it uses row layout.
Sidenote: This is true for webxr_vr_panorama
, too.
I believe these three HDR formats available in KTX2 would be candidates:
gl.RGB16F
)gl.RGB9_E5
)gl.R11F_G11F_B10F
)Are there any we'd prefer, or prefer to avoid? This would be loading a cubemap, i.e. six images in a single KTX2 file, not a larger image with a particular layout.
VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 (gl.RGB9_E5)
Because of the findings in #27971, RGB9_E5
isn't appropriate. At least at the moment.
In the example materials / envmaps / hdr, a cubemap is textured using six
.hdr
files, usingHDRCubeTextureLoader
. How about texturing a cubemap from a single.hdr
file?