Repository navigation
cloud_sky: clouds to the horizon, no edge-on bands, one look near and far, no straight edges - #1029
Merged
Merged
Conversation
… far, no straight edges The five issues #1013 left: - The far shells leave the camera's bounds (GeometryNode::setUseBounds: VTK's UseBounds and the scene's box) and reach far_reach (4 km) past the ground; a vertex past the far plane is drawn on it (clip depth clamped to 0.999 w), so the deck reaches the horizon without moving the near plane. - Each shell marches the view ray across its slab of deck (6 samples) instead of reading one layer, so the slices join into one cloud seen edge-on, from below or above. - The volumes stay unshaded (VTK's volume lighting reads as storm cloud) and share the shells' colour ramp: grey-blue thin, white dense. - The grammar clamps its turtle at the grid's y edges and piled puffs against the face, which the window cut off straight; each map now fades out over its outer 40% radius. - terrain_bump and bark name the normal by the node's mapper (GeometryNode::usesLowMemoryMapper), not __EMSCRIPTEN__, so CVCGL_LOWMEM_MAPPER=force draws the whole terrain lab natively.
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1013: the five known issues it left in the cloud deck.
What changes
Clouds reach the horizon.
GeometryNode::setUseBounds(false)sets both VTK'sUseBoundsand cvcGL's own scene box (contributesToSceneBounds).far_reachpast the ground (4 km by default), where the cloud pattern repeats.0.999 w. Where it lands on screen, and the world point its fragments read, are unchanged. So the deck reaches the horizon without pushing the camera's near plane out.horizonof the ground and stay in the bounds, so the default framing holds. That includes the island:lsystem_forest.ariframes as before.No bands seen edge-on. Each shell now stands for the slab of deck around it. Its fragment marches the view ray across that slab (6 samples, at most 24 slabs' depth) and sums the optical depth, so the 10 slices join into one cloud from below, beside or above. The last 3° fade into haze. I tried and dropped a column-mean slice that every shell reads: it stacked identical footprints into striped pillars at middling angles.
Near and far clouds look alike. VTK's volume shading reads as storm cloud here: dark and metallic, even at ambient 0.85 / diffuse 0.3. So the volumes stay unshaded, and both renderers take one colour ramp from the density: grey-blue where thin, white where dense, the shells a little lighter with height.
No straight-edged clouds.
cvc::lsys::cloud_field's turtle wraps x but clamps y at the grid's edges. A cloud that wandered to a y face piled puffs against it, and the grid's window cut them off: a straight edge along the volume's box, reproduced top-down. Each map now fades out over the outer 40% of its radius, which also keeps the clouds round.world_cloud_testchecks that nothing reaches the rim.terrain_bumpandbarknow name the normal by the node's mapper (newGeometryNode::usesLowMemoryMapper()), not by__EMSCRIPTEN__. WithCVCGL_LOWMEM_MAPPER=force, the whole terrain lab (ground, cloud shade, shells, volumes) now draws natively with zero shader errors. Before, the ground failed to compile. So the browser's shader path can be checked on a desktop, as GLSL 150.Checked (Windows, Release, cvcpkg prefix)
world_cloud_test8/8 (with the new rim check),lsys_fields_test6/6,cvcgl_ariadne_realize(with a new check that the far shells are out of the scene bounds).arigl snapshotof terrain_lab at 1.2 km and 11.2 km: top-down, overview, low, and from near the ground toward the horizon. Also the default camera (no pin),lsystem_forest.ari, and the forced WebGL2 mapper.Cost