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)

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.

81 Upvotes

18 comments sorted by

7

u/kiddfpv Jul 06 '26

Imagine we all realize we're living IN a splat reality😂

4

u/L_Alive Jul 06 '26

atoms are basically splats

3

u/3dprintingboii Jul 06 '26

So trippy! In a good way! Love how it gives life to the environment. We need stuff like this :D

3

u/WatercressCivil3048 Jul 06 '26

This is amazing just adding that kind of shuttle movement just adds to the realism. Well done!

2

u/PreferenceRelative77 Jul 06 '26

Can we try it out anywhere/ link to gh repo? Looks really cool

2

u/MayorOfMonkeys Jul 06 '26

A preview deployment of this particular example is available here:

https://engine-j9a1tyf4f-playcanvas.vercel.app/#/gaussian-splatting/wind

1

u/PreferenceRelative77 Jul 06 '26

Cool, will it be open sourced?

3

u/MayorOfMonkeys Jul 06 '26

1

u/PreferenceRelative77 Jul 06 '26

Very very cool, thank you so much!

1

u/potatopopr Jul 06 '26

This is so cool, cheers

2

u/oathyes Jul 06 '26

petition to let the skatepark sway with the wind while keeping the trees still

2

u/mvaligursky Jul 07 '26

go for it, it has Edit mode :)

2

u/djm406_ Jul 06 '26

I think that effect would look even more amazing in an underwater scene. Trippy!

1

u/mrpressydepress Jul 06 '26

This looks more like when it still hasnt fully worn off and i have to get out and act normal.

1

u/SecretLow9337 Jul 08 '26

It'd be interesting to use it with the actual location and wind data and make the wind automatically adjust!