Coder Social home page Coder Social logo

Comments (5)

emadurandal avatar emadurandal commented on July 24, 2024 1

@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.

from gltf-test.

cx20 avatar cx20 commented on July 24, 2024

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

from gltf-test.

cx20 avatar cx20 commented on July 24, 2024

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

from gltf-test.

cx20 avatar cx20 commented on July 24, 2024

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

from gltf-test.

cx20 avatar cx20 commented on July 24, 2024

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

from gltf-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.