KhronosGroup / glTF-Sample-Environments

glTF sample environments for the glTF Sample Viewer
https://github.com/KhronosGroup/glTF-Sample-Viewer
84 stars 10 forks source link

Refraction? #7

Closed echadwick-artist closed 3 years ago

echadwick-artist commented 3 years ago

In the Sample Viewer, the angle of refraction seems to be incorrect, when compared to the ground truth (path tracer), or even to another rasterizer like Babylon.

Load the StainedGlassLamp model in Sample Viewer, Babylon.js Sandbox, and Enterprise PBR pathtracer to compare. The amber-colored hanging beads and the red round glass beads use KHR_materials_transmission + KHR_materials_volume + KHR_materials_ior.

2021-04-08_glTF-Sample-Viewer

2021-04-08_Babylon-js

2021-04-08 16_36_09-Enterprise PBR Sample Renderer

Ennis HDR (dining room) is available here: https://vgl.ict.usc.edu/Data/HighResProbes/

Model is here: https://members.khronos.org/wg/PBR_TSG/document/25335

glTF excerpt:

    {
        "pbrMetallicRoughness": {
            "baseColorFactor": [
                1,
                0.6,
                0.2,
                1
            ],
            "metallicFactor": 0,
            "roughnessFactor": 0.02
        },
        "extensions": {
            "KHR_materials_transmission": {
                "transmissionFactor": 1
            },
            "KHR_materials_volume": {
                "thicknessFactor": 0.02
            },
            "KHR_materials_ior": {
                "ior": 1.4
            }
        },
        "name": "amberbeads"
    },

Thank you!

echadwick-artist commented 3 years ago

The model can also be found in this pull request. https://github.com/KhronosGroup/glTF-Sample-Models/pull/292

echadwick-artist commented 3 years ago

Refraction is correct (see #302), closing this.