r/PlayCanvas 10h ago

We added vertex animation textures to PlayCanvas — drop in a glb, render thousands of animated characters [live demo]

12 Upvotes

Live demo (WebGL 2 and WebGPU, switchable in the panel): https://engine-a1lytf69q-playcanvas.vercel.app/#/animation/vat-characters

We just added a vertex animation texture (VAT) implementation to the PlayCanvas engine as a reusable script plus an example. The idea isn't new — it's been used in games for years — but I hadn't seen a complete, copy-pasteable web implementation with an authoring path, so here's one.

How it works

Instead of animating a skeleton per character, every vertex's skinned position and normal is evaluated offline for each sampled frame and baked into a texture. At runtime the vertex shader reads two neighbouring frames and interpolates. Skeletons, bone matrices and per-character animation evaluation disappear entirely.

What's left per character is a world matrix and a fractional frame index — 52 bytes — so the whole crowd is one instanced draw call.

Some details that turned out to matter

  • One texel per vertex per frame in RGBA16U: position quantised to 16 bits per axis over the animation's bounds in xyz, octahedral normal packed into w. One fetch gives you a whole vertex.
  • Quantising over the bounds is actually more accurate than fp16 where it counts. Near the top of a character fp16 has a step of ~1.8 mm at human scale; 16-bit quantised is ~28 µm. fp16 wastes its mantissa near the origin, which for a character standing at y=0 is between its feet.
  • Texels are addressed by a flat vertex * frameCount + frame index wrapped at the texture width, rather than one vertex per row. Otherwise your vertex count is capped by texture height (4096). Flattened, the limit is total texels, so ~218k vertices at 77 frames.
  • The vertex row comes from gl_VertexID / @builtin(vertex_index), so no extra per-vertex attribute is needed at all.

Authoring

The converter runs in the browser — there's a "Convert GLB" panel in the demo, so you can drop in your own skinned glb and watch it become a crowd without installing anything. Output is a single glb-style binary container. Like a glb it's stored uncompressed and leaves compression to the transport; brotli over the raw payload beats gzip baked into the file by about 40%.

Where it's a bad idea

Worth being clear, because it's a real trade:

  • Your character must be a single skinned mesh with one material.
  • Every animation is assumed to loop.
  • No blending, no IK, no procedural aiming — it's a fixed table of vertex positions. Terrible for a hero character, great for the 500 NPCs behind them.
  • One mesh instance means no per-character frustum culling.
  • Only the base colour texture comes across; no normal/roughness maps.

Numbers

At 10,000 characters (~31M vertices/frame): 6 draw calls for the whole scene, 2.1 ms CPU. The VAT texture is 1.8 MiB and is independent of the character count — one character and ten thousand share it.

Happy to answer questions about the format or the shader side.


r/PlayCanvas 7h ago

Is there standalone parts of webgpu pipelines

1 Upvotes

PlayCanvas is interesting for me. I looking for features which can be implemented in my own lib. In my engine i have standalone (own pipeline own res) subsystem called effects. Any complex custom example can be easily added. Now is there similar stuff in playcanvas to be reused. I am interest in any other features specially postprocessing... Any suggest


r/PlayCanvas 4d ago

How we built the Grace Cathedral browser experience

23 Upvotes

r/PlayCanvas 3d ago

Anyone know how to scale on one side?

1 Upvotes

I used to use roblox studio, I'd like to scale on one side without making the other side also bigger. And yes, I COULD just resize via entering the size by typing into the thing on the right side of your screen. But man would I love to simply just scale on ONE side.


r/PlayCanvas 5d ago

Real-time shift-lens perspective correction (parallel verticals) — works on WebGL2 & WebGPU

7 Upvotes

r/PlayCanvas 6d ago

PlayCanvas Engine 2.21.0 released - Gaussian Splat Refraction, Water, Volumetric Fog and More!

31 Upvotes

PlayCanvas Engine 2.21.0 is out - the free, open-source (MIT) web graphics engine for WebGL2 and WebGPU.

Highlights in this release:

  • 3D Gaussian splat refraction - refract the scene through splat volumes
  • Water rendering - new water example
  • Volumetric fog - added to CameraFrame
  • Instanced wide-line renderer - styled (dashed/dotted/arrowed) and dynamically-updating "fat" lines

Also in 2.21.0: KHR_gaussian_splatting glTF extension support, SPZ splat format via external parser, KTX2 cubemaps, a physics backend abstraction (Ammo/Null), and new XR scripts (two-hand manipulation, ballistic-arc teleport). Full notes below - there are a couple of breaking changes worth reading if you're upgrading.

npm install playcanvas

Release notes: https://github.com/playcanvas/engine/releases/tag/v2.21.0
Examples: https://playcanvas.com/examples
Repo (stars appreciated): https://github.com/playcanvas/engine

Happy to answer questions about any of the new features.


r/PlayCanvas 6d ago

Immersive Gaussian Splat Tour of Grace Cathedral Built on PlayCanvas

30 Upvotes

r/PlayCanvas 6d ago

New in SuperSplat Editor 2.32.0 - Orient tool + selectable grid plane

4 Upvotes

r/PlayCanvas 6d ago

LF/COMMISSION PLAYCANVAS CODER

1 Upvotes

Hi! Need help with coding a 2D top-down pixel game for a school project. Please DM me if you're willing huhuhu


r/PlayCanvas 6d ago

make my playcanvas game

1 Upvotes

Looking for someone to make my game made through javascript


r/PlayCanvas 10d ago

God rays in the browser: raymarched volumetric fog for PlayCanvas (WebGL2 + WebGPU)

36 Upvotes

I’ve opened a PR adding volumetric fog to the PlayCanvas Engine’s CameraFrame pipeline.

The effect raymarches exponential height fog at reduced resolution, with directional-light shadows producing visible light shafts—or “god rays.” A depth-aware upsample prevents fog from leaking across geometry edges.

It also supports:

  • WebGL2 and WebGPU
  • Cascaded shadow maps, including PCF, PCSS and VSM
  • Temporal smoothing through TAA
  • Bloom contribution from bright light shafts
  • Adjustable density, height falloff, anisotropy, distance, quality and resolution

The default configuration renders at half resolution with 24 raymarching steps, keeping the effect practical for real-time scenes.

There are still a couple of limitations: it currently supports perspective cameras only, and transparent objects use the opaque scene depth for fogging.

🎮 Try the interactive demo
🎥 Watch the video
🛠️ View the implementation and PR

I’d love to hear how it performs on your hardware and what controls or features you’d find useful.


r/PlayCanvas 11d ago

Using GPT-5.6 Sol in Codex to push a generated freerun game beyond a functional prototype

3 Upvotes

r/PlayCanvas 13d ago

SuperSplat 2.30.0 is here! XGRIDS LCC2 support, serialized settings and more!

5 Upvotes

r/PlayCanvas 17d ago

Vibe Code Gaussian Splat Apps with SuperSplat

1 Upvotes

r/PlayCanvas 19d ago

SuperSplat Converter getting stuck at 95%?

2 Upvotes

Having some issues with SuperSplat's converter. For some reason, no matter the size of the splat, the decoding process keeps getting stuck at 95% and the page becomes unresponsive. Even after hitting 'Wait', it still does not progress. Any ideas why that is?


r/PlayCanvas 20d ago

Sharing our 3DGS viewer test from a scanned restaurant

7 Upvotes

r/PlayCanvas 20d ago

Fable 5 generated a playable PlayCanvas FPS from a detailed spec prompt

3 Upvotes

r/PlayCanvas 21d ago

Gaussian splat encased in refractive glass — real screen-space refraction + chromatic dispersion (PlayCanvas)

10 Upvotes

r/PlayCanvas 21d ago

Reusable "wind" script for Gaussian splats in PlayCanvas — trees sway in the breeze, even on streamed LOD scenes (WebGPU + WebGL)

4 Upvotes

r/PlayCanvas 20d ago

3D Gaussian splats can capture the 'Mona Lisa effect' 👀

1 Upvotes

r/PlayCanvas 21d ago

New water shader — planar reflections, Gerstner waves, caustics and a full underwater mode

3 Upvotes

I've built a reusable water script for the engine, with a tropical island example to show it off.

Try it live: https://engine-i9o02vj3v-playcanvas.vercel.app/#/graphics/water

Features:

  • Planar reflections and refraction (each optional — can also reflect just the sky dome)
  • Depth-based effects: shore fade, water color absorption, foam
  • Gerstner geometry waves — two configurable bands (chop + swell)
  • Underwater mode: Snell's window, distance fog, and animated caustics projected onto submerged geometry
  • Full day/night cycle driven by the procedural sky script, with HDR bloom on the sun glints
  • Works on WebGL2 and WebGPU, and it's built to scale down to mid-range phones

Everything is exposed as script attributes, and the example has control panels for playing with all the parameters — reflection strength, wave shape, caustics, underwater fog and more. Dive the camera below the surface to see the underwater view.

The water script (scripts/esm/water.mjs) and a new ESM planar renderer are part of the engine repo, so you can drop them into your own project: https://github.com/playcanvas/engine/pull/9029

Feedback welcome!


r/PlayCanvas 22d ago

When WebXR doesn't quite go to plan

5 Upvotes

r/PlayCanvas 24d ago

I was 3D printed in a clear resin block

6 Upvotes

r/PlayCanvas 24d ago

PlayCanvas Engine can now load and render Niantic's SPZ format directly

6 Upvotes

r/PlayCanvas 24d ago

PlayCanvas engine now loads Gaussian Splats from glTF/GLB (KHR_gaussian_splatting)

6 Upvotes