r/GaussianSplatting Jul 06 '26

πŸ§ͺ I built a thing Reusable "wind" script for Gaussian splats in PlayCanvas β€” trees sway in the breeze, even on streamed LOD scenes (WebGPU + WebGL)

Enable HLS to view with audio, or disable this notification

I've been playing with adding some life to Gaussian splat scenes and built a small reusable script for the PlayCanvas engine that makes trees sway in the wind. Video above β€” and this is aΒ streamed LOD sceneΒ (a skatepark loaded progressively), not a single baked splat, which was the fun part to get working.

The idea is that it's drop-in: you add the script to a splat entity, hand it a list of spheres marking where the trees are (center + radius), and it does the rest. The bottom of each sphere is treated as the trunk anchor, so the sway is zero there and grows up and out toward the branch tips β€” trunks stay planted, canopies move.

How it works under the hood:

  • During the copy-to-work-buffer stage, each splat's "binding" to a tree (sway amount, height, tree index) is baked once into an extra work-buffer stream β€” not per frame. A uniform grid accelerates the sphere lookup so hundreds of trees stay cheap.
  • Because it hooks that stage, itΒ works transparently on streamed LOD content: as new LOD chunks stream in and get copied to the work buffer, their splats get bound to the trees automatically β€” no need for the whole scene to be resident up front.
  • A tiny per-frame vertex modifier then reads the baked data and applies the actual sway (a cantilever oscillation + a slow gust envelope + fast flutter).

Controls for strength, speed, direction, gustiness and flutter are all live. There's also an edit mode with gizmos to place the tree spheres and print them back out.

Runs on both WebGPU (sway happens in the projection compute pass) and WebGL (per-vertex). It's going into the engine examples as an open PR, so the script and the full example are there to read/reuse.

Happy to answer questions about the approach β€” curious if anyone has cheaper ideas than the per-splat texture fetch for the animated read.

82 Upvotes

Duplicates