Conversation
cdata
left a comment
There was a problem hiding this comment.
Generally this looks good to go as is. However, I ran into a bug while poking around, where the skybox can become clipped:
Also, I tried using a separate background image that I gaussian-blurred in Photoshop in order to diminish the effect of the pixelated skybox. To be honest, I found the results rather dissatisfying. Blurring ahead of time still results in a lot of pixelation, but compounds the problem by revealing unsightly seams:
It leaves me wondering why we would even give folks a skybox feature if they can only make unsightly skyboxes with it, you know?
| this.pivot = new Object3D(); | ||
| this.pivot.name = 'Pivot'; | ||
|
|
||
| this.skyboxMesh = this.createSkyboxMesh(); |
There was a problem hiding this comment.
I wonder if we could even centralize this a bit so that ModelScene only has a skybox material, and maybe Renderer has a single mesh that can be shared across all instances. WDYT?
There was a problem hiding this comment.
Honestly the mesh is so insignificant, I wouldn't bother. We still need to cache modelScene properly anyway, since it's still leaking shadow textures and such. I think this can fit in nicely there.
| }; | ||
| const skyboxMesh = new Mesh(geometry, material); | ||
| // This centers the box on the camera, ensuring the view is not affected by | ||
| // the camera's motion, which makes it appear inifitely large, as it should. |
| * Loads a WebGLRenderTargetCube from a given URL. The render target in this | ||
| * case will be assumed to be used as a skybox. | ||
| */ | ||
| private[$loadSkyboxFromUrl](url: string, progressTracker?: ProgressTracker): |
|
The issue with the skybox seams I noticed too; turns out it's a bug I fixed in #710 (I merged them to double check that it's resolved). Good call on the too close part; I have an idea on what's happening there. |
|
Much simpler! 😍 |
That example looks so good now! |
Unified skybox and environment (google#712) * built separate skybox * unified environment and skybox caches * updated tests * changed demo from intensity to exposure, upgraded to hdr * fixed disappearing skybox


Fixes #707
This refactors our code so that our skybox shares the same format as our environmentMap, meaning these can now share the same cache. Unfortunately, three.js does not yet read the cubeUV format for its built in skybox, so I built a small custom skybox based on their code. Now our skyboxes are interpolated and fully HDR, but are locked to the 256 cube resolution of our environment maps.
I also updated our lighting & environment example to showcase exposure instead of environment-intensity, since I think it's a more interesting control and it will serve as a form of regression test. I also updated whipple creek to HDR, since I think we should be showcasing primarily HDR content.