Examples: Add volumetric clouds and atmosphere to webgl_loader_3dtiles#33292
Conversation
| <a href="https://ion.cesium.com/" target="_blank" rel="noopener"><img src="./textures/cesiumion.png" /></a> | ||
| </div> | ||
|
|
||
| <!-- "three/examples/" import map entry required by 3d-tiles-renderer --> |
There was a problem hiding this comment.
This comment seems misleading - 3d-tiles-renderer does not require all of these import map entries.
There was a problem hiding this comment.
There was a problem hiding this comment.
Oh I see what you're saying - I interpreted this comment has saying that all of the below import map entries are requirements of 3d-tiles-renderer. I may change to import from three/addons in the future if this is the recommended path.
There was a problem hiding this comment.
I tried to add a comment in the same line but JSON doesn't support comments.
Yeah, using three/addons is more robust.
shotamatsuda
left a comment
There was a problem hiding this comment.
Thanks @mrdoob and @jeantimex!
Add atmospheric rendering with @takram/three-atmosphere and volumetric clouds with @takram/three-clouds, ported from jeantimex/geospatial. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace pmndrs EffectComposer with renderer.setEffects() using an EffectPassAdapter that bridges the two APIs. This removes the need for EffectComposer, RenderPass, and ToneMappingEffect — tone mapping is handled by the renderer's built-in AgX. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…3dtiles Update 3d-tiles-renderer to 0.4.23 and @petamoriken/float16 to 3.9.3. Use Ellipsoid.getObjectFrame() and CAMERA_FRAME from 3d-tiles-renderer instead of Geodetic/PointOfView from @takram/three-geospatial. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compute deltaTime in the EffectPassAdapter since WebGLOutput.end() does not pass it to effects. Share it across all adapters via a closure variable so cloud velocity animation works correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use fire-and-forget fetch pattern for 3D cloud textures, matching the callback style used for 2D textures. Removes the await/Promise.all blocking during init. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Import CesiumIonAuthPlugin from 3d-tiles-renderer/core/plugins and other plugins from 3d-tiles-renderer/three/plugins to avoid the backward-compat wrapper warning. Use GlobeControls.setEllipsoid() instead of the deprecated setTilesRenderer() path. Revert @petamoriken/float16 to 3.9.2 and remove unnecessary import map entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace reconstructNormal with a TileCreasedNormalsPlugin that recomputes normals using toCreasedNormals with a 30 degree crease angle. This produces better deferred lighting and avoids screen-space artifacts with TilesFadePlugin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…r_3dtiles Replace disabling controls entirely with setting adjustHeight to false until first user interaction, as suggested by the 3d-tiles-renderer author. This keeps controls functional while preventing camera drift during tile loading. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove transitive dependency entries that are already bundled in the build files: @takram/three-atmosphere/shaders, tiny-invariant, @petamoriken/float16, astronomy-engine, url-join. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add an HTML range slider that controls the sun direction by hour (UTC). This allows viewing different lighting conditions including sunrise, sunset, and nighttime. Also use THREE.MathUtils.DEG2RAD and dispose old geometry in TileCreasedNormalsPlugin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@gkjohnson Would be nice to replace
This warning seems to be coming from https://github.com/search?q=repo%3ANASA-AMMOS%2F3DTilesRendererJS+Clock&type=code |
Compute deltaTime from the requestAnimationFrame timestamp in animate() instead of using a fragile _isFirst flag pattern. All adapters now read the shared _deltaTime computed once per frame. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This will have to happen on a breaking release. The three.js versions supported by the project is back to v0.167.0 which does not include Timer. |
Description
Adds volumetric clouds and atmospheric rendering to the 3D tiles example, ported from jeantimex/geospatial.
@takram/three-atmospherefor sky, aerial perspective, and deferred lighting@takram/three-cloudsfor volumetric clouds with shadow cascadesGeodetic/PointOfViewfrom@takram/three-geospatialGlobeControlscamera drift by disabling controls until first user interaction/cc @jeantimex @shotamatsuda @gkjohnson