Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the texture of CubeMap/IBL used in the test to the same one #68

Open
cx20 opened this issue Mar 10, 2020 · 5 comments
Open

Change the texture of CubeMap/IBL used in the test to the same one #68

cx20 opened this issue Mar 10, 2020 · 5 comments

Comments

@cx20
Copy link
Owner

cx20 commented Mar 10, 2020

Currently, glft-test uses different cubemap textures for each library.
Use the same texture as much as possible because it is difficult to compare.

No Library CubeTexture IBL(Env map)
1 Three.js skybox/<p|n><x|y|z>.jpg skybox/<p|n><x|y|z>.jpg
2 Babylon.js country.env country.env
3 Cesium N/A N/A
4 ArcGISJSAPI N/A N/A
5 Grimore.js N/A N/A
6 xeogl cloudySkyBox.jpg N/A
7 minimal-gltf-loader skybox/<p|n><x|y|z>.jpg bakedDiffuse_0<1|2|3|4|5|6>.jpg
8 Khronos glTF Loader N/A N/A
9 ClayGL skybox/<p|n><x|y|z>.jpg pisa.hdr
10 Hilo3d skybox/<p|n><x|y|z>.jpg bakedDiffuse_0<1|2|3|4|5|6>.jpg
11 PlayCanvas Helipad_<pos|neg><x|y|z>.png Helipad.dds
12 X3DOM papermillDiffuse.dds papermillDiffuse.dds
13 CZPG.js skybox/<p|n><x|y|z>.jpg bakedDiffuse_0<1|2|3|4|5|6>.jpg
14 GLBoost papermill/environment/environment*.jpg papermill/diffuse/diffuse*.jpg
15 RedCube.js N/A pisa.hdr
16 RedGL skybox/<p|n><x|y|z>.jpg skybox/<p|n><x|y|z>.jpg
17 Ashes N/A helipad/<pos|neg><x|y|z>.hdr
18 Unity skybox/<p|n><x|y|z>.jpg N/A
19 pex pisa.hdr pisa.hdr
20 Filament syferfontein_18d_clear_2k_skybox.ktx syferfontein_18d_clear_2k_ibl.ktx
@cx20
Copy link
Owner Author

cx20 commented Mar 13, 2020

I chose PaperMill as the basic HDR texture for CubeMap / IBL.
http://www.hdrlabs.com/sibl/archive/downloads/PaperMill_Ruins_E.zip

I will prepare each type of texture by referring to the following information.

dds (for PlayCanvas):
https://developer.playcanvas.com/en/user-manual/assets/cubemaps/

6 jpg files (for PlayCanvas):
https://forum.playcanvas.com/t/how-to-dynamically-configure-skybox-with-javascript/12980
https://forum.playcanvas.com/t/how-do-i-apply-gamma-correct-to-cubemap-textures/14741

dds (for Babylon.js):
https://doc.babylonjs.com/how_to/use_hdr_environment

env (for Babylon.js):
https://doc.babylonjs.com/how_to/use_hdr_environment
https://forum.babylonjs.com/t/how-to-create-env-texture-file/9073

hdr (for RedCube / pex)
https://github.com/google/filament/tree/master/tools/cmgen

cmgen.exe -x . --type=equirect --format=hdr --size=512 --no-mirror papermill.hdr

ktx (for Filament):
https://github.com/google/filament/tree/master/tools/cmgen

cmgen.exe -x . --format=ktx --size=512 papermill.hdr

jpg (for xeogl):

  1. hdr -> 6 png files : https://github.com/google/filament/tree/master/tools/cmgen
  2. 6 png files -> dds (h-cross) : https://github.com/Microsoft/DirectXTex/wiki/Texassemble
  3. dds (h-cross) -> jpg (h-cross) : https://www.getpaint.net/index.html

6 jpg/hdr files:
https://github.com/ux3d/glTF-Sample-Environments/tree/4eace30f795fa77f6e059e3b31aa640c08a82133/papermill

@cx20 cx20 changed the title Change the texture of CubeMap used in the test to the same one Change the texture of CubeMap/IBL used in the test to the same one Aug 9, 2020
@emadurandal
Copy link

@cx20 Not only IBL, In these CG pipelines, libraries/engines people have their own policy/thought.
So It's difficult to unify those libraries way to only one.

In my opinion, a realistic solution would be making an automation tool.
This tool gets HDR env image and calls each library's IBL pipeline script, and finally outputs pre-filtered textures for them.

@cx20
Copy link
Owner Author

cx20 commented Jan 9, 2021

I basically decided to use PaperMill for CubeMap / IBL in gltf-test.
However, I noticed that there were cases where the orientation of the cubemap and the orientation of the model did not match, so I decided to investigate.

Original Image:
http://www.hdrlabs.com/sibl/archive/downloads/PaperMill_Ruins_E.zip
image

The following are the differences in the display results for each library.

image image image
image image image

The following are the test results and comments. Please note that it may be a usage issue, not a library.

Library BoomBox + CubeMap result CubeMap Texture (Spector.js result) Orientation Test result
Three.js image image ❌ Left and right sides of CubeMap texture are reversed
Babylon.js image image ❌ Different orientation
Filament image image ❌ Different orientation
PlayCanvas image image ❌ Different orientation
Rhodonite image image ✅ CubeMap and model orientation match
GLBoost image image ❌ Different orientation

@cx20
Copy link
Owner Author

cx20 commented Jul 16, 2021

I think the problem with cubemaps in Three.js was fixed in #424.

@cx20
Copy link
Owner Author

cx20 commented Dec 26, 2021

I think the problem with cubemaps in PlayCanvas was fixed in #512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants