CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.98k stars 3.5k forks source link

Test failures in DynamicEnvironmentMapManager #12302

Open jjhembd opened 3 days ago

jjhembd commented 3 days ago

What happened?

On my machine, running DynamicEnvironmentMapManagerSpec results in 9 render comparison failures. Some of them look like they could be resolved with a wider tolerance in epsilon comparisons.

1) creates environment map and spherical harmonics at surface in Philadelphia with static lighting
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.09512791782617569, 0.09512791782617569, 0.05843571573495865) to equal epsilon (0.11017649620771408, 0.13869766891002655, 0.17165547609329224), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:194:58 <- Build/Specs/SpecList.js:159633:58)
    at <Jasmine>
     Expected (0.06610184162855148, 0.06610184162855148, 0.04060539975762367) to equal epsilon (0.08705271780490875, 0.11016352474689484, 0.15077166259288788), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:202:58 <- Build/Specs/SpecList.js:159641:58)
    at <Jasmine>
     Expected (-0.00012833854998461902, -0.00012833854998461902, -0.00007883625221438706) to equal epsilon (-0.0014497060328722, -0.0013909616973251104, -0.00141593546140939), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:210:58 <- Build/Specs/SpecList.js:159649:58)
    at <Jasmine>

2) creates environment map and spherical harmonics at surface in Philadelphia with dynamic lighting
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.004076908342540264, 0.004076908342540264, 0.0027179396711289883) to equal epsilon (0.034476835280656815, 0.04265068098902702, 0.04163559526205063), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:452:58 <- Build/Specs/SpecList.js:159837:58)
    at <Jasmine>
     Expected (0.0028329347260296345, 0.0028329347260296345, 0.0018886234611272812) to equal epsilon (0.01569328084588051, 0.023243442177772522, 0.025639381259679794), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:460:58 <- Build/Specs/SpecList.js:159845:58)
    at <Jasmine>
     Expected (-0.000005499910457729129, -0.000005499910457729129, -0.0000036671174257207895) to equal epsilon (-0.003795207943767309, -0.0033528741914778948, -0.0031588575802743435), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:468:58 <- Build/Specs/SpecList.js:159853:58)
    at <Jasmine>
     Expected (0.000006376966666721273, 0.000006376966666721273, 0.000004251057362125721) to equal epsilon (0.008755888789892197, 0.007121194154024124, 0.005899451207369566), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:476:58 <- Build/Specs/SpecList.js:159861:58)
    at <Jasmine>
     Expected -0.000005762347427662462 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:485:60 <- Build/Specs/SpecList.js:159869:60)
    at <Jasmine>
     Expected -0.000005762347427662462 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:486:60 <- Build/Specs/SpecList.js:159870:60)
    at <Jasmine>
     Expected -0.000003841649231617339 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:487:60 <- Build/Specs/SpecList.js:159871:60)
    at <Jasmine>
     Expected 0.00001057578901964007 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:489:60 <- Build/Specs/SpecList.js:159872:60)
    at <Jasmine>
     Expected 0.00001057578901964007 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:490:60 <- Build/Specs/SpecList.js:159873:60)
    at <Jasmine>
     Expected 0.000007050296972010983 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:491:60 <- Build/Specs/SpecList.js:159874:60)
    at <Jasmine>
     Expected -0.00009815639350563288 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:493:60 <- Build/Specs/SpecList.js:159875:60)
    at <Jasmine>
     Expected -0.00009815639350563288 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:494:60 <- Build/Specs/SpecList.js:159876:60)
    at <Jasmine>
     Expected -0.00006543756899191067 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:495:60 <- Build/Specs/SpecList.js:159877:60)
    at <Jasmine>
     Expected 0.000010272161489410792 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:497:60 <- Build/Specs/SpecList.js:159878:60)
    at <Jasmine>
     Expected 0.000010272161489410792 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:498:60 <- Build/Specs/SpecList.js:159879:60)
    at <Jasmine>
     Expected 0.000006848209977761144 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:499:60 <- Build/Specs/SpecList.js:159880:60)
    at <Jasmine>
     Expected -0.0002108029293594882 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:501:60 <- Build/Specs/SpecList.js:159881:60)
    at <Jasmine>
     Expected -0.0002108029293594882 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:502:60 <- Build/Specs/SpecList.js:159882:60)
    at <Jasmine>
     Expected -0.00014053526683710515 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:503:60 <- Build/Specs/SpecList.js:159883:60)
    at <Jasmine>

3) creates environment map and spherical harmonics at surface in Sydney with dynamic lighting
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.004076908342540264, 0.004076908342540264, 0.0027179396711289883) to equal epsilon (0.0054358793422579765, 0.0054358793422579765, 0.0027179396711289883), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:537:58 <- Build/Specs/SpecList.js:159903:58)
    at <Jasmine>
     Expected (0.0028329347260296345, 0.0028329347260296345, 0.0018886234611272812) to equal epsilon (0.0037772462237626314, 0.0037772462237626314, 0.0018886231118813157), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:545:58 <- Build/Specs/SpecList.js:159911:58)
    at <Jasmine>

4) lighting uses atmosphereScatteringIntensity value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.023781979456543922, 0.023781979456543922, 0.014269187115132809) to equal epsilon (0.0322723351418972, 0.039464931935071945, 0.047749463468790054), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:707:58 <- Build/Specs/SpecList.js:160039:58)
    at <Jasmine>
     Expected (0.01652546040713787, 0.01652546040713787, 0.00991527084261179) to equal epsilon (0.025989927351474762, 0.031872138381004333, 0.04223670810461044), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:715:58 <- Build/Specs/SpecList.js:160047:58)
    at <Jasmine>
     Expected (-0.000032084637496154755, -0.000032084637496154755, -0.000019247598174843006) to equal epsilon (-0.0008744273218326271, -0.0008044499554671347, -0.0008345510577782989), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:723:58 <- Build/Specs/SpecList.js:160055:58)
    at <Jasmine>

5) lighting uses gamma value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.1821020245552063, 0.1821020245552063, 0.14133282005786896) to equal epsilon (0.18712928891181946, 0.21367456018924713, 0.23666927218437195), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:790:58 <- Build/Specs/SpecList.js:160105:58)
    at <Jasmine>
     Expected (0.1265377253293991, 0.1265377253293991, 0.09820842742919922) to equal epsilon (0.13568174839019775, 0.15787045657634735, 0.19085952639579773), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:798:58 <- Build/Specs/SpecList.js:160113:58)
    at <Jasmine>
     Expected (-0.0002456483489368111, -0.0002456483489368111, -0.0001906872057588771) to equal epsilon (-0.0011452456237748265, -0.0010327763156965375, -0.001100384397432208), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:806:58 <- Build/Specs/SpecList.js:160121:58)
    at <Jasmine>

6) lighting uses brightness value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.047563958913087845, 0.047563958913087845, 0.028538374230265617) to equal epsilon (0.05981340631842613, 0.07419705390930176, 0.09077795594930649), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:873:58 <- Build/Specs/SpecList.js:160171:58)
    at <Jasmine>
     Expected (0.03305092081427574, 0.03305092081427574, 0.01983054168522358) to equal epsilon (0.051604993641376495, 0.06336799263954163, 0.08409948647022247), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:881:58 <- Build/Specs/SpecList.js:160179:58)
    at <Jasmine>
     Expected (-0.00006416927499230951, -0.00006416927499230951, -0.00003849519634968601) to equal epsilon (-0.000745132565498352, -0.0006284310948103666, -0.000669674074742943), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:889:58 <- Build/Specs/SpecList.js:160187:58)
    at <Jasmine>

7) lighting uses saturation value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.09240995347499847, 0.09240995347499847, 0.09240995347499847) to equal epsilon (0.13499368727207184, 0.13499368727207184, 0.13499368727207184), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:956:58 <- Build/Specs/SpecList.js:160237:58)
    at <Jasmine>
     Expected (0.06421317905187607, 0.06421317905187607, 0.06421317905187607) to equal epsilon (0.1081928238272667, 0.1081928238272667, 0.1081928238272667), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:964:58 <- Build/Specs/SpecList.js:160245:58)
    at <Jasmine>
     Expected (-0.00012467143824324012, -0.00012467143824324012, -0.00012467143824324012) to equal epsilon (-0.0014497060328722, -0.0013909616973251104, -0.00141593546140939), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:972:58 <- Build/Specs/SpecList.js:160253:58)
    at <Jasmine>

8) lighting uses ground color value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.21471722424030304, 0, 0) to equal epsilon (0.1342056840658188, 0.11958353966474533, 0.15991388261318207), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1039:58 <- Build/Specs/SpecList.js:160303:58)
    at <Jasmine>
     Expected (0.14920121431350708, 0, 0) to equal epsilon (0.07575193047523499, 0.11915278434753418, 0.15629366040229797), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1047:58 <- Build/Specs/SpecList.js:160311:58)
    at <Jasmine>
     Expected (-0.00028969187405891716, 0, 0) to equal epsilon (-0.0011700564064085484, -0.0016134318429976702, -0.0015525781782343984), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1055:58 <- Build/Specs/SpecList.js:160319:58)
    at <Jasmine>
     Expected 0 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1073:60 <- Build/Specs/SpecList.js:160336:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1074:60 <- Build/Specs/SpecList.js:160337:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1077:60 <- Build/Specs/SpecList.js:160339:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1078:60 <- Build/Specs/SpecList.js:160340:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1081:60 <- Build/Specs/SpecList.js:160342:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1082:60 <- Build/Specs/SpecList.js:160343:60)
    at <Jasmine>
     Expected 0 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1085:60 <- Build/Specs/SpecList.js:160345:60)
    at <Jasmine>
     Expected 0 to be greater than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1086:60 <- Build/Specs/SpecList.js:160346:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1089:60 <- Build/Specs/SpecList.js:160348:60)
    at <Jasmine>
     Expected 0 to be less than 0.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1090:60 <- Build/Specs/SpecList.js:160349:60)
    at <Jasmine>

9) lighting uses ground albedo value
     Scene/DynamicEnvironmentMapManager render tests
     Expected (0.3071272671222687, 0.3071272671222687, 0.18753786385059357) to equal epsilon (0.15277373790740967, 0.1812949925661087, 0.19759616255760193), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1122:58 <- Build/Specs/SpecList.js:160369:58)
    at <Jasmine>
     Expected (0.21341443061828613, 0.21341443061828613, 0.13031496107578278) to equal epsilon (0.0670194923877716, 0.09013032913208008, 0.13857196271419525), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1130:58 <- Build/Specs/SpecList.js:160377:58)
    at <Jasmine>
     Expected (-0.0004142901743762195, -0.0004142901743762195, -0.0002529816993046552) to equal epsilon (-0.000953961513005197, -0.000895244418643415, -0.0011140345595777035), 0.0001.
    at <Jasmine>
    at UserContext.<anonymous> (packages/engine/Specs/Scene/DynamicEnvironmentMapManagerSpec.js:1138:58 <- Build/Specs/SpecList.js:160385:58)
    at <Jasmine>

Reproduction steps

  1. Run DynamicEnvironmentMapManagerSpec locally

Sandcastle example

No response

Environment

Browser: Google Chrome CesiumJS Version: 1.123.1 Operating System: Windows

ggetz commented 3 days ago

Thanks for opening this @jjhembd!

Some of them look like they could be resolved with a wider tolerance in epsilon comparisons.

Some of these values look more different then I'd expect. I'm curious if you get the same values every time you run the test?

jjhembd commented 3 days ago

I'm curious if you get the same values every time you run the test?

Good question. I got the same values again when I re-ran the tests just now (at least for the first dozen that I checked).