Gameplay and API
Density trigger grid
Use an approximate density grid for cheap gameplay triggers.
Cloud Density Trigger Grid is an optional, approximate gameplay aid. Assign a Cloud Layer, a perspective mono View Camera and a Center transform. Set the world-space Cell Size, positive Density Threshold, Update Interval, Maximum Age and the actual cloud render target Width and Height for that camera. In Play mode the component samples a fixed 4 × 4 × 4 grid around the center and owns up to 64 box triggers on the component's GameObject layer. Standard Unity trigger callbacks require a suitable Rigidbody on one of the interacting objects. Disable the component to remove its generated objects.
Generated objects live in the owner's scene, including its local 3D physics scene. The boxes represent point samples at their centers, not a reconstructed cloud surface. They are camera-dependent and may have holes, false positives, abrupt changes or delayed changes. They are non-authoritative: do not use them as physical cloud collision, line-of-sight, weather exposure, or a multiplayer synchronization source. The component disables all boxes if a request fails, readback exceeds Maximum Age, the center, layer, camera, cloud settings or tracked texture versions change, or wind displacement since the sample exceeds one quarter of the horizontal cell size. The source layer and its textures must remain enabled, alive and unchanged during readback. A continuously moving camera or changing cloud profile can invalidate every result and leave all triggers disabled. The component does not predict future density; Maximum Age and the motion threshold bound stale data, not geometric error.
Cloud Density Stream provides a reusable, one-request-at-a-time form of the GPU query for advanced integrations. Construct it with a fixed point count, keep caller-owned position and result arrays of that exact length alive until the callback, and reuse them after completion. It retains its material and textures between requests and copies successful readback values into the supplied result array. A rejected request produces no callback. A failed, non-finite or stale readback leaves the entire result array unchanged and reports failure. The stream rejects custom layer shaders without a verified density-query contract. Disposing a stream suppresses an outstanding callback and defers GPU resource cleanup until that readback finishes; wait for IsPending to become false before reusing its caller buffers. Do not modify the arrays while a request is pending. Device support, render-target formats, latency and the accuracy limits described in Cloud density queries still apply. Managed and native allocation behavior depends on Unity and the graphics backend; measure it in your target project.
Still stuck?
Bring the sky with you.
Include the Cloudscape version, Unity and render-pipeline versions, operating system, graphics API, the Cloud Layer's camera setup inspection, relevant logs, and a minimal reproduction.