<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title><![CDATA[Cinevva Blog]]></title>
        <link>https://app.cinevva.com</link>
        <description><![CDATA[Product updates, creator notes, and experiments.]]></description>
        <lastBuildDate>Wed, 11 Nov 2026 04:30:12 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>scripts/build-rss.mjs</generator>
        <copyright>Copyright 2024-present Cinevva</copyright>
        <item>
            <title><![CDATA[Where the holes in generated meshes come from]]></title>
            <link>https://app.cinevva.com/blog/2026-09-24-where-the-holes-in-generated-meshes-come-from</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-24-where-the-holes-in-generated-meshes-come-from</guid>
            <pubDate>Thu, 24 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A generated bird had slits under its wings. We traced them through the TRELLIS.2 pipeline, tested nine unsuccessful repairs, and found a limit in how the decoder represents nearby surfaces. A local fill now closes the visible gaps while preserving feather detail.]]></description>
            <content:encoded><![CDATA[<h1>Where the holes in generated meshes come from</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/thumb.jpg" alt="The wing root of a generated bird before and after the fix: a grey flap with bright green slivers on the left, a clean wing-to-body fold on the right" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Same image, same generator, same settings. Left is what shipped until this week. Right is what ships now.</figcaption>
</figure>
<p>I generated a bird with TRELLIS.2, rigged it, and saw bright slivers under both wings when the animation played. The rigger was the first suspect. It had a separate problem, and the holes were already present in the unrigged mesh. We traced them through the generation pipeline and tested nine repairs before finding a local fill that closed the visible gaps without smoothing away the feather detail.</p>
<h2>Step one: agree on what a hole is</h2>
<p>Our mesh checker reported zero boundary edges, and a ray-parity test said the surface was closed. The slivers were still visible in the marked-up image. A mesh can be closed and still have tunnels. We used the Euler characteristic, V minus E plus F, to estimate the number of handles per shell. The bird's initial count was 69. Every wall in the export was doubled, so a slit in the outer wall connecting to the cavity behind it forms a handle. A boundary-edge check misses that kind of defect.</p>
<p>The first image analysis also looked in the wrong place. It searched dark pixels for holes, while the visible defects were bright slivers of the far wall's green texture showing through a grey fold. Checking the image established which pixels the analysis needed to follow.</p>
<h2>Step two: find the stage that makes them</h2>
<p>TRELLIS.2 builds a mesh in three steps. A decoder emits a raw surface at 1024 cubed resolution. A narrow-band dual contouring pass remeshes it. A decimator brings it down to a hundred thousand faces and the texture is baked. We dumped the geometry after each step and shot the same bundle of rays through the wing root each time.</p>
<p>The gaps are already present in the raw surface. It's a soup of open sheets: 266,242 boundary loops, most of them single missing quads, and 65,371 non-manifold edges. At the wing root a third of the test rays went straight through. The hole-fill that runs next adds only 144 faces out of five million. The remesher works on an unsigned distance field. With no inside or outside to work with, it wraps a thin offset shell around every sheet. That produces doubled walls about four voxels apart and turns each porous stripe into a fold with a slit in it. Decimation can make the result worse, with variation between runs: the same raw mesh decimated twice gave 69 and 107 tunnels.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/porosity.jpg" alt="The bird with a heat map of open-edge density: the neck collar, both wing roots, the hips and the tail feather tips glow, the body and head are clean" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Density of open edges in the raw extraction. Concentrations appear at the neck collar, wing roots, hips and tail tips. The body and head are clean.</figcaption>
</figure>
<p>The concentrations around the wing roots and other junctions gave us specific areas to investigate.</p>
<h2>The things that didn't work</h2>
<p>We tried them roughly in order of how obvious they were.</p>
<table>
<thead>
<tr>
<th>attempt</th>
<th>result</th>
</tr>
</thead>
<tbody>
<tr>
<td>resolution 1536 instead of 1024</td>
<td>worse on three of five test models. More resolution resolves more thin contacts, each one a new junction</td>
</tr>
<tr>
<td>the built-in cleanup ladder</td>
<td>increased the non-manifold edge count</td>
</tr>
<tr>
<td>filling every small hole with MeshLib</td>
<td>266k loops filled, wing root unchanged. The skin there was never emitted, so there's no loop to fill</td>
</tr>
<tr>
<td>a signed remesh from a winding number</td>
<td>shatters the mesh into thousands of shells. The raw output has no interior to sign</td>
</tr>
<tr>
<td>a wider contouring band, 2 and 3 voxels</td>
<td>fewer tunnels overall; the slit widens as small tunnels merge into larger ones</td>
</tr>
<tr>
<td>morphological closing of the voxel structure</td>
<td>solidifies the shell, the decoder then emits surface inside every interior voxel, 4x the faces, 969 tunnels</td>
</tr>
<tr>
<td>global voxel remesh of the final mesh</td>
<td>genus 0 and the slit sealed; feather edges softened too much to use</td>
</tr>
<tr>
<td>biasing the decoder's crossing threshold</td>
<td>open edges fell from 65k to 58k; the visible defect remained</td>
</tr>
<tr>
<td>completing missing neighbour voxels</td>
<td>affected only 560 cases in the whole bird; the visible defect remained</td>
</tr>
</tbody>
</table>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/global-closing.jpg" alt="Four columns: the original bird and three voxel-remeshed versions at increasing radius, wing root, ten times zoom, a cross-section slab, the whole bird and a view from below" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Global closing. Column three seals the slit and keeps the toes apart. The feather edges and creases are visibly rounded.</figcaption>
</figure>
<p>Global closing sealed the wing root at a voxel size just above the gap, and it also rounded off the crisp feather edges. We rejected that result because of the lost detail. The wider contouring band had reduced the tunnel count too, while making the visible slit wider. Both attempts showed why we needed to compare the rendered bird alongside the topology measurements.</p>
<h2>Reading the code</h2>
<p>We then read the code that turns the decoder's output into a mesh. TRELLIS.2 uses a representation called O-Voxel. Each active voxel holds one dual vertex and three logits, one per grid edge leaving its corner, each meaning &quot;the surface crosses this edge.&quot; A logit above zero emits a quad connecting the four voxels around that edge. If any of the four is missing, the quad is dropped silently. This extraction uses crossing flags without an inside/outside sign field.</p>
<p>We patched the decoder to dump those logits before the threshold, on the same bird, and counted.</p>
<p>There were 560 missing-neighbour cases out of 2.7 million voxels, and 8,600 logits near zero out of 8 million. The repair attempts targeting those cases had left the wing-root defect in place. We next checked the four edges around each grid face. A closed surface crosses a face's boundary an even number of times. On 126,542 faces, 2.3% of them, the crossing flags had odd parity, producing open or non-manifold edges. Some inconsistent flags had large logit margins: the lone flag on a count-one face sat at +10 while its neighbours sat at -4. The median cost to flip one flag and restore parity was 2.3 logits. Correcting these inconsistencies would require changing predictions well away from the threshold.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/decoder-comb.jpg" alt="Three columns on a dark background: the exported bird, the decoder's raw output, and a sign-repaired version. At ten and thirty times zoom the wing junction is a shredded serrated stripe in both raw versions" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The decoder's raw output at the wing root. Dark areas are see-through. The junction forms a serrated stripe.</figcaption>
</figure>
<p>We measured the stripe at the wing-root point used in the earlier comparisons. Within twelve voxels of it there are 2.1 times as many active voxels as a single flat sheet would need. On the chest, the ratio is 1.2. The wing's underside and the body are two skins running inside one voxel layer. The representation has one vertex per voxel, so it cannot hold both. During training, the ground truth for such a voxel is a least-squares average of both skins with &quot;any crossing&quot; flags. That can produce inconsistent targets, which helps explain the serrated output at the junction. The remesher wraps that output into a slab with tunnels.</p>
<p>The width of the stripe follows from the geometry: roughly one voxel divided by the tangent of the contact angle. A steep contact confines the overlap to a narrow crease. At shallow contacts, such as a wing lying against a body, overlapping feathers or toes against the ground, the stripe can extend ten or fifteen voxels. That gives an explanation for the concentrations in the porosity map.</p>
<p>We also tried inferring a per-corner inside/outside sign that best explains the flags, then re-deriving them. That attempt failed. The sign field only existed on the one-voxel shell the decoder emitted, and extending it off that shell introduced spurious geometry. Twelve rounds doubled the voxel count without repairing the junction.</p>
<h2>Filling the contact region</h2>
<p>Joining the wing to the body would replace the narrow gap with a crease. The global closing had already shown that this could seal the slit. To preserve the feather detail, we needed to restrict the fill to the region where the two skins run close together.</p>
<p>The detector counts each voxel's active neighbours within four voxels and uses the median count as a baseline for a single sheet. Where two sheets share the layer, the count is about double. We flag anything above 1.5 times the median, grow the flagged set by one voxel, and place a unit cube at each flagged voxel. The cubes fill the space between the skins so the contouring pass can produce one wall. The fill is confined to the flagged region.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/crop-fill.jpg" alt="A crop around the wing root contoured three ways: as is, with the two-sheet zone filled at radius three, and at radius four. Red dots mark the filled voxels along the seam. The serrated seam becomes a smooth crease" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Proof of concept on a crop, before touching the pipeline. Red marks the filled voxels. The serrated seam becomes a crease and the feathers around it don't move.</figcaption>
</figure>
<p>We tested it on a crop first, with MeshLib standing in for the GPU contouring. Fifty-three shells and nineteen handles became two shells and five. Then we added it between the decoder and the export and ran the same bird through the production remesher and texture bake.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/pipeline-fill.jpg" alt="Four columns, textured, then plain geometry, then a cross-section: original, the same decoder output exported as is, and the two-sheet fill at radius three and four. The grey flap and green slivers vanish in the last two" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Results from the production pipeline. Columns one and two are the same decoder output with and without a random decimation. Three and four have the fill.</figcaption>
</figure>
<table>
<thead>
<tr>
<th></th>
<th>tunnels</th>
<th>non-manifold edges</th>
<th>wing-root flap</th>
<th>hole on the back</th>
</tr>
</thead>
<tbody>
<tr>
<td>as is</td>
<td>79.5</td>
<td>318</td>
<td>present</td>
<td>present</td>
</tr>
<tr>
<td>fill, radius 3</td>
<td>84.5</td>
<td>97</td>
<td>gone</td>
<td>gone</td>
</tr>
<tr>
<td>fill, radius 4</td>
<td>72</td>
<td>38</td>
<td>gone</td>
<td>gone</td>
</tr>
</tbody>
</table>
<p>The fill removed the wing-root flap and a second visible hole at the same junction on the bird's back. In this test, the feathers and toes stayed separate, and the texture baked normally because the cubes sat inside the shell where the attribute volume already had data. The fill added six seconds to a four-minute job. It's on by default now, at radius four.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mesh-holes/whole-bird.jpg" alt="The whole bird from the front, the back, from below with texture, and from below as plain geometry, in four columns: original, as is, fill radius three, fill radius four" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The whole bird. The white hole on the back in columns one and two is the same junction from behind. Columns three and four show the filled junction with the surrounding feather and toe detail preserved.</figcaption>
</figure>
<h2>Remaining tunnels</h2>
<p>The tunnel count barely moved. The remaining tunnels are at feather tips and toe tips, where a thin part ends and the doubled wall pinches shut. They are small and were not visible in these renders. The fill targets contacts between parts, where the visible holes occurred, and leaves the tip defects unresolved.</p>
<p>Addressing the inconsistent crossing flags would require an upstream change. A decoder that predicts per-corner signs would be parity-consistent by construction, as in the previous generation of this model. Changing the decoder's prediction target requires retraining. For the current generator, the contact geometry suggests that poses with limbs standing away from the body should reduce this source of porosity. Mesh checks also need to cover several kinds of defects: boundary edges, tunnels and visible gaps. In this investigation, the boundary-edge check missed the tunnels, and lower tunnel counts sometimes accompanied worse-looking geometry.</p>
<p>The instrumented decoder, stage dumps, parity analysis and local fill are now in our pipeline. We can use them to trace defects in future models and check whether the same repair applies.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Giving a generated character hair that can move]]></title>
            <link>https://app.cinevva.com/blog/2026-09-14-from-hair-meshes-to-strand-guides</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-14-from-hair-meshes-to-strand-guides</guid>
            <pubDate>Mon, 14 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Fit 46 reusable hairstyles to a frog, inspect extracted strand guides, and explore what 98.84% scalp attachment actually proves in a live 3D experiment.]]></description>
            <content:encoded><![CDATA[<script setup>
import HairMotionDemo from '../.vitepress/components/HairMotionDemo.vue'
import HairGuideResults from '../.vitepress/components/HairGuideResults.vue'
</script>
<h1>Giving a generated character hair that can move</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>A generated character can have a convincing hairstyle and still have no hair that can move independently. The output may be one surface, a collection of thin cards, or disconnected pieces. None of those representations tells a simulator where a strand starts, which way it grows, or how it should bend.</p>
<p>Our <a href="/blog/2026-09-13-hair-that-keeps-its-shape">previous hair experiment</a> began with artist-rigged avatars and a selected ponytail. This time we started with reusable hair meshes and our frog character. The question was more basic: <strong>can we fit a hairstyle, trace useful guide curves through it, and keep their roots attached during animation?</strong></p>
<p>Across 46 hairstyles, the current prototype extracts <strong>10,467 candidate guides</strong> and finds scalp connections for <strong>10,346 of them, 98.84%</strong>. The percentage measures scalp connectivity. Motion quality still needs evaluation.</p>
<h2>Try the mesh and its guides</h2>
<p>The demo loads immediately. Choose a <strong>Hairstyle</strong>, then use <strong>Hair inspection</strong> to switch between the original mesh, mesh plus guides, and guides alone. Drag the preview to orbit, and inspect the back as well as the front. Choose an <strong>Animation</strong> to see whether the attachment follows the moving character.</p>
<p><strong>Cyan curves have a scalp connection. Orange curves were rejected.</strong> &quot;Show suggested roots&quot; reveals the proposed attachment points. Long01 is a useful dense example. The French braid variations expose the challenge of joining separate fragments. Download the guide curves to inspect their points and attachment metadata.</p>
<HairMotionDemo model="frog" hair="o4saken_long01" strands="mesh" label="Fit and inspect 46 hair meshes and their candidate strand guides on the frog" />
<p>Eligible loose hairstyles now use an experimental adapter to the shared hair solver from our earlier article. It selects up to 24 guide chains, creates joints, and gives the visible mesh and guide overlay the same skinning weights. The cap stays pinned and unsupported regions remain head-bound. Short styles without eligible loose guides keep rigid attachment. Two French braid examples retain their separate experimental joint-chain treatment. Switching the inspection view preserves playback.</p>
<h2>Fit first, then establish attachment</h2>
<p>We assembled 46 CC0 hairstyle options from MakeHuman collections, dreadlock variants, and Quaternius assets. Each option has a source link in the demo, and the <a href="/blog/hair/library/catalog.json">asset catalog</a> and <a href="/blog/hair/library/LICENSE.txt">license inventory</a> preserve provenance. Their mesh structures vary, so each needs guide extraction and attachment.</p>
<p>The first placement failed visibly: the hair sat behind the frog's head. Bounding-box scaling had aligned the objects without identifying the intended scalp. Our fitting pass now estimates the source crown, aligns it to the target head surface, and moves overlapping upper hair outward against an approximate head envelope.</p>
<p>That is similar to the separation we used in the <a href="/blog/2026-09-13-fitting-clothes-the-sleeve-test">clothing article</a>: placing an asset, fitting its shape, attaching it to a rig, and giving it secondary motion are different jobs. A hair root should stay on the scalp, while the lengths should retain their hairstyle rather than collapse onto the body.</p>
<p>The frog is awkward by design: a wide head, raised eyes, and nonhuman proportions. The current upper/rear scalp mask is specific to this character, so fitting other models would require their own scalp detection. Some styles still obscure the face or have unsuitable proportions.</p>
<h2>Trace paths through the existing surface</h2>
<p>We build a connectivity graph from each hair mesh. Coincident vertices split by UV seams are welded for this analysis. The rendered source mesh is preserved. Within each connected component, we find surface paths from an initial root candidate toward separated endpoints, then smooth and resample those paths into curves.</p>
<p>For adjacent vertices $i$ and $j$, the graph edge cost is their geometric distance:</p>
<p>$$
w_{ij}=\lVert\mathbf{x}<em>j-\mathbf{x}<em>i\rVert,
\qquad
P^*=\arg\min_P\sum</em>{(i,j)\in P}w</em>{ij}.
$$</p>
<p>This shortest-path construction follows the mesh surface, starting from a proposed high-point root. Scalp proximity can reverse a curve later, and the path direction still needs inspection. A flat card often provides a useful path, while a closed cap or a disconnected curl is much more ambiguous.</p>
<p>Each <strong>candidate guide curve</strong> represents a path through the mesh. A card can depict many hairs, and the extracted path can cross their intended flow. In the guide view, check the direction of the cyan curves as well as their attachment.</p>
<h2>Make the roots follow the actual scalp</h2>
<p>A guide endpoint is matched to an eligible scalp triangle. If it is too far away, we reject the connection rather than stretch it arbitrarily to the head. Accepted roots store the triangle's vertex indices and barycentric weights.</p>
<p>For triangle vertices $\mathbf{a}(t)$, $\mathbf{b}(t)$, and $\mathbf{c}(t)$ on the animated body, the attached root is</p>
<p>$$
\mathbf{r}(t)=\lambda_a\mathbf{a}(t)+\lambda_b\mathbf{b}(t)+\lambda_c\mathbf{c}(t),
\qquad
\lambda_a+\lambda_b+\lambda_c=1,\quad\lambda_i\geq0.
$$</p>
<p>The weights stay fixed while the triangle vertices move with the skin. Parenting the entire display only to the head had left up to <strong>0.657 mm</strong> of root drift in our sampled Walk check. Following the stored triangle attachment reduced that error to numerical precision: <strong>less than $10^{-12}$ metres</strong> for 74 sampled Long01 roots at four animation times.</p>
<p>This check measures root drift at the sampled times under the scene's metre convention. Hairline placement, clearance along each curve, and behavior in other animations still need inspection.</p>
<h2>Joining disconnected fragments {#join-fragments-without-hiding-uncertainty}</h2>
<p>Some hairstyles arrive as many disconnected pieces. A fragment far from the scalp may be a continuation of an already attached lock. We test both orientations and join it to an accepted guide only when the endpoints are close and their directions agree.</p>
<p>The current joining rule uses a <strong>25 mm distance limit</strong> and a tangent dot product above <strong>0.5</strong>, under this scene's scale. Only already attached paths can become parents, which avoids cycles. Curve length, point count, and joining passes are bounded. We selected these thresholds for this prototype.</p>
<p>Joining adds <strong>1,851 connections</strong> to the accepted set. The French braid variation goes from 136 directly attached guides to all 509 connected, and the unkempt braid reaches 512 of 519. The remaining seven fragments stay orange. Review each join for continuity with the intended lock, because unrelated pieces can also sit close together.</p>
<h2>Explore the measured coverage</h2>
<p>Search for a style or show only those with rejected guides. The links open the corresponding live inspection view. The table contains the saved attachment audit for all 46 styles.</p>
<HairGuideResults />
<p><a href="/blog/hair/strand-attachment-results.json">Download the complete attachment results</a>.</p>
<p>All 46 styles loaded without browser errors in the audit. The extraction omitted 90 vertices across three Elvs meshes. Four focused tests check connectivity, reporting of omissions, reconstructable scalp attachments, fragment joining, and rejection of remote fragments. Desktop and 390-pixel mobile views were inspected, and the mobile page had no horizontal overflow.</p>
<p>The audit covers this library fitted to this frog. Broader geometry, pose, self-collision, and export testing remain open.</p>
<h2>What has to happen before this becomes hair physics?</h2>
<p>The current guides provide roots and candidate paths. A first adapter now reuses our existing fixed-step spring, rest-shape, and contact solver. On Long01 it binds 18,204 of 39,804 mesh vertices to 24 chains, and a sampled loose-hair point moved 13.6 mm relative to the head in the controlled test. The sampled movement confirms that the adapter deforms the hair. Motion quality and collision clearance still need evaluation. The mesh and overlay use the same skinning field. Reliable direction, coherent weights across each lock, and broad motion checks remain necessary.</p>
<p>The next steps are to review ambiguous roots and fragment joins, improve guide selection and weights without tearing across separate locks, and validate body contact during motion. Self-contact remains additional work. Export and reload must preserve those bindings too.</p>
<p>For generated characters, replacing a separate hair surface is a practical starting point. A fused head-and-hair mesh adds another prerequisite: identify the hair region and establish a usable scalp underneath it. Our frog experiment doesn't solve that segmentation problem.</p>
<p>The demo now exposes the fitted mesh, candidate paths, moving attachments, and rejected connections. The next iteration will focus on guide direction, weights, and contact during motion.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When an animation has to touch the world]]></title>
            <link>https://app.cinevva.com/blog/2026-09-13-animation-that-meets-the-world</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-13-animation-that-meets-the-world</guid>
            <pubDate>Sun, 13 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[An interactive look at Cinevva's real-time IK prototype: feet on uneven ground, moving platforms, a key meeting a keyhole, and a vessel pouring into a cup. Try the before-and-after examples and see what is implemented.]]></description>
            <content:encoded><![CDATA[<script setup>
import SceneIKDemo from '../.vitepress/components/SceneIKDemo.vue'
</script>
<h1>When an animation has to touch the world</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>A walking animation knows how the legs move. It doesn't know that one foot has reached a step. A reaching animation knows how the arm moves. It doesn't know where this particular keyhole is, or that somebody moved the cup.</p>
<p>This is the next problem after <a href="/tools/rigger">auto-rigging a character</a>: making the animation respond to the scene <strong>while the game is running</strong>. We have implemented an experimental correction layer in Cinevva's Three.js runtime. It reads the pose produced by the animation, queries the scene, and adjusts the character's joints before the frame is rendered.</p>
<p>The examples below run that code in your browser. There is no motion-generation request in the per-frame loop.</p>
<h2>Try the difference</h2>
<p>The demo starts automatically. Choose an example and turn <strong>Corrections</strong> off and on. The left character shows the base pose and the right receives the live correction. Pause and drag the timeline to examine a particular instant. Drag either viewport to orbit around the character, scroll or pinch to zoom, and right-drag to pan. Both cameras stay synchronized, so you can inspect the same contact from exactly the same angle.</p>
<SceneIKDemo />
<p>Every example uses the same Cinevva auto-rigged frog. The walking example plays <strong>Walk from the Universal Animation Library</strong>, retargeted through the same code used by Auto Rigger. Both viewports play the actual clip, and the right adds runtime terrain corrections. Other examples retain the embedded Idle reference and their interaction controllers.</p>
<p>The walking controller plans <strong>one stride ahead</strong>. It predicts the moving tread at touchdown, centres the frog's whole sole within its landing area, and sweeps the upcoming swing over the future step heights. It preserves the library clip's cadence and swing shape while adjusting stride length. The pelvis starts its weight transfer and height change before landing. IK then places the limbs on the planned targets and refines the visible sole contact.</p>
<p>Turn on <strong>Footstep plan</strong> to see outlined soles at their predicted touchdown positions and dashed swing paths. <strong>Pelvis trail</strong> compares body motion, and <strong>Save pelvis trace</strong> preserves the measurements. This planner currently handles the demo's known translating treads. It reports infeasible landings. Arbitrary terrain navigation and physical balance forces are separate engine responsibilities.</p>
<p><strong>Climb a ladder</strong> transfers one limb at a time while three contacts hold their rungs. The ladder moves down to keep the climber in view. Explicit ankle and hand targets place the contacts, and elbow/knee guides keep the bends clear of the ladder. The body motion and contact sequence are authored, so this isn't an automatic climbing planner.</p>
<h2>What is implemented</h2>
<table>
<thead>
<tr>
<th>Capability</th>
<th>What the runtime does today</th>
</tr>
</thead>
<tbody>
<tr>
<td>Uneven ground</td>
<td>Queries a support point for each foot, aligns its calibrated sole normal, and adjusts pelvis height.</td>
</tr>
<tr>
<td>Planted feet</td>
<td>Holds a stance contact relative to the surface supporting it.</td>
</tr>
<tr>
<td>Moving platforms</td>
<td>Carries that contact with a translating or rotating support.</td>
</tr>
<tr>
<td>Hand targets</td>
<td>Solves an arm toward a world-space position and orientation, with a blend weight.</td>
</tr>
<tr>
<td>Held objects</td>
<td>Derives the wrist target from the desired object pose and a fixed grip transform.</td>
</tr>
<tr>
<td>Impossible reach</td>
<td>Limits the solve and reports that the character needs repositioning.</td>
</tr>
</tbody>
</table>
<p>This runtime prototype must be enabled explicitly in a game, as it is in the examples below.</p>
<h2>A planted foot needs a reference frame</h2>
<p>Our existing retargeter already corrects some foot drift when transferring a clip between differently proportioned characters. Runtime grounding has another input: the surface the character is standing on now.</p>
<p>When a foot enters stance, the new layer records its contact point in the supporting object's local coordinates. On a static floor, the foot stays put as the body moves. On a moving platform, the same stored point moves with the platform. Anchoring it only in world coordinates would leave the foot behind.</p>
<p>The pelvis then moves within a bounded height range that both legs can reach, and each leg solves toward its foot target. One early test caught a subtle failure: smoothing the pelvis across a reach boundary briefly left a foot floating on a slope. Smoothing now stays inside the feasible range.</p>
<p>The frog exposed a separate calibration error: touching the lowest toe doesn't mean the sole is seated. Its demo now fits a supporting plane to each posed foot mesh, calibrating both position and normal. The rendered regression measures three separated sole contacts as well as the lowest surface point throughout Idle.</p>
<p>The shared body-support check estimates center of mass from weighted body segments and includes illustrative carried-object loads. Standing and reaching examples use it to guide the pelvis toward loaded feet. During walking, the footstep planner owns the anticipated weight transfer, and a static footprint-centering correction must not fight the planned motion. The diagnostics still expose estimated COM and support contacts. Walking reports <strong>Planned weight transfer</strong>, and the ladder reports that grip forces remain unverified.</p>
<p>Walking still needs timing. The game supplies a weight for each foot: how strongly it should be treated as planted at this instant. A swing foot must be released. The game also supplies the gait, the character's movement, and clearance over the next step. Those decisions aren't inferred by the IK solver.</p>
<h2>Put the key in the hole, then solve for the hand</h2>
<p>Pointing the wrist at a keyhole isn't enough. The key has a length, an insertion axis, and a grip offset. Its tip can miss even when the wrist reaches its target perfectly.</p>
<p>In the demo, the interaction sequence defines the key's desired position and rotation. The grip tells us where the wrist must be to put the key there. The arm then solves toward that wrist pose. The actual key remains attached to the solved hand, including when the requested position is unreachable.</p>
<p>In the <strong>Unreachable target</strong> example, the solver preserves limb length and reports that the character needs repositioning.</p>
<p>This example has authored approach, insertion and turn phases. It doesn't yet plan a finger grasp or check the key's shape against the lock's internal clearance.</p>
<h2>Pouring is an orientation problem too</h2>
<p>The pouring example keeps the vessel's spout over the cup while tilting the vessel around it. As the vessel rotates, the necessary wrist position changes. The same hand-target mechanism follows that changing pose.</p>
<p>The blue stream is a visual effect enabled during the tilt. It isn't a fluid simulation. Its purpose here is to make the alignment visible. Without correction it misses the cup, and with correction it falls into the receiving area.</p>
<h2>Where the correction runs</h2>
<p>The sequence in a game is:</p>
<p><strong>Move the character → evaluate animation → apply pose offsets → solve scene contacts → update secondary motion → render.</strong></p>
<p>The runtime exposes this through <code>createAnimator</code> with an optional <code>sceneIK</code> configuration. Games pass contact weights, hand targets and grounded state into <code>update</code>. It can also wrap an existing Three.js animation mixer.</p>
<p>Each rig needs meaningful foot and grip calibration. Bone-name mapping gets us to the right limb, but an ankle joint isn't the bottom of a shoe. This version uses one calibrated support point per foot. It doesn't yet model the entire heel-and-toe support area.</p>
<p>The underlying techniques have established counterparts in <a href="https://docs.unity.cn/Packages/com.unity.animation.rigging%401.3/manual/constraints/TwoBoneIKConstraint.html">Unity's two-bone IK</a> and <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/ik-rig-solvers-in-unreal-engine">Unreal's IK solvers</a>. Our implementation is a small, engine-side correction layer built around the needs of our auto-rigged characters.</p>
<h2>What we checked and what remains</h2>
<p>The first verification pass included <strong>14 numerical and integration tests</strong>, plus <strong>eight rendered scenarios sampled across 3,840 frames</strong>. We checked moving supports, slope contact, constant animation tracks, coordinate transforms, reach limits, and the runtime animator integration. Browser automation also compared the canvas with corrections enabled and disabled, and exercised the narrow layout.</p>
<p>The measurements check limb-target error in the sampled scenarios. Full mesh collision and motion quality on other characters still need evaluation.</p>
<p>The next layers are footstep planning, better sole support, whole-body reach, finger grasping, and collision-aware interaction phases. Physically simulated liquid is a separate system again.</p>
<p>The correction layer lets an animation retain its underlying motion while its feet and hands respond to the scene each frame. That gives an <a href="/tools/rigger">auto-rigged character</a> a starting point for interacting with the world around it.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to put clothes on a 3D model: fitting, rigging, and animation]]></title>
            <link>https://app.cinevva.com/blog/2026-09-13-fitting-clothes-the-sleeve-test</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-13-fitting-clothes-the-sleeve-test</guid>
            <pubDate>Sun, 13 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A practical workflow for dressing 3D characters with reusable clothing assets. Explore placement, body fitting, skin-weight transfer, animation, and collision checks in interactive demos.]]></description>
            <content:encoded><![CDATA[<script setup>
import ClothingFitDemo from '../.vitepress/components/ClothingFitDemo.vue'
</script>
<h1>How to put clothes on a 3D model</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p><img src="/blog/clothing/hero.png" alt="Side-by-side close-up of the red sweater cuff before and after fitting refinements."></p>
<p>You have a character and a clothing asset. How do you turn them into a dressed character that can move?</p>
<p>Placing a shirt over a torso is the first step. The shirt also has to match the character's proportions, follow the correct joints, retain its materials, and stay clear of the body during animation. Those are separate problems, and solving one doesn't automatically solve the others.</p>
<p>We explored this workflow for <a href="/tools/rigger">Cinevva's auto-rigger</a> using a reusable sweater and an existing rigged character. You can inspect the actual stages of that experiment below. It's a manually guided prototype with a sweater, plus trousers and shorts baselines, on one humanoid frog. Automatic clothing for arbitrary uploads remains future work.</p>
<h2>Explore the process in 3D</h2>
<p>The viewer opens with the <strong>fitted and skinned model</strong>. Enable <strong>Compare before / after</strong> to reveal the earlier stage on the left, starting with scale and placement only. The sweater has been sized and positioned near the character, but it still has its original arm pose and isn't attached to the skeleton. The <strong>right side is fitted and skinned</strong>, so it follows the character's animation.</p>
<p>With comparison enabled, use <strong>Comparison stage</strong> to move from placement to body alignment, then to the earlier fitted and skinned version. Start at <strong>Rest</strong> to compare shapes. Press <strong>Play</strong> to see why fitting and attachment are different steps. Drag either view to orbit both cameras, or inspect the character from behind.</p>
<ClothingFitDemo />
<p>The comparison replays saved stages from the experiment. In the first two stages, the unskinned garment stays in place while the body moves. At the third stage, both garments are already fitted and skinned, so the remaining differences are smaller. The later close-up examines those details.</p>
<p>Use <strong>Find motion</strong> to search the <strong>260-motion universal pack</strong>, then choose an <strong>Animation</strong> to start playback automatically. Use <strong>Pause</strong> to stop. Try Walk, Jump, Crouch Idle, or Sitting Idle. Clips load on demand and use the same retargeting code as the Rigger. Both comparison figures share the clip's timeline and the workbench's root-motion and skin-based grounding rules. The floor grid stays fixed, and the full-body camera follows horizontal travel without cancelling vertical pelvis motion. You can keep that motion while changing garments or fitting stages.</p>
<p>Select <strong>Diagnostic poses</strong> to return to the original pose controls and reproduce the article's measurement cases. The universal motions are for visual inspection. The collision counts reported here don't establish that clothing is clear during those motions. On an unskinned preparation stage, the clothing stays fixed while the body moves.</p>
<p>The browser plays and retargets prepared animation assets. It doesn't fit clothing or simulate cloth in real time.</p>
<h2>1. Choose clothing you can actually reuse</h2>
<p>There are two useful starting points: clothing designed for a particular avatar family, and independent garment meshes that you will adapt to a new body. The first offers a known body, pose, and often an attachment convention. The second offers more freedom, but gives the fitting pipeline more work.</p>
<p>For this experiment we selected MargaretToigo's <strong>fisherman sweater</strong> from the <a href="https://static.makehumancommunity.org/assets/assetpacks/shirts01.html">MakeHuman Shirts01 collection</a>. That specific asset is listed as CC0. It includes an OBJ mesh, UV texture, material description, and a correspondence file for MakeHuman's body template. The garment has <strong>2,126 vertices and 4,164 triangles</strong>.</p>
<p>Check the actual asset's rights and contents before treating a download as a reusable wardrobe item. A preview image doesn't establish that you have a separate garment mesh, usable textures, or permission to distribute a dressed model.</p>
<p>Our sweater's template correspondence refers to MakeHuman's body topology. Our frog has a different mesh and skeleton, so importing the OBJ doesn't apply that correspondence automatically. Body-template correspondence weights are also different from skeletal skin weights.</p>
<h3>Try trousers and shorts, too</h3>
<p>A sweater tests shoulders and arms. Trousers add a different fitting problem: a waistband surrounding the hips, two legs that move independently, and a crotch that must bridge them. Shorts share the hip problem but end before the knee.</p>
<ClothingFitDemo focus="wardrobe" />
<p>Choose <strong>Cargo trousers</strong> or <strong>Denim shorts</strong>. The viewer shows a manually fitted and skinned prototype. Enable <strong>Compare before / after</strong> to add the scale-and-placement stage on the left. Try <strong>Left knee bent</strong> and <strong>Both knees bent</strong>, then orbit behind the character. <strong>Show knees</strong> marks the same left and right knee joints in both views, and <strong>Hide clothes</strong> exposes the body for a direct stance comparison. Knee-joint positions match exactly in all six checked poses. The differently fitted trouser outlines can otherwise make the knees look closer together. The trousers and shorts each use a separate source mesh and its original textures.</p>
<p>Both assets are by <strong>Cortu</strong>, listed as <strong>CC0</strong> in the <a href="https://static.makehumancommunity.org/assets/assetpacks/pants01.html">MakeHuman pants pack</a>. For this experiment we subdivided the low-resolution meshes, mapped their hip and leg regions to the frog's joints, applied local clearance corrections, and transferred weights from nearby body triangles. The controls replay an authored lower-body diagnostic motion.</p>
<p>The clothing examples are still prototypes. The sweater, trousers, and shorts have different validation results. The <a href="#what-the-trousers-and-shorts-taught-us">fitting lessons below</a> explain what improved and what remains wrong.</p>
<h2>2. Establish the body and its rest pose</h2>
<p>A fitting system needs to know what the clothing is supposed to surround. In this case, our local rigged frog has an exposed body mesh, long arms, large hands, and a 22-joint humanoid skeleton. That gives us a usable target surface and meaningful shoulder, elbow, wrist, hip, and neck landmarks.</p>
<p>A character already wearing a coat may contain only the coat's outer surface. It may not have a complete torso underneath. In that situation, the practical choices are to fit an outer layer over the existing geometry, use an explicitly approximate body proxy, or obtain a suitable base body. Joint names alone can't recover the missing surface.</p>
<p>Before fitting, put the garment and body in the same coordinate frame. Resolve their scale, orientation, object transforms, and rest poses. A garment authored around lowered arms won't match a T-pose merely because their bounding boxes have the same height.</p>
<p>This is also why animation retargeting isn't clothing fitting: transferring motion between skeletons doesn't reshape a shirt around a new chest or resize its sleeves.</p>
<h2>3. Fit the garment's shape to the body</h2>
<p>The first demo separates simple placement from a more deliberate alignment. Our prototype reads target landmarks from the skeleton and uses explicit corresponding landmarks on the sweater. A torso deformation and arm mappings provide the initial fit, with continuous blending between arm segments.</p>
<p>The next step applies a bounded surface-clearance correction while smoothing the displacement. The aim is to move overlapping fabric outward without destroying the garment's shape. This fitting pass adjusts the static mesh. Fabric motion would require a separate solver.</p>
<p>Different input contracts call for different approaches:</p>
<table>
<thead>
<tr>
<th>Starting point</th>
<th>Practical fitting route</th>
<th>What still needs checking</th>
</tr>
</thead>
<tbody>
<tr>
<td>Garment made for the same body template</td>
<td>Apply its known template correspondence or supported body-shape controls</td>
<td>Pose, proportions, and asset-specific assumptions</td>
</tr>
<tr>
<td>Separate garment and a different body</td>
<td>Align landmarks or a fitting cage, deform the garment, then resolve overlap</td>
<td>Seams, silhouette, clearance, and local stretch</td>
</tr>
<tr>
<td>Loose or layered clothing</td>
<td>Use a proxy and collision-aware fitting; consider offline cloth simulation</td>
<td>Layer order, self-contact, and preservation of volume</td>
</tr>
</tbody>
</table>
<p>The table describes possible workflow choices. Our experiments use the second route: landmark fitting for the sweater and trousers, followed by a deformation cage for the shorts. The other routes remain to be tested.</p>
<p>Preserve design intent while fitting. A loose coat shouldn't collapse onto the body like a painted surface. A skirt needs space around both legs. UV seams and separate layers must not be indiscriminately welded together to make an optimizer's input easier.</p>
<h2>4. Attach the fitted clothes to the rig</h2>
<p>After fitting, the garment still needs an answer to a different question: <strong>which bones should move each vertex?</strong></p>
<p>Parenting the whole sweater to the character makes it travel with the character, but doesn't make a sleeve bend at the elbow. Skeletal skinning gives each vertex a weighted combination of joint transforms. For clothing close to the body, the body's existing weight field is a useful starting point.</p>
<p>For the sweater, our prototype transfers reliable surface weights and fills uncertain regions from trusted neighbors, following the approach described in <a href="https://www.dgp.toronto.edu/~rinat/projects/RobustSkinWeightsTransfer/">Robust Skin Weights Transfer via Weight Inpainting</a>. Matches are filtered by geometry, and explicit attachment intent handles ambiguous regions. For a sleeve, a nearby hand isn't necessarily the correct weight source. For a glove, it might be.</p>
<p>The trousers and shorts use a simpler nearest-triangle, barycentric transfer of the body's weights, limited to four joint influences per vertex. That method still needs scrutiny around the crotch and each leg opening.</p>
<p>The garment now follows the existing animation. Independent fabric motion would require cloth simulation, spring-driven secondary motion, or baked cloth animation.</p>
<p>In the main demo, compare <strong>Scale and place</strong> with <strong>Fit and transfer weights</strong> during playback. That is the distinction between a garment sitting around the character and a garment participating in its pose.</p>
<h2>5. Test the dressed character in motion</h2>
<p>A rest-pose fit can hide a poor attachment or an intersection that appears when a joint bends. Test the character from front, side, and back, then exercise the motions that stress the garment: raised arms, bent elbows, wrist movement, and hips and knees when the clothing reaches them.</p>
<p>Our first real-garment pass showed why several measurements are necessary:</p>
<table>
<thead>
<tr>
<th>Stage in the initial fit</th>
<th style="text-align:right">Garment triangles crossing the body</th>
</tr>
</thead>
<tbody>
<tr>
<td>Simple scaling</td>
<td style="text-align:right">352</td>
</tr>
<tr>
<td>Landmark alignment</td>
<td style="text-align:right">495</td>
</tr>
<tr>
<td>Surface-clearance correction</td>
<td style="text-align:right">33</td>
</tr>
</tbody>
</table>
<p>The landmark stage made the garment's placement more purposeful, but increased intersections. Surface correction improved the count substantially, yet still didn't pass a collision-free rule.</p>
<p>A vertex-only test was even more misleading. It reported zero vertices on the negative side of their nearest body-surface normal, while triangle checks still found crossings. A triangle can pass through the body even when its corners appear to clear a nearby surface.</p>
<h3>What the trousers and shorts taught us</h3>
<p>The lower-body experiments exposed a failure that a collision score alone can't catch: a garment can intersect less and still look wrong.</p>
<p><strong>The trousers lost their shape.</strong> A clearance-only correction retained oversized hips. Pulling the fabric toward the body removed that flare, but dragged the crotch down and made the trousers resemble a tight, distorted surface. Matching knee-joint positions on both figures didn't establish that the clothing fit correctly.</p>
<p>We then fixed the waistband, crotch, knee, and ankle heights and restricted clearance corrections to horizontal movement. That restored the rise, but close front, side, and rear views still showed pinching at the crotch, angular knees, uneven cuffs, and loss of the cargo silhouette. The current trousers retain <strong>53 affected triangles at rest</strong> and <strong>50–92 across six sampled poses</strong>. The sagging version had fewer intersections, 21 at rest, but wasn't an acceptable fit.</p>
<p><strong>The shorts needed their own constraints.</strong> Applying the earlier fitting baseline produced a flared waist, folded crotch, and overly wide leg openings. We replaced independent vertex movement with a <strong>5 × 5 × 5 deformation cage</strong>: a coarse grid whose movements deform nearby fabric together. The cage preserves the source mesh and UV seams while keeping the vertical rise fixed. It reduced the jagged folds, but initially left the waistband standing away from the torso.</p>
<p>The next correction identified the waistband's actual <strong>136-vertex boundary loop</strong> and fitted it to torso cross-sections. That improved the side silhouette. Rear inspection then exposed clipping that the boundary and vertex-clearance checks had missed: a fabric triangle can intersect the body between otherwise clear vertices.</p>
<p><strong>The rear waistband needed a triangle-level correction.</strong> We tightened the boundary constraints, checked the full waistband strip, and moved only the intersecting garment faces outward against the planes of the body triangles they crossed. The waistband height remained fixed.</p>
<table>
<thead>
<tr>
<th>Shorts revision</th>
<th style="text-align:right">Whole garment: affected triangles at rest</th>
<th style="text-align:right">Rear waistband: affected triangles at rest</th>
</tr>
</thead>
<tbody>
<tr>
<td>Initial fitting baseline</td>
<td style="text-align:right">143</td>
<td style="text-align:right">Not separately measured</td>
</tr>
<tr>
<td>Cage fit with the first waistband constraint</td>
<td style="text-align:right">28</td>
<td style="text-align:right">9</td>
</tr>
<tr>
<td>Current rear-waistband correction</td>
<td style="text-align:right">19</td>
<td style="text-align:right">0</td>
</tr>
</tbody>
</table>
<p>The final check found <strong>zero rear-waistband crossings in all six sampled poses</strong>, with <strong>19 affected triangles elsewhere in every pose</strong>. The rear region is defined from the source garment's triangle centroids. The zero-crossing result applies only to that region. The <a href="/blog/clothing/shorts-measurements.json">shorts measurements</a> include both the previous waistband revision and the current correction.</p>
<p><img src="/blog/clothing/shorts-rear-review.png" alt="Current denim shorts viewed from behind, showing the corrected waistband and the remaining lower rear-seam defect."></p>
<p><em>Current rear view. The waistband clipping is corrected in the checked poses. The lower rear-seam defect remains visible. The leg openings also need refinement.</em></p>
<p>The waistband targets include 14 mm of intended ease around this model. The final boundary differs from those targets by 2.0 mm on average and 5.4 mm at most. We tuned the ease for this garment and body. The reported distances use the scene's metre convention.</p>
<p>The practical lesson is to give each garment separate requirements for <strong>rise, silhouette, seam integrity, attachment, and collision clearance</strong>. For shorts, the next work is to constrain each hem around its own thigh and repair the rear seam without disturbing the corrected waistband. Wider walking, sitting, and squatting tests must follow. Discrete checks don't cover self-collision, coplanar contacts, or motion between sampled frames.</p>
<h3>A detail check: sleeves and wrists</h3>
<p>Sleeves were one revealing failure case within this larger workflow. The earlier fitted sweater looked similar to the refined version at full-character scale. The difference became clearer in close-ups and wrist stress poses.</p>
<p>The viewer below shows the refined cuff. Enable <strong>Compare before / after</strong> to inspect the earlier cuff alongside it. Both are <strong>already fitted and skinned</strong>. Choose <strong>Wrists forward 45°</strong> or <strong>Wrists back 45°</strong>, then inspect the cuff opening. This comparison isolates the cuff refinement after fitting and skinning.</p>
<ClothingFitDemo focus="sleeves" />
<p>We extracted each cuff's actual boundary loop, blended the arm mappings through the elbow, and spread the cuff correction into the neighboring fabric. On this frog, moving the openings 50 mm toward the forearms left more room for its large hands. We tuned that offset to the frog's hand proportions.</p>
<table>
<thead>
<tr>
<th>Inspection pose</th>
<th style="text-align:right">Earlier fit: affected sleeve triangles</th>
<th style="text-align:right">Refined fit</th>
</tr>
</thead>
<tbody>
<tr>
<td>Rest</td>
<td style="text-align:right">12</td>
<td style="text-align:right">0</td>
</tr>
<tr>
<td>Elbow bent 75°</td>
<td style="text-align:right">12</td>
<td style="text-align:right">0</td>
</tr>
<tr>
<td>Wrist forward 45°</td>
<td style="text-align:right">79</td>
<td style="text-align:right">0</td>
</tr>
<tr>
<td>Wrist back 45°</td>
<td style="text-align:right">60</td>
<td style="text-align:right">0</td>
</tr>
</tbody>
</table>
<p>The wider test still found <strong>one affected sleeve triangle in six of 22 sampled animation frames</strong>. The whole garment also retains <strong>21 affected triangles at rest outside the sleeve mask</strong>. Those remaining intersections need further correction.</p>
<p>These are offline, discrete triangle-crossing measurements. They exclude garment self-intersection, coplanar contacts, and events between sampled frames, and the sleeve mask excludes the innermost shoulder transition. The demos don't calculate a live collision score. The <a href="/blog/clothing/sleeve-measurements.json">sleeve measurements</a> and <a href="/blog/clothing/animation-measurements.json">animation measurements</a> are available separately.</p>
<h2>6. Export, reload, and verify</h2>
<p>The dressed character needs to survive leaving the fitting tool. Verify geometry, materials, UVs, skeleton binding, and animation in the target viewer or engine.</p>
<p>We exported the result as GLB and loaded it independently in Three.js. The sweater retains its texture and skinning. Duplicated vertices at UV seams increase its exported vertex count from 2,126 to 2,386. The maximum measured rest-surface discrepancy after reload was below <strong>0.001 mm</strong> under the file's metre convention.</p>
<p>This checks consistency through export and reload. Integration with the public Rigger's clothing upload and export workflow remains future work.</p>
<h2>Where AI helps and what still needs engineering</h2>
<p>Reviewing the renders exposed the dropped trouser crotch, the shorts' loose waist, and rear clipping that the earlier checks had missed. The assistant helped inspect close front, side, and rear views, including temporary plain materials that made mesh defects easier to see. We compared those observations with measured geometry and kept the failed iterations for reference.</p>
<p>The review led to separate shape constraints for each garment and triangle-level checks around the waistband and cuffs.</p>
<p>The method uses explicit landmarks and fitting rules developed on these examples, with assistant support during implementation and inspection. Automatic fitting and evaluation on unseen outfits remain untested.</p>
<p>The next steps are seam and hem constraints for the shorts, a shape-preserving trouser fit, a genuine human base body, and a garment held out from tuning. We also need broader animation tests and an adapter through the real Rigger workflow.</p>
<p>The workflow is: <strong>choose a suitable garment → establish the body and rest pose → fit the shape → transfer attachment → test motion and collisions → verify export</strong>. The demos show each stage, and the measurements record the remaining shape and intersection problems.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hair should sway, not turn into a tentacle]]></title>
            <link>https://app.cinevva.com/blog/2026-09-13-hair-that-keeps-its-shape</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-13-hair-that-keeps-its-shape</guid>
            <pubDate>Sun, 13 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[How we rebuilt a real ponytail, corrected an over-curling hair solver, and measured the result. Try live before-and-after comparisons on two real avatars.]]></description>
            <content:encoded><![CDATA[<script setup>
import HairMotionDemo from '../.vitepress/components/HairMotionDemo.vue'
</script>
<h1>Hair should sway, not turn into a tentacle</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p><img src="/blog/hair/hero.png" alt="Side-by-side comparison of the girl's layered hair with earlier motion on the left and improved motion on the right."></p>
<p>A character turns her head. Her hair should follow a moment later, swing a little, then settle. Our first version did something else: the ends curled underneath, as though the hairstyle were trying to become a tentacle.</p>
<p>The simulation stayed stable and preserved bone lengths, but those checks missed the accumulating curl.</p>
<p>This is the next piece of our <a href="/tools/rigger">auto-rigger</a>: giving hair its own joints and secondary motion. We started with a simple test mesh, then moved to two real avatars. That changed both the implementation and what we measure.</p>
<h2>First, rebuild a real ponytail</h2>
<p>Seed-san has a separate ponytail mesh. For this test, we erased that mesh's original skin weights, attached it to the head, and asked our geometric fitter to build a new six-joint hair chain. The rest of the character kept its original skinning. The seven short bang chains also kept their artist-authored weights.</p>
<p>The fitter follows the connected hair surface outward from its root, places joints along that path, and blends nearby joint influences. A small band at the attachment stays pinned. This is a selected-clump workflow: we tell it which mesh is hair. It doesn't discover every strand in an arbitrary character.</p>
<p><strong>Try the ponytail below.</strong> Use <strong>Hair motion</strong> to switch between the earlier and improved solver in a single preview. Choose <strong>Move, then settle</strong> to watch the hair come to rest. Pause to inspect a pose, or drag the preview to orbit. The <strong>Animation</strong> selector offers all <strong>260 Universal animations</strong>. Choose a clip to see the whole body move, and <strong>Framing → Hair close-up</strong> brings the camera back to the strands. <strong>Head-turn test</strong> returns to the controlled comparison.</p>
<HairMotionDemo model="seed-rebuilt" label="Live rebuilt ponytail comparison on Seed-san" />
<p>We removed Seed-san's separate backpack and robot arm from these views so the ponytail is unobstructed. Hiding those accessories leaves the body, hair geometry, skin weights and animation unchanged. Backpack contact remains outside this comparison.</p>
<h2>Try the Universal animation library</h2>
<p>The animation selector uses the same world-space retargeter as Cinevva's rigger and runtime. We map each avatar's VRM humanoid metadata to the retargeter's expected joint names, select the body skin rather than an earlier hair-only skin, and capture the body's unanimated pose before the hair demonstration starts. This avoids treating a turned head or a crouch as the character's resting pose when another clip is selected.</p>
<p>A selected clip is fetched from the shared Universal library, retargeted once, and played on the selected character. Horizontal travel is removed to keep the character in view. Every selected Universal animation loops in these demos, including actions originally marked as one-shot. <strong>Restart</strong> replays the selected action. Hair motion runs after the body animation.</p>
<p>We retargeted all <strong>260 clips on each avatar</strong>: 520 outputs, with no missing required body joints, invalid numeric tracks or body-animation tracks targeting the hair joints. We also sampled Idle, Walk, Jump, Back Flip, Dance, Crouch Forward and Sitting Idle, checked body motion and synchronization, and inspected rendered poses. The structural checks cover all clips on these two rigs. Rendered inspection covered the sampled actions. <a href="/blog/hair/animation-checks.json">Retargeting check results</a>.</p>
<p>Clothing needs its authored controls too. This VRM sample uses aim and twist constraints for its sleeves and limb deformation, so animating only humanoid joints leaves the sleeves in their original pose. The demo now loads these controls with the <a href="https://pixiv.github.io/three-vrm/docs/classes/three-vrm.VRMNodeConstraintLoaderPlugin.html">official VRM node-constraint module</a> and updates them after the body animation, before hair simulation. The sleeves follow their supplied constraints, with no cloth simulation.</p>
<p>The full library is available for inspection. The clipping and stretch measurements below use the controlled head-turn sequence. Additional action checks are identified separately.</p>
<h2>The mistake was in the resting shape</h2>
<p>A chain of joints needs a direction to return toward. Our earlier solver calculated that direction relative to the already-bent joint above it. A small deflection at the top therefore changed the resting direction of the next segment, which changed the next one again.</p>
<p>That accumulation produced the curl. Keeping each bone the correct length could not prevent it.</p>
<p>The new solver remembers the hairstyle's original arc in the moving head's coordinate frame. Each segment still has inertia and damping, but its restoring direction comes from that original shape. The head can turn while the hair lags behind, and the lag no longer becomes a new resting curve for everything below it.</p>
<p>We also tuned the existing artist rigs a little firmer and increased damping. The comparison includes both that tuning and the coordinate-frame change.</p>
<h3>A moving target that preserves the original arc</h3>
<p>For segment $i$, let $\mathbf{o}_i$ be its current joint position and $\mathbf{a}_i$ its original child offset. The position it tries to return to is</p>
<p>$$
\mathbf{r}_i=\mathbf{o}_i+R_H R_i^0(s\mathbf{a}_i).
$$</p>
<p>$R_H$ is the animated rotation of the chain's attachment frame, usually the head. $R_i^0$ is the accumulated <strong>original</strong> rotation from that frame to this segment, and $s$ is model scale. The joint position follows the chain, but the target direction comes from the saved arc. Using the already-bent parent's rotation for that direction was what accumulated the curl.</p>
<p>Each step combines attraction toward this target with gravity and exponential damping:</p>
<p>$$
\begin{aligned}
\mathbf{u}_i&amp;=e^{-ch}\bigl[\mathbf{v}_i+h\mathbf{f}_i\bigr],\
\mathbf{f}_i&amp;=k(\mathbf{r}_i-\mathbf{x}_i)+\mathbf{g},\
\mathbf{y}_i&amp;=\mathbf{x}_i+h\mathbf{u}_i.
\end{aligned}
$$</p>
<p>Here $\mathbf{x}_i$ is the simulated endpoint, $\mathbf{v}_i$ its velocity, $k$ the restoring coefficient, $c$ the damping rate, and $\mathbf{g}$ the gravity acceleration used by the solver. The demo samples body motion and hair together at $h=1/120$ second. This is a custom spring update with implicit unit mass rather than a full elastic-rod or XPBD solver.</p>
<p>We then put the endpoint back at its fixed distance $L_i=s\lVert\mathbf{a}_i\rVert$ from the joint:</p>
<p>$$
\widehat{\mathbf{x}}_i=\mathbf{o}_i+
L_i\frac{\mathbf{y}_i-\mathbf{o}_i}
{\lVert\mathbf{y}_i-\mathbf{o}_i\rVert}.
$$</p>
<p>This projection preserves bone length. It doesn't, by itself, preserve every triangle edge or keep the strand outside clothing. The implementation uses the resting direction if the candidate direction degenerates.</p>
<h2>Then try a whole hairstyle</h2>
<p>The second avatar, a pixiv sample, has twelve hair chains and 12,868 hair vertices. Here we preserve the artist's joints and weights and replace the secondary-motion behavior. <strong>This example uses the existing hair rig. Automatic reconstruction of a fused hair mesh remains future work.</strong></p>
<HairMotionDemo model="pixiv" label="Live layered hair comparison on the pixiv sample avatar" />
<p>Look at the ends from the side and back. The improved version holds more of the intended silhouette while retaining movement. The earlier version gathers the ends into a more pronounced curl.</p>
<p>Real models also exposed a quieter bug: some short bangs end in a node that isn't itself a skinned bone. We were skipping those chains. The importer now accepts those endpoints and reads explicitly named head-hair chains from VRM 1 spring metadata. It also reads sphere and capsule collision proxies and per-joint collision radii.</p>
<p><a href="https://github.com/vrm-c/vrm-specification/tree/master/specification/VRMC_springBone-1.0">VRM's spring-bone specification</a> provides the interchange structure. Our motion is a custom solver with tuned defaults, rather than a complete implementation of every VRM spring setting. The demos use <a href="https://github.com/pixiv/three-vrm/tree/dev/packages/three-vrm-materials-mtoon">pixiv's MToon material loader</a> for the authored shading, textures and face/clothing outlines. We disable the expanded hair outline shells because they intersect these thin layered surfaces. Both motion settings use identical lighting and materials. <a href="https://github.com/pixiv/three-vrm/tree/dev/packages/three-vrm-springbone">pixiv's three-vrm spring-bone implementation</a> is an established reference for that ecosystem.</p>
<h2>Why the front locks went through the shirt</h2>
<p>Checking joint positions alone missed a visible failure: the strand between two joints could pass through a shoulder even when both ends were outside its collision shape. We also found an indexing mistake in our VRM radius handling: reading the next joint's radius gave the final segment a zero radius.</p>
<p>The two front locks now use collision checks along each entire segment. A shared fitting pass measures visible body and clothing geometry around the existing collision shapes, with expansion limits based on body size. Strand reach, position and skin-weight ownership identify which chains need segment checks. Both avatars now use this algorithm without model-name or strand-name rules. Expanding collision checks across the entire hairstyle increased stretching, so head attachment constraints and short bangs keep their original treatment.</p>
<p>We checked the result against the actual skinned shirt, independently of those proxies. Over one head-turn cycle, the shirt hid up to <strong>555 of the 1,503 front-lock vertices</strong> with the earlier motion. The automatic fit recorded <strong>zero hits beyond the 1 mm measurement threshold</strong>, at both 30 and 120 frames per second. The earlier maximum measured depth was 75.2 mm. The measurement covers front-view occlusion during this head-turn cycle. <a href="/blog/hair/front-collision.json">Download the front-lock measurements</a>.</p>
<p>Keeping the locks outside the shirt has a tradeoff: the layered hairstyle's 99th-percentile stretch increased from 17.1% before collision fitting to 18.0%. It remains below the earlier solver's 26.0%, and the table below reflects the current result.</p>
<p>Contact response needed a separate correction: pushing a strand out of clothing was being converted into velocity, causing a visible rebound on the next step. We now resolve overlap without adding that impulse, remove incoming motion at contact, and preserve sliding motion. A resting-strand regression checks both endpoint and full-segment contact: the corrected strand stays at the contact position instead of launching away.</p>
<h3>Contact along the strand, without a rebound impulse</h3>
<p>A hair link and a capsule axis are both line segments. Write their points as $\mathbf{p}(u)$ and $\mathbf{q}(v)$, with $u,v\in[0,1]$. Their clearance is</p>
<p>$$
\begin{aligned}
d&amp;=\min_{u,v\in[0,1]}
\lVert\mathbf{p}(u)-\mathbf{q}(v)\rVert,\
C&amp;=d-(r_b+r_h).
\end{aligned}
$$</p>
<p>$r_b$ is the body proxy radius and $r_h$ the hair collision radius, both in world units. Negative $C$ means overlap. Checking only the child endpoint fixes $u=1$ and can miss the middle of a long lock. Segment contact searches the whole interval. A sphere is the special case where the capsule axis has zero length.</p>
<p>To avoid turning position correction into a bounce, we reconstruct velocity <strong>before</strong> pushing the endpoint out of contact:</p>
<p>$$
\mathbf{v}^{*}_i=
\frac{\widehat{\mathbf{x}}_i-\mathbf{x}_i}{h}.
$$</p>
<p>After a nonzero contact correction, let $\mathbf{n}$ be its normalized direction. We remove only the component moving into that correction:</p>
<p>$$
\mathbf{v}^{+}_i=\mathbf{v}^{<em>}_i-
\min(0,\mathbf{v}^{</em>}_i\cdot\mathbf{n})\mathbf{n}.
$$</p>
<p>Tangential motion survives, so the strand can slide. The position correction itself isn't added to velocity. The solver repeats contact projection and removes velocity along the link's radial direction afterward. Interacting constraints can still leave residual overlap.</p>
<p>Back Flip exposed a different coverage gap on the rebuilt ponytail: its separate hair skin didn't contain the torso bones. Collider discovery now searches the body hierarchy, and the shared fitter adds a torso capsule where trunk coverage is missing. A six-second Back Flip check at both 30 and 120 frames per second found no sampled ponytail-link penetration into that capsule. The original head-turn deformation checks still pass.</p>
<p>Fast motion also needs checks between poses. The demo now advances the body, clothing constraints and hair together at 120 steps per second, and checks strands against moving sphere and capsule proxies between those steps. Contact keeps sideways sliding instead of stopping the entire strand, which otherwise made hair stick. Walk and Back Flip on both avatars produced identical sampled hair positions and velocities at 30, 60 and 120 frames per second in our four-second checks. These checks cover sampled sphere and capsule motion. Contact with individual clothing triangles and overlap introduced by later constraints remain unresolved. <a href="/blog/hair/continuous-contact.json">Download the frame-rate and contact checks</a>.</p>
<p>That consistency has a cost. In the earlier two-view benchmark at 60 frames per second, the recorded 95th-percentile update time was about 1 ms for Seed-san and 14–23 ms for the layered model, excluding rendering. Those costs cover two characters, while the live demo now renders one. The layered case still needs optimization and measurement on phones.</p>
<p>The fitter still uses anatomical assumptions and bounded expansion. It preserves authored settings when the required body roles or geometry are missing, and reports unsupported transforms. Eight additional checks cover renamed bones, scale changes, clothing thickness, hidden accessories and restoring the original settings. These two avatars were used for tuning, so unseen hairstyles and garments still need testing before we'd call the result generally reliable.</p>
<h2>Measure the mesh, not just the skeleton</h2>
<p>A bone can keep its length while the triangles around it stretch. We therefore measured every hair triangle edge during a twelve-second run: four seconds of head movement, followed by eight seconds of settling. The simulation runs at 120 steps per second, and mesh measurements are sampled 30 times per second.</p>
<p>For each edge, we record its worst stretch during the run. The table reports the 99th percentile of those per-edge maxima: 99% of edges stayed at or below that amount of stretching.</p>
<p>For mesh edge $e=(a,b)$ with original length $\ell_e^0$, we measure the skinned vertex positions $\mathbf{z}_a(t)$ and $\mathbf{z}_b(t)$:</p>
<p>$$
\begin{aligned}
\rho_e(t)&amp;=\frac{\lVert\mathbf{z}_a(t)-\mathbf{z}<em>b(t)\rVert}{\ell_e^0},\
m_e&amp;=\max</em>{t\in\mathcal{T}}\rho_e(t).
\end{aligned}
$$</p>
<p>$\mathcal{T}$ contains the sampled frames. The reported percentage is $100\bigl(Q_{0.99}({m_e})-1\bigr)$, where $Q_{0.99}$ is the 99th percentile across edges. Taking each edge's maximum <strong>before</strong> the percentile retains brief stretching events that an average over time could hide. The worst-edge figure uses $\max_e m_e$ instead, so a small badly deformed region remains visible in the report.</p>
<table>
<thead>
<tr>
<th>Real-model test</th>
<th style="text-align:right">Earlier motion</th>
<th style="text-align:right">Improved motion</th>
</tr>
</thead>
<tbody>
<tr>
<td>Seed-san: rebuilt ponytail plus original bangs</td>
<td style="text-align:right">8.0%</td>
<td style="text-align:right"><strong>5.0%</strong></td>
</tr>
<tr>
<td>Seed-san: original hair rig</td>
<td style="text-align:right">7.6%</td>
<td style="text-align:right"><strong>5.1%</strong></td>
</tr>
<tr>
<td>pixiv: original layered-hair rig</td>
<td style="text-align:right">26.0%</td>
<td style="text-align:right"><strong>18.0%</strong></td>
</tr>
</tbody>
</table>
<p>The worst individual edge on the layered model improved from <strong>102.7% to 70.8% stretch</strong>, leaving substantial local distortion. Seed-san's worst edge improved from 35.2% to 27.8% in both cases. Both models were also used for tuning, and unseen hairstyles still need testing.</p>
<p>The chain roots stayed fixed. By the final two seconds, measured tip movement between sampled frames was below 0.001 mm in each improved case. Thirteen focused tests cover rigging, fixed roots, shape preservation, collisions, short endpoints, import and animation ownership. We also checked applying and undoing the rig in the viewer and exporting cyclic and one-shot animations.</p>
<p><a href="/blog/hair/measurements.json">Download the measurements</a>. The live examples use the same solver code as the prototype's viewer and export path. The examples render interactively in the browser.</p>
<h2>What this makes possible and what it doesn't yet solve</h2>
<p>For a separate ponytail or lock, we now have a path from selected geometry to joints, weights and secondary motion. For an existing compatible hair rig, we can preserve the artist's work and animate it. When an animation already contains tracks for those hair joints, the procedural solver yields to the authored motion rather than applying a second movement on top.</p>
<p>The deformation benchmark covers head turns and gentle body translation. The separate Walk and Back Flip checks cover the specific contacts and frame rates described above. Broader motion quality still needs review. Collisions use sphere and capsule proxies, and hair self-collision is unimplemented. Braids, curls, fused hair regions and phone performance need their own tests.</p>
<p>The feature remains experimental. On these two characters, the revised solver and tuning reduced curling and improved the measured stretch.</p>
<hr>
<p><strong>Model credits.</strong> Seed-san © VirtualCast, Inc., from the <a href="https://github.com/vrm-c/vrm-specification/tree/master/samples/Seed-san">official VRM sample collection</a>. VRM1_Constraint_Twist_Sample © 2022 pixiv Inc., from <a href="https://github.com/pixiv/three-vrm/tree/dev/packages/three-vrm/examples/models">three-vrm's example models</a>. Both files include <a href="https://vrm.dev/licenses/1.0/">VRM Public License 1.0</a> metadata permitting redistribution and modification. The rebuilt ponytail and custom motion are our changes. <a href="/blog/hair/sources.json">Source URLs and file hashes</a> identify the exact samples used.</p>
<p><strong>Animation credits.</strong> The Universal clips are by Quaternius, from <a href="https://quaternius.com/packs/universalanimationlibrary.html">Universal Animation Library</a> and <a href="https://quaternius.com/packs/universalanimationlibrary2.html">Universal Animation Library 2</a>, provided under CC0.</p>
<h2>Next: reusable hair on a generated character</h2>
<p>Our follow-up starts with unrigged library meshes: <a href="/blog/2026-09-14-from-hair-meshes-to-strand-guides">fit 46 hairstyles to a frog and inspect their extracted strand guides</a>. The live experiment covers scalp attachment and an initial adapter for secondary motion.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The mouse still won't blink]]></title>
            <link>https://app.cinevva.com/blog/2026-09-11-ai-facial-rigging-mouse-blink</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-11-ai-facial-rigging-mouse-blink</guid>
            <pubDate>Fri, 11 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[After rigging and body animation, we're working on facial expressions. Our first experiments with NFR show what it takes to get a character mesh to blink and smile.]]></description>
            <content:encoded><![CDATA[<h1>The mouse still won't blink</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>We've put a lot of work into the tools that bring your models to life at Cinevva: rigging them, getting animations onto them, and fixing the awkward details that show up once they move. That work has taken us through <a href="/blog/2026-08-19-auto-rigged-animals-straight-legs">legs that won't bend</a>, <a href="/blog/2026-08-20-solve-the-surface-not-the-skeleton">animation transfer</a>, and <a href="/blog/2026-09-06-animating-tails-the-rigger-never-gave-a-bone">tails with no bones to drive them</a>.</p>
<p>Now I want to give those characters some emotion. A character should be able to look surprised, annoyed, or pleased as well as walk across a scene. That means getting the face to move: eyelids, brows, cheeks, and a mouth that can do more than hold its resting pose.</p>
<p>We've started looking at recent facial-rigging research to see how far we can get from an existing mesh to usable expressions. This is the first account of that work: what we could actually run, how we prepared the character, and what happened when we tried it.</p>
<p>Our test subject was the mouse from the tail work. It already had a body rig and six animation clips. It could walk, jump, and sprint, but its face stayed fixed through all of them.</p>
<p>We tried NFR, a research implementation that transfers expressions onto a supplied face mesh. The first output was a sheet of poses labelled jaw open, smile, blink, pucker, and brow raise. I couldn't see much useful animation in it. The jaw had pulled the muzzle around, and most of the other pictures looked almost the same.</p>
<p>There was a preparation problem worth fixing before judging the result. We had cut away much of the mouse's eye rims while making the input mesh. So we redid the crop, ran it again, and rendered both attempts in motion. Here they are.</p>
<figure>
<video controls playsinline preload="metadata" poster="/blog/facial-rigging/jaw-comparison.png" aria-label="Nine facial expression tests: first preparation on the left, revised preparation on the right" style="width:100%;border-radius:10px">
<source src="/blog/facial-rigging/animation-comparison.mp4" type="video/mp4">
<a href="/blog/facial-rigging/animation-comparison.mp4">Watch the facial animation comparison.</a>
</video>
<figcaption>First crop on the left, revised crop on the right. Each control runs from 0 to 1 and back, with no extra gain. The checkpoint, camera, and lighting are the same. The video is silent. Expression names appear above the characters.</figcaption>
</figure>
<h2>What went into NFR</h2>
<p>The full character has 22,744 exported vertices and 30 joints, but no facial blendshapes or dedicated jaw and eye bones. We needed to add the face controls without disturbing the existing rig.</p>
<p><a href="https://github.com/dafei-qin/NFR_pytorch#using-your-customized-data">NFR's input requirements</a> explain why we couldn't just hand it the GLB. It expects a facial surface with the eyes and mouth cut open, internal structures and eyeballs excluded, and the mesh roughly aligned to its examples. We removed the back of the head, ears, and neck, made the openings, and kept the largest connected piece. That left 777 vertices and 1,296 triangles.</p>
<p>Every vertex in this crop still corresponded to a position on the original character. After inference, we subtracted the predicted neutral face from each predicted expression, converted the offsets back to the mouse's scale, and applied them to the matching original vertices. Movement faded out near the edge of the crop so it wouldn't stop abruptly where the face met the rest of the head.</p>
<p>This gave us nine blendshapes: stored vertex offsets that a slider can blend into the neutral mesh. Setting every slider to zero restored the original mouse. We kept its skeleton, textures, and six body clips, then added a separate test clip for each expression.</p>
<p>The inference itself took about seven seconds on a T4, once the checkpoint and input were loaded. Getting a usable expression was going to take longer.</p>
<h2>We had cut through the parts we needed</h2>
<p>Our first eye cuts were broad ellipses. On this face, they removed much of the rim around each eye. The mouth cut was below the visible lip seam. Neither mistake was obvious from the numbers describing the mesh: it had finite coordinates, no degenerate triangles, and no nonmanifold edges.</p>
<p>Look at the crop, though, and the problem is fairly clear. We were asking for eyelid movement after discarding much of the surface that might provide it.</p>
<p>For the second pass, we rendered the head from the front and two oblique angles. I used the assistant's image understanding to help mark the eye openings, rims, mouth seam, muzzle, nose, brows, and whiskers. Those outlines were projected onto the visible triangles of the original mesh. Keeping the projection and triangle IDs let us check which actual pieces of the face survived each cut.</p>
<figure>
<img src="/blog/facial-rigging/vision-guided-preparation.png" alt="The first geometric cuts compared with revised outlines following the mouse's eye rims and mouth seam" loading="lazy" style="width:100%;border-radius:10px">
<figcaption>The original cuts and the revised annotations. These are approximate outlines on rendered views, mapped back onto the mesh.</figcaption>
</figure>
<p>We marked 131 visible triangles as belonging to the two eye rims. The first crop had kept only 25 of them. The new one kept 123. That's a useful improvement in the input, although it measures retention against our own annotations rather than independent segmentation accuracy.</p>
<p>We also changed the alignment. Instead of matching the earlier reference extent, we used corresponding facial landmarks to set a uniform scale and position. The new crop had 586 vertices and 952 triangles. It still had gaps and open boundaries, because this pass selected existing geometry rather than building new eyelids or an inside for the mouth.</p>
<h2>More movement, more stretching</h2>
<p>The second run used the same weights and the same nine expression controls. I wanted to see the whole motion this time, so we rendered intermediate strengths between neutral and each full expression, then returned to neutral. The video at the top shows both versions under identical lighting.</p>
<p>The eyes still stay open. The jaw control changes the muzzle without producing a convincing mouth opening. Some mouth controls move more than before, especially the funnel, but the surface distorts with them.</p>
<p>We checked edge lengths to put a number on that distortion. For every edge in the character mesh, we divided its length at full expression by its neutral length and counted the ones that more than doubled.</p>
<table>
<thead>
<tr>
<th>Control</th>
<th style="text-align:right">First crop: edges over 2×</th>
<th style="text-align:right">Revised crop: edges over 2×</th>
<th style="text-align:right">Worst revised stretch</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jaw open</td>
<td style="text-align:right">13</td>
<td style="text-align:right">44</td>
<td style="text-align:right">5.27×</td>
</tr>
<tr>
<td>Smile left</td>
<td style="text-align:right">0</td>
<td style="text-align:right">30</td>
<td style="text-align:right">5.53×</td>
</tr>
<tr>
<td>Mouth funnel</td>
<td style="text-align:right">0</td>
<td style="text-align:right">89</td>
<td style="text-align:right">11.29×</td>
</tr>
</tbody>
</table>
<p>A short edge can give a large ratio, so I wouldn't use this alone to score a facial rig. In this case it agrees with what the renders show. The revised mouth moves more, and some of that movement is stretching we don't want.</p>
<p>We changed three things together: the crop, the alignment, and the fade at the outer boundary. This comparison can't tell us which change caused each artifact. It does tell us that the revised preparation, as a whole, didn't solve the face on this character.</p>
<h2>Why we used NFR</h2>
<p>We looked at other implementations before running this experiment. <a href="https://github.com/google/GNM">Google's GNM Head</a> loaded and produced expressions on its own human-head mesh. Getting those expressions onto our mouse would have required a separate fitting and transfer step. <a href="https://github.com/vasiliskatr/example_based_facial_rigging_ARkit_blendshapes">Example-Based Facial Rigging</a> needed corresponding expression examples that our character didn't have.</p>
<p><a href="https://wenchao-m.github.io/RigAnyFace.github.io/">RigAnyFace</a> and <a href="https://omnifacerig.github.io/">OmniFaceRig</a> were also relevant, but as of September 11, 2026, we hadn't located public inference code and weights we could run for either. OmniFaceRig's dataset link still said &quot;Coming Soon.&quot; NFR had a released checkpoint and a path for custom meshes, so that was the one we took through to an animated mouse.</p>
<p>These weren't five comparable runs. We tested NFR on our facial surface, checked GNM on its native head, and stopped at input or availability limits for the others.</p>
<h2>The next attempt needs an eyelid</h2>
<p>The crop was poor, and fixing it was worth doing. But retaining an eye rim doesn't give it enough geometry or the right motion to cover the eye. The mouth has a similar problem: we can pull on the muzzle, but this experiment hasn't built the opening and interior that the pose needs.</p>
<p>I'd tackle one blink and one jaw opening next. Give the eyelid a shape that can close over the eye, prepare the lips and mouth interior, then fit or author the corrective shapes for those two movements. Check them from the side as well as the front before adding the rest of the controls.</p>
<p>We kept both attempts, including the raw predictions and the exact crops, so we can compare that work against this result. For now, the body rig and its animations are intact. The facial shapes remain an experiment. I wouldn't use them in a finished character.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Animating tails the rigger never gave a bone]]></title>
            <link>https://app.cinevva.com/blog/2026-09-06-animating-tails-the-rigger-never-gave-a-bone</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-09-06-animating-tails-the-rigger-never-gave-a-bone</guid>
            <pubDate>Sun, 06 Sep 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Our auto-rigger fits a humanoid skeleton, so a fox's tail ended up skinned to its left shin. Here is how we find the tail in the mesh, grow a bone chain along it, swing it on a spring at runtime, and measure that the tearing is gone. Updated with a mouse character, elastic bending, floor contact, and the grounding bugs a long tail exposed. With live characters you can orbit.]]></description>
            <content:encoded><![CDATA[<script setup>
import CharacterAnimationShowcase from '../.vitepress/components/CharacterAnimationShowcase.vue'
</script>
<h1>Animating tails the rigger never gave a bone</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p><em>Updated September 11, 2026: <a href="#what-the-mouse-taught-us">what the mouse taught us</a> adds elastic bends, floor contact, and a second kind of tail-induced body lift.</em></p>
<p>A user rigged an anthropomorphic fox in <a href="/tools/rigger">our rigger</a> and played the Walk clip. The body was fine. The tail folded up against the left leg like a wet towel, and where the left and right leg weights met, it tore. That fox is the running example below, and the fix is now live in the rigger and in the runtime library that plays its clips.</p>
<p>Both the fox and the mouse featured in this article were generated with <a href="/tools/hunyuan3d">our 3D model generator</a>, then rigged and animated in Cinevva.</p>
<img src="https://cdn.cinevva.com/blog/tails/tails-three-up.jpg" alt="Three copies of a walking fox from behind: the original rig with its tail folded around the left leg, a rigid tail hanging straight down, and a tail on a bone chain carried up and back" loading="lazy" style="width:100%;border-radius:10px">
<p>Left to right, mid-stride at the same frame: the rig as it came out of the rigger, the same rig with the tail handed to the pelvis as one piece, and the tail on its own bone chain with the runtime swinging it. You can orbit all three <a href="#the-live-comparison">further down</a>.</p>
<h2>Why a humanoid rigger does this</h2>
<p>Our Fast engine is built on <a href="/blog/2026-08-19-auto-rigged-animals-straight-legs">Make-It-Animatable</a>, which predicts a fixed Mixamo-style skeleton: 22 body bones, or 65 with fingers. Every vertex in the mesh has to be assigned to one of those bones. A tail isn't on the list, so the model does the next best thing it knows and hands the tail's vertices to whatever body part is nearest in its learned feature space. For this fox that was the left shin, with the rest split between the two thighs.</p>
<p>The fixed template has no tail bone, so adjusting its weights alone can't give the tail independent motion. Other appendages, including wings and long hair, also need controls beyond that body skeleton.</p>
<p>We measured what that costs on the fox's 1,582 tail vertices before touching anything. The distance from each vertex to the bones that actually move it (weighted by the weights) averaged 47 cm on a 191 cm model. The tail was being driven from half a metre away.</p>
<h2>Finding the tail</h2>
<p>The pass works from the mesh and skeleton in a rigged GLB. It uses their geometry rather than information specific to our rigger.</p>
<p><strong>A distance field over the skeleton.</strong> For every vertex $p$ and every bone segment from joint $a$ to joint $b$ in bind space, the distance to the segment is</p>
<p>$$
d(p, ab) = \left| p - \big(a + t,(b-a)\big) \right|, \qquad t = \operatorname{clamp}!\left(\frac{(p-a)\cdot(b-a)}{|b-a|^2},,0,,1\right)
$$</p>
<p>and a vertex's skeleton distance is the minimum over all segments. Leaf joints get a short stub past the joint so a snout or a hand isn't counted as far from its own bone. A vertex is <em>far</em> when that distance exceeds 7% of the model's height. For the fox that's 13 cm.</p>
<p><strong>Connected pieces of far skin.</strong> Far vertices are grouped into connected components along the mesh's own faces. One detail cost us an hour: exporters split vertices at UV and hard-normal seams, so this mesh has 23,129 vertices but only 29,081 triangles, and the face graph alone breaks one tail into dozens of islands. We weld vertices by position first, run connectivity on the welded graph, and write weights back per original vertex.</p>
<p><strong>Where does it attach?</strong> The collar of a piece is the ring of non-far vertices next to it. Its centre tells us where the piece hangs from, by nearest joint, with one bias: a torso or thigh joint within 1.5 times the nearest distance wins, because around the pelvis the thigh heads sit exactly as close as the hips do and a tail root between them belongs to the body. We don't use the collar's weights for this. On a tail modelled as its own shell (most game models), the collar is the tail's own root ring, carrying the same bad weights we're trying to fix.</p>
<p><strong>Is it an appendage or is it body?</strong> Two tests. A thick torso's far-off skin wraps around a bone, so its centre of mass lands back on the bone. A tail sticks out to one side, so its centre of mass is far from every bone. We require the centroid's skeleton distance to be at least 40% of the piece's reach. Then a shape test: with $\lambda_1 \ge \lambda_2$ the two largest eigenvalues of the piece's covariance, elongation is $\sqrt{\lambda_1/\lambda_2}$. A tail scores around 2.6 here, and a cape or a skirt scores near 1. Only long pieces hanging from the pelvis become chains. The initial version attached long spine-mounted pieces, such as a sheath, quiver or strap, rigidly to a torso bone. We later made that step opt-in after testing garments, as described below. Head-attached pieces such as ears retain their existing weights.</p>
<p>The fox's tail came out as two overlapping shells (fur over skin, never welded), so pieces on the same attachment whose bounding boxes overlap by more than half are merged. We build a single chain for the merged tail.</p>
<h2>Step one: make it rigid</h2>
<p>The first version used a rigid attachment. Every vertex of the piece gets weight 1.0 on Hips. The tail stops tearing and moves as one piece with the pelvis. It looks like a plank, and that is the middle fox in the picture. We shipped this as a milestone because its stretch is exactly zero by construction, which makes it a useful reference for the measurement below.</p>
<h2>Step two: grow a chain along it</h2>
<p><strong>A coordinate along the tail.</strong> We run Dijkstra from the collar into the piece over mesh edges weighted by edge length. Every tail vertex gets a geodesic distance $g$ from the root, and the 99th percentile of $g$ is the tail length $L$: 81 cm for the fox, 42% of its height.</p>
<p><strong>Joints.</strong> The number of segments is $K = \operatorname{clamp}(\operatorname{round}(L / 0.1H), 3, 8)$, four for the fox. Joint $J_0$ is the collar centroid and joint $J_i$ is the centroid of the skin whose geodesic distance falls within half a segment of $i L / K$. Two passes of $J_i \leftarrow \tfrac12 J_i + \tfrac14 (J_{i-1} + J_{i+1})$ stop the chain zigzagging where the cross-section is lopsided, as it is near this bushy tail tip. The bones are <code>Tail_1</code> through <code>Tail_K</code> plus a weightless <code>Tail_End</code>, parented under Hips, sharing the Hips bind rotation so each is a pure translation in its parent's frame. Their inverse bind matrices follow directly. The existing clips contain no tracks for these joints, leaving them available for secondary motion.</p>
<p><strong>Weights.</strong> With $s = K g / L$ and $k = \lfloor s \rfloor$, $f = s - k$, a vertex in segment $k$ is owned by bone $k+1$ and shares the ends with its neighbours:</p>
<p>$$
w_{\text{prev}} = \operatorname{clamp}(0.5 - 2f,\ 0,\ 0.5), \qquad
w_{\text{next}} = \operatorname{clamp}(2f - 1.5,\ 0,\ 0.5), \qquad
w_{\text{self}} = 1 - w_{\text{prev}} - w_{\text{next}}
$$</p>
<p>At a joint the two bones meet at 50/50, and in the middle of a segment one bone owns the skin outright. For the root segment, &quot;prev&quot; is Hips, so the tail blends into the body instead of creasing at the collar.</p>
<p>After the pass, the weighted bone distance on the tail dropped from 47 cm to 17 cm, which is about the tail's own radius. The new bones run through the tail itself.</p>
<img src="https://cdn.cinevva.com/blog/tails/tails-chain-side-bones.jpg" alt="Side view of the walking fox with its skeleton drawn over the mesh; four tail bones run from the pelvis along the tail, carried up and back" loading="lazy" style="width:100%;border-radius:10px">
<h2>Step three: something has to move the bones</h2>
<p>No clip in our library has tail tracks, so without more work the chain holds its bind pose and the fox walks around with a plank. Games solve this with procedural secondary motion, and so do we, in the runtime library every rigged model already loads.</p>
<p>Each joint tip is a particle $p$ with velocity $v$. Its rest target $T$ is where the bind pose says the tip should be, computed each frame from the parent bone's current world transform. The particle follows a damped spring:</p>
<p>$$
\ddot p = \omega^2 (T - p) - 2\zeta\omega,\dot p + g
$$</p>
<p>with $\omega = 2\pi f$. The root segment swings at $f = 0.9$ Hz and the tip at half that, because a tail is muscle at the base and fur at the end. The original damping ratio was $\zeta = 0.45$, and the mouse update below raises it to $0.65$ to reduce overshoot. Gravity is 1 m/s² rather than 9.8, because a tail has muscle in it. We integrate with semi-implicit Euler, then enforce the rope constraint by projecting $p$ back onto the sphere of the bone's length around the bone's head. A rope can't stretch, so neither can the velocity along it: the radial component $(\dot p \cdot \hat n)\hat n$ is dropped and the swing is kept. Finally the bone's rotation is read back: the quaternion that takes its bind direction onto the direction to the particle.</p>
<p>Because the particles live in world space, turning or accelerating the hips makes the tail lag behind and swing through the spring update.</p>
<p>Motion and stretch checks exposed three problems in the early solver.</p>
<p>The first version pulled each particle a fixed fraction of the way to its target every frame, 12% at 60 fps. Written as a spring that is $\omega \approx \sqrt{0.12}/\Delta t \approx 21$ rad/s, a 3.4 Hz jitter, and because that stiffness barely let the root segments move, all the motion piled up at the tip. Writing the spring in physical units fixed both at once.</p>
<p>The second version fed the rope correction back as velocity, correction divided by $\Delta t$. That reads like the standard position-based-dynamics update, and it is stable while the hips move slowly, which a walk cycle does. The faster the parent moves, the bigger the correction, and the bigger the velocity it injects. A half-metre hip sweep over two thirds of a second was enough: one bone rotated 95° while its neighbours moved 3°. A headless test that swung the hips harder than any clip we ship caught it. The walk cycle never would have.</p>
<p>The third was the carry angle below. It was applied in each joint's own frame, so a four-bone tail lifted four times over, curled into a ball against the fox's back, and tore its own skin at every bend. The measurement below is what found it: tail edge stretch went to a p99 of 2.3 against a body baseline of 1.3, worse than the shin it started on. <code>carry</code> is now the lift of the whole tail, shared across its joints.</p>
<p><strong>Clipping.</strong> The tail was modelled hanging straight down between the legs, and the walk cycle put the feet through it. The rest pose the spring aims for is therefore not the mesh's own: a <code>carry</code> of 50° lifts the rest targets backward and up around the hips' side axis, the way a fox holds its tail when moving. That 50° is the whole tail's lift, shared across its joints, so the arc is gentle wherever the chain came out four bones long or eight. And no particle may cross the plane through the tail root that faces forward, so the tail can never swing between the legs.</p>
<h2>Measuring it</h2>
<p>These are the original fox measurements from September 6, before the mouse changes below. They document the first chain solver rather than a fresh benchmark of the revised defaults.</p>
<p>We measured edge stretch throughout the clip to capture deformation during motion. For every mesh edge whose two vertices are both on the tail, we take the ratio of its skinned length to its bind length at 24 evenly spaced times through the Walk clip. A ratio of 1 is undeformed skin. An edge stretched past 1.5 or squashed below 0.67 counts as torn. Body edges are measured the same way as a baseline for what normal skinning distortion looks like.</p>
<table>
<thead>
<tr>
<th>Walk clip, 96,864 tail edge samples</th>
<th>p95</th>
<th>p99</th>
<th>max</th>
<th>torn</th>
</tr>
</thead>
<tbody>
<tr>
<td>Original rig</td>
<td>1.60</td>
<td>2.42</td>
<td>4.03</td>
<td>11.4%</td>
</tr>
<tr>
<td>Rigid to Hips</td>
<td>1.00</td>
<td>1.00</td>
<td>1.00</td>
<td>0%</td>
</tr>
<tr>
<td>Tail chain</td>
<td>1.09</td>
<td>1.18</td>
<td>1.30</td>
<td>0%</td>
</tr>
<tr>
<td>Body, for reference</td>
<td>1.13</td>
<td>1.29</td>
<td>1.78</td>
<td>n/a</td>
</tr>
</tbody>
</table>
<p>The original rig stretched one in nine tail edges past tearing, and its worst edge was four times its bind length. The chain's worst edge is 30% long, inside the body's own baseline of 1.78, with no samples exceeding our tearing thresholds. The rigid tail sits at exactly 1.00 because it moves as one piece, which provided a control for the stretch measurement.</p>
<p>A swinging tail deforms its skin, so we compared stretch with the body baseline and checked how much it moved. An earlier version reached a p99 of 1.03 because the velocity bug above had over-damped the tail until it barely moved.</p>
<h2>The live comparison</h2>
<p>Three copies of the fox, same clip, same frame. Drag to orbit, wheel to zoom. Switch clips, turn the tail physics off to see the chain in its carried rest pose, and turn on the bones to see where the chain sits.</p>
<ClientOnly>
<TailDemo models="https://cdn.cinevva.com/blog/tails/fox-tail-before-v2.glb,https://cdn.cinevva.com/blog/tails/fox-tail-rigid-v2.glb,https://cdn.cinevva.com/blog/tails/fox-tail-chain-v2.glb" labels="Original rig,Rigid to hips,Tail chain" clip="Walk" :height="520" />
</ClientOnly>
<p>The same chain from the side, alone, with the skeleton drawn. Sprint is the clip that shows the spring best.</p>
<ClientOnly>
<TailDemo models="https://cdn.cinevva.com/blog/tails/fox-tail-chain-v2.glb" labels="Tail chain" clip="Sprint" view="side" :height="480" />
</ClientOnly>
<h2>What the mouse taught us</h2>
<p>The fox established that a chain could stop the tearing. A mouse with a long, thin tail made the remaining motion errors much easier to see. A sharp bend that disappears inside a fox's fur reads as a broken joint on the mouse. Its tail also reaches the floor, and its modelled shape curls to one side. Those are three different problems, and turning up the spring stiffness doesn't solve all of them.</p>
<p>Try the mouse across the animation library below. Drag the character to orbit, scroll the thumbnail strip sideways, or use its search and category filter to find a motion. Click a tile to play it on the large preview. Walk, Crouch Backward, Crawl Idle and Back Flip are useful places to start when inspecting the tail. The strip uses the same live animation previews as our animations hero and makes the full catalog available, loading motions as you browse.</p>
<ClientOnly>
<CharacterAnimationShowcase model-url="/models/hero-character-static.glb" />
</ClientOnly>
<p><a href="/tools/animations">Open the full animation library →</a> to try these motions on your own rigged character and export the clips you choose.</p>
<h3>A chain of springs still needs bending resistance</h3>
<p>The particles were constrained to keep each bone's length, but each joint could still swing almost independently. Length constraints prevent stretching, but they don't prevent a hinge from folding. The mouse exposed exactly that distinction.</p>
<img src="/blog/tails/mouse-tail-kink-before.png" alt="Before the mouse fixes: the tail skeleton changes direction sharply near the tip, and the mesh ends in a downward kink" loading="lazy" style="display:block;max-height:440px;max-width:100%;margin:24px auto;border-radius:10px">
<p><em>Before the fixes: keeping segment lengths intact wasn't enough to keep the curve smooth.</em></p>
<p>We now couple neighboring joints' extra bends, measured relative to the resting curve. The bends are compared in a common reference frame so different bone axes don't turn a left bend into an unrelated twist on the next joint. Each step reads a snapshot of its neighbors rather than partly updated values. The coupling blend is $1-e^{-k\Delta t}$, with a default rate of $k=12$ per second, rather than a fixed fraction per rendered frame.</p>
<p>A joint's elastic bend is limited to 30° beyond its resting direction. We also increased damping to 0.65 and remove velocity that keeps pushing into the bend stop, so it can't accumulate and release as a snap. The base remains supported by the hips and the tip remains softer. Contact can override the bend limit when the tail needs to lie on the floor.</p>
<p><strong>Coupling rotations rather than particle positions.</strong> Number the $N$ links from $i=0$ at the hips. Let $h_i$ be a link's head, $p_i$ its predicted tip, and $\ell_i$ its length. Its candidate direction is $d_i=(p_i-h_i)/|p_i-h_i|$. In the current parent's frame, let $r_i$ be the unit resting direction and $\tilde d_i$ the candidate direction. Write $\operatorname{swing}(a,b)$ for the shortest unit quaternion taking unit vector $a$ to $b$. If $A_i$ rotates that parent's resting frame into the common hips frame, the bend we compare with neighbors is</p>
<p>$$
q_i = A_i,\operatorname{swing}(r_i,\tilde d_i),A_i^{-1}.
$$</p>
<p>This conjugation changes the bend's coordinate frame and doesn't add another rotation to the character. Using snapshots $q_j^{\mathrm{old}}$ from the preceding step, an interior joint's neighbor target and coupled bend are</p>
<p>$$
\begin{aligned}
\bar q_i &amp;= \operatorname{slerp}(q_{i-1}^{\mathrm{old}},q_{i+1}^{\mathrm{old}},\tfrac12),\
\alpha &amp;= 1-\exp(-k\Delta t),\
q_i^* &amp;= \operatorname{slerp}(q_i,\bar q_i,\alpha).
\end{aligned}
$$</p>
<p>At the base, the neighbor target is halfway between the next joint's bend and the identity quaternion $I$, representing support from the hips. The free tip uses its one neighbor, and a single-link tail skips neighbor coupling. With $k=12,\mathrm{s}^{-1}$, $\alpha$ is about 0.181 at 60 fps and 0.330 at 30 fps. That gives the coupling a time-based rate, though the complete solver still has integration and contact error that depends on the time step.</p>
<p>For a unit quaternion $q_i^*$ with scalar component $w_i$, its shortest rotation angle is $\theta_i=2\arccos(\operatorname{clamp}(|w_i|,0,1))$. The elastic stop is</p>
<p>$$
q_i^{\mathrm{limited}}=
\begin{cases}
q_i^<em>, &amp; \theta_i\leq\theta_{\max},\
\operatorname{slerp}(I,q_i^</em>,\theta_{\max}/\theta_i), &amp; \theta_i&gt;\theta_{\max},
\end{cases}
\qquad \theta_{\max}=\pi/6.
$$</p>
<p>We transform this bend back into the parent frame and apply it to $r_i$ before the contact projections. This is a local bend-smoothing rule, not a full elastic-rod simulation: it shares extra curvature and caps it without claiming to solve a global bending energy.</p>
<h3>The loaded pose isn't necessarily the bind pose</h3>
<p>The mouse's saved file already had about 28° of rotation on its last tail joint. We were reading that loaded rotation as neutral, then adding spring motion on top. A previously animated or exported pose had become a permanent part of the spring's target.</p>
<p>The solver now recovers neutral local transforms from the skeleton's inverse bind matrices when available. If a rig has no <code>Tail_End</code> helper, its last segment continues the incoming tangent expressed in that last bone's own local frame. Copying a vector from the parent's frame is wrong as soon as the terminal bone has a different orientation.</p>
<p>The one-sided curl had another cause: it was present in the actual bind geometry. Correctly recovering the bind pose therefore preserved the bias. The simulation now defaults to a centered resting arc, built in hips space and converted into each corrected parent's frame. <code>restCurve</code> can blend the modelled curl back in: 0 is the centered arc, 1 retains the authored curve. That changes what the springs aim for. It doesn't rewrite the mesh or its skin weights.</p>
<p><strong>Recovering the reference transforms.</strong> Let $B_i$ denote a bone's inverse bind matrix. Its bind-world transform is $W_i^0=B_i^{-1}$, so when both bone and parent have bind matrices, the neutral local transform is</p>
<p>$$
L_i^0=(W_{\mathrm{parent}(i)}^0)^{-1}W_i^0.
$$</p>
<p>Decomposing $L_i^0$ gives the local translation and rotation we need. Reading the loaded quaternion instead would substitute an arbitrary saved animation frame for this reference.</p>
<p><strong>Constructing the centered arc.</strong> Let $a_i$ be the authored unit direction of segment $i$ in hips space. We remove the root direction's sideways component to obtain $c=\operatorname{normalize}(0,a_{0y},a_{0z})$, falling back to downward if that projection vanishes. Let $\beta\in[0,1]$ be <code>restCurve</code>, and $C$ the total carry angle in radians. With $\operatorname{rot}(q,v)$ denoting rotation of vector $v$ by quaternion $q$, the desired hips-space direction is</p>
<p>$$
\begin{aligned}
Q_i(\beta)&amp;=\operatorname{slerp}(I,\operatorname{swing}(c,a_i),\beta),\
u_i&amp;=R_x!\left(C\frac{i+1}{N}\right)\operatorname{rot}(Q_i(\beta),c),\
r_i&amp;=\operatorname{rot}(A_i^{-1},u_i).
\end{aligned}
$$</p>
<p>Here $R_x$ is rotation around the hips' side-to-side axis. $A_i$ includes the resting corrections already applied to upstream joints. That makes $u_i$ the intended absolute direction of this segment, rather than adding the straightening correction again at every joint. At $\beta=0$ the modelled sideways curl is removed, and at $\beta=1$ its directions are retained before carry is applied.</p>
<h3>The tail may touch the ground but may not lift the mouse</h3>
<p>Ground contact rotates a segment onto the intersection of its length sphere and the floor. Simply clamping a particle's height would shorten the bone, and clamping and then restoring its length can put it underground again. We leave 0.025 world units below the centerline for thickness, discard downward contact velocity and damp sliding. The flat floor defaults to world Y = 0 and can be moved or disabled. This is a plane constraint rather than terrain or full mesh collision.</p>
<p><strong>The sphere–floor intersection.</strong> Write $F=g_0+\rho$ for the floor height plus centerline clearance, where $g_0=0$ and $\rho=0.025$ by default. The segment must satisfy</p>
<p>$$
|p_i-h_i|=\ell_i,\qquad (p_i)_y\geq F.
$$</p>
<p>If the predicted endpoint is below the floor, define $u=(F-h_{iy})/\ell_i$. When $|u|\leq1$, contact lies on a horizontal circle. If $t$ is a horizontal unit direction, the corrected endpoint is</p>
<p>$$
p_i'=h_i+\ell_i\left(\sqrt{1-u^2},t+u,e_y\right),
\qquad e_y=(0,1,0).
$$</p>
<p>Its height is exactly $F$, and its distance from the head is exactly $\ell_i$, because $(1-u^2)+u^2=1$. We choose $t$ from the candidate direction's horizontal projection, with a resting-direction fallback if that projection vanishes. The hips' keep-behind plane can restrict which part of the circle is allowed. Contact takes precedence over the elastic bend stop. If the head is so far below the floor that $u&gt;1$, no rotation of this fixed-length segment can reach it, so the implementation clamps $u$ rather than stretching the bone or lifting the body.</p>
<p>After the other velocity projections, a contacting particle has its remaining downward velocity removed and its velocity damped:</p>
<p>$$
v_i' = e^{-\gamma\Delta t}
\begin{bmatrix}v_{ix}\ \max(0,v_{iy})\ v_{iz}\end{bmatrix},
\qquad \gamma=8,\mathrm{s}^{-1}.
$$</p>
<p>This is inelastic contact with simple damping rather than a Coulomb-friction model. It prevents gravity from storing downward speed while the tail rests on the floor.</p>
<p>That solved the tail's penetration, but there were two other places where a tail could make the feet float.</p>
<p>First, the viewer placed the lowest point of the entire loaded mesh on the ground. If the saved tail hung below the soles, it lifted the whole character to accommodate the tail. Viewer placement now ignores tail-dominated skin when finding the body floor, while camera framing still includes the whole character.</p>
<p>Second, the retargeter's body-grounding pass also counted the tail. During Back Flip it raised the pelvis to keep that skin clear, even though the independent tail solver would move it afterward.</p>
<p><strong>Which skin is allowed to raise the pelvis?</strong> Let $S$ be the body's sampled skin support points, $T$ those dominated by tail bones, and $E$ those owned by the limb contact solvers. The reference floor is measured at calibration from $S\setminus T$. The remaining body's clearance in frame $t$ is</p>
<p>$$
\begin{aligned}
f_{\mathrm{body}}&amp;=\min_{v\in S\setminus T}y_v^0,\
c(t)&amp;=\min_{v\in S\setminus(T\cup E)}y_v(t)-f_{\mathrm{body}},\
L_{\mathrm{raw}}(t)&amp;=\max\bigl(0,,a(t)-c(t)\bigr).
\end{aligned}
$$</p>
<p>Here $a(t)\leq0$ is the source-derived allowance for dipping under the reference floor. $L_{\mathrm{raw}}$ is the requested lift before the retargeter's temporal smoothing and limb reconciliation. The same tail exclusion must appear in both minima: removing it only from the current-pose probe would still leave the wrong reference floor. The implementation samples skin grouped by dominant bone, rather than evaluating every vertex on every frame.</p>
<p>For the comparison below, the reported extra lift is a difference between the final pelvis trajectories, not merely the raw correction:</p>
<p>$$
\Delta y_{\mathrm{hips}}(t)
=y_{\mathrm{hips}}^{\mathrm{tail\ counted}}(t)
-y_{\mathrm{hips}}^{\mathrm{tail\ excluded}}(t).
$$</p>
<p><strong>Measured pelvis lift near the end of Back Flip</strong></p>
<p>We sampled the same mouse at the same animation times, changing whether the tail was included in body grounding. Both columns use the same model world coordinates, and the difference isolates the extra height introduced by counting the tail.</p>
<table>
<thead>
<tr>
<th>Time in the 1.93 s clip</th>
<th style="text-align:right">Pelvis height: tail counted</th>
<th style="text-align:right">Pelvis height: tail excluded</th>
<th style="text-align:right">Extra lift from counting the tail</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.16 s</td>
<td style="text-align:right">50.5 cm</td>
<td style="text-align:right">35.0 cm</td>
<td style="text-align:right"><strong>15.4 cm</strong></td>
</tr>
<tr>
<td>1.55 s</td>
<td style="text-align:right">81.3 cm</td>
<td style="text-align:right">70.3 cm</td>
<td style="text-align:right"><strong>11.0 cm</strong></td>
</tr>
<tr>
<td>1.84 s</td>
<td style="text-align:right">92.2 cm</td>
<td style="text-align:right">77.2 cm</td>
<td style="text-align:right"><strong>15.0 cm</strong></td>
</tr>
<tr>
<td>1.93 s</td>
<td style="text-align:right">90.6 cm</td>
<td style="text-align:right">77.2 cm</td>
<td style="text-align:right"><strong>13.4 cm</strong></td>
</tr>
</tbody>
</table>
<p><em>The character should rise as it stands after landing. The error is the additional lift in the last column rather than that intended recovery motion. Values are rounded independently from the sampled world positions.</em></p>
<p>On this mouse, excluding the tail removed roughly 15 cm of extra pelvis lift late in Back Flip. Near the end, the body probe stayed within about a millimetre of its reference floor instead of floating several centimetres above it. Tail skin now defines neither the body's floor nor the correction that raises its pelvis. The tail solver itself only rotates tail bones and never translates the model, hips or feet.</p>
<h3>An animation can inherit a pose before you ever play it</h3>
<p>The lifted crouch exposed a separate problem. We generate library clips progressively so the viewer can start playing before every clip is ready. Retargeting was using the same skeleton as playback. Between solves, the preview could move the pelvis, and the next clip would read that animated pose as its calibration reference. Resetting when switching clips could not repair a bad reference already baked into the generated tracks.</p>
<p>Retargeting now works on private skeleton copies made from a stable calibration captured before playback begins. Later clip requests reuse that reference, and concurrent requests have separate bones. A regression test moves and rotates the live hips between delivered clips, and the generated tracks must remain identical to a clean run, and solving must leave the live pose untouched.</p>
<p>Not every visible movement was a bug. Climb Idle has a small pelvis bob in its source loop, with a stationary root. And a fresh Crawl Idle solve kept the mouse's hands below its head throughout the loop, and the raised-hands screenshot was consistent with an earlier contaminated clip, rather than evidence that the source animation wanted that pose. Comparing the source, a fresh solve and the playing result kept us from flattening intentional motion to hide a calibration error.</p>
<h3>What we check now</h3>
<p>The checks cover fast hip sweeps on chains of different lengths, smoother neighboring bends, equal left/right responses, recovery of the bind pose, a rotated terminal bone without a helper, and loop closure after warm-up. Floor tests cover crouching, raised floor planes, settling and release when the hips rise. Separate regressions verify that tail contact never moves the body and that tail skin can't request a pelvis lift.</p>
<p>These checks cover the listed solver behaviors. The live examples show the revised motion for visual inspection, and the fox stretch table records the original September 6 measurements and hasn't been rerun with the new defaults.</p>
<h2>What this changes for you</h2>
<p>If you rig a character with a tail at <a href="/tools/rigger">cinevva.com/tools/rigger</a>, the tail comes back on its own bone chain, the job status carries an <code>appendages</code> entry describing what was found, and the preview swings it. Models rigged through the <a href="https://platform.cinevva.com">platform API</a> get the same file. The original integration in <code>rt/1.1.12</code> made <code>createAnimator</code> find <code>Tail_*</code> bones and drive them with no extra code, and the spring's frequency, damping, gravity and carry angle are options if you want a heavier or a lazier tail. Older files without a tail chain can be run through the pass again by re-rigging. The September 11 changes described above are now live in Cinevva's web previews. Games pinned to an older runtime and previously exported clips don't update automatically. Existing baked clips need to be regenerated to pick up the fixes.</p>
<p><strong>In Blender.</strong> The <a href="/blender-addon/">add-on</a> runs the same pass, on the rig table before it builds the armature, so a tail rigged on your own machine gets the same chain under the same names. There is a Tail checkbox next to Fingers, and the result card says what it found.</p>
<p><strong>Outside our runtime.</strong> A spring in a game is no help to someone opening the file in Blender, Unity or Unreal, where the tail would sit still. So an export now bakes it: each selected clip is simulated and the tail's rotations are sampled into real keyframes. The exporter runs the clip without recording until the tail returns to where the pass started, then records, because a cycle baked from a cold start doesn't close and the tail jumps on loop. The tip is the softest link by design, so its transient is the slowest to settle and one warm-up pass isn't always enough.</p>
<p>The pass is conservative. It grows a chain only for a long piece hanging from the pelvis. Ears, hair and sleeves are untouched, and so is anything wide on the torso: an earlier version handed a cape or a skirt rigidly to its torso bone, and watching it run on real uploads changed our mind. One was a 6,540-vertex garment at the waist that the rigger had spread sensibly across the hips and both thighs, and one bone would have stopped it following the legs at all. Handing a garment to a single bone is a big change to someone's character made on a guess about what the piece is, so it is now something you ask for rather than something that happens to you. There is no collision with the legs beyond the forward plane, and no idle sway when the character stands still, so a standing fox's tail hangs still at its carried pose. Those are the next two things on the list, along with the same treatment for wings, which want a different rest pose and a different spring.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solve the surface, not the skeleton]]></title>
            <link>https://app.cinevva.com/blog/2026-08-20-solve-the-surface-not-the-skeleton</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-08-20-solve-the-surface-not-the-skeleton</guid>
            <pubDate>Thu, 20 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Part 2 of our auto-rigging benchmark: instead of retargeting animation between skeletons, we solve it into each rig's own space from the deformed mesh. Control measurements, transfer-quality scores, and side-by-side animation comparisons.]]></description>
            <content:encoded><![CDATA[<h1>Solve the surface, not the skeleton</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p><a href="/blog/2026-08-19-auto-rigged-animals-straight-legs">Part 1</a> measured four auto-riggers against artist rigs on twelve CC0 animals and found one shared flaw: every one of them builds a quadruped with nearly straight legs. It ended with a plan to repair rigs: with bone lengths fixed, bending a straight leg pulls the foot toward the hip.</p>
<p>For the next experiment, we used the animated surface as the target for each rig.</p>
<p>A skeleton is a machine for deforming a surface. The surface is the thing the player sees, and the artist clip already tells us exactly where that surface should be, vertex by vertex, on every frame. So skip the skeleton-to-skeleton mapping entirely. Play the artist clip once, record the deformed mesh, then solve the auto-rigged skeleton's transforms so that its own skinning reproduces that surface as closely as it can. The result is a clip that lives natively in the new rig's space. This also works with anonymous bone names such as <code>bone_0</code>.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/solve-approach.jpg" alt="Pipeline diagram: artist clip to deformed surface to per-frame solve to a clip in the rig's own space" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The pipeline matches deformed surfaces and solves bone transforms. It requires correspondence between the meshes, but no bone-to-bone mapping.</figcaption>
</figure>
<p>This uses the transform-fitting part of skinning decomposition, as in SSDR from Le and Deng in 2012. Motion capture solvers also fit rigs to dense markers. Here, the rigger already supplied the skeleton and the weights, so the only unknowns are the per-frame bone transforms.</p>
<h2>The method and control run {#the-method-and-the-control-that-keeps-it-honest}</h2>
<p>Per frame, we look for one transform per bone that minimizes the distance between the rig's skinned surface and the target surface. With weights fixed, each bone's best transform has a closed-form answer, a weighted rigid fit by Horn's quaternion method. Linear blend skinning couples bones through shared vertices, so we sweep the bones in turn, each solve accounting for what every other bone currently contributes, until the residual stops moving. Each frame warm-starts from the previous one.</p>
<p>Everything runs in bind space, where the skinning identity holds exactly whatever conventions the file was exported with. Correspondence between the artist mesh and the rigger's re-welded or subdivided mesh is nearest-neighbour on the aligned rest poses, which is exact here because both are the same animal.</p>
<p>We first solve the artist rig against its own clip, where a perfect answer exists by construction. Residual error in this control helps identify problems in the solver or target preparation. The control lands at 0.008% of the model diagonal, with the single worst vertex at 0.08%. We use that as the baseline for the other rigs.</p>
<h2>Three problems in the control run {#getting-a-trustworthy-zero-took-three-attempts}</h2>
<p>The first control run plateaued at 3%, even with thirty times more iterations. We found three causes.</p>
<p>The largest error came from our use of the Three.js API. After the change from <code>boneTransform</code> to <code>applyBoneTransform</code>, our call needed to supply the vertex position in the input vector. Fed a reused scratch vector, it computes each vertex from the previous vertex's output. The resulting targets looked smooth, which initially led the investigation toward armature scale. Switching to <code>getVertexPosition</code> corrected the target positions.</p>
<p>The other two were smaller. Power iteration on Horn's matrix stalls at about a thousandth of a degree because the spectral shift that makes it converge also crushes the gap it converges along, so we switched to Jacobi rotations, which are exact for a 4x4. And an early-exit test based on relative progress froze the sweeps while they were still grinding downward, so the exit now measures absolute progress against the model's scale.</p>
<h2>What each rigger can actually carry</h2>
<p>With the solver validated, we solved two artist clips, Walk and Gallop, into every rig for the six animals all riggers cover. We call the score transfer quality: the share of the motion's surface displacement the rig reproduces.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/capacity-by-rigger.jpg" alt="Dot plot of transfer quality by rigger for Walk and Gallop, artist control near 100 percent, RigNet near 50" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Quality = 1 − solved residual / motion magnitude, averaged over six animals. The control row is the artist rig solved against its own clip.</figcaption>
</figure>
<table>
<thead>
<tr>
<th>rig</th>
<th>Walk</th>
<th>Gallop</th>
</tr>
</thead>
<tbody>
<tr>
<td>artist (control)</td>
<td>99.8%</td>
<td>99.9%</td>
</tr>
<tr>
<td>Anything World</td>
<td>94.4%</td>
<td>91.9%</td>
</tr>
<tr>
<td>Tripo</td>
<td>92.3%</td>
<td>89.1%</td>
</tr>
<tr>
<td>SkinTokens, given the artist skeleton</td>
<td>82.5%</td>
<td>89.4%</td>
</tr>
<tr>
<td>SkinTokens</td>
<td>80.9%</td>
<td>88.0%</td>
</tr>
<tr>
<td>RigNet</td>
<td>48.5%</td>
<td>58.3%</td>
</tr>
</tbody>
</table>
<p>The ranking differs from the fold-ratio comparison in part 1.</p>
<p>RigNet had the best leg fold of the four and was the only rigger whose skeletons passed our drivability gate on all twelve animals. Its Walk transfer-quality score here is 48.5%. Its worst vertices sit 20 to 31% of the model away from where the surface should be, and the failure is consistent across all six animals, 38 to 59% quality on every one. Meanwhile Tripo and Anything World, the two straightest-legged rigs we measured, carry animation best.</p>
<p>The solved clips include joint translations as well as rotations. With translation available, a straight chain can still track a folding surface, so the fold stops being the binding constraint. What binds instead is whether the skinning weights carve the mesh into pieces that follow bones cleanly. In these runs, Tripo and Anything World reproduced the surface more closely. RigNet retained large residuals as the solver adjusted its irregular chains.</p>
<p>So the two measurements answer two different questions. Fold ratio governs what a rotation-driven runtime rig can pose, which is part 1's world. Transfer quality governs what a baked, solved clip can express, which is this one's. Tripo, the rigger we ship, reproduced 92.3% of the Walk surface displacement in this test.</p>
<p>Supplying the artist skeleton to SkinTokens moved Walk transfer quality from 80.9% to 82.5% and Gallop from 88.0% to 89.4%. The small improvement suggests that skinning weights also limit the result.</p>
<h2>Inspecting the surface error {#watching-it-instead-of-trusting-it}</h2>
<p>The same solver drives a live viewer where every rig's full mesh is skinned by its solved transforms, drawn over the artist's ground-truth surface as a dark silhouette, and every vertex is coloured by its momentary error. Blue is zero. Red is 3% of the model diagonal or worse.</p>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/solve-visual-deer-walk.mp4" poster="https://cdn.cinevva.com/blog/solve-visual-deer-walk-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Walk, solved into every rig. Left to right: artist ground truth, Tripo, Anything World, SkinTokens, RigNet. RigNet's legs show large red regions and deviate visibly from the reference silhouette.</figcaption>
</figure>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/solve-visual-deer-gallop.mp4" poster="https://cdn.cinevva.com/blog/solve-visual-deer-gallop-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Gallop comparison. The hind legs at full extension show the differences in surface alignment, with larger deviations on RigNet.</figcaption>
</figure>
<p>The viewer uses the same skinning function as the measurements. The SkinTokens deer has 181,000 vertices, above our 60,000-vertex limit for full-mesh correspondence, so its panel shows a silhouette comparison without a heatmap.</p>
<h2>What this changes for us</h2>
<p>A solve takes half a second to a few seconds per clip per rig, in browser JavaScript, no GPU involved. That's cheap enough to bake a quadruped's whole clip set when the rig is created. Baked clips make the runtime simpler as well: no skeleton retargeting for animals at all, just clip playback in the rig's own space, with our existing foot locking on top for ground contact.</p>
<p>It also gives us a second acceptance gate. Part 1's geometric checks say whether a rig is drivable. Transfer quality says how much of a real animation it will keep. A rigger can pass the first and fail the second, and RigNet does exactly that.</p>
<h2>Limits of the benchmark {#limits-stated-plainly}</h2>
<p>These scores describe the fitted clips under the solver settings used here. The solver may translate joints, so bone lengths aren't preserved during motion, and a rig leaning hard on translation could read rubbery at extremes. The gallop's worst vertices, 9 to 20% momentarily even on the good rigs, live in exactly those moments. A rotations-only comparison remains to be measured. It would show how much of the straight-leg limitation from part 1 persists with fixed bone lengths.</p>
<p>The production gap is correspondence. In this benchmark the rigger rigged the same mesh the artist animated, so vertex matching is trivial. A user's uploaded animal is a different mesh, and getting artist surface motion onto it first is its own problem, with known routes we haven't measured yet.</p>
<p>And the sample: six animals, two clips, 24 frames per clip, constraints subsampled to five thousand vertices on the densest mesh. The rankings apply to this sample and these solver settings.</p>
<p>The animals are CC0 from <a href="https://quaternius.com/">Quaternius</a>. To reproduce the comparison, start by solving an artist rig against its own clip and checking the residual. If you've solved animation into rigs before and hit the traps we did, or different ones, we'd like to compare notes in our <a href="https://discord.gg/kYGFpVXDzX">Discord</a>.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four auto-riggers, twelve animals, one shared flaw: straight legs]]></title>
            <link>https://app.cinevva.com/blog/2026-08-19-auto-rigged-animals-straight-legs</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-08-19-auto-rigged-animals-straight-legs</guid>
            <pubDate>Wed, 19 Aug 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We measured Tripo, Anything World, RigNet and SkinTokens against artist rigs on twelve CC0 animals. Every one of them, including the rigger we ship, puts a quadruped's leg joints almost in a straight line. We compare leg fold, chain structure, and left-right symmetry.]]></description>
            <content:encoded><![CDATA[<h1>Four auto-riggers, twelve animals, one shared flaw: straight legs</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>Take an artist-made walk cycle from a deer, retarget it onto the same deer after an auto-rigger has rigged it, and the result looks wrong in a way that's hard to name. The feet land in roughly the right places. The timing is right. It still reads like a table walking.</p>
<p>The investigation started with our retargeting code. Examining the bind pose revealed nearly straight leg chains, so we measured how much fold each rig had before animation.</p>
<h2>The number</h2>
<p>Take one leg. Add up the lengths of its bone segments, hip to foot. Call that the reach. Now measure the straight-line distance from the hip joint to the foot joint in the bind pose. Call that the span. Divide reach by span.</p>
<p>A real animal standing still has a folded leg, so the chain is meaningfully longer than the line it spans. Across the twelve artist-rigged animals in the <a href="https://quaternius.com/">Quaternius</a> Ultimate Animated Animals pack, that ratio runs from 1.15 to 1.50, averaging 1.30. A deer's hind leg is 1.40. A fox's front leg is 1.29.</p>
<p>With bone lengths fixed, a leg with no fold can't bend without shortening its span. If the joints sit in a straight line, the only way to flex the knee is to pull the foot toward the hip. So either the foot leaves the ground or the body sinks. Ask that rig for the artist's knee angle and you get a crouch. Rotation-only retargeting cannot preserve both the hip-to-foot span and the bend when the chain has too little length.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/fold-ratio-explained.jpg" alt="Two leg chains between the same hip and foot, one folded measuring 1.31 and one nearly straight measuring 1.04" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Both chains start at the same hip and end at the same foot. The folded one is 31% longer than the line it spans, so it has slack to bend into. The straight one has none, and the numbers shown are the measured artist mean and Tripo mean.</figcaption>
</figure>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/fold-mechanism.mp4" poster="https://cdn.cinevva.com/blog/fold-mechanism-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Animation of a folded chain and a straight chain moving through the same flex, with span readouts</figcaption>
</figure>
<p>We measured whether the predicted leg chains had enough fold to reproduce the reference stance.</p>
<h2>The test setup</h2>
<p>Twelve animals, all CC0 from the Quaternius pack, each shipping an artist rig of 38 to 51 joints.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/the-twelve-animals.jpg" alt="The twelve Quaternius CC0 animals rendered with their own materials, from alpaca to wolf" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The subjects, with their own materials and their artist bone counts. We removed the supplied rigs before submitting the meshes and kept those rigs as references.</figcaption>
</figure>
<p>We submitted the unrigged meshes to each rigger and compared the results with the artist's skeletons.</p>
<p>Mesh connectivity required preparation. Those glTF files split the mesh into five primitives by material, and because the models are hard-edged low-poly, almost every vertex is duplicated per adjacent face. The fox stores 3,752 vertices and has 926 distinct ones. Riggers that build a graph over mesh topology read those coincident-but-unshared seams as cracks, so the head becomes a separate object from the body, the geodesic distance between them goes to infinity, and a joint that should sit in the neck has no reason to go there. Welding by position reconnects those seams before the graph is built. Nine of the twelve came out as a single watertight shell. The bull and cow keep their horns as separate pieces and the stag its antlers, which we left in, because real uploads look like that.</p>
<p>For scoring we used two things. The first is our own runtime function that reduces an arbitrary quadruped skeleton to a canonical structure. It has to find four feet in four distinct quadrants, a spine, and a neck. Rigs that fail this check cannot be driven through our current quadruped runtime path.</p>
<p>That function uses bind geometry because the predicted bone names were inconsistent. Tripo numbers its limb chains by index with no fixed meaning, so chain 0 is the hind pair on its deer and the front pair on its horse. Its left and right labels disagree between rigs: <code>Left</code> sits at x=-0.072 on the deer and x=+0.076 on the horse, both facing the same way. On its fox it labels the spine as a limb chain. These inconsistencies led us to identify the chains from their positions and connections.</p>
<p>The second thing is the fold ratio above. Both measures are scale invariant, which matters because these riggers work at wildly different scales. Tripo normalises to roughly a unit cube, so its fox spans 0.13 by 0.34 by 0.65 against the artist's 0.77 by 2.47 by 6.59.</p>
<h2>What came back</h2>
<table>
<thead>
<tr>
<th>rigger</th>
<th>rigs</th>
<th>drivable</th>
<th>mean joints</th>
<th>mean fold</th>
</tr>
</thead>
<tbody>
<tr>
<td>artist (reference)</td>
<td>12</td>
<td>11</td>
<td>46.8</td>
<td><strong>1.299</strong></td>
</tr>
<tr>
<td>Anything World</td>
<td>6</td>
<td>6</td>
<td>37.8</td>
<td>1.363 (see below)</td>
</tr>
<tr>
<td>RigNet</td>
<td>12</td>
<td>12</td>
<td>54.1</td>
<td>1.146</td>
</tr>
<tr>
<td>SkinTokens</td>
<td>12</td>
<td>11</td>
<td>32.0</td>
<td>1.078</td>
</tr>
<tr>
<td>Tripo</td>
<td>12</td>
<td>10</td>
<td>25.8</td>
<td>1.045</td>
</tr>
</tbody>
</table>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/skeleton-compare-all5.jpg" alt="Six animals across five riggers, with the artist rig's IK control bones drawn in grey and its deforming bones in blue" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Six animals, five riggers. Each cell carries the live drivability verdict and the fold range. In the artist column, blue bones deform the mesh and grey ones are IK controls, so that column looks busier than the predicted rigs beside it.</figcaption>
</figure>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/fold-by-rigger.jpg" alt="Dot plot of mean fold ratio by rigger against the shaded artist range of 1.15 to 1.50, all four predicted riggers short of it" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The shaded band is where the artist rigs sit. Every predicted rigger lands left of it, short of the fold a leg needs, except Anything World, which overshoots for the wrong reason.</figcaption>
</figure>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/knee-flex-real-rigs.mp4" poster="https://cdn.cinevva.com/blog/knee-flex-real-rigs-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The same knee rotation applied to the artist, Tripo, Anything World, SkinTokens and RigNet deer hind legs</figcaption>
</figure>
<p>Anything World's 1.363 average includes abnormally folded front legs, described below. Excluding that anomaly, its legs measure 1.02 to 1.18.</p>
<p>Nearly straight leg chains appeared across all four systems, including Tripo, which we ship as our Pro tier. The chain structures and other defects differed, so we examined those separately.</p>
<p>Training data dominated by bipeds and neutral rest poses could contribute to this pattern. This benchmark measures the output rigs and doesn't establish the cause of the joint-placement errors.</p>
<p>The artist Shiba Inu also failed our drivability test because the detector selected IK controls as feet. These rigs ship an IK control layer: four pole targets parented to the root and sitting half a body-length in front of the animal, plus four IK chains with no parent at all. Those satisfy a geometric definition of &quot;foot&quot; as well as the real feet do, and on the Shiba Inu they win, giving eight false candidates out of twelve.</p>
<p>We removed the control bones and repeated the analysis to check their effect on the fold comparison. The result changed on exactly <strong>one of the twelve</strong> artist rigs. The Shiba Inu goes from a broken 2 limbs to a clean 4, with a fold of 1.28 to 1.43 that lands right beside the husky's. The other eleven come out identical, fold ratios included. Excluding the controls corrected the Shiba Inu foot detection while leaving the other fold measurements unchanged. The artist band of 1.15 to 1.50 was never measured on control bones, and the predicted rigs carry no control layer at all: Tripo's skeletons have none, and Anything World's five non-deforming joints are just leaf tip markers.</p>
<p>Predicted rigs being pure FK also cuts the other way. In this one narrow sense an auto-rigged animal is easier for a name-blind runtime to read than the artist's.</p>
<h2>The four riggers have quite different failure modes</h2>
<p><strong>Tripo</strong> is the straightest at 1.045, and it uses the fewest joints by a wide margin, 25.8 against the artist's 46.8. But it gets the chain <em>shape</em> right where the others don't. Four of its twelve rigs reproduce the artist's exact 3/3/4/4 split, three joints per front leg and four per hind. For those matching chains, repositioning the existing joints is a possible repair. Two of its rigs fail drivability outright: the fox comes back with two limbs, and so does the stag.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/tripo-chain-match.jpg" alt="Deer skeleton, artist rig beside the Tripo prediction, both using a 3/3/4/4 leg chain" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Tripo gets the structure right and the placement wrong. Its deer uses the artist's exact 3/3/4/4 chain split with half the joints, and still measures 1.00 to 1.05 against the artist's 1.18 to 1.40.</figcaption>
</figure>
<p><strong>RigNet</strong> (SIGGRAPH 2020) has a mean fold of 1.146 and was the only one to produce a drivable rig for all twelve. Its chains are the problem. The artist uses 3/3/4/4 on all twelve animals, front and back consistent. RigNet reproduces that shape exactly once. Three of its rigs have a leg of two joints or fewer, which cannot articulate at all, and four have a leg of seven or more. Its horse is 2/2/8/8: two joints in the front legs, eight in the back. The published critique of RigNet is that it &quot;outputs irregular skeletons&quot;, and that's what irregular looks like in practice. A bandwidth sweep won't fix it either, because that parameter controls how many joints there are rather than how they're distributed between limbs.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/rignet-irregular-chains.jpg" alt="Horse skeleton, artist rig with 3/3/4/4 chains beside the RigNet prediction with 2/2/8/8 chains" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">RigNet's horse is 2/2/8/8: two joints in each front leg, eight in each hind. A two-joint leg cannot articulate at all. The artist uses 3/3/4/4 on all twelve animals.</figcaption>
</figure>
<p><strong>Anything World</strong> failed to rig two of the eight animals we submitted: the husky came back with <code>FinetuningError: Incorrect segmentation exception</code> and the cow with a bare <code>Unknown error</code>. The six that did rig are all drivable. All six use an identical 5/5/5/5 chain, the most consistent structure any predicted rigger produced.</p>
<p>The front-leg asymmetry accounts for its elevated mean fold. Hind legs are mirrored exactly on all six: 1.10 and 1.10, 1.11 and 1.11, 1.13 and 1.13, and so on to five decimal places. Front legs break on three of the six, with one leg folded far past anything anatomical while its twin stands nearly straight. The alpaca is 3.60 on the front left against 1.87 on the front right. The horse is 2.47 against 1.43. The deer is 1.43 against 2.13, and note that the extreme side is the right one there, so this is not a consistent left bias.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/aw-front-leg-anomaly.jpg" alt="Alpaca skeleton, artist rig beside the Anything World prediction whose fold range runs to 3.60" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The alpaca is the clearest case: Anything World returns a uniform 5/5/5/5 chain, and a fold range of 1.10 to 3.60 across its four legs. The hind pair agrees exactly. The front pair does not.</figcaption>
</figure>
<p>We re-ran the deer and the horse to rule out our own submission. <code>symmetry</code> is a required upload field, and the stored response never echoes back what was sent. Submitted explicitly symmetric, both reproduced the anomaly. So it survives the parameter that exists to prevent it, on a mesh whose own artist rig is symmetric to three decimals.</p>
<p><strong>SkinTokens</strong> (2025, from the VAST-AI group behind Tripo) is the tidiest by a distance. Eleven of twelve have mirrored left and right chain lengths, and not one has a leg of two joints or fewer. It's a well-behaved skeleton that stands too straight, at 1.078, rather than an erratic one.</p>
<h2>Two things about SkinTokens worth writing down</h2>
<p>Our 926-vertex fox crashed the Blender-side server mid-request with no Python traceback. The same fox subdivided to 88,706 vertices rigs in 70 seconds. Their own example model works because it was already dense. Adding a subdivision step to roughly 40k vertices before the call turned a total failure into twelve rigs out of twelve. Subdivision was necessary for the low-poly assets in this test.</p>
<p>The more useful discovery is that it has a mode we'd never run. Passing <code>--use_skeleton</code> conditions it on a skeleton you supply instead of inventing one. It then keeps what you gave it. Every output joint sits on an input joint, mean offset 0.31% of the bounding box diagonal, worst case 0.50%. It renames them all to <code>bone_0</code> and up on export and culls the ones carrying no weight, so recovering the original names requires an additional step.</p>
<p>That relabelling is recoverable. Match the output joints back to the skeleton you supplied by position and every name comes back. That worked on 100% of joints, on all four animals we tried. And because the skeleton is now yours, so is the stance. Our horse measures 1.01 to 1.02 when SkinTokens picks the skeleton, and 1.11 to 1.36 when it's handed the artist's. The artist's own is 1.18 to 1.37.</p>
<p>Two preconditions before that works. It rejects a multi-root skeleton outright, and these artist rigs have five roots, the body plus four IK chains. The first attempt deleted those extra roots and their chains. Dropping those eight bones leaves 90 to 128 vertices with no influence at all, on every animal in the pack, because <code>FF</code> and <code>FFB</code> are what the artist skinned the feet to. Those bones carry deformation weights. Re-parenting each stray root to its nearest body joint keeps every weight and still gives one root.</p>
<h2>Recovering bone names {#anonymous-bone-names-are-not-the-blocker-they-look-like}</h2>
<p>Predicted skeletons often use names such as <code>joint_0</code> or <code>bone_0</code>. We tested two ways to map them to the roles expected by our runtime.</p>
<p>Names can be recovered, as above, when you supplied the skeleton. Or they can be derived. A geometric analysis already knows which four chains are legs, which quadrant each sits in, and which run is spine and which is neck. Those detected roles provide the labels. We ran it on all twelve RigNet rigs, writing names into a convention our runtime already reads, then analysed them again. Twelve of twelve came back identical through the named path and the geometric one. Same limb count, same quadrants, same chain lengths, same spine, same neck, same fold ratios.</p>
<h2>A second number: is the skeleton even symmetric?</h2>
<p>The Anything World front legs prompted a separate symmetry measurement.</p>
<p>It works without reading a single bone name, which matters when half the output is called <code>bone_0</code>. Reflect every joint across the model's symmetry plane, then measure how far each reflection lands from the nearest real joint, as a percentage of the bounding box diagonal. A perfectly mirrored skeleton scores zero. The mesh bounding box defines the reference plane, keeping it independent of the predicted joint positions.</p>
<table>
<thead>
<tr>
<th>rigger</th>
<th>mean mirror error</th>
</tr>
</thead>
<tbody>
<tr>
<td>artist</td>
<td>0.01%</td>
</tr>
<tr>
<td>RigNet</td>
<td>0.08%</td>
</tr>
<tr>
<td>SkinTokens</td>
<td>0.37%</td>
</tr>
<tr>
<td>Anything World</td>
<td>1.08%</td>
</tr>
<tr>
<td>Tripo</td>
<td>1.13%</td>
</tr>
</tbody>
</table>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/mirror-error-by-rigger.jpg" alt="Dot plot of left/right mirror error by rigger, artist 0.01% through Tripo 1.13%" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Measured without reading a bone name, so it applies equally to a skeleton whose joints are called bone_0. The input meshes are symmetric, so each number measures asymmetry introduced in the predicted skeleton.</figcaption>
</figure>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/skeleton-turntable.mp4" poster="https://cdn.cinevva.com/blog/skeleton-turntable-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Five horse skeletons rotating side by side, artist beside four predicted rigs</figcaption>
</figure>
<p>The artist rigs are mirrored to within rounding, which is the expected result and a useful check that the measure works. RigNet also has low mirror error. It explicitly reflects candidate joints across x=0 before clustering them.</p>
<p>Tripo comes last, though only just, and its spread is what stands out rather than its average. Eight of its twelve rigs land under 0.8%, and then the fox is 15.02% and the stag 14.45%. Those two also failed drivability. Their large asymmetries warrant inspection alongside the inconsistent left/right labels described earlier.</p>
<p>These are small percentages. A fraction of a percent is invisible standing still. It shows up when a walk cycle asks the left and right legs to do the same thing half a period apart.</p>
<figure style="margin:1.5rem 0">
<video src="https://cdn.cinevva.com/blog/artist-walk-reference.mp4" poster="https://cdn.cinevva.com/blog/artist-walk-reference-poster.jpg" autoplay loop muted playsinline preload="metadata" style="width:100%;border-radius:10px;display:block"></video>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The artist deer walking with its skeleton drawn over the ghosted body</figcaption>
</figure>
<h2>What we're doing about it</h2>
<p>For rotation-driven animation, two possible repairs operate on the rig and can be tested without retraining.</p>
<p>Supply the skeleton and let the model skin it. SkinTokens already supports this and preserves what it's given, and for humanoids our production rigger already emits a properly named Mixamo skeleton that could feed straight into it. Or reposition the joints in the rig you already have, which for Tripo means moving intermediate leg joints on a chain whose joint count is already correct.</p>
<p>Changing riggers alone would leave much of the fold deficit. The means for Tripo, SkinTokens and RigNet range from about 1.04 to 1.15, compared with the artist mean of 1.30.</p>
<p><strong>Update:</strong> there turned out to be a third route, and it changes the picture enough to earn its own article. Instead of retargeting between skeletons, we now solve the animation into each rig's own space from the deformed surface, and the quality ranking this produces reverses the one above. That story is <a href="/blog/2026-08-20-solve-the-surface-not-the-skeleton">part 2: solve the surface, not the skeleton</a>.</p>
<h2>Benchmark scope {#caveats-because-they-matter-here}</h2>
<p>Sample sizes are uneven and that limits what the averages mean. RigNet, SkinTokens and Tripo all ran on the full twelve. Anything World ran on eight, of which six produced a rig, and the two that failed did so with errors that name themselves rather than with a bad rig we could measure. Tripo's five original rigs were leftovers from earlier retargeting work, so the other seven were rigged for this benchmark through the same endpoint on the same inputs. Adding them moved its mean fold by 0.004 and its mean mirror error from 1.54% down to 1.13%, showing how the averages changed with the larger sample.</p>
<p>The first two Anything World rigs both showed the front-leg anomaly. The next model came back clean. Across the six successful outputs, three had the anomaly, the hind legs were mirrored, and the more folded front leg could be on either side. The initial pair overstated how consistently the problem occurred.</p>
<p>RigNet's checkpoints came from a third-party mirror rather than the paper's own download, which needs interactive confirmation and rate-limits. The results therefore describe our setup with that checkpoint source. Getting it running at all took seven separate undocumented fixes. One is an interactive timezone prompt that hangs the container build with no error at all. Another is a debug viewer that opens a window and then blocks forever. You can't avoid that one by going headless either, because its voxeliser rasterises through OpenGL, so the process needs a display.</p>
<p>Finally, the fold ratio assumes a neutral standing bind pose. It's the right measure for these twelve animals and it would be the wrong measure for a rig delivered mid-stride.</p>
<p>The animals are CC0 from Quaternius, so anyone can repeat this. If you rig quadrupeds and you've measured something different, we'd like to hear it in our <a href="https://discord.gg/kYGFpVXDzX">Discord</a>.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating a runtime that says no: how we sandbox the browser to act like WeChat]]></title>
            <link>https://app.cinevva.com/blog/2026-07-19-sandboxing-wechat-strict-mode</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-07-19-sandboxing-wechat-strict-mode</guid>
            <pubDate>Sun, 19 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Our AI game creator now generates WeChat-portable games, but a prompt rule is a suggestion. So we built a strict-mode sandbox into the preview: a script that makes the browser throw where WeChat would, feeding violations straight back into the AI's own debugging loop. Here's the design, the poison list, and the four exceptions that taught us the most.]]></description>
            <content:encoded><![CDATA[<h1>Simulating a runtime that says no: how we sandbox the browser to act like WeChat</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/wechat-strict-sandbox-hero.jpg" alt="A small 3D game scene inside a transparent glass dome, with crossed-out tool icons floating outside the glass" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>We recently shipped a <a href="/news/2026-07-19-wechat-mini-game-mode">WeChat mini game mode</a> in our Game Creator: a build profile that keeps AI-generated games inside the subset of the web platform that survives a port to WeChat's runtime. The profile is a set of generation rules. No DOM UI, no Pointer Lock, mp3-only audio, no dynamic code. The model follows them the way models follow rules, which is to say: usually.</p>
<p>&quot;Usually&quot; doesn't cut it when every violation is invisible in the browser and fatal after export. A game with an HTML health bar runs perfectly in our preview and produces a blank screen on WeChat, because WeChat mini games have no DOM at all. So we built the thing that turns those rules from suggestions into physics: a strict-mode sandbox that makes the browser itself refuse to do what WeChat can't. This post is about how it works.</p>
<h2>The core decision: simulate absence, not presence</h2>
<p>The obvious approach is to emulate WeChat: implement <code>wx.createCanvas</code>, <code>wx.onTouchStart</code>, <code>wx.setStorageSync</code>, and run games against the emulated <code>wx.*</code> surface. We went the opposite way, and the reason is the export pipeline's shape.</p>
<p>Games in WeChat mode are still written against browser APIs. At packaging time an adapter (the community-standard weapp-adapter approach) maps those browser APIs onto <code>wx.*</code>. That means our games never call <code>wx.*</code> directly, so a <code>wx</code> emulator would test code paths that don't exist. What breaks a port is the presence of browser APIs that have no WeChat equivalent, used during generation without anyone noticing, rather than the absence of <code>wx.*</code> in the browser. <code>document.createElement('div')</code>. <code>requestPointerLock()</code>. IndexedDB. An <code>.ogg</code> file that decodes fine in Chrome and never will on WeChat iOS.</p>
<p>So the sandbox simulates absence. Everything WeChat doesn't have gets removed, poisoned, or flagged in the preview, and the game develops inside the intersection of the two platforms from its first frame.</p>
<h2>Where it lives: a service worker that was already there</h2>
<p>Our editor preview has an unusual serving path that made this almost free. Games in the editor aren't served from the network. A service worker intercepts <code>/game/*</code> requests and serves files out of IndexedDB, so the preview iframe gets instant reloads without a round trip. That worker already injects two virtual files into every game page: an error-capture script that forwards console output and crashes to the editor, and a live scene inspector.</p>
<p>The sandbox is virtual file number three, <code>_wechat-strict.js</code>, injected into the page <code>&lt;head&gt;</code> immediately after the capture script and before any game code runs. Ordering is load-bearing twice over. It must run after capture so that its <code>console.error</code> calls are already hooked and flow to the editor, and before game modules so the poisons are in place when the first line of game code executes.</p>
<p>Activation is one line. The WeChat toggle in the creator persists in <code>localStorage</code>, and the preview iframe is same-origin with the editor, so the harness just reads the flag directly:</p>
<pre><code class="language-js">try {
  if (localStorage.getItem('cinevva-gc-profile') !== 'wechat-minigame') return;
} catch (e) { return; }
</code></pre>
<p>For every non-WeChat game the script is a single string comparison and an early return. No build flag, no server round trip, no state to synchronize with the service worker.</p>
<h2>The poison list, and the two-tier taxonomy</h2>
<p>Not every violation deserves the same response, so the harness distinguishes two tiers. APIs that <em>do not exist</em> on WeChat throw, because that's what happens after export and a crash during generation is an accurate preview of a crash in review. Things that <em>exist but break later</em> get flagged as loud console errors without altering behavior, because blocking them would hide the game's actual state from the person iterating on it.</p>
<p>The throw tier: creating any HTML UI element, through both <code>createElement</code> and <code>createElementNS</code> (Three.js creates its canvas via the NS variant, so both paths need the same gate), <code>eval</code>, <code>new Function</code>, <code>requestPointerLock</code>, and service worker registration. Each throw carries the fix in its message:</p>
<pre><code class="language-js">throw violate(&quot;document.createElement('&quot; + tag + &quot;') — WeChat mini games have no DOM. &quot; +
  &quot;Draw UI on canvas (offscreen 2D canvas -&gt; THREE.CanvasTexture on a screen-space quad) &quot; +
  &quot;and hit-test taps yourself.&quot;);
</code></pre>
<p>The flag tier: reading <code>indexedDB</code> (returns <code>undefined</code>, exactly as WeChat does, plus an error pointing at <code>localStorage</code>), audio in any format WeChat iOS can't decode (checked in three places: the <code>Audio</code> constructor, the <code>src</code> setter on the media element prototype, and fetched URLs), network requests to any origin that isn't the game's own or our asset CDN (on WeChat those need a whitelisted, ICP-filed domain), and Tone.js showing up at all.</p>
<p>There's also a post-load audit that runs a moment after the page settles: it walks <code>&lt;body&gt;</code> and reports any HTML elements that came in through the game's own markup rather than dynamic creation. Static HUDs sneak past a <code>createElement</code> gate, so the gate alone isn't enough.</p>
<p>Every report deduplicates by message and caps at fifty per session. An inverted-loop bug that creates a div per frame produces one error rather than a stream that drowns the signal.</p>
<h2>The four exceptions that taught us the most</h2>
<p>Building a sandbox is mostly deciding what <em>not</em> to poison, and each exception we carved came from our own tooling breaking during development.</p>
<p><strong>Our debugger runs on eval.</strong> The creator's <code>execute_js</code> tool, which the AI uses to probe the live game, evaluates code via the capture script's message handler, which calls <code>eval</code>. Poisoning <code>eval</code> naively would have blinded the AI's own tool. Before poisoning, the harness stashes the real function on a non-enumerable property, and the capture script's handler falls back to it:</p>
<pre><code class="language-js">Object.defineProperty(window, '__cinevvaRealEval', { value: window.eval, enumerable: false });
window.eval = function () { throw violate('eval() is banned in WeChat mini games.'); };
// capture script, at message time:
returnValue = (window.__cinevvaRealEval || eval)(e.data.code);
</code></pre>
<p>Game code that reaches for <code>eval</code> still dies. The debugger doesn't.</p>
<p><strong>The recorder creates elements too.</strong> Our reel recorder gets injected into the game iframe as a <code>&lt;script&gt;</code> created with the iframe's own <code>document.createElement</code>, and it downloads finished videos through a synthetic <code>&lt;a&gt;</code> click. Blocking those tags would have broken recording exactly and only in WeChat mode. So <code>script</code> stays allowed and <code>a</code> warns without throwing. A game shipping a real link still gets flagged, and the tooling still works.</p>
<p><strong>Keyboard events stay.</strong> The AI verifies controls with a tool that synthesizes keypresses and reads back how the game state moved. Suppressing keyboard input to simulate a phone would have destroyed the control-verification loop that catches inverted-camera bugs. Touch-first is enforced by the generation rules and the profile's control scheme rather than by the sandbox.</p>
<p><strong>WebGL2 stays, and the reason deserves its own section below.</strong> The draft poison list blocked <code>getContext('webgl2')</code> to force the &quot;WebGL1-safe&quot; rendering the profile demanded. Except Three.js <a href="https://github.com/mrdoob/three.js/releases/tag/r163">removed WebGL1 support entirely in r163</a>, and we pin r181: blocking WebGL2 would have blanked every 3D game in the mode. The profile's rendering rule was incoherent, written from a stale mental model of the platform. The sandbox audit audited the sandbox's spec, and pulling on that thread led somewhere important.</p>
<h2>The WebGL2 question, answered properly</h2>
<p>Leaving the context creation alone raised the obvious follow-up of whether the games break on WeChat devices that only have WebGL1, given that our engine requires WebGL2. Chasing that produced the clearest picture we have of the platform's rendering floor, so here it is with sources.</p>
<p>On Android, WeChat's mini game runtime provides WebGL2 on any modern base library, and the underlying GLES3 hardware is effectively universal. iOS is the harder case. WeChat's own engineering docs for <a href="https://wechat-miniprogram.github.io/minigame-unity-webgl-transform/Design/WebGL2.html">WebGL2 support</a> and the <a href="https://developers.weixin.qq.com/minigame/dev/guide/performance/perf-high-performance-plus.html">high-performance+ mode</a> spell out that on iPhone, WebGL2 is only properly available in the high-performance+ runtime, which requires a recent WeChat client (8.0.45 and up, higher on iOS 14) and effectively iOS 15.5 or newer. Plain high-performance mode runs WebGL2 &quot;with more issues&quot; by Tencent's own description, and the normal iOS runtime doesn't have it at all.</p>
<p>The truly dangerous part is the failure shape. In unsupported environments, <code>getContext('webgl2')</code> can return a truthy but broken context instead of null, a behavior developers have <a href="https://developers.weixin.qq.com/community/develop/doc/000aee72868a381d6c261686651c00">asked Tencent to fix directly</a>. A game that trusts the return value doesn't fail cleanly there. It renders garbage or a silent black screen.</p>
<p>We handle it in three layers. The sandbox leaves WebGL2 context creation untouched, because poisoning it would fight our own engine. The generation profile now requires a boot gate in every game: renderer creation wrapped in try/catch, followed by a functional probe (<code>typeof gl.createVertexArray === 'function'</code>, a WebGL2-only capability a lying context won't have), with a friendly canvas-drawn &quot;please update WeChat&quot; message on failure instead of a blank screen. That's the same pattern Unity-converted mini games ship, and it's the reason you see upgrade prompts in the wild rather than black screens. And the exporter, when it lands, pins high-performance+ mode in <code>game.json</code> so the capable path is the default one.</p>
<p>The audience cost of a WebGL2 floor is users below roughly iOS 15.5 or on WeChat clients older than 8.0.45, low single digits in 2026 but concentrated in older devices, which matters more for some genres than others. If real distribution data ever says that tail is worth chasing, we hold a cheap escape hatch in reserve: pinning the WeChat profile to three r162, the last WebGL1-capable release. Profile games only touch stable core APIs, so the downgrade is a one-line import map change, held in reserve until data demands it.</p>
<h2>Closing the loop with the model</h2>
<p>The reason this is worth building for an AI-first product is what happens after every build. After every build, the creator's agent calls a tool that reads the game's console and waits for boot to complete. The capture script forwards <code>console.error</code> to that stream. So a <code>[wechat-strict]</code> violation lands in the exact channel the model already checks before declaring a build done, in the same turn, with the fix spelled out in the message.</p>
<p>The generation profile closes the last gap with one instruction: treat every <code>[wechat-strict]</code> message as a build-breaking bug, fix the cause, and never attempt to detect or bypass the harness. A game that only runs with the sandbox off is a game that fails after export, and the model is told exactly that.</p>
<p>In effect the sandbox converts a fuzzy compliance problem (&quot;did the model follow all fourteen rules?&quot;) into the debugging loop the system is already good at (&quot;the console shows an error, fix it&quot;).</p>
<h2>What a browser can't simulate</h2>
<p>Honesty section. This sandbox catches API-surface violations, which in our estimation is the large majority of what kills a port. It cannot catch: performance on a real phone, iOS running JavaScript without JIT, WeChat's WebGL implementation quirks, or codec behavior differences beyond file extensions. Those need the real runtime.</p>
<p>So the sandbox is ring one of three. Ring two, once our exporter emits WeChat DevTools projects, is the official simulator driven headlessly through the DevTools CLI and miniprogram-automator: boot the exported package, assert the first frame renders, script a tap. Ring three is the official device path, preview QR codes and remote debugging on physical phones, which is where the truths nothing else reveals live. Each ring is slower and more faithful than the last, and the job of each is to make trips to the next one rare.</p>
<p>If you want to try the mode, it's the &quot;WeChat mini game mode&quot; toggle in the <a href="/create">Game Creator</a>. For the market and regulatory context around all this, see <a href="/blog/2026-07-19-wechat-mini-games-guide-for-developers-outside-china">our field guide to reaching WeChat's half-billion players</a>.</p>
<h2>References</h2>
<ul>
<li><a href="https://developers.weixin.qq.com/minigame/dev/guide/runtime/js-support.html">WeChat official docs: JavaScript support in mini games</a></li>
<li><a href="https://developers.weixin.qq.com/minigame/en/dev/guide/best-practice/adapter.html">WeChat official docs: the adapter layer</a></li>
<li><a href="https://developers.weixin.qq.com/minigame/dev/guide/performance/perf-high-performance-plus.html">WeChat official docs: high-performance+ mode</a></li>
<li><a href="https://wechat-miniprogram.github.io/minigame-unity-webgl-transform/Design/WebGL2.html">WeChat engineering docs: WebGL2 rendering support in mini games</a></li>
<li><a href="https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/blob/main/Design/iOSOptimization.md">WeChat engineering docs: iOS high-performance and high-performance+ modes</a></li>
<li><a href="https://developers.weixin.qq.com/community/develop/doc/000aee72868a381d6c261686651c00">WeChat dev community: broken webgl2 contexts should return null</a></li>
<li><a href="https://developers.weixin.qq.com/miniprogram/en/dev/devtools/auto/">WeChat official docs: miniprogram-automator</a></li>
<li><a href="https://github.com/mrdoob/three.js/releases/tag/r163">Three.js r163 release notes (WebGL1 support removed)</a></li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WeChat mini games: the biggest instant-game market you can't just deploy to]]></title>
            <link>https://app.cinevva.com/blog/2026-07-19-wechat-mini-games-guide-for-developers-outside-china</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-07-19-wechat-mini-games-guide-for-developers-outside-china</guid>
            <pubDate>Sun, 19 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[500 million monthly players, a $5.6 billion market that doubled in a year, and a platform your web game can't reach with a URL. What WeChat mini games actually are, the regulations you'll face as a developer outside China, the one monetization path that doesn't need a license, and how Cinevva's new mini game mode fits in.]]></description>
            <content:encoded><![CDATA[<h1>WeChat mini games: the biggest instant-game market you can't just deploy to</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/wechat-mini-games-market-hero.jpg" alt="A smartphone showing a mini game standing in front of a gate with an approval seal, a stamped document and coins beside it" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>If you build web games, there's a market of half a billion monthly players that your games can't reach, no matter how good your mobile support is. It sits inside WeChat, it nearly doubled in revenue last year, and getting into it involves both a technical port and a regulatory process that most Western developers have never heard of.</p>
<p>We just shipped the first piece of our answer to it: an experimental <a href="/news/2026-07-19-wechat-mini-game-mode">WeChat mini game mode</a> in the Cinevva Game Creator. This post is the longer story: what the platform actually is, what the rules are, and what a realistic path looks like for a developer outside China.</p>
<h2>The market, in numbers that are easy to underestimate</h2>
<p>WeChat is China's default communication app, with a combined monthly active user base above 1.4 billion. Mini games live inside it as tap-to-play experiences with no install and no app store, launched from a chat message, a search, or a share. In 2025 Tencent announced the mini games platform had crossed 500 million monthly active users, with more than a billion registered players and around 500,000 developers.</p>
<p>The money is real too. China's mini game market generated 39.8 billion yuan in 2024, about $5.6 billion, up 99% year over year. Roughly 69% of that came from in-app purchases and 31% from advertising. Keep that split in mind, because the ad share matters a lot for foreign developers.</p>
<p>For scale: that single year of mini game revenue is comparable to the entire global web-games market that platforms like Poki, CrazyGames, and <a href="http://itch.io">itch.io</a> sit on top of. It's not a niche. It's a parallel universe with its own rules.</p>
<h2>Why your web game doesn't just port</h2>
<p>A WeChat mini game looks like a web game and is written in JavaScript, so the natural assumption is that porting is a weekend of work. It isn't, and the reasons are structural.</p>
<p>Mini games don't run in a browser. They run in WeChat's own runtime, which gives you a canvas, WebGL, and a set of <code>wx.*</code> APIs. There is no DOM and no CSS. Every button, health bar, menu, and dialog in your game has to be drawn on canvas and hit-tested by your own code. If your game's UI is HTML, that UI doesn't exist on WeChat.</p>
<p>The input model is different. There's no Pointer Lock and no mouse, so a desktop-style FPS camera has to become drag-look. There's no keyboard on the primary device. If your game isn't fully playable with touch alone, it isn't playable.</p>
<p>Packages are capped at 4 MB for the main bundle and 20 MB total using subpackages, and everything your game executes must be inside that reviewed package. Which brings us to the rule that shapes the whole platform: WeChat bans dynamically executed code. No <code>eval</code>, no <code>new Function</code>, no downloading JavaScript at runtime, and Tencent actively rejects apps that embed JS interpreters to route around it. Every game is a sealed, reviewed artifact.</p>
<p>That last rule is why there will never be a &quot;portal app&quot; that streams web games into WeChat, ours or anyone's. Each game goes through review as its own standalone mini game. Any tool that wants to help you here has to help you produce clean, self-contained, canvas-only packages. That's the design constraint we built our new mode around.</p>
<h2>The regulatory reality</h2>
<p>Now the part that has nothing to do with code. China regulates games as published media, and the requirements stack up in layers. None of them are secret, but almost nobody outside China explains them plainly, so here they are.</p>
<p><strong>ICP filing.</strong> Since late 2023, every mini program and mini game must complete an ICP filing (a registration with Chinese authorities, done through the WeChat platform). It typically takes one to three weeks.</p>
<p><strong>Proof of copyright, per title.</strong> Every game needs either a software copyright registration or the faster electronic copyright certification. The electronic route takes roughly ten to fifteen days per game. This is a per-title cost, which matters if you plan to ship many small games.</p>
<p><strong>The banhao, if you charge money.</strong> Any game with in-app purchases needs a game publication license from the National Press and Publication Administration, universally called the banhao. Two facts define it for you as a foreign developer. First, only a Chinese company can apply. Second, imported titles go through a separate, slower approval track, historically six to eight months when it moves at all. In practice, a developer outside China reaches monetized publishing only through a licensed domestic publisher who submits the game, holds the license, and operates it.</p>
<p><strong>The free-with-ads exception.</strong> A free game with no payments of any kind doesn't need a banhao. It can still earn money through WeChat's own advertising components, and remember, ads were 31% of mini game revenue in 2024, over $1.7 billion. This is the one path a small developer can walk without a Chinese corporate partner, and it's how a large share of the market's long tail actually operates.</p>
<p>In summary, shipping a free ad-supported mini game is paperwork measured in weeks. Shipping a monetized one is a business development project measured in months, with a partner you'll need to choose carefully.</p>
<h2>What Cinevva's mini game mode does about all this</h2>
<p>We can't file your paperwork. What we can do is make sure the game itself is never the blocker, starting from the first prompt.</p>
<p>With WeChat mini game mode on, the Game Creator builds inside the portable subset: canvas-drawn UI instead of HTML, touch-first controls with drag-look instead of pointer lock, rendering budgeted for a mid-range phone with a graceful fallback screen where real WebGL2 is missing, a hard asset budget with mp3-only audio, no dynamic imports, no runtime code loading, and saves that map onto WeChat's storage API. The game still runs in the browser like every Cinevva game, so you can build, test, and share it normally. It just stays inside the subset that survives the port.</p>
<p>The exporter that emits a ready-to-open WeChat DevTools project from one of these games is in progress. We sequenced it this way for a reason. An exporter can bundle your code, but it can't un-write an HTML HUD or redesign mouse-only controls. Portability is a property of how the game is built, so the mode came first.</p>
<p>If you've read our <a href="/guides/wechat-mini-game-engines">guide to mini game engines</a> or the <a href="/guides/publish-wechat-douyin-mini-games">publishing walkthrough for WeChat and Douyin</a>, this is the same thinking applied to generation: the cheapest port is the one you never have to do.</p>
<h2>A realistic playbook for a developer outside China</h2>
<p>This is what we'd do with a first title. Build small and short-session, because that's what the platform rewards: the hits are one-more-run games rather than epics. Design portrait-first and touch-only. Ship it free with ads, which keeps you out of banhao territory while you learn whether Chinese players want your game at all. Handle the ICP filing and electronic copyright certification yourself, they're tedious but tractable. And only when a game has proven retention and you're staring at real IAP potential, start the publisher conversation with numbers in hand, because a publisher negotiation goes very differently when your game already has an audience.</p>
<p>That's the strategy the new mode is built to serve: make producing the candidate games nearly free, so you can afford to find out what works before the regulatory spend begins.</p>
<p>If you're planning a run at this market, we'd genuinely like to hear from you while the mode is still taking shape. <a href="/contact">Get in touch</a> or start building in the <a href="/create">Game Creator</a>.</p>
<h2>References</h2>
<ul>
<li><a href="https://www.pocketgamer.biz/wechat-mini-games-crosses-500m-monthly-active-users-as-tencent-shifts-focus-to-retention/">PocketGamer.biz: WeChat Mini Games crosses 500m monthly active users</a></li>
<li><a href="https://www.ichongqing.info/2025/07/02/wechat-mini-games-hits-1b-users-becomes-global-magnet-for-game-developers/">iChongqing: WeChat Mini Games hits 1B users</a></li>
<li><a href="https://www.oreateai.com/blog/2025-wechat-mini-game-ecosystem-development-report-indepth-analysis-of-market-trends-and-typical-cases/7f0b62beb192f52409ae047d0bbae184">Oreate: 2025 WeChat mini game ecosystem development report (2024 market data)</a></li>
<li><a href="https://developers.weixin.qq.com/minigame/dev/guide/runtime/js-support.html">WeChat official docs: JavaScript support and the dynamic-code ban</a></li>
<li><a href="https://developers.weixin.qq.com/minigame/en/dev/guide/best-practice/adapter.html">WeChat official docs: the adapter layer for browser-style code</a></li>
<li><a href="https://nikopartners.com/game-regulations-in-china-everything-you-need-to-know/">Niko Partners: game regulations in China</a></li>
<li><a href="https://clearlaunch.dev/regulations/china-game-approval">ClearLaunch: China game approval (banhao) requirements and enforcement</a></li>
<li><a href="https://appinchina.co/blog/the-complete-guide-to-wechat-mini-games/">AppInChina: the complete guide to WeChat mini games</a></li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Record profits, record layoffs: how game devs are actually getting rehired in 2026]]></title>
            <link>https://app.cinevva.com/blog/2026-07-02-game-industry-layoffs-getting-rehired</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-07-02-game-industry-layoffs-getting-rehired</guid>
            <pubDate>Thu, 02 Jul 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[The games industry made $195.6B last year and still cut a third of its people. Here's the honest data on the layoffs, why the job market got so brutal, and the one thing that's actually pulling people back in.]]></description>
            <content:encoded><![CDATA[<h1>Record profits, record layoffs: how game devs are actually getting rehired in 2026</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<p>The games industry made about <strong>$195.6 billion</strong> in 2025. Its best year ever. In the same stretch, roughly <strong>one in three developers lost their job</strong>.</p>
<p>Read those two sentences again. They shouldn't be able to coexist, and yet here we are. If you got cut in the last two years, you already know the math doesn't feel like a downturn. It feels like being told the boat is fine while you're the one going overboard.</p>
<p>I've been an indie dev. I've watched friends post the &quot;open to work&quot; banner three times in eighteen months. So this isn't a hot take from the sidelines. Let's look at what actually happened, and then the part that matters most if you're job hunting right now: what's genuinely getting people rehired.</p>
<h2>The numbers are worse than the vibe</h2>
<p>The layoff wave started in 2022 and never really stopped. It's not one bad quarter. It's a four-year structural reset.</p>
<table>
<thead>
<tr>
<th>Year</th>
<th>Games jobs cut</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022</td>
<td>~8,500</td>
</tr>
<tr>
<td>2023</td>
<td>~10,500</td>
</tr>
<tr>
<td>2024</td>
<td>~14,600 (the peak)</td>
</tr>
<tr>
<td>2025</td>
<td>~9,200</td>
</tr>
<tr>
<td>2026</td>
<td>tracking above 2025, projected ~11,580</td>
</tr>
</tbody>
</table>
<p>That's roughly <strong>44,000 to 55,000 jobs gone</strong> over the period, depending on whose tracker you trust (<a href="https://en.wikipedia.org/wiki/2022%E2%80%932026_video_game_industry_layoffs">Wikipedia</a>, <a href="https://gamesbeat.com/global-gamings-workforce-grew-0-6-in-4-years-but-north-americas-shrank-11-5-amir-satvat/">GamesBeat</a>). The 2026 State of the Game Industry report from GDC, which surveyed more than 2,300 professionals, found that <strong>28% of developers globally lost their job in the past two years, and 33% in the US</strong> (<a href="https://www.gamesindustry.biz/gdc-survey-reveals-layoffs-up-6-36-of-industry-using-ai-and-overwhelming-support-for-unionisation-in-the-us">GamesIndustry.biz</a>). Half said their current or most recent employer ran layoffs in the last twelve months.</p>
<p>North America took the worst of it. Amir Satvat's workforce tracking, which is the closest thing this industry has to a running census, shows the regional workforce shrank while the global headcount barely moved. About <strong>19% of North American games workers were affected</strong> (<a href="https://gamesbeat.com/global-gamings-workforce-grew-0-6-in-4-years-but-north-americas-shrank-11-5-amir-satvat/">GamesBeat</a>).</p>
<p>Here's the stat that explains why the job search feels impossible even after hiring &quot;recovered.&quot; Satvat estimates around <strong>288,000 people were looking for games work</strong> over this window. Recent grads, laid-off veterans, and career changers, all applying into the same narrow set of openings. When you send a resume into a job post now, you're not competing with a dozen people. You're competing with a stadium.</p>
<h2>Why a record year still meant pink slips</h2>
<p>The revenue didn't disappear. It concentrated. A shrinking number of live-service giants pull an outsized share, which means fewer new bets, fewer new teams, and fewer of the mid-size projects that used to absorb talent. Private investment in games dropped by more than half in 2025 (<a href="https://respawn.outlookindia.com/gaming/gaming-news/record-profits-record-layoffs-inside-gamings-2026-paradox">Outlook Respawn</a>). Studios responded the way studios do: cancel projects, trim budgets, move work to contractors.</p>
<p>So the profit is real, and the pain is real, and they're pointing at the same cause. That's cold comfort when you're the one refreshing your inbox, but it tells you something useful. This isn't a market waiting to snap back to 2021. The people getting rehired aren't waiting for that either. They're adapting to how hiring actually works now.</p>
<h2>The job market has an authenticity problem</h2>
<p>Talk to anyone who screens candidates today and you'll hear the same complaint. They're drowning. Job posts pull hundreds of applications in hours, and most of them read like the same person wrote them, because in a sense the same tool did.</p>
<p>Recruiters told TechRound the hard part isn't spotting AI use, it's that the flood of &quot;well-optimized, low-context content&quot; makes it nearly impossible to find the person who actually gets the role (<a href="https://techround.co.uk/news/linkedin-ai-slop-content-recruitment-process/">TechRound</a>). LinkedIn itself now says it detects generic AI-written content around 94% of the time and quietly limits how far it spreads (<a href="https://techround.co.uk/news/linkedin-ai-slop-content-recruitment-process/">TechRound</a>).</p>
<p>Flip that around and it becomes the best news in this whole article. When everything sounds the same, being specific is a superpower. In a feed of identical polish, the human who shows real work and real thinking doesn't just stand out. They're the only signal in the noise.</p>
<h2>Proof beats polish, every single time</h2>
<p>For game roles specifically, the thing that moves the needle isn't a prettier PDF. It's evidence someone can experience. A 12-year recruiter put it bluntly: a playable build or a demo reel does more for you than almost anything else on your application.</p>
<p>That's the shift. A resume tells a recruiter you understand design. A playable slice lets them feel it in 30 to 90 seconds. You can't fake a working mechanic the way you can fake a bullet point. You can't fake a walkable level, a live shader, a rig that actually moves, or an interactive audio cue mapped to a real scene. Interactivity is proof that survives scrutiny, because behind it is a person who can defend every decision.</p>
<p>And that last part is what recruiters are really testing. The tell they use to catch AI-padded portfolios is simple: ask about process, not output. Someone who generated a case study can describe what it says, but not the decisions behind it. So the strongest portfolios in 2026 all carry the same four things:</p>
<table>
<thead>
<tr>
<th>Layer</th>
<th>What it answers</th>
</tr>
</thead>
<tbody>
<tr>
<td>Context</td>
<td>The brief, the platform, the real constraints (budget, deadline, tech limits)</td>
</tr>
<tr>
<td>Contribution</td>
<td>What you personally owned versus what the team did</td>
</tr>
<tr>
<td>Decisions</td>
<td>The trade-offs you made, and what you kept, changed, and rejected</td>
</tr>
<tr>
<td>Outcome</td>
<td>Measurable, verifiable results a stranger can check</td>
</tr>
</tbody>
</table>
<p>That &quot;kept, changed, rejected&quot; line is the one most people skip, and it's the one that proves taste. Taste is the hardest thing to fake, and it's exactly what a studio is buying: someone who can pick the right idea out of ten plausible ones. Skip the &quot;I learned so much&quot; wrap-up. Show the call you made and why it served the player.</p>
<h2>A word about AI, because this industry has earned the right to be angry</h2>
<p>I run a platform that uses AI tools, and I'm not going to pretend the tension isn't there. The same GDC survey found that <strong>52% of developers now think generative AI is having a negative impact on the industry, up from 18% two years ago</strong>, and the strongest opposition comes from artists, writers, and programmers (<a href="https://www.gamesindustry.biz/gdc-survey-reveals-layoffs-up-6-36-of-industry-using-ai-and-overwhelming-support-for-unionisation-in-the-us">GamesIndustry.biz</a>). When you've just been laid off and told a model might do a slice of your old job, &quot;just use AI for your portfolio&quot; is a slap, not advice.</p>
<p>So I'll say it plainly. Nobody gets hired by handing a recruiter something a machine generated and they can't explain. The work has to be yours. Your decisions, your craft, your ownership. If you did use a tool somewhere in a project, say so, and show your judgment on top of it: what you kept, what you threw out, why your call was better for the player. Hiring managers trust the person who treats a tool like an intern that needs direction, not the person hiding behind it. Honesty about your process reads as professionalism, and professionalism is often just &quot;I thought about the consequences before I published.&quot;</p>
<h2>Where to put the proof</h2>
<p>One practical thing, since so many of these conversations start on LinkedIn. The feed punishes outside links hard, but your profile's Featured section doesn't. That's the one spot that turns a link into a clean preview card with no penalty, and it sits right at the top of your profile where recruiters look first. Pin three to five things, best work first, and remember most people are viewing on a phone. Lead with the item someone can open and experience in seconds.</p>
<p>Keep it fast and keep it honest. A demo that loads in under two seconds and shows one clean idea beats an ambitious project that stutters or 404s. Recruiters reviewing thirty portfolios in an afternoon do not wait, and a broken link reads as a broken habit.</p>
<h2>Why we care about this</h2>
<p>We build browser-based, instantly playable games at Cinevva, which means a lot of what we make happens to be exactly what a modern portfolio needs: real work that a recruiter can open and play from a single link, no download, no install. We're paying close attention to this problem, because the people it's hitting are our people. If you got cut, your skills didn't evaporate. The market got louder, and the way you prove yourself changed.</p>
<p>The old question was &quot;where did you work?&quot; The new one is &quot;show me something I can play, and tell me why you built it that way.&quot; That second question is harder to game and better for the people who can actually do the work. If that's you, this market is brutal, but it isn't closed. It's waiting for proof it can trust.</p>
<hr>
<h2>Sources</h2>
<ul>
<li><a href="https://www.gamesindustry.biz/gdc-survey-reveals-layoffs-up-6-36-of-industry-using-ai-and-overwhelming-support-for-unionisation-in-the-us">GDC 2026 State of the Game Industry: layoffs, AI, and unionization</a></li>
<li><a href="https://gamesbeat.com/global-gamings-workforce-grew-0-6-in-4-years-but-north-americas-shrank-11-5-amir-satvat/">GamesBeat: Global games workforce grew 0.6% in 4 years, North America shrank</a></li>
<li><a href="https://en.wikipedia.org/wiki/2022%E2%80%932026_video_game_industry_layoffs">Wikipedia: 2022–2026 video game industry layoffs</a></li>
<li><a href="https://respawn.outlookindia.com/gaming/gaming-news/record-profits-record-layoffs-inside-gamings-2026-paradox">Outlook Respawn: Record profits, record layoffs</a></li>
<li><a href="https://www.gamedeveloper.com/business/industry-layoffs-are-seemingly-slowing-but-the-damage-has-already-been-done">Game Developer: Layoffs are slowing, but the damage is done</a></li>
<li><a href="https://techround.co.uk/news/linkedin-ai-slop-content-recruitment-process/">TechRound: LinkedIn faces a surge in AI slop content</a></li>
</ul>
<hr>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/blog/2026-01-18-skills-over-degrees">The job market is transforming: from credentials to skills</a></li>
<li><a href="/blog/2026-01-18-ai-controversy-and-post-ai-economy">AI controversy, trust, and the post-AI economy for games</a></li>
<li><a href="/blog/2026-02-10-the-intuitive-mind">The intuitive mind in an age of AI</a></li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Free Browser Games to Play Now (No Download)]]></title>
            <link>https://app.cinevva.com/blog/2026-06-30-best-free-browser-games-no-download</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-06-30-best-free-browser-games-no-download</guid>
            <pubDate>Tue, 30 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Free browser games by genre, with creator links, clear demo labels and practical device tips. Start with three arcade picks or explore nine indie games.]]></description>
            <content:encoded><![CDATA[<script setup lang="ts">
import { trackEventBeacon } from '../.vitepress/composables/useAnalytics'
import BrowserGamePicks from '../.vitepress/components/BrowserGamePicks.vue'

function trackGameLink(placement: string, destination: string) {
  trackEventBeacon('content_cta_clicked', 'content', {
    content_id: 'best-free-browser-games-no-download',
    placement,
    destination,
  })
}
</script>
<h1>Best Free Browser Games to Play Now (No Download)</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<BrowserGamePicks />
<nav class="browser-games-actions" aria-label="Choose how to explore the games">
<a class="play-now-btn" href="/arcade" @click="trackGameLink('intro', '/arcade')">Play free games now</a>
<a class="browser-games-list-link" href="#top-rated-interactive-experiences" @click="trackGameLink('intro', '#top-rated-interactive-experiences')">Jump to the indie game list</a>
</nav>
<p><strong>Pick by the kind of game you want to play.</strong> Try Dragonsweeper for deduction, Six Cats Under for a point-and-click puzzle, Friday Night Funkin' for rhythm, or Vampire Survivors for a survival demo. The links below go to the creators' pages, where you can distinguish the browser build from an optional download or paid release.</p>
<p><em>Creator pages and their browser-play listings checked November 8, 2026. This is an editorial selection, not a scored benchmark or a claim that every game was completed on every device. Cinevva publishes this article and operates the Arcade featured above.</em></p>
<h2>Choose a browser game</h2>
<table>
<thead>
<tr>
<th>If you want…</th>
<th>Start here</th>
<th>Which version is linked?</th>
</tr>
</thead>
<tbody>
<tr>
<td>Deduction with monsters and number clues</td>
<td><a href="https://danielben.itch.io/dragonsweeper">Dragonsweeper</a></td>
<td>Creator's HTML5 game</td>
</tr>
<tr>
<td>An interactive story about anxiety</td>
<td><a href="https://ncase.itch.io/anxiety">Adventures With Anxiety!</a></td>
<td>Free browser story; read the creator's content notes</td>
</tr>
<tr>
<td>A short satire about media and attention</td>
<td><a href="https://ncase.itch.io/wbwwb">We Become What We Behold</a></td>
<td>Creator's browser game</td>
</tr>
<tr>
<td>A puzzle about helping a household of cats</td>
<td><a href="https://teambeanloop.itch.io/six-cats-under">Six Cats Under</a></td>
<td>Browser game, with optional desktop downloads</td>
</tr>
<tr>
<td>Keyboard rhythm challenges</td>
<td><a href="https://ninja-muffin24.itch.io/funkin">Friday Night Funkin'</a></td>
<td>Browser build; desktop downloads are separate</td>
</tr>
<tr>
<td>Decisions that shape a kingdom</td>
<td><a href="https://graebor.itch.io/sort-the-court">Sort the Court!</a></td>
<td>Original browser build; creator links a newer mobile version</td>
</tr>
<tr>
<td>Turn-based inventory strategy</td>
<td><a href="https://thejaspel.itch.io/backpack-hero">Backpack Hero</a></td>
<td>Free web build; full paid download is separate</td>
</tr>
<tr>
<td>Surviving waves of enemies</td>
<td><a href="https://poncle.itch.io/vampire-survivors">Vampire Survivors</a></td>
<td>Limited web demo, not the current full release</td>
</tr>
<tr>
<td>Mining between defensive battles</td>
<td><a href="https://bippinbits.itch.io/dome-romantik">Dome Romantik</a></td>
<td>Original game-jam version of Dome Keeper</td>
</tr>
</tbody>
</table>
<p>“No download” means no separate installer is required for the browser version. Your browser still transfers game files, and some games store progress locally. Optional donations or a paid-download button on a creator's page do not necessarily mean the browser embed is paid.</p>
<h2>Play Something Right Now</h2>
<div class="play-now-card">
<a class="play-now-image" href="/arcade" aria-label="Open the free Cinevva Arcade" @click="trackGameLink('card_image', '/arcade')"><img src="/img/og-arcade.jpg" alt="The Cinevva Arcade browser-game collection" loading="lazy"></a>
<div class="play-now-body">
<p><strong><a href="/arcade">The Cinevva Arcade</a></strong> collects games made by Cinevva creators. Open a game in your browser without an installer or an account, then browse the collection for another. The three picks at the top link directly to their players.</p>
<p>&lt;a class=&quot;play-now-btn&quot; href=&quot;/arcade&quot; @click=&quot;trackGameLink('card_button', '/arcade')&quot;&gt;Browse the Arcade</a></p>
</div>
</div>
<h2>Story, puzzle and rhythm games {#top-rated-interactive-experiences}</h2>
<div class="showcase-card">
<img src="/img/showcases/anxiety.png" alt="Adventures With Anxiety screenshot" loading="lazy">
<p><strong>Adventures With Anxiety! — interactive story</strong>
Play through a story about a person and their anxious inner voice. The creator supplies <a href="https://ncase.me/anxiety/">content notes and fan translations</a>, which are worth checking before choosing it for a younger audience. <a href="https://ncase.itch.io/anxiety">Open the creator's browser game</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/wbwwb.png" alt="We Become What We Behold screenshot" loading="lazy">
<p><strong>We Become What We Behold — social satire</strong>
A short game about how the things you choose to photograph affect a crowd. Its cartoon presentation includes dark themes; it is not simply a cheerful photography toy. <a href="https://ncase.itch.io/wbwwb">Play on the creator's page</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/six-cats-under.png" alt="Six Cats Under screenshot" loading="lazy">
<p><strong>Six Cats Under — point-and-click puzzle</strong>
Use a ghost's limited influence over objects to help a household of cats. The creator offers an HTML5 version and separate desktop downloads. <a href="https://teambeanloop.itch.io/six-cats-under">Open Six Cats Under</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/friday-night-funkin.gif" alt="Friday Night Funkin screenshot" loading="lazy">
<p><strong>Friday Night Funkin' — rhythm</strong>
Match directional inputs to the music. The creator lists WASD and arrow-key controls, making a keyboard a useful starting point. Browser and desktop builds may differ; use the controls shown by the version you open. <a href="https://ninja-muffin24.itch.io/funkin">Play the official browser build</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/sort-the-court.png" alt="Sort the Court screenshot" loading="lazy">
<p><strong>Sort the Court! — kingdom decisions</strong>
Answer visitors' requests and watch the consequences for your kingdom. For phones and additional languages, the <a href="https://graebor.itch.io/sort-the-court">creator's page</a> directs players to the <a href="https://poki.com/en/g/sort-the-court">updated Poki version</a>. That is more useful than assuming the older <a href="http://itch.io">itch.io</a> build supports every device.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/dragonsweeper.png" alt="Dragonsweeper screenshot" loading="lazy">
<p><strong>Dragonsweeper — deduction puzzle</strong>
Read the monster guide and use the board's clues to decide where to explore. The creator currently lists it as an HTML5 game; the optional download is source code. <a href="https://danielben.itch.io/dragonsweeper">Play Dragonsweeper</a>.</p>
</div>
<h2>Roguelike &amp; Strategy (Browser-Playable)</h2>
<div class="showcase-card">
<img src="/img/showcases/backpack-hero.png" alt="Backpack Hero screenshot" loading="lazy">
<p><strong>Backpack Hero — inventory strategy</strong>
Arrange items in a backpack and use their positions and effects in turn-based encounters. The page has a free browser player and a separate paid download. Do not assume the web build contains everything in the commercial edition. <a href="https://thejaspel.itch.io/backpack-hero">Open Backpack Hero</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/vampire-survivors.png" alt="Vampire Survivors screenshot" loading="lazy">
<p><strong>Vampire Survivors — survival demo</strong>
The developer explicitly calls this a web demo and lists one stage and seven characters. It supports mouse, keyboard, controller and touchscreen input according to the page. The full release receives content updates separately. <a href="https://poncle.itch.io/vampire-survivors">Play the web demo</a>.</p>
</div>
<div class="showcase-card">
<img src="/img/showcases/dome-romantik.gif" alt="Dome Romantik screenshot" loading="lazy">
<p><strong>Dome Romantik — mining and defense prototype</strong>
Mine resources, return to the dome and defend it between trips. This is the original game-jam build that led to Dome Keeper. Its creator notes that browser audio may crackle. <a href="https://bippinbits.itch.io/dome-romantik">Play the original prototype</a>.</p>
</div>
<h2>Why These Specifically?</h2>
<p>These choices cover different play styles, link to identifiable creators, and currently expose a browser-play option. We checked the official pages and release distinctions for this refresh. We have not measured a cross-device performance ranking or completed fresh playthroughs of all nine games. Rating totals change, so they are not used as a permanent quality score here.</p>
<p>For a phone, check touch controls before investing time in a run. For a school or work computer, the network policy, browser settings and graphics hardware can still prevent a game from opening. A page marked HTML5 is not a compatibility guarantee for every managed device.</p>
<h2>If a game will not load</h2>
<ol>
<li>Open the creator's page directly and use <strong>Run game</strong> or the embedded player, rather than a desktop download button.</li>
<li>Click inside the game to give it keyboard focus. Start audio with a deliberate click or tap if it is muted initially.</li>
<li>Update the browser and reload the page. Save or export progress first if the game offers that option.</li>
<li>For a black canvas or graphics error, use the <a href="/tools/webgl-webgpu-checker">WebGL/WebGPU checker</a> and follow the <a href="/guides/webgl-webgpu-not-supported-fix">browser troubleshooting guide</a>.</li>
<li>On a managed network, follow the organization's access policy. A blocked site is not evidence that the game has disappeared.</li>
</ol>
<h2>Browse More Web Games</h2>
<ul>
<li><a href="/arcade">The Cinevva Arcade</a>: browse games made by Cinevva creators.</li>
<li><a href="https://itch.io/games/html5">HTML5 games on itch.io</a>: discover other creators and check each game's platform and controls.</li>
<li><a href="https://itch.io/games/genre-platformer/html5">HTML5 platformers</a>: narrow the list to jumping and movement games.</li>
</ul>
<h2>Notable Indie Games (Download Required)</h2>
<p>Enjoyed one of the web builds? The creators link the commercial editions of <a href="https://thejaspel.itch.io/backpack-hero">Backpack Hero</a> and <a href="https://store.steampowered.com/app/1637320/Dome_Keeper/">Dome Keeper</a>. Those are separate products with their own prices and system requirements. They are not needed to play the browser versions linked above.</p>
<h2>Common Questions</h2>
<h3>What are the best free browser games with no download?</h3>
<p>Choose by genre: Dragonsweeper for deduction, Six Cats Under for point-and-click puzzles, Friday Night Funkin' for rhythm, Sort the Court! for decisions, or the Vampire Survivors web demo for survival. The table above distinguishes complete browser experiences, limited web builds and prototypes.</p>
<h3>Are browser games safe to play without downloading?</h3>
<p>An installer is not required for these browser builds, but that does not make every game page risk-free. Use the creator links, keep your browser updated and review unexpected requests for files, notifications or extensions. Browsers can provide file access when you grant permission; they do not categorically lack that ability. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/File_System_API">MDN's file-access explanation</a>.</p>
<h3>Can I play these on a Chromebook or school computer?</h3>
<p>Some may work, depending on controls, graphics support and the device's policies. A keyboard-focused game may be awkward on a touchscreen, and a managed browser can block the site or its embed. Check the game page and the troubleshooting steps above rather than assuming universal support.</p>
<h3>Are the browser demos the same as the paid games?</h3>
<p>Not necessarily. Vampire Survivors labels its web build a demo; Dome Romantik is the older game-jam prototype; Backpack Hero separates browser play from its paid download. Read the creator's description before expecting full-game content or transferable saves.</p>
<h2>Want to make a browser game?</h2>
<p>Start with a small idea in the <a href="/create">Cinevva game creator</a>, then test the result and share it using the creator's publishing controls. Building requires the account access and credits shown in the creator; playing published Arcade games is a separate activity.</p>
<ul>
<li><a href="/guides/vibe-coding-game-prompts">100 game prompt ideas</a></li>
<li><a href="/creators">For game creators</a></li>
<li><a href="/tutorials/ship-web-game-fast">Build a web game that loads fast</a></li>
</ul>
<style>
.browser-games-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1.25rem 0;
}

.browser-games-actions .play-now-btn {
  margin-top: 0;
}

.browser-games-list-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.browser-games-actions a:focus-visible,
.play-now-card a:focus-visible {
  outline: 2px solid var(--vp-c-brand-1);
  outline-offset: 4px;
}

.play-now-card {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--vp-c-bg-soft);
  border: 1px solid var(--vp-c-brand-1);
}

.play-now-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: block;
}

.play-now-body > :first-child {
  margin-top: 0;
}

/* `.vp-doc a` sets a link colour, so the button needs to outrank it. */
.vp-doc a.play-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  background: var(--vp-c-brand-1);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.vp-doc a.play-now-btn:hover {
  background: var(--vp-c-brand-2);
  color: #fff;
}

@media (max-width: 639px) {
  .play-now-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .play-now-body { order: -1; }
  .play-now-body .play-now-btn { width: 100%; }
  .play-now-card img { margin-bottom: 0; }
}

@media (min-width: 640px) {
  .play-now-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  .play-now-card img {
    margin-bottom: 0;
    width: 260px;
  }
}

.showcase-card {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: var(--vp-c-bg-soft);
}

.showcase-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: block;
}

@media (min-width: 640px) {
  .showcase-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    align-items: start;
  }
  
  .showcase-card img {
    margin-bottom: 0;
    width: 200px;
  }
}
</style>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web game engines in 2026: PlayCanvas vs Three.js vs Babylon.js vs Unity WebGL]]></title>
            <link>https://app.cinevva.com/blog/2026-06-09-web-game-engines-2026-comparison</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-06-09-web-game-engines-2026-comparison</guid>
            <pubDate>Tue, 09 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A current, honest comparison of the main ways to build a 3D game in the browser in 2026: PlayCanvas (v2.20), Three.js, Babylon.js, and Unity WebGL. What each is, who it's for, WebGL2 vs WebGPU support, licensing, and how to choose.]]></description>
            <content:encoded><![CDATA[<h1>Web game engines in 2026: PlayCanvas vs Three.js vs Babylon.js vs Unity WebGL</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/web-engines-2026-hero.jpg" alt="A browser window showing a 3D scene transitioning from a white wireframe mesh on the left to a rendered colorful low-poly landscape on the right" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>If you want to ship a 3D game that runs in a browser in 2026, you have four mainstream choices and a few newer ones. They get lumped together as &quot;web game engines,&quot; but they're genuinely different tools that solve different problems. Picking the wrong one costs you months. This is a current, fact-checked comparison, written by people who build a web 3D engine for a living and evaluated all of these before building our own.</p>
<p>We'll go through each option, what it actually is, who it's for, and where it falls down, then give you a short decision guide at the end. Where we mention version numbers, they're accurate as of September 2026 (PlayCanvas engine 2.22, Three.js r186, Babylon.js 9.26, Unity 6.6).</p>
<blockquote>
<p>This post focuses on the four mainstream 3D choices. For all 11 web engines ranked and compared (including 2D options like Phaser, Defold, and Construct) see our <a href="/guides/web-game-engines-comparison">best web game engines for 2026</a> guide.</p>
</blockquote>
<h2>The quick comparison</h2>
<table>
<thead>
<tr>
<th></th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
<th>Cinevva</th>
</tr>
</thead>
<tbody>
<tr>
<td>What it is</td>
<td>Full engine + hosted editor</td>
<td>Rendering library</td>
<td>Full engine + editor</td>
<td>Desktop engine, web export</td>
<td>AI-native world platform</td>
</tr>
<tr>
<td>Architecture</td>
<td>Entity-component (ECS)</td>
<td>Scene graph</td>
<td>Scene graph + components</td>
<td>GameObject/component</td>
<td>Scene graph + AI builder</td>
</tr>
<tr>
<td>Scripting</td>
<td>TypeScript / JavaScript</td>
<td>JavaScript (you build the rest)</td>
<td>TypeScript / JavaScript</td>
<td>C# (compiled to Wasm)</td>
<td>Natural language + code</td>
</tr>
<tr>
<td>Renderer</td>
<td>WebGL2, WebGPU maturing</td>
<td>WebGL2, WebGPU growing</td>
<td>WebGL2, WebGPU advancing</td>
<td>WebGL2 (export), WebGPU supported since 6.6 (opt-in)</td>
<td>WebGPU only</td>
</tr>
<tr>
<td>Editor</td>
<td>Hosted, commercial</td>
<td>None</td>
<td>Web-based, free</td>
<td>Desktop, commercial</td>
<td>In-world, immersive</td>
</tr>
<tr>
<td>Physics</td>
<td>Ammo / integrations</td>
<td>Bring your own</td>
<td>Havok built in</td>
<td>Built in (PhysX)</td>
<td>Custom character solver</td>
</tr>
<tr>
<td>License</td>
<td>Engine MIT, editor proprietary</td>
<td>MIT</td>
<td>Apache 2.0</td>
<td>Proprietary</td>
<td>Proprietary</td>
</tr>
<tr>
<td>Best for</td>
<td>Studio-style browser games</td>
<td>Custom 3D, full control</td>
<td>Batteries-included games</td>
<td>Porting existing Unity games</td>
<td>In-world AI game creation</td>
</tr>
</tbody>
</table>
<p>The rest of this post explains the table.</p>
<h2>PlayCanvas</h2>
<p>PlayCanvas is the closest thing the web has to a Unity-style workflow. The engine is open source under the MIT license and sits at <a href="https://github.com/playcanvas/engine/releases">v2.22.0 as of September 2026</a>, with 2.21 adding a physics backend abstraction and KTX2 cubemaps and 2.22 adding dual-source blending and better volumetric fog. It uses an entity-component system, you write game logic in TypeScript or JavaScript, and assets move through a server-side pipeline that produces GLB. Real commercial games run on it, and large companies use it in production, Snap being a public example.</p>
<p>Two things people get wrong about PlayCanvas need correcting. First, while the engine is MIT-licensed, the hosted visual editor that most teams actually use is a commercial product and isn't open source. You can use the engine freely without it, but the editor-plus-cloud workflow is the paid part. Second, PlayCanvas is WebGL2-first. It has a WebGPU path, but that path is still maturing rather than being the default renderer, so don't pick PlayCanvas today expecting production WebGPU compute shaders.</p>
<p>Where PlayCanvas genuinely leads is 3D Gaussian splatting. Its SuperSplat editor and viewer, which the team open-sourced, are among the best tooling anywhere for capturing and shipping splat scenes on the web, with WebGPU-based streaming for large captures. If photoreal scanned environments are your thing, that's a real reason to start here.</p>
<p><strong>Choose PlayCanvas if</strong> you want a Unity-like editor and a managed asset pipeline for the browser, and you're shipping the kind of game a studio would build. <strong>Look elsewhere if</strong> you need WebGPU compute today, or you want to avoid a hosted commercial editor.</p>
<h2>Three.js</h2>
<p>Three.js is a rendering library rather than a game engine, and it's the most widely used one in the space by a wide margin. It gives you a scene graph, cameras, lights, materials, geometry, loaders, and a renderer, and then it stops. It has no editor, physics, entity system or opinion about how to structure a game. You add those yourself or pull them from the ecosystem.</p>
<p>That trade defines it. You get maximum control and the largest community in web 3D, at the cost of building or assembling everything above the renderer. Its WebGPU renderer has been growing steadily and is usable today (r186, September 2026, is the current release and adds a native Gaussian splat renderer), though, as with the others, the WebGL2 path is still the mature default. Three.js is MIT-licensed.</p>
<p><strong>Choose Three.js if</strong> you want full control, a minimal base, and you have the engineering to build your game systems on top. <strong>Look elsewhere if</strong> you want an editor and game systems handed to you.</p>
<h2>Babylon.js</h2>
<p>Babylon.js is a full engine, Apache-2.0-licensed and backed by a team at Microsoft. Unlike Three.js, it ships with the parts you'd otherwise assemble: a component model, the Havok physics engine integrated, a free web-based editor, and an asset pipeline. Its WebGPU work has moved quickly and is among the more advanced of the general-purpose engines, though it still maintains WebGL2 as the broad-compatibility path. Babylon.js 9.0 (March 2026, now at 9.26 as of September 2026) pushed that lead further with clustered lighting on both backends, volumetric lighting built on WebGPU compute shaders, and shadow support for 3D Gaussian splats.</p>
<p>If your mental model is &quot;I want a complete engine, included physics, and I'm happy working inside its conventions,&quot; Babylon is a strong default and arguably the most feature-complete free option in the space.</p>
<p><strong>Choose Babylon.js if</strong> you want batteries included, built-in physics, and a free editor. <strong>Look elsewhere if</strong> you want a tiny dependency footprint or you specifically want a Unity-style hosted workflow.</p>
<h2>Unity WebGL</h2>
<p>Unity WebGL isn't a web engine, it's an export target. You build in the Unity desktop editor, in C#, and compile to a WebGL bundle that runs in the browser via WebAssembly. That makes it the obvious answer for one specific case: you already have a Unity game and you want a browser version of it.</p>
<p>For a web-first project it carries real costs. The runtime and download weight are significant, startup is slower than a native web engine, and mobile browser performance is a known pain point. Unity is proprietary and its default web output targets WebGL2. The WebGPU backend that started as an experiment in Unity 6 left experimental status in Unity 6.6 (August 2026): it's now a <a href="https://discussions.unity.com/t/webgpu-out-of-experimental-in-unity-6-6/1734694">fully supported graphics API for web builds</a>, still off by default, with a Graphics Device Filtering setting that falls back to WebGL2 per device. Unity 6.6 also lifts the Wasm memory ceiling to 16 GB. That closes the compute-shader gap on paper, but it doesn't change the download weight or the mobile startup story.</p>
<p><strong>Choose Unity WebGL if</strong> you have an existing Unity project to bring to the browser, or your team lives in Unity already. <strong>Look elsewhere if</strong> instant load on mid-range phones is a hard requirement, or you're starting fresh and web-first.</p>
<h2>Where AI-native and in-world creation fits</h2>
<p>Everything above shares one assumption: a developer builds the game at a desk, in an editor, and ships a runtime. That assumption is correct for most projects, and if it describes yours, pick from the four above.</p>
<p>It's worth knowing the assumption is no longer the only option, because a different category is emerging. We build Cinevva, which is a WebGPU-only world platform where games are created from inside the world. Instead of opening an editor, you're an avatar standing in the space, and you describe what you want, and an AI builder turns it into terrain, objects, and behavior while you stand there. Creation and play are the same session. Under the hood that meant going WebGPU-only with compute-shader terrain, writing a custom character solver instead of a general physics engine, and building an animation and retargeting system, which we wrote about in <a href="/blog/2026-06-08-why-we-built-our-own-webgpu-engine">why we built our own WebGPU engine</a>.</p>
<p>This isn't a replacement for PlayCanvas or Babylon. If you're a developer building a specific game, those are the right tools. Cinevva is for the different goal of letting people who aren't engine developers make and share playable spaces by describing them. We mention it here because &quot;which web game engine should I use&quot; increasingly has a fifth answer that isn't an engine at all.</p>
<h2>The full feature matrix</h2>
<p>The quick table up top is the headline. This is the detailed version, grouped by subsystem. A few notes on how to read it. &quot;BYO&quot; means bring your own, which is to say the engine doesn't ship it but the ecosystem or your own code can add it. This matters most for Three.js, which is a rendering library by design, so &quot;BYO&quot; there is part of the philosophy rather than a gap. &quot;Export-only&quot; for Unity means the capability exists in the desktop editor and rides along into the WebGL build rather than being web-native. Competitor cells reflect out-of-the-box capability and well-documented behavior as of September 2026. Cinevva cells reflect what runs in our shipped build, with &quot;planned&quot; marking what's designed but not yet built.</p>
<h3>Rendering</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Primary renderer</td>
<td>WebGPU only</td>
<td>WebGL2 (WebGPU beta)</td>
<td>WebGL2 (WebGPU growing)</td>
<td>WebGL2 (WebGPU advanced)</td>
<td>WebGL2 (WebGPU supported since 6.6, opt-in)</td>
</tr>
<tr>
<td>Compute shaders in production</td>
<td>Yes (core dependency)</td>
<td>Beta</td>
<td>Via WebGPU</td>
<td>Yes (WebGPU)</td>
<td>Yes (WebGPU, Unity 6.6+)</td>
</tr>
<tr>
<td>Shader authoring</td>
<td>TSL nodes + compute</td>
<td>Shader chunks / GLSL</td>
<td>GLSL + node (TSL)</td>
<td>Node material / GLSL / WGSL</td>
<td>ShaderLab / HLSL</td>
</tr>
<tr>
<td>Clustered / forward+ lighting</td>
<td>Yes (froxel)</td>
<td>Yes</td>
<td>BYO</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Volumetric clouds and weather</td>
<td>Yes</td>
<td>BYO</td>
<td>BYO</td>
<td>Partial</td>
<td>BYO</td>
</tr>
<tr>
<td>3D Gaussian splatting tooling</td>
<td>Planned</td>
<td>Yes (SuperSplat, leading)</td>
<td>Community</td>
<td>Yes</td>
<td>Plugins</td>
</tr>
</tbody>
</table>
<h3>World and terrain</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Built-in large-world streaming</td>
<td>Yes (64m chunks)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
<td>Export-only</td>
</tr>
<tr>
<td>Terrain system</td>
<td>Hybrid heightmap + marching-cubes/SDF</td>
<td>BYO</td>
<td>BYO</td>
<td>Extension</td>
<td>Built-in (desktop)</td>
</tr>
<tr>
<td>Runtime terrain sculpting</td>
<td>Yes (GPU)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
<td>No (edit-time)</td>
</tr>
<tr>
<td>Caves and overhangs (true 3D topology)</td>
<td>Yes (marching cubes)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
</tr>
<tr>
<td>GPU-instanced foliage and grass</td>
<td>Yes</td>
<td>Yes</td>
<td>BYO</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<h3>Physics and character</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Physics engine</td>
<td>Custom kinematic solver</td>
<td>Ammo integration</td>
<td>BYO (Rapier/Cannon/Ammo)</td>
<td>Havok built-in</td>
<td>PhysX built-in</td>
</tr>
<tr>
<td>Rigid-body dynamics</td>
<td>No (by design)</td>
<td>Yes</td>
<td>BYO</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Character controller</td>
<td>Yes (multi-mode FSM)</td>
<td>Templates / Ammo</td>
<td>BYO</td>
<td>Yes</td>
<td>Built-in</td>
</tr>
<tr>
<td>Terrain-integrated collision (SDF)</td>
<td>Yes</td>
<td>No</td>
<td>BYO</td>
<td>No</td>
<td>No</td>
</tr>
</tbody>
</table>
<h3>Animation</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Skeletal animation</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Blend / state machine</td>
<td>Yes (resolver FSM)</td>
<td>Yes (anim state graph)</td>
<td>Mixer (BYO blending)</td>
<td>Yes</td>
<td>Yes (Mecanim)</td>
</tr>
<tr>
<td>Skeleton retargeting</td>
<td>Yes (pipeline)</td>
<td>Limited</td>
<td>Community</td>
<td>Partial</td>
<td>Yes (humanoid)</td>
</tr>
<tr>
<td>Inverse kinematics</td>
<td>Planned</td>
<td>Limited</td>
<td>Community</td>
<td>Yes</td>
<td>Yes</td>
</tr>
</tbody>
</table>
<h3>Multiplayer and backend</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Built-in multiplayer</td>
<td>Yes (edge-authoritative)</td>
<td>BYO (Photon/Colyseus)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO (Netcode, not web-native)</td>
</tr>
<tr>
<td>Persistent shared world</td>
<td>Yes (Durable Objects per chunk)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
</tr>
<tr>
<td>Spatial voice chat</td>
<td>Yes (WebRTC + HRTF)</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
<td>BYO</td>
</tr>
</tbody>
</table>
<h3>Creation and authoring</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Editor</td>
<td>In-world, immersive</td>
<td>Hosted desktop-style (commercial)</td>
<td>None (minimal)</td>
<td>Web-based (free)</td>
<td>Desktop (commercial)</td>
</tr>
<tr>
<td>In-world embodied creation</td>
<td>Yes</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Natural-language / AI creation</td>
<td>Yes (AI builder)</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Scripting</td>
<td>Natural language + JS</td>
<td>TypeScript / JS</td>
<td>JavaScript</td>
<td>TypeScript / JS</td>
<td>C#</td>
</tr>
</tbody>
</table>
<h3>Assets and distribution</h3>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Cinevva</th>
<th>PlayCanvas</th>
<th>Three.js</th>
<th>Babylon.js</th>
<th>Unity WebGL</th>
</tr>
</thead>
<tbody>
<tr>
<td>Server-side asset pipeline</td>
<td>Yes (GLB + LOD + KTX2 + Draco)</td>
<td>Yes (GLB)</td>
<td>Loaders only</td>
<td>Import tools</td>
<td>Yes</td>
</tr>
<tr>
<td>Built-in AI asset generation</td>
<td>Yes (3D, image, audio, music)</td>
<td>No</td>
<td>No</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Federated asset search</td>
<td>Yes (eleven providers)</td>
<td>Asset store</td>
<td>No</td>
<td>No</td>
<td>Asset store</td>
</tr>
<tr>
<td>Runs in browser, no install</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes (heavy)</td>
</tr>
<tr>
<td>Engine license</td>
<td>Proprietary platform</td>
<td>Engine MIT, editor proprietary</td>
<td>MIT</td>
<td>Apache 2.0</td>
<td>Proprietary</td>
</tr>
</tbody>
</table>
<p>The pattern in the matrix matters more than any cell. The general-purpose engines spread their strength horizontally, they each do most things competently and leave the world, the backend, and the creation flow to you. Cinevva concentrates vertically, it does fewer things but owns the whole path from the renderer to a shared world you create from inside. Neither shape is better in the abstract. They answer different questions.</p>
<h2>How to choose</h2>
<p>Match the tool to the situation rather than to a feature checklist.</p>
<p>If you already have a Unity game, export it with Unity WebGL and accept the weight. If you're a studio that wants an editor-driven workflow for browser games, use PlayCanvas. If you want a complete free engine with physics included, use Babylon.js. If you want total control and you have the team to build on a bare renderer, use Three.js. And if your goal isn't to build one game but to let people create and play inside a shared world by describing things, that's the category we work in, and you can <a href="/">try Cinevva</a>.</p>
<p>Whatever you pick, do the evaluation with real spikes before you commit. Each of these can carry a real game, and the cost of switching halfway is the months you didn't spend shipping.</p>
<h2>Common Questions</h2>
<h3>PlayCanvas vs Babylon.js: which should I pick?</h3>
<p>Pick PlayCanvas if you want a hosted, Unity-style editor and asset pipeline and you're fine with the editor being a commercial product (free for public projects, paid for private ones). Pick Babylon.js if you want everything free and open (Apache 2.0), Havok physics built in, and the most advanced WebGPU rendering of the two. Both engines are MIT or Apache licensed and both run WebGL2 with WebGPU on top. Our <a href="/guides/web-game-engines-comparison">web game engines comparison</a> scores them on build size and load time, and <a href="/guides/threejs-vs-babylonjs">Three.js vs Babylon.js</a> covers the library-versus-engine side.</p>
<h3>PlayCanvas vs Unity for web games?</h3>
<p>For a web-first game, PlayCanvas: its runtime is 1 to 2 MB against Unity's 8 MB-plus empty build, it starts faster on phones, and its editor already runs in the browser. Unity wins when you have an existing Unity project or a C# team, and Unity 6.6 narrowed the rendering gap by making WebGPU a supported web target. Reviews of the two tend to land the same way: PlayCanvas for browser-native delivery, Unity for its ecosystem. See <a href="/guides/unity-godot-playcanvas-web">Unity vs Godot vs PlayCanvas for the web</a> for the three-way version.</p>
<h3>Three.js vs Unity for browser games?</h3>
<p>They're different kinds of tools. Three.js is a 150 KB MIT-licensed rendering library, so you get the smallest builds and total control but you build the game systems yourself (or use an engine built on it, like Cinevva). Unity is a full engine exported to the browser, so you get physics, animation, and an editor out of the box at the cost of a heavy download and slower mobile startup. Start from Three.js if the game is web-first and you have engineers. Start from Unity if the game already exists in Unity. The <a href="/guides/web-game-engines-comparison">full comparison guide</a> has the numbers.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why we built our own WebGPU engine instead of forking PlayCanvas]]></title>
            <link>https://app.cinevva.com/blog/2026-06-08-why-we-built-our-own-webgpu-engine</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-06-08-why-we-built-our-own-webgpu-engine</guid>
            <pubDate>Mon, 08 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Three.js, Babylon.js, PlayCanvas, Unity WebGL: we evaluated all of them before writing our own renderer. Here's what each one is good at, the four decisions that pushed us off the shelf, and the cases where you should absolutely not do what we did.]]></description>
            <content:encoded><![CDATA[<h1>Why we built our own WebGPU engine instead of forking PlayCanvas</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/why-webgpu-engine-hero.jpg" alt="A stylized low-poly world rendered by Cinevva's WebGPU engine: rolling hills, a cave carved into a cliff, a winding river, and an avatar mid-stride on a path at golden hour" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Every technical person who looks at Cinevva World asks the same thing within five minutes. You're a small team. Mature web 3D engines exist. Why did you write your own renderer, your own character physics, your own animation system, instead of standing on PlayCanvas or Babylon and shipping faster?</p>
<p>It's a fair question, and &quot;not invented here&quot; is the wrong answer to it. We did the homework. We ran the existing engines, read their source, and shipped spikes on top of two of them before deciding. This post is the reasoning behind that decision: what the off-the-shelf options are genuinely good at, the four places our needs diverged hard enough to justify building, and the situations where you should pick one of them over copying us. We documented the build itself in a long-running <a href="/blog/2026-02-25-open-world-browser-series-guide">open-world-in-the-browser engineering series</a>, so where a claim below has a working log behind it, I'll link to it.</p>
<h2>The options we actually evaluated</h2>
<p>Four things get called &quot;web game engines,&quot; and they aren't the same kind of thing.</p>
<p><strong>Three.js</strong> is a rendering library rather than a game engine. It gives you a scene graph, materials, loaders, and a renderer, and then it gets out of your way. It has no editor, physics, entity system or opinion about how your game is structured, which is both the appeal and the cost. You build everything above the renderer yourself, but nothing fights you. It's MIT-licensed, it has the largest ecosystem in the space, and when you hit an obscure shader bug at 2am there's a forum answer waiting.</p>
<p><strong>Babylon.js</strong> is a full engine with a scene graph, a physics integration (Havok), an asset pipeline, and a web editor. It's MIT-licensed, backed by a team at Microsoft, and its WebGPU work has been moving quickly. If you want batteries included and you're happy living inside the engine's structure, it's a strong default.</p>
<p><strong>PlayCanvas</strong> is the closest thing to a &quot;Unity for the web.&quot; As of this writing the engine is at v2.19.6, released June 5, 2026, and the engine itself is open source under MIT. The thing most people actually use, though, is the hosted visual editor, and that editor is a commercial product and isn't open source. PlayCanvas uses an entity-component system, you script in TypeScript or JavaScript, assets flow through a server-side GLB pipeline, and real commercial games have shipped on it (Snap runs production work on PlayCanvas, for one). Its renderer runs WebGL2 with a WebGPU path that is still maturing rather than the default. That last detail matters more than it sounds, and I'll come back to it.</p>
<p><strong>Unity WebGL</strong> is an export target rather than a web engine. You build in the Unity desktop editor and compile to a WebGL bundle. It's the right tool when you already have a Unity game and want it in a browser, and the wrong tool when &quot;loads instantly in a tab on a mid-range phone&quot; is a hard requirement, because the runtime and download weight come along for the ride.</p>
<p>Any of these is a reasonable foundation for a normal web game. We didn't have a normal web game.</p>
<h2>Decision one: WebGPU is our floor, not our finish line</h2>
<p>The split that pushes us off every shelf is this. For us, WebGPU is a requirement rather than a feature we'll grow into.</p>
<p>Our terrain is a hybrid of a streamed heightmap field and marching-cubes chunks backed by a signed-distance field, so the world can have real caves and overhangs, and creators can sculpt it live. The sculpt brushes, the foliage scatter, and the terrain meshing all run as compute shaders. Without compute the world doesn't run at all.</p>
<p>That's the opposite of where the general-purpose engines sit today. Their WebGPU support is designed as progressive enhancement on top of a WebGL2-first renderer, with a fallback path for browsers that lack it. PlayCanvas in particular is WebGL2-first with WebGPU still in beta. That's the correct call for them, because their job is to run the widest possible matrix of games on the widest possible matrix of devices. Our job is narrower and deeper, so we made the opposite call: we went WebGPU-only at spike 13 and never looked back. Browsers without WebGPU aren't downgraded, they're unsupported, and we track that as a reach number instead of pretending a WebGL2 fallback is one config flag away. It isn't. It would be a partial rewrite of our terrain and foliage stages.</p>
<p>Building on a WebGL2-first engine would have meant either fighting its fallback assumptions on every compute feature, or maintaining two rendering paths forever. Owning the renderer let us treat compute as the baseline.</p>
<h2>Decision two: a character solver, not a physics engine</h2>
<p>The textbook move is to drop in a physics engine. We tried it. An early spike validated Rapier running in a worker, and it felt fine.</p>
<p>We wrote our own anyway, and there's no Rapier, Cannon, or Ammo anywhere in the shipped build. The reason is scope. We don't need rigid bodies, joints, ragdolls, or a constraint solver. We need one capsule to move correctly against terrain, and we need walking, sliding, gliding, climbing, and swimming to agree on a single shared answer to &quot;am I grounded, on what surface, at what angle.&quot; A general physics engine makes that harder, not easier, because those modes end up fighting its internal springs and dampers.</p>
<p>So our character controller is a <a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">pluggable multi-channel state machine</a>. Each mode is a small unit that says whether it wants control this frame and, if it wins, writes velocity and facing. They arbitrate by priority across three channels, resource then stance then locomotion, and they all read the same terrain query. Collision is a capsule probe against the heightmap or the signed-distance field depending on the chunk.</p>
<p>The detail I'm proudest of is unglamorous. Ground detection scans every surface in the vertical column beneath your feet and picks the highest one at or below the capsule, instead of trusting the SDF gradient. On the edge of an overhang the nearest surface sideways is the cliff face, so a gradient-based normal flickers between &quot;floor&quot; and &quot;wall&quot; and you get phantom sliding. The column query makes standing on a ledge boring, which is exactly what you want. An off-the-shelf heightfield collider would not have given us that for free, because it can't see our terrain in the first place. The terrain lives on the GPU in our format. No external engine can collide against it without us copying the whole field into its collider format on every edit.</p>
<h2>Decision three: animation that travels across rigs</h2>
<p>Avatars use the Synty POLYGON rig, and our motion clips come from a large open animation library. Because the rig and the clips share bone names, the common case needs no retargeting at runtime, the tracks just bind by name. We wrote up the full character pipeline in <a href="/blog/2026-05-10-open-world-browser-part-25-universal-characters">universal characters</a>.</p>
<p>The interesting work is the case where they don't match. We built a retargeting pass that maps one skeleton onto another, and getting it right meant solving three specific problems. You align bind poses first, because an A-pose against a T-pose adds about thirty degrees per joint. You scale root motion and stride with two separate ratios, hip-to-floor for the vertical and overall proportion for the horizontal. And you test retargeted clips against their source at a fixed sample rate, so regressions show up before a player does. That pipeline is what lets us add new animation sources, and eventually creator-supplied characters, without hand-fixing every clip.</p>
<p>On top of that sits an animation state machine that picks the right clip family each frame from the motion state: jump variant by speed, landing severity by impact, slope direction from the dot of velocity against the terrain gradient, foot-phase-correct stops so you don't moonwalk to a halt, and a hundred-millisecond debounce so bumping a wall doesn't strobe you between walk and fall. None of this is exotic, but it's the kind of thing you only get by owning the layer.</p>
<h2>Decision four: the part no engine ships</h2>
<p>The other three decisions are about how the world runs. This one is about what the product is, and it's why the comparison to PlayCanvas is ultimately a category error.</p>
<p>PlayCanvas, Babylon, Unity, and a hand-rolled Three.js app all assume the same shape: you build your game at a desk, in a 2D editor, looking at the world from outside, and then you hit play and ship a separate runtime. Even their in-engine editing is you-at-a-workstation manipulating a scene you're looking at.</p>
<p>Cinevva World inverts that. You create from inside the world, as an avatar standing in the same space your players will stand in, by describing what you want and watching it appear. Creation and play are one continuous session rather than a build step bridged to a runtime. The closest reference points are Roblox, Rec Room, and Horizon Worlds rather than web 3D engines, and even those keep most creation at a desk. The thing that makes it tractable without a mouse-driven editor is the AI builder, which turns &quot;put a lantern-lit dock here&quot; into geometry and placement.</p>
<p>You can't bolt that onto a general-purpose engine, because it's the premise of the whole stack rather than a rendering feature, from how terrain is editable at runtime to how the network treats every object as something a person standing nearby just made.</p>
<h2>When you should not do what we did</h2>
<p>If you want to ship a browser game this quarter, do not copy us. Use PlayCanvas if you want a Unity-style editor and a managed pipeline. Use Babylon if you want a full engine with physics included and you're happy inside its structure. Use Three.js if you want maximum control and minimum opinion and you have the team to build above it. Port from Unity if you already have a Unity game.</p>
<p>Writing your own renderer, physics, and animation is only the right call when your product's premise is incompatible with the shelf, when the thing you're building is a place that happens to be made of an engine rather than a game on one. That was true for us. It probably isn't true for you, and that's fine. The point of doing the evaluation is knowing which case you're in before you write the first line.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An empty world is a sad world: what every creator platform that lived or died can teach us]]></title>
            <link>https://app.cinevva.com/blog/2026-06-06-how-creator-worlds-live-or-die</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-06-06-how-creator-worlds-live-or-die</guid>
            <pubDate>Sat, 06 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We built an AI that constructs whole buildings in a shared 3D world from a sentence. Before we open it to everyone, we studied the launches of every comparable platform we could find. The graveyard is enormous, the survivors are few, and the line between them is sharper than the hype ever admits. Here are the stories, the numbers, and what we're doing differently.]]></description>
            <content:encoded><![CDATA[<h1>An empty world is a sad world: what every creator platform that lived or died can teach us</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<figure style="margin:1.5rem 0">
<img src="/img/blog/ai-builder-hero.webp" alt="Cinevva's AI Builder constructing a two-story house from a chat prompt" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Our AI Builder. Someone typed "build a second floor" and the AI laid the floor deck, raised the walls, and offered stairs and a roof next, all inside a world other people can walk into.</figcaption>
</figure>
<p>We can generate worlds now, and I don't mean in a demo reel. The picture above is our editor. Someone typed &quot;build a second floor&quot; into a chat box and watched the AI lay the floor deck, raise the front, side, and back walls, and offer to keep going with stairs and a roof. Not props, not textures, whole structures, dropped into a world other people can walk into. Our pipeline already makes the parts too: 3D models, music, sound, materials.</p>
<p>So we're close to opening Cinevva World to the public. And before we do, I went and read the obituaries.</p>
<p>The history of shared creative worlds is mostly a history of failures, and we're building one. For fifteen years, very smart, very well-funded teams have tried to make shared creative worlds work. A few became some of the largest things humanity has ever built. Most are dead. The gap between the two outcomes isn't talent or money, because some of the dead had more of both than we'll ever have. The gap is a small number of decisions that almost nobody gets right on the first try. This is what I found.</p>
<h2>The graveyard</h2>
<p>Start with the failures, because they leave better records. Winners rewrite their history into a clean narrative and losers leak memos.</p>
<h3>Meta Horizon Worlds: the most expensive empty room ever built</h3>
<p>Meta spent tens of billions on its metaverse bet. Reality Labs posted a <a href="https://www.cnbc.com/2026/03/18/meta-horizon-worlds-metaverse-vr.html">$6.02 billion operating loss in a single quarter</a> reported in early 2026, and it had been bleeding multiple billions per quarter for years. The flagship was Horizon Worlds. Here is what that money bought.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/mNbz7-ejnZw" title="Horizon Worlds - Official Trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Meta's Horizon Worlds, official trailer. The platform Meta spent billions on drops VR support in June 2026 to survive as a mobile app.</figcaption>
</figure>
<p>A leaked internal memo, reported by <a href="https://fortune.com/2022/10/07/metas-horizon-world-quality-poor-not-even-employees-using-says-metaverse-vp-leaked-memo/amp/">Fortune</a> and <a href="https://ryanschultz.com/2022/10/07/leaked-internal-memos-from-meta-detail-problems-with-horizon-worlds-and-horizon-workrooms/">Ryan Schultz</a>, revealed that only about 9 percent of the worlds creators built were ever visited by 50 or more people. The vast majority got zero visits beyond their own maker. One memo summed up the engagement problem in a sentence that should be tattooed on every founder in this space: <a href="https://kotaku.com/meta-facebook-horizon-worlds-vr-mark-zuckerberg-1849669048">&quot;an empty world is a sad world.&quot;</a> Researchers wanting to survey active users could find only 514 of them, because the player base was that small.</p>
<p>The retention numbers were worse. Leaked data showed <a href="https://mixed-news.com/en/horizon-worlds-leak-only-1-in-10-users-return-web-launch-coming/">only about 1 in 10 users returned</a> after their first month. Meta cut its own 2022 target from 500,000 monthly users down to 200,000, and even then the platform had fewer concurrent users than VRChat and fewer than Second Life, a game from 2003. Internal dogfooding dashboards showed that Meta's own employees weren't using it, which pushed management to start holding managers accountable for weekly logins. A VP put the team into a &quot;quality lockdown&quot; for the rest of the year and admitted, in writing, that they were working on a product that had not found product-market fit.</p>
<p>In March 2026, Meta <a href="https://www.cnbc.com/2026/03/18/meta-horizon-worlds-metaverse-vr.html">announced it was killing VR support entirely</a> and turning Horizon Worlds into an almost-exclusively mobile app, an entry point for people without headsets, functioning, in their own framing, like Roblox. The most expensive metaverse ever built ended its life trying to become the thing it should have been on day one.</p>
<p>The lesson isn't &quot;VR was too early,&quot; though it was. The lesson is that no amount of capital fills an empty world. Content density is not something you can buy with a marketing budget. If the worlds are empty, people leave, and when people leave, the worlds stay empty. That loop ate Meta alive.</p>
<h3>Decentraland and The Sandbox: the billion-dollar ghost towns</h3>
<p>In October 2022, a single data point set the crypto world on fire. <a href="https://www.coindesk.com/web3/2022/10/07/its-lonely-in-the-metaverse-decentralands-38-daily-active-users-in-a-13b-ecosystem">DappRadar reported</a> that Decentraland had 38 daily active users. The Sandbox had 522. Each of these projects carried a market capitalization around $1.3 billion at the time.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/Zg5vcdEeLOA" title="The Sandbox Official Teaser" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">The Sandbox, official teaser. It and Decentraland each carried valuations around $1.3 billion while their daily users numbered in the hundreds to low thousands.</figcaption>
</figure>
<p>Now, the projects pushed back, and the nuance actually matters more than the dunk. The 38 figure counted only unique wallets making on-chain transactions in a day, what DappRadar calls &quot;payers,&quot; not people who logged in and walked around without touching the blockchain. Decentraland countered that it had <a href="https://blockworks.com/news/metaverse-platforms-set-the-record-straight-about-daily-active-users">56,697 monthly logged-in users</a> and roughly 8,000 daily, by other estimates. The Sandbox claimed 39,000 daily during an alpha season with a day-14 retention of 40 percent.</p>
<p>But sit with the gap for a second, because it's the most important number in this whole essay. Even taking the charitable figures, you have billion-dollar valuations sitting on top of, at best, a few thousand daily users. For comparison, the research turned up that non-blockchain Roblox had <a href="https://blockworks.com/news/metaverse-platforms-set-the-record-straight-about-daily-active-users">52 million daily active users but only 11.3 million monthly paying users</a> in the same period. Most people in free virtual worlds transact rarely or never. That cuts both ways. It means the 38-DAU dunk was unfair, and it means the billion-dollar valuation was a fantasy. Both things measured the wrong number. The valuation measured token speculation. The dunk measured wallet transactions. Neither measured whether anyone was having fun.</p>
<p>That is the vanity-metric trap in its purest form. Registered accounts, token market cap, total addressable market, press impressions: none of them tell you if your world is alive. The only numbers that do are how many people come back, and whether the people who make things keep making things.</p>
<h3>Dreams: the most beautiful tool nobody could stay in</h3>
<p>Media Molecule, the studio behind LittleBigPlanet, spent the better part of a decade building Dreams, a creation tool so deep that people made playable games, animated short films, and music albums inside it. Critics adored it. And in <a href="https://www.pushsquare.com/news/2023/07/dreams-live-service-ending-as-media-molecule-couldnt-find-a-sustainable-path">September 2023, the studio ended live service</a>, saying plainly that they could not find a sustainable business model.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/2ltgkcoQzow" title="Dreams | Release Date Trailer | PS4" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Dreams, by Media Molecule. A creation tool people adored, whose live service ended in 2023 with no way for creators to earn a cent.</figcaption>
</figure>
<p>The postmortem is a checklist of self-inflicted wounds, and I say that with enormous respect, because we could make every one of them. Dreams <a href="https://www.pushsquare.com/news/2023/07/dreams-live-service-ending-as-media-molecule-couldnt-find-a-sustainable-path">never let creators monetize their work</a>. The promised in-game store never shipped. There were no cosmetics and no battle pass. Serious creators, the kind who turn a tool into a platform, had no reason to invest years when there was no upside. It launched PS4-only, with no PC version and no native PS5 build at launch, which capped its possible audience hard. And the co-founder <a href="https://icon-era.com/threads/media-molecule-co-founders-biggest-regret-with-dreams-was-not-focusing-on-multiplayer-understands-new-ip-is-more-of-a-game-than-a-creative-tool.11724/">Mark Healey later said his biggest regret was not focusing on multiplayer</a>, and that the team came to understand their creation worked better as a game than as a creative tool.</p>
<p>Read that last part again. The most talented UGC studio on earth concluded, after the fact, that the thing should have been a game first and a tool second. That is the single most important sentence in this entire study, and we'll come back to it.</p>
<h3>The rest of the cemetery</h3>
<p>The pattern repeats with grim consistency.</p>
<p><a href="https://www.gamedeveloper.com/business/crayta-to-shut-down-after-launch-platform-stadia-bites-the-dust">Crayta</a>, a collaborative UGC creation platform, shut down in March 2023 and users lost everything they'd made. Its developer was acquired by Meta in 2021 and the platform still got killed. The proximate cause: it launched on Google Stadia, and when Stadia died, Crayta died with it. Platform dependency is a loaded gun pointed at your own head.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/lived-or-died-crayta.webp" alt="Crayta, the collaborative game-creation platform" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Crayta launched on Google Stadia. When Stadia shut down in 2023, Crayta went with it, and creators lost everything they'd made. Trailer still.</figcaption>
</figure>
<p>Project Spark, Microsoft's UGC game-maker, shut down years earlier on the same arc: a powerful tool that too few people stayed with. Sansar, Linden Lab's VR successor to Second Life, was sold off after failing to find an audience. High Fidelity, the second metaverse company from Second Life's own founder Philip Rosedale, pivoted away from virtual worlds entirely.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/lived-or-died-secondlife.webp" alt="Second Life, Linden Lab's user-created virtual world" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Second Life, Linden Lab's 2003 world, is still running after more than two decades. Its own VR successors, Sansar and Philip Rosedale's High Fidelity, both failed. Trailer still.</figcaption>
</figure>
<p>And in a signal you can't ignore because it's happening right now, Rec Room <a href="https://www.uploadvr.com/vrchat-statement-after-rec-room-and-horizon-worlds-fold/">announced it is shutting down effective June 1, 2026</a>, stating it never reached sustained profitability.</p>
<p>Founders of metaverse companies, building metaverses, could not stay in their own metaverses. That should terrify anyone who thinks the hard part is the rendering.</p>
<figure style="margin:1.5rem 0">
<img src="https://cdn.cinevva.com/blog/lived-or-died-recroom.webp" alt="Rec Room, the cross-platform social UGC world" loading="lazy" style="width:100%;border-radius:10px">
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Rec Room, one of the largest social creation worlds, reached over 150 million lifetime players and still shut down on June 1, 2026, never having turned that reach into a sustainable business. Trailer still.</figcaption>
</figure>
<h2>The survivors, and what actually saved them</h2>
<p>Now the living. The instructive thing is that none of them won the way you'd expect, and several won despite breaking rules the failures followed.</p>
<h3>Roblox: the twelve-year overnight success</h3>
<p>Everyone cites Roblox as the model. Almost nobody copies what actually happened, because what actually happened was twelve years of looking like a failure.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/LTnMKjXEnMY" title="ROBLOX - Game Trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Roblox. It drew about 100 people in 2006 and took twelve years to reach exponential growth, all on the back of letting the community build the games.</figcaption>
</figure>
<p>Roblox's 2006 beta drew <a href="https://www.howtheygrow.co/p/how-roblox-grows">around 100 tech enthusiasts with a peak concurrency of 30 to 40 people</a>. It then ground forward for over a decade. It went from 9 million users in early 2016 to 90 million in 2019 to 214 million by 2023. Founder David Baszucki refused to pivot off the user-generated-content vision even when Minecraft exploded past him in 2009. He treated it as a deliberate slow bake, and the one move that mattered was the decision to let the community build all the games rather than building them in-house. That removed content cost and turned every creator into a growth engine.</p>
<p>But here is the part the cargo-culters miss, and it's why I keep a second source open. Matthew Ball's <a href="https://www.matthewball.co/all/roblox2024">2024 teardown</a> shows Roblox operating at a brutal loss even at massive scale, a roughly negative-38-percent operating margin, with only 6 percent of users buying its currency in a given month and revenue per user a fraction of console platforms. Roblox is the biggest game in the world and it still struggles to make money. The flywheel is real and the economics are hard. Anyone who tells you a creator platform is a license to print money is selling you something.</p>
<p>The deeper lesson, though, is hiding in plain sight in those user numbers. The overwhelming majority of Roblox's hundreds of millions of users never build anything. They show up to <em>play</em> a catalog of tens of millions of games other people made. That catalog took a decade and a developer-payout economy to grow. Roblox is a place to play that a small fraction of people happen to build, rather than a building tool that people happen to play. That ordering matters more than anything else in this post.</p>
<h3>Minecraft: the world that could not be empty</h3>
<p>Minecraft never had the empty-world problem, and understanding why explains most of what follows.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/MmB9b5njVbA" title="Official Minecraft Trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Minecraft, official trailer. Procedural survival meant the world was never empty and never needed user content to be worth playing.</figcaption>
</figure>
<p>Minecraft shipped as a survival game with procedural generation. The world builds itself, infinitely, and on minute one you are not staring at a blank canvas wondering what to do. Night is falling and something is going to kill you, so you dig. The game is fun for one person with zero other users and zero user-generated content, forever, because the procedural generator is an inexhaustible content machine. The mods, the servers, the custom maps, the entire creative ecosystem, all of that grew <em>on top of</em> a game that already sold itself. Creative mode came after millions were already hooked on survival. Word of mouth and YouTube did the rest.</p>
<p>Minecraft solved cold-start by never having one. That is the cheat code, and we'll steal it.</p>
<h3>Browser games: distribution as the entire moat</h3>
<p>Then there's the genre that's closest to our actual delivery mechanism, the no-download browser game.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/oznO3GGzu2s" title="Krunker.io trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Krunker, a browser FPS in the .io tradition. The genre's whole moat is distribution, a link that loads a full game with no download.</figcaption>
</figure>
<p><a href="https://news.viverse.com/post/what-are-io-games">Agar.io reached roughly 5 million daily players within weeks</a> of its 2015 launch. <a href="http://Slither.io">Slither.io</a> racked up 68 million mobile downloads and 67 million browser plays. The research is blunt about why: <a href="https://news.viverse.com/post/what-are-io-games">&quot;the competitive moat for the .io genre is distribution itself, not the game mechanic.&quot;</a> You click a link and you're playing, with no install, no account and no app store. <a href="https://medium.com/the-megacool-blog/9-growth-hacks-from-viral-hit-game-agar-io-7d8f71f70a0c">Agar.io's onboarding was one click</a>: type a name, hit play, you're in. It spread through chat apps the way video spreads on TikTok.</p>
<p>The same property cuts the other way. No download means no commitment. The same frictionlessness that gets someone in gets them out, because closing a tab costs nothing. Browser virality is real, and it's also shallow by default. The .io games survived it by being instantly, obviously fun in the first ten seconds. The browser worlds that died were frictionless to enter and gave you no reason to stay once you arrived.</p>
<h3>Among Us, Figma, Townscaper, VRChat: four more ways to win</h3>
<p>Four quick ones, because each isolates a different lever.</p>
<p><a href="https://www.esports.net/news/how-among-us-blew-up-online-two-years-after-release/">Among Us</a> launched in 2018 and was a commercial nothing for two years. The developers nearly abandoned it. Then in September 2020 a <a href="https://howtomarketagame.com/2020/09/14/among-us-the-4-lessons-of-their-viral-success/">ladder of progressively bigger streamers</a> discovered it, culminating in a multi-hour Sodapoppin stream, and it became a global phenomenon. The early oxygen came from an <a href="http://itch.io">itch.io</a> front-page feature and a Korean audience that became half its sales. The lesson is that the breakout can come years after launch, from a channel you didn't plan, if you survive long enough to be discovered.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/NSJ4cESNQfE" title="Among Us Steam Release Trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Among Us. It sat near-unnoticed for two years before a ladder of streamers turned it into a global phenomenon in 2020.</figcaption>
</figure>
<p><a href="https://review.firstround.com/the-5-phases-of-figmas-community-led-growth-from-stealth-to-enterprise/">Figma</a> stayed in stealth for about three years, launched free, and waited two more years before charging. Its activation moment was multiplayer: the instant a designer felt someone else editing the same file. Figma's free tier originally limited you to 2 collaborators, which strangled the exact magic moment that sold the product, and they fixed it by making collaborators unlimited so people could feel it. They seeded the community by targeting design influencers on Twitter directly. The lesson is to find your aha moment, then remove every obstacle between a new user and it.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/n5gJgkO2Dg0" title="Figma product launch keynote" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Figma. Its activation moment was multiplayer, so it scrapped the free-tier collaborator limit that was blocking the very magic that sold it.</figcaption>
</figure>
<p><a href="https://www.gamedeveloper.com/game-platforms/how-townscaper-works-a-story-four-games-in-the-making">Townscaper</a> was a tiny creative toy that became a hit on the strength of screenshots. Its developer watched his Twitter following jump from around 20,000 to 90,000 just by posting clips during development, and read that as the early signal it would do well. The lesson is that if people share your thing unprompted before you've even launched, that's the strongest validation you can get.</p>
<figure style="margin:1.5rem 0">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px">
<iframe src="https://www.youtube-nocookie.com/embed/hqq25n6cQqo" title="Townscaper Launch Trailer" loading="lazy" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%"></iframe>
</div>
<figcaption style="color:#9aa7b4;font-size:0.85rem;margin-top:0.5rem">Townscaper, launch trailer. A creative toy with no goals that spread on the strength of screenshots people shared unprompted.</figcaption>
</figure>
<p>And <a href="https://www.uploadvr.com/vrchat-statement-after-rec-room-and-horizon-worlds-fold/">VRChat</a>, in the same months that Meta's billions and Rec Room both folded, hit a record of nearly 160,000 concurrent users. It is community-driven, creator-driven, and not remotely as well funded as the things that died around it. VRChat credits its survival to community loyalty and creativity over capital. Lesson, stated by the survivor itself: engaged creator passion outlasts money.</p>
<h2>What actually separates the living from the dead</h2>
<p>Lay the stories side by side and the pattern is not subtle.</p>
<table>
<thead>
<tr>
<th>Platform</th>
<th>What it bet on</th>
<th>Where it ended up</th>
<th>The lesson</th>
</tr>
</thead>
<tbody>
<tr>
<td>Minecraft</td>
<td>Procedural survival, fun for one player</td>
<td>Best-selling game ever, 350M+ copies</td>
<td>Never have an empty world</td>
</tr>
<tr>
<td>Roblox</td>
<td>Community-built games plus creator payouts</td>
<td>80M+ daily users over twelve years</td>
<td>Be a place to play first, a tool second</td>
</tr>
<tr>
<td>.io games</td>
<td>One-click, no-download browser play</td>
<td>Millions of players in weeks</td>
<td>Distribution is the moat, commitment is shallow</td>
</tr>
<tr>
<td>Figma</td>
<td>Free tier, real-time multiplayer</td>
<td>A ~$20B acquisition offer</td>
<td>Clear every barrier to the aha moment</td>
</tr>
<tr>
<td>Among Us</td>
<td>A cheap social game, and patience</td>
<td>3.8M concurrent, two years late</td>
<td>Survive long enough to be found</td>
</tr>
<tr>
<td>Townscaper</td>
<td>A beautiful toy worth screenshotting</td>
<td>~380K sales, organic spread</td>
<td>Unprompted sharing is the realest signal</td>
</tr>
<tr>
<td>VRChat</td>
<td>Community and creator energy</td>
<td>~160K concurrent in 2026</td>
<td>Passion outlasts capital</td>
</tr>
<tr>
<td>Horizon Worlds</td>
<td>Billions in capital, VR-first</td>
<td>VR shut down 2026, ~1 in 10 returned</td>
<td>Money cannot fill an empty world</td>
</tr>
<tr>
<td>Decentraland / Sandbox</td>
<td>A token economy before a game</td>
<td>~$1.3B valuations, hundreds of daily users</td>
<td>A valuation is not an audience</td>
</tr>
<tr>
<td>Dreams</td>
<td>A deep tool, no economy, no multiplayer</td>
<td>Live service ended 2023</td>
<td>Pay creators, ship multiplayer, be a game</td>
</tr>
<tr>
<td>Crayta</td>
<td>A UGC platform living on Stadia</td>
<td>Shut down with Stadia, 2023</td>
<td>Never build on a platform that can evict you</td>
</tr>
<tr>
<td>Project Spark / Sansar</td>
<td>Powerful tools, no reason to return</td>
<td>Shut down or pivoted away</td>
<td>A tool without a game has no daily habit</td>
</tr>
</tbody>
</table>
<p>The thing that kills creative worlds is the empty room. Horizon Worlds, Decentraland, Dreams, Crayta, Project Spark, Sansar, all died the same death: not enough people, not enough content, not enough reason to come back, in a loop that feeds on itself. The cold-start problem is the hardest part of the whole endeavour.</p>
<p>The thing that saves them is having a reason to exist before the crowd shows up. Minecraft had procedural survival. Roblox had a decade of patiently seeded games. The .io games had ten-second fun. Every survivor was worth your time with an empty catalog. Every casualty was a beautiful container waiting for other people to make it worth visiting. This is the Dreams confession made general: build a game first and a platform second. The platform is the second act. You earn it by first being something people use for its own sake.</p>
<p>The metrics that predict survival aren't the ones in the press release. The research is consistent here. The defining signal of product-market fit is that your <a href="https://newsletter.pmcurve.com/p/retention-masterclass">retention curve flattens</a>: some cohort of people keeps coming back forever. A curve that declines to zero means no fit, no matter how big the top of the funnel. Rough industry benchmarks are <a href="https://solsten.io/blog/d1-d7-d30-retention-in-gaming">40 percent day-1, 20 percent day-7, 10 percent day-30</a> retention, with day-30 being the one that predicts long-term health. And for anything with a creator side, the supply side is where you die: <a href="https://forkoff.xyz/blog/founder-growth/two-sided-marketplace-cold-start-2026">about 67 percent of failed marketplaces collapse on the supply side</a> rather than demand. Creator retention is the vital sign, and registered accounts and valuations are vanity metrics.</p>
<p>A few more that fall out of the stories. Monetize your creators or lose them, because Dreams proved that talented people will not invest years for no upside. Multiplayer is usually the point, not a feature, per Media Molecule's own regret. Never build your house on a platform that can evict you, per Crayta. And no-download is a double-edged sword: it is the best acquisition channel in existence and the weakest commitment device, so the burden falls entirely on the first sixty seconds being good.</p>
<h2>The trap underneath all of it</h2>
<p>There's one more layer, and it's the one specific to our moment, because we have a tool the dead never had. We can generate worlds with AI. Which raises a paradox I've gone back and forth on for weeks.</p>
<p>If it's AI, every world could be unique, generated fresh for each person and tuned to them. But if each person's world is unique, nobody ever bumps into anyone else, since a shared moment requires a shared place. And if the world has to be shared anyway, the case for AI over handcrafting one beautiful place, the way a real studio would, gets weaker.</p>
<p>Each of those pulls, followed to its end, lands on something that doesn't work. A world generated just for you is a world with nobody in it. Google's Genie can spin up a playable environment from a sentence and it vanishes a minute later, single-player, with no memory and no neighbors. That's the lonely dead end. But handcrafting one fixed world is also a dead end: it's a hundred-person, multi-year job to fill two square kilometers by hand, and when you're done it's frozen, the same on your hundredth visit as your first, unable to grow as people arrive.</p>
<p>The way out is to stop treating &quot;the world&quot; as one thing. It's three layers, and uniqueness and sharedness can live in different ones without fighting. The ground everyone stands on is one shared world, curated to a high bar, the meeting place. What you bring to it, your AI-generated assets, the building you made, is wildly unique, and you deposit it <em>into</em> the shared world so your uniqueness becomes everyone else's discovery. And your path through it, the quests you get, what it points you toward, is personalized for free, because a path is not a place. The false choice was &quot;a personalized world,&quot; which kills multiplayer, versus &quot;a personalized path through a shared world,&quot; which deepens it. We want the second.</p>
<p>So AI's job was never to hand each person a private world. Its job is to make one shared world feel infinite, alive, and personal to move through. The uniqueness comes from everything that accretes in it over time, every creator's one-of-a-kind contribution. Every Minecraft server is unique. Everyone on a given server shares it. Those two facts aren't in tension, and the screenshot at the top of this post, the AI building a house that stays put in a world other people can walk into, shows what that looks like.</p>
<h2>How we're launching Cinevva World</h2>
<p>Here is what all of this turns into for us: five bets, each placed against one of the things that killed the platforms in the first half of this piece. I'll grade each one by how much the evidence backs it.</p>
<p><strong>Bet one, the one I would stake the company on: we launch a game first and a platform second.</strong> It's the most consistent finding in the entire study. Minecraft, Roblox, and Fortnite all led with something fun to <em>do</em> and grew the creator layer on top of it. Media Molecule, the most gifted creation studio alive, concluded after the fact that Dreams should have been a game first. So the first thing a new person does in Cinevva World won't be staring at an empty plot. It'll be a loop with a goal, a reason to be there on a Tuesday when almost no one else is online. Most people who show up will play and never build, and that's the design. It's Roblox's actual shape: hundreds of millions who play, sitting on a thin layer who create. The flywheel is the second act, and we have to earn it. I'm sure of this one because the graveyard already ran the experiment.</p>
<p><strong>Bet two, the one that's a real wager: AI lets us manufacture the supply everyone else died waiting for.</strong> I want to be precise about why this is a bet rather than a guarantee, because no platform in this study was ever bootstrapped with generative AI. I have a mechanism but no proof. The mechanism: roughly two thirds of two-sided platforms die on the supply side rather than the demand side. The classic fix is to fake supply until it's real, the way DoorDash drove the food itself, Reddit's team posted under fake handles, and Roblox's founders hand-built the early games for years. We can do that with generation, at a cost and speed none of them had. The Decentraland tombstone is the check on this bet: Decentraland was full of generated stuff and drew about thirty people a day, because pretty isn't the same as worth your time. So I'm not betting that AI makes the world fun. I'm betting that AI removes the asset bottleneck so that every hour of our scarce human effort goes into the one thing that actually retains people, the loop. AI builds the hill cheaply. We hand-build the reason to climb it. And we cap the synthetic seed at <a href="https://forkoff.xyz/blog/founder-growth/two-sided-marketplace-cold-start-2026">roughly 30 percent, converting it to real creator content inside about 60 days</a>, because fake supply that never turns real breaks trust the instant anyone notices.</p>
<p><strong>Bet three: we publish our own kill-criteria.</strong> This is the difference between a grounded plan and a hopeful one. The metric that predicted survival in every single case was whether the <a href="https://newsletter.pmcurve.com/p/retention-masterclass">retention curve flattens</a>, whether some cohort keeps coming back instead of decaying to zero. So that is the test we hold ourselves to, out loud. If alpha day-7 retention does not flatten, if the players who never build do not return, if the AI-seeded content gets walked past and ignored, the thesis is wrong, and we change it or we stop. We will track players and creators as two separate funnels with two separate aha moments, because the data is clear they are not the same person. And we will not pretend money does the early work. At fifty users, or even a thousand, tips and marketplace earnings round to zero, so they retain no one yet. Early retention comes from the loop or it does not come at all. Dreams is the receipt for getting that backwards.</p>
<p><strong>Bet four: we start narrow.</strong> The research on networked products is unanimous. You don't launch to a market, you launch to an <a href="https://www.lennysnewsletter.com/p/atomic-network">&quot;atomic network,&quot;</a> the smallest group dense enough to be alive on its own. Facebook started at one school. Ours already exists: the Cinevva creators who have generated 3D assets, music, and sound, and who already have inventory to place. Fifty of them in one world at the same hour, with a goal and a frontier, is a denser and more alive thing than fifty thousand scattered signups will ever be. The evidence backs this one hard.</p>
<p><strong>Bet five, the softest, and I'll say so: we tell the truth about the emptiness instead of hiding it.</strong> A polished, quiet world reads as dead, and the failures all tried to cover that with ambient effects. We will try the opposite. This is the least proven move of the five, closer to a hunch than a finding. The first people in are not visiting an unfinished product. They are the founding citizens of a place that is empty <em>because they're early</em>, and what they build will still be standing when the next thousand arrive.</p>
<p>That's the plan, graded. Four bets the graveyard strongly supports, and one real wager on a tool none of the dead had, fenced in by the exact discipline they lacked. We can generate the hill. We can't generate the feeling of being first up it, or the stranger who waves from the top. The job is to make that wave possible, prove it on the retention curve, and stop when the curve says no.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 30: A camera that respects walls]]></title>
            <link>https://app.cinevva.com/blog/2026-06-04-open-world-browser-part-30-collision-aware-camera</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-06-04-open-world-browser-part-30-collision-aware-camera</guid>
            <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Twenty-nine parts built a world you can walk, swim, and build in, all watched by a camera that clipped straight through hills and house walls. Part 30 fixes that with a collision-aware boom: a spring arm that owns only its own length, a pluggable collider contract so terrain, props, and buildings all stop the camera through the same interface, and a signed-distance probe that honours the one thing a heightmap never could, overhangs and caves. It plugs in as a post-process over OrbitControls without rewriting a line of the orbit input we already trusted.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 30: A camera that respects walls</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">Part 29</a> gave us one controller that drives any body. The body moves correctly now. It walks, slides, swims, glides, climbs into caves, and ducks under overhangs. The problem is what's watching it. For twenty-nine parts the camera was a stock orbit rig that followed the player and did exactly one clever thing to avoid embarrassment, it refused to tilt below the horizon so it couldn't slide under flat ground. That clamp is the tell. It exists because the camera had no idea where the world's geometry actually was, so the only defence against clipping was to forbid the angles where clipping was most likely. Walk up to a hill and the camera sat inside the hill. Step into one of the marching-cubes caves from <a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Part 7</a> and you were looking at the inside of a rock. Build a house with the authoring tools from <a href="/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring">Part 16</a> and stand in a room, and the camera floated outside the wall looking at siding. This part gives the camera the same respect for geometry the body already has.</p>
<h2>The shape of the problem, and the shape of the fix</h2>
<p>A third-person camera has one job that's hard and a dozen that are easy. The easy ones are following, smoothing, and orbit input, and we already had those. The hard one is the academic literature calls it a visibility constraint, and the survey everyone cites, Christie and Olivier's <em>Camera Control in Computer Graphics</em>, frames the whole field around it: keep the subject framed and unoccluded while respecting the world. At runtime that reduces to a deceptively simple question asked every frame. The player is the pivot. The user has rotated and zoomed to a desired camera position some distance behind them. The question is how far back the camera can sit along that line before it pokes into something solid. Answer it correctly and the camera tucks itself in front of the hill, slides down the boom as you back into a corner, and stops at the cave ceiling instead of punching through it.</p>
<p>The pattern that answers it is old and proven. Unreal calls it a spring arm, Godot ships a <code>SpringArm3D</code> node, and Unity's Cinemachine splits it across a third-person follow rig and a deoccluder extension. The idea is always the same. Hang the camera off the end of a boom anchored at the pivot. Hold it at the desired length when the path is clear, retract it toward the pivot when something's in the way, and spring it back out when the way clears. Mark Haigh-Hutchinson's <em>Real-Time Cameras</em>, written by the camera lead on Metroid Prime, spends whole chapters on the failure modes that turn a naive version of this into something that makes players sick. We took the pattern and built our own, small enough to read in one sitting, in <code>public/world/src/camera-rig.mjs</code>.</p>
<figure style="margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12);border-radius:8px;overflow:hidden;background:#0d1117">
<svg viewBox="0 0 680 290" width="100%" role="img" aria-label="A spring-arm boom retracting along its own line so the probe sphere rests against a wall instead of clipping through it" style="display:block">
  <rect x="382" y="40" width="46" height="222" fill="#39424f" stroke="#5b6675"/>
  <text x="405" y="280" fill="#9aa7b4" font-size="13" text-anchor="middle" font-family="sans-serif">wall</text>
  <line x1="110" y1="212" x2="600" y2="70" stroke="#9aa7b4" stroke-width="2" stroke-dasharray="6 6"/>
  <line x1="110" y1="212" x2="360" y2="140" stroke="#6ea8fe" stroke-width="3"/>
  <circle cx="110" cy="212" r="6" fill="#e6edf3"/>
  <text x="110" y="234" fill="#e6edf3" font-size="13" text-anchor="middle" font-family="sans-serif">pivot (player head)</text>
  <circle cx="600" cy="70" r="9" fill="none" stroke="#9aa7b4" stroke-width="2"/>
  <text x="600" y="52" fill="#9aa7b4" font-size="13" text-anchor="middle" font-family="sans-serif">desired (user zoom)</text>
  <circle cx="360" cy="140" r="22" fill="rgba(110,168,254,0.18)" stroke="#6ea8fe" stroke-width="2"/>
  <circle cx="360" cy="140" r="5" fill="#6ea8fe"/>
  <text x="300" y="104" fill="#6ea8fe" font-size="13" text-anchor="middle" font-family="sans-serif">camera + probe radius r</text>
  <text x="222" y="192" fill="#6ea8fe" font-size="13" font-family="sans-serif" transform="rotate(-16 222 192)">ℓ (clamped)</text>
</svg>
<figcaption style="padding:0.6rem 1rem;color:#9aa7b4;font-size:0.85rem;border-top:1px solid rgba(255,255,255,0.12);font-family:sans-serif">The boom holds the camera at the user's desired zoom until an obstacle intrudes, then retracts along the same line so the probe sphere rests against the surface instead of the near plane punching through it.</figcaption>
</figure>
<h2>A boom that owns only its length</h2>
<p>The design rule that kept the rig small is a borrow from the controller work in Part 29: own one thing, completely, and refuse the rest. The rig owns the length of the boom and nothing else. Yaw, pitch, damping of the orbit, touch and wheel gestures, all of that stays with OrbitControls, which already solves it well and which we have no interest in rewriting. So the rig is a post-process rather than a camera controller. It runs after the orbit math and corrects exactly one number, the distance from pivot to camera.</p>
<p>That decision sounds tidy and it almost broke immediately, because of how OrbitControls thinks. At the top of every update it reads the camera's current position and derives its orbit radius from it. That's normally invisible. But the instant our rig shortens the camera to dodge a wall, the next frame OrbitControls reads that shortened position, concludes the user must have zoomed in, and bakes the shortening into the user's desired zoom. A few frames of that and the camera has collapsed onto the player's head and won't come back out. The fix is two calls that bracket the orbit update and it's the whole integration. Before OrbitControls runs, <code>beforeControls()</code> restores the camera to last frame's full, un-shortened distance, so the orbit math always reads the user's true zoom. After OrbitControls runs, <code>afterControls(dt)</code> reads that freshly orbited desired position, resolves the collision, damps the length, and writes the camera where it should actually render. The user's intent and the collision correction never touch each other, and the dolly stays exactly as responsive as it was before the rig existed. The headless test we wrote for the rig pins this precisely: drive the boom into a wall for sixty frames, clear the wall, and the length springs back to the user's full zoom of ten metres rather than sticking at the collision distance.</p>
<h2>One contract, any collider</h2>
<p>The rig never asks what the world is made of. A collider is just an object with a <code>probe</code> method, and the rig hands it a ray, a maximum distance, and the camera's probe radius, and gets back one number, the furthest the camera may travel before that collider blocks it. The rig queries every registered collider and takes the nearest hit. That's the entire contract, and it's the same move the character controller made when it turned locomotion into pluggable behaviours. Terrain plugs in, props plug in, building shells plug in, each behind the same <code>probe</code>, and the rig stays ignorant of all of them. Adding a new kind of obstacle is adding a collider to a list rather than editing the camera.</p>
<p>One detail in the contract earns its keep, and it's the probe radius. We don't cast a thin ray from pivot to camera, we cast a sphere big enough to contain the camera's near plane. A single ray stops the camera centre at the wall, but the near plane has width, so its corners would already be buried in the wall before the centre ray ever reported a hit. Sweeping a small sphere instead of a ray is what every shipping implementation does, Unreal exposes it as the probe size, and it's the difference between a camera that rests cleanly against a surface and one that lets you see through it at the edges of the screen.</p>
<p>We don't guess that radius, we derive it. The furthest point of the near plane from the camera is one of its corners, and the distance to it falls straight out of the projection. With near plane $n$ and vertical field of view $\theta$, the half-height is $h = n\tan(\theta/2)$, the half-width is $w = h\cdot\text{aspect}$, and the corner sits at</p>
<p>$$
r_{\text{near}} = \sqrt{n^2 + w^2 + h^2}
$$</p>
<p>The probe radius is that corner distance times a small safety margin, with a fixed floor so it never drops below a sensible minimum on a very narrow frustum. Whenever the field of view, aspect ratio, or near plane changes, the radius is recomputed, so a window resize or a zoom that touches the projection can't leave the probe too small to cover the corners it's meant to protect.</p>
<h2>The collider that knows about caves</h2>
<p>The terrain collider is where this gets interesting, because terrain in our engine isn't a heightmap. Since Part 7 it's been a signed distance field, a function that returns how far any point in space is from the nearest solid surface and whether it's inside or outside the rock. Positive is air, negative is rock, and that single fact is why our camera can do something a heightmap camera structurally cannot. A heightmap knows the ground height at an x and z. It has no concept of a ceiling, because there's only ever one surface above any point. So a heightmap camera can stop you walking into a hill, but it has no idea an overhang lip or a cave roof is hanging over the pivot, and it sails right through both. A distance field knows about every surface in three dimensions, so the same probe that stops the camera against a hillside stops it against a cave ceiling without a single special case.</p>
<figure style="margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12);border-radius:8px;overflow:hidden;background:#0d1117">
<svg viewBox="0 0 680 320" width="100%" role="img" aria-label="Under an overhang a heightmap lets the boom clip through the ceiling rock, while a signed distance field stops it at the ceiling underside" style="display:block">
  <path d="M680,320 L680,40 L250,40 L250,150 L430,150 L430,250 L250,250 L250,320 Z" fill="#39424f" stroke="#5b6675" stroke-width="1.5"/>
  <text x="340" y="205" fill="#9aa7b4" font-size="13" text-anchor="middle" font-family="sans-serif">cave</text>
  <text x="540" y="100" fill="#5b6675" font-size="13" text-anchor="middle" font-family="sans-serif">solid rock</text>
  <line x1="330" y1="212" x2="230" y2="60" stroke="#9aa7b4" stroke-width="2" stroke-dasharray="6 6"/>
  <line x1="290" y1="150" x2="250" y2="90" stroke="#f85149" stroke-width="4"/>
  <circle cx="330" cy="212" r="6" fill="#e6edf3"/>
  <text x="330" y="234" fill="#e6edf3" font-size="13" text-anchor="middle" font-family="sans-serif">player</text>
  <circle cx="230" cy="60" r="10" fill="none" stroke="#f85149" stroke-width="2"/>
  <text x="230" y="42" fill="#f85149" font-size="13" text-anchor="middle" font-family="sans-serif">heightmap: clips through ✗</text>
  <circle cx="305" cy="170" r="9" fill="rgba(86,211,100,0.2)" stroke="#56d364" stroke-width="2"/>
  <text x="420" y="172" fill="#56d364" font-size="13" text-anchor="middle" font-family="sans-serif">SDF: stops at ceiling ✓</text>
</svg>
<figcaption style="padding:0.6rem 1rem;color:#9aa7b4;font-size:0.85rem;border-top:1px solid rgba(255,255,255,0.12);font-family:sans-serif">A heightmap stores one surface per column, so it never sees the slab of rock above the player and lets the boom punch up through the ceiling. The distance field is negative inside that slab, so the probe contacts it and the camera holds just below the cave roof.</figcaption>
</figure>
<p>Walking the probe along the field is a technique with a name and a paper behind it. John Hart's <em>Sphere Tracing</em>, from 1996, is the standard way to march a ray against a distance field, and the trick is that the field doesn't just tell you whether you've hit something, it tells you a safe distance you can advance without hitting anything. So instead of creeping along in tiny fixed steps, you sample the field, step forward by the slack it reports, and repeat, taking long strides through open air and short careful ones as you close on a surface.</p>
<p>There's a catch our terrain forces on us, though. A true distance field reports the real Euclidean distance to the nearest surface, and a full stride by that slack is always safe. But where the terrain is still a heightmap rather than carved voxels, the field we can cheaply sample is vertical clearance, the gap straight down to the ground, rather than true distance. On a slope that number over-reports how far the camera can move, because the nearest rock is off to the side rather than directly below. The true distance is smaller by a factor that grows with the gradient, $\sqrt{1 + \lVert\nabla h\rVert^2}$, so a stride sized for the reported slack overshoots and can hop clean over a ridge. The fix is under-relaxation, advancing by only a fraction of the reported slack rather than all of it, which stays safe up to roughly a sixty-degree slope and costs nothing on the true-distance voxel regions beyond a few extra samples. We pair that with a stride floor, so a cave wall a cell or two thick is never stepped clean over, and a tighter ceiling that keeps the march cheap. When the sphere finally touches the surface a short bisection tightens the contact point, and the camera backs off by its own radius and rests there.</p>
<p>Written out, the boom is a ray $\mathbf{r}(t) = \mathbf{p} + t,\mathbf{d}$ from the pivot $\mathbf{p}$ along the unit direction $\mathbf{d}$, and the march advances by an under-relaxed fraction of the field's slack to contact, clamped at both ends:</p>
<p>$$
t_{n+1} = t_n + \operatorname{clamp}!\big(\lambda,(\Phi(\mathbf{r}(t_n)) - r),; s_{\min},; s_{\max}\big)
$$</p>
<p>Here $\Phi$ is the signed distance, positive in air and negative in rock, $r$ is the probe radius, $\lambda \in (0, 1]$ is the under-relaxation factor that keeps the over-reporting heightmap field from hopping a slope, and $s_{\min}, s_{\max}$ are the step clamps that keep a thin wall from being skipped and the march from running long. Contact is the first $t$ where $\Phi(\mathbf{r}(t)) \le r$, meaning the sphere surface has reached the rock, and the camera holds at that arc length less its radius.</p>
<p>The collider carries one more method as a safety net, depenetration. Collision should keep the camera out of solid in the first place, but a few situations sneak past it, a pivot straddling a wall thin enough that the boom starts inside it, a cave freshly carved by the terrain tools while the camera sat in the rock that's now gone, a building piece dropped around the camera. For those the collider checks whether the camera ended the frame inside solid, where $\Phi(\mathbf{c}) &lt; r$, and if it did, reads the field's gradient, which points straight toward open air because $\Phi$ grows as you leave the rock, and steps the camera out along it:</p>
<p>$$
\mathbf{c} \leftarrow \mathbf{c} + \big(r - \Phi(\mathbf{c})\big),\frac{\nabla \Phi(\mathbf{c})}{\lVert \nabla \Phi(\mathbf{c}) \rVert}
$$</p>
<p>A handful of those iterations converges on the $r$-isosurface, and it's the thing that means a sculpting tool can dig the ground out from under the camera and the view recovers on the next frame instead of going black.</p>
<h2>Snapping in, easing out, and not flinching at fence posts</h2>
<p>A boom that simply jumps to the collision distance every frame is worse than no boom at all, because the world is full of thin things the camera passes behind for a single frame, a fence post, a lamp, a tree trunk, and a camera that lunges to dodge each one and lunges back is nauseating. Haigh-Hutchinson's book and Itay Keren's much-loved talk on camera motion both land on the same intuition, which is that the camera should react to threats and danger faster than it relaxes from them. So the damping is asymmetric. When an occluder appears and the boom needs to shorten, it snaps in almost instantly, because a frame of clipping is ugly and the player forgives a fast tuck. When the occluder clears and the boom wants to lengthen, it eases out slowly, and only after a short dwell timer of continuous clearance has elapsed. That dwell is the hysteresis that kills the flinch. Whip the camera past a thin post and the post never clears long enough to trigger the slow extension, so the camera glides past it as if it weren't there, which is exactly what your eye wants. Cinemachine exposes the same idea as separate damping-into and damping-out-of collision values, and the asymmetry is the part that makes it feel like a camera operator rather than a spring.</p>
<p>In code it's one line of exponential smoothing with the rate switched on the sign of the change. If $\ell$ is the current boom length, $a$ the length collision allows this frame, and $\Delta t$ the frame time, then</p>
<p>$$
\ell \leftarrow \ell + (a - \ell)\big(1 - e^{-k,\Delta t}\big), \qquad
k = \begin{cases}
k_{\text{in}}  &amp; a \le \ell \[2pt]
k_{\text{out}} &amp; a &gt; \ell
\end{cases}, \quad k_{\text{in}} \gg k_{\text{out}}
$$</p>
<p>and the ease-out branch only runs once the clearance has held for the dwell time $\tau$. The $1 - e^{-k,\Delta t}$ form matters beyond looking tidy. It fixes the response time constant at $1/k$ regardless of frame rate, so the camera feels identical at 30 and 144 frames per second, where the naive constant-blend $\ell \leftarrow \ell + \alpha(a - \ell)$ would snap faster on a fast machine and mush on a slow one.</p>
<p>The last behaviour is for the tight interiors that started this whole part. When the boom collapses short enough that the camera is right on top of the player, we hide the player's own avatar and let the view sit near first person. This is what Breath of the Wild does in a cramped shrine and what most third-person games fall back to in a corner, because the alternative, a camera jammed against a wall staring at the back of a head, is useless. The rig exposes a single flag for it, and the world loop reads the flag and toggles the local avatar's visibility. Below a metre of boom you're effectively in first person, the walls are honoured, and as soon as you back into a room with space the avatar fades back in and the boom extends.</p>
<h2>What plugs in next</h2>
<p>The terrain collider ships today and it's the hard half, because terrain is everywhere and a distance field is the awkward thing to probe. The props and the building shells from the authoring spikes are the easy half, and the contract is already waiting for them. A second collider, a raycast collider, casts from the pivot toward the camera against a list of meshes and reports the nearest hit the same way the terrain collider does. The cheap version casts a single ray, which is fine until prop counts climb, and the upgrade is to swap the ray for a swept sphere using three-mesh-bvh, Garrett Johnson's library that wraps a mesh in a bounding-volume hierarchy so spatial queries run in log time instead of brute force. Either way the rig doesn't change. It queries a longer list of colliders and takes the nearest hit, which is the reason for having built the contract first and the colliders second.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>A boom that owns one number.</strong> The camera rig is a post-process over OrbitControls rather than a replacement for it. It owns the length of the boom and leaves yaw, pitch, zoom, and gesture handling with the orbit controller we already trusted. The integration is two bracketing calls: <code>beforeControls()</code> restores the previous frame's full distance so the orbit math reads the user's true zoom rather than mistaking a collision shortening for a dolly-in, and <code>afterControls(dt)</code> resolves the collision and writes the rendered position. Without that pair the camera collapses onto the player over a few frames.</p>
<p><strong>A pluggable collider contract.</strong> A collider is any object with a <code>probe</code> that answers &quot;how far can the camera travel from the pivot along this ray before you block it.&quot; The rig queries every collider and takes the nearest hit, ignorant of whether the obstacle is terrain, a prop, or a wall, which is the same own-one-thing discipline the <a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">pluggable character controller</a> used for locomotion. The probe is a swept sphere sized to contain the near plane, not a thin ray, so the frustum corners never clip a surface the centre ray would miss. Its radius is derived from the projection, the distance to a near-plane corner $\sqrt{n^2 + w^2 + h^2}$ times a safety margin, and recomputed whenever the field of view, aspect, or near plane changes.</p>
<p><strong>A signed-distance terrain probe that honours overhangs and caves.</strong> Because terrain is a <a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">signed distance field</a> rather than a heightmap, the same probe that stops the camera against a hillside stops it against a cave ceiling, the case a heightmap raycast structurally cannot see. The march is Hart-style sphere tracing, stepping by an under-relaxed fraction of the slack the field reports and clamped at both ends, because the heightmap regions report vertical clearance rather than true distance and over-report how far the camera can move on a slope, so a full stride would hop a ridge. A gradient-driven depenetration pass is the safety net that recovers the view when the ground is sculpted out from under the camera.</p>
<p><strong>Asymmetric damping with a dwell timer.</strong> The boom snaps in fast when an occluder appears and eases out slowly once it clears, and only after a short window of continuous clearance, so whipping past a fence post never makes the camera lunge. Below a collapse threshold the rig flags near-first-person and the world loop hides the local avatar, the standard fallback for tight interiors instead of a camera buried in a wall.</p>
<h2>References</h2>
<p>The framing of camera control as a visibility constraint comes from Marc Christie and Patrick Olivier, <a href="https://people.irisa.fr/Marc.Christie/Publications/2008/CON08.html"><em>Camera Control in Computer Graphics</em></a> (Computer Graphics Forum, 2008). The distance-field march is John C. Hart, <a href="https://graphics.stanford.edu/courses/cs348b-20-spring-content/uploads/hart.pdf"><em>Sphere Tracing: A Geometric Method for the Antialiased Ray Tracing of Implicit Surfaces</em></a> (The Visual Computer, 1996). The spring-arm pattern and its probe-sphere collision are documented in Epic's <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/using-spring-arm-components-in-unreal-engine">Spring Arm Component</a> and Unity's <a href="https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineDeoccluder.html">Cinemachine Deoccluder</a> and <a href="https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineThirdPersonFollow.html">Third Person Follow</a>. The motion and damping intuition is from Mark Haigh-Hutchinson, <em>Real-Time Cameras</em> (Morgan Kaufmann, 2009), and Itay Keren, <a href="https://www.gamedeveloper.com/design/scroll-back-the-theory-and-practice-of-cameras-in-side-scrollers"><em>Scroll Back: The Theory and Practice of Cameras in Side-Scrollers</em></a> (GDC 2015). The mesh-collider upgrade path is Garrett Johnson's <a href="https://github.com/gkjohnson/three-mesh-bvh">three-mesh-bvh</a>.</p>
<hr>
<p>Part 30 of 30.
Previous: <a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">Part 29 - One controller, any body</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Math rendering test]]></title>
            <link>https://app.cinevva.com/blog/math-test</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/math-test</guid>
            <pubDate>Sat, 30 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A scratch page to verify LaTeX math formulas render correctly in VitePress.]]></description>
            <content:encoded><![CDATA[<h1>Math rendering test</h1>
<p>This page exists to verify that LaTeX math renders in our markdown articles. Math support is provided by <code>markdown-it-mathjax3</code>, enabled with <code>markdown: { math: true }</code> in the VitePress config.</p>
<h2>Inline math</h2>
<p>Write inline formulas by wrapping them in single dollar signs. Einstein's relation $E = mc^2$ sits in the flow of a sentence, as does the golden ratio $\varphi = \frac{1 + \sqrt{5}}{2}$ and a quick sum like $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$.</p>
<h2>Block math</h2>
<p>Wrap a display equation in double dollar signs on their own lines.</p>
<p>$$
f(x) = \int_{-\infty}^{\infty} \hat{f}(\xi), e^{2 \pi i \xi x} , d\xi
$$</p>
<p>The quadratic formula:</p>
<p>$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$</p>
<h2>Matrices and aligned equations</h2>
<p>A 2x2 matrix:</p>
<p>$$
A = \begin{bmatrix} a &amp; b \ c &amp; d \end{bmatrix}
$$</p>
<p>Multi-line alignment with <code>aligned</code>:</p>
<p>$$
\begin{aligned}
(a + b)^2 &amp;= a^2 + 2ab + b^2 \
(a - b)^2 &amp;= a^2 - 2ab + b^2
\end{aligned}
$$</p>
<h2>Greek, subscripts, and operators</h2>
<p>Gradient descent step: $\theta_{t+1} = \theta_t - \eta \nabla_\theta J(\theta)$.</p>
<p>A softmax: $\sigma(z)<em>i = \dfrac{e^{z_i}}{\sum</em>{j=1}^{K} e^{z_j}}$.</p>
<h2>Escaping a literal dollar sign</h2>
<p>To show a real dollar amount without triggering math, escape it: it costs $5 to $10. Only unescaped <code>$</code> pairs are treated as math.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don't render grass behind the hill: terrain-aware occlusion culling]]></title>
            <link>https://app.cinevva.com/blog/2026-05-19-terrain-occlusion-culling</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-19-terrain-occlusion-culling</guid>
            <pubDate>Tue, 19 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Eight occlusion-culling techniques rated for a browser open world, the one that wins because our terrain is a heightmap, and an interactive spike that lets you A/B them in your own scene.]]></description>
            <content:encoded><![CDATA[<h1>Don't render grass behind the hill: terrain-aware occlusion culling</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p><a href="/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion">Part 28</a> introduced Spike 57 and benched its four cull paths in a couple of paragraphs. This is the long version: why those four, what the other four were, and the reasoning behind the one we're shipping.</p>
<p>There's a hill between the camera and a meadow. You don't need to render the meadow. Every modern AAA engine knows this. Most browser-based 3D engines don't, including ours until last week.</p>
<p>This post is the result of doing the research properly, grounding it in our actual codebase, building a working spike, and rating the techniques by how much they help <em>us specifically</em> given that we ship to WebGL today and WebGPU tomorrow.</p>
<p>You can poke at the live spike below before reading on. <kbd>T</kbd>/<kbd>Y</kbd>/<kbd>U</kbd>/<kbd>I</kbd> switch between cull paths, <kbd>C</kbd> cycles the camera presets, <kbd>B</kbd> paints the chunks that get hidden in red wireframe so you can see what the test removes. The HUD reports how many instances each stage rejects.</p>
<div style="position:relative;padding-bottom:62%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.08)">
<iframe src="/spikes/57-terrain-occlusion/" title="Spike 57 Terrain occlusion culling" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#1a1f2a" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/57-terrain-occlusion/" target="_blank">Open Spike 57 in a new tab ↗</a> · <a href="/blog/spike-source?spike=57-terrain-occlusion">View source</a></p>
<h2>What our engine does today (and doesn't)</h2>
<p>Our streaming chunk manager loads a ring of 64m chunks around the player at three LOD tiers. Each chunk owns instanced trees scattered onto the heightmap. The culling logic, which lives in <code>Chunk.updateObjectVisibility</code>, is a straight distance check: trees within 60m render in full mesh, between 60m and 140m render as billboards, beyond that nothing.</p>
<p>That cull misses two huge categories of waste:</p>
<ol>
<li>Anything inside the 60m disk <em>but behind the camera</em>. We re-sort the instance buffer every time the player moves more than 4m, but we don't test the view frustum, so half of the disk on average is fed to the GPU just to be clipped after vertex transform.</li>
<li>Anything inside the 60m disk <em>but behind a hill</em>. Our terrain has 80m of vertical range and lots of valleys. When the camera is in a valley, most of the foliage inside the cull radius is geometrically hidden by the closest ridge. We draw it anyway.</li>
</ol>
<p>The second category is the one this post focuses on. It's also the one that AAA engines fix with a stack of cleverness that does not, at first glance, translate cleanly to the browser.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0">
<iframe src="https://www.youtube.com/embed/wavnKZNSYqU" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></iframe>
</div>
<p><em>Guerrilla's Gilbert Sanders walks through how Horizon Zero Dawn renders open-world vegetation. The cull stack is the bottom 20 minutes and it's a master class in why &quot;draw less&quot; beats &quot;draw faster.&quot;</em></p>
<h2>Eight techniques, rated for our case</h2>
<p>I read through the modern occlusion-culling stack and rated each piece by how much it helps a procedural, heightmap-based, in-browser open world. Two axes: value (how much waste it removes given our scene) and cost (engineering effort, plus how much of our stack it forces to change). The full reasoning is in the research file behind this post. This is the short version.</p>
<p><strong>1. Per-instance frustum culling. High value, low cost.</strong> Right now we don't test the frustum at all for our instanced foliage. Adding it cuts roughly half the work in any view, costs about thirty lines of code, and ships in WebGL today. This is the single largest cheap win and we should have done it months ago.</p>
<p><strong>2. Heightmap horizon raycast. High value, low–medium cost.</strong> March a ray from the camera through each candidate instance, sampling the terrain height along the way. If the terrain ever rises above the ray, the instance is occluded. Works precisely because our world is a heightmap, which reduces visibility to a 1D problem along the horizontal direction. The dense version is O(steps) per instance per frame. The accelerated version (next item) drops it to O(log steps).</p>
<p><strong>3. Max-height pyramid acceleration. High value, medium cost.</strong> A 2D mipmap of the heightmap where each texel stores the maximum terrain height inside its footprint. Lets the horizon raycast jump in coarse steps when the surroundings are flat and refine only over hills. This is the structure that makes #2 production-cheap.</p>
<p><strong>4. Hierarchical-Z occlusion (Hi-Z / HZB). High value, high cost.</strong> Build a depth-buffer mipmap, project each instance's bounds to screen space, test against the right mip level. This is the modern GPU-side standard, used by Unreal's Nanite, Bevy's virtual geometry, and VTK's WebGPU port. It works for everything rather than just terrain, but it requires WebGPU, indirect draws, and a compute pass. It pays off when we're rendering millions of grass blades rather than thousands of trees.</p>
<p><strong>5. Two-pass Hi-Z (Nanite-style). Marginal over #4, high cost.</strong> Re-render this frame's depth after pass 1 to avoid the one-frame disocclusion artifact. Only worth it once we're far enough along the GPU-driven path that the cost is incremental.</p>
<p><strong>6. Software occlusion rasterizer (Frostbite/Intel MOC). Medium value, high cost.</strong> Rasterize a low-res depth buffer of large occluders on the CPU. It has zero readback latency. The reference implementations are AVX/SSE C++, and porting to WASM is a real project and our heightmap raycast captures most of the same wins for a fraction of the work.</p>
<p><strong>7. Precomputed PVS. Low value, high cost.</strong> Beautiful for Quake-era static maps. Our terrain is procedural and infinite, so any preprocessing has to happen at chunk-stream time, which costs about as much as just doing runtime visibility. Skip.</p>
<p><strong>8. Cesium-style horizon culling. None for us, medium cost.</strong> Designed for planet ellipsoids. Our world is flat-ish and bounded, so the math doesn't apply and would either no-op or false-cull. Skip.</p>
<p>So we do #1 and #2+#3 now, on the CPU, in WebGL. Plan #4 for the WebGPU migration. Skip the rest.</p>
<h2>Why heightmap raycast wins for browser terrain</h2>
<p>The standard advice in any modern rendering talk is &quot;build a Hi-Z buffer.&quot; Brian Karis's <a href="https://www.youtube.com/watch?v=eviSykqSUUw">SIGGRAPH 2021 deep dive on Nanite</a> is the canonical reference and you should watch it once.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0">
<iframe src="https://www.youtube.com/embed/eviSykqSUUw" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></iframe>
</div>
<p>It's the right answer for an engine that already runs everything through GPU-driven indirect draws. Most browser engines, including ours, are not that engine. We have CPU-side instance buffers, WebGL draw calls, and no compute stage. Bolting Hi-Z onto that stack means simultaneously porting to WebGPU, rewriting the vegetation pipeline as indirect draws, and adding a depth-pyramid build pass. That's a quarter of work for the first frame that proves the idea.</p>
<p>The heightmap raycast works on the CPU, in WebGL, with the data we already have. It uses the one fact about our world that AAA engines don't get to use: <strong>our occluders are described by a 1D height function</strong>. Sampling that function along a ray is two array lookups and a multiply. A Hi-Z buffer would have to discover the same fact pixel by pixel.</p>
<p>The technique was first published as &quot;Horizon Occlusion Culling for Hierarchical Terrains&quot; at IEEE Visualization 2002 (<a href="https://saksagan.ceng.metu.edu.tr/courses/ceng591/RAPORLAR/HacerYalim.pdf">PDF</a>). It's stayed in the toolbox for two decades because it has the right shape: cheap when the terrain is flat, expensive only where there are actual hills, and trivially parallel.</p>
<h2>The max-height pyramid, drawn</h2>
<p>The naive raycast samples <code>terrainHeight</code> at ~24 points along each ray and breaks early if the terrain crosses it. That's fine for thousands of trees. It collapses at hundreds of thousands of grass blades.</p>
<p>The fix is a mipmap of the heightmap where each texel stores the <strong>maximum</strong> height inside its footprint:</p>
<pre><code>level 0 (256×256, 2.25m per texel):  max h of 4×4 jittered samples
level 1 (128×128, 4.5m  per texel):  max(0,0), max(1,0), max(0,1), max(1,1)
level 2 ( 64×64,  9.0m per texel):  same reduction one level up
...
level 8 (   1×1,  576m per texel):  global max
</code></pre>
<p>When the ray segment is long and flat, sample a coarse level: one lookup tells you &quot;no terrain in this 9m square ever exceeds 12m altitude, and the ray is at 30m there, so move on.&quot; Only when a coarse texel says &quot;terrain <em>might</em> be above the ray&quot; do you descend a level and refine. The whole structure is a few hundred KB and builds in tens of milliseconds.</p>
<p>Diagrammatically:</p>
<pre><code>                                            ray from eye
        eye 1.7m                          o─────────────────────►
              o─────────────────────────·─·─·─·─·─·──────────────
              │                          \                       │
              │   level 3 (huge step)     \   level 0 (refine)   │
              │   &quot;no terrain above 8m&quot;    \   &quot;9m hill here!&quot;   │
              │                              \                   │
        ──────┴────────────/▔▔▔\─────────────/▔▔▔▔▔\─────────────
                                 hill A (8m)   hill B (12m)
                                                ↑
                                                blocks here
</code></pre>
<p>For the ray segment that runs over hill A's vicinity, the level-3 lookup (&quot;max height in this 18m wide box is 8m&quot;) already tells us the ray at altitude 1.7m + a few metres of climb is clear. We skip 36m of march in one query. Over hill B, level 3 says &quot;max here is 12m&quot;, we descend, level 0 says &quot;yes, 12m at this exact texel&quot;, and we reject the instance.</p>
<p>The pyramid build is in <code>height-pyramid.mjs</code>, and the cull paths that consume it are in <code>cull.mjs</code>. Both are readable in the <a href="/blog/spike-source?spike=57-terrain-occlusion">spike source browser</a>.</p>
<h2>What the spike actually shows</h2>
<p>Open Spike 57 above and walk through the four paths:</p>
<ul>
<li><strong>T0</strong> is what production does today. Distance only. From C1 (valley floor) the HUD reports ~12,000 grass blades visible.</li>
<li><strong>T1</strong> adds per-instance frustum culling. The visible count drops by roughly half because anything behind the camera or off to the side gets dropped before it reaches the GPU.</li>
<li><strong>T2</strong> adds the brute-force heightmap raycast. In C1 the number drops by another 60-80%, because most of the field is on the other side of the closest ridge. The Cull-ms column climbs because we're sampling <code>terrainHeight</code> ~24 times per instance.</li>
<li><strong>T3</strong> swaps the brute force for the max-height pyramid. Cull-ms drops back close to T1 while keeping the visibility win. This is the path you actually ship.</li>
</ul>
<p>The pattern matches what production engines see. Acerola's two-part series on grass rendering (<a href="https://www.youtube.com/watch?v=Y0Ko0kvwfgA">How Do Games Render So Much Grass?</a>, <a href="https://www.youtube.com/watch?v=PNvlqsXdQic">What I Did To Optimize My Game's Grass</a>) is the most accessible walkthrough on YouTube of why the cull stage, rather than the shading stage, is where you spend your engineering.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0">
<iframe src="https://www.youtube.com/embed/Y0Ko0kvwfgA" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></iframe>
</div>
<h2>Camera C3 and the &quot;hilltop&quot; failure case</h2>
<p>The spike's third camera preset puts the camera on top of a hill looking out across the playfield. This is the case where horizon culling does almost nothing, because there's no terrain between the camera and most of the world. The HUD shows T2/T3 reducing the visible count by maybe 5-10% over T1.</p>
<p>That's the intended behaviour. The technique stops working exactly where it should: when there's nothing to occlude. Frustum culling is still doing real work, distance culling is still bounding the budget, and the horizon test gracefully falls back to a no-op. If you implement this you need to verify that the no-op case is also cheap. That's the reason the max-height pyramid matters even when no rays would be rejected: the coarsest level is often enough to confirm &quot;nothing is blocked.&quot;</p>
<h2>What we ship next</h2>
<p>There are three things to do, in order.</p>
<p>First, port T1 and T3 into the production <code>Chunk.updateObjectVisibility</code>. The pyramid wants to live one level up, on the chunk manager, because it spans more than one chunk. The cull stays in <code>Chunk</code> so the existing per-chunk batching keeps working. Estimated effort: a day, including tests.</p>
<p>Second, do the same for grass once we have grass. The current spike scatters 12,000 blades over a 576m playfield, and production density should be roughly an order of magnitude higher. The CPU cull paths handle 12,000 in under a millisecond, and the pyramid acceleration is what keeps that true at 120,000.</p>
<p>Third, when we migrate to <code>THREE.WebGPURenderer</code>, port the same loop into a compute shader. The metadata becomes a storage buffer. The cull writes <code>drawIndirect</code> args. The pyramid uploads as a 2D texture with the max-reduction baked in. The shape of the code stays nearly identical, so the migration doesn't depend on a new algorithm. We're moving an algorithm we already have onto a faster runway.</p>
<p>Guerrilla covered the GPU-side version of this for Horizon Zero Dawn's procedural placement system. The rendering pipeline matters less than the data structures, and theirs are the same shape:</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0">
<iframe src="https://www.youtube.com/embed/ToCozpl1sYY" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></iframe>
</div>
<p>Hi-Z will still earn its place once we ship buildings and dense props that occlude in directions the heightmap can't describe. But the heightmap pyramid stays in the pipeline because it's strictly cheaper than Hi-Z for ground-hugging instances, and grass that straddles a ridge silhouette is exactly the case Hi-Z handles worst.</p>
<h2>References</h2>
<p>The full ranked rationale and the architectural decisions are above. These are the canonical sources for each technique, in roughly the order they appear in the stack.</p>
<ul>
<li>Yalim &amp; Akman, <a href="https://saksagan.ceng.metu.edu.tr/courses/ceng591/RAPORLAR/HacerYalim.pdf">Horizon Occlusion Culling for Hierarchical Terrains</a> (IEEE Visualization 2002, the original terrain horizon-cull paper).</li>
<li>Turitzin, <a href="https://miketuritzin.com/post/hierarchical-depth-buffers/">Hierarchical Depth Buffers</a> (the clearest writeup of how Hi-Z mip chains are built and queried).</li>
<li>VKGuide, <a href="https://vkguide.dev/docs/gpudriven/compute_culling/">Compute-based Culling</a> (GPU-driven culling pipeline reference, and the WebGPU port is mechanical).</li>
<li>Kruskonja, <a href="https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501">Two-Pass Occlusion Culling</a> (the Nanite-style architecture explained outside Epic's slides).</li>
<li>Karis et al., <a href="https://www.youtube.com/watch?v=eviSykqSUUw">Nanite — A Deep Dive (SIGGRAPH 2021)</a> (the modern reference for what GPU-driven cull looks like at AAA scale).</li>
<li>Karis, <a href="https://www.youtube.com/watch?v=NRnj_lnpORU">HPG 2022 Keynote: The Journey to Nanite</a> (broader context for why the cull stage matters).</li>
<li>Sanders, <a href="https://www.youtube.com/watch?v=wavnKZNSYqU">Between Tech and Art: The Vegetation of Horizon Zero Dawn</a> (the AAA-vegetation cull stack end-to-end).</li>
<li>Guerrilla, <a href="https://www.youtube.com/watch?v=ToCozpl1sYY">GPU-Based Run-Time Procedural Placement in Horizon Zero Dawn</a> (instanced placement and per-instance visibility).</li>
<li>Scthe, <a href="https://github.com/Scthe/nanite-webgpu">Nanite WebGPU</a> (a reference WebGPU implementation, complete with HZB).</li>
<li>Kitware, <a href="https://www.kitware.com/webgpu-occlusion-culling-in-vtk/">WebGPU Occlusion Culling in VTK</a> (the first browser-side production HZB I'm aware of).</li>
<li>Acerola, <a href="https://www.youtube.com/watch?v=Y0Ko0kvwfgA">How Do Games Render So Much Grass?</a> and <a href="https://www.youtube.com/watch?v=PNvlqsXdQic">What I Did To Optimize My Game's Grass</a> (the accessible YouTube tour).</li>
<li>RasterGrid, <a href="https://www.rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/">Hi-Z Map Based Occlusion Culling</a> (the still-canonical Hi-Z primer).</li>
<li>Intel, <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/masked-software-occlusion-culling.html">Masked Software Occlusion Culling</a> (the CPU rasterizer family, if you ever decide #6 is worth it).</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 29: One controller, any body]]></title>
            <link>https://app.cinevva.com/blog/2026-05-15-open-world-browser-part-29-pluggable-character</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-15-open-world-browser-part-29-pluggable-character</guid>
            <pubDate>Fri, 15 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 58 builds a character controller where the physics engine knows nothing about walking, swimming, or gliding. Every behavior is a pluggable controller, the same engine drives the player, a rideable horse, and an autonomous NPC, and the whole thing runs headless in Node. Spike 59 hangs a retargeted avatar on it without touching a controller, and spike 60 hangs a Synty pack that needs no retargeting at all, behind a clip-picker you can unit test.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 29: One controller, any body</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion">Part 28</a> covered grass and occlusion. Twenty-eight parts built a world to stand in: terrain you can read, water you can swim, foliage that holds up to the horizon, a server that remembers what you changed. This part is about the thing that moves through all of it, and it's the payoff of the whole engine, because the goal is a controller that doesn't care what body it's driving, where its animations came from, or whether a human or an AI is at the wheel. Spike 58 builds movement as a stack of pluggable behaviors over a physics engine that knows nothing about locomotion, then proves the architecture by running three different bodies through one copy of it. Spike 59 hangs a real retargeted avatar on that controller without changing a single line of it. Spike 60 hangs a different animation pack that needs no retargeting at all, and pulls the clip-picking logic out into something you can actually test.</p>
<h2>A physics engine that knows nothing about walking</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/58-pluggable-character/" title="Spike 58 Pluggable Character" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/58-pluggable-character/" target="_blank">Open Spike 58 in a new tab ↗</a> · <a href="/blog/spike-source?spike=58-pluggable-character">View source</a></p>
<p>The design rule is severe, and it's the core of the design: the capsule engine owns no locomotion, which means no walk, run, jump, friction, top-speed cap, or even gravity. It integrates a kinematic capsule against terrain and nothing more. Every locomotion behavior, walk, slide, glide, climb, swim, crouch, stamina, lives in a self-contained controller registered with the engine. Each frame the engine ticks every controller, asks each one whether it wants control, and lets the highest-priority claimant write velocity. Walk has no special status. It's just the lowest-priority controller that always says yes, so it's the default when nothing else fires. A controller is six small functions: a <code>tick</code> that updates its own internal state every frame even when it isn't active, a pure <code>wantsControl</code> predicate that claims the frame, an <code>applyForces</code> that only the winner runs and that writes velocity and applies its own gravity if it wants any, plus optional <code>onEnter</code>, <code>onExit</code>, and <code>stateName</code>. Swim returns <code>ownsCollision: true</code> from <code>applyForces</code> to take over terrain handling, because its buoyancy spring would otherwise fight the engine's foot-snap.</p>
<p>Even the things that aren't locomotion still leak through that contract, and that forced the next idea. The piece that earns the architecture is channels. An earlier single-channel design ran everything through one arbitration, which meant a stamina tracker or a crouch stance had to pretend to be locomotion and then decline control with a <code>wantsControl</code> returns-false hack just to run its bookkeeping. The fix splits controllers into named channels that arbitrate independently and apply in a fixed order: resource, then stance, then locomotion. Resource runs first because its writes, like stamina decay, get read by the others. Stance runs second because crouch shrinking the capsule height has to land before walk reads it to cap top speed. Locomotion runs last and owns the per-frame velocity write. So a stamina observer and a crouch modifier and an active swim controller all coexist cleanly, each in its own channel, with no controller having to lie about what it is. The demo visualizes all of this with a bare capsule that changes color by active controller, so you can watch arbitration happen: green walk flips to orange on a steep slope as slide takes over, to cyan in the lake as swim wins, to cream midair when you tap glide.</p>
<h2>One engine, three bodies</h2>
<p>The test of &quot;owns no locomotion&quot; is whether the same engine, untouched, can drive something that isn't a player at all. <code>createCapsuleEngine</code> is a pure factory with no module-level state, no singletons, and no per-instance side effects, so the spike instantiates it three times. The player is one instance with the full controller set. A rideable horse is a second instance that registers only a walk controller, which makes the idea literal: a body's movement vocabulary is just whichever controllers you registered, so the horse is faster on the flat and physically can't climb, swim, or glide, because those controllers were never added. An autonomous NPC is a third instance, ticked every frame alongside the player, driven by a wander controller that synthesizes its own input so the body steers itself with no hands on the keyboard. The engine never learns that one of its bodies is a horse or that another is AI-driven. They're all the same capsule integrator with different controller lists.</p>
<p>Mounting is the one piece that lives outside the engine by design. Swapping control between the player and the horse means coordinating two engines, and a controller runs inside one engine and can't see across that boundary, so the mount logic sits at the host level: it's a small state machine that decides which engine gets stepped this frame, freezes the other, eases the rider onto the saddle with a smoothstep over three quarters of a second, and tells the camera which body to track. The engine factory never hears about any of it. That's the line the architecture draws and keeps. Behaviors that belong to one body are controllers, and coordination between bodies is the host's job, and keeping those separate is why a fourth or fortieth body would cost nothing new.</p>
<h2>Tested without a browser</h2>
<p>Because the engine reaches for no <code>window</code>, no <code>document</code>, and no Three.js, the whole thing runs headless. The spike ships a Node harness that mocks the terrain interface, drives the engine frame by frame with scripted input, and asserts on the resulting state, so the regressions that are miserable to catch by play-testing get caught in a script instead: the jump-and-land transition, swim entry and exit thresholds, climb auto-clearing when a surface flattens, stamina drain rates. Feeding the same input and timestep sequence twice and checking for byte-identical output state pins the engine as deterministic, which is the property a networked build will eventually lean on. One regression the harness caught is worth keeping: stepping from walkable ground onto a steeper-than-walk slope used to engage the slide controller and bounce the player back up the hill. The fix was a descent gate. Sliding only starts if the capsule is actually falling onto the slope, so walking horizontally into a steep face now blocks cleanly instead of sliding, and the test that asserts &quot;walking into a non-walkable slope blocks the player&quot; keeps it fixed.</p>
<h2>Plugging in a real avatar without touching the controllers</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/59-pluggable-with-avatar/" title="Spike 59 Pluggable With Avatar" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/59-pluggable-with-avatar/" target="_blank">Open Spike 59 in a new tab ↗</a> · <a href="/blog/spike-source?spike=59-pluggable-with-avatar">View source</a></p>
<p>Spike 59 is the test of whether the controller layer is really decoupled from the body. It swaps the colored capsule for a real skinned character, the 3MIKE FBX rig with Quaternius Universal Animation Library clips retargeted onto it, and the controllers don't change at all. The seam is a single string. Each controller already reports a state name through <code>stateName</code>, idle, walk, run, jump, fall, land, slide, glide, swim, swimIdle, and the avatar layer maps that name to a retargeted clip through an alias table and crossfades on switch. Walk picks its own sub-state dynamically from grounded plus vertical velocity plus horizontal speed, so a single walk controller drives idle, walk, run, jump, fall, and land, and the avatar just follows the reported name. Because this spike is single-player, the avatar drops the wire-integer indirection and multi-character abstraction from the earlier networked spikes and maps the state name straight to a clip. The proof is that the entire visual upgrade from capsule to rigged human touched zero lines of locomotion code, which is exactly what a pluggable controller is supposed to buy.</p>
<h2>A pack that needs no retargeting, and a picker you can test</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/60-polygon-animations/" title="Spike 60 Polygon Animations" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/60-polygon-animations/" target="_blank">Open Spike 60 in a new tab ↗</a> · <a href="/blog/spike-source?spike=60-polygon-animations">View source</a></p>
<p>Spike 60 plugs in a third body, Synty's POLYGON Base Locomotion pack, and the loader is almost nothing. Each clip ships as a standalone FBX carrying an embedded copy of the same Synty skeleton plus one baked animation, and because the character rig and every clip use identical bone names, you grab the clip off <code>fbx.animations[0]</code> and play it directly on the character's mixer with no retargeting library in the loop. Three.js resolves animation track targets by bone name rather than object identity, so a Synty or Mixamo-style pack authored against the matching rig just works. That's the deliberate contrast with the UAL path from the previous spike, which needs heavyweight retargeting because the source clips and the target rig were authored against different skeletons. Same controller, same state-name seam, two completely different animation pipelines behind it.</p>
<p>The other half of spike 60 is making the clip-picking logic testable. Choosing which clip to play is full of judgment thresholds, and that logic had been buried inside the avatar layer next to FBXLoader and the DOM where it couldn't be exercised. The spike extracts the picker into pure functions that touch neither Three.js nor the window: they take a plain player record (velocity, horizontal speed, facing, grounded, ground normal, impact velocity) and a clip-action stand-in, and return a clip alias string. That lets the thresholds live as named, asserted constants. Jump splits into walking, running, and sprinting variants by speed buckets aligned with the walk controller's actual sprint threshold. Landings split into soft, medium, and hard by impact velocity. Uphill and downhill clip variants fire from a slope-projection dot product with a flat-clip deadzone below about seven degrees. An idle-to-locomotion bridge always resolves forward so a standing start never plays a clip backward, and a stop bridge is gated by a minimum time-in-loop, because Synty's foot-phase stop clips contain about a second of authored deceleration that looks ridiculous tacked onto a step the player barely took. A small state debouncer holds off the fall state for a few frames so a one-frame loss of ground contact across a seam doesn't flicker the animation. Pulling all of that out of the rendering shell means the rules can be unit tested without a GPU, the same headless discipline the engine itself got in spike 58, which is the difference between locomotion feel you tune by guessing and locomotion feel you can pin down.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>A locomotion-free physics engine.</strong> The capsule engine integrates a kinematic body against terrain and owns no walk, run, jump, friction, speed cap, or gravity. Every behavior is a registered controller exposing <code>tick</code>, <code>wantsControl</code>, <code>applyForces</code>, and optional <code>onEnter</code>/<code>onExit</code>/<code>stateName</code>. Walk is just the lowest-priority always-yes default, and a controller can return <code>ownsCollision: true</code> to take over terrain handling (swim does, so its buoyancy spring doesn't fight foot-snap).</p>
<p><strong>Independent arbitration channels.</strong> Controllers register into named channels (resource, stance, locomotion) that arbitrate separately and apply in a fixed order, so observers like stamina and modifiers like crouch coexist with active locomotion instead of faking control and declining it. Resource writes (stamina) are read by stance and locomotion, stance writes (crouch capsule height) are read by locomotion's speed cap, and locomotion runs last and owns the velocity write.</p>
<p><strong>One factory, many bodies.</strong> <code>createCapsuleEngine</code> is a pure factory with no singletons, so the same engine drives the player, a walk-only rideable horse, and a self-steering NPC fed synthetic input. A body's movement vocabulary is exactly its registered controller set, so the horse can't climb or swim because those controllers were never added. Mounting lives at the host level rather than in a controller, because it coordinates two engines that can't see across each other. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<p><strong>Headless, deterministic testing.</strong> The engine touches no <code>window</code>, <code>document</code>, or Three.js, so a Node harness drives it frame by frame and asserts on jump-and-land, swim thresholds, climb auto-clear, and stamina drain. Replaying identical input twice and checking for identical output proves determinism, and a regression test pins the descent gate that stops a horizontal walk into a steep face from sliding the player backward.</p>
<p><strong>Body-agnostic avatar binding with a testable picker.</strong> Controllers report a state-name string and the visual layer maps it to a clip, so swapping a capsule for a retargeted 3MIKE + UAL avatar touches zero locomotion code. Synty POLYGON clips share bone names with the rig and play with no retargeting (Three.js binds tracks by bone name), unlike the UAL path's heavyweight retargeting. The clip picker is extracted into pure functions with named constants for jump speed buckets, landing severity, slope-projection variants, an always-forward idle bridge, a stop-bridge minimum-time guard, and a fall-state debouncer, so locomotion feel is unit-testable rather than guessed.</p>
<hr>
<p>Part 29 of 30.
Previous: <a href="/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion">Part 28 - Grass to the horizon, and ground that hides itself</a>
Next: <a href="/blog/2026-06-04-open-world-browser-part-30-collision-aware-camera">Part 30 - A camera that respects walls</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 28: Grass to the horizon, and ground that hides itself]]></title>
            <link>https://app.cinevva.com/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion</guid>
            <pubDate>Thu, 14 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 56 makes half a million grass clumps read as a field instead of green confetti, with one compute kernel and a cross-quad trick. Spike 57 benches four ways to cull what a hill is hiding, and finds the accelerated path is also the geometrically correct one.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 28: Grass to the horizon, and ground that hides itself</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-13-open-world-browser-part-27-island-and-terrain">Part 27</a> built the island and gave it ground that doesn't look tiled. This part covers the two things that make terrain feel inhabited rather than empty. Spike 56 is grass, the surface detail that turns a textured slope into a place you'd walk through, and the problem is making a field read as a field instead of scattered streaks. Spike 57 is the opposite of drawing more: it's about not drawing what a hill is already hiding, and the interesting result is that the fast way to test for it turned out to be the correct way too.</p>
<h2>Grass that reads as a field, not confetti</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/56-grass/" title="Spike 56 Grass" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/56-grass/" target="_blank">Open Spike 56 in a new tab ↗</a> · <a href="/blog/spike-source?spike=56-grass">View source</a></p>
<p>The core decision is geometric. A single thin tapered blade is sub-pixel from most camera angles, so half a million flat blades read as sparse green confetti rather than a field. The fix is a cross-quad clump: three tapered quads rotated sixty degrees apart around the local up axis, so from any viewing direction at least one quad sits nearly perpendicular to the camera and each instance covers roughly three blade-widths of actual screen area. That's the difference between seeing green streaks and seeing grass.</p>
<p>A WebGPU compute kernel places every clump once at init. It hashes the instance index into five decorrelated random streams, picks an XZ position inside the patch, samples ground height from the same FBM the CPU ground mesh uses (a TSL port with sign-preserving mod so the values match exactly and blades sit on the surface rather than floating above it), takes a central-difference normal, and rolls a per-clump width, height, and hue. The render side is a TSL vertex graph that bypasses the instance matrix entirely and writes straight to clip space: it scales the unit cross-quad, rotates local up onto the ground normal with Rodrigues' formula, and translates to the clump position. Distance LOD comes for free without a culling pass, because the vertex graph multiplies the clump's height by $1 - \text{smoothstep}(\text{fadeNear}, \text{fadeFar}, \text{dist})$, so far clumps collapse flat to zero height and stop costing fill. Wind is two octaves of sin and cos over the clump's world XZ plus time, applied horizontally and gated by the height fraction so the base stays anchored while the tips move, and a tiny camera-aware lean tips each clump toward the viewer so they open up perspectivally instead of reading as flat cards.</p>
<p>The color recipe is borrowed from NedMakesGames' Breath of the Wild URP shader: flat shading with the blade color a lerp from a root tone to a tip tone along the height fraction, where the root and tip tones are themselves lerped between two palettes by the per-clump hue value. That gives the dappled two-tone look a real BotW grass field has. Diffuse uses the ground normal against the sun with an ambient floor, because the cross-quad's per-quad normals are too noisy to shade individually for a stylized look. The whole field is one draw, placed and animated entirely on the GPU.</p>
<h2>Four ways to cull what a hill is hiding</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/57-terrain-occlusion/" title="Spike 57 Terrain Occlusion" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/57-terrain-occlusion/" target="_blank">Open Spike 57 in a new tab ↗</a> · <a href="/blog/spike-source?spike=57-terrain-occlusion">View source</a></p>
<p>Spike 57 benches four culling paths over the same procedural world the production client streams, scaled 1.8x vertically so hills actually occlude foliage. T0 is distance-only, matching what the shipping chunk visibility already does. T1 adds frustum culling, the single biggest cheap win, dropping everything outside the view cone. T2 adds a terrain-aware horizon test: march a ray from the eye to each instance and reject it if the heightmap rises above the ray anywhere along the way, so a tree behind a ridge gets culled even though it's inside the frustum. T3 keeps the same horizon test but accelerates it with a max-height pyramid, and T4 ports the whole distance-plus-frustum-plus-horizon test to a TSL compute kernel that writes a per-instance visibility scale the foliage material reads to collapse hidden vertices. A two-frame stay-visible counter smooths the single-frame flicker when a sample point lands just inside or outside a texel as the camera nudges, kept short because anything longer masks algorithmic bugs instead of fixing them.</p>
<p>The pyramid is where the spike pays off, and the lesson is about matching the test to what's actually on screen. The rendered terrain is a triangle mesh with vertices on a fixed two-meter grid, and between vertices the rasterizer interpolates linearly, so the real rendered height inside any rectangle is the max of the vertices inside it, never the continuous noise peak between them. If the occlusion pyramid samples the noise at a finer grid, it finds phantom peaks the mesh never displays and starts blocking rays the camera can plainly see through. So the pyramid's base texels sit exactly on the vertex grid, each storing the max of its four corner vertices, and upper levels are textbook 2x2 max reductions, which makes it exact with respect to the rendered mesh. For the per-step ray test the code point-samples the mesh with bilinear interpolation rather than querying the pyramid, because a sub-texel AABB query returns the whole texel's max and inflates the height by several meters on steep ridges, which is exactly the over-occlusion that would hide visible props.</p>
<p>The surprising result is that T2, the brute-force reference, is the one that's wrong. Because T2 point-samples the continuous noise directly, it catches peaks between mesh vertices that don't render, so it over-occludes slightly and hides foliage the player can actually see. The pyramid path is both faster, because of the $O(\log N)$ AABB reduction for chunk-level tests, and more geometrically correct, because it can only ever return heights the mesh truly displays. That's the spike's whole point: the accelerated structure isn't a quality compromise you accept for speed, it's the version that matches reality. Chunk culling runs a five-point test per chunk (four top corners plus center at the chunk's max height) and excludes each chunk's own footprint from the occluder set so a chunk never occludes itself. The recommended production path is T4: push the instance metadata and height field into storage buffers and run the identical loop in a compute shader with an indirect draw, since the renderer is moving to WebGPU anyway.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Cross-quad GPU grass.</strong> Three tapered quads rotated sixty degrees apart per clump guarantee one near-perpendicular quad from any angle, so half a million instances read as a field rather than sub-pixel confetti. A compute kernel places every clump (FBM ground height sampled with the same sign-preserving mod as the CPU mesh, central-difference normal, per-clump size and hue), and a TSL vertex graph bypasses the instance matrix to scale, Rodrigues-rotate onto the normal, translate, and apply height-gated wind. Distance LOD is free: clumps collapse to zero height by $1 - \text{smoothstep}(\text{fadeNear}, \text{fadeFar}, \text{dist})$. Color follows NedMakesGames' BotW recipe, a root-to-tip gradient over two hue-mixed palettes. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<p><strong>Terrain horizon occlusion culling.</strong> Four benched paths over the production world: distance, plus frustum, plus a heightmap ray test that rejects instances behind a ridge, plus a max-height pyramid that accelerates it, plus a TSL compute port. The pyramid samples on the exact two-meter vertex grid the mesh tessellates on (base texel = max of four corner vertices, 2x2 max-reduce upward), so it returns only heights the rasterizer actually displays.</p>
<p><strong>Accelerated and correct, with no trade-off.</strong> Point-sampling continuous noise (the brute-force T2 path) finds peaks between mesh vertices that never render, over-occluding visible foliage. The vertex-grid pyramid is both faster ($O(\log N)$ AABB reduction) and geometrically exact, so per-step ray tests bilinear-sample the mesh rather than querying the pyramid's per-texel max, which would inflate heights by meters on steep ridges. Chunk culling uses a five-point test and excludes each chunk's own footprint so it never self-occludes. The production path pushes metadata and the height field into storage buffers for a compute-shader cull with indirect draw.</p>
<hr>
<p>Part 28 of 29.
Previous: <a href="/blog/2026-05-13-open-world-browser-part-27-island-and-terrain">Part 27 - An island from noise, ground that looks like ground</a>
Next: <a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">Part 29 - One controller, any body</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 27: An island from noise, ground that looks like ground]]></title>
            <link>https://app.cinevva.com/blog/2026-05-13-open-world-browser-part-27-island-and-terrain</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-13-open-world-browser-part-27-island-and-terrain</guid>
            <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 54 grows a believable island from noise alone: domain-warped FBM shaped by a radial falloff, then hydraulic erosion that carves real drainage, then biomes assigned from elevation and moisture. Spike 55 fixes the oldest texture problem there is, the tile that repeats, with four sampling modes and the one that actually wins.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 27: An island from noise, ground that looks like ground</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-12-open-world-browser-part-26-water">Part 26</a> put water on the world. This part builds the land under it, in two stages that mirror how a real place comes to be. Spike 54 is the terrain itself, grown from noise rather than sculpted by hand, then weathered until it has the drainage and the coastline of somewhere that water has actually run across. Spike 55 is the skin on that terrain: solving the problem that defeats almost every procedural ground, which is that a tiled texture looks tiled. The two together answer one question, can a creator get a plausible island and ground that reads as ground without an artist touching either, and the answer is yes if you copy the right recipes.</p>
<h2>A coastline that noise alone won't give you</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/54-procgen-island/" title="Spike 54 Procedural Island" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/54-procgen-island/" target="_blank">Open Spike 54 in a new tab ↗</a> · <a href="/blog/spike-source?spike=54-procgen-island">View source</a></p>
<p>The heightmap follows the Red Blob Games recipes, which are a stack of small transforms each fixing a specific flaw in raw noise. Fractional Brownian motion sums several octaves of Perlin noise so the terrain has both broad hills and fine detail, but plain FBM looks soft and grid-aligned, so the sample point gets domain-warped first: you offset each coordinate by another noise field, $p' = p + \text{noise}(p)\cdot s$, which bends the ridges into something organic instead of axis-locked. Then redistribution, raising elevation to a power $e^{,k}$, pushes the midtones down so the world has flat valleys and sharp peaks rather than everything sitting at the same gentle slope. The piece that makes it an island rather than infinite hills is a radial falloff: compute a euclidean distance from center, $d = \min(1, \sqrt{n_x^2 + n_y^2})$, and blend the elevation toward $1 - d$ so the terrain drops into ocean at the edges. A second independent noise field becomes a moisture map, which does nothing for the shape but feeds the biome step later.</p>
<p>That gets you a shape, but it's a noise shape. It has no rivers, valleys cut by water or sediment fans, because nothing has ever flowed across it. The fix is hydraulic erosion, ported from Sebastian Lague's MIT-licensed implementation. Thousands of water droplets spawn at random and roll downhill, each carrying inertia so it doesn't make hard right-angle turns, picking up sediment when it speeds up and depositing it when it slows or pools, with a precomputed circular brush spreading each erosion event over a small radius so the carve is smooth rather than a one-pixel scratch, and evaporation that retires the droplet over its lifetime. Run enough droplets and the terrain grows the thing noise can't fake: drainage networks that converge, valleys that widen downstream, and flats where sediment settled.</p>
<h2>Erosion on the GPU, and rivers that know where they are</h2>
<p>The CPU erosion is correct but slow, so the spike also ports it to a WebGPU compute shader, and the interesting part is what GPU atomics force on you. Heights are stored as fixed-point <code>i32</code> with a scale of one million, because WGSL has no atomic add on floats, and the only way thousands of droplets can deposit and remove sediment from the same cell in parallel without races is <code>atomicAdd</code> and <code>atomicSub</code> on integers. The fixed-point round-trip means a cell can occasionally go slightly negative under heavy concurrent drag, which is harmless and clamped on readback. The CPU version precomputes a per-cell brush table, but at a $1001^2$ grid that table is around 100 MB, so the GPU port recomputes each droplet's brush on the fly instead, trading a little arithmetic for a lot of memory. Droplet start positions still come from the CPU through a Mulberry32 generator so runs are deterministic.</p>
<p>Two more passes turn weathered terrain into a readable map. Drainage uses the Red Blob D8 flow-accumulation method: drop one unit of rain on every cell, sort all cells by elevation descending, and pass each cell's accumulated water to its single lowest neighbor, so water piles up along the natural valleys, and any cell whose accumulation crosses a threshold is marked river. The catch is that an eroded heightmap has pits, local depressions with no downhill exit, and water entering a pit just stops, breaking the accumulation. So before drainage runs, Planchon-Darboux pit filling raises each pit to just above its lowest neighbor, $\text{minNeighbour} + \epsilon$, iterating under twenty passes until every cell has somewhere to drain. Finally biomes are assigned the Red Blob way, a two-axis lookup on elevation against moisture so a high-and-dry cell becomes rock while a low-and-wet one becomes marsh, with slope-aware overrides on top: steep faces force to rock regardless of moisture, the waterline band becomes beach, and the highest elevations take snow. The result is an island you can read at a glance, generated end to end from two noise seeds.</p>
<h2>The tile that won't stop repeating</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/55-terrain-shading/" title="Spike 55 Terrain Shading" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/55-terrain-shading/" target="_blank">Open Spike 55 in a new tab ↗</a> · <a href="/blog/spike-source?spike=55-terrain-shading">View source</a></p>
<p>A terrain needs a material that covers kilometers from a texture that's a couple of meters across, and as soon as you scale a tile up to cover ground, the eye locks onto the repetition. Spike 55 is an A/B bench of four sampling modes on the same geometry and lighting, so the only variable is how the texture is read. The baseline is <code>plain</code>: one sample at the scaled UV, which tiles obviously every few meters and exists only as the thing to beat. The free PBR layers come from Poly Haven over their CDN, diffuse plus the packed ARM map (ambient occlusion, roughness, metalness) plus a GL normal, all CC0, loaded with anisotropy 8 and mipmaps.</p>
<p>The interesting three are different attacks on the repeat. The <code>hex-linear</code> mode is the Heitz-Neyret triangle grid: lay a skewed triangular lattice over the surface, and each fragment sits inside one triangle whose three vertices each take a randomly offset tap, blended by barycentric weights so neighboring regions sample different parts of the texture and the large-scale tiling dissolves. But a plain linear blend of three taps averages their colors at the triangle edges, which leaves a visible triangular pattern, the exact artifact spike 48 ran into. The <code>hex-vp</code> mode is the published fix from the same 2018 paper: after the barycentric sum, subtract the texture's mean color, rescale by the inverse square root of the sum of squared weights to hold variance constant, then add the mean back. That keeps contrast steady across the blend so the triangles vanish, and that's the reason the material does a 1-by-1 readback of each loaded texture to estimate its mean color up front. The fourth mode, <code>iq-untiled</code>, is Inigo Quilez's Texture Repetition technique 3: two offset taps blended by a low-frequency variation pattern, only two samples instead of three and no triangle structure to begin with, the cheap option that holds up.</p>
<p>On top of any mode sits optional triplanar projection, which lets the same material wrap a cliff without stretching. Instead of one UV, the shader samples three world-axis projections, the X-facing surfaces read the YZ plane, Y reads ZX, Z reads XY, and blends them by <code>abs(normalWorld)</code> raised to a sharpening power between four and eight so a 45-degree slope doesn't ghost all three projections into mush. The bench makes the tradeoff legible: variance-preserving hex blending is the quality winner and Quilez's two-tap is the performance-conscious one, and both beat plain by a wide enough margin that no creator should ever ship the plain tile.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Recipe-stacked heightmap generation.</strong> Red Blob Games recipes compose raw noise into terrain: domain-warped FBM ($p' = p + \text{noise}(p)\cdot s$) for organic ridges, $e^{,k}$ redistribution for flat valleys and sharp peaks, and a euclidean radial falloff blended toward $1 - d$ to drop the edges into ocean and make an island. A second noise field is the moisture map for biome assignment. See <a href="/guides/landscape-generation-browser">landscape generation</a>.</p>
<p><strong>Hydraulic erosion, CPU and GPU.</strong> Sebastian Lague's droplet model (inertia, carrying capacity, a precomputed circular deposit brush, evaporation) carves real drainage that noise can't fake. The WebGPU compute port stores heights as fixed-point <code>i32</code> at a scale of one million so droplets can <code>atomicAdd</code>/<code>atomicSub</code> the same cell in parallel, recomputes each droplet's brush on the fly to avoid a ~100 MB table at $1001^2$, and seeds start positions from a deterministic Mulberry32 generator.</p>
<p><strong>D8 drainage with pit filling.</strong> Red Blob D8 flow accumulation drops one unit of rain per cell, sorts cells by descending elevation, and passes water to each cell's lowest neighbor, marking rivers above a threshold. Planchon-Darboux pit filling first raises every local depression to $\text{minNeighbour} + \epsilon$ (iterating under twenty passes) so water never gets trapped and accumulation stays connected. A two-axis elevation-by-moisture lookup assigns biomes, with slope overrides forcing rock on cliffs, beach at the waterline, and snow on peaks.</p>
<p><strong>Breaking texture tiling four ways.</strong> On identical geometry and lighting: <code>plain</code> (one tap, tiles obviously), <code>hex-linear</code> (Heitz-Neyret triangle grid, linear blend leaves a triangle pattern), <code>hex-vp</code> (the EGSR 2018 §3.3 variance-preserving fix that subtracts the mean, rescales by inverse-sqrt of squared weights, and re-adds the mean, needing a 1×1 mean readback per texture), and <code>iq-untiled</code> (Inigo Quilez two-tap technique 3). Triplanar projection samples three world-axis planes blended by <code>abs(normalWorld)</code> to a power of 4-8 so cliffs don't stretch. Variance-preserving wins on quality, two-tap on cost. See <a href="/guides/landscape-generation-browser#terrain-materials">terrain materials</a>.</p>
<hr>
<p>Part 27 of 29.
Previous: <a href="/blog/2026-05-12-open-world-browser-part-26-water">Part 26 - Three ways to make water</a>
Next: <a href="/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion">Part 28 - Grass to the horizon, and ground that hides itself</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 26: Three ways to make water]]></title>
            <link>https://app.cinevva.com/blog/2026-05-12-open-world-browser-part-26-water</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-12-open-world-browser-part-26-water</guid>
            <pubDate>Tue, 12 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 51 built screen-space reflection water and hit its fundamental wall: it can't reflect what the camera never saw. Spike 52 switched to a planar mirror, the pattern every shipping game uses, and killed a bug that ate dark reflections. Spike 53 dropped in a production water library to see what finished looks like.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 26: Three ways to make water</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-10-open-world-browser-part-25-universal-characters">Part 25</a> dressed the avatars. This part is about water, and it's three spikes because water is the surface where a cheap shortcut and the correct answer look identical in a screenshot and completely different in motion. Spike 51 builds reflection the screen-space way, the tempting one, and runs straight into its built-in limitation. Spike 52 switches to the method every shipping game actually uses. Spike 53 drops in a finished water library to see how far &quot;done&quot; is from where we are. All three share one refraction layer, so the only variable that moves between the first two is how the reflection gets computed.</p>
<h2>Reflection from the screen you already have</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/51-water-ssr-caustics/" title="Spike 51 Water SSR" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/51-water-ssr-caustics/" target="_blank">Open Spike 51 in a new tab ↗</a> · <a href="/blog/spike-source?spike=51-water-ssr-caustics">View source</a></p>
<p>Screen-space reflection reuses the frame you already rendered. For each water pixel, you reflect the view ray off the surface, march that reflected ray through the depth buffer, and when the ray passes behind a recorded surface you've found what the water reflects, sampled straight from the color buffer. The port follows three.js's <code>SSRNode</code> line by line, which in turn follows lettier's SSR primer. The march is a DDA walk in screen space: project the ray's start and end to pixel coordinates and step along whichever axis is longer, one tap per pixel. The reflected ray's depth at each step needs perspective-correct interpolation, $\frac{1}{1/z_0 + s,(1/z_1 - 1/z_0)}$, because linearly interpolating view-Z is simply wrong and produces hits in the wrong place.</p>
<p>Two things make this usable rather than a slideshow. The coarse march is capped at 64 steps, because a long ray that projects across a thousand pixels would otherwise run hundreds of iterations per fragment, and a million-fragment water plane times hundreds of iterations times a few texture samples is a 30 fps scene. Quality controls the effective stride within that cap instead of the iteration count. And because a capped coarse march leaves visible stair-step banding, a six-iteration binary refinement bisects the interval between the last miss and the hit, which is 64x sub-step accuracy, enough that neighboring water fragments stop locking onto the same coarse hit position. A final point-to-line distance check confirms the candidate is genuinely on the reflection ray rather than just at the same depth, with a thickness tolerance that auto-scales to the view-space width of one pixel at that depth, tighter up close and looser far away.</p>
<p>The limitation of this spike is written into its own comments: SSR cannot reflect what the main camera never sampled. A tree's underside, anything off-screen, anything occluded, none of it exists in the buffers, so it can't appear in the reflection. That's the &quot;wrong-side information loss&quot; that no amount of march quality fixes, and it's the reason the next spike exists.</p>
<h2>The mirror that can't lie</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/52-water-planar/" title="Spike 52 Water Planar" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/52-water-planar/" target="_blank">Open Spike 52 in a new tab ↗</a> · <a href="/blog/spike-source?spike=52-water-planar">View source</a></p>
<p>A planar reflection renders the scene a second time from a camera mirrored across the water plane, into an offscreen target, and the water shader samples that target. This is the canonical pattern, what UE5 Water, three.js's own <code>WaterMesh</code>, ABZÛ, and Sea of Thieves all use, because it has every pixel of the scene to draw from, including the geometry SSR can never see. In TSL it's almost anticlimactic: <code>reflector()</code> allocates the mirrored helper camera and its render target, you add its target to the mesh so it updates each frame, and you sample its color. When waves come later, the reflection wobbles by adding a distortion offset to the reflector's UV node, which is exactly the line <code>WaterMesh</code> uses.</p>
<p>The notable bug was in the safety net rather than the mirror. An earlier version blended the reflector's output with a procedural sky as a fallback, weighted by the magnitude of the reflected color, on the theory that a near-zero reflection meant the target had nothing there. But a dark canopy shadow also has a low magnitude, so the clamp never reached full strength and those genuinely dark pixels got mixed with bright sky. The symptom the user caught was precise: the raw mirror target in debug mode showed perfect dark trees, while the composed render had washed-out reflections, and the diagnosis was that the shader &quot;vanishes dark colors.&quot; The fix was deletion. The reflector target is reliable after the first frame, so there's no need for a fallback at all. Both spikes share the same refraction underneath: sample the scene behind the surface, reconstruct how far below the waterline each pixel sits, and apply per-channel Beer-Lambert extinction so red dies within a few meters while blue persists, with a sky mask so the far-plane backdrop doesn't get fogged. Schlick Fresnel mixes refraction when you look straight down into the water with reflection when you look across it.</p>
<h2>What finished looks like</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/53-water-pro/" title="Spike 53 Water Pro" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/53-water-pro/" target="_blank">Open Spike 53 in a new tab ↗</a> · <a href="/blog/spike-source?spike=53-water-pro">View source</a></p>
<p>Spike 53 is the build-versus-buy check. It drops in <code>threejs-water-pro</code> as it ships, with its tropical preset, default ocean clipmap, camera tracking, and Rayleigh sky, and loads the same island glTF the library's own demo uses. The point is to see the gap between a hand-rolled flat-water shader and a full ocean system, and the gap is large: this one has a buoyancy system that samples wave height at several points under a ship's hull so it pitches and rolls instead of just bobbing, a wake generator, shoreline and surface foam, and a mask pass that suppresses water rendering inside the ship's hull so ripples don't bleed through the deck.</p>
<p>Integrating it surfaced the kind of detail you only learn by using a library rather than reading its README. Foam textures are referenced by filename in the preset but loading them is the consumer's job, and without them the shoreline reads as a hard waterline edge instead of breaking surf. The island is positioned so its underwater geometry drops past the ocean floor, letting the library's floor mesh occlude the model's outer ring with no visible plane edge, which is the library's intended pattern: bring a 3D model, don't synthesize terrain. And antialiasing is off on the renderer in favor of a post-process FXAA pass, because MSAA blends edge fragments against the background before the depth-aware atmospheric fog runs, leaving a thin dark fringe wherever geometry meets fog. Resolving aliasing after the fog instead of before it removes the fringe. What this de-risks is the decision itself: a production ocean is a large, specialized system, and for the cases where we need one, adopting a maintained library beats rebuilding wakes and buoyancy and foam from scratch, while the planar-mirror shader from spike 52 stays the right answer for the smaller inland water a creator places in their own world.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Screen-space reflection water.</strong> A reflected view ray marches the depth buffer in screen space via DDA, using perspective-correct 1/z interpolation, a hard step cap to bound the per-fragment cost, and a binary refinement pass to remove the banding a capped march leaves. A point-to-line confirmation with depth-scaled thickness rejects false hits. The method's hard limit is that it can only reflect geometry the main camera already sampled, so off-screen and wrong-side surfaces never appear. See <a href="/guides/landscape-generation-browser#terrain-materials">terrain materials</a>.</p>
<p><strong>Planar mirror reflection.</strong> A helper camera mirrored across the water plane renders the scene into an offscreen target that the water shader samples, giving pixel-perfect reflections including geometry SSR can't see. This is the pattern UE5 Water and three.js <code>WaterMesh</code> use, with wave distortion applied as an offset to the reflector's UV node. A magnitude-weighted sky fallback wrongly erased dark reflection pixels, and the reflector target is reliable after the first frame, and removing the fallback was the fix.</p>
<p><strong>Beer-Lambert depth tint refraction.</strong> Both shaders sample the scene behind the surface, reconstruct each backdrop pixel's depth below the waterline, and apply per-channel exponential extinction (red dies in meters, blue persists) composited toward a water-fog color, with a sky mask so the far plane isn't fogged. Schlick Fresnel blends refraction at normal incidence with reflection at grazing angles.</p>
<p><strong>Adopting a production water library.</strong> <code>threejs-water-pro</code> ships an ocean clipmap, Rayleigh sky, multi-point buoyancy for ship pitch and roll, wakes, foam, and a hull mask pass. Consumer-side details matter: foam textures must be loaded explicitly, island underwater geometry should drop past the ocean floor so the floor occludes its edges, and antialiasing should run as a post-process FXAA pass rather than MSAA to avoid a dark fog fringe at geometry edges.</p>
<hr>
<p>Part 26 of 29.
Previous: <a href="/blog/2026-05-10-open-world-browser-part-25-universal-characters">Part 25 - One skeleton, every outfit</a>
Next: <a href="/blog/2026-05-13-open-world-browser-part-27-island-and-terrain">Part 27 - An island from noise, ground that looks like ground</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How modern engines beat foliage overdraw]]></title>
            <link>https://app.cinevva.com/blog/2026-05-11-foliage-overdraw</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-11-foliage-overdraw</guid>
            <pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Z-prepasses, octahedral imposters, GPU-driven cluster culling, hashed alpha, visibility buffers, and distance-field shadows: the stack that turns 8-15x foliage overdraw into 1-2x in dense forest scenes.]]></description>
            <content:encoded><![CDATA[<h1>How modern engines beat foliage overdraw</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="/img/blog/foliage_overdraw_hero.webp" alt="Dense forest canopy with overlapping leaf cards stacked behind each other in front of a setting sun, suggesting heavy overdraw" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>A forest is one of the worst things you can ask a GPU to render. Each leaf is a textured quad with an alpha mask cut out of it. Dozens of those quads stack on top of each other along every view ray. The rasterizer has no way to know in advance which fragments will pass the alpha test, so the standard early-Z optimization that saves opaque scenes is mostly turned off. The result is that a single screen pixel can run the full leaf shader 10 or 15 times before the frame settles. That's foliage overdraw, and it's the single most expensive part of an open-world frame in any game shipped in the last decade.</p>
<p>It's a solved problem, in the sense that a stack of seven or eight techniques, combined, takes effective overdraw from 8-15x in a dense forest down to 1-2x. Every modern engine ships some version of this stack. This post covers what's in it, why each piece exists, and the canonical references for each.</p>
<h2>1. Why foliage overdraw is so painful</h2>
<p>In a typical opaque scene, the GPU does early depth rejection: before the pixel shader even runs, the hardware checks the existing depth buffer and skips fragments that are already behind something. This is essentially free and it's what keeps the cost of dense geometry sane.</p>
<p>Alpha-tested foliage breaks this. The fragment shader has to actually run to evaluate the alpha texture and call <code>discard</code> (or <code>clip</code>) on the masked-out pixels. The hardware can't know whether a fragment will be killed until after the shader runs, so on most GPUs the use of <code>discard</code> anywhere in a shader disables early-Z for that draw call entirely. On tile-based GPUs (mobile, M-series, some consoles) it can disable Hi-Z and depth compression for the whole frame. The pixel shader runs once for every triangle that covers a pixel, and most of those evaluations end with a discard.</p>
<p>Stack 10 leaf quads in front of a single screen pixel and the leaf shader runs 10 times. Multiply by 4 million pixels and the cost is brutal. Marco Salvi's writeup <a href="https://therealmjp.github.io/posts/to-earlyz-or-not-to-earlyz/">To Early-Z, or Not To Early-Z</a> is the gentlest tour of why this happens at the hardware level, and it's the right place to start if you've never thought about it before.</p>
<img src="/img/blog/foliage_overdraw_layers.webp" alt="Side view of a single screen pixel ray passing through twelve overlapping leaf cards, with each card highlighted to show stacked alpha-tested fragments" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<h2>2. The depth prepass for masked geometry</h2>
<p>The biggest single win, and the technique every modern engine ships, is splitting the foliage draw into two passes. The first pass writes only depth, with a minimal shader that does the alpha test, discards the masked pixels, and writes nothing else. The second pass renders the full material with depth testing set to &quot;equal&quot; and depth writes off. Each visible pixel now shades the full BRDF exactly once, no matter how many leaf quads were stacked behind it.</p>
<p>This sounds like double work because you're touching the same triangles twice, but the prepass shader is so cheap (one texture sample, one discard, one depth write) that the savings on the main pass dwarf the extra cost. In a dense forest the main pass goes from running the full leaf shader 10-15 times per pixel to running it exactly once.</p>
<p>Unreal, Frostbite, Decima, and the modern Rage and Dunia branches all do this. It's also the key reason masked materials are still cheaper than translucent materials in any of these engines.</p>
<p>Deep dives:</p>
<ul>
<li>Pettineo, <a href="https://therealmjp.github.io/posts/to-earlyz-or-not-to-earlyz/">To Early-Z, or Not To Early-Z</a> (the canonical writeup of how <code>discard</code> interacts with Hi-Z and early-Z).</li>
<li>Wihlidal, <a href="http://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/">Optimizing the Graphics Pipeline with Compute</a> (GDC 2016, the Frostbite depth-prepass and prepass-driven culling architecture).</li>
<li>Sanders, <a href="https://www.gdcvault.com/play/1025066/Between-Tech-and-Art-The">Between Tech and Art: The Vegetation of Horizon Zero Dawn</a> (GDC 2018, with Decima's two-pass foliage rendering).</li>
<li>Persson, <a href="http://www.humus.name/index.php?page=News&amp;ID=255">A couple of notes about Z</a> (still one of the clearest explanations of depth-equal testing and prepass economics).</li>
</ul>
<h2>3. Aggressive LODs and octahedral imposters</h2>
<p>The second-biggest win is never drawing the leaves at all when you don't have to. Foliage assets ship with several LOD tiers. The closest is the full mesh with individual leaf cards. At medium range, the leaves collapse into denser composite cards (a clump of 30 leaves becomes 1 textured card with the same silhouette). Beyond a distance threshold, the entire tree becomes an <em>imposter</em>: a small piece of geometry textured with pre-rendered views of the tree from many angles.</p>
<p>The modern imposter format is the <strong>octahedral imposter</strong>: an 8-faced piece of geometry textured with an atlas of views captured from points on a sphere using octahedral mapping. At runtime, the shader picks the closest two or three pre-rendered views based on the camera direction and blends between them. The result is a few-triangle stand-in that looks 3D from any angle and can have proper shading, normal maps, and even wind animation. Ryan Brucks' implementation, originally a community plugin and now part of Unreal, is the reference. Microsoft Flight Simulator's billion-tree forests are essentially octahedral imposters everywhere except the camera.</p>
<p>The bigger structural win is that imposters are <em>opaque or near-opaque</em> at distance. The 30-leaf composite card is a single masked quad instead of 30 quads. The whole-tree imposter is a few faces rather than thousands. Far-field overdraw collapses to almost nothing.</p>
<p>Deep dives:</p>
<ul>
<li>Brucks, <a href="https://shaderbits.com/blog/octahedral-impostors">Octahedral Impostors</a> (the canonical reference, with the math and the UE implementation).</li>
<li>Halen, <a href="https://dev.epicgames.com/community/learning/tutorials/JmL3/octahedral-impostors-unreal-engine">Octahedral Impostors in Unreal Engine</a> (the integrated UE workflow).</li>
<li>Häggström, <a href="https://www.diva-portal.org/smash/get/diva2:1135856/FULLTEXT01.pdf">Real-Time Rendering of Vegetation</a> (a clean thesis covering LOD chains, imposters, and the math behind them).</li>
<li>Crytek, <a href="http://developer.nvidia.com/gpugems/gpugems3/part-i-geometry/chapter-4-next-generation-speedtree-rendering">SpeedTree integration in CryEngine 3</a> (GPU Gems 3, still the best primer on tree LOD chains).</li>
</ul>
<h2>4. Cluster and GPU-driven culling</h2>
<p>Even with a depth prepass, the prepass itself has a cost: it still has to <em>touch</em> every triangle of every visible (or potentially visible) tree. Modern engines push that cost down with GPU-driven cluster culling, which throws away whole groups of triangles before the rasterizer ever sees them.</p>
<p>The pipeline looks like this: every mesh is pre-split into clusters of 64 or 128 triangles with a tight bounding box and a cone of normals. At render time, a compute shader walks the instance list, frustum-tests each instance, then frustum-tests every cluster of every visible instance, then <em>Hi-Z occlusion-tests</em> each surviving cluster against the previous frame's depth pyramid. Whole branches of trees that are hidden behind a hill or in front of another tree get culled before any vertex shader runs. The output is a compact list of &quot;draw these clusters&quot; arguments fed straight into a single <code>DrawIndirect</code> call.</p>
<p>This is what makes a forest of 10,000 trees render in milliseconds instead of seconds. Ubisoft's Assassin's Creed Unity talk introduced this pipeline in production form (20-40% triangles culled, 30-80% shadow triangles culled, 10x more instances on screen than the previous generation), and Wihlidal's Frostbite talk took it further. UE5 Nanite is the visible end-state of this trajectory: cluster culling all the way down to the pixel.</p>
<p>Deep dives:</p>
<ul>
<li>Haar and Aaltonen, <a href="https://advances.realtimerendering.com/s2015/aaltonenhaar_siggraph2015_combined_final_footer_220dpi.pdf">GPU-Driven Rendering Pipelines</a> (SIGGRAPH 2015, the foundational Assassin's Creed Unity talk).</li>
<li>Wihlidal, <a href="http://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/">Optimizing the Graphics Pipeline with Compute</a> (GDC 2016, Frostbite's GPU-driven prepass).</li>
<li>Karis, Stubbe, Wihlidal, <a href="https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf">A Deep Dive into Nanite Virtualized Geometry</a> (SIGGRAPH 2021, cluster culling at meshlet granularity).</li>
<li>Liktor, <a href="https://research.activision.com/publications/2021/09/geometry-rendering-pipeline-architecture-at-activision">Geometry Rendering Pipeline Architecture at Activision</a> (the Call of Duty version of cluster culling, 2021).</li>
</ul>
<h2>5. Front-to-back instance and cluster sorting</h2>
<p>Once the prepass is doing its job, <em>order</em> starts to matter. The prepass writes depth, but only for fragments that pass the alpha test. If you draw the back of the forest first and the front last, every front fragment overwrites a back fragment, and the prepass shader still runs for the back. If you draw front-to-back, each successive draw fills more of the depth buffer with smaller values, and Hi-Z rejects more and more of the back fragments before the shader runs.</p>
<p>This is why almost every modern engine sorts foliage instances by distance to camera before issuing the prepass. The sort is cheap (a few hundred thousand instances on the GPU using a radix sort), and it turns the prepass itself into a self-pruning operation. Cluster-level culling sorts at the meshlet granularity for the same reason. The depth prepass and front-to-back ordering are the kind of pair where each is good and the combination is great.</p>
<p>Deep dives:</p>
<ul>
<li>Persson, <a href="http://www.humus.name/Articles/Persson_DepthInDepth.pdf">Depth in-depth</a> (the architectural notes on depth-buffer ordering, prepass economics, and Hi-Z behavior).</li>
<li>Giesen, <a href="https://fgiesen.wordpress.com/2011/07/04/a-trip-through-the-graphics-pipeline-2011-part-7/">A trip through the graphics pipeline</a> (the deep technical explanation of how Hi-Z reject rate depends on draw order).</li>
<li>Wihlidal, <a href="http://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/">Optimizing the Graphics Pipeline with Compute</a> (GDC 2016, includes Frostbite's GPU-side instance sort).</li>
</ul>
<h2>6. Dithered LOD transitions and hashed alpha</h2>
<p>The other big trap is fading. The naive way to transition between two LODs (or to fade an instance in or out as the camera approaches) is alpha blending. But blended geometry can't write to the depth buffer, which kicks every fading tree into the slow translucent path and breaks the prepass. The solution is to keep the geometry in the masked path and do the fade <em>inside the alpha test</em>.</p>
<p>Two main techniques:</p>
<ul>
<li><strong>Dithered LOD transitions</strong> sample a 4x4 or 8x8 Bayer pattern (or a screen-space blue-noise texture) and use that as a per-pixel cutoff modifier. A tree at 50% blend has a checkerboard of pixels surviving, and the missing pixels are filled in by the next LOD's complementary checkerboard. TAA resolves the checker into a smooth blend across two or three frames. Cheap, stable, blends with everything else in the engine.</li>
<li><strong>Hashed alpha testing</strong> (Wyman &amp; McGuire, I3D 2017) replaces the fixed 0.5 alpha threshold with a per-pixel hashed threshold in [0,1). Distant alpha geometry that would normally vanish entirely (because the mipmapped alpha drops below 0.5) keeps a stable scattering of surviving pixels. TAA again does the cleanup.</li>
</ul>
<p>Both techniques keep foliage in the opaque/masked path where the depth prepass works, so you don't pay the full translucent rendering cost just to fade something in. <strong>Alpha to coverage</strong> is the MSAA-era cousin of the same idea: convert alpha into a sub-pixel coverage mask, get partial transparency without leaving the masked path. The catch is that A2C only really shines with MSAA, which most modern deferred renderers no longer use.</p>
<p>Deep dives:</p>
<ul>
<li>Wyman and McGuire, <a href="https://research.nvidia.com/labs/rtr/publication/wyman2017hashed/">Hashed Alpha Testing</a> (I3D 2017, the canonical hashed-alpha paper).</li>
<li>Castaño, <a href="http://the-witness.net/news/2010/09/computing-alpha-mipmaps/">Computing Alpha Mipmaps</a> (The Witness blog, the right way to mip alpha-tested textures so distant trees don't vanish).</li>
<li>Yuksel, <a href="https://cemyuksel.com/research/alphadistribution/alpha_distribution.pdf">Alpha Distribution for Alpha Testing</a> (a more recent improvement on alpha mipmaps).</li>
<li>NVIDIA, <a href="https://developer.nvidia.com/content/transparency-or-translucency-rendering">Anti-Aliased Alpha Testing</a> (a survey of A2C, hashed alpha, and dithered alternatives).</li>
</ul>
<h2>7. Reducing shading cost on masked pixels</h2>
<p>Even with a perfect prepass and perfect culling, you still have to shade every visible foliage pixel once. Engines reduce that cost too:</p>
<ul>
<li><strong>Cheaper BRDF</strong>. Foliage is matte and doesn't really need a full Cook-Torrance specular path. A wrapped-Lambertian diffuse plus a one-line specular approximation is plenty.</li>
<li><strong>Lower-frequency normal maps</strong>. Leaves are noisy already. A 256x256 normal map looks the same as a 1024x1024 one at typical viewing distances and saves bandwidth.</li>
<li><strong>Parallax, anisotropy and clearcoat off</strong>. The PBR feature menu gets switched off for leaves.</li>
<li><strong>Two-sided thin transmission</strong> instead of full subsurface scattering. Leaves transmit light from behind, but you can fake it with a single back-light dot product.</li>
<li><strong>Half-resolution shading</strong> in some engines. Foliage gets shaded at 1/4 or 1/2 pixel rate and upscaled. Stochastic noise from TAA hides the resampling.</li>
<li><strong>Skip detail textures and decals</strong> on masked materials by default.</li>
</ul>
<p>Each of these is a small win individually. Combined, masked-foliage shaders can run 2-3x faster than the equivalent opaque material.</p>
<p>Deep dives:</p>
<ul>
<li>Lagarde and de Rousiers, <a href="https://seblagarde.wordpress.com/2015/07/14/siggraph-2014-moving-frostbite-to-physically-based-rendering/">Moving Frostbite to Physically Based Rendering 3.0, sections on foliage and translucency</a> (SIGGRAPH 2014, the canonical PBR adjustments for thin two-sided materials).</li>
<li>Jimenez, <a href="https://www.iryoku.com/stare-into-the-future">Next Generation Character Rendering</a> (the wrapped-Lambertian and back-translucency math, originally for skin but ported widely to leaves).</li>
<li>Sanders, <a href="https://www.gdcvault.com/play/1025066/Between-Tech-and-Art-The">Between Tech and Art: The Vegetation of Horizon Zero Dawn</a> (GDC 2018, with Decima's foliage shader simplifications).</li>
</ul>
<h2>8. Visibility buffers and Nanite for masked materials</h2>
<p>The cleanest answer to overdraw is to <em>decouple shading from rasterization entirely</em>. A visibility buffer rasterizes geometry into a thin buffer (just triangle ID and instance ID per pixel), then runs the full material as a deferred pass that reads the visibility buffer and shades each pixel exactly once. There is no overdraw at the shading stage. Burns and Hunt's 2013 paper introduced this, and UE5 Nanite is the production-quality realization, including for masked foliage as of UE 5.5.</p>
<p>Nanite's twist is that it does this with cluster-level virtualized geometry, so the rasterizer itself runs on a software path for sub-pixel triangles and keeps overdraw bounded. Masked materials in Nanite need the &quot;programmable raster&quot; feature: the alpha test runs during the visibility-buffer pass, but the material shading still happens once per visible pixel in the deferred resolve. The result is that very dense Nanite foliage, once notorious for being slow on masked materials, is now competitive with opaque or even cheaper, because the overdraw at shading time is zero. There's a tradeoff: it's often better to push high-poly <em>opaque</em> tree geometry through Nanite than to keep low-poly masked-card trees, because the masked path adds programmable-raster cost.</p>
<p>Deep dives:</p>
<ul>
<li>Burns and Hunt, <a href="http://jcgt.org/published/0002/02/04/">The Visibility Buffer: A Cache-Friendly Approach to Deferred Shading</a> (JCGT 2013, the original paper).</li>
<li>Karis, Stubbe, Wihlidal, <a href="https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf">A Deep Dive into Nanite Virtualized Geometry</a> (SIGGRAPH 2021, the production architecture).</li>
<li>Epic, <a href="https://media.gdcvault.com/gdc2024/Slides/GDC+slide+presentations/Nanite+GPU+Driven+Materials.pdf">Nanite GPU Driven Materials</a> (GDC 2024, with the masked-material and programmable-raster pipeline).</li>
<li><a href="https://www.sctheblog.com/blog/nanite-materials-notes/">Notes from &quot;Nanite GPU Driven Materials&quot;</a> (a clean third-party walkthrough of the same talk).</li>
</ul>
<h2>9. Separate shadow representations for foliage</h2>
<p>Shadow maps for alpha-tested foliage are the second-most-expensive shadow problem in any open-world frame, after large cascades. Every cascade needs its own depth prepass, every prepass runs the alpha test, and the cost stacks fast across 4 cascades and dozens of light frusta. So most engines don't render foliage shadows the same way they render foliage color.</p>
<p>Common substitutions:</p>
<ul>
<li><strong>Mesh distance-field shadows</strong> (UE Lumen, custom engines). Each mesh has a precomputed signed distance field. A short cone trace through the SDF gives a soft shadow without ever touching the alpha-tested mesh. Particularly nice for trees because the SDF captures the canopy silhouette as a single solid blob and ignores the per-leaf detail.</li>
<li><strong>Lower-resolution cascades for foliage</strong>. Foliage shadows go into a half-resolution slice and get up-sampled with edge-aware filtering. The eye doesn't notice the resolution drop because the shadows are already soft.</li>
<li><strong>Alpha-to-coverage shadow maps with MSAA</strong>. On engines that still have MSAA in their shadow path, A2C gives smooth-edged foliage shadows without the full alpha test cost.</li>
<li><strong>Capsule shadows for the trunk and big branches</strong>, distance-field for the canopy, full alpha test only at the closest cascade. Different representations for different distances, blended in the lighting pass.</li>
<li><strong>WPO disable distance</strong>. Wind-driven World Position Offset is killed beyond a threshold so that cached shadow data stays valid across frames. UE's Virtual Shadow Maps lean heavily on this.</li>
</ul>
<p>Deep dives:</p>
<ul>
<li>Epic, <a href="https://dev.epicgames.com/documentation/unreal-engine/distance-field-soft-shadows-in-unreal-engine">Distance Field Soft Shadows in Unreal Engine</a> (the canonical UE reference for mesh DF shadows).</li>
<li>Wright, <a href="https://advances.realtimerendering.com/s2022/SIGGRAPH2022-Advances-Lumen-Wright%20et%20al.pdf">Lumen: Real-Time Global Illumination in Unreal Engine 5</a> (SIGGRAPH 2022, with Lumen's mesh-SDF integration for foliage).</li>
<li>Epic, <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine">Virtual Shadow Maps</a> (the modern UE5 shadow architecture, with the foliage-specific WPO disable and caching rules).</li>
<li>Persson, <a href="https://www.humus.name/index.php?page=3D&amp;ID=81">Practical Cascaded Shadow Maps</a> (the still-canonical CSM reference with notes on alpha-tested casters).</li>
</ul>
<h2>10. Wind, animation, and shadow caching</h2>
<p>A subtle related problem: most foliage moves. Wind-driven vertex animation (World Position Offset in UE, equivalent in Frostbite and Decima) means the foliage geometry isn't stable from frame to frame, which breaks shadow caching and reprojection. Modern engines fight this in two ways:</p>
<ul>
<li><strong>Cap WPO at distance</strong>. Beyond a threshold, the wind animation amplitude smoothly goes to zero. The eye can't see the sway that far away anyway, and the shadow caches stay valid.</li>
<li><strong>Bake the wind into the cluster bounds</strong>. Cluster bounding boxes are inflated by the maximum WPO offset so culling stays conservative without re-uploading per frame.</li>
<li><strong>Per-instance phase offsets</strong>. Identical trees use a per-instance random seed to offset the wind phase, so a forest doesn't sway in lockstep without paying for unique animation per tree.</li>
</ul>
<p>This is the kind of detail that doesn't show up in technique lists but is the difference between a 3 ms forest and a 9 ms forest in practice.</p>
<p>Deep dives:</p>
<ul>
<li>Sanders, <a href="https://www.gdcvault.com/play/1025066/Between-Tech-and-Art-The">Between Tech and Art: The Vegetation of Horizon Zero Dawn</a> (GDC 2018, with the Decima wind-animation pipeline and shadow caching).</li>
<li>McAuley, <a href="https://www.gdcvault.com/play/1022235/Rendering-the-World-of-Far">Rendering the World of Far Cry 4</a> (GDC 2015, includes the wind-grid sampling for vegetation).</li>
<li>Epic, <a href="https://dev.epicgames.com/community/learning/tutorials/qLk6/unreal-engine-virtual-shadow-maps">Foliage and Virtual Shadow Maps</a> (the UE5 community guidance on WPO disable distance and VSM caching).</li>
</ul>
<h2>11. The combined math</h2>
<p>None of these tricks is a silver bullet. The interesting thing is what happens when you stack them:</p>
<ul>
<li>A naive masked-foliage pass on a dense forest scene measures 8-15x effective overdraw. Every visible pixel runs the leaf shader 8 to 15 times.</li>
<li>Add a depth prepass and the main pass drops to ~1x overdraw, but the prepass itself still touches everything.</li>
<li>Add front-to-back sorting and the prepass starts pruning itself.</li>
<li>Add cluster-level GPU culling and the prepass touches only what could possibly be visible.</li>
<li>Add LOD chains and imposters and the <em>count</em> of visible quads drops by an order of magnitude beyond 30 m.</li>
<li>Add the visibility-buffer / Nanite path and the shading stage truly runs once per pixel even on dense overlap.</li>
<li>Add distance-field shadows and the shadow cost stops scaling with the alpha test.</li>
</ul>
<p>The headline result, repeated across the talks linked above: effective overdraw collapses from 8-15x to 1-2x, and total foliage frame cost falls by 4-6x in a dense forest scene. That's the entire reason modern open-world games can render forests at 60+ fps on consumer hardware.</p>
<img src="/img/blog/foliage_overdraw_pipeline.webp" alt="Diagram showing the foliage rendering pipeline as five stacked stages: GPU culling, sorted prepass, masked color pass with depth-equal, visibility-buffer shading, and separate distance-field shadow path" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<h2>12. What this means for the browser</h2>
<p>Most of this stack maps cleanly onto WebGPU. We've already shipped GPU-driven culling, indirect dispatch, Hi-Z occlusion, and front-to-back sorted prepasses in the <a href="/blog/2026-02-25-open-world-browser-series-guide">open-world browser engine</a>. The depth prepass for masked geometry is straightforward: WebGPU supports depth-equal testing and <code>discard</code> in fragment shaders, with the same caveats about early-Z. Octahedral imposters port mechanically, the math is just sphere-to-octahedron unwrapping and atlas indexing.</p>
<p>The harder pieces are the modern ones. A visibility buffer in WebGPU means writing a 32-bit triangle ID into a render target and resolving materials in a fullscreen compute pass. The building blocks exist but the orchestration is involved. Mesh distance-field shadows want a 3D texture per asset and a short cone trace, both of which are in WebGPU's reach. Hashed alpha and dithered LODs are one shader function each.</p>
<p>The path forward for browser foliage is the same as for everything else in this stack: ship the cheap, reliable pieces first (prepass, sorted instances, LODs, imposters, hashed alpha) and add the heavy machinery (visibility buffer, mesh-SDF shadows) on top. The browser hardware floor is finally high enough that there is no architectural reason a WebGPU forest shouldn't look and run like a console one. There are just engineering reasons, and engineering reasons are the kind we like.</p>
<h2>Further reading across the whole stack</h2>
<p>If you want one source that pulls all of this together, the SIGGRAPH &quot;Advances in Real-Time Rendering in Games&quot; archive (<a href="https://advances.realtimerendering.com/">advances.realtimerendering.com</a>) has the canonical foliage and GPU-driven-rendering talks going back to 2014. Adrian Courrèges' <a href="http://www.adriancourreges.com/blog/">GPU profiling articles</a> include frame-by-frame breakdowns of GTA V and Horizon Zero Dawn that show every pass discussed here in production order. For the alpha-test math specifically, Chris Wyman's <a href="https://cwyman.org/">research page</a> has the hashed-alpha and stochastic-transparency papers with reference shaders. And the <a href="https://www.realtimerendering.com/">Real-Time Rendering, 4th edition</a> chapters on transparency, sampling, and depth handling are still the textbook starting point.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 25: One skeleton, every outfit]]></title>
            <link>https://app.cinevva.com/blog/2026-05-10-open-world-browser-part-25-universal-characters</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-10-open-world-browser-part-25-universal-characters</guid>
            <pubDate>Sun, 10 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 50 tested whether a CC0 character pack could carry an avatar customization product. Four Quaternius packs turned out to share one 65-joint skeleton on purpose, which turned the spike from an animation-pipeline problem into a by-name skeleton rebinding exercise.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 25: One skeleton, every outfit</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind">Part 24</a> made the world persistent and gave its vegetation wind. This part is about the people in it again, but from the wardrobe side. The question is whether a creator can pick a base body, swap clothing, choose a hairstyle, and play any animation, all on a free asset pack, with no rigging and no animation authoring. Building a custom rig isn't the right thing to de-risk. The question is whether a CC0 pack can carry the whole load.</p>
<h2>A pack that was built to fit together</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/50-universal-characters/" title="Spike 50 Universal Characters" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/50-universal-characters/" target="_blank">Open Spike 50 in a new tab ↗</a> · <a href="/blog/spike-source?spike=50-universal-characters">View source</a></p>
<p>Quaternius ships four assets that line up almost suspiciously well: Universal Base Characters with male and female bodies plus eight hairstyles and two eyebrow sets, Modular Character Outfits split into body, arms, legs, and feet parts with accessories like pauldrons and a hood, and the Universal Animation Library packs one and two, 262 clips in total covering locomotion, combat, climbing, farming, fishing, idles, and social moves. Inspecting their glTFs revealed why they fit: every single mesh in all four packs is rigged to the same 65-joint UE5-style skeleton, the same joint names, the same bind poses, root through pelvis and spine to head, mirrored arms with fifteen finger joints per side, mirrored legs, with no retargeting needed. This is the exact opposite of the three-skeleton retargeting problem from Spike 35, where a 213-bone face rig had to talk to a 65-bone Mixamo rig. Here all four packs were authored on the animation library's skeleton by design, and the bond is exact.</p>
<p>That turned the spike into a binding exercise rather than an animation-pipeline one. The base layer loads a body glTF, clones the scene with <code>SkeletonUtils.clone</code> so each character gets a fresh skeleton instance rather than feeding bone mutations back into the loader's cached scene, and caches that 65-bone skeleton as canonical along with the armature object that roots animation.</p>
<h2>Rebinding a coat onto a body</h2>
<p>The trick that makes the whole thing work is that you can't simply reparent an outfit's mesh into the scene, because it still references the bones from its own glTF, which sit in a different subtree. Each modular part, a peasant body or a ranger's legs, arrives as its own SkinnedMesh with its own clone of the same armature. The binding walks the source skeleton's bones in their original order, looks each one up by name in the canonical skeleton, and builds a new <code>Skeleton</code> from those rebound bones reusing the source's bind-inverse matrices, then calls <code>SkinnedMesh.bind</code> with the source's identity bind matrix. After binding, the mesh detaches from its source scene and parents directly under the character root. Because the bind matrix captures the world transform at bind time and the root sits at identity, the mesh's own world transform never affects the output and skinning happens entirely through the now-shared bones.</p>
<p>Hair and eyebrows are slots too, and they corrected a wrong assumption. The folder structure said &quot;rigged to head bone,&quot; which suggested hair would be a static mesh parented to the head with a baked offset. It isn't. Every hair file is a SkinnedMesh weighted across all 65 joints, with the long hair's weights bleeding into the upper spine and neck so it drapes when the character looks down. So hair takes the same by-name rebinding path as any outfit part. The one special case is the outfit body slot: when it's attached, the base body mesh is hidden so the outfit doesn't clip through it, while arms, legs, feet, and accessories just stack because the pack authored them to coexist with the base body showing through wherever the clothing leaves skin exposed.</p>
<h2>262 animations for free</h2>
<p>Animation is almost anticlimactic once the skeleton is shared. The two library glbs load, their clips flatten into one named list, and the track names in those clips reference the exact joint names by <code>bone.position</code>, <code>bone.quaternion</code>, and <code>bone.scale</code>. An <code>AnimationMixer</code> rooted at the character's armature finds those bones by name and drives them directly, crossfading on switch. The viewer's right panel is a filterable list of all 262 clips with a source pill, so searching &quot;fish&quot; surfaces every fishing animation across both libraries. Standard three-point lighting with soft shadows, a polar grid underfoot, and ACES tone mapping keep the stylized base textures readable without crushing the dark bodysuit's shadows.</p>
<p>What this de-risks for the product is large. The avatar customization feature can ship on a CC0 pack with zero rigging work and zero animation authoring: drop in the four packs, wire a wardrobe UI, and you have roughly six outfits times eight hairstyles times two sexes times 262 animations of variation out of the box. The 65-joint skeleton is small enough that GPU skinning cost is negligible, and the batched-skinning work from Spike 45 already handles 200-plus avatars on a rig this size. CC0 carries no use restrictions, so commercial use on a paid creator platform is fine. The remaining open question is custom-uploaded outfits, which is a Phase 3 problem solved by retargeting at upload time onto this canonical skeleton, the inverse of Spike 35's runtime retargeting. The asset footprint is about 147 MB on disk as raw 2K PNGs and uncompressed animation glbs, which production would shrink to roughly 30 MB with KTX2 texture compression and a gltf-transform pass.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>One canonical skeleton across a pack.</strong> Four Quaternius packs (base bodies, modular outfits, two animation libraries) are all rigged to an identical 65-joint UE5-style skeleton with the same joint names and bind poses, so combining them needs no retargeting. Cloning the base with <code>SkeletonUtils.clone</code> gives each character a fresh skeleton instance instead of mutating the loader's cached scene.</p>
<p><strong>By-name skeleton rebinding.</strong> Each modular part ships its own SkinnedMesh referencing its own armature. Rebinding walks the source bones in order, maps each by name into the canonical skeleton, builds a new <code>Skeleton</code> reusing the source bind-inverses, and calls <code>SkinnedMesh.bind</code> with the identity bind matrix, then parents the mesh under the shared character root so skinning runs entirely through the shared bones. The outfit body slot hides the base body to avoid clipping, and other slots stack.</p>
<p><strong>Hair as a skinned slot.</strong> Hair is a SkinnedMesh weighted across all 65 joints, with long hair weighted into the upper spine and neck so it drapes on look-down. It takes the same rebinding path as outfit parts.</p>
<p><strong>Name-keyed animation retargeting for free.</strong> Animation Library clips reference joints by exact name, so an <code>AnimationMixer</code> rooted at the shared armature drives all 262 clips directly with crossfade and no per-clip retargeting. A CC0 license covers commercial use, and the small joint count keeps GPU skinning cheap enough to reuse the Spike 45 batched-skinning path. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<hr>
<p>Part 25 of 29.
Previous: <a href="/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind">Part 24 - Saving a world, and wind you can see</a>
Next: <a href="/blog/2026-05-12-open-world-browser-part-26-water">Part 26 - Water that holds up at every scale</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 24: Saving a world, and wind you can see]]></title>
            <link>https://app.cinevva.com/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind</guid>
            <pubDate>Sat, 09 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 47 made world edits stick: a Durable Object that arbitrates ownership, persists per-chunk binary blobs, and converges every peer's terrain through a commutative edit protocol. Spike 49 ported Quaternius's Godot wind shaders into TSL faithfully, then chased a per-frame recompile that dropped the scene to 1 fps.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 24: Saving a world, and wind you can see</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice">Part 23</a> put people in the world and gave them a voice. This part is about making the world remember what they did to it, and making it feel alive when nobody's touching it. Spike 47 is persistence: a creator sculpts terrain and places props, and those edits survive a reload, sync to every other peer, and arbitrate cleanly when two people edit at once. Spike 49 is wind: porting a stylized nature pack's vegetation shaders so trees, bushes, and grass move the way the artist intended, which turned into a fight with the shader compiler more than with the math.</p>
<h2>A world that remembers</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/47-world-persistence/" title="Spike 47 World Persistence" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/47-world-persistence/" target="_blank">Open Spike 47 in a new tab ↗</a> · <a href="/blog/spike-source?spike=47-world-persistence">View source</a></p>
<p>The setup is a shared authoring session. Players walk a world, place props with a click, remove them with a right-click, and sculpt the ground by dragging a brush, raising and lowering the heightmap or carving volumetric caves through the SDF terrain that promotes a chunk to marching cubes. Everything they do persists in a Cloudflare <code>WorldChunkDO</code>, a server-authoritative Durable Object backed by its own SQLite storage. Clients don't write state directly. They send intent, the DO arbitrates and broadcasts the result, and the DO is the single source of truth, so a fresh joiner gets a snapshot and lands in exactly the same world everyone else sees.</p>
<p>Two persistence details paid off. Terrain is stored as per-chunk binary blobs rather than as an event log to be replayed on join, blobs that are the source of truth, uploaded on stroke-end, so a joiner loads the committed bytes directly instead of re-running thousands of brush samples. And those blobs live one storage key per chunk rather than one big row, because a single SDF chunk is 168 KB and the DO has a 2 MB per-row limit. A chunk index tracks which keys exist so the DO can rehydrate the whole map on wake. Identity is handled with two storages on the client: the player id lives in <code>sessionStorage</code> so two tabs are two distinct peers rather than one peer that overwrites itself in the DO's player map, while the display name lives in <code>localStorage</code> so a rename in one tab carries across all of them.</p>
<h2>Making concurrent edits converge</h2>
<p>The genuinely hard part of multiplayer authoring is what happens when two people edit overlapping ground in the same instant. The spike splits edits by their algebra. Additive operations, raise and lower on the heightmap and add and subtract on the SDF, are commutative: applying them in any order lands on the same result, so they ride an optimistic-stamp path where each client applies locally and ships the stamp, and the DO broadcasts it to everyone with no coordination. Order genuinely doesn't matter, so there's nothing to coordinate.</p>
<p>The order-dependent operations, smooth and flatten, were the interesting case. The first design gave them a region lock: a client requests a lock on pointer-down, the DO grants or denies it, the client buffers samples during the press, and on pointer-up the DO applies the whole stroke atomically. It works, but it's a separate protocol with its own lock TTL and grant/deny round-trip. The cleaner answer that replaced it is a precomputed delta: the originator runs the smooth or flatten brush locally, then ships the resulting list of per-cell deltas, and every peer just adds those deltas to their own cells without re-deriving anything. That turns an order-dependent operation into a commutative one by freezing its result at the source, so the whole edit system runs on one uniform commutative protocol with identical convergence and no locks at all. Prop locks survive for a different reason: per-record locking replaced owner-only deletion, so any peer can delete any prop unless someone has locked it, and only the locker can clear it. Undo and redo work by letting the client name a prop's id before placing it, so it knows the id ahead of the server echo and can reverse its own actions deterministically. Hibernating WebSockets keep an idle room free throughout, the same property that made the avatar relay in the previous part cheap.</p>
<h2>Wind ported line by line, then fought</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/49-gpu-wind-props/" title="Spike 49 GPU Wind Props" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/49-gpu-wind-props/" target="_blank">Open Spike 49 in a new tab ↗</a> · <a href="/blog/spike-source?spike=49-gpu-wind-props">View source</a></p>
<p>Spike 49 takes Quaternius's Stylized Nature MegaKit and ports its wind to our stack. The pack ships its source Godot shaders, four of them, and the right move was a direct translation rather than a re-invention. Bark has an empty vertex function, so trunks are rigid. An earlier procedural-mask attempt had been making trunks wave, and the fix was simply to stop applying wind to bark at all. Leaves get a per-vertex chaotic sway from a triangular-pulse hash, masked by height so canopies move and the base stays planted. Base foliage gets a noise-modulated sin/cos sway in world space. Grass is base foliage plus a wind-line bobble, sampling a scrolling noise texture through a power curve so only the bright bands of the texture contribute, which produces the visible ripples that travel across a meadow. The dispatch follows the pack's own material-naming convention, so a material called <code>Leaves_Birch</code> routes to the leaves path and <code>Grass_Common</code> to the grass path, no guessing.</p>
<p>A surprise from the port is that the leaf color isn't in the texture. Quaternius authors leaf appearance entirely from a vertical gradient and a Fresnel rim: the albedo is a mix from an extra color at the canopy bottom to the leaf color at the top, keyed on height, with a subsurface-scattering tint added as emission scaled by a $(1 - \mathbf{N}\cdot\mathbf{V})^3$ Fresnel term. That's why a plain textured pass looked flat. The colors come from the gradient and the rim rather than the painted map. The port reads a baked <code>heightFactor</code> vertex attribute instead of raw local Y, normalized per leaf group at load time from world-space Y, so the gradient and the wind mask both behave correctly no matter how the FBX import rotated each mesh's local axes. The Godot color constants are tagged sRGB and converted to linear before the shader sees them, so the port does the same conversion rather than feeding the bright sRGB numbers in as linear and washing the foliage out.</p>
<h2>The recompile that ate the frame rate</h2>
<p>The reason this shipped as an FBX baseline first, with the full wind material set aside in a <code>.bak</code> file, is a per-frame recompile bug that dropped the scene to about 1 fps. Layering custom TSL onto FBX-loaded materials was triggering Three.js to rebuild shader programs every frame, with <code>needsUpdate</code> effectively stuck on. The diagnostic discipline was to strip each foliage material back to a plain textured pass with no custom nodes and watch whether the recompile loop persisted. If it stopped, the custom graph was the culprit, and if it continued, the cause was upstream in the FBX material setup or Three.js itself. The fix that let the real shaders come back was binding every per-material difference, leaf color, SSS color, strength, and blend, as uniforms so all leaf assets share one compiled program instead of the compiler emitting a fresh shader for every unique color combination and thrashing the compile queue.</p>
<p>Two more pieces are worth keeping. Grass renders as one <code>InstancedMesh</code> per source file, and its wind is computed in world space because the sin phases key off world position. But the displacement has to be applied in local space before the instance matrix runs, and WGSL has no <code>inverse()</code> to call. For an instance matrix of translation, a Y rotation, and a uniform scale, the inverse of the upper 3×3 is just its transpose divided by the scale squared, so the shader multiplies the world displacement by the transposed model matrix and divides by the squared length of the matrix's first column, recovering the scale without a square root. After the vertex transform re-applies the matrix, the motion lands in world space exactly as authored, independent of each tuft's rotation or scale. And each tuft runs a per-vertex GPU frustum cull: it projects the instance center to clip space, and if it falls outside the frustum with margin, it collapses every vertex to the local origin so all three vertices of each triangle coincide, the rasterizer drops the degenerate triangle, and no fragment, alpha-test, or shadow work happens for off-screen grass. That stacks on top of the coarse per-chunk bounding-sphere cull Three.js already does, built from float <code>step</code> rather than booleans so it multiplies straight into the position mix.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Server-authoritative world persistence.</strong> A <code>WorldChunkDO</code> Durable Object arbitrates prop placement and terrain edits, persists per-chunk binary blobs as the source of truth (so joiners load committed bytes instead of replaying an event log), and stores one storage key per chunk to stay under the DO's 2 MB per-row limit. Player id lives in <code>sessionStorage</code> so tabs are distinct peers, and display name lives in <code>localStorage</code> so renames carry across tabs.</p>
<p><strong>Commutative edit convergence.</strong> Additive terrain ops (raise/lower, SDF add/subtract) are commutative and ride an optimistic-stamp path with no coordination. Order-dependent ops (smooth, flatten) are made commutative by shipping precomputed per-cell deltas instead of acquiring a region lock, so the whole system converges under one uniform protocol with no locks. Per-record prop locks replace owner-only deletion, and client-named object ids enable deterministic undo/redo before the server echo arrives. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<p><strong>Faithful shader porting from Godot to TSL.</strong> Quaternius's four source wind shaders translate line-for-line: rigid bark, height-masked leaf sway, world-space foliage sway, and grass with a scrolling wind-line bobble, dispatched by the pack's material-naming convention. Leaf color comes from a height gradient plus a Fresnel-driven SSS rim rather than the texture, and sRGB authoring constants are converted to linear so the look matches the reference renders.</p>
<p><strong>Avoiding per-frame shader recompiles.</strong> Layering custom TSL on FBX materials can pin <code>needsUpdate</code> and rebuild programs every frame, collapsing to ~1 fps. Binding every per-material difference as a uniform lets all variants share one compiled program instead of emitting a fresh shader per unique parameter set. A plain-textured diagnostic pass isolates whether the custom graph or the upstream setup is the cause.</p>
<p><strong>World-space wind on instanced foliage.</strong> Grass wind is computed in world space and transformed back to local with a hand-derived inverse (transpose over scale-squared) because WGSL has no <code>inverse()</code>. A per-vertex GPU frustum cull collapses off-screen tufts to a degenerate triangle so no fragment or shadow work runs, stacking on top of Three.js's per-chunk bounding-sphere cull.</p>
<hr>
<p>Part 24 of 29.
Previous: <a href="/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice">Part 23 - Fifty avatars and a voice in the room</a>
Next: <a href="/blog/2026-05-10-open-world-browser-part-25-universal-characters">Part 25 - One skeleton, every outfit</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 23: Fifty avatars and a voice in the room]]></title>
            <link>https://app.cinevva.com/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice</guid>
            <pubDate>Fri, 08 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 45 cut 50 characters from 13 ms of per-frame JS to one draw call with batched GPU skinning, and spent two hours chasing a WGSL error that turned out to be a morph target. Spike 46 built proximity voice with HRTF spatial audio, then deleted half the audio chain to match what Meet and Teams actually ship.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 23: Fifty avatars and a voice in the room</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets">Part 22</a> put a sky over the world. This part puts people in it. A third-person open world wants 50-plus characters visible at any moment, and it wants to hear the ones standing next to you. Spike 45 is the rendering side: getting that many animated avatars onto the GPU without melting the main thread. Spike 46 is the audio side: peer-to-peer voice that pans and attenuates with position, tuned to sound like a normal video call rather than a tech demo.</p>
<h2>One draw call for fifty dancers</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/45-avatar-network-sync/" title="Spike 45 Avatar Network Sync" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/45-avatar-network-sync/" target="_blank">Open Spike 45 in a new tab ↗</a> · <a href="/blog/spike-source?spike=45-avatar-network-sync">View source</a></p>
<p>The default Three.js path gives every character its own <code>SkinnedMesh</code>, its own <code>AnimationMixer</code>, its own bone-matrix upload, and its own draw call. At 50 avatars on the local Mac that was about 13 ms of pure JavaScript overhead per frame before the GPU did a single thing. The de-risking question for the whole multiplayer track was whether one batched-skinning architecture could get that under control and scale linearly with character count.</p>
<p>The answer is a split between where the animation is computed and where it's drawn. Three character classes share one FBX template. The local player is a normal <code>Avatar</code>, a full skeleton clone with its own mixer, the standard Three.js path, because there's only ever one of it. Every remote peer is a <code>VirtualSkeleton</code>: also a full clone with its own mixer running the same clips, but every <code>SkinnedMesh</code> node is stripped immediately after cloning so only the bones survive. It never enters the scene. Each frame, after the mixer updates and the matrices settle, it packs <code>(bone.matrixWorld × boneInverse)</code> for all 100 bones into a slot of a shared <code>Float32Array</code>. The <code>BatchSkinnedRenderer</code> then owns one <code>InstancedMesh</code> per geometry piece, all reading from a single <code>StorageBufferAttribute</code> of bone matrices sized <code>maxInstances × numBones × mat4</code>, which is 60 × 100 × 64 = 384 KB. A <code>MeshStandardNodeMaterial</code> with custom <code>positionNode</code> and <code>normalNode</code> reads four bone influences per vertex straight out of that storage buffer. The result is one storage upload and one draw call per geometry piece for the entire crowd, regardless of how many people are in it. Skinning lives in the vertex shader, and the per-avatar JavaScript cost drops to running a mixer and copying 100 matrices.</p>
<p>The HUD that measures this had to be rebuilt too. The old version flagged &quot;over budget&quot; when whole-frame GPU time crossed 3 ms, but the frame always includes the shadow map, the ground, and the local player's full skinned mesh, which together run 3 to 5 ms on real hardware no matter how many synthetic peers exist. The fix is a budget that calibrates itself: while no batched avatars are present, it captures the live GPU time as a baseline through a fast EMA, then freezes that baseline and grows the budget linearly at 0.06 ms per added avatar once synthetics appear. It reads PASS at idle on every machine and tightens proportionally as the crowd grows.</p>
<h2>The bug was a face you couldn't see</h2>
<p>First runs in Chrome showed silver shadows on the ground and no avatars at all, with a WGSL parse error: <code>cannot index type 'f32'</code> on a line trying to subscript <code>object.nodeUniform2[i]</code> where the uniform was declared as a scalar. The first fix was wrong and worked anyway. The guess was that <code>InstancedMesh</code>'s instance-matrix path was generating the bad code, and swapping in a <code>StorageInstancedBufferAttribute</code> made the error disappear in Chrome. But it disappeared because the new path emitted different shader code, not because it addressed the cause, which is the most dangerous kind of fix.</p>
<p>The real culprit was morph targets. The 3MIKE.fbx ships with blend-shape facial expressions, the cloned geometry inherits the <code>morphAttributes</code>, and Three.js's <code>MorphNode.setup()</code> declares <code>morphTargetInfluences</code> as a scalar <code>float</code> and then tries to <code>.element(i)</code> it inside a synthesized loop, which is exactly the scalar-subscript the compiler rejected. The fix is one line, clearing <code>geometry.morphAttributes = {}</code> on geometry that doesn't use morphs, so Three.js never injects the <code>MorphNode</code> at all. The accidental Chrome fix stayed in for a while and then bit back: on Safari, the storage-instanced path produced <code>Vertex buffer is not big enough</code> 256 times over, because Safari's WebGPU backend doesn't translate it cleanly. Reverting it was the right call, and the plain bone-matrix storage buffer, which is core WebGPU rather than a generated instance path, works fine everywhere. The lesson is the one worth carrying: when a fix works on one browser and you can't explain the mechanism, you've patched a symptom, so read the actual generated WGSL. A <code>getCompilationInfo()</code> shim added later in the spike turned Three.js's generic &quot;module is not valid&quot; into the real Tint error and paid for itself many times over.</p>
<p>A related framework-evasion trick sits next to it. Three.js detects the standard <code>skinIndex</code> and <code>skinWeight</code> attribute names and tries to inject its own <code>SkinningNode</code>, even on an <code>InstancedMesh</code> whose custom <code>positionNode</code> already does the skinning. Renaming those attributes to <code>boneIndex</code> and <code>boneWeight</code> hides them from the framework, and the custom TSL reads them under the new names.</p>
<h2>A relay that forgets you between words</h2>
<p>The first version synced peers over <code>BroadcastChannel</code>, a same-browser stand-in with the real wire format and cadence, and the protocol comment promised the swap to real transport would be one line. Cashing that promise meant an <code>AvatarRoomDO</code>, a 74-line Cloudflare Durable Object that doesn't even decode the 36-byte binary frame. It forwards each message as-is to every other peer in the room, because the sender's id is embedded in the frame and each receiver filters its own echo client-side. The relay has zero awareness of identity. Hibernating WebSockets make an idle room free: the DO drops out of memory between messages and the runtime restores the tagged sockets on the next packet. At 10 events per second per peer that's 36,000 DO requests per peer-hour, about half a cent, with egress free on Cloudflare and roughly 6 to 10 times cheaper than the equivalent AWS WebSocket shape.</p>
<p>The swap surfaced a state-machine bug that's worth a note. A remote player kept walking after they'd stopped. The animation request guarded against <code>this._state</code>, the currently playing clip, instead of the last queued name, so when two network messages arrived in the same tick, a <code>walk</code> then an <code>idle</code>, the <code>idle</code> compared against a state that hadn't advanced yet and got dropped. The peer was stuck walking forever, because future <code>idle</code> packets were deduplicated upstream as unchanged. The fix is to always overwrite the pending name and let the transition helper short-circuit genuine same-state requests, which it already did. The class of bug is general: a dedup check against the wrong reference value swallows the input that matters.</p>
<p>Safari needed two more guards. It opens the WebSocket faster than Chrome, so the first inbound peer message could arrive before the batch renderer finished constructing, dereferencing null. Dropping messages while the renderer is absent is safe because peers re-broadcast every 100 ms. And <code>'gpu' in navigator</code> returned true while <code>requestAdapter()</code> returned null, so Three.js fell back to WebGL2 without saying so, where the storage-buffer skinning chain has no valid translation and spewed errors. Checking for a real adapter and asserting the backend is actually WebGPU turns a degraded render into a clear loading-screen message. There was even a WGSL dialect gap: Three.js emits the modern two-argument <code>@interpolate(flat, either)</code> that WebKit's compiler hasn't shipped, patched by rewriting the shader source on the way into <code>createShaderModule</code> to drop the second argument, which is free because flat interpolation carries the same value on every vertex regardless.</p>
<h2>Voice that pans with the room</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/46-proximity-voice/" title="Spike 46 Proximity Voice" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/46-proximity-voice/" target="_blank">Open Spike 46 in a new tab ↗</a> · <a href="/blog/spike-source?spike=46-proximity-voice">View source</a></p>
<p>Spike 46 is proximity voice: peer-to-peer WebRTC with HRTF spatial audio, scoped explicitly to match Google Meet and Microsoft Teams quality in a quiet-to-moderately-noisy room. A <code>VoiceRoomDO</code> handles signaling as a JSON relay, sending each new peer a roster, announcing joins and leaves, routing SDP and ICE to one specific peer by socket tag, and broadcasting position updates that drive the spatial panners. It stamps the sender id on every message so peers can't spoof each other, and the audio itself never touches the DO. One <code>RTCPeerConnection</code> per remote peer, with the lexicographically smaller peer id always making the offer so both sides agree on who initiates without a full perfect-negotiation implementation.</p>
<p>On the receive side each peer's audio runs through a <code>PannerNode</code> set to HRTF with inverse distance rolloff, and the <code>AudioListener</code> updates every frame from the local player's position and facing using <code>forwardX = sin(facing)</code>, <code>forwardZ = cos(facing)</code>, which matches the scene's <code>atan2(wx, wz)</code> facing convention. One Chrome quirk cost an hour: a <code>MediaStream</code> consumed only by Web Audio sometimes won't pull packets, so each stream also attaches to a hidden muted <code>&lt;audio&gt;</code> element to force the decoder to schedule. On the quality side, browsers default to roughly 32 kbps mono Opus, so the spike munges the <code>fmtp</code> line on every offer and answer to bump it to 128 kbps with in-band FEC enabled and DTX disabled, then calls <code>setParameters</code> with a high max bitrate to guarantee the encoder actually uses what the SDP advertises. FEC is the second-biggest audible win after the bitrate bump, recovering from packet loss without renegotiation.</p>
<h2>Deleting your way to clean audio</h2>
<p>The audio chain that shipped is much smaller than the one I started with, and shrinking it was the lesson. The first version had a high-pass filter, a click limiter tuned to catch keyboard noise, a compressor, a noise gate, and a wet-dry crossfade, fronted by a floating panel with twelve-plus sliders. When the user reported audible keyboard clicks, the instinct was to tune the click limiter harder and drop the dry mix, a stack of bandaids. The structural answer was that once an ML denoiser is in the chain, the click limiter and the gate and most of the high-pass are all redundant, because RNNoise is trained on exactly keyboard and mouse and typing noise, and amplitude clipping is a strictly worse version of the same job. Production clients ship ML denoise, echo cancellation, automatic gain, and a soft compressor for level, and nothing else. So four stages came out, the slider panel came out, and the &quot;choose your noise reduction&quot; toggles came out, leaving one fixed pipeline.</p>
<p>Each surviving stage earns its place. Browser echo cancellation stays on because RNNoise doesn't do echo, and without it speaker-into-mic feedback is unbounded. Browser noise suppression goes off because stacking it on RNNoise produces artifacts on fricatives, so you pick one denoiser. Browser automatic gain stays on, because turning it off made the signal too quiet for the compressor to work with and Web Audio's <code>DynamicsCompressorNode</code> has no makeup-gain parameter to compensate, and the browser's broad levelling and the spike's fast compressor operate on different timescales and coexist. RNNoise runs at 92 percent wet mixed with 8 percent dry, because it can over-suppress unvoiced consonants like s, sh, and f whose voice probability dips, and the small dry path preserves them at the cost of a little keystroke leak.</p>
<p>Two features round it out. Push-to-talk doesn't flip <code>track.enabled</code>, because that discards everything still in the pipeline buffers and chops the last syllable on key release. Instead a <code>GainNode</code> near the tail ramps with <code>setTargetAtTime</code>, fast attack so the first syllable survives and slow release so the last consonant drains, with the track left permanently enabled. And a five-second broadcast delay, requested as a radio-style feature, runs a bypass leg and a <code>DelayNode</code> leg crossfaded together, with a dump button that snaps the delayed output to silence and counts down on the HUD before audio resumes. Bundling the denoiser was its own small saga: the published RNNoise worklet uses bare-specifier imports that no CDN resolves, so the fix was a local esbuild bundle producing one self-contained 1.9 MB file with the WASM base64-inlined, committed to the repo and referenced by a URL relative to the module so it resolves under the dev server, the VitePress build, and the custom domain alike. If the worklet ever fails to load, the chain still produces audio through a plain high-pass and compressor, and the HUD shows the failure in red.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Batched GPU skinning for crowds.</strong> Remote avatars run a headless <code>VirtualSkeleton</code> (a full clone with the skinned meshes stripped, bones kept, its own mixer) that packs <code>bone.matrixWorld × boneInverse</code> for every bone into a shared <code>StorageBufferAttribute</code>. One <code>InstancedMesh</code> per geometry piece reads those matrices in a custom TSL <code>positionNode</code>/<code>normalNode</code>, so the entire crowd costs one storage upload and one draw call per piece, with per-avatar CPU work limited to a mixer update and a matrix copy. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<p><strong>Reading the generated WGSL rather than the symptom.</strong> A <code>cannot index type 'f32'</code> compile error traced to Three.js's <code>MorphNode</code> declaring <code>morphTargetInfluences</code> as a scalar and subscripting it, fixed by clearing <code>morphAttributes</code> on geometry that doesn't use morphs. A first fix that only changed which shader path was generated masked the cause and broke Safari later. Renaming <code>skinIndex</code>/<code>skinWeight</code> to <code>boneIndex</code>/<code>boneWeight</code> hides the attributes from Three.js's automatic <code>SkinningNode</code> injection so a custom skinning material owns the math.</p>
<p><strong>Hibernating Durable Object relays.</strong> A pure-binary <code>AvatarRoomDO</code> forwards 36-byte frames to every other peer without decoding them, with sender identity embedded in the frame and self-echo filtered client-side. Hibernating WebSockets make an idle room free, and the shape costs about half a cent per peer-hour at 10 Hz, far below the equivalent managed-WebSocket pricing. A dedup guard that compared against the playing animation state rather than the last-queued one dropped stop messages and stuck remote players in a walk loop.</p>
<p><strong>WebRTC proximity voice with HRTF.</strong> One <code>RTCPeerConnection</code> per peer with offer/answer roles decided by peer-id ordering, audio routed through a HRTF <code>PannerNode</code> with an <code>AudioListener</code> updated per frame from player facing, and Opus munged to 128 kbps with in-band FEC for resilience. A muted hidden <code>&lt;audio&gt;</code> element forces Chrome to pull packets from a Web-Audio-only stream.</p>
<p><strong>Subtractive audio engineering.</strong> Matching Meet/Teams quality meant removing stages, not adding them: ML denoise plus echo cancellation plus automatic gain plus a soft compressor, with no gate and no click limiter, because an ML denoiser trained on keyboard noise makes amplitude clipping redundant. Push-to-talk ramps a tail <code>GainNode</code> with an asymmetric envelope instead of flipping the track so syllables aren't clipped, and the denoiser worklet ships as a single self-contained esbuild bundle to dodge bare-specifier import resolution.</p>
<hr>
<p>Part 23 of 29.
Previous: <a href="/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets">Part 22 - Clouds you can light, and culling that has to be fed</a>
Next: <a href="/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind">Part 24 - Saving a world, and wind you can see</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 22: Clouds you can light, and culling that has to be fed]]></title>
            <link>https://app.cinevva.com/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets</guid>
            <pubDate>Thu, 07 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 43 put a physically based sky and volumetric clouds on screen for under 2 ms, with sunsets that need no per-time-of-day tuning. Spike 44 built meshlet GPU culling and learned that Hi-Z occlusion only works if the occluders are big enough to survive a max-reduce.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 22: Clouds you can light, and culling that has to be fed</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-06-open-world-browser-part-21-visibility-buffer">Part 21</a> was about a rendering technique that didn't pay off. This part has one that did, and one that needed a careful fix to work at all. Spike 43 is the sky: a physically based atmosphere and volumetric clouds, the foundation that makes a scene read as a place instead of a tech demo. Spike 44 is meshlet-style GPU culling, where the lesson was that the occlusion test is only as good as the occluders you feed it.</p>
<h2>A sky from physics, not a gradient</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/43-clouds-atmosphere/" title="Spike 43 Clouds and Atmosphere" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/43-clouds-atmosphere/" target="_blank">Open Spike 43 in a new tab ↗</a> · <a href="/blog/spike-source?spike=43-clouds-atmosphere">View source</a></p>
<p>Almost every cinematic weather effect depends on two pieces of infrastructure: a physically based atmosphere, so the sky color and sun color follow time of day from physics rather than a hand-tuned gradient, and a volumetric cloud volume, so the sky has 3D structure instead of a baked cubemap. Spike 43 builds exactly that pair on the existing WebGPU and TSL stack, nothing more, because once those two exist the rest of the weather stack (fog, god rays, wet surfaces, snow) becomes a series of smaller known follow-ons.</p>
<p>The atmosphere is the Hillaire 2020 model, a set of lookup tables computed in WGSL compute shaders. A transmittance table integrates sun light through the Rayleigh, Mie, and ozone density profile and recomputes only when the sun moves. A sky-view table re-bakes every frame because it's cheap enough that gating it isn't worth the code, with a non-linear parameterization around the horizon to avoid banding. Multiple scattering uses an analytic fit instead of the proper table for now, and the sunsets read correctly, so the shortcut is hiding well. The clouds are a Schneider Nubis-style ray-march through a horizontal slab, with shape from a 128³ Perlin-Worley texture eroded by a 32³ Worley texture, both baked at boot in compute with no network fetch, lit with Beer's law extinction, a dual-lobe phase function, and a powder approximation. The key coupling is that the cloud's sun color samples the same transmittance table every step, so cloud lighting tracks sunset without a second tuning pass.</p>
<p>On an M1 the whole thing lands at 1.1 to 2.0 ms at half-resolution clouds, well under the 6 ms budget, using about 14 MB of GPU memory, running at over 100 FPS. The two thesis claims held up in practice. Sunset is the hero shot, the moment that makes the renderer feel cinematic, and it falls out of the physics without per-time-of-day tuning. And a happy accident: with the cloud slab parameterized between 800 m and 4000 m, distant clouds at the horizon read as dark mountain ridges from a low camera, which gives the world background terrain without anyone modeling background terrain.</p>
<p>One architecture note worth keeping. The natural shape is to paint the sky into the swap chain first, then let three.js draw geometry on top with <code>autoClear = false</code>. That does not survive the WebGPU renderer on r184, because the flag doesn't gate the color load op the way it does in WebGL, so three.js clobbers the sky every frame. The fix is to render three.js into an offscreen target and do the final composite (<code>mix(skyCloud, scene, scene.alpha)</code> then ACES then sRGB) in our own pass that owns the swap chain.</p>
<h2>Culling that's only as good as its occluders</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/44-meshlet-clusters/" title="Spike 44 Meshlet Clusters" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/44-meshlet-clusters/" target="_blank">Open Spike 44 in a new tab ↗</a> · <a href="/blog/spike-source?spike=44-meshlet-clusters">View source</a></p>
<p>Spike 44 benches four rendering modes against each other: plain forward, CPU cluster culling, GPU compute culling, and a visibility buffer with Hi-Z occlusion culling. The Hi-Z path is the interesting one, and it had a quiet bug: its HUD said occlusion was on, but the &quot;Hi-Z killed&quot; counter sat at exactly 0.0% forever. Frustum culling worked, so the cull shader's upstream was fine. The occlusion half was a no-op paying full cost.</p>
<p>A Hi-Z occlusion test projects a cluster's bounding box to screen, picks a depth-pyramid mip level so the screen rectangle is about 2×2 texels, samples the deepest occluder depth in that rectangle, and rejects the cluster if its closest point is still farther than that occluder. The depth pyramid is built every frame by seeding mip 0 from an opaque-depth pre-pass and max-reducing up. The opaque pre-pass includes only solid occluders, the ground and per-tree trunk proxies, because alpha-tested foliage would punch gaps that fool a max-reduce.</p>
<p>The bug was geometric rather than logical. The trunk proxy was a 0.5 m by 4 m by 0.5 m box. At 30 m it projects to about 17 pixels on screen. But a typical 50 m grass cluster selects mip 5, where each texel covers 32 source pixels. A 17-pixel trunk doesn't fully cover a single mip-5 texel, so every texel touching the trunk also touches surrounding ground. The very first 2×2 max-reduce picks the larger depth value, which is the farther ground behind the trunk, and the trunk's depth gets erased on the first reduction. By mip 5 the pyramid holds ground depth almost everywhere, the cluster is never farther than the ground, and nothing is ever occluded.</p>
<p>The fix is to make the proxy big enough to dominate the texels it lands in, sizing it to the tree's silhouette rather than its wood. A roughly 2 m by 6 m by 2 m proxy is still smaller than the actual canopy, so leaves visible through gaps never get over-culled, but it's large enough to survive the max-reduce out to the distances that matter, and the occlusion counter immediately went non-zero. The takeaway generalizes to a rule for the production engine: anything trusted as a Hi-Z occluder has to be sized to its on-screen silhouette, because Hi-Z effectiveness in open foliage scenes is dominated by occluder coverage at the relevant mip rather than by the elegance of the depth-test math. Grass-versus-grass occlusion can't fire anyway, since a blade sits at the same depth as the ground under it, so the real wins are trees occluding distant foliage and trees occluding trees.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Hillaire 2020 atmosphere LUTs.</strong> A transmittance table (sun light through the Rayleigh, Mie, and ozone profile) recomputed only on sun movement, plus a per-frame sky-view table with a non-linear horizon parameterization, give physically based sky and sun colors that track time of day with no hand-tuned gradient. An analytic multiple-scattering fit substitutes for the full table until an artifact forces the proper bake. Sunset falls out of the physics without per-time-of-day tuning.</p>
<p><strong>Schneider Nubis volumetric clouds.</strong> A ray-march through a horizontal slab, shaped by a boot-baked 128³ Perlin-Worley texture eroded by a 32³ Worley texture, lit with Beer's law extinction, a dual-lobe phase, and a powder term. Sampling cloud sun color from the same transmittance table every step makes cloud lighting track sunrise and sunset for free. Half-resolution ray-march runs roughly 4× cheaper than full with no visible quality loss at typical distance, the standard production trade.</p>
<p><strong>Compositing raw WebGPU with three.js on r184.</strong> Painting the sky into the swap chain and drawing three.js geometry over it with <code>autoClear = false</code> fails because the flag doesn't gate the color load op in the WebGPU backend. Render three.js into an offscreen RGBA16F target and do the final <code>mix</code> plus tone-map plus sRGB in a pass that owns the swap chain.</p>
<p><strong>Hi-Z occlusion culling and occluder sizing.</strong> A depth pyramid built by max-reduce lets a GPU cull pass reject clusters whose nearest point is behind the deepest occluder in their screen rectangle. The test does nothing, with no warning, if occluders are too small to dominate a texel at the selected mip, because the first max-reduce replaces the occluder's depth with the farther background behind it. Occluders must be sized to their on-screen silhouette rather than their physical core. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<hr>
<p>Part 22 of 29.
Previous: <a href="/blog/2026-05-06-open-world-browser-part-21-visibility-buffer">Part 21 - A faster renderer that wasn't faster</a>
Next: <a href="/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice">Part 23 - Fifty avatars and a voice in the room</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 21: A faster renderer that wasn't faster]]></title>
            <link>https://app.cinevva.com/blog/2026-05-06-open-world-browser-part-21-visibility-buffer</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-06-open-world-browser-part-21-visibility-buffer</guid>
            <pubDate>Wed, 06 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 40 built a visibility buffer for dense grass, the technique everyone says wins on overdraw, and measured it losing to plain forward rendering by 44% at high density on Apple Silicon. Here's why, and when to actually reach for it.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 21: A faster renderer that wasn't faster</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion">Part 20</a> faked surface depth on a flat quad. This part is about a render-architecture decision, and it's the spike where the textbook answer turned out to be wrong for our hardware. The question was whether, for cinematic-density alpha-tested grass under a third-person camera, we need a visibility buffer before pushing to 200-player density. The going advice is an emphatic yes. We built it, measured it, and the answer was no.</p>
<h2>The technique everyone recommends</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/40-visibility-buffer/" title="Spike 40 Visibility Buffer" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/40-visibility-buffer/" target="_blank">Open Spike 40 in a new tab ↗</a> · <a href="/blog/spike-source?spike=40-visibility-buffer">View source</a></p>
<p>A visibility buffer splits rendering into two passes. Pass 1 rasterizes geometry and writes only triangle and instance IDs into a compact integer target plus depth, doing no shading at all. Pass 2 is a fullscreen pass that reads the IDs at each covered pixel, refetches that triangle's vertices, reconstructs the interpolated attributes, and shades each visible pixel exactly once. The pitch is perfect overdraw rejection: the depth test runs against fragments that did no shading work, so the expensive material only runs on what you actually see.</p>
<p>The spike runs two paths on one canvas and one device so the only variable is where the shading lives. The forward path is a normal <code>MeshStandardNodeMaterial</code> through three.js. The vis-buffer path is a raw two-pass WebGPU pipeline running outside three.js, reading three.js's grass texture straight off the backend, writing <code>(instanceId, triId)</code> into an <code>RG32Uint</code> target in pass 1 and resolving lighting in pass 2. Both share one ground-truth lighting setup.</p>
<p>Two implementation notes to keep. WebGPU still has no portable <code>primitive_index</code> builtin in fragment shaders, so the trick is to bake a per-vertex triangle ID onto un-indexed geometry and read it <code>flat</code>-interpolated, which costs 3× the vertex count but is negligible on a 12-vertex grass card. And sharing the canvas with three.js's renderer is mostly a non-event as long as you never reconfigure the context or touch the canvas dimensions, both of which three.js owns. Timing the forward path was the fiddly part, since three.js exposes no hook to inject GPU timestamp queries inside its render pass, so the workaround brackets its work with two no-op timestamp passes submitted before and after, which the GPU runs in submission order.</p>
<h2>The numbers go the wrong way</h2>
<p>On an M-series Mac at ~1080p, with cross-card grass blades over an 80 m field:</p>
<p>At 50,000 instances the vis-buffer path won by 25%, 4.13 ms against forward's 5.51 ms. At 100,000 it was break-even. At 200,000 instances forward won by 44%, 5.44 ms against the vis-buffer's 7.80 ms. The vis-buffer path gets <em>relatively worse</em> as density climbs, which is the exact opposite of the folklore that says it wins precisely when overdraw is heavy.</p>
<h2>Why forward holds up</h2>
<p>Apple Silicon GPUs are tile-based deferred renderers, and that changes the whole calculation. Forward shading on a TBDR has a hidden-surface-removal stage that runs before the fragment shader: the rasterizer collects every fragment mapping to a tile, sorts them by depth, and only the survivors (post-alpha-test) ever reach the fragment shader. So the forward path is already paying most of the visibility buffer's &quot;shade once per pixel&quot; promise, for free, inside the hardware. As blades crowd the screen, more fragments get rejected at HSR before any shading fires, and forward's effective per-pixel cost stays roughly flat instead of growing with overdraw.</p>
<p>Pass 1 of the vis-buffer path gets that same TBDR benefit. The trouble is all in pass 2. Pass 2 reads each pixel's instance matrix out of a buffer that, at 200,000 instances, is 12.8 MB, far larger than any GPU cache. Screen-adjacent pixels usually belong to different grass instances (the scatter is a jittered grid, so neighboring blades have arbitrary instance IDs), so every wave hitting that buffer misses cache divergently. That incoherent random access hides about 4 ms per frame on its own. Forward dodges it entirely because the instance matrix arrives with the vertex through the per-instance attribute path, so by the time the fragment shader runs the transformed vertex data is already in tile-local registers, no megabyte-scale random read required.</p>
<p>This is exactly the cost Nanite's material-classification pass exists to amortize: bin pixels by instance and dispatch sorted compute waves so each wave's reads are coherent. We don't have that. A back-of-envelope says sorting pixels by instance would drop that 4 ms to maybe 1.5 to 2 ms and push the crossover out to 400,000 to 500,000 instances. But that's stacking optimizations on an architecture that isn't winning here in the first place.</p>
<h2>The conclusion, and the audit that earned it</h2>
<p>For alpha-tested cross-card foliage on Apple Silicon WebGPU, the forward path with three.js's TSL pipeline is already at or below vis-buffer cost, and the vis-buffer plumbing buys nothing visible until well past 200,000 instances and only if you also add a sorting or binning pass. The practical call for the production engine is to keep the forward plus LOD plus imposter stack from the earlier spikes and not invest in vis-buffer infrastructure until either we target discrete NVIDIA or AMD GPUs as the dominant deployment (where overdraw cost is more linear) or we move to a meshlet architecture where the vis-buffer is the natural output anyway.</p>
<p>Because that result is counterintuitive, the conclusion is only worth anything if the comparison is fair, so the spike got a full audit pass. Several real bugs surfaced and got fixed: a blade-scale slider that desynced the two paths without warning, half the forward blades rendering pitch-dark from anti-parallel normals (fixed with the canonical upward-normal foliage trick), and the vis-buffer reading about 2× too bright from a hand-picked Lambert factor instead of the energy-conserving <code>1/π</code>, a hardcoded ambient term, and missing tone mapping. The fix copied three.js's exact ACES filmic curve into WGSL and reads the light colors and intensities off the actual scene lights each frame. The remaining known gap, missing direct specular in pass 2, biases the comparison <em>toward</em> the vis-buffer, meaning forward is doing strictly more per-pixel work and still winning at high density. That makes the headline conclusion conservative rather than optimistic. The one caveat that stands: this is all M-series-specific, and the crossover may well invert on a discrete card, so it's worth re-running before committing the stack for non-Apple targets.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Visibility buffer rendering.</strong> Pass 1 rasterizes geometry and writes only triangle and instance IDs plus depth, doing no shading. Pass 2 is a fullscreen resolve that reads the IDs per covered pixel, refetches the source triangle, reconstructs perspective-correct barycentric attributes, and shades each visible pixel once. Since WebGPU lacks a portable fragment <code>primitive_index</code>, the triangle ID is baked as a <code>flat</code>-interpolated per-vertex attribute on un-indexed geometry.</p>
<p><strong>TBDR hidden-surface removal versus deferred resolve.</strong> On a tile-based deferred GPU (Apple Silicon), forward shading already rejects occluded fragments before the fragment shader runs, so it captures most of the visibility buffer's shade-once benefit for free, and its per-pixel cost stays roughly flat as overdraw grows. A vis-buffer resolve pass instead pays for incoherent random access into a large per-instance buffer (12.8 MB at 200k instances), which dominates at high density unless pixels are sorted or binned by instance first, the way Nanite's material classification does.</p>
<p><strong>Sharing a canvas with three.js's WebGPURenderer.</strong> Raw WebGPU command buffers interleave correctly with three.js submissions on the shared queue as long as you never call <code>context.configure()</code> again or write <code>canvas.width/height</code>, both of which the renderer owns. Forward-path GPU timing, which three.js doesn't expose a hook for, can be bracketed by two no-op timestamp render passes submitted around its render call, since the GPU runs command buffers in submission order.</p>
<p><strong>Validating a counterintuitive benchmark.</strong> A surprising performance result is only as trustworthy as the fairness of the comparison. Auditing both paths to identical scene content and shading (matched ACES tone mapping, energy-conserving Lambert, lights read from the same objects, identical blade scale) is what turned &quot;vis-buffer is slower&quot; from a likely measurement artifact into a defensible conclusion, with the one remaining asymmetry biased in the conservative direction.</p>
<hr>
<p>Part 21 of 29.
Previous: <a href="/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion">Part 20 - Faking depth on a flat plane</a>
Next: <a href="/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets">Part 22 - Clouds you can fly through, and culling that pays off</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 20: Faking depth on a flat plane]]></title>
            <link>https://app.cinevva.com/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion</guid>
            <pubDate>Tue, 05 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 39 ported parallax occlusion mapping into TSL, hit two WebGPU shader-control-flow walls, found the bug was a verbatim-port discipline failure, and built a real-geometry reference plane to keep itself honest.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 20: Faking depth on a flat plane</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-04-open-world-browser-part-19-imposters">Part 19</a> used a flat quad to fake a whole tree at distance. This part uses a flat quad to fake depth up close: parallax occlusion mapping, the trick that makes a cobblestone road look like it has 5 cm of recessed grouting without spending a single extra vertex. The goal was to land it on the production stack (Three.js r184, WebGPU, TSL) so terrain detail materials can carry that depth illusion where it matters and pay flat-texture cost everywhere else.</p>
<h2>Three ways to fake depth, side by side</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/39-parallax-pom/" title="Spike 39 Parallax Occlusion Mapping" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/39-parallax-pom/" target="_blank">Open Spike 39 in a new tab ↗</a> · <a href="/blog/spike-source?spike=39-parallax-pom">View source</a></p>
<p>The spike lays three flat 5×5 m planes side by side, all the same material scaffold, differing only in the UV that feeds the samplers. Flat samples the texture straight, the reference baseline. Single-sample parallax shifts the UV once along the view direction by the height at that point, which is cheap and OK at low amplitude but swims at grazing angles. POM ray-marches in tangent space: step along the view ray, find the first layer where the ray passes below the heightfield, and refine the crossing. Tangent space stays simple because every test plane is axis-aligned, so the view direction packs into tangent space with a couple of sign flips instead of a full per-vertex TBN matrix. The texture set pulls live from the Polyhaven file API, the same path Part 17's model search used.</p>
<h2>Two WebGPU walls, and a branchless ray-march</h2>
<p>The textbook POM loop breaks out of the search on the first crossing. On r184 that doesn't work, for two separate reasons. <code>If(...).and(...)</code> compiled without errors but produced WGSL where the loop body never executed, so the post-loop refinement ran on garbage and the plane rendered nearly white. And <code>Break()</code> as a standalone node hadn't shipped to the r184 build at all, so even with a working <code>If</code> there was no way to express &quot;stop on first crossing.&quot; Both trace back to known three.js issues around TSL control flow over-optimizing across <code>If</code> and <code>Loop</code> boundaries in this version range.</p>
<p>The rewrite is branchless. Every iteration unconditionally samples the texture, which keeps texture access in uniform control flow as the WGSL spec wants, then folds the new state in through a <code>done</code> flag held as a float. Once <code>done</code> flips to 1, the per-iteration <code>mix</code> calls degenerate to &quot;keep state unchanged,&quot; which is the branchless equivalent of a break. The <code>done</code> flag is built with a <code>step</code> helper implemented as <code>0.5 + 0.5 × sign(x + ε)</code> because boolean-to-float coercion has been spotty across the r18x line and <code>sign()</code> is universally safe. The cost is that every fragment runs all 64 iterations regardless of where it actually crosses, but that's the right trade at fragment scale: the runtime gates on max steps anyway, and a real GPU would speculate past a &quot;real&quot; break too. A clean fallback matters here, a final <code>mix(baseUV, refined, done)</code>, so that at zero amplitude (the far end of the distance fade) no fragment crosses, <code>done</code> stays 0, and the POM material is bit-identical to flat. That's the aim of the distance-LOD trick: collapse to flat cost where the effect is sub-pixel anyway.</p>
<h2>The bug was a discipline failure, not a math failure</h2>
<p>The branchless version ran but looked distorted, streaky horizontal artifacts at moderate amplitude and a subtly-wrong-but-not-crisp result at low amplitude. The fix came from a one-line prompt: go read the canonical reference. The LlamAcademy tutorial that inspired this is just a Unity ShaderGraph node, so the real implementation lives in Unity's <code>PerPixelDisplacement.hlsl</code>. Reading it line by line surfaced three semantic differences I'd unwittingly introduced: an off-by-one in the ray-height baseline (Unity does an initial advance before the loop, so my frame of reference was a whole step out of phase, landing crossings in the wrong layer about half the time), a sign convention on the max offset that the refinement step depends on, and a cumulative-offset versus cumulative-UV bookkeeping choice that made my refinement math work harder and tangled the sign.</p>
<p>The root cause wasn't any single error, it was mixing two references. I'd taken the LearnOpenGL POM tutorial as my guide, which uses similar but different sign conventions and a different refinement formula, and ended up in a mongrel state where two-thirds of the math matched one source and one-third matched the other. The rewrite is a near-verbatim port of Unity's HLSL into TSL, same variable names, same initial advance, same refinement, with the branchless <code>done</code> flag kept on top. The lesson is worth carrying: when you port a known-good shader from another stack, port it line-for-line with the same names first, then refactor for local style. Don't re-derive against a second reference mid-port.</p>
<h2>A reference plane that can't lie</h2>
<p>The side-by-side was missing a real-geometry plane. Without it, &quot;POM looks pretty good&quot; is unfalsifiable, because there's nothing to compare against. So the spike added a fourth plane, the same heightmap pushed through actual vertex positions. WebGPU has no hardware tessellation (it's simply not in the spec, cut for Metal compatibility), so the substitute is a densely subdivided plane (256×256 segments, 131,072 triangles) with vertex displacement in the vertex stage. The same amplitude uniform drives both POM and the geometry plane, so they fade together and the comparison stays apples-to-apples at every distance.</p>
<p>With ground truth on screen, the qualitative claims became measurable. At a 16° orbit looking down, POM and the tessellated plane agree on internal shading. At grazing angles they diverge exactly where they must: POM clamps to the geometry's perfectly straight rectangular edge, while the real mesh shows a bumpy horizon profile of actual peaks and valleys catching the light. So POM's edge &quot;swimming&quot; is now provably intrinsic to the algorithm rather than an artifact of the texture or lighting. The two cost shapes are also clear: POM is fragment-bound (cost scales with covered pixels), the tessellated plane is vertex-bound (cost scales with mesh density regardless of coverage). For a terrain chunk, which already pays the vertex cost of a heightmap-driven plane, POM is the right answer for sub-mesh detail.</p>
<p>The reference plane also caught a subtle UX bug. The user noticed the surface appeared to sink as amplitude increased. That traced to Unity's convention treating the geometric plane as the top of the heightfield, so peaks anchor flush and everything else parallaxes downward, dragging the average surface below the flat baseline by <code>(1 − mean_h) × amplitude</code>. The fix re-centers the convention so <code>h = 0.5</code> is the plane, peaks rise toward the camera and valleys recess. The algorithm runs exactly as Unity prescribes, and the spike just post-processes the output by half an offset to match what &quot;amplitude&quot; should mean to a person dragging a slider.</p>
<p>One more thing the reference plane settled. A &quot;Steps&quot; slider seemed to do nothing, which read like a plumbing bug but wasn't. The three-iteration secant refinement after the linear search is so good (Tatarchuk's 2006 POM paper notes a 4-step search plus 3-step secant is visually indistinguishable from a 64-step search) that on a smooth heightmap every step count from 4 to 64 converges to the same sub-texel UV. The fix was a toggle, not a re-plumbing: turn the secant off and the step slider becomes the only control over crossing precision, so dropping to 4 visibly stair-steps the cobblestone and cranking to 64 smooths it back. The toggle is a 0/1 uniform that <code>mix</code>es every secant state update to a no-op when off, so toggling never rebuilds the material and never stutters.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Parallax occlusion mapping in TSL.</strong> POM ray-marches the view direction through a heightfield in tangent space, finds the first layer where the ray drops below the surface, and refines the crossing, producing recessed-mortar depth on a flat quad with no extra geometry. A final <code>mix(baseUV, refined, done)</code> makes the material bit-identical to flat when no fragment crosses, and that lets distance-LOD amplitude attenuation collapse the cost to flat-texture cost at range. See <a href="/guides/landscape-generation-browser#terrain-materials">terrain materials</a>.</p>
<p><strong>Branchless loops for WebGPU control flow.</strong> On Three.js r184, TSL <code>If(...).and(...)</code> can compile to WGSL whose loop body never runs, and standalone <code>Break()</code> isn't available. The portable pattern is an unconditional texture sample per iteration (keeping texture access in uniform control flow per the WGSL spec) plus a <code>done</code> flag held as a float that <code>mix</code>es each state update to a no-op once set. A <code>step</code> helper built from <code>sign(x + ε)</code> avoids unreliable boolean-to-float coercion. Cost is constant max iterations regardless of early-out point, the correct trade at fragment scale.</p>
<p><strong>Verbatim shader porting.</strong> Porting a known-good shader from another engine should be line-for-line with the original's variable names first, refactor for local style second. Mixing two references (Unity's <code>PerPixelDisplacement.hlsl</code> and the LearnOpenGL tutorial) produced a mongrel with an off-by-one ray baseline, an inverted offset sign, and a refinement formula whose clamp masked out-of-range weights as spatial discontinuities. Use one canonical ground truth rather than a re-derivation.</p>
<p><strong>Vertex-displaced ground-truth reference.</strong> With no hardware tessellation in WebGPU, a densely subdivided plane (256² segments) displaced in the vertex stage stands in as real geometry to validate a fragment-stage fake. Driving both with the same amplitude uniform keeps the comparison fair across distance. POM is fragment-bound (scales with covered pixels) and the geometry plane is vertex-bound (scales with mesh density), so they diverge exactly at silhouette edges, proving POM's edge swim is intrinsic rather than an artifact.</p>
<hr>
<p>Part 20 of 29.
Previous: <a href="/blog/2026-05-04-open-world-browser-part-19-imposters">Part 19 - The imposter that has to survive a forest</a>
Next: <a href="/blog/2026-05-06-open-world-browser-part-21-visibility-buffer">Part 21 - A faster renderer that wasn't faster</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 19: The imposter that has to survive a forest]]></title>
            <link>https://app.cinevva.com/blog/2026-05-04-open-world-browser-part-19-imposters</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-04-open-world-browser-part-19-imposters</guid>
            <pubDate>Mon, 04 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 38 baked a tree down to two textures on a billboard, then a KISS rewrite and an odd-N fix made it match. Spikes 41-42 killed the snap with hemi-octahedral blending and pushed a million trees onto the GPU.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 19: The imposter that has to survive a forest</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-02-open-world-browser-part-18-ai-scattering">Part 18</a> gave creators a brush that fills a hillside with trees. The catch is what those trees cost when there are tens of thousands of them on screen. A distant tree doesn't need 2,000 triangles to contribute four pixels. This part is the deepest LOD: the imposter, a flat quad wearing a photo of the tree, and the road from &quot;one tree that looks right&quot; to a million of them on the GPU.</p>
<h2>A tree is two textures on a billboard</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/38-imposters/" title="Spike 38 Octahedral Imposters" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/38-imposters/" target="_blank">Open Spike 38 in a new tab ↗</a> · <a href="/blog/spike-source?spike=38-imposters">View source</a></p>
<p>An imposter pre-renders a prop from a grid of viewing angles into two texture atlases, one for color and one for world-space normals, then at runtime shows a single camera-facing quad sampling whichever tile matches the current view. The bake is two passes per tile: diffuse with an unlit material so no lighting bakes into the texture, and normals encoded as <code>normalWorld × 0.5 + 0.5</code> with alpha forwarded from the source so the silhouette matches pixel-for-pixel. The runtime material is a full <code>MeshStandardNodeMaterial</code>, so the imposter still takes the scene's sun and IBL like any other surface. The win is the geometry: one quad instead of thousands of triangles, with the detail living in a 1 MB texture.</p>
<p>Pulling this into its own spike was itself a lesson. The imposter started as the deepest LOD inside spike 37's scatter system, and every iteration on the bake had to be tested through the full scatter pipeline, with bake correctness tangled up in instance-matrix migration and LOD swaps. Splitting it out to one prop, one quad, side-by-side with the original, dropped iteration time from minutes to seconds.</p>
<h2>When the textbook answer is the wrong answer</h2>
<p>The first implementation used octahedral encoding, the textbook mapping for packing sphere directions into a square. It passed numerical roundtrip tests, and yet the user kept screenshotting the imposter snapped to a tile that looked like the tree from slightly above instead of straight on. Six rounds of fixes followed (a per-quad view-direction uniform, a square bake aspect, debug materials, static billboarding) and every one was genuinely needed but none was the actual bug. The fix only came with &quot;rethink it from scratch, KISS, no band-aids.&quot;</p>
<p>The rewrite threw out octahedral folding for plain azimuth by elevation: <code>az = atan2(dir.x, dir.z)</code>, <code>el = asin(dir.y)</code>, <code>uv = (az/2π, el/π + ½)</code>. That's the whole encoding, with no L1 normalize and no sign-of-zero corner cases. It samples a less uniform sphere, so it's no more accurate. Its advantage here is that the CPU cell-picker and the GPU shader use the same primitives, so they can't disagree at a boundary direction the way the octahedral pair did. The atlas reads like a contact sheet: column is the angle around the prop, row is elevation, obvious at a glance in the overlay.</p>
<p>Even after that, the &quot;looks from slightly above&quot; complaint survived, and the cause was a quantization choice rather than the encoding. With a 4×4 grid the row centers land at ±22.5° and ±67.5°, so there is no row at exactly 0° elevation. A viewer looking horizontally, the overwhelmingly common case, always falls into a row baked at a tilt. The fix is odd N: a 5×5 grid puts row centers at 0° and ±36° and ±72°, so the horizontal viewer gets a tile baked at exactly horizontal. The same family of &quot;off-by-half-a-cell&quot; mistake shows up again in the next part's parallax work, and the cure is the same question: does my discrete sample point actually land where I think it does for the canonical input?</p>
<p>Two more pieces mattered. The billboard has to be piecewise-static rather than continuously facing the camera. The imposter is a flat photo taken from a specific bake direction, so the runtime quad's image plane must match that bake camera's plane, which means it holds orientation across the arc where one cell stays selected, then snaps at the boundary. And the budget should follow where players actually look: a later pass dropped the tilted top-down rows entirely in favor of 24 horizontal ring slots at 15° apart plus one straight-down tile, because trees are viewed from eye height roughly all the time.</p>
<h2>The snap, and how blending erased it</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/42-imposter-flicker/" title="Spike 42 Imposter Flicker Comparison" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/42-imposter-flicker/" target="_blank">Open Spike 42 in a new tab ↗</a> · <a href="/blog/spike-source?spike=42-imposter-flicker">View source</a></p>
<p>The piecewise-static billboard is invisible at distance and pops at close range, which is fine until you orbit. Spike 42 put four variants side by side (the original prop, the az/el 5×5 baseline, and two hemi-octahedral grids) to isolate the flicker and kill it. Two artifacts drive the snap. The cell pop happens because the fragment shader quantizes the view direction into one of 25 cells, so crossing a boundary swaps the sampled tile and re-aims the quad on the same frame. The pole degeneracy is the top-down view, where every azimuth collapses onto one point and the bridge between the ring and the top tile is the worst transition in the atlas.</p>
<p>Hemi-octahedral mapping fixes both. It maps the upper hemisphere onto the unit square continuously, so adjacent 3D directions land at adjacent UVs and there's no pole singularity and no need for a special top-down tile. The flicker cure is bilinear cell blending: instead of snapping to the nearest tile, find the 2×2 group of tiles bracketing the encoded direction and blend all four, 8 texture taps total (4 diffuse, 4 normal). Adjacent views now cross-fade instead of popping. The normal blend of two unit vectors isn't itself unit length, so it gets renormalized, which behaves like a slerp for the small angles between neighboring tiles. The cost is real (a 12×12 atlas is about 9 MB versus the az/el 1.6 MB, and the bake runs roughly 5× longer at 288 render-target passes) but the bake is a one-shot at load and the blend buys a pop-free result, and that makes imposters usable while the camera is actually moving.</p>
<h2>A million trees, one camera-position copy per frame</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/41-imposter-forest/" title="Spike 41 Imposter Forest" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/41-imposter-forest/" target="_blank">Open Spike 41 in a new tab ↗</a> · <a href="/blog/spike-source?spike=41-imposter-forest">View source</a></p>
<p>Spike 38's runtime does one CPU <code>lookAt</code> per quad per frame, which is fine for one tree and fatal for a forest. At a million trees the per-frame matrix updates and instance-buffer upload would dominate everything. Spike 41 moves the entire per-frame pipeline onto the GPU. Each instance's center, yaw, and scale upload once at build time as instanced attributes and never change. The vertex shader builds the billboard basis from the world-space view direction <code>camPos − center</code> and expands a shared unit quad into world space. The fragment shader does the hemi-octahedral encode and the bilinear blend per pixel. The only per-frame CPU work for the whole forest is one <code>Vector3.copy</code> to update the camera-position uniform, which doesn't scale with tree count at all.</p>
<p>A nice piece of the math is that the per-instance yaw cancels out of the normal decode. The bake stores normals in the bake camera's frame, and because a yaw rotation about world up preserves +Y and the cross product is rotation-equivariant, the runtime basis built with a world-up reference already equals the rotated bake basis. So the shader decodes normals straight through the runtime basis varyings without ever touching the per-instance yaw. Placement uses a jittered grid rather than pure random scatter: partition the area into cells, drop one tree per cell at the center plus a bounded offset, which guarantees a minimum spacing (no two trees on top of each other) while still reading as a natural forest. One detail that's easy to miss is the bounding sphere. The geometry template is just a unit quad, so three.js would frustum-cull the whole forest as soon as the camera looked away from the origin. Setting an explicit bounding sphere covering the full area plus a quad's margin keeps the corner trees from getting chopped at glancing angles.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Octahedral and azimuth-elevation imposter atlases.</strong> An imposter bakes a prop from a grid of view directions into a diffuse atlas and a world-space normal atlas, then renders a single billboard sampling the matching tile, replacing thousands of triangles with two textures. The textbook octahedral mapping gives uniform sphere coverage but is prone to CPU/GPU divergence at fold boundaries, while a plain azimuth-by-elevation grid samples a less uniform sphere but guarantees the cell-picker and shader agree by construction. Use odd N so a row lands at exactly 0° elevation, and spend the tile budget on the horizontal ring since props are mostly viewed from eye height.</p>
<p><strong>Piecewise-static billboard orientation.</strong> An imposter is a photo from a specific bake direction, so the runtime quad's image plane must match the bake camera's plane rather than continuously face the runtime camera. The quad holds orientation across the arc where one cell stays selected, then snaps at the boundary, which is invisible at imposter distance and only pops up close where imposters aren't used.</p>
<p><strong>Hemi-octahedral atlas with bilinear cell blend.</strong> Mapping the upper hemisphere onto the unit square continuously removes the pole singularity and the special top-down tile. The snap is killed by sampling the 2×2 tile group bracketing the encoded view direction and bilinear-blending all four tiles (8 taps), so adjacent views cross-fade. Blended normals are renormalized, approximating a slerp over the small inter-tile angle. Cost is a larger atlas (about 9 MB at 12×12) and a longer one-shot bake, traded for pop-free shading under camera motion.</p>
<p><strong>GPU-driven instanced imposters.</strong> Per-instance center, yaw, and scale upload once as instanced attributes, the vertex shader builds the billboard basis and expands a shared unit quad, and the fragment shader does the encode and blend per pixel. Per-frame CPU cost for the whole forest is a single camera-position uniform copy, independent of instance count. Per-instance yaw cancels out of the normal decode because yaw about world up is preserved by the cross-product basis construction. An explicit forest-wide bounding sphere prevents three.js from frustum-culling the entire instanced mesh when the camera looks away from the unit-quad template's origin. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD</a>.</p>
<hr>
<p>Part 19 of 29.
Previous: <a href="/blog/2026-05-02-open-world-browser-part-18-ai-scattering">Part 18 - A scatter brush that feels AI-placed</a>
Next: <a href="/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion">Part 20 - Faking depth on a flat plane</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Volumetric clouds and weather effects in modern games]]></title>
            <link>https://app.cinevva.com/blog/2026-05-04-volumetric-clouds-and-weather</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-04-volumetric-clouds-and-weather</guid>
            <pubDate>Mon, 04 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[How modern games render volumetric clouds, atmospheric scattering, fog, rain, snow, and dynamic weather, with the foundational papers and engine talks behind each technique.]]></description>
            <content:encoded><![CDATA[<h1>Volumetric clouds and weather effects in modern games</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="/img/blog/clouds_weather_hero.webp" alt="Stylized AAA scene with towering volumetric storm clouds, lightning, rain shafts, and a wet stone road reflecting the sky" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>A few weeks ago I wrote about <a href="/blog/2026-05-03-aaa-rendering-techniques">the rendering techniques modern AAA games actually ship</a>. One area I left thin was sky and weather, because it deserves its own list. Clouds, fog, rain, and snow are the systems that turn a terrain demo into a place. They also share more code than they look like they do. Volumetric clouds, ground fog, and god rays are all the same ray-march. Wet roads, snow accumulation, and footprint trails are all the same displacement plus PBR trick. Wind is one direction vector that everything in the scene reads from.</p>
<p>Here's a short, opinionated tour of how the bigger studios build this stuff in 2026, with the papers and engine talks behind each piece.</p>
<h2>1. Physically based sky and atmosphere</h2>
<p>Atmospheric scattering is the foundation. The sky color, the horizon haze, the way distant mountains turn blue, the orange of sunset, all come from light scattering through the air. Modern engines compute this from physics: Rayleigh scattering for the blue, Mie scattering for the haze around the sun, ozone absorption for the deep violet at the zenith.</p>
<p>The original 2008 Bruneton method baked everything into 4D lookup tables, which limited dynamic time-of-day and added LUT artifacts at low sun angles. Sébastien Hillaire's 2020 update, the one UE5's Sky Atmosphere component ships, replaces the high-dimensional LUT with a few 2D textures and a multiple-scattering approximation that updates per frame. It runs from a phone to a high-end PC.</p>
<img src="/img/blog/clouds_weather_atmosphere.webp" alt="Physically based sky at golden hour with smooth orange-to-blue gradient over a distant mountain silhouette" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Hillaire, <a href="https://sebh.github.io/publications/egsr2020.pdf">A Scalable and Production Ready Sky and Atmosphere Rendering Technique</a> (EGSR 2020, the modern standard, used in UE5).</li>
<li>Bruneton and Neyret, <a href="https://hal.inria.fr/inria-00288758/document">Precomputed Atmospheric Scattering</a> (EGSR 2008, the original LUT approach).</li>
<li>Bruneton, <a href="https://ebruneton.github.io/precomputed_atmospheric_scattering/">Precomputed Atmospheric Scattering: a New Implementation</a> (open-source reference, ozone and multi-planet support).</li>
<li>Epic Games, <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/sky-atmosphere-component-in-unreal-engine">Sky Atmosphere Component</a> (UE5 docs).</li>
</ul>
<h2>2. Volumetric clouds with Perlin-Worley noise</h2>
<p>The bedrock cloud technique in modern games started in Andrew Schneider's 2015 Horizon Zero Dawn talk. Clouds are not meshes. They are a 3D density function defined by layered noise: a low-frequency Perlin-Worley mix gives the overall cloud shape, and a higher-frequency Worley noise erodes the silhouette into wispy edges. A weather map (a 2D texture sampled by world XZ) controls coverage, cloud type, and precipitation per region. A height-based gradient blends between cumulus, stratus, and cirrus profiles by altitude.</p>
<p>The renderer marches a ray from the camera through the cloud volume, accumulating density and scattering. The &quot;Nubis&quot; iteration in 2017 added regional-scale authoring and animation, and the original PS4 implementation ran in about 2 ms for the entire sky. Most studios that ship volumetric clouds today still trace their lineage to this paper.</p>
<img src="/img/blog/clouds_weather_noise.webp" alt="A 3D cloud shape decomposed into stacked Perlin and Worley noise patterns showing how detail erodes the silhouette" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Schneider, <a href="https://www.guerrilla-games.com/read/the-real-time-volumetric-cloudscapes-of-horizon-zero-dawn">The Real-Time Volumetric Cloudscapes of Horizon Zero Dawn</a> (SIGGRAPH 2015, the canonical reference).</li>
<li>Schneider, <a href="https://advances.realtimerendering.com/s2017/Nubis%20-%20Authoring%20Realtime%20Volumetric%20Cloudscapes%20with%20the%20Decima%20Engine%20-%20Final%20.pdf">Nubis: Authoring Real-Time Volumetric Cloudscapes with the Decima Engine</a> (SIGGRAPH 2017, the regional-scale follow-up).</li>
<li>Hillaire, <a href="https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/s2016-pbs-frostbite-sky-clouds-new.pdf">Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite</a> (SIGGRAPH 2016, the Frostbite version).</li>
<li>Häggström, <a href="https://www.diva-portal.org/smash/get/diva2:1223894/FULLTEXT01.pdf">Real-time rendering of volumetric clouds</a> (a clean, approachable thesis with full shader code).</li>
</ul>
<h2>3. Voxel clouds and Nubis³</h2>
<p>The 2023 evolution of Nubis abandoned the 2.5D shape representation entirely in favor of true 3D voxels. Each voxel stores cloud density directly, which lets artists carve and animate cloud shapes the way they sculpt terrain. The cost of moving to a denser representation is paid back by ray-march acceleration with compressed signed distance fields and clever up-rezzing of sparse voxel data.</p>
<p>The result is the kind of cloudscape you can fly <em>through</em> without seeing the underlying tricks fall apart. It's overkill for most studios, but it's the direction the high end is moving.</p>
<img src="/img/blog/clouds_weather_voxel_clouds.webp" alt="A cumulus cloud shown decomposed into a 3D voxel grid, with smoothed wispy edges blending the chunky interior" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Schneider, <a href="https://www.guerrilla-games.com/read/nubis-cubed">Nubis³: Methods (and madness) to model and render immersive real-time voxel-based clouds</a> (SIGGRAPH 2023, the voxel-cloud talk).</li>
<li>Schneider, <a href="https://www.guerrilla-games.com/read/nubis-evolved">Nubis, Evolved</a> (SIGGRAPH 2022, the bridge between 2.5D and full 3D).</li>
<li>Schneider, <a href="https://www.schneidervfx.com/">Real-time Volumetrics and VFX</a> (Andrew's personal site, with course notes and breakdowns).</li>
</ul>
<h2>4. Layered cloud rendering and 2D backdrops</h2>
<p>Not every studio can afford full-volume clouds, and not every camera angle needs them. A lot of games combine techniques: high-altitude cirrus rendered as a scrolling 2D layer, mid-altitude cumulus as volumetric rays, and low-altitude stratus as a thin participating-media slab. The horizon often gets a pre-baked sky cubemap that the volumetric pass blends into beyond a fade distance.</p>
<p>This layering is what keeps the cloud budget under control. A single cloud type at full quality can eat 4-6 ms, and layering different qualities for different cloud altitudes can hold the same look at half the cost.</p>
<img src="/img/blog/clouds_weather_cloud_layers.webp" alt="Sunset sky split into three cloud layers: high cirrus wisps, mid cumulus puffs, and low stratus haze near the horizon" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Vos, <a href="https://www.gdcvault.com/play/1023327/The-Real-Time-Volumetric-Cloudscapes">The Real-Time Volumetric Cloudscapes of Horizon Zero Dawn</a> (GDC 2016 video, the layering breakdown is in the second half).</li>
<li>Bauer, <a href="https://www.youtube.com/watch?v=IYxtqlD1-Ac">Creating the Atmospheric World of Red Dead Redemption 2</a> (SIGGRAPH 2019, RDR2's combined sky/clouds/volumetrics pipeline).</li>
<li>Hillaire, <a href="https://www.gdcvault.com/play/1029105/Volumetric-Clouds-and">Volumetric clouds and mega particles in REDengine 4</a> (GDC 2025, Cyberpunk 2077's cloud pipeline).</li>
</ul>
<h2>5. Volumetric fog with froxel grids</h2>
<p>Fog is a 3D field rather than a 2D screen effect. The standard modern approach is the froxel grid: a 3D texture aligned to the camera's view frustum, with each cell (&quot;froxel&quot; = frustum + voxel) storing density and lit color. A compute shader injects scattering from every light source into the grid, accumulates extinction along the view ray, and applies the result as a fullscreen pass.</p>
<p>This is what gives you light shafts through windows, colored fog around point lights, and visible volumes around explosions. It's also the underlying machinery for &quot;atmospheric perspective&quot; that fades distant objects into the air. The technique was introduced by Bart Wronski for Assassin's Creed 4 and standardized by Sébastien Hillaire in Frostbite.</p>
<img src="/img/blog/clouds_weather_froxel_fog.webp" alt="Camera frustum visualized as a 3D froxel grid with smaller cells near the camera and bigger cells far away, fog particles inside" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Wronski, <a href="https://bartwronski.com/wp-content/uploads/2014/08/bwronski_volumetric_fog_siggraph2014.pdf">Volumetric Fog: Unified Compute Shader Based Solution to Atmospheric Scattering</a> (SIGGRAPH 2014, the original froxel-grid paper).</li>
<li>Hillaire, <a href="http://www.frostbite.com/2015/08/physically-based-unified-volumetric-rendering-in-frostbite/">Physically Based and Unified Volumetric Rendering in Frostbite</a> (SIGGRAPH 2015, the production-grade implementation).</li>
<li>Kovalovs, <a href="https://history.siggraph.org/wp-content/uploads/2022/08/2020-Talks-Kovalovs_Volumetric-Effects-of-The-Last-of-Us-Part-Two.pdf">Volumetric Effects of The Last of Us Part Two</a> (SIGGRAPH 2020, with notes on temporal jitter and depth-correct compositing).</li>
<li>Wright et al., <a href="https://advances.realtimerendering.com/s2022/SIGGRAPH2022-Advances-Lumen-Wright%20et%20al.pdf">Lumen: Real-Time Global Illumination in Unreal Engine 5</a> (SIGGRAPH 2022, includes Lumen's interaction with volumetric fog).</li>
</ul>
<h2>6. God rays and crepuscular shafts</h2>
<p>Visible rays of sunlight in misty air are not a separate effect. They fall out of the same fog system, as long as the fog density and the shadow map are both available to the same compute shader. When the shader injects light into a froxel, it samples the shadow map at that froxel's world position. Cells in shadow stay dark, cells in light pick up the sun color. March the camera ray through the result and the bright cells form continuous shafts.</p>
<p>Cheaper screen-space variants exist (radial blur from the sun position into the depth buffer) and are still the right pick on mobile or low-end hardware. They miss off-screen sun positions but cost almost nothing.</p>
<img src="/img/blog/clouds_weather_god_rays.webp" alt="Dawn forest with sun rays slicing through tree trunks and ground fog, forming clear god ray shafts" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Mitchell, <a href="https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-13-volumetric-light-scattering-post-process">Volumetric Light Scattering as a Post-Process</a> (GPU Gems 3, the screen-space radial-blur approach).</li>
<li>Engelhardt and Dachsbacher, <a href="https://cg.ivd.kit.edu/publications/2010/epipolar/EpipolarSampling.pdf">Epipolar Sampling for Shadows and Crepuscular Rays in Participating Media</a> (I3D 2010, the more accurate GPU technique).</li>
<li>Vos, <a href="https://www.guerrilla-games.com/read/volumetric-light-effects-in-killzone-shadow-fall">Volumetric Light Effects in Killzone: Shadow Fall</a> (SIGGRAPH 2014, the production version with shadow integration).</li>
</ul>
<h2>7. Lightning and stochastic weather events</h2>
<p>Lightning is a one-frame effect with two parts: the bolt mesh, and the scene-wide tonemap and lighting response. The bolt itself is usually a procedural billboard mesh built from a recursive line-segment subdivision algorithm, jittered for chaos and tapered toward the ground. Some engines render it as a screen-space additive flash, others as a fully lit emissive geometry that casts light on the world via a one-frame point-light injection.</p>
<p>The interesting part is everything <em>else</em>: cloud bottoms light from below, the ground brightens for two frames, the auto-exposure metering takes a few frames to recover, and a delayed thunder cue plays based on distance. Done well, this turns a 16 ms flash into a five-second sequence that sells weather as something happening in the world rather than just over it.</p>
<img src="/img/blog/clouds_weather_lightning.webp" alt="Lightning fork striking from a thundercloud at dusk, lighting the cloud bottoms and a small village silhouette" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Reed and Wyvill, <a href="https://dl.acm.org/doi/10.1145/192161.192256">Visual Simulation of Lightning</a> (SIGGRAPH 1994, the recursive bolt algorithm everybody still uses).</li>
<li>Kim and Lin, <a href="https://gamma.cs.unc.edu/POWER/">Fast Animation of Lightning Using an Adaptive Mesh</a> (IEEE TVCG 2007, more physically grounded).</li>
<li>Bauer, <a href="https://www.youtube.com/watch?v=IYxtqlD1-Ac">Creating the Atmospheric World of Red Dead Redemption 2</a> (SIGGRAPH 2019, RDR2's storm pipeline including lightning timing).</li>
</ul>
<h2>8. Rain particles, rain meshes, and screen-space drops</h2>
<p>Falling rain in modern games is rarely just particles. The cheap and convincing solution is a small set of scrolling textures stretched across vertical or screen-aligned quads, lit by the same sun and sky probes as everything else. Closer to the camera, individual streak particles add detail. On the camera lens itself, droplet textures, sliding trails, and impact ripples sell the &quot;you are inside the storm&quot; feel.</p>
<p>Wind affects the rain direction. The same wind vector pushes the cloud weather map, bends grass, and tilts the rain quads. One scene-wide vector, dozens of consumers.</p>
<img src="/img/blog/clouds_weather_rain_storm.webp" alt="Heavy night rainstorm with sheets of rain illuminated by distant headlights and ripples on a wet road" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Tatarchuk, <a href="https://gpuopen.com/wp-content/uploads/2018/04/Tatarchuk-Rain-Rendering-EGSR2006.pdf">Artist-Directable Real-Time Rain Rendering in City Environments</a> (EGSR 2006, the canonical layered-rain reference).</li>
<li>Garg and Nayar, <a href="https://www1.cs.columbia.edu/CAVE/projects/rain_ren/rain_ren.php">Photorealistic Rendering of Rain Streaks</a> (SIGGRAPH 2006, the physics of light through raindrops).</li>
<li>Wojciechowski, <a href="https://www.gdcvault.com/play/1027382/Rain-In-Cyberpunk-2077">Rain in Cyberpunk 2077</a> (GDC 2021, a modern production walkthrough).</li>
</ul>
<h2>9. Wet surfaces, puddles, and ripples</h2>
<p>Rain that doesn't change the ground looks fake immediately. Wet surfaces respond by darkening their albedo (water absorbs incoming light), flattening their normals (the water film smooths microsurface), and dropping their roughness (water is a near-perfect mirror at glancing angles). The shader change is small, the visual change is huge.</p>
<p>Puddles are mask-driven: a height-based or vertex-painted mask defines low spots that fill with water as a &quot;wetness&quot; parameter rises. Ripples are flipbook normal-map textures triggered by raindrop impacts. The really nice implementations build the wetness state up over time, so a long rainstorm slowly soaks the world and a brief shower only darkens the high spots.</p>
<img src="/img/blog/clouds_weather_wet_surfaces.webp" alt="Wet cobblestone street at night with shallow puddles reflecting neon signs and ripple rings from raindrop impacts" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Lagarde and de Rousiers, <a href="https://seblagarde.wordpress.com/2015/07/14/siggraph-2014-moving-frostbite-to-physically-based-rendering/">Moving Frostbite to Physically Based Rendering 3.0, section 5.5</a> (SIGGRAPH 2014, the canonical wet-surface PBR adjustments).</li>
<li>Lagarde, <a href="https://seblagarde.wordpress.com/2011/08/17/feeding-a-physical-based-lighting-mode/">Adopting a Physically Based Shading Model</a> (the original blog series with the wet-PBR math).</li>
<li>Cyanilux, <a href="https://www.cyanilux.com/tutorials/rain-effects-breakdown/">Rain Effects Breakdown</a> (an approachable Shader Graph walkthrough of puddles, ripples, and droplets).</li>
</ul>
<h2>10. Snow accumulation and deformation</h2>
<p>Snow is the symmetrical problem to rain: the world has to remember it as well as receive it. The standard approach uses a top-down &quot;snow accumulation&quot; texture that builds up over time wherever the sky is visible (computed against a top-down depth or shadow map). The terrain shader samples this mask and blends in the snow material in shaded regions and snow-deep displacement in exposed areas.</p>
<p>Footprints and tire tracks are rendered into a sliding deformation map centered on the player. As the camera moves, old footprints scroll out and the texture wraps around. The terrain or snow shader samples this deformation map and pushes vertices down where it has been written. Battlefield 5's snow does this with hardware tessellation, and cheaper approaches use a high-density terrain mesh with vertex displacement only.</p>
<img src="/img/blog/clouds_weather_snow_deformation.webp" alt="Stylized snowy landscape with fresh footprints, drifts piled against rocks, falling snowflakes, and hazy distant mountains" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Barré-Brisebois, <a href="https://www.digitalfoundry.net/articles/digitalfoundry-2018-hands-on-with-battlefield-5s-closed-alpha">Hands-on with Battlefield 5: how the small things matter</a> (the production write-up of Frostbite snow).</li>
<li>St-Amour, <a href="https://is.muni.cz/th/m2v6i/real-time_snow_deformation.txt?lang=cs">Real-time snow deformation</a> (a thesis with full GPU implementation details).</li>
<li>Andersson, <a href="https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/chapter5-andersson-terrain-rendering-in-frostbite.pdf">Terrain Rendering in Frostbite Using Procedural Shader Splatting</a> (the splat-system foundation that snow accumulation rides on top of).</li>
</ul>
<h2>11. Wind as a global system</h2>
<p>Wind is not a particle effect. In production engines it's a single global vector (sometimes a low-resolution 3D field) that <em>every</em> dynamic system reads from in its vertex shader. Grass blades bend, tree branches sway, cloth flaps, leaves drift, rain tilts, smoke advects, cloud weather maps scroll. One uniform updated per frame, dozens of consumers.</p>
<p>The richer version is a &quot;wind grid&quot; that stores direction and strength sampled by world position, allowing for storms with localized gusts, sheltered valleys, and wakes behind buildings. Foliage also typically gets a per-vertex offset baked at authoring time so identical trees don't sway in lockstep. The result is a world that breathes at the same rate.</p>
<img src="/img/blog/clouds_weather_wind_foliage.webp" alt="Strong wind blowing grass and trees sideways with leaves swirling in the foreground under stormy clouds" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>McAuley, <a href="https://www.gdcvault.com/play/1022235/Rendering-the-World-of-Far">Rendering the World of Far Cry 4</a> (GDC 2015, includes Far Cry 4's wind grid for vegetation).</li>
<li>Habel and Wimmer, <a href="https://www.cg.tuwien.ac.at/research/publications/2007/HABEL-2007-IIM/">Realistic Real-Time Rendering of Landscapes Using Billboard Clouds</a> (older, but the wind-on-vegetation math is unchanged).</li>
<li>Frostbite, <a href="https://www.guerrilla-games.com/read/the-vegetation-of-horizon-zero-dawn">The Vegetation of Horizon Zero Dawn</a> (SIGGRAPH 2017, with the wind-system architecture).</li>
</ul>
<h2>12. Sandstorms, blizzards, and dense weather</h2>
<p>Severe weather is its own rendering category. A sandstorm is a thick, opaque, ground-aligned fog with a strong directional bias and aggressive distance fog. A blizzard adds a near-camera particle blast and reduced visibility. Volcanic ash and smoke are the same architecture with different colors.</p>
<p>What sells these is the <em>coupling</em> rather than the particles: the sun darkens, the sky tints, the post-process color grading shifts, ambient audio swaps, footstep sounds change, the player's voice gets muffled if they have one. The renderer is the messenger. The immersion comes from every system in the game responding at the same time.</p>
<img src="/img/blog/clouds_weather_sandstorm.webp" alt="A wall of orange dust and sand rolling across a desert plain with bruised sky above and clear blue behind" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Burley, <a href="https://www.gdcvault.com/play/1024954/The-Real-time-Sky-and">The Real-Time Sky and Atmosphere of Uncharted: The Lost Legacy</a> (GDC 2018, with notes on dense-weather composition).</li>
<li>Khalifa, <a href="https://www.gdcvault.com/play/1027587/Atmospheric-Weather-Effects-in-Forza">Atmospheric Weather Effects in Forza Horizon 5</a> (GDC 2022, modern open-world weather).</li>
<li>Karis, <a href="https://advances.realtimerendering.com/s2021/">The Technology Behind the Unreal Engine 5 &quot;Lumen in the Land of Nanite&quot; Demo</a> (SIGGRAPH 2021, the cave dust scene's volumetric stack).</li>
</ul>
<h2>13. Time of day and dynamic skies</h2>
<p>Real-time time of day is the multiplier that makes every other system in this list worth shipping. The sun direction and color update over a 24-minute or 24-hour cycle. The atmosphere LUT updates with the sun angle. The cloud lighting recomputes per frame. The shadow cascades repoint. The reflection probes refresh. The ambient color shifts. The post-process exposure adapts.</p>
<p>Doing this without visible artifacts is mostly a story of texture caching and temporal stability. Fast techniques precompute the sky at fixed sun angles and interpolate, and slower ones recompute every frame. The Hillaire 2020 atmosphere model is fast enough to recompute, and that's the reason UE5 ships it. The cloud weather map scrolls with wind, so coverage shifts naturally without anyone authoring keyframes.</p>
<img src="/img/blog/clouds_weather_time_of_day.webp" alt="Three vertical bands across one landscape: dawn pink, noon blue, sunset red, all sharing the same hill silhouette" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Hillaire, <a href="https://sebh.github.io/publications/egsr2020.pdf">A Scalable and Production Ready Sky and Atmosphere Rendering Technique</a> (EGSR 2020, with the dynamic time-of-day discussion).</li>
<li>Pesce, <a href="https://www.realtimerendering.com/raytracinggems/rtg2/index.html">Real-Time Sky Rendering: Techniques and Tradeoffs</a> (Ray Tracing Gems II chapter, modern survey).</li>
<li>Bauer, <a href="https://www.youtube.com/watch?v=IYxtqlD1-Ac">Creating the Atmospheric World of Red Dead Redemption 2</a> (SIGGRAPH 2019, with the 24-hour pipeline).</li>
</ul>
<h2>14. The weather state machine</h2>
<p>Underneath all of this is a tiny state machine. Most games ship somewhere between 4 and 12 weather states (clear, partly cloudy, overcast, light rain, heavy rain, thunderstorm, fog, snow, blizzard, sandstorm), each defined by a set of parameters: cloud coverage and type, wind speed and direction, precipitation type and intensity, ambient color tints, audio profile, post-process grade.</p>
<p>Transitions are linear interpolations between parameter sets over 30 to 120 seconds. The transition isn't a special case, it's just two states being lerped, with each rendering subsystem reading the current parameter values that frame. Weather can be scripted (cutscene needs a storm), seeded (deterministic per region per in-game day so that two players in the same world see the same weather), or fully authored on a region grid. The cleanest pipelines treat all three as different schedulers writing into the same parameter buffer.</p>
<img src="/img/blog/clouds_weather_state_machine.webp" alt="Side-by-side of the same scene under clear sun on the left and stormy rain on the right with wet glistening surfaces" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Bauer, <a href="https://www.youtube.com/watch?v=IYxtqlD1-Ac">Creating the Atmospheric World of Red Dead Redemption 2</a> (SIGGRAPH 2019, with the weather-state pipeline).</li>
<li>Khalifa, <a href="https://www.gdcvault.com/play/1027587/Atmospheric-Weather-Effects-in-Forza">Atmospheric Weather Effects in Forza Horizon 5</a> (GDC 2022, with the parameter-blend approach).</li>
<li>Schneider, <a href="https://www.guerrilla-games.com/read/the-real-time-volumetric-cloudscapes-of-horizon-zero-dawn">The Real-Time Volumetric Cloudscapes of Horizon Zero Dawn</a> (SIGGRAPH 2015, with weather-map-driven cloud evolution).</li>
</ul>
<h2>15. The cinematic moments</h2>
<p>The whole stack exists for a few signature moments. Standing on a ridge as a storm front rolls in. Watching a sun shaft burn through a clearing in the canopy. Walking out of a cave into snow. Flying through a cumulus cloud and seeing the light on the inside.</p>
<p>These are the moments players take screenshots of. They're also the moments where every system above has to be working at the same time: cloud volumetrics, atmospheric scattering, fog with shadow integration, wet PBR, wind on the foliage, time-of-day color grading, and a transition between weather states all composing into one frame. Get any one of them wrong and the magic snaps.</p>
<img src="/img/blog/clouds_weather_cloud_sea.webp" alt="Looking down across a sea of clouds onto a single mountain peak rising through, with sunlit cloud tops and shadowed valleys below" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<h2>What this means for the browser</h2>
<p>Most of these techniques map cleanly onto WebGPU. We've shipped basic atmospheric fog, equirectangular skybox blending, and screen-space distance haze in the <a href="/blog/2026-02-25-open-world-browser-series-guide">open-world browser engine</a>. The harder pieces (full volumetric clouds, froxel grid fog, wet PBR with dynamic puddles, snow deformation maps) are the obvious next step now that the terrain pipeline is stable. Spike 24's per-fragment fog color sampling from the skybox is one piece of this puzzle. A compute-shader cloud raymarcher feeding into the same atmosphere LUT is the next.</p>
<p>The good news is that the browser hardware floor is now high enough. WebGPU compute, 3D textures, indirect dispatch, and timestamp queries all exist. The Hillaire 2020 atmosphere has been ported to WebGL multiple times. Schneider's Nubis has open-source reference implementations in GLSL that translate to WGSL with mechanical edits. There is no longer a rendering reason that a browser game can't have the same sky as a console one. There are just engineering reasons, and engineering reasons are the kind we like.</p>
<h2>Further reading across the whole stack</h2>
<p>If you want one source that pulls all of this together, the SIGGRAPH &quot;Advances in Real-Time Rendering in Games&quot; archive (<a href="https://advances.realtimerendering.com/">advances.realtimerendering.com</a>) has the canonical weather and atmosphere talks going back to 2014. For production tear-downs of how specific games render their sky and weather, <a href="http://www.adriancourreges.com/blog/">Adrian Courrèges' GPU profiling articles</a> include detailed frame-by-frame breakdowns of GTA V, Horizon Zero Dawn, and Doom Eternal. For the sky and atmosphere math specifically, <a href="https://www.scratchapixel.com/lessons/3d-basic-rendering/volume-rendering-for-developers/intro-volume-rendering.html">scratchapixel.com's volume rendering chapter</a> is the gentlest introduction, and Hillaire's open-source <a href="https://github.com/sebh/UnrealEngineSkyAtmosphere">implementation repository</a> is the production-quality reference.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A short list of rendering techniques used in modern AAA games]]></title>
            <link>https://app.cinevva.com/blog/2026-05-03-aaa-rendering-techniques</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-03-aaa-rendering-techniques</guid>
            <pubDate>Sun, 03 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[The core rendering techniques behind today's AAA visuals, from Nanite virtualized geometry to ReSTIR path tracing and ML-based upscaling, with deep technical references for each.]]></description>
            <content:encoded><![CDATA[<h1>A short list of rendering techniques used in modern AAA games</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<img src="/img/blog/aaa_rendering_hero.webp" alt="Composite scene showing PBR materials, virtualized geometry, and ray-traced lighting in a modern AAA game" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>If you crack open the rendering pipeline of a 2026 AAA game, most of what you'll find traces back to a small set of techniques that ship across studios. The names change between engines, but the ideas are the same. Here's a short list of what's actually doing the work on screen, with a figure and a few deep technical references for each. I've refreshed it in September 2026 with what changed in Unreal Engine 5.8 and what now runs in a browser, and added a set of common questions at the end.</p>
<h2>1. Physically based rendering (PBR)</h2>
<p>Materials are described by albedo, roughness, metallic, normal, and ambient occlusion textures, and lit by energy-conserving shaders (Cook-Torrance specular, Lambertian or Disney diffuse). It's the baseline every modern AAA engine assumes. If a surface looks consistent under sunlight, lamp light, and a flashlight, PBR is why.</p>
<img src="/img/blog/aaa_pbr_materials.webp" alt="Iron helmet rendered with PBR materials, with floating texture swatches showing albedo, roughness, metallic, and normal maps" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Burley, <a href="https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf">Physically-Based Shading at Disney</a> (the original &quot;Disney BRDF&quot; course notes, SIGGRAPH 2012).</li>
<li>Karis, <a href="https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf">Real Shading in Unreal Engine 4</a> (SIGGRAPH 2013, the canonical UE4 PBR talk).</li>
<li>Lagarde and de Rousiers, <a href="https://seblagarde.wordpress.com/2015/07/14/siggraph-2014-moving-frostbite-to-physically-based-rendering/">Moving Frostbite to Physically Based Rendering 3.0</a> (SIGGRAPH 2014, full Frostbite pipeline).</li>
<li><a href="https://www.realtimerendering.com/">Real-Time Rendering, 4th edition, chapter 9</a> (the textbook reference).</li>
</ul>
<h2>2. Deferred and visibility-buffer shading</h2>
<p>Geometry first writes attributes (normals, material IDs, depth) into a G-buffer or visibility buffer. Lighting runs as a fullscreen pass that reads those buffers and shades each pixel once. Visibility buffers (used by Nanite and similar) push this further by storing only triangle IDs and resolving material parameters per pixel later, which keeps overdraw cheap on dense geometry.</p>
<img src="/img/blog/aaa_deferred_gbuffer.webp" alt="Deferred shading G-buffer split into final color, world normals, depth, and material ID panels" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Engel, <a href="https://download.nvidia.com/developer/presentations/2004/6800_Leagues/6800_Leagues_Deferred_Shading.pdf">Deferred Shading</a> (NVIDIA, the foundational talk).</li>
<li>Burns and Hunt, <a href="http://jcgt.org/published/0002/02/04/">The Visibility Buffer: A Cache-Friendly Approach to Deferred Shading</a> (JCGT 2013, the original visibility buffer paper).</li>
<li>Wihlidal, <a href="http://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/">&quot;Optimizing the Graphics Pipeline with Compute&quot;</a> (GDC 2016, Frostbite's compute-based deferred path).</li>
<li>Karis, Stubbe, Wihlidal, <a href="https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf">A Deep Dive into Nanite Virtualized Geometry</a> (SIGGRAPH 2021, includes the Nanite visibility buffer in detail).</li>
</ul>
<h2>3. Virtualized geometry (Nanite-style)</h2>
<p>Meshes are pre-built into a hierarchy of clusters. At runtime the GPU streams and selects clusters at the resolution that matches each pixel, so you get sub-pixel-accurate detail without manual LODs. Unreal's Nanite is the most visible example. Other engines now ship their own variants. The practical result is film-quality assets in real time without LOD authoring. Unreal Engine 5.8, released in June 2026, pushed Nanite rasterization and culling performance on handheld platforms and added a per-pixel programmable distance control for foliage, per <a href="https://tomlooman.com/unreal-engine-5-8-performance-highlights/">Tom Looman's 5.8 performance notes</a>, and Epic has said 5.8 is the last 5.x release before development moves to Unreal Engine 6.</p>
<img src="/img/blog/aaa_virtualized_geometry.webp" alt="Smooth render on the left, sub-pixel meshlet clusters in vivid colors on the right" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Karis, Stubbe, Wihlidal, <a href="https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf">A Deep Dive into Nanite Virtualized Geometry</a> (SIGGRAPH 2021).</li>
<li>Brian Karis, <a href="https://www.youtube.com/watch?v=eviSykqSUUw">Nanite GDC 2021 talk</a> (an accessible video walkthrough).</li>
<li>Liktor, <a href="https://research.activision.com/publications/2021/09/geometry-rendering-pipeline-architecture-at-activision">Geometry Rendering Pipeline Architecture at Activision</a> (cluster-based rendering, 2021).</li>
<li>Schied et al., <a href="https://research.nvidia.com/publication/2017-07_spatiotemporal-variance-guided-filtering-real-time-reconstruction-path-traced">Spatiotemporal Variance-Guided Filtering</a> (related cluster culling techniques).</li>
</ul>
<h2>4. Real-time ray tracing for shadows, reflections, and AO</h2>
<p>Hardware ray tracing (DXR, Vulkan RT) traces shadow rays, mirror and glossy reflection rays, and ambient occlusion rays against a BVH built each frame. Even a few rays per pixel beat what screen-space techniques can do, especially for off-screen reflections and contact shadows. Most games use it selectively rather than for everything.</p>
<img src="/img/blog/aaa_hardware_raytracing.webp" alt="Glossy red sports car in a luxury showroom with accurate ray-traced reflections and contact shadows" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Microsoft, <a href="https://microsoft.github.io/DirectX-Specs/d3d/Raytracing.html">DirectX Raytracing (DXR) Functional Spec</a> (the API reference).</li>
<li>Wyman, <a href="http://intro-to-dxr.cwyman.org/">Introduction to DirectX Raytracing</a> (the SIGGRAPH course notes, very approachable).</li>
<li>Boksansky and Marrs, <a href="https://www.realtimerendering.com/raytracinggems/rtg2/index.html">Ray Tracing Gems II, chapters 17-19</a> (free PDF, modern DXR techniques).</li>
<li>Stachowiak, <a href="https://www.ea.com/frostbite/news/stochastic-screen-space-reflections">Stochastic Screen-Space Reflections</a> (Frostbite, the bridge from SSR to RT).</li>
</ul>
<h2>5. Software ray tracing (Lumen-style)</h2>
<p>Not every player has an RTX card, so engines also ship distance-field or surface-cache fallbacks. Unreal's Lumen, for instance, traces against signed distance fields and surface caches for cheap diffuse GI, and only escalates to hardware rays when needed. It's how AAA games hit &quot;ray-traced look&quot; on consoles. UE 5.8 added a &quot;Lumen Lite&quot; mode, roughly twice as fast as Lumen's high-quality path and aimed at 60 fps on PlayStation 5, and promoted MegaLights, its stochastic many-light system, to production-ready, per <a href="https://www.cgchannel.com/2026/06/see-5-key-features-for-cg-artists-in-unreal-engine-5-8/">CG Channel's 5.8 rundown</a>.</p>
<img src="/img/blog/aaa_software_rt_lumen.webp" alt="Cathedral interior with stained-glass color bleed and an SDF wireframe overlay revealing approximated geometry" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Wright et al., <a href="https://advances.realtimerendering.com/s2022/SIGGRAPH2022-Advances-Lumen-Wright%20et%20al.pdf">Lumen: Real-Time Global Illumination in Unreal Engine 5</a> (SIGGRAPH 2022, the Lumen paper).</li>
<li>Epic Games, <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/lumen-technical-details-in-unreal-engine">Lumen Technical Details</a> (official engine docs).</li>
<li>Wright, <a href="https://advances.realtimerendering.com/s2021/Wright%20et%20al%20-%20Radiance%20Caching%20for%20Real-Time%20Global%20Illumination%20-%20SIGGRAPH%202021.pdf">Radiance Caching for Real-Time Global Illumination</a> (SIGGRAPH 2021).</li>
<li>Wright, <a href="https://www.youtube.com/watch?v=2GYXuM10riw">Lumen GDC 2022 talk</a> (video version).</li>
</ul>
<h2>6. ReSTIR and reservoir sampling</h2>
<p>For direct and indirect lighting with thousands of light sources, ReSTIR (Reservoir Spatio-Temporal Importance Resampling) reuses light samples across pixels and frames. It's how games like Cyberpunk 2077 with Path Tracing keep noise low at one or two rays per pixel. Expect to see it in more engines as path tracing becomes the high-end target.</p>
<img src="/img/blog/aaa_ray_tracing_restir.webp" alt="Cyberpunk street with ray-traced reflections in wet pavement and visible bounced light paths" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Bitterli et al., <a href="https://research.nvidia.com/sites/default/files/pubs/2020-07_Spatiotemporal-reservoir-resampling/ReSTIR.pdf">Spatiotemporal Reservoir Resampling for Real-Time Ray Tracing with Dynamic Direct Lighting</a> (SIGGRAPH 2020, the original ReSTIR paper).</li>
<li>Ouyang et al., <a href="https://research.nvidia.com/publication/2021-06_restir-gi-path-resampling-real-time-path-tracing">ReSTIR GI: Path Resampling for Real-Time Path Tracing</a> (HPG 2021, indirect-illumination ReSTIR).</li>
<li>Lin et al., <a href="https://research.nvidia.com/publication/2022-07_generalized-resampled-importance-sampling-foundations-restir">Generalized Resampled Importance Sampling</a> (SIGGRAPH 2022, the math foundations).</li>
<li>NVIDIA, <a href="https://www.nvidia.com/en-us/geforce/news/cyberpunk-2077-ray-tracing-overdrive-technology-preview-on-rtx-4090/">Cyberpunk 2077 Path Tracing Tech Deep Dive</a> (engineering blog).</li>
</ul>
<h2>7. Volumetric clouds, fog, and atmosphere</h2>
<p>Skies are ray-marched through 3D noise and density volumes. Atmosphere uses precomputed scattering tables (Bruneton-style) for sun and moon transitions. Fog is a froxel grid (think a 3D texture aligned to the view frustum) that captures local lighting. Together they give you &quot;weather as a system&quot; instead of a skybox.</p>
<img src="/img/blog/aaa_volumetrics.webp" alt="Mountain valley at sunset with volumetric clouds and god rays piercing through misty air" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Schneider, <a href="https://www.guerrilla-games.com/read/the-real-time-volumetric-cloudscapes-of-horizon-zero-dawn">The Real-Time Volumetric Cloudscapes of Horizon Zero Dawn</a> (SIGGRAPH 2015, the canonical clouds reference).</li>
<li>Hillaire, <a href="https://sebh.github.io/publications/egsr2020.pdf">A Scalable and Production Ready Sky and Atmosphere Rendering Technique</a> (EGSR 2020, the modern Bruneton successor used in UE5).</li>
<li>Wronski, <a href="https://bartwronski.com/2014/08/22/volumetric-fog-siggraph-2014/">Volumetric Fog: Unified Compute Shader Based Solution to Atmospheric Scattering</a> (SIGGRAPH 2014, Assassin's Creed 4 froxel fog).</li>
<li>Hillaire, <a href="https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite">Physically Based and Unified Volumetric Rendering in Frostbite</a> (SIGGRAPH 2015).</li>
</ul>
<h2>8. Cascaded shadow maps and virtual shadow maps</h2>
<p>For sun shadows, cascaded shadow maps split the frustum into ranges and render each at appropriate resolution. Virtual shadow maps go further: a single huge shadow map is split into pages and only the pages visible from the camera get rendered. It's how AAA games keep crisp shadows near the player without a giant memory bill. Epic's <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine">VSM docs</a> put the virtual resolution at 16k by 16k per light, and UE 5.8 added a prefiltered distant path that draws far shadow casters into the clipmap at much lower resolution, plus throttling for page invalidation, per <a href="https://tomlooman.com/unreal-engine-5-8-performance-highlights/">Tom Looman's notes</a>.</p>
<img src="/img/blog/aaa_cascaded_shadows.webp" alt="Outdoor scene with three colored cascade frustums overlaid showing shadow detail near the camera" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Dimitrov, <a href="https://developer.download.nvidia.com/SDK/10.5/opengl/src/cascaded_shadow_maps/doc/cascaded_shadow_maps.pdf">Cascaded Shadow Maps</a> (NVIDIA whitepaper, the standard reference).</li>
<li>Microsoft, <a href="https://learn.microsoft.com/en-us/windows/win32/dxtecharts/cascaded-shadow-maps">Common Techniques to Improve Shadow Depth Maps</a> (DirectX docs).</li>
<li>Wright, <a href="https://advances.realtimerendering.com/s2023/index.html#VirtualShadowMaps">Virtual Shadow Maps in Fortnite Battle Royale Chapter 4</a> (SIGGRAPH 2023, the UE5 VSM talk).</li>
<li>Epic Games, <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine">Virtual Shadow Maps documentation</a>.</li>
</ul>
<h2>9. Screen-space effects (SSAO, SSR, SSGI, SSSSS)</h2>
<p>Reading the depth and normal buffers cheaply gives you ambient occlusion (SSAO), reflections (SSR), one-bounce global illumination (SSGI), and subsurface scattering for skin (SSSSS). They miss off-screen detail, so ray tracing is taking over, but they're still everywhere as a fast baseline.</p>
<img src="/img/blog/aaa_screen_space_effects.webp" alt="Side-by-side kitchen scene comparing flat lighting on the left with SSAO, SSR, and SSGI on the right" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Mittring, <a href="https://www.crytek.com/wp-content/uploads/Finding%20Next%20Gen%20-%20CryEngine%202.pdf">Finding Next Gen: CryENGINE 2</a> (SIGGRAPH 2007, the original SSAO paper).</li>
<li>McGuire et al., <a href="https://research.nvidia.com/publication/scalable-ambient-obscurance">Scalable Ambient Obscurance</a> (HPG 2012, modern SSAO).</li>
<li>Stachowiak and Uludag, <a href="https://www.ea.com/frostbite/news/stochastic-screen-space-reflections">Stochastic Screen-Space Reflections</a> (Frostbite, the SSR reference).</li>
<li>Jimenez, <a href="https://www.iryoku.com/separable-sss/">Separable Subsurface Scattering</a> (the technique used for skin in most AAA engines).</li>
<li>Mara et al., <a href="https://research.activision.com/publications/2016/09/deep-g-buffers-for-stable-global-illumination-approximation">Deep Screen Space</a> (Activision, an SSGI lineage).</li>
</ul>
<h2>10. Temporal anti-aliasing and ML upscaling (DLSS, FSR, XeSS)</h2>
<p>The frame is rendered at a lower internal resolution and reconstructed using motion vectors, depth, and history. ML-based upscalers (DLSS 4, FSR 4, XeSS) add frame generation on top, interpolating intermediate frames from optical flow. AMD's <a href="https://gpuopen.com/learn/amd-fsr-redstone-developers-neural-rendering/">FSR &quot;Redstone&quot;</a> extends FSR 4 with ML frame generation, ray regeneration, and a neural radiance cache on RDNA 4 hardware, which is the clearest sign that upscaling and denoising are merging into one neural stage. Most AAA titles now ship assuming an upscaler is on, which changes how you budget the rest of the frame.</p>
<img src="/img/blog/aaa_ml_upscaling.webp" alt="Side-by-side of a low-resolution input and a sharp ML-reconstructed output of the same character" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Karis, <a href="http://advances.realtimerendering.com/s2014/index.html#_HIGH-QUALITY_TEMPORAL_SUPERSAMPLING">High Quality Temporal Supersampling</a> (SIGGRAPH 2014, the canonical TAA talk).</li>
<li>Salvi, <a href="https://research.nvidia.com/sites/default/files/pubs/2016-03_An-Excursion-in/dlss_DTAA-2-2.pdf">An Excursion in Temporal Supersampling</a> (NVIDIA, on the path to DLSS).</li>
<li>Edelsten, <a href="https://www.gdcvault.com/play/1026184/">Truly Next-Gen: Adding Deep Learning to Games and Graphics</a> (GDC 2019, DLSS architecture).</li>
<li>AMD, <a href="https://gpuopen.com/fidelityfx-super-resolution-3/">FidelityFX Super Resolution 3 technical details</a> and Intel, <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/intel-xess-technical-paper.html">XeSS technical paper</a>.</li>
</ul>
<h2>11. GPU-driven rendering and mesh shaders</h2>
<p>Culling, LOD selection, and draw submission all run on the GPU. Mesh shaders replace the vertex/geometry/tessellation pipeline with a more flexible compute-style stage that emits meshlets. Combined with multi-draw indirect, this keeps the CPU out of the per-object hot loop entirely.</p>
<img src="/img/blog/aaa_gpu_driven_meshlets.webp" alt="Alien spaceport scene with colored meshlet cluster overlay showing GPU-driven rendering" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Haar and Aaltonen, <a href="https://advances.realtimerendering.com/s2015/aaltonenhaar_siggraph2015_combined_final_footer_220dpi.pdf">GPU-Driven Rendering Pipelines</a> (SIGGRAPH 2015, the foundational Assassin's Creed Unity talk).</li>
<li>Wihlidal, <a href="https://www.frostbite.com/2016/03/optimizing-the-graphics-pipeline-with-compute/">Optimizing the Graphics Pipeline with Compute</a> (GDC 2016, Frostbite GPU-driven culling).</li>
<li>Kubisch, <a href="https://developer.nvidia.com/blog/introduction-turing-mesh-shaders/">Introduction to Turing Mesh Shaders</a> (NVIDIA, the mesh shader primer).</li>
<li>Pesce, <a href="https://www.bartwronski.com/">A Whirlwind Tour of Mesh Shaders</a> (and similar engineering blogs collected on <a href="http://www.adriancourreges.com/blog/">Adrian Courrèges' RenderDoc tear-downs</a>).</li>
</ul>
<h2>12. Hair, cloth, and skin rendering</h2>
<p>Hair uses Marschner-style anisotropic shading with strand-based geometry (NVIDIA HairWorks, AMD TressFX, or engine-native systems). Cloth is simulated on the GPU with position-based dynamics and rendered with anisotropic specular. Skin uses screen-space subsurface scattering plus pre-integrated wrap lighting. These three are usually where you spot the budget gap between AAA and indie.</p>
<img src="/img/blog/aaa_hair_cloth_skin.webp" alt="Close-up of a warrior with strand-based hair, cloth cloak, and subsurface-scattered skin" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Marschner et al., <a href="https://www.cs.cornell.edu/~srm/publications/SG03-hair.pdf">Light Scattering from Human Hair Fibers</a> (SIGGRAPH 2003, the foundational hair model).</li>
<li>Chiang et al., <a href="https://benedikt-bitterli.me/pchfm/pchfm.pdf">A Practical and Controllable Hair and Fur Model for Production Path Tracing</a> (Disney 2016, used widely in real-time approximations).</li>
<li>Müller et al., <a href="https://matthias-research.github.io/pages/publications/posBasedDyn.pdf">Position Based Dynamics</a> (the standard cloth simulation reference).</li>
<li>Jimenez et al., <a href="https://www.iryoku.com/separable-sss/">Separable Subsurface Scattering</a> and <a href="https://www.iryoku.com/translucency/">Real-Time Realistic Skin Translucency</a>.</li>
</ul>
<h2>13. Decals, virtual texturing, and material layering</h2>
<p>Surface variation comes from layered decals (bullet holes, dirt, blood, grime) projected onto the depth buffer, plus virtual textures that stream high-resolution detail just-in-time. Material layering blends multiple PBR sets per pixel using masks and triplanar projection, so a single rock can look like five rocks.</p>
<img src="/img/blog/aaa_decals_virtual_textures.webp" alt="Weathered concrete bunker wall with bullet decals, graffiti, and a virtual texture page atlas inset" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Pranckevičius, <a href="https://aras-p.info/blog/2009/02/27/deferred-decals/">Deferred Decals</a> and follow-ups (Aras' classic blog series).</li>
<li>Mittring, <a href="http://advances.realtimerendering.com/s2012/Epic/UnrealEngine4_Mittring_SIGGRAPH2012_Final_Cleaned.pdf">The Technology Behind the &quot;Unreal Engine 4 Elemental Demo&quot;</a> (SIGGRAPH 2012, includes virtual texturing details).</li>
<li>van Waveren, <a href="https://www.realtimerendering.com/blog/id-tech-5-challenges-from-texture-virtualization-to-massive-parallelization/">id Tech 5 Challenges: From Texture Virtualization to Massive Parallelization</a> (SIGGRAPH 2009, the MegaTexture talk).</li>
<li>Williams, <a href="https://www.gdcvault.com/play/1022144/Crafting-the-World-of-The">Material Layering in The Order: 1886</a> (GDC 2014, layered PBR materials).</li>
</ul>
<h2>14. Order-independent transparency</h2>
<p>Hair, foliage, particles, and glass don't sort cleanly. AAA engines use techniques like weighted blended OIT, depth peeling, or per-pixel linked lists to render them correctly without a CPU sort step. It's one of the most expensive parts of the frame on a foliage-heavy scene.</p>
<img src="/img/blog/aaa_oit_transparency.webp" alt="Forest scene with overlapping translucent foliage, smoke, glass droplets, and translucent hair" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>McGuire and Bavoil, <a href="http://jcgt.org/published/0002/02/09/">Weighted Blended Order-Independent Transparency</a> (JCGT 2013, the WBOIT paper).</li>
<li>Bavoil and Myers, <a href="https://developer.download.nvidia.com/SDK/10/opengl/src/dual_depth_peeling/doc/DualDepthPeeling.pdf">Order Independent Transparency with Dual Depth Peeling</a> (NVIDIA whitepaper).</li>
<li>Yang et al., <a href="https://www.cse.chalmers.se/edu/year/2017/course/TDA362/Per-Pixel%20Linked%20List.pdf">Real-Time Concurrent Linked List Construction on the GPU</a> (the per-pixel linked list reference).</li>
<li>Wyman, <a href="https://research.nvidia.com/publication/2016-06_exploring-and-expanding-continuum-oit-algorithms">Exploring and Expanding the Continuum of OIT Algorithms</a> (HPG 2016, comparison survey).</li>
</ul>
<h2>15. Neural radiance caching and ML denoisers</h2>
<p>The newest layer. NVIDIA's neural radiance cache learns indirect lighting per-scene and queries it instead of tracing more rays. ML denoisers (OptiX, Intel Open Image Denoise, custom in-house) clean up sparse ray-traced signals in milliseconds. Expect this category to grow fast over the next two years.</p>
<img src="/img/blog/aaa_neural_radiance_denoise.webp" alt="Noisy 1-spp ray-traced cathedral on the left, clean ML-denoised result on the right" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Deep dives:</p>
<ul>
<li>Müller et al., <a href="https://research.nvidia.com/publication/2021-06_real-time-neural-radiance-caching-path-tracing">Real-Time Neural Radiance Caching for Path Tracing</a> (SIGGRAPH 2021, the NRC paper).</li>
<li>Schied et al., <a href="https://research.nvidia.com/publication/2017-07_spatiotemporal-variance-guided-filtering-real-time-reconstruction-path-traced">Spatiotemporal Variance-Guided Filtering: Real-Time Reconstruction for Path-Traced Global Illumination</a> (HPG 2017, SVGF).</li>
<li>Chaitanya et al., <a href="https://research.nvidia.com/publication/interactive-reconstruction-monte-carlo-image-sequences-using-recurrent-denoising">Interactive Reconstruction of Monte Carlo Image Sequences using a Recurrent Denoising Autoencoder</a> (SIGGRAPH 2017, the first recurrent ML denoiser).</li>
<li>Intel, <a href="https://www.openimagedenoise.org/documentation.html">Open Image Denoise documentation</a> (open-source production denoiser).</li>
</ul>
<h2>What this means for the browser</h2>
<p>We've shipped several of these techniques in WebGPU for our <a href="/blog/2026-02-25-open-world-browser-series-guide">open-world browser engine</a>. Cascaded shadow maps, GPU-driven instancing, triplanar PBR, screen-space fog, and clipmap-based virtualized terrain all run at 120 FPS in a tab. As of September 2026 WebGPU itself is on by default in Chrome and Edge since version 113, in Safari 26 across macOS, iOS, iPadOS, and visionOS, and in Firefox on Windows (141) and Apple Silicon Macs (145 and later), with Linux still in Nightly, per the <a href="https://github.com/gpuweb/gpuweb/wiki/Implementation-Status">gpuweb implementation status</a>. Three.js ships its WebGPU renderer as the default path in <a href="https://github.com/mrdoob/three.js/releases">r186</a>, which also added a native Gaussian splat renderer, and Babylon.js 9 (March 2026) added clustered lighting and compute-shader volumetrics on top of it, per the <a href="https://babylonjs.medium.com/welcome-to-babylon-js-9-0-c3edc9ee6428">Babylon.js 9.0 announcement</a>. The rest (hardware ray tracing, mesh shaders, ML upscaling) still isn't in the WebGPU spec, so on the web those stay compute-shader emulations for now. For deeper dives, see our guides on <a href="/guides/browser-3d-open-world-tech">browser open-world tech</a>, <a href="/guides/landscape-generation-browser">landscape generation</a>, <a href="/guides/webgpu-vs-webgl-games">WebGPU vs WebGL for games</a>, and the <a href="/guides/web-games-stack-2026">web games stack for 2026</a>. If you want to check what a given browser exposes, our <a href="/tools/webgl-webgpu-checker">WebGL/WebGPU checker</a> reports adapter features and limits.</p>
<h2>Common Questions</h2>
<h3>Which of these rendering techniques run in a browser with WebGPU in 2026?</h3>
<p>Most of the ones that don't need a dedicated hardware unit. PBR, deferred and visibility-buffer shading, cascaded shadow maps, screen-space AO and reflections, volumetric fog and clouds, TAA, GPU-driven culling via compute shaders, order-independent transparency, and cluster-based geometry streaming all work in WebGPU today, and we run several of them in our browser engine. What's missing is anything that depends on a hardware stage the spec doesn't expose: hardware ray tracing, mesh shaders, and vendor ML upscalers like DLSS and FSR. You can emulate ray tracing and Nanite-style cluster culling in compute, and people do, but expect a large gap to native. Our <a href="/guides/webgpu-vs-webgl-games">WebGPU vs WebGL guide</a> covers what that means for a game budget.</p>
<h3>What are contact shadows in games?</h3>
<p>Contact shadows are the short, sharp shadows where an object actually meets a surface: a foot on the ground, a cup on a table, the crease where a wall meets the floor. Regular shadow maps blur or miss them because of bias and resolution limits, so engines add a dedicated pass, usually a short screen-space ray march against the depth buffer, or in ray-traced renderers a few very short shadow rays. They're cheap and they're what stops objects from looking like they float. On the web, three.js has a <a href="https://threejs.org/examples/webgl_shadow_contact.html">contact shadow example</a> that fakes them by rendering the object's depth onto a ground plane, which is fine for product shots and tricky for full scenes.</p>
<h3>What is a virtual shadow map, and do browsers have them?</h3>
<p>A virtual shadow map treats one huge shadow map (Unreal's is 16k by 16k per light, per <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-shadow-maps-in-unreal-engine">Epic's docs</a>) as a set of pages, and only allocates and renders the pages the camera can actually see, at the resolution each one needs. You get near-pixel-perfect shadows close up without paying for the whole map. No browser engine ships VSMs as of September 2026. Three.js offers <a href="https://threejs.org/examples/webgpu_shadowmap_csm.html">cascaded shadow maps in its WebGPU renderer</a> and <a href="https://threejs.org/examples/webgl_shadowmap_pcss.html">PCSS soft shadows</a>, and Babylon.js has a <a href="https://doc.babylonjs.com/features/featuresDeepDive/lights/shadows_csm">CascadedShadowGenerator</a>. Building VSMs on WebGPU is possible in principle (it's compute plus indirect draws), but nobody has shipped a general one yet, so cascades remain the practical answer in a tab.</p>
<h3>What are the best hair rendering techniques for web games?</h3>
<p>Skip strand simulation and shade cards well. Real-time strand hair (TressFX, Unreal's groom system) needs compute-heavy simulation and order-independent transparency at scale, which is heavy even natively and has no off-the-shelf implementation in three.js or Babylon.js as of September 2026. The web-friendly stack is hair cards (a few dozen textured, alpha-tested strips) with anisotropic Kajiya-Kay or a simplified Marschner highlight written in three.js's TSL or Babylon's node materials, a two-pass alpha-test-then-blend render to keep edges soft, and a cheap ambient occlusion term baked into the card texture. If you need motion, drive a handful of bone chains rather than simulating strands. That gets you most of the look for a tiny fraction of the frame, which matters when your whole scene has a 16 ms budget on an integrated GPU.</p>
<h3>Is this list still accurate in 2026?</h3>
<p>Yes, and the changes since May 2026 are refinements rather than new categories. UE 5.8 (June 2026) made MegaLights production-ready, added Lumen Lite and cheaper distant virtual shadow maps, and is the last 5.x release before Unreal Engine 6. AMD's FSR Redstone folded frame generation, ray regeneration, and a neural radiance cache into one ML package, which confirms the direction of the last two sections. And WebGPU reached every major browser, so the &quot;what this means for the browser&quot; section above is now about which techniques to port rather than whether the platform is ready.</p>
<h2>Further reading across the whole stack</h2>
<p>If you want to read one book, <a href="https://www.realtimerendering.com/">Real-Time Rendering, 4th edition</a> is the standard reference covering most of the topics above. For ongoing research, the SIGGRAPH &quot;Advances in Real-Time Rendering in Games&quot; course archive (<a href="https://advances.realtimerendering.com/">advances.realtimerendering.com</a>) has free PDFs of the AAA-engine deep dives going back to 2006. For production tear-downs of how specific games render their frame, <a href="http://www.adriancourreges.com/blog/">Adrian Courrèges' GPU profiling articles</a> are required reading.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 18: A scatter brush that feels AI-placed]]></title>
            <link>https://app.cinevva.com/blog/2026-05-02-open-world-browser-part-18-ai-scattering</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-02-open-world-browser-part-18-ai-scattering</guid>
            <pubDate>Sat, 02 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 37 built a heuristic scatter brush that keeps trees off cliffs and pebbles at the waterline with no LLM, then chased it through instancing, distance LOD, and a stack of bugs back to a 4 ms paint stroke.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 18: A scatter brush that feels AI-placed</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-05-01-open-world-browser-part-17-animations-and-search">Part 17</a> gave the player a combat-grade animation set and a way to pull any CC0 model into the world. This part goes back to the creator's side. Spike 34's palette places one prop per click, which is fine for staging a hero object and useless for a forest. Spike 37 is the brush: drag across the terrain and trees fill in where trees belong.</p>
<h2>&quot;AI-placed&quot; without an AI</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/37-ai-scattering/" title="Spike 37 AI-Assisted Prop Scattering" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/37-ai-scattering/" target="_blank">Open Spike 37 in a new tab ↗</a> · <a href="/blog/spike-source?spike=37-ai-scattering">View source</a></p>
<p>The question this spike answers is whether a purely heuristic brush feels intelligent enough to skip the LLM. The test of &quot;AI-placed&quot; is concrete: trees stay off cliffs, rocks tilt into the slope, beach pebbles stop at the waterline, all on the first stroke. We got there with slope and altitude predicates, weighted draws, and per-family spacing, and not a single model call.</p>
<p>The brush works on a 257×257 CPU heightmap with hand-tuned features so every preset has somewhere to land: northern mountains for the mixed-slope picks, an eastern cliff strip for scree, a southern coastal plain for beach and meadow, a lake bowl in the south-west. The terrain bakes vertex colors from an <code>(altitude, slope)</code> biome classifier, so before you paint a single tree you can see where a preset will fire. Five presets ship as flat data, each a list of picks like <code>{ category, weight, slopeMin, slopeMax, altMin, altMax, minSpacing, alignToSlope }</code>. Cliff and Scree sets <code>slopeMin: 0.3</code> so rocks only land on actual slopes and <code>alignToSlope: true</code> so each boulder's up vector follows the surface normal.</p>
<p>For each stroke the scatter engine samples <code>densityPerM2 × area</code> candidate points inside the brush disc, reads height and slope per candidate, filters the preset's picks to those whose predicates pass, weighted-draws one, then runs a spacing check against an in-radius spatial hash. The whole thing is deterministic: a seedable Mulberry32 RNG owns every draw, so <code>(seed, brush events)</code> reproduces any session exactly. On the boot terrain a Mixed Forest stroke on flat meadow placed 139 of 158 candidates in 5 ms, while the same preset on a cliff placed only 106 of 226 and the HUD reported 81 of those rejected by slope. That rejection breakdown is the whole UX: you can see <em>why</em> the cliff only took a few trees instead of guessing.</p>
<p>The point of keeping presets as flat data is that the LLM version, when it lands, is a JSON swap rather than a rewrite. <code>paint({ preset })</code> doesn't care whether <code>preset.picks</code> came from a hand-tuned recipe or a worker that expanded &quot;deciduous forest with mossy boulders&quot; into weights. The engine never hardcodes a prop id either, so dropping in a different catalog needs no engine changes.</p>
<h2>From 300 draw calls to 49</h2>
<p>The first cut rendered each placement as a <code>clone(true)</code> of a multi-mesh group, which is fine at a few hundred props and a wall at the 2,500 cap, where draw calls climb into the thousands. We swapped to <code>InstancedMesh</code> before that hit, with one bucket per <code>(propId, partIndex)</code>. Each bucket grows by doubling: allocate a bigger <code>InstancedMesh</code>, copy the live matrices, swap the scene parent, dispose the old attribute. Erase is a swap-remove, so removing one instance is O(1) regardless of bucket size. Determinism, spacing, and the rejection HUD all carry through unchanged because the swap lives entirely below the placement record.</p>
<p>A diagnostic on the MegaKit pack settled a real architecture question. A multi-primitive glTF mesh (trunk plus leaves) can reach three.js as either one mesh with an array material and <code>geometry.groups</code>, or as separate sibling meshes with one material each. The loader takes the second path for this pack: every part is a single-material mesh with empty groups. That's the better shape for scatter, because separate buckets per primitive let the trunk bucket grow independently from the leaf bucket if their counts diverge. Same draw-call count either way, better memory shape with the split. The measured win held up: a forest stroke that was ~300 draw calls became 49, and a full multi-stroke session reached 3,221 instances at 75 FPS in 51 draw calls, a cap the clone path could never reach before frame budget collapsed.</p>
<h2>Distance LOD, and four bugs hiding in it</h2>
<p>Instancing cut draw calls but every instance still drew its full triangle count, even the trees 90 m out contributing two pixels of leaf detail. So we baked three LOD levels per prop part with meshoptimizer (full, 50%, 15%), extended the bucket key to <code>(propId, partIndex, lod)</code>, and added a <code>move()</code> that shuttles a placement between sibling buckets with no allocation. Distance bands are 0 to 30 m, 30 to 90 m, and beyond, with ±4 m of hysteresis around each boundary so a camera hovering near a band edge doesn't thrash a placement back and forth re-uploading its matrix every frame. Re-evaluation is capped at 4 Hz and gated on the camera actually having moved, so a still camera costs one squared-distance compare per frame.</p>
<p>That LOD path is where the instructive bugs lived. The first showed up as placements vanishing or duplicating as the camera orbited, worse as the scene filled up. The cause was a shared scratch matrix: <code>move()</code> read a placement's transform into the module-scoped <code>_tmpMat</code>, but the source bucket's swap-remove used that same <code>_tmpMat</code> for its own internal shuffle, clobbering the carried matrix before the destination wrote it. The bug only spared the case where the moved slot was already last in its bucket, roughly a <code>1/count</code> chance, which is exactly the &quot;rare flicker that gets worse as the scene grows&quot; the playtest saw. Fix was a dedicated <code>_carryMat</code> reserved for <code>move()</code> alone. Stress-tested at 1,274 cumulative moves, the cluster stayed pixel-identical.</p>
<p>The second bug was subtler: every LOD transition felt smooth <em>except</em> the first one. Trees crossing into LOD1 visibly shifted shading even though their silhouette barely changed, while bigger triangle drops later in the ladder looked fine. The simplifier with <code>LockBorder</code> never moves or invents vertices, so surviving vertices keep their normals exactly, but we were calling <code>computeVertexNormals()</code> after every simplification anyway. LOD0 returns the original artist-authored normals untouched, while LOD1 and up got three.js's generic face-average recompute. The 0-to-1 boundary was the only place in the ladder where the normal regime changed, so that's where the pop lived. Dropping the one defensive line fixed the shading and, as a bonus, cut per-prop bake time roughly in half because we stopped recomputing normals on four LODs per part.</p>
<p>Auditing what the simplifier produced surfaced a third win. Each LOD was an <code>original.clone()</code> with a fresh index, and <code>BufferGeometry.clone()</code> deep-copies every attribute, so five LODs held five independent copies of position, normal, UV, and color buffers whose values were bit-identical across all of them. We refactored to share attribute references and only own a private index buffer per LOD, dropping a typical tree part from 20 distinct attribute identities to 9 and uploading each vertex buffer to the GPU once. Two contracts come with aliased storage: don't mutate attribute data through any single LOD, and don't <code>dispose()</code> a single LOD geometry, since both would hit every sibling that shares the buffer.</p>
<p>The fourth bug had nothing to do with painting. Just waving the cursor over the terrain dropped the frame rate, with no button held. The <code>pointermove</code> handler raycast against the terrain mesh, a 131,072-triangle plane with no spatial structure, so three.js walked the entire index buffer per event at up to 1,000 events per second. We didn't need the mesh for that lookup at all, because the terrain is a parametric heightmap. An adaptive ray-march against <code>sampleHeight</code> (big strides high above the surface, a 0.4 m floor near it, then 12 bisections on the sign flip) costs roughly 8 to 30 samples per ray instead of 131,072 triangle tests, about three orders of magnitude cheaper, and hover holds the frame cap again.</p>
<h2>The cost just moves, so make sure it moves off the click</h2>
<p>After swapping the spike to <code>WebGPURenderer</code> on three r184 (the production target), a DevTools profile showed the very first paint blocking for 265 ms, 79% of it inside the meshoptimizer WASM. The bake was real work, around 180 simplify calls for a cold preset, but it was running inside the click handler because <code>preloadProps</code> only fetched and parsed scenes, never triggered the LOD bake. The fix was to make preset selection do the full bake in the background: <code>preloadProps</code> now calls the part-resolution path, caches the in-flight promise so a fast click joins it instead of forking a duplicate, and memoizes the per-geometry preprocessing the simplifier was redoing four times per part. First paint dropped from 209 ms to 4 ms in the HUD. The WASM time didn't vanish, it just left the user's critical path and runs while they're looking at the terrain deciding where to paint.</p>
<p>That's the recurring lesson of this spike. Almost none of these fixes changed what the brush <em>does</em>. They changed <em>when</em> the cost lands: off the click, off the hover, off the boundary the camera is hovering near. A scatter tool that feels instant isn't doing less work, it's doing the work where the user isn't waiting on it.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Heuristic suitability scatter.</strong> A brush samples candidate points in a disc, reads <code>(height, slope)</code> per point from a CPU heightmap, filters a preset's picks by slope and altitude predicates, weighted-draws one, and rejects it if it violates per-family minimum spacing tracked in a spatial hash. Slope-aligned picks rotate their up vector to the surface normal. This produces placement that reads as intentional (trees off cliffs, rocks tilted into slopes, pebbles stopping at the waterline) with no learned weights, and keeps the preset as flat data so an LLM-generated pick list is a drop-in swap.</p>
<p><strong>Deterministic placement under async loads.</strong> A seedable Mulberry32 RNG owns every draw, so <code>(seed, brush events)</code> reproduces a session exactly. RNG draws happen before any <code>await</code>, and spacing reservations are inserted into the spatial index before the glTF clone resolves, so concurrent candidates respect each other and async asset loading can't perturb the sequence.</p>
<p><strong>Bucketed InstancedMesh with O(1) edits.</strong> One <code>InstancedMesh</code> per <code>(propId, partIndex, lod)</code>, capacity doubled on demand by copying live matrices into a larger buffer. Erase and FIFO-evict are swap-remove with a back-reference array patching the moved instance's index, so a removal is O(1) regardless of bucket size. A diagnostic confirmed glTF parts arrive as single-material meshes, making one-bucket-per-primitive the active path and giving each primitive an independently growable bucket.</p>
<p><strong>Distance LOD with hysteresis and shared attribute buffers.</strong> Three meshopt-simplified levels per part, selected by distance bands with ±4 m hysteresis so a camera near a boundary doesn't thrash, re-evaluated at a capped rate and gated on real camera motion. Because <code>LockBorder</code> simplification never moves vertices, all LODs share one set of position/normal/UV/color buffers and differ only in their private index buffer, cutting distinct GPU vertex buffers by roughly half. Skipping a defensive <code>computeVertexNormals</code> keeps artist normals identical across LODs and removes the only shading discontinuity in the ladder. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">LOD and meshoptimizer</a>.</p>
<p><strong>Analytic heightmap raycast for high-frequency lookups.</strong> A <code>pointermove</code>-rate cursor lookup against a 131k-triangle plane mesh walks the whole index buffer per event. Replacing it with an adaptive ray-march against the analytic height function (large strides far from the surface, a small floor near it, bisection on the sign flip of $(\text{ray}_y - \text{terrain}_y)$) costs tens of samples instead of tens of thousands of triangle tests, about three orders of magnitude cheaper, and a pre-allocated output vector keeps the hot path allocation-free.</p>
<p><strong>Move work off the interaction's critical path.</strong> Expensive one-time work (meshopt LOD bakes, WGSL pipeline compiles) should run during idle gaps rather than inside the click handler. Preloading the active preset's full bake on preset selection, caching the in-flight promise so a fast click joins rather than forks it, and memoizing per-geometry preprocessing dropped first-paint latency from 209 ms to 4 ms without doing any less total work.</p>
<hr>
<p>Part 18 of 29.
Previous: <a href="/blog/2026-05-01-open-world-browser-part-17-animations-and-search">Part 17 - Animations that didn't need retargeting, and a live asset search</a>
Next: <a href="/blog/2026-05-04-open-world-browser-part-19-imposters">Part 19 - The imposter that has to survive a forest</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 17: Animations that didn't need retargeting, and a live asset search]]></title>
            <link>https://app.cinevva.com/blog/2026-05-01-open-world-browser-part-17-animations-and-search</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-05-01-open-world-browser-part-17-animations-and-search</guid>
            <pubDate>Fri, 01 May 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 35 retargeted 262 combat and locomotion clips onto the player rig, and built an offline parity test to keep them honest. Spike 36 wired a live Polyhaven model search with no build step.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 17: Animations that didn't need retargeting, and a live asset search</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p><a href="/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring">Part 16</a> gave us a world you can place objects in. This part gives the player something better to do in it: a combat-grade animation set, and a way to pull any of a thousand CC0 models into the world by typing a search.</p>
<h2>262 clips, one skeleton, three retargeting fixes</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/35-combat-animations/" title="Spike 35 Combat Animations" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/35-combat-animations/" target="_blank">Open Spike 35 in a new tab ↗</a> · <a href="/blog/spike-source?spike=35-combat-animations">View source</a></p>
<p>The player rig is a CC4-style <code>3MIKE</code> skeleton with 213 bones, including an 80-plus-bone facial rig and full finger joints. The animation sources don't match it. The first cut retargeted hand-picked Mixamo combat clips, but the source pool was thin and locomotion was split awkwardly between Mixamo and a few Kimodo BVH idles. The win came when we pivoted the source library to Quaternius's two Universal Animation Library packs, 262 clips total on one consistent UE5-style 65-bone mannequin: sword combos, bow archery, climbs, wallruns, dodges, hit reactions, emotes, and a much cleaner locomotion set.</p>
<p>That's a 65-bone source to a 213-bone target, with no shared bone names, T-pose orientations, or limb proportions. Every clip gets remapped in three steps: a bone-name map, a bind-pose alignment so both rigs share a reference orientation, and position-track scaling so the shorter source rig doesn't put the character knee-deep in the floor. Getting that right meant chasing a sequence of bugs that each taught something specific.</p>
<p>The character came out over-twisted, every shoulder and elbow rotated about 30° too far. The cause was a pose mismatch: the UAL source ships a true T-pose, CC4's bind is an A-pose, and the retargeter assumed both rigs sat in matching reference poses, so the A-to-T difference got added into every per-frame delta. The fix forces CC4's arm chain into a true T-pose to capture the bind, then retargets, so the deltas stay small.</p>
<p>Then the body stopped translating. Knockbacks recoiled the upper body but left the feet planted. UAL puts displacement on the <code>root</code> bone rather than the pelvis, so reading pelvis position gave near-zero motion. The fix sums <code>root.position</code> and <code>pelvis.position</code>, scales the horizontal part, and writes a single hip-position track. While doing this we found vertical offsets were off by about 12%, because we'd used the global limb-proportion ratio for the Y axis when pelvis height needs the hip-to-floor ratio. Two ratios, two axes: $\text{verticalRatio} = |{\text{targetHipY}}/{\text{sourceHipY}}|$ for Y, the proportion ratio for the horizontal. Overshoot gone. And a stream of <code>RL_BoneRoot.position</code> NaN warnings traced to mapping UAL's <code>root</code> (at $Y=0$) onto a target bone whose position track gets normalized by dividing by its bind Y. Divide by zero, NaN, dropped track. The fix was to drop the root mapping entirely, since its translation already lives in the hip track.</p>
<p>The smallest fix was the most satisfying to watch. The character gripped the sword with limp bind-pose fingers because the bone map had no finger entries, and the retargeter only writes tracks for mapped bones. Adding 30 finger bones (five fingers, three segments, two hands, dropping UAL's fourth tip helper that doesn't deform) made the hand close on the grip and open on the release.</p>
<h2>Proving 262 clips without watching 262 clips</h2>
<p>You can't eyeball-verify a 262-clip library, so we built an offline trajectory parity test: a headless Node script that loads each pack, samples the source skeleton at 60Hz, runs the retargeting pipeline, and compares per-bone world positions and rotations against the source after scaling. Pelvis Y drift came in at 0.003 m max. The hands showed a constant 2.5° offset that first read as &quot;fingers aren't tracking,&quot; but a constant offset is the bind delta between the flat UAL hand and CC4's slightly cupped bind, and it's invariant across the clip. Real animation errors show up as drift that varies frame to frame. Once that was clear, the test became a one-shot regression check: if a clip's drift stops holding that constant baseline, a recent change broke retargeting.</p>
<p>A side-by-side reference mannequin made the visual half of debugging decisive. Pressing backslash shows whichever source rig owns the current clip next to the player, so a &quot;twisted shoulder&quot; question becomes &quot;is the twist in the source, or did retargeting add it?&quot; Numerical tests catch regressions, the visual reference catches bind-pose mistakes the numbers don't surface, and together they retired the guessing game.</p>
<p>With the pipeline solid, switching the WASD/jump/swim baseline from Mixamo to UAL was a thin alias map: the FSM still speaks generic state names like <code>idle</code> and <code>walk</code>, resolved to UAL clip names at playback. Swimming needed per-clip rig offsets because the freestyle and tread-water poses anchor the pelvis at different anatomical heights, so we submerge the rig half a meter for active swimming and deeper for treading, blending between them at a smooth 5Hz.</p>
<h2>Type a word, get a model</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/36-polyhaven-models/" title="Spike 36 Polyhaven Models" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/36-polyhaven-models/" target="_blank">Open Spike 36 in a new tab ↗</a> · <a href="/blog/spike-source?spike=36-polyhaven-models">View source</a></p>
<p>Spike 34 ate a day hand-curating a CC0 pack. The long-term answer is a search box. Polyhaven publishes about 1,100 CC0 models behind a permissive JSON API and a deterministic CDN, and this spike wires the whole path (query, thumbnails, load, render) from a static page with no build step, in roughly 300 lines of vanilla JS plus three.js.</p>
<p>On boot it fetches the full catalog once, about 600 KB. Search is pure client-side scoring (name beats id beats category beats tag) with a 120 ms debounce, rendering the top 60 cards. Thumbnails lazy-load through an <code>IntersectionObserver</code> so typing doesn't fire 60 requests at once. The interesting piece is loading. Polyhaven's file endpoint exposes multi-file glTF, not GLB, with textures shared across resolutions and split into separate files, and it hands back an <code>include</code> map of relative path to absolute CDN URL. Rather than download and patch the JSON ourselves, we feed that map through <code>LoadingManager.setURLModifier</code>, which fires for every dependency the loader needs (the <code>.bin</code>, each texture) and resolves it through the CDN. One click, one apparent file. Both API and CDN set permissive CORS, verified with <code>curl</code> before any client code, so no proxy. PBR materials render correctly with <code>RoomEnvironment</code> and ACES tone mapping defaults with no per-asset fix-ups, and 1k textures keep a typical model at 2 to 5 MB instead of 20 to 40 MB at 4k.</p>
<p>A meshoptimizer WASM pass rounds it out with a non-destructive reducer: each mesh stashes a clone of its original geometry, and changing the ratio rebuilds an index buffer from that clone rather than simplifying cumulatively. Multi-material geometry simplifies per group and rebuilds <code>geometry.groups</code> so material slots don't collapse. An armchair goes from 5,626 triangles at full to 2,812 at half.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Skeleton retargeting with bind-pose alignment.</strong> Mapping animation from one skeleton to another with different bone names, proportions, and reference poses requires three corrections: a bone-name map, a bind-pose alignment so both rigs share a reference orientation (forcing the target's A-pose arm chain into the source's T-pose), and position-track scaling. A pose mismatch adds the A-to-T rotation into every per-frame delta, doubling joint rotation. Unmapped helper bones must be dropped, since a root bone at $Y=0$ triggers a silent divide-by-zero in position-track normalization.</p>
<p><strong>Two scale ratios for one rig.</strong> Horizontal displacement uses the global limb-proportion ratio (overall skeleton size), but vertical pelvis offset uses the hip-to-floor ratio $|{\text{targetHipY}}/{\text{sourceHipY}}|$, because the leg-to-torso proportion differs between rigs. Using one ratio for both axes leaves climbs overshooting and recoveries sinking below the floor. UAL displacement also lives on the <code>root</code> bone, not the pelvis, so both must be summed into a single hip-position track to preserve motion across knockback, climb, and locomotion clips.</p>
<p><strong>Offline trajectory parity testing.</strong> A headless script samples the source skeleton at 60Hz, runs the retargeting pipeline, and compares per-bone world transforms against the source. A constant per-frame offset is the harmless bind delta, while drift that varies frame to frame is a real error, so the test becomes a regression check that fires when a change drops or distorts a track. Per-pack GLB isolation (fresh load, freed before the next) avoids cache contention across the sweep.</p>
<p><strong>LoadingManager.setURLModifier for CDN glTF graphs.</strong> When a CDN ships glTF as a relative-URI graph with an accompanying include map (relative path to absolute URL), <code>setURLModifier</code> resolves every dependency the loader requests through the CDN without rewriting the JSON. This collapses a multi-file, multi-resolution distribution into a single-click load. Disposing each prior model's geometry, materials, and texture maps before the next load prevents hundreds of MB of GPU memory accumulating across a browsing session.</p>
<p><strong>Non-destructive mesh simplification.</strong> Storing a clone of each mesh's original geometry and rebuilding only the index buffer per simplification ratio keeps changes fast and avoids cumulative damage from repeated simplification. Running per <code>geometry.groups</code> slice and reconstructing the groups preserves multi-material assignments. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">LOD and meshoptimizer</a> for how this feeds distance-based LOD.</p>
<hr>
<p>Part 17 of 29.
Previous: <a href="/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring">Part 16 - Structure for a world that keeps growing</a>
Next: <a href="/blog/2026-05-02-open-world-browser-part-18-ai-scattering">Part 18 - A scatter brush that feels AI-placed</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anatomy of an AI game engine: what's actually inside the prompt]]></title>
            <link>https://app.cinevva.com/blog/2026-04-30-anatomy-of-an-ai-game-engine</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-30-anatomy-of-an-ai-game-engine</guid>
            <pubDate>Thu, 30 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Cinevva looks like a single text box. Behind it sits an orchestrator, 26 typed tools, eleven asset providers, a live game iframe the agent can play, and a storefront wired to gameplay reels. Here's the whole machine, piece by piece.]]></description>
            <content:encoded><![CDATA[<h1>Anatomy of an AI game engine: what's actually inside the prompt</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<p>The most common thing strangers say about Cinevva is that it's an AI wrapper. They land on the homepage, see a single input box that reads &quot;Describe your game&quot;, and decide they've understood the product. They've understood the front door. The product is everything you don't see when you type that sentence, plus, as of this week, an open world your players walk into to find your game in the first place.</p>
<p>Behind that input is a full game engine, an orchestrator with 26 typed tools, a fleet of generative models, an aggregated asset search across eleven providers, a live game iframe the agent can read and write to, and a storefront where the same agent ships your finished game as a swipeable gameplay reel. None of that is exotic. All of it is plumbing. The interesting work was deciding what to wire to what.</p>
<p>This post walks through the machine top to bottom. It's the explanation we give technical investors and the explanation we give developers thinking about contributing. They want the same answer.</p>
<h2>1. The prompt is the surface, not the system</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-prompt.png" alt="The Cinevva prompt input on the homepage. A single text field reads 'Make a neon space shooter with asteroids, power-ups, and a synth soundtrack.' Below it are three suggestion chips and the Cinevva logo." style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The first design decision was hiding everything until the user has skin in the game. The homepage has one job, which is to take a sentence and turn it into a project. We split the experience into a public side (the prompt, the showcases, the storefront feed) and a creator side (the IDE, the asset tools, the publish flow) so that the people who just want to play don't have to look at the cockpit.</p>
<p>That's why the placeholder rotates through things like &quot;Make a snake game with neon graphics&quot; and &quot;Top-down zombie shooter&quot;. They aren't tutorials. They're a permission slip. The user sees that &quot;weird arcade idea&quot; is a legal input.</p>
<p>The moment you submit, three things happen. The system creates a fresh game project with a stable ID. It seeds an empty file tree (<code>index.html</code>, <code>game.js</code>, <code>style.css</code>, <code>assets/</code>, <code>GDD.md</code>). And it routes your sentence into the orchestrator with a project context window that points at those empty files. From here on you're talking to an agent that has hands.</p>
<h2>2. Behind the input, a full browser IDE</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-ide.png" alt="The Cinevva creator IDE in dark mode. Three panels: a file tree on the left with GDD.md, index.html, game.js, style.css and an assets folder; a syntax-highlighted code editor in the middle showing a Three.js renderer setup; and a live game preview on the right showing a top-down neon space shooter with a SCORE and LIVES HUD." style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The creator workspace is a three-panel IDE that runs entirely in the browser. File tree on the left, code editor in the middle, live game iframe on the right, and a chat input running along the bottom. We picked this layout on purpose. People who already write code recognize it instantly. People who don't can ignore the middle panel and only ever talk to the chat.</p>
<p>The file tree isn't a metaphor. Every project really is a small static site of HTML, JS, CSS, generated images, GLB models, and audio files, served straight from R2 through a Cloudflare Worker. There's no build step. The reason matters. It means the agent can read and write the files you'd actually ship, and it means the same artifact runs in the iframe, on a phone wrapped in Capacitor, on Steam wrapped in Tauri, and inside Discord as an Embedded Activity. One filesystem, six distribution targets.</p>
<p>Every game we generate is required to expose two functions on <code>window</code>. <code>getGameState()</code> returns a plain object describing the running game (player position, score, lives, enemies, timers). <code>setGameState(patch)</code> applies a partial update back to the live game. That tiny API is the contract that lets the agent inspect and modify a running game without reloading it. We'll come back to why in section 6.</p>
<h2>3. The orchestrator, where the actual engine lives</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-orchestrator.png" alt="A diagram of the Cinevva orchestrator. A central node labeled 'Orchestrator (LLM)' is connected to eight tool nodes arranged around it: list_game_files, read_files, edit_files, write_files, generate_image (Flux), generate_skybox (Blockade), generate_music (ElevenLabs), and rig_model (Tripo). A dotted line connects the orchestrator to a 'Game iframe' node labeled 'screenshots + console.'" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The piece people miss when they call this &quot;an AI wrapper&quot; is that the AI doesn't write code so much as it conducts a small orchestra. The orchestrator is a tool-calling loop running against a frontier model, with a system prompt that's about a thousand lines long and a typed tool surface of 26 functions. The tool definitions are the engine. The model is the conductor.</p>
<p>The 26 tools fall into five families. Filesystem tools (<code>list_game_files</code>, <code>read_files</code>, <code>search_game_file</code>, <code>edit_files</code>, <code>write_files</code>, <code>delete_files</code>, <code>rename_files</code>) let the agent treat your game like any other codebase. Project tools (<code>create_new_game</code>, <code>list_games</code>, <code>open_game</code>, <code>ask_user</code>, <code>game_ready</code>) handle the lifecycle of a project and the handoff back to the human. Generative tools (<code>generate_image</code>, <code>generate_skybox</code>, <code>generate_music</code>, <code>generate_sfx</code>, <code>rig_model</code>, <code>apply_animation</code>, <code>list_animations</code>, <code>list_skybox_styles</code>) call out to specialized models that we'll cover next. Knowledge tools (<code>search_fonts</code>, <code>list_library_docs</code>, <code>search_library_docs</code>, <code>list_generations</code>) give the agent reliable, indexed sources of truth instead of hallucinated APIs. And runtime tools (<code>read_console_logs</code>, <code>execute_js</code>) let the agent see and touch the live game.</p>
<p>A typical first turn looks something like this. The user types &quot;Make a neon space shooter&quot;. The model emits a <code>write_files</code> call with <code>GDD.md</code> describing the design, then <code>write_files</code> again with <code>index.html</code>, <code>game.js</code>, and <code>style.css</code>. It calls <code>generate_music</code> with <code>prompt=&quot;synthwave space shooter, 120 BPM, driving bassline&quot;</code> which kicks off a job against ElevenLabs Music and returns an MP3 URL inside R2. It calls <code>generate_skybox</code> with a Blockade Labs model 3 style for the starfield. It calls <code>game_ready(title, message)</code> to flip the iframe to the new build, and finally <code>read_console_logs</code> to confirm the game booted without errors. If it sees a stack trace, it loops back to <code>edit_files</code> and fixes it before the user reports anything.</p>
<p>The interesting property of this design is that the system prompt and the tool schemas are the only thing that's product-specific. Swap the model and everything still works. We've migrated between three frontier models in the last year without changing the surface, because the surface is ours.</p>
<h2>4. The asset side: a model fan-out</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-assets.png" alt="A three-panel asset generation dashboard. The left panel is a music generator with a prompt 'synthwave space shooter, 120 BPM, driving bassline,' a 60-second duration slider, and a Generate button, plus a playing waveform card titled 'Asteroid Drift Theme.' The middle panel is a skybox generator with the prompt 'deep space, distant nebula, two moons' and a grid of four 360 degree environment thumbnails. The right panel shows a rotating 3D model preview of a low-poly purple spaceship with a 'Rig + Walk' button and a status indicator that reads 'Rigging... 1m 42s left.'" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The agent doesn't generate images, music, sound, or 3D. It calls specialists. The asset side of Cinevva is a fan-out across best-in-class models, glued together so that the output of one is a valid input to the next.</p>
<p>For images and sprites, <code>generate_image</code> calls Flux Pro 1.1 with a width and height that's always a multiple of 32 and an output format that flips to PNG when the prompt asks for transparency. For full songs the agent calls ElevenLabs Music with a stylistic prompt and a duration in seconds. For one-off effects, ElevenLabs SFX produces a clip from text like &quot;laser gun firing, sci-fi blaster&quot; in five to fifteen seconds. For 360 degree environments, <code>generate_skybox</code> calls Blockade Labs with one of about ninety styles, defaulting to model 3 Digital Painting. For 3D characters, <code>rig_model</code> sends a GLB to Tripo to skin and rig as a biped, quadruped, hexapod, octopod, serpentine, or aquatic creature, then <code>apply_animation</code> plays back any of fifteen presets (idle, walk, run, jump, climb, dive, slash, shoot, hurt, fall, turn, plus the non-biped marches).</p>
<p>Each one of these is a job, not a sync call. They take seconds to minutes. The orchestrator launches them, returns immediately with a <code>jobId</code>, and a separate channel pipes the result back into the conversation when the asset is ready. That changes the feel completely. The agent can keep building game logic while a 3D model finishes rigging in the background. The user never has to wait on a single critical path.</p>
<p>The artifacts all land in the same place. R2, behind <code>cdn.cinevva.com</code>, addressable as plain URLs. Which means the agent's next <code>write_files</code> call can simply embed <code>&lt;audio src=&quot;https://cdn.cinevva.com/audio/abc.mp3&quot;&gt;</code> and the game just works. No SDK, no asset bundler, no manifest.</p>
<h2>5. Asset search across eleven providers</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-asset-search.png" alt="The Cinevva asset search page in dark mode. A search bar at the top contains the query 'asteroid rock' and a row of provider filter pills shows All, PolyHaven, Sketchfab, Kenney, Quaternius, AmbientCG, OpenGameArt, Freesound, Smithsonian, Synty, and Jamendo, with Sketchfab highlighted. Below is a four-column grid of asteroid model thumbnails, each card showing its provider badge, a CC0 or CC-BY license tag, and a 'Use in game' button. A small caption in the upper right corner shows a chat bubble that reads 'ChatGPT: one of the best free asset tools for game devs.'" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Generation is great when you need something specific. Search is faster when something already exists. The <a href="/assets">Asset Library</a> is a federated search across eleven free and licensed providers, returned in a single ranked feed.</p>
<p>The provider registry sits in the worker and runs each query in parallel against PolyHaven, Sketchfab, Freesound, Kenney, AmbientCG, Quaternius, OpenGameArt, the Smithsonian 3D collection, TurboSquid, Synty, and Jamendo. Each provider implements a common interface (<code>search</code>, <code>getMetadata</code>, <code>isBrowsable</code>, <code>getSupportedTypes</code>), so adding a new one is a single TypeScript file. The aggregation layer handles cursor-based pagination across providers that paginate differently, deduplicates licenses, normalizes asset types into a common taxonomy (model, texture, audio, hdri, sprite), and tags each asset with its license so the agent never picks something it can't redistribute.</p>
<p>When ChatGPT recommended this tool last quarter as one of the best free asset finders for game devs, we went and read the recommendation. It was right about the part that matters. The point isn't that we have a search bar over a single library. The point is that an indie developer searching for &quot;stone wall texture&quot; gets results from PolyHaven and AmbientCG side by side with Kenney's stylized version and a photogrammetry option from Smithsonian, with one query, with consistent license metadata. The agent can hit the same endpoint and pick assets the same way a human does.</p>
<p>This is the part of the engine that often gets undersold. Most game-AI demos generate everything from scratch and end up with a uniform, glossy, slightly uncanny look. The interesting games on Cinevva mix generated assets with real CC0 photogrammetry from Smithsonian and a hand-made low-poly tree from Quaternius. The orchestrator can do that in one turn.</p>
<h2>6. The agent plays the game</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-debug.png" alt="A live debugging view. On the left, a running neon space shooter showing the player ship dodging asteroids with a SCORE of 4820 and 2 lives remaining. On the right, two stacked panels: an execute_js panel showing the call JSON.stringify(getGameState()) and a returned JSON object with player position, velocity, health, score, lives, and asteroid count, and a read_console_logs panel showing the most recent log lines including spawn asteroid, powerup picked, a texture load warning, and an FPS reading of 58." style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>This is the part that surprises most engineers when we show it. The agent doesn't just write code into files. It runs the game in a sandboxed iframe, reads its console, takes screenshots layered for UI versus 3D scene, and executes JavaScript inside the live runtime to inspect or change state.</p>
<p><code>read_console_logs</code> returns the last fifty lines of <code>console.log</code>, <code>console.warn</code>, <code>console.error</code>, and uncaught exceptions from the iframe. After every <code>game_ready</code> call, the agent is required by the system prompt to call <code>read_console_logs</code> and fix any errors before handing back to the user. That single rule eliminates most of the &quot;the AI said it was done but the screen is black&quot; failures that other tools have.</p>
<p><code>execute_js</code> is the more powerful one. It runs arbitrary JavaScript inside the game's global scope. Because every game is required to implement <code>getGameState</code> and <code>setGameState</code>, the agent can run <code>JSON.stringify(getGameState())</code> to read the entire state of the running game, then <code>setGameState({player: {x: 500, y: 100}})</code> to teleport the player, <code>setGameState({lives: 99})</code> to grant invincibility, or <code>setGameState({level: 3})</code> to skip ahead. It can also poke at lower levels, like <code>scene.children.map(c =&gt; c.type)</code> to inspect the Three.js scene graph or <code>document.querySelectorAll('canvas').length</code> to confirm the renderer mounted.</p>
<p>You can see why this matters. When a user says &quot;the player gets stuck in the wall on level two&quot;, the agent doesn't have to guess. It opens level two, runs <code>getGameState()</code>, examines collision data, runs an <code>execute_js</code> patch to test a fix, and only then writes the fix to disk. It debugs the way you debug. We treat the iframe as a peer, not a target.</p>
<h2>7. Library docs, the boring source of truth</h2>
<p>We index the official documentation for the libraries games actually use (Three.js, Tone.js, Cannon, and growing) into a structured, searchable JSON store. The agent reaches for <code>search_library_docs(&quot;threejs&quot;, &quot;Mesh&quot;)</code> before it reaches for the open web. It's faster, it's versioned, and it never hallucinates a method that was renamed two minor releases ago.</p>
<p>This isn't glamorous. It's the difference between an AI that produces working code and an AI that produces convincing-looking code that crashes at line forty. Most of the visible quality of Cinevva-built games comes from this one decision.</p>
<h2>8. From playable to discoverable: reels and the storefront</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-reels.png" alt="A short-form gameplay reels storefront. In the center, a phone-shaped card plays a portrait video of a neon space shooter mid-combat with social UI icons stacked on the right (a heart with 14k, a chat bubble with 3.2k, a share arrow with 1.8k, and a 'Play Now' button). The reel label at the bottom reads 'Asteroid Drift • by @indiedev • 3.1M views.' To the left, a small chat snippet titled 'From the creator's chat' shows the assistant message 'Game is live. Reel auto-published to your storefront.' To the right, a Storefront panel lists three trending games: Asteroid Drift, Roadhawk Runner, and Birb Clicker, each with a view count and a 'Trending' badge." style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>A game that nobody plays is a private hobby. The hardest unsolved problem in indie development isn't building games anymore. It's distribution. So the engine doesn't stop at &quot;playable&quot;. It stops at &quot;in front of players&quot;.</p>
<p>Every project on Cinevva carries a stable share URL like <code>play.cinevva.com/{game-id}</code> that opens the latest build of the game in a full-page iframe with a tiny overlay for likes and shares. When the agent calls <code>game_ready</code>, it doesn't only flip the in-IDE preview. It also offers to publish a 15-second gameplay reel to the <a href="/play">Cinevva storefront</a>. The reel is an actual recording of the game being played, captured directly from the iframe (we ship a small recorder script that the agent injects into the game runtime), so what the viewer scrolls past is real gameplay, not a marketing edit.</p>
<p>That changes the loop a developer lives in. The old loop was code, build, package, upload, write a Steam page, fight an algorithm, watch a wishlist counter. The new loop is type a sentence, watch the agent build, hit publish, watch your game appear in the same swipe feed alongside everything else. Discovery happens in the same product where creation happens, on the same URL, with the same login.</p>
<p>For dev community readers, this is the part to inspect. Distribution has always been the moat that game engines didn't ship with. Unity ships an editor, you ship the game on Steam. Unreal ships an editor, you ship on the Epic Store. Cinevva ships both halves. The engine and the storefront talk to each other through the same orchestrator that built the game.</p>
<h2>9. Top Performers: the discovery flywheel</h2>
<img src="/img/blog/engine-anatomy/cinevva-engine-charts.png" alt="The Cinevva Top Performers chart. Three tabs at the top read Trending, Recent, and Top, with Top selected. Below, a podium row of three featured games: number one The Breaker Belt with 42.1k plays, number two Roadhawk Runner with 27.7k plays, and number three Asteroid Drift with 37.1k plays. Below the podium, a denser grid of six smaller game cards including Pixel Platformer, Zombie Shooter, Fruit Ninja Clone, Tower Defense, Card Battler, and Zombie Builder, each with thumbnails, creator handles, and play counts." style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The reels feed is one half of the flywheel. The <a href="/charts">Top Performers chart</a> is the other. It ranks games by trending, recent, and all-time top, weighted by completion rate (did the player finish a session) rather than raw clicks. Completion is harder to game than installs. A game that holds attention for sixty seconds beats a game that gets opened and closed.</p>
<p>Every signal feeds back into the orchestrator's next turn. When the agent says &quot;let's add a power-up&quot;, it's not pulling from a fixed pattern library. It's pulling from a model that has watched what mechanics actually retain players on Cinevva this month. The flywheel isn't a chart at the bottom of the page. It's the training signal for the whole engine.</p>
<p>For investors, this is the data moat. We don't just have generated games. We have generated games with real session-level engagement metrics, attached to the prompts that produced them, attached to the asset choices the agent made, attached to the players who liked them. Every loop tightens the next one.</p>
<h2>10. The engine becomes a game</h2>
<p>Here's the part I've been hinting at on social for months. Everything in sections 1 through 9 describes a system that builds games. The harder thing to describe, until you see it, is what happens when the system itself becomes a place.</p>
<p>Game creation is hard work, even with everything we've shipped. If you've never made a game before, you're suddenly responsible for the plot, the characters, the world, the mechanics, who does what and when, how the light behaves, how the special effects layer on, the music, the sound effects, the camera moves. It's a lot. And on top of all that you want the result to feel like yours, not like a template someone else's tool spat out. The prompt and the orchestrator do most of the mechanical work for you. What they can't do alone is give your finished thing a stage to stand on with other people watching.</p>
<p>So we built the stage. For most of this year <a href="/about">Oleg</a> and the engine team have been publishing the work in a <a href="/blog/2026-02-25-open-world-browser-series-guide">14-part series</a> about putting an open world in the browser. Sculpted terrain you can carve in real time. Biomes that paint themselves rock or grass based on slope and altitude. 80,000 grass blades that bend in the wind on top of compute-generated terrain. A character that walks, sprints, jumps, and glides across heightmap and volumetric terrain in the same step. None of it was a tech demo for its own sake. It was the substrate for this.</p>
<p>Today the open world is live in early form. You put on an avatar and walk in. Your published games show up as visitable spaces around you, the way the <a href="/play">storefront reels</a> and the <a href="/charts">Top Performers chart</a> show them now, except you arrive on foot instead of by swipe. You can drop into a stranger's game from the world without leaving the world. You can stand next to the person who made the thing you just played and tell them what you'd add next. You can sculpt a piece of terrain with someone you just met and turn it into the seed of a new project. Discovery stops being a feed. It becomes a walk.</p>
<p>Our engine has always been a game engine in the technical sense. Today it becomes one in the literal sense too. The thing that builds your game is now a game itself, and the same orchestrator from section 3, the same asset rails from section 4, the same <code>getGameState</code> contract from section 6, the same reels from section 8, and the same chart from section 9 all compose into the one place your players walk around in. The boundary between making and playing was always artificial. Now it's gone.</p>
<h2>What we think we got right</h2>
<p>The first thing we got right was treating the prompt as a UI affordance instead of a product. The product is the orchestrator, the tool surface, the asset rails, and the storefront. The prompt is the cheapest possible way to get a user into the system.</p>
<p>The second was insisting on a flat, browser-native filesystem with no build step. It's why a Cinevva game ships to mobile, desktop, Steam, and Discord from one source of truth. It's why the agent can read what it wrote.</p>
<p>The third was the contract that every generated game implements <code>getGameState</code> and <code>setGameState</code>. That single line in the system prompt is what makes the agent feel like a collaborator instead of a code generator. The agent can play, and a system that can play can debug.</p>
<p>The fourth was wiring the storefront into the same loop as the engine. We're not going to win on raw model quality. There's no defensible advantage in being two months ahead of an open-weights generator. We win when the same agent that builds your game also publishes it, measures it, and learns from how strangers played it.</p>
<p>If you want to see the whole machine in motion, the homepage prompt is still the front door. Type a sentence. Watch what happens behind it. Then come back here and tell us which piece of the engine to write up next.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 16: Structure for a world that keeps growing]]></title>
            <link>https://app.cinevva.com/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring</guid>
            <pubDate>Tue, 28 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 33 broke a 6,285-line monolith into modules and exposed three hidden init-order bugs. Spike 34 used that structure to add 100+ placeable props without bloating anything.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 16: Structure for a world that keeps growing</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Every spike since <a href="/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting">part 13</a> had followed the same recipe: copy the previous monolith, add one feature. By the end of <a href="/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water">spike 32</a> that monolith was 6,285 lines of <code>index.html</code> in a single <code>&lt;script type=&quot;module&quot;&gt;</code>. Code search was noisy, finding where to add a feature took longer than writing it, and any architectural change touched a file too big to diff in your head. Before adding another feature we paid down the structure.</p>
<h2>Breaking the monolith with zero behavior change</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/33-code-structure/" title="Spike 33 Code Structure Refactor" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/33-code-structure/" target="_blank">Open Spike 33 in a new tab ↗</a> · <a href="/blog/spike-source?spike=33-code-structure">View source</a></p>
<p>The constraint was strict: every split had to be a pure refactor rather than a redesign. The monolith became 19 <code>.mjs</code> files plus a 151-line host shell. Top-level modules for scene, water, grass, character, physics, multiplayer, and UI, a <code>wgsl.mjs</code> that holds every WGSL source string as the single source of GPU truth, and a <code>terrain/</code> subtree for heightmap, SDF, chunks, GPU buffer wrappers, brush, LOD, and persistence. Total code came out at 6,555 lines, basically the monolith plus import boilerplate. No net change in volume, a large change in navigability.</p>
<p>Then the page loaded to a black screen. Two error messages, two unrelated root causes. The first was a WebGPU complaint about a zero-byte buffer binding. In the monolith, the SDF brush buffer was lazily allocated when the first marching-cubes chunk appeared, and the bind-group factory happened to run later, after the buffer existed. Splitting <code>terrain/gpu.mjs</code> from <code>terrain/brush.mjs</code> reordered module evaluation so the factory now ran first and tried to bind a <code>null</code> placeholder. The fix was to defer bind-group creation to the first dispatch with a <code>getOrCreateBindGroup(chunk)</code> helper. The &quot;create everything up front&quot; pattern was an artifact of the monolith's single init path.</p>
<p>The second message was a scary-looking FBX skeleton warning that turned out to be a red herring. It had printed since spike 25 and was harmless. The character was missing only because the first bug cascaded: every compute dispatch threw, the heightmap never got written, height samples returned 0, and the character spawned at the origin and fell through the world. Fix the buffer, the character animates fine, warning and all.</p>
<p>That's the lesson of the refactor. The monolith hid every &quot;X must exist before Y is built&quot; relationship inside top-to-bottom script order. Modularizing shuffled that order and surfaced three more latent ordering bugs: grass scattering before the heightmap upload, the water plane added before the environment map finished decoding, and persistence load completing after the first frame. All three were one-line fixes, and none would have been caught without the split.</p>
<h2>A hundred props without growing anything</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/34-world-authoring/" title="Spike 34 World Authoring" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/34-world-authoring/" target="_blank">Open Spike 34 in a new tab ↗</a> · <a href="/blog/spike-source?spike=34-world-authoring">View source</a></p>
<p>Spike 34 was the test of whether the structure paid off. The goal was a first-person palette to place trees, rocks, bushes, mushrooms, and paths from a CC0 model pack, with terrain-aware alignment, persistence, multiplayer sync, and physics colliders, all without leaving the controls. Every line of new code landed in five new files under <code>src/props/</code>, and no existing module grew by more than ten hook-up lines.</p>
<p>The asset arc took a detour that I'll record, because it's the kind of thing that eats a day. We started on Quaternius's Ultimate Nature pack, an FBX library with no embedded textures. The FBX materials shipped as <code>MeshPhong</code> with no map, so we wired a manual material-name-to-PNG table, converted Phong to Standard, and set color spaces by hand. About 30% of materials had no matching PNG and several names were ambiguous between similar trees. A second FBX pack had the same gap. The fix wasn't more mapping tables, it was a better-authored pack: Quaternius's Stylized Nature MegaKit ships 116 complete glTFs with embedded PBR materials and baked normals. Swapping <code>FBXLoader</code> for <code>GLTFLoader</code> deleted the cm-to-meters scaling, the texture table, and the Phong conversion, and shrank <code>library.mjs</code> by about 80 lines. The takeaway: glTF with PBR is the right pipeline for CC0 packs that ship it, and FBX with manual texture mapping was twice the code for half the quality.</p>
<p>A few sharp edges came with the glTF path. The palette renders 116 thumbnails, and WebGPU's <code>canvas.toDataURL()</code> returns blank for a <code>GPUCanvasContext</code> surface, so thumbnails render into a <code>RenderTarget</code>, read back with <code>readRenderTargetPixelsAsync</code>, and blit into a 2D canvas, minding WebGPU's 256-byte row alignment. Ghost previews clone each material to tint them green, which broke on meshes whose <code>material</code> is an array, fixed with an <code>Array.isArray</code> branch. And the 16-bit normal maps that shipped at ~200 MB got a one-off <code>mogrify -depth 8</code> down to ~32 MB, visually identical since browsers downsample at upload anyway.</p>
<h2>When the rendered geometry only exists on the GPU</h2>
<p>The most instructive bug was the ghost preview snapping in 1 to 2 meter steps as the cursor moved. The terrain meshes store vertex positions in a <code>StorageBufferAttribute</code> because the compute pipeline writes them directly on the GPU, so three.js's CPU <code>Raycaster</code> can't see them and returns nothing. The fallback was a coarse 1.5 m ray-march against the analytic heightmap, and that fixed stride was the grid the user saw. We replaced it with an adaptive march: stride 2.5 m while high above the surface, shrink to 0.4 m within 5 m of it, then bisect 14 times when the sign of $(\text{ray}_y - \text{terrain}_y)$ flips. That lands sub-millimeter precision at roughly 30 wide steps plus 14 bisections per cast. When the rendered geometry lives only on the GPU, don't fight the raycaster, march against the analytic source.</p>
<h2>Colliders that stay correct through edits</h2>
<p>We chose primitive proxies over convex hulls or mesh colliders. Quaternius props are blobby and low-poly with no meaningful concavities, so hulls would be roughly 50 times the code and 10 times the runtime cost for the same gameplay. Each prop reduces to one shape derived from its bounding box: trees and cacti to a vertical capsule, rocks to a sphere, logs to a horizontal capsule along the long axis, and decorative bushes and flowers to nothing. Rocks and logs are walkable (vertical-only push so you can stand on them), trees and cacti are blocking (full 3D push so you can't climb a trunk). An 8 m spatial hash keeps the per-frame test to the player's 3×3 neighborhood, typically zero to six props.</p>
<p>Two design decisions kept the system coherent. Terrain alignment is a manifest flag, not a category enum hard-coded in code, so the ghost preview and the committed placement read the same <code>placement.alignToTerrain</code> value and can't disagree. And placed props react to terrain edits through one helper: after a brush stroke (local or replayed from a peer), <code>refreshPlacementsInRadius</code> resamples the ground under every prop in the affected disc, re-applies alignment, and re-derives the collider endpoints. Sculpt a hill under a tree and the tree rides up with it. Persistence and multiplayer reuse spike 31's pattern exactly, storing a flat list of <code>{uid, propId, x, y, z, rotY, scale}</code> and mirroring place, remove, and nudge events over BroadcastChannel.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>ES module decomposition under WebGPU.</strong> Splitting a monolithic <code>&lt;script type=&quot;module&quot;&gt;</code> into bare-path <code>.mjs</code> imports needs no bundler when modules are served as static assets, and three.js TSL plays fine across module boundaries. The hidden cost is initialization order: a monolith encodes &quot;build X before Y&quot; in top-to-bottom script order, while modules evaluate in import order, which can run a GPU bind-group factory before its buffer exists. The fix pattern is lazy initialization (<code>getOrCreate...</code> on first use) and awaiting the right promise rather than relying on declaration order.</p>
<p><strong>glTF with embedded PBR vs FBX with manual mapping.</strong> glTF ships in meters, references its own textures, and gives <code>MeshStandardMaterial</code> directly, so a CC0 pack authored as glTF drops straight into a PBR pipeline. FBX packs without texture-binding metadata require a hand-maintained material-name-to-PNG table that drifts on every pack update, plus a Phong-to-Standard conversion and manual color-space tagging. A foliage safety net promotes <code>transparent</code> materials with no <code>alphaTest</code> to <code>alphaTest: 0.5</code> cutout cards so they sort correctly behind opaque geometry.</p>
<p><strong>WebGPU offscreen thumbnails.</strong> <code>canvas.toDataURL()</code> returns blank for a <code>GPUCanvasContext</code>-backed canvas because there's no path from a presentation surface back to a 2D context. Rendering into a <code>RenderTarget</code>, reading pixels with <code>readRenderTargetPixelsAsync</code>, and blitting into a 2D canvas works, as long as the blit steps at WebGPU's 256-byte-aligned read-back stride. Results cache in <code>localStorage</code> under a version-bumped key so pack changes invalidate stale renders.</p>
<p><strong>Adaptive ray-march against an analytic heightmap.</strong> When terrain vertices live in a GPU <code>StorageBufferAttribute</code>, the CPU raycaster can't see them. Marching the analytic height function with a large stride far from the surface, a small stride near it, and a binary-search refinement on the sign flip of $(\text{ray}_y - \text{terrain}_y)$ gives sub-millimeter cursor precision in a bounded number of samples. The same primitive powers the brush cursor and the prop ghost.</p>
<p><strong>Primitive capsule colliders with a spatial hash.</strong> Each prop is reduced to a category-derived capsule or sphere from its bounding box, recorded as <code>{kind, walkable, radius, p1, p2}</code> and registered in every 8 m hash bucket it overlaps. Per frame the player tests only the props in their 3×3 bucket neighborhood, one capsule-vs-capsule resolution each. Walkable proxies (rocks, logs) get a vertical-only push, blocking proxies (trees) get the full 3D push. See <a href="/guides/landscape-generation-browser#physics-on-sdf-terrain">SDF terrain collisions</a> for the capsule math this builds on.</p>
<hr>
<p>Part 16 of 29.
Previous: <a href="/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water">Part 15 - Replace the baseline, then sync it</a>
Next: <a href="/blog/2026-05-01-open-world-browser-part-17-animations-and-search">Part 17 - Animations that didn't need retargeting, and a live asset search</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four bets I made about gaming in 2022. How they're aging.]]></title>
            <link>https://app.cinevva.com/blog/2026-04-24-2022-predictions-aging-well</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-24-2022-predictions-aging-well</guid>
            <pubDate>Fri, 24 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[In a 2022 interview I called WebGL game engines, GPT-3 for dialogue, real-time creative collab, and the indie takeover. Four years later, here's where each one landed.]]></description>
            <content:encoded><![CDATA[<h1>Four bets I made about gaming in 2022. How they're aging.</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<img src="/img/blog/tech-done-different.jpg" alt="Tech Done Different podcast interview, May 2022" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>In May 2022, I sat down for an interview with Ted Harrington's <em>Tech Done Different</em> podcast. The original write-up is <a href="https://medium.com/@vio-202020/interview-with-tech-done-different-3b9bf74d99c2">still live on Medium</a>. I had been running Cinevva for about two years. We had five people, $200K raised, a Mozilla Builders award on the wall, and a lot of opinions about where game development was heading.</p>
<p>Most of those opinions were not fashionable in 2022. Web3 was loud, AAA studios owned the conversation, GPT-3 was a research toy, and WebGL was something hobbyists used to make jam games. Saying &quot;any creative will be a game developer&quot; out loud got polite nods and zero checks.</p>
<p>I went back and read that interview last week. Some of what I said reads like wishful thinking. Some of it reads like I had a time machine. Here are the four bets that aged the best, with what 2026 actually looks like next to each one.</p>
<h2>Bet 1: Game engines belong in the browser</h2>
<p>What I said in 2022:</p>
<blockquote>
<p>WebGL technology can be used across multiple platforms, including mobile devices, unlike other APIs that may be restricted to only PCs. So whether you're in the comfort of your home or on the move, you can still create and publish. WebGL games use only a fraction of the CPU and GPU power that a traditional PC game would require.</p>
</blockquote>
<p>In 2022 this was a contrarian bet. The big engines all assumed downloads, installs, and patch cycles. Browser games meant Flash nostalgia and Friv.</p>
<p>In 2026, our <a href="/blog/2026-02-25-open-world-browser-series-guide">open-world engine runs at 120 FPS in a browser tab</a>. Terrain, trees, physics, multiplayer sync, all in one URL. No download, no app store, no install.</p>
<img src="/img/blog/open-world-browser-120fps.png" alt="The Cinevva open-world running at 120 FPS in a browser tab, with terrain, trees, physics, and a player capsule rendered in a single tab" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The browser caught up because three things landed at once. WebGPU shipped in every major browser. SharedArrayBuffer and cross-origin isolation became reliable. WebAssembly got fast enough to host real physics engines compiled from Rust. Our team <a href="/blog/2026-02-25-open-world-browser-series-guide">published a 12-part field journal</a> on what each of those steps actually cost. The summary is that the browser is now a real game runtime, not a place where you put the demo of the real game.</p>
<p>The bet I missed inside the bet: I underestimated how much of the work would be on the engineering culture side. Browser game engines are not held back by browsers anymore. They're held back by the assumption that a real game has a launcher.</p>
<h2>Bet 2: AI is part of the pipeline, not a side feature</h2>
<p>What I said in 2022:</p>
<blockquote>
<p>For our platform to work flawlessly we use open source game tools, but also develop our own technology using Natural Language Processing, Computer Vision, and Open AI solutions, such as GPT3 for dialogues and DALL:E for text to image generation.</p>
</blockquote>
<p>In May 2022, GPT-3 was a paid API most people had never used. DALL·E was barely a year old and wait-listed. Saying we were going to use them as production game-dev tools was, at best, ambitious cosplay.</p>
<p>In 2026, every serious creative pipeline has language models and image generation in it, including ours. Inside Cinevva today: ElevenLabs Music for soundtracks, ElevenLabs SFX for effects, Hunyuan3D and SAM3D for assets, Flux for visuals, Mubert for adaptive audio, AceStep for instrumentation. Prompts go in, usable assets come out, and the whole thing happens inside the editor.</p>
<img src="/img/blog/prompting-3d-games.png" alt="Prompt-driven 3D asset generation inside the Cinevva editor" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The receipts on this one are in the GDC 2026 <em>State of the Game Industry</em> report. <a href="/signals/2026-03-28-the-52-52-split">52% of game companies say generative AI is being used in production</a>. The same 52% of developers say AI use is having a negative impact on the industry. Both numbers are true. The point is that the underlying technology became table stakes faster than anyone wanted to admit.</p>
<p>What I got wrong: I thought the resistance would come from engineers worried about quality. Most of it came from artists worried about jobs. That conversation is <a href="/signals/2026-03-16-when-ai-overrides-the-artist">much messier than I expected</a>, and the people who treat it as a clean win are not paying attention.</p>
<h2>Bet 3: Game development needs Google-Docs-style collaboration</h2>
<p>What I said in 2022:</p>
<blockquote>
<p>Source control and work with app versions are often linked with remote collaboration. Today to do that you have to know where to go, what version of the application you need to download, be in sync with everyone, God forbid one member on the team is on the wrong version of the app, it becomes a problem. We aim for a Google doc near real-time kind of experience: simple, effortless but fun.</p>
</blockquote>
<p>Real-time collaboration in code tools was a fringe idea in 2022. Replit had it. VS Code Live Share existed. Most professional engines required Perforce, a VPN, and a senior engineer babysitting your branch.</p>
<p>In 2026, real-time collab is the default for any creative tool that wants to be taken seriously. Figma made it normal for design. Cursor and Bolt made it normal for code. Lovable made it normal for app prototyping. Game engines were the laggard, not the leader.</p>
<img src="/img/blog/open-world-chunk-streaming.png" alt="Streaming chunks of an open-world game between players in real time" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>Inside our own engine we now have multiplayer sync working as a <a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">first-class spike</a>, with chunk streaming, presence, and shared state in the browser. The experience is closer to &quot;open the link, jump in&quot; than &quot;set up Perforce, ask Slack for the right version, install the launcher&quot;.</p>
<p>The piece I underestimated: the hardest part of real-time collab in games is not networking. It's conflict resolution on creative intent. Two people editing the same level at the same time is a UX problem before it's a sync problem, and most tools haven't solved it yet.</p>
<h2>Bet 4: The future is indie</h2>
<p>What I said in 2022:</p>
<blockquote>
<p>Creatives who were not able to build game content will be able to do so. We will discover abundant new ways of how people perceive and express creativity. This time the process will not be controlled by corporations or big AAA studios only. The future is indie.</p>
</blockquote>
<p>This was the most romantic line in the interview, and the easiest to dismiss in 2022. AAA budgets had never been higher. Indie projects had never had a harder time getting visibility. The math looked like it was going the other way.</p>
<p>In 2026, the math flipped. We made <a href="/blog/2026-02-18-a-breaker-belt">A Breaker Belt</a> in three days, two people, on web, mobile, and PC from one codebase. That used to take a small team a quarter. <a href="/signals/2026-03-23-solo-devs-shipping-not-vibing">Solo developers are shipping, not just vibing</a>, and Steam Next Fest 2026 had record entries from teams of one.</p>
<img src="/img/social/industry-solo-dev-shipping.png" alt="Solo developers shipping production-quality games using AI tooling and browser engines" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The cost of finding out whether a weird idea works has collapsed. That's the real shift, and everything else, the AI in the pipeline, the browser as runtime, the real-time collab, is in service of it. A solo developer with the right tooling now has the production capacity that a 20-person studio had in 2018.</p>
<p>What I did not see coming clearly enough in 2022: the bottleneck moves from production to discovery. When everyone can ship, getting found becomes the hard problem. That's the next set of bets, and we're in the middle of making them.</p>
<h2>What I got wrong on purpose</h2>
<p>A few of the 2022 bets are still pending or need revision.</p>
<p>The Web3 angle was louder in that interview than it should have been. The encryption and zero-knowledge proof part holds up as a content-rights primitive. The token-and-marketplace framing aged poorly, and a lot of the energy I gave it in 2022 would have been better spent on AI tooling, where the real upside was.</p>
<p>I also underestimated how much of &quot;anyone can make a game&quot; is a discovery and distribution problem, not a tooling problem. Building is now easy. Getting found and getting paid are still hard, and they are where most of our work goes today.</p>
<p>That's the bet we're making right now. We just shipped a TikTok-style reels feed at <a href="/play">cinevva.com/play</a>. Vertical-swipe clips of actual gameplay, fifteen seconds each, no trailers and no marketing footage. If something catches your eye, one tap and you're playing it in your browser. No download, no install, no tutorial standing between you and the game.</p>
<p>The reason this matters for indie developers is brutal math. Steam Next Fest 2026 had a record number of entries, which sounds great until you do the per-game attention budget. Most demos got under a thousand impressions. The store-page funnel was already broken before AI made it worse. A scroll-and-swipe surface where the gameplay is the ad collapses the discovery loop into one motion. It puts solo developers in front of players the same way TikTok puts unknown musicians in front of listeners. That's the missing piece between &quot;anyone can ship&quot; and &quot;anyone can succeed&quot;.</p>
<p>If you want the original interview in full, <a href="https://medium.com/@vio-202020/interview-with-tech-done-different-3b9bf74d99c2">it's here</a>. Reading it back was useful. Most of what we said out loud in 2022 turned out to be a working roadmap, just on a faster clock than we thought.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 13: Terrain sculpting and the death of the math function]]></title>
            <link>https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting</guid>
            <pubDate>Mon, 13 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Three false starts, an exploding mesh, and a seam bug that forced us to rethink how terrain data works.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 13: Terrain sculpting and the death of the math function</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>For twelve parts we built a terrain engine that you could look at. Fly over it. Admire the seams not cracking. This time we wanted to touch it.</p>
<p>The goal sounded simple: let a player sculpt the terrain with a brush, in real time, without breaking any of the systems we spent 24 spikes building. It took three attempts, two bugs that looked like rendering failures but were data model failures, and a fundamental rethinking of how terrain data should work.</p>
<h2>Three false starts</h2>
<p>Spike 25 was supposed to be the easy one. The production codebase already had a raycaster that hits terrain meshes. The placement tool uses it for dropping objects. A brush tool follows the same shape, it just modifies heightmap values instead of spawning a prefab. Simple.</p>
<p>Attempt one: I built it directly into the production <code>world/client/</code> TypeScript code. New <code>terrain-brush.ts</code>, modifications to <code>chunk.ts</code>, protocol changes, Vue component updates. Within an hour I had a brush that sort of worked, but chunk boundaries showed visible normal discontinuities. I couldn't tell if the bug was my brush code, the existing chunk stitching, or some interaction with the full render loop. That's exactly the situation the spike methodology exists to prevent. I'd skipped the rule and paid for it immediately. Reverted everything.</p>
<p>Attempt two: standalone spike, but I reached for Three.js 0.170.0 and WebGL. The production code uses WebGL, so it felt natural. But Spikes 13-24 had all moved to WebGPU. Building a WebGL brush spike would prove it works on the legacy renderer rather than the one we're migrating toward, so I started over.</p>
<p>Attempt three: WebGPU, <code>WebGPURenderer</code>, compute shader for vertex generation, matching the Spike 22 stack. This time the architecture was right. Five brush operations worked (raise, lower, smooth, flatten, noise) with a brush cycle P95 under 4ms on M1.</p>
<p>And the seam bug was still there.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/25-heightmap-brush/" title="Spike 25 Heightmap Brush" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/25-heightmap-brush/" target="_blank">Open Spike 25 in a new tab ↗</a> · <a href="/blog/spike-source?spike=25-heightmap-brush">View source</a></p>
<h2>The seam bug that wouldn't die</h2>
<p>The standard fix for cross-chunk normal computation is border overlap: each chunk stores one extra ring of data from its neighbors, so the normal calculation at the boundary can sample both sides. I implemented that. Copied neighbor edge data into an expanded buffer. The seams still cracked.</p>
<p>I dug into the math. At the boundary between chunk A (cx=-1) and chunk B (cx=0), both chunks need to compute the same normal at the shared vertex. Chunk A's shader sampled <code>mix(own_col31, own_col32, 0.85)</code>. Chunk B sampled <code>mix(neighbor_edge, own_col0, 0.85)</code>. Those are different bilinear interpolation paths through different data. Even with correct border data, the two chunks compute different normals for the same point.</p>
<p>This was the moment I realized the border copy wasn't the real bug. The real bug was the data model.</p>
<p>Every spike from 1 to 24 used a procedural math function called <code>height_at()</code>. Feed it world coordinates, get a height. Clean, global, stateless. The brush couldn't modify a math function, so I'd added a <code>displacement</code> buffer on top. The terrain was now <code>height_at(x,z) + displacement[i]</code>. The GPU shader embedded 30 lines of noise functions for the base terrain plus bilinear interpolation code for the displacement overlay. The flatten brush had to subtract <code>height_at()</code> to figure out what displacement value would produce the target height. Two systems, layered on top of each other, computing different things with different sampling strategies.</p>
<p>None of that is how a real game works. In production, authored terrain is sampled data stored in buffers. The procedural function was a convenient stand-in from the early spikes. It had served its purpose. Now it was actively causing bugs.</p>
<p>I killed it.</p>
<p>Each chunk now owns a <code>heightmap</code> Float32Array with actual height values. At creation, procedural noise fills it. After that, the noise function is never called again. The brush modifies the stored heights directly. The GPU shader reads from one buffer using one function: <code>hm_at(i,j)</code>. Normals use grid-aligned central differences on the same data. There's no bilinear interpolation ambiguity and no two-system mismatch, and the shader went from 90 lines to 40.</p>
<p>The seams fixed themselves. Both chunks at a shared edge now read the same discrete height values from their respective buffers (with correct neighbor interior points in the border overlap). Same data in, same normals out.</p>
<p>This wasn't a brush lesson. It was a data architecture lesson that the brush exposed.</p>
<h2>The exploding mesh</h2>
<p>Spike 26 was the volumetric counterpart. Modify a 64-cubed SDF volume with a brush, then re-mesh with marching cubes. Same question as Spike 25, but in 3D.</p>
<p>The first time I ran it, the mesh exploded. Long spikes shooting in every direction, like a sea urchin having a bad day.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/26-sdf-brush/" title="Spike 26 SDF Brush" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/26-sdf-brush/" target="_blank">Open Spike 26 in a new tab ↗</a> · <a href="/blog/spike-source?spike=26-sdf-brush">View source</a></p>
<p>The MC case table I'd generated had 3840 entries instead of 4096. The full table is $256\ \text{cases} \times 16\ \text{slots} = 4096$, but I had $256 \times 15 = 3840$, sixteen missing rows starting at case 112. Every lookup after that index was shifted, so the case number no longer matched the triangulation data. When marching cubes reads the wrong entry, it creates edges where both endpoints are on the same side of the surface. On a real crossing edge the interpolation parameter</p>
<p>$$
t = \frac{-v_a}{v_b - v_a}
$$</p>
<p>lands in $[0, 1]$ because $v_a$ and $v_b$ have opposite signs. On a fake edge they have the same sign, so $v_b - v_a$ is near zero or flips sign and $t$ shoots outside $[0, 1]$, placing the vertex far outside the volume. Multiply that by a few hundred wrong cells and you get a hedgehog.</p>
<p>The fix was stupid simple: copy the proven table from Spike 12 byte-for-byte. Lesson learned. Never regenerate a lookup table when a proven copy exists.</p>
<p>The second bug was more subtle. The smooth brush was supposed to soften terrain features. Instead it created sharp creases. The problem: I was pulling every SDF value toward zero (the isosurface). That sounds like it should smooth things, but it collapses the distance field. Voxels above and below the surface both rush toward zero, flattening everything in the brush radius. At the boundary, smoothed voxels meet unsmoothed ones with a hard step. The &quot;smooth&quot; brush was a crease generator.</p>
<p>The fix was proper Laplacian smoothing. Instead of pulling each value toward zero, pull it toward the average of its 6 direct neighbors:</p>
<p>$$
\phi_i \leftarrow \phi_i + \lambda\left(\frac{1}{6}\sum_{j \in N(i)} \phi_j - \phi_i\right)
$$</p>
<p>The term in parentheses is a discrete Laplacian, and $\lambda \in (0, 1]$ is the smoothing strength. This averages nearby geometry, softening the surface shape while preserving the distance field gradient instead of collapsing it.</p>
<h2>Everything at once</h2>
<p>Spike 27 was the integration gate. Take Spike 24's full pipeline (heightmap patches, MC chunks, Transvoxel seams, geomorph LOD) and combine it with the sampled data model from Spike 25 and both brush types.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/27-hm-mc-brush/" title="Spike 27 HM + MC + Brush Integration" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/27-hm-mc-brush/" target="_blank">Open Spike 27 in a new tab ↗</a> · <a href="/blog/spike-source?spike=27-hm-mc-brush">View source</a></p>
<p>The first thing I did was rip <code>height_at()</code> out of every shader. All three compute shaders (SDF fill, heightmap patch, Transvoxel seam) now bind the same 129x129 heightmap GPU buffer and use the same <code>hm_sample()</code> bilinear interpolation function through a shared WGSL preamble. One data source, multiple consumers. The procedural noise functions that had lived in every shader since Spike 1 were gone.</p>
<p>Then the interesting problems started.</p>
<p>When an SDF brush locks a chunk into MC mode, the Transvoxel seam between that chunk and its heightmap neighbor needs to sample from the SDF volume rather than the heightmap. I extended the seam shader with additional storage buffer bindings and per-chunk MC flags. Four boundary combinations to handle: HM-HM, HM-MC, MC-HM, MC-MC.</p>
<p>LOD was another puzzle. In earlier spikes, switching an MC chunk to a lower LOD meant re-filling the SDF at a coarser resolution. I replaced that with stride-based sampling: SDF data stays at full resolution (65 grid points). The MC shader computes a stride from the ratio of grid size to cell count. At LOD0, stride is 1. At LOD1, stride is 2, sampling every other voxel. Chunks can change LOD freely without touching their SDF data.</p>
<p>The most satisfying fix was dynamic vertical chunk spawning. Sculpt upward past the top of a chunk, and a new MC-only chunk appears above it with its SDF initialized from the boundary face of the chunk below. Sculpt downward, same thing. The world grows to fit the edits.</p>
<p>The last gotcha was the heightmap brush doing nothing to MC-locked chunks, without any error. The HM brush modifies <code>heightmapCPU</code> and reuploads it. MC chunks don't read from the heightmap anymore because their SDF was filled from it and then diverged. I added <code>syncHeightmapToSdf()</code>: after the heightmap changes, re-derive the SDF columns for any MC chunks in the brush radius and upload the new values. Both brush types now work on both chunk types.</p>
<h2>What we actually learned</h2>
<p>The brush spikes were supposed to answer a performance question, whether sculpting can run within frame budget. It can. That was the easy part.</p>
<p>The hard part was discovering that 24 spikes of using <code>height_at()</code> as the terrain truth had created an invisible dependency that broke as soon as we tried to edit anything. The procedural function was clean and global and stateless, right up until it wasn't the terrain anymore.</p>
<p>Rules we wrote down and won't forget:</p>
<ol>
<li>Terrain height comes from sampled data. Chunks own their buffers.</li>
<li>Procedural generation fills initial data. It is not the runtime truth.</li>
<li>The brush modifies chunk data directly, with no displacement overlays.</li>
<li>Normals come from the same data via grid-aligned central differences.</li>
<li>Border overlap (1 cell from neighbor interior) handles cross-chunk normals.</li>
<li>Never regenerate a lookup table when a proven copy exists.</li>
</ol>
<p>In <a href="/blog/2026-04-13-open-world-browser-part-14-world-comes-alive">part 14</a> we stop sculpting debug geometry and start making it look and feel like an actual place.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Sampled heightmap architecture.</strong> Terrain stored as owned data per chunk rather than evaluated from a procedural function at runtime. Each chunk holds a <code>Float32Array</code> of actual height values. Procedural noise fills initial data at creation time, then the function is never called again. This eliminates the dual-system mismatch between math-based terrain and edit overlays, simplifies brush operations (edit stored values directly), and makes the GPU shader trivially simple (read from buffer, compute normals via grid-aligned central differences). For open world with streaming, per-chunk ownership with 1-cell border overlap from neighbors is the standard approach. See our <a href="/guides/landscape-generation-browser#terrain-data-representation">landscape generation guide</a>.</p>
<p><strong>SDF brush operations.</strong> Modifying a signed distance field to sculpt terrain. Add (inflate) uses smooth-step falloff around a sphere. Subtract (carve) uses the same shape negated. Smooth uses Laplacian averaging: read the 6 direct neighbors, compute their mean, pull toward the mean. The naive approach of pulling toward zero collapses the distance field and creates sharp edges. Laplacian smoothing preserves the field gradient while softening features. See <a href="/guides/landscape-generation-browser#signed-distance-fields-sdfs">SDF terrain representation</a>.</p>
<p><strong>Transvoxel with mixed data sources.</strong> Transition cells at the boundary between an MC chunk and a heightmap chunk need to sample different data on each side. The seam shader carries per-chunk flags and buffer bindings to handle all four combinations (HM-HM, HM-MC, MC-HM, MC-MC). When one side is MC-locked, the shader trilinearly interpolates the SDF buffer instead of sampling the heightmap.</p>
<p><strong>Stride-based LOD for marching cubes.</strong> SDF data stored at full resolution regardless of the chunk's current LOD level. The MC shader computes a sampling stride from the ratio of SDF grid points to MC cells. At full resolution the stride is 1, at half resolution the stride is 2. This decouples SDF data from LOD changes, so chunks can transition LOD freely without rebuilding the SDF.</p>
<hr>
<p>Part 13 of 14.
Previous: <a href="/blog/2026-02-25-open-world-browser-part-12-lessons">Part 12 - Rings, sky fog, and what we would do again</a>
Next: <a href="/blog/2026-04-13-open-world-browser-part-14-world-comes-alive">Part 14 - The world comes alive</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 14: The world comes alive]]></title>
            <link>https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-14-world-comes-alive</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-14-world-comes-alive</guid>
            <pubDate>Mon, 13 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Materials that react to your sculpting, grass that grows on cave ceilings, and a glider that makes you forget you're in a browser tab.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 14: The world comes alive</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>After <a href="/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting">part 13</a> we had sculpting. Raise terrain, carve caves, smooth cliffs, all in real time, seams intact. But the world looked like a tech demo. Debug-colored flat shading, wireframe overlays, grey geometry with LOD colors to tell chunks apart. You could edit it. You couldn't feel it.</p>
<p>Three spikes changed that without touching the architecture. The pipeline, buffers, and seam stitching are the same as in Part 13. We added the layers that make terrain feel like a place: surfaces that respond to the shape, life growing on those surfaces, and a body that walks on them.</p>
<p>The difference between &quot;technically working&quot; and &quot;I want to stay here&quot; turned out to be surprisingly small.</p>
<h2>Sculpt a cliff and watch it turn to rock</h2>
<p>Spike 28 asked whether a 4-layer material with triplanar mapping can run on compute-generated terrain without killing frame budget. The answer was yes, but the interesting part was what happened next.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/28-multi-material/" title="Spike 28 Multi-Material Texturing" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/28-multi-material/" target="_blank">Open Spike 28 in a new tab ↗</a> · <a href="/blog/spike-source?spike=28-multi-material">View source</a></p>
<p>Four procedural textures (grass, rock, sand, snow) generated from FBM noise at startup. No external files, no asset pipeline, just math and a <code>DataTexture</code>. The material weights come from the surface itself: slope and altitude. Flat areas below the treeline get grass. Steep faces get rock. Low ground gets sand. High peaks get snow. Each raw weight comes from a <code>smoothstep</code> on slope and altitude, then they're normalized per-fragment so $\sum_i w_i = 1$ and the final color is just the weighted blend $\sum_i w_i, c_i$. Normalizing is what keeps the surface from going dark or blown-out where biomes overlap. Triplanar mapping handles UV projection for MC chunks where triangles have no meaningful UV coordinates.</p>
<p>The moment that sold it: raise the terrain with the brush to create a steep cliff, and rock texture appears on the new face in the same frame. Flatten it back down, and grass reclaims the surface. The material doesn't know about the brush. It just reads world position and surface normal, the same data the geometry was built from. The sculpting-to-visual feedback loop is instant and unscripted.</p>
<p>Spike 8 tested terrain material cost a month and a half ago with a static mesh on WebGL. Spike 28 proves it works on dynamic compute-generated terrain with the full sculpting pipeline underneath. We'd budgeted for this, but seeing it hold at 60fps with everything running was still a relief.</p>
<h2>80,000 grass clumps and a cave ceiling</h2>
<p>Spike 29 is where the gamedev instincts took over.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/29-vegetation/" title="Spike 29 Vegetation / Shader Grass" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/29-vegetation/" target="_blank">Open Spike 29 in a new tab ↗</a> · <a href="/blog/spike-source?spike=29-vegetation">View source</a></p>
<p>We wanted grass with the feel of Breath of the Wild, whatever the poly count: grass that covers the right places, moves with the wind, and makes you want to run through it.</p>
<p>Each grass clump is three intersecting quads at 60-degree angles with four vertical segments for bending. It's a cross shape that looks volumetric from any angle without billboard tricks. One <code>InstancedMesh</code> per chunk, 80,000 clumps across the world, roughly 2.4 million grass vertices total.</p>
<p>Placement is the part that matters. The CPU walks a jittered grid across each chunk and evaluates the same slope/altitude logic the GPU material shader uses. Where the material system says &quot;grass,&quot; grass grows. Where rock or sand dominates, density drops to zero. The falloff is smooth because the underlying <code>smoothstep</code> weights produce continuous gradients at biome edges. You don't notice a boundary because there isn't one.</p>
<p>Then we did something I wasn't sure would work. Grass on SDF surfaces. The scatter function walks each column of the SDF volume and finds zero-crossings between adjacent voxels. Where the SDF crosses from negative to positive, there's a surface. The surface normal is just the normalized gradient of the field, $\hat{n} = \frac{\nabla\phi}{\lVert\nabla\phi\rVert}$, computed from voxel differences, and the slope is $\arccos(\hat{n} \cdot \hat{y})$, the angle from vertical. If that's gentle enough, place grass.</p>
<p>Carve a cave with the SDF brush in Spike 27. Come back in Spike 29 and there's grass growing on top of the cave ceiling. The scatter code doesn't know what a cave is. It just sees a surface with the right slope at the right altitude. That's the kind of emergent behavior that makes open-world systems satisfying to build.</p>
<p>Wind is a sine wave in the TSL vertex shader, modulated by the blade's V coordinate so tips sway and roots stay planted. Toggle V to cycle between gentle, strong, and off. The wind runs on all 80K clumps simultaneously with zero CPU cost because it's entirely in the vertex shader.</p>
<p>Spike 7 tested 50K grass instances and we were nervous about hitting the limit. Spike 29 runs 80K on top of compute terrain, seam stitching, multi-material texturing, and brushes. Batching into fewer <code>InstancedMesh</code> draws still matters more than reducing per-blade vertex count. The lesson from Spike 7 held up.</p>
<p>One thing we punted: grass doesn't update when you sculpt under it. The instance matrices are set at scatter time. Sculpt a hill into a valley and the grass floats in midair until you toggle G to re-scatter. Good enough for a spike. Production will need dirty-chunk re-scatter.</p>
<h2>The first footstep</h2>
<p>Spike 30 is the one I keep going back to.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/30-physics/" title="Spike 30 Terrain Physics" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/30-physics/" target="_blank">Open Spike 30 in a new tab ↗</a> · <a href="/blog/spike-source?spike=30-physics">View source</a></p>
<p>No physics library. Custom capsule at 120Hz fixed timestep. The production codebase uses Rapier in a web worker (Spike 2 proved the latency is fine), but this spike needed to prove the collision queries themselves. Can a character walk across heightmap terrain, step onto sculpted SDF terrain, and not fall through?</p>
<p>The core is a function called <code>terrainQuery(x, y, z)</code>. It checks whether the position falls inside an MC-locked chunk. If so, it trilinearly interpolates the CPU SDF mirror and returns the gradient as a surface normal. Otherwise, heightmap lookup with central-difference normal. The character doesn't know which terrain system it's standing on. It just asks for the ground and gets an answer.</p>
<p>SDF collision was the part I expected to be hard. Seven probe points around the capsule (bottom, center, top, four cardinal offsets). A probe at position $\mathbf{x}$ is penetrating whenever $\phi(\mathbf{x}) &lt; r$, with penetration depth $p = r - \phi(\mathbf{x})$, and the push-out direction is the field gradient $\hat{n} = \frac{\nabla\phi}{\lVert\nabla\phi\rVert}$. To stop the capsule re-entering the surface, velocity is projected to cancel its inward component:</p>
<p>$$
\mathbf{v}' = \mathbf{v} - (\mathbf{v} \cdot \hat{n}),\hat{n}
$$</p>
<p>which leaves only the component sliding along the surface. It's not a physics engine. It's geometry queries and simple response. But it handles caves, overhangs, and sculpted tunnels with zero special-case code per shape. You walk into a cave you carved ten seconds ago and the capsule follows the ceiling contour exactly.</p>
<p>The movement model started practical and got fun. Walk, run, sprint, jump, slope sliding above 45 degrees. Then I added a BotW paraglider and the spike turned into something I didn't want to close.</p>
<p>Press Space while airborne. Gravity drops from -30 to -4. Fall speed caps at -3. A delta-wing mesh unfolds from the capsule with scale interpolation. Bank left and the wing tilts. The capsule's facing auto-aligns toward the velocity vector so you're always looking where you're going. Let go of Space to drop. Hit the ground and you're running again.</p>
<p>The camera pulls back into third-person (toggle P). It follows behind the player with yaw smoothing. A ray-march from player to camera tests terrain at 20 steps. Fly into a cave and the camera arm shortens smoothly instead of clipping through rock. Emerge on the other side and it extends back out.</p>
<p>Here's the moment that made the spike worth it: sculpt a tall cliff with the heightmap brush. Switch to the third-person camera. Run to the edge. Jump. Deploy the glider. Bank left over the terrain you just sculpted, with the grass you grew in Spike 29 waving below, the rock texture from Spike 28 on the cliff face, Transvoxel seams holding at every chunk boundary. Land on the other side. Everything working together in one browser tab.</p>
<h2>Sculpting under your own feet</h2>
<p>One thing I wasn't sure about was what happens when you sculpt the terrain the character is standing on. The heightmap changes propagate through <code>terrainQuery()</code> instantly because it reads the CPU buffer directly. SDF changes propagate through the CPU SDF mirror. The capsule resolves penetration on the next physics tick, which at 120Hz is within $\frac{1}{120} \approx 8.3$ ms.</p>
<p>It works without special handling. Raise the ground under the player and they rise with it. Carve the ground away and they fall. The physics runs fast enough that single-frame terrain changes never produce large penetrations. This was a happy accident of choosing 120Hz for the timestep. We picked it for smooth movement, and it made terrain editing safe for free.</p>
<h2>30 spikes later</h2>
<p>We started this series with a flat heightmap and 500 cubes. Now we have sculpted terrain with volumetric caves, Transvoxel seam stitching, multi-material texturing that responds to the surface shape, 80,000 grass clumps swaying in the wind, and a character that walks, sprints, jumps, and glides across all of it.</p>
<p>None of this is in production yet. The <code>world/client/</code> codebase still runs WebGL with simple heightmap chunks. Everything from these 30 spikes lives in standalone HTML pages. The integration work is next: migrating to <code>WebGPURenderer</code>, wiring the hybrid HM/MC policy into the chunk manager, connecting the brush and material systems to multiplayer.</p>
<p>But the rendering system isn't the risk anymore. The open questions are about data flow: edit persistence, network sync of brush strokes, collaborative sculpting. The work that happens between players rather than between triangles.</p>
<p>If you've followed this series from Part 1, thanks for sticking with the messy parts. If you just found this, go back to <a href="/blog/2026-02-25-open-world-browser-part-01-risk-first">Part 1</a>. The wrong turns are where the lessons live.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>TSL (Three Shading Language).</strong> Three.js's node-based shader system for the WebGPU renderer. Materials are composed from nodes (<code>positionWorld</code>, <code>normalWorld</code>, <code>smoothstep</code>, <code>triplanarTexture</code>) using function composition in JavaScript. The shader graph compiles to WGSL at runtime. TSL replaces raw GLSL <code>ShaderMaterial</code> for WebGPU targets and provides interop between standard Three.js material features (lights, shadows, fog) and custom per-fragment logic.</p>
<p><strong>Triplanar mapping.</strong> A texture projection technique that samples a texture three times (XY, XZ, YZ planes) and blends based on surface normal direction. This eliminates UV stretching on arbitrary mesh geometry, which is critical for marching cubes output where triangles have no meaningful UV coordinates. TSL provides <code>triplanarTexture()</code> as a built-in node.</p>
<p><strong>Instanced vegetation with cross-quad blades.</strong> Each grass clump is 3 intersecting quads at 60-degree angles, creating a volumetric appearance from any view direction. 4 vertical segments per quad allow smooth bending for wind animation. The entire field is rendered as a single <code>InstancedMesh</code> per chunk. Capacity is over-allocated by 25% so new instances can fill reserved slots when terrain is edited without reallocating the GPU buffer. See our <a href="/guides/landscape-generation-browser#vegetation-and-foliage">landscape generation guide on vegetation</a>.</p>
<p><strong>Capsule vs SDF collision.</strong> Character collision against volumetric terrain without a physics engine. The capsule is probed at multiple points against the SDF. Where the field value is less than the capsule radius, the gradient provides the outward normal and the difference gives the penetration depth. This handles caves, overhangs, and tunnels with no shape-specific code. See <a href="/guides/landscape-generation-browser#physics-on-sdf-terrain">SDF terrain collisions</a>.</p>
<p><strong>Fixed-timestep character controller.</strong> Physics steps at 120Hz regardless of frame rate, accumulating real time and consuming it in fixed-size steps. A max substep count prevents spiral-of-death on slow frames. Ground snapping keeps the capsule attached during slope traversal. The fixed timestep ensures deterministic behavior for future multiplayer replay.</p>
<hr>
<p>Part 14 of 29.
Previous: <a href="/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting">Part 13 - Terrain sculpting and the death of the math function</a>
Next: <a href="/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water">Part 15 - Replace the baseline, then sync it</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 15: Replace the baseline, then sync it]]></title>
            <link>https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water</guid>
            <pubDate>Mon, 13 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spikes 31-32 made the choice to replace the legacy world with the best spike, then proved brush-param replay multiplayer and added an ocean with swimming.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 15: Replace the baseline, then sync it</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>The first fourteen parts covered spikes 1 through 30. That run ended with a terrain system that could be sculpted in real time, plus a character who could walk, glide, and fall on it. This part picks the series back up at spike 31, and the first thing we had to decide wasn't technical. It was what to do with all that spike code.</p>
<h2>The &quot;replace, don't backport&quot; decision</h2>
<p>We had 30 standalone HTML files, each proving one isolated concept, and zero integration. The production <code>world/client/</code> was still the old stack: WebGL, a simple heightmap, a 75-line character controller, a MessagePack protocol with nine message types. It had no editing, WebGPU, materials or vegetation.</p>
<p>The obvious plan was to backport spike results into that production codebase one at a time. We threw it out. Spike 30 already had better terrain, physics, materials, vegetation, and camera than <code>world/client/</code> ever did. Backporting into the old WebGL code would mean fighting it the whole way. So we made the call to replace the world implementation with the most successful spike and build forward. Spike 30 became the new baseline, and <code>world/client/</code> became dead code.</p>
<p>That reframed the remaining work. To get from &quot;great single-player tech demo&quot; to &quot;product&quot; we needed multiplayer, persistence, infinite-world streaming, and object placement. Multiplayer terrain sync went first, because it's the one that forces architecture. The question it answers is simple to ask and expensive to get wrong: when Player A sculpts, what actually goes over the wire?</p>
<h2>Brush-param replay, not pixel sync</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/31-multiplayer-sync/" title="Spike 31 Multiplayer Terrain Sync" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/31-multiplayer-sync/" target="_blank">Open Spike 31 in a new tab ↗</a> · <a href="/blog/spike-source?spike=31-multiplayer-sync">View source</a></p>
<p>Before writing a line of network code, we traced exactly what a brush stroke does. The heightmap brush walks a radius around the cursor in a CPU <code>Float32Array</code>, applies a smoothstep falloff, and either adds, subtracts, smooths, or flattens. The SDF brush does the same thing in 3D over a sphere of voxels. Both paths are pure CPU array math. There's no GPU compute in the loop, no randomness and no nondeterministic floating point. Same input array plus same params equals same output, on every machine.</p>
<p>That's what makes the sync cheap. We don't send the edited terrain. We send the brush parameters, 56 bytes per stroke tick, and every client replays the same deterministic function. The sync protocol is four message types: peer discovery, the brush message <code>{op, wx, wy, wz, radius, strength, flattenTarget}</code>, and a player-position message at 20Hz.</p>
<p>For the spike we skipped the server entirely and used <code>BroadcastChannel</code>, the browser API for same-origin cross-tab messaging. Open two tabs, they talk, zero infrastructure. That isolates the sync question from latency, auth, and Durable Object wiring. If param replay converges across tabs, it'll converge across a WebSocket too.</p>
<p>The one place replay can diverge is order-dependent operations. Raise and lower are commutative, so <code>val + strength * falloff</code> lands the same regardless of who applied first. Smooth and flatten read neighbor values, so two clients smoothing the exact same spot in the same instant can drift by fractions of a millimeter per tick. In practice that never fires, and the production fix is already obvious: route edits through the DO, let it assign a monotonic sequence number, apply optimistically on the client, and correct order if the authoritative sequence disagrees. Classic optimistic concurrency, and the DO is a natural serialization point anyway.</p>
<h2>The peer capsule that kept vanishing</h2>
<p>Edits synced on the first try. The remote player's capsule did not. It flickered in and out of existence on the other tab, and it took three separate bugs to make it stay solid.</p>
<p>The capsule spawned at the world origin, which is buried under the terrain, because the <code>join</code> message arrives before any position data. The fix was to start it hidden and reveal it on the first position update. The position broadcast lived inside the render loop, and Chrome throttles <code>requestAnimationFrame</code> on unfocused tabs, so the other tab's staleness check would reap the peer and the next message would recreate it. The fix was to move the broadcast to a <code>setInterval</code>, which isn't throttled for visible tabs. And the staleness timeout was a too-aggressive 5 seconds, tripped by any GC pause. The fix was to raise it to 30 seconds and rely on the clean <code>leave</code> message for normal closes.</p>
<h2>Persistence and late-join, same format</h2>
<p>We folded persistence into the same spike instead of spinning up a new one, because the serialization format is identical whether the destination is IndexedDB or another tab. A snapshot is the full heightmap (a 129×129 <code>Float32Array</code>, about 66 KB) plus only the edited SDF chunks (each $65^3$, about 1.1 MB) plus the list of chunk IDs locked into marching-cubes mode. A debounced save writes to IndexedDB two seconds after the last edit. On load, procedural terrain generates synchronously and then the saved state overwrites it before the first meaningful frame. Late-join reuses the exact same bytes: when a new tab joins, an existing tab with edits serializes its state and sends it targeted at the newcomer, and the mountain you sculpted five minutes ago appears on their screen.</p>
<p>The first persistence test surfaced a nice ordering bug. Grass is scattered synchronously at init using the procedural heights, but the IndexedDB restore is async and overwrites the heightmap afterward, leaving every blade floating or sunk. The fix is a <code>refreshAllGrass()</code> pass that resamples the height under each instance and hides any blade now on a bad slope or altitude. The same function serves both load and late-join.</p>
<h2>The slope saga</h2>
<p>Sculpted terrain is rougher than the smooth procedural baseline, and it exposed three physics bugs the old terrain never could. Walking straight uphill made the capsule slide sideways. The cause was a velocity projection meant to keep movement tangent to the ground, but written with only the horizontal components of the normal. On a diagonal slope with normal $(-0.3, 0.9, -0.3)$, walking north injected sideways velocity out of nowhere. The ground snap already keeps the player on the surface, so we just deleted the projection.</p>
<p>The drift persisted from a second source. The SDF collision probes push the body out along the gradient by the penetration depth. On any slope the gradient has horizontal components, so a 0.1 m penetration on a 15° slope pushes about 0.026 m sideways per step, and at 120Hz that's roughly 3 m/s of invisible drift. The fix was to split the response by slope. On walkable ground ($\text{grad}_y$ above the walk threshold) the push is vertical only. On walls and cliffs the full 3D push stays, because that's exactly where you want to be deflected. We also raised the walkable limit from $\cos 45°$ to $\cos 60°$ so brush-made hills feel climbable the way they do in Breath of the Wild.</p>
<p>The third bug froze the capsule at chunk boundaries, because collision probes sampled a single chunk's SDF and got the &quot;deep in air&quot; sentinel when a probe crossed into the neighbor. The fix was <code>sdfSampleWorld(wx, wy, wz)</code> and <code>sdfGradientWorld(...)</code>, which find the right chunk for any world position and fall back to a heightmap distance estimate where no SDF exists. The SDF-to-heightmap collision transition is continuous now.</p>
<h2>Water completes the world</h2>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/32-water-swimming/" title="Spike 32 Water and Swimming" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/32-water-swimming/" target="_blank">Open Spike 32 in a new tab ↗</a> · <a href="/blog/spike-source?spike=32-water-swimming">View source</a></p>
<p>Every spike up to here was &quot;land above water.&quot; Spike 32 added an ocean, and with it a new movement verb. We set the water level at 22 in a terrain that ranges roughly 8 to 58, which floods the low valleys, leaves beaches at the shoreline, and keeps plenty of dry land for play.</p>
<p>The surface is a <code>MeshStandardNodeMaterial</code> built in TSL, the same node approach as the terrain. Three overlapping sine waves at different frequencies displace the vertices, and the surface normal comes from the analytic cosine derivatives of those waves rather than from mesh normals. Color blends from turquoise shallows to dark teal depths using a depth estimate $(\text{level} - y + \text{wave}) \times 0.12$ clamped to $[0,1]$, foam rises where that estimate approaches zero at the shoreline, and alpha follows depth so shallow water reads as transparent and deep water as nearly opaque.</p>
<p>Swimming is a buoyancy spring. The player enters swim mode when the feet drop below the water level and the body center is within a capsule half-height of the surface. A spring pulls the body toward a target just under the surface, and with a buoyancy constant of 12 against a water damping of 4 the player bobs stably with their head out, no oscillation. Swim speed is slower than walking with floaty acceleration and drag, jumping near the surface launches you out at 60% of normal jump velocity, and entry caps downward velocity at -5 m/s so you don't plunge. Terrain collision still runs underwater, so you can walk the lake bed where it rises above the swim target. The swimming flag rides along in the position broadcast so peers see you swim, and an HTML gradient overlay tints the view when the camera dips below the surface.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Deterministic brush-param replay.</strong> Instead of streaming edited terrain, each client sends only the brush parameters and replays the same CPU function. This works because both the heightmap and SDF brushes are pure <code>Float32Array</code> math with no randomness or GPU nondeterminism, so identical inputs produce bit-identical outputs everywhere. Payload is 56 bytes per stroke tick. Commutative operations (raise, lower) converge regardless of order, while neighbor-reading operations (smooth, flatten) need a serialization point to guarantee convergence, which the production Durable Object provides via monotonic sequence numbers.</p>
<p><strong>BroadcastChannel as a WebSocket stand-in.</strong> A browser API for same-origin cross-tab messaging with zero server. Used here to test the sync protocol in isolation from network latency and authentication. The serialization format (raw <code>Float32Array</code> heightmap plus edited SDF chunks plus MC-locked chunk IDs) is the same bytes used for IndexedDB persistence and late-join state transfer, so one format covers three jobs.</p>
<p><strong>Slope-split SDF collision response.</strong> When a capsule probe penetrates volumetric terrain, the naive fix pushes the body out along the SDF gradient by the penetration depth. On slopes that gradient has horizontal components, injecting lateral drift. Splitting the response so walkable surfaces ($\text{grad}_y$ above threshold) get a vertical-only push, while steep surfaces keep the full 3D push plus velocity projection, removes the drift without losing wall collision. See <a href="/guides/landscape-generation-browser#physics-on-sdf-terrain">SDF terrain collisions</a>.</p>
<p><strong>TSL water with analytic wave normals.</strong> The ocean is a node material whose vertices are displaced by three summed sine waves. Rather than recomputing mesh normals after displacement, the surface normal is derived analytically from the cosine derivatives of the wave functions, which is cheaper and avoids the artifacts of finite-difference normals on a coarse grid. Depth-driven color, shoreline foam, and depth-driven transparency all key off a single depth estimate.</p>
<p><strong>Buoyancy-spring swimming.</strong> Swim physics models the body as a damped spring pulled toward a target just below the surface. With buoyancy constant 12 and damping 4, the player settles at the surface without oscillating. Distinct movement constants (slower speed, floaty acceleration, heavy drag) give swimming a different feel from walking, and the existing capsule-vs-terrain collision keeps working underwater.</p>
<hr>
<p>Part 15 of 29.
Previous: <a href="/blog/2026-04-13-open-world-browser-part-14-world-comes-alive">Part 14 - The world comes alive</a>
Next: <a href="/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring">Part 16 - Structure for a world that keeps growing</a>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What it actually takes to build an open world in a browser]]></title>
            <link>https://app.cinevva.com/blog/2026-03-14-open-world-browser-medium-article</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-03-14-open-world-browser-medium-article</guid>
            <pubDate>Sat, 14 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A journalistic walkthrough of Cinevva's 12-part engineering series: 24 spike experiments, from ugly terrain baselines to GPU marching cubes, streaming LOD, and Transvoxel seam debugging.]]></description>
            <content:encoded><![CDATA[<h1>What it actually takes to build an open world in a browser</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<img src="/img/blog/open-world-browser-120fps.png" alt="The open world running in a browser at 120 FPS — terrain, trees, physics, and a player capsule, all rendered in a single tab" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>The team at Cinevva just published one of the most transparent engineering journals in recent game-dev memory: a <a href="/blog/2026-02-25-open-world-browser-series-guide">12-part series</a> documenting our attempt to build a multiplayer open world that runs entirely in the browser. No download. No app store. Just a URL.</p>
<p>The project spanned 24 technical experiments we call &quot;spikes&quot; -- short, focused prototypes designed to answer one risky question each. Every spike shipped with live source code you can open and run in your browser right now. The series was written by <a href="/about">Oleg Sidorkin</a>, CTO and co-founder of Cinevva, and it reads less like marketing and more like a field journal from the frontlines of what browsers can actually do in 2026.</p>
<p>What makes the series worth reading -- even if you never plan to build terrain systems -- is the method underneath. It's a case study in how to de-risk an ambitious project before you've committed to anything expensive.</p>
<h2>Starting with the hardest question first</h2>
<p>Most open-world projects die in a predictable sequence. First you get a beautiful concept. Then a pretty scene. Then you discover that your frame budget was already spent before gameplay existed.</p>
<p>Our team inverted the order. The <a href="/blog/2026-02-25-open-world-browser-part-01-risk-first">first spike</a> was deliberately ugly: a 512-meter terrain mesh, 500 instanced objects, procedural height noise, a water plane, and fog. No shadows, no beauty pass. The only question was whether a browser could hold a stable frame rate while the camera moved through it.</p>
<p>It could. And that &quot;yes&quot; established something Oleg calls a &quot;baseline contract&quot; -- a measured reference cost for a minimal scene that every subsequent feature had to justify itself against. If a new effect looked great but blew the frame budget, it didn't ship. Not yet, anyway.</p>
<p>That kind of discipline sounds obvious. In practice, it's rare in fast-moving prototype environments where everyone is excited about the next visual win.</p>
<h2>The physics gamble</h2>
<p>The <a href="/blog/2026-02-25-open-world-browser-part-02-worker-physics">second experiment</a> tackled an architectural debate that divides browser game developers: should physics run on the main thread, where it's simpler, or in a Web Worker, where it can't block rendering?</p>
<p>Worker-based physics is cleaner on paper. In practice, the fear is latency. Every input event has to cross a message boundary twice: once to reach the worker, once to bring back the result. If that round trip is too slow, pressing a key and seeing your character move will feel sluggish.</p>
<p>The team integrated the Rapier physics engine (compiled from Rust to WebAssembly) in a dedicated worker, wired up the message pipeline, and measured. The overhead was negligible. Controls still felt immediate. But we were careful to note that we'd validated one specific scenario, not a universal rule. When GPU pressure and streaming complexity changed later, assumptions would need rechecking.</p>
<h2>The boring spikes that saved the project</h2>
<p><a href="/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes">Part three</a> of the series has no screenshots. It covers three experiments that looked unglamorous but carried product-level consequences.</p>
<p>The first tested whether Cloudflare Durable Objects could handle real-time position broadcasts at game-like tick rates -- the multiplayer backbone. If this had failed, the entire network architecture would have needed early sharding rather than single-island ownership.</p>
<p>The second validated a mobile quality profile: not a desktop preset renamed, but an explicit low-cost rendering path from the same terrain baseline. The question was whether the world could remain readable and responsive under mobile GPU constraints without rewriting the renderer.</p>
<p>The third evaluated whether AI-generated behavior scripts for creator workflows would be reliable enough for production use.</p>
<p>None of these produced demo reels. All three set hard boundaries that shaped every architectural decision afterward. Oleg writes that these &quot;unflashy spikes changed architecture faster than visual spikes did.&quot;</p>
<h2>Streaming: where pretty projects fall apart</h2>
<img src="/img/blog/open-world-chunk-streaming.png" alt="Spike 6: Chunk streaming in action — each colored area is a terrain chunk that loads and unloads dynamically as the camera moves" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>You can hide a lot in a still frame. You can't hide a 40-millisecond stutter when crossing a chunk boundary while running.</p>
<p>The team tested <a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">streaming before building advanced terrain</a>, deliberately separating concerns. Spike 6 validated neighborhood chunk loading with simple content. Only after that clean signal did Spike 11 introduce compressed heightmap streaming with progressive refinement -- loading terrain at 17-sample resolution first, then 33, then the full 65-sample grid.</p>
<p>The sequencing mattered more than we expected. Had we started directly with compressed height chunks, every hitch would have been ambiguous. Was it a decode issue, a texture upload stall, or a geometry update problem? Testing simple streaming first eliminated one entire category of uncertainty.</p>
<p>A practical lesson emerged: measure upload stalls directly, not through average FPS. Averages hide frame spikes, and frame spikes are what players actually feel.</p>
<h2>The visual budget wars</h2>
<p>Three separate experiments attacked rendering costs in isolation rather than bundling them. <a href="/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty">Vegetation</a> density and wind animation. Multi-layer terrain materials with triplanar mapping for cliff faces. Cascaded shadow maps under realistic terrain load.</p>
<p>The vegetation spike revealed that batching instances into fewer meshes mattered more than reducing per-blade polygon count. The material spike found that triplanar projection on vertical surfaces was worth the GPU cost, but adding a fifth texture splat layer wasn't. The shadow spike determined that three cascades at 1024 resolution delivered acceptable contact shadows without exceeding 2 milliseconds of GPU time.</p>
<p>The team adopted a blunt rule: a feature moves forward only if it can explain its cost with measured frame-time data. That constraint, set early, made later architectural decisions around volumetric terrain and clipmaps significantly cleaner.</p>
<h2>The pivot that changed the project's trajectory</h2>
<p>Before Spike 10, our mental model was &quot;bigger world means more geometry.&quot; After <a href="/blog/2026-02-25-open-world-browser-part-06-clipmaps">Spike 10</a>, it became &quot;constant geometry budget, camera-centered ring updates.&quot;</p>
<p>Geometry clipmaps -- concentric rings of terrain centered on the camera, each ring progressively coarser -- meant the triangle count stayed roughly constant regardless of draw distance. The practical trick was geomorphing at ring boundaries: smoothly blending vertex heights in the shader so that the shift between resolution levels is invisible in motion.</p>
<p>A subtle lesson came from testing methodology. Clipmaps look fine in screenshots. They reveal their artifacts only under sustained camera movement through ring boundaries. The team spent time running constant-speed traversals and watching for temporal noise. &quot;Screenshots lied,&quot; Oleg writes. &quot;Motion told the truth.&quot;</p>
<h2>Going underground</h2>
<p>Heightmaps can't represent caves. They store one elevation value per point on a grid. The moment you need tunnels, overhangs, or carved rock faces, you need volumetric terrain.</p>
<p><a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Spike 12</a> implemented marching cubes on the GPU using WebGPU compute shaders, extracting triangle meshes from a 3D signed distance field. Four 64-cubed chunks ran simultaneously with per-frame mesh updates from animated SDF edits. The compute shader handled everything -- evaluating the field, classifying cells, emitting vertices -- without any CPU readback.</p>
<p>The challenge wasn't making it work. It was making it work alongside everything else. Integration with Three.js's scene graph, buffer lifecycle management (WebGPU buffers can't be resized), fence handling to avoid destroying GPU resources still in flight -- the series devotes <a href="/blog/2026-02-25-open-world-browser-part-08-webgpu-integration">two</a> full parts to what we call &quot;incremental hardening,&quot; the unglamorous process of adding one capability at a time and verifying the previous layer still functions after each addition.</p>
<h2>The seam nightmare</h2>
<p>The most technically harrowing section of the series spans <a href="/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut">Parts 9 through 11</a>, covering what happens when terrain chunks at different resolutions meet.</p>
<p>When a high-detail chunk sits next to a low-detail chunk, their independently generated meshes don't align at the boundary. The result is visible cracks, flickering edges, and T-junctions where light bleeds through. The Transvoxel algorithm solves this with special transition cells that bridge resolution differences -- but implementing it correctly across all chunk configurations, with consistent winding order, proper buffer management, and accurate draw ranges, consumed six separate experiments.</p>
<p>The team's most memorable debugging story: two days chasing a seam artifact we blamed on transition logic. The actual culprit was stale data. The GPU compute shader wrote N vertices into a buffer, but the draw call was still configured to render N+M vertices from the previous frame. Those extra vertices contained garbage that produced flickering razor-thin triangles. One line fix: clip the draw range to the atomic counter's active vertex count.</p>
<p>&quot;Rendering bugs often masquerade as meshing bugs,&quot; Oleg observes. &quot;The geometry was correct the whole time.&quot;</p>
<h2>From chaos to governance</h2>
<p>After the seam battle, the team replaced ad-hoc chunk behavior with an <a href="/blog/2026-02-25-open-world-browser-part-11-policy-modes">explicit policy system</a>. A central function now decided each chunk's LOD level, rendering mode (heightmap or marching cubes), and which faces needed transition cells. Distance rings determined the base LOD. An adjacency constraint ensured no two neighboring chunks differed by more than one resolution level. An edit bitmap kept volumetric chunks in marching-cubes mode regardless of distance if they contained creator modifications.</p>
<p>Color-coded debug overlays -- green for heightmap chunks, blue for marching cubes, orange for transition faces -- turned &quot;I saw a bug somewhere near that ridge&quot; into &quot;the bug appears at position (142, 12, -67) facing northwest.&quot;</p>
<p>&quot;Policy didn't reduce complexity,&quot; Oleg writes. &quot;It organized complexity.&quot;</p>
<h2>What it adds up to</h2>
<p>The final spike combined clipmap rings, per-fragment sky fog (sampling the actual skybox color in the direction of each terrain fragment), and Three.js module wiring into a unified demonstration. The result is a terrain system that layers near-field volumetric editing, mid-field heightmap chunks, and far-field clipmap rings under a policy layer that governs mode, LOD, and transitions.</p>
<p>The series closes with <a href="/blog/2026-02-25-open-world-browser-part-12-lessons">lessons</a> Oleg says he'd repeat on any future project:</p>
<ul>
<li><strong>Start with risk spikes before feature work.</strong> Kill the &quot;can we even do this?&quot; questions before investing in content pipelines.</li>
<li><strong>Freeze known-good baselines before integration jumps.</strong> The day spent establishing a clean checkpoint saves multiple days bisecting regressions later.</li>
<li><strong>Force policy and observability before optimization marathons.</strong> Named conditions with trigger rules beat mystery bugs every time.</li>
<li><strong>Test under motion, not screenshots.</strong> Pops, flicker, and streaming hitches all hide in still frames.</li>
<li><strong>Measure per-feature frame time, not average FPS.</strong> Averages hide the spikes that users actually feel.</li>
<li><strong>Publish the messy parts.</strong> The wrong turns, the ghost hunts, the two days blaming the wrong system. Those are the parts people can actually learn from.</li>
</ul>
<h2>Why this matters beyond Cinevva</h2>
<p>The series is significant for three reasons that extend past one company's terrain pipeline.</p>
<p>First, it demonstrates that WebGPU compute shaders, WebAssembly physics, and edge-deployed Durable Objects have crossed a threshold. A multiplayer open world with volumetric terrain, real-time editing, and streaming LOD is architecturally viable in a browser tab in 2026. That was not true two years ago.</p>
<p>Second, the spike methodology -- small, focused experiments that each answer one risky question with live, measurable results -- offers a template for any team attempting something that might not work. The discipline of measuring before committing, of establishing baselines before integrating, of naming edge cases before optimizing, applies far beyond terrain systems.</p>
<p>Third, the radical transparency is the point. Publishing source code for all 24 experiments, including the dead ends and the two-day debugging detours, makes this more than a technical blog. It's a public engineering notebook that treats the reader as a colleague rather than a customer.</p>
<p>The full series is available in our <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>, with every spike running live in the browser.</p>
<hr>
<p><em>This article was originally published on <a href="https://vio-202020.medium.com/de-risking-an-ambitious-project-before-committing-to-anything-big-like-an-online-open-world-c94a7c05ee06">Medium</a>.</em></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 1: We started by trying to break it]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-01-risk-first</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-01-risk-first</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Before building caves or fancy shaders, we needed to answer one ugly question: can this thing even run in a browser?]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 1: We started by trying to break it</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>We're building a multiplayer open world that runs entirely in the browser. There's no install and no app store, just a URL. The biggest risk up front was obvious: can a browser even render a persistent 3D world at playable frame rates while leaving headroom for gameplay, physics, and networking?</p>
<p>Most open world projects fail in a predictable order. First you get a nice concept. Then you get a pretty scene. Then you realize your frame budget is already gone before gameplay exists.</p>
<p>We wanted to answer the render budget question before investing in anything else. So Spike 1 skipped the pretty trailer and went straight to measuring.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/01-terrain/" title="Spike 1 Terrain and Instancing" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/01-terrain/" target="_blank">Open Spike 1 in a new tab ↗</a> · <a href="/blog/spike-source?spike=01-terrain">View source</a></p>
<p>The setup was kept simple. A 512 meter terrain mesh, procedural height from layered sine noise with island falloff, a water plane, atmospheric fog, and 500 instanced objects. We used plain WebGL with Three.js, ACES tone mapping, and no shadows.</p>
<p>We didn't care how it looked. We cared whether the scene stayed stable while moving the camera through it.</p>
<p>Two things came out of this spike that shaped the whole project.</p>
<p>First, we confirmed we had real headroom on desktop if we kept the first pass disciplined. That gave us confidence to attempt the harder terrain architecture later.</p>
<p>Second, we created a baseline contract. Every next spike had to explain its cost relative to this scene. If a new feature looked good but cost too much, it did not get promoted.</p>
<p>That baseline discipline became critical later when we hit seam artifacts, mixed LOD transitions, and compute driven meshing. Without a stable reference, every bug looks bigger than it is.</p>
<p>In part 2 we move from rendering to input feel. Worker physics sounds great in architecture docs. It only matters if the character still feels immediate when you press a key.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Heightmap terrain.</strong> A 2D grid where each cell stores a single elevation value. The GPU displaces a flat mesh in the vertex shader to create the terrain surface. Heightmaps are compact (a 65x65 chunk is ~8 KB at 16-bit), GPU-friendly, and fast to render. The limitation is that they can't represent caves, overhangs, or any surface that folds back over itself. For background on heightmap constraints and what comes after them, see our <a href="/guides/landscape-generation-browser#why-heightmaps-arent-enough">landscape generation guide</a>.</p>
<p><strong>Three.js.</strong> The rendering library we used throughout this project. Three.js abstracts WebGL 2 (and later WebGPU) into a scene graph with cameras, lights, materials, and geometry objects. It provides <code>InstancedMesh</code> for rendering many copies of the same geometry in a single draw call, frustum culling, PBR materials, and post-processing. See <a href="https://github.com/mrdoob/three.js">Three.js on GitHub</a>. For how Three.js fits into a browser open world stack, see our <a href="/guides/browser-3d-open-world-tech#three-js">browser 3D tech guide</a>.</p>
<p><strong>InstancedMesh.</strong> A Three.js feature that renders N copies of the same geometry with a single draw call, each at a different position/rotation/scale. The per-instance transforms are stored in a matrix attribute buffer. This is how we rendered 500 objects in Spike 1 without 500 separate draw calls. For vegetation at scale, GPU-driven instanced culling takes this further. See our <a href="/guides/landscape-generation-browser#gpu-driven-vegetation-culling">landscape guide on GPU vegetation culling</a>.</p>
<p><strong>Frame budget.</strong> At 60 fps, each frame has $\frac{1000\ \text{ms}}{60} \approx 16.7$ ms for everything: JavaScript logic, physics, rendering, and compositing. A &quot;budget check&quot; spike measures how much of that a baseline scene consumes, so the headroom left for everything you add later is $t_\text{features} = 16.7 - t_\text{baseline}$. If the baseline already eats 12 ms, only ~4.7 ms remains for gameplay, physics, and networking combined. This approach comes from AAA open world development where <a href="/guides/browser-3d-open-world-tech#what-we-can-learn-from-skyrim-and-the-witcher">GTA V, Skyrim, and Elden Ring</a> all use aggressive LOD and streaming to stay within fixed frame budgets.</p>
<hr>
<p>Part 1 of 12.<br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-02-worker-physics">Part 2 - Worker physics and the input lag fear</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 2: Worker physics and the input lag fear]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-02-worker-physics</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-02-worker-physics</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We moved Rapier into a Web Worker and measured what everyone worries about first: does movement feel late?]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 2: Worker physics and the input lag fear</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>If you build browser multiplayer long enough, you eventually get this argument.</p>
<p>&quot;Physics in a worker is clean architecture. Physics on the main thread feels safer.&quot;</p>
<p>Both can be true. What matters is control feel and latency under real input.</p>
<p>Spike 2 was built to answer that with measurements rather than opinions.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/02-rapier-worker/" title="Spike 2 Rapier Worker" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/02-rapier-worker/" target="_blank">Open Spike 2 in a new tab ↗</a> · <a href="/blog/spike-source?spike=02-rapier-worker">View source</a></p>
<p>We reused the Spike 1 terrain and integrated Rapier in a dedicated module worker. Input state was sent to the worker every frame, simulation stepped there, and authoritative position came back to the renderer.</p>
<p>The key metrics were input to visible movement latency and physics step timing. We also watched for jitter under normal movement, sprint bursts, and jump cadence.</p>
<p>The result was better than expected. With our message shape and cadence, the worker boundary did not dominate latency. Controls still felt immediate, which was the only thing players would care about.</p>
<p>One challenge from this phase was interpretation risk. After a successful result, teams often overgeneralize and assume the architecture question is closed forever. It is not. We only validated one concrete scenario and hardware profile. Later spikes still had to recheck assumptions when GPU and streaming pressure changed.</p>
<p>This spike also gave us a process upgrade. We started exposing timing telemetry in HUD by default for interactive spikes. That changed team conversations from &quot;it feels off&quot; to &quot;this path added 1.2 ms.&quot;</p>
<p>In part 3 we cover the less glamorous experiments that prevented expensive surprises later. Broadcast load, mobile constraints, and behavior generation reliability.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Rapier.</strong> A physics engine written in Rust that compiles to WebAssembly for browser use. It handles rigid bodies, colliders, joints, character controllers, and raycasting at 2-3x native performance. For open worlds, Rapier provides player character controllers (walking on terrain, climbing steps, sliding on slopes), object collision, raycasting for interactions, and trigger volumes. See <a href="https://rapier.rs/">Rapier documentation</a> and our <a href="/guides/browser-3d-open-world-tech#rapier-rust-wasm">browser 3D tech guide on physics</a>.</p>
<p><strong>Web Workers.</strong> Browser threads that run JavaScript (or Wasm) off the main thread. Physics simulation in a worker means a heavy <code>world.step()</code> call doesn't block rendering. The main thread sends input state to the worker each frame via <code>postMessage</code> and receives authoritative positions back. The latency penalty is the two message hops (~0.1-0.5 ms each on desktop). The benefit is that the render thread never stalls on collision detection. Transferable objects (<code>ArrayBuffer</code> transfer) eliminate copy overhead for large position arrays.</p>
<p><strong>WebAssembly (Wasm).</strong> A binary instruction format that runs at near-native speed in browsers. Rapier, Havok, and Recast all compile to Wasm. The physics step in Rapier-Wasm is typically 0.5-2 ms for a few hundred bodies, compared to 5-15 ms for equivalent JavaScript. Wasm modules load as <code>.wasm</code> files fetched alongside the JavaScript glue code. See <a href="https://webassembly.org/">WebAssembly specification</a>.</p>
<p><strong>Input-to-visual latency.</strong> The time between a keypress and the resulting visual change on screen. For movement to feel &quot;immediate,&quot; this needs to stay under ~80 ms. In a worker physics setup the chain is additive:</p>
<p>$$
L = t_\text{input} + 2,t_\text{msg} + t_\text{step} + t_\text{render} + t_\text{vsync}
$$</p>
<p>keydown event (main thread), <code>postMessage</code> to the worker and back ($2,t_\text{msg}$), the physics step, the renderer applying the new position, then the next vsync. Each term is small on its own (~0.1-0.5 ms per message hop on desktop), but they stack, so we measured $L$ directly instead of trusting the architecture diagram.</p>
<hr>
<p>Part 2 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-01-risk-first">Part 1 - We started by trying to break it</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes">Part 3 - The unflashy spikes that saved us</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 3: The unflashy spikes that saved us]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Durable Object broadcast load, mobile quality constraints, and behavior generation reliability were not glamorous, but they prevented expensive surprises.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 3: The unflashy spikes that saved us</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>This part has fewer shiny screenshots and more architecture insurance.</p>
<p>After Spikes 1 and 2, we ran three risk checks that looked small but had product level impact.</p>
<p>First was broadcast fan out with Durable Objects. We tested multi client position distribution at game-like tick rates and tracked latency distribution, CPU per tick, and delivery integrity. If this had failed, we would have moved to early sharding instead of single island ownership.</p>
<p>Second was mobile constraint validation. Not a desktop preset renamed to mobile, but an explicit low-cost profile from the same baseline terrain.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/01-terrain/?quality=mobile" title="Mobile quality profile based on Spike 1" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/01-terrain/?quality=mobile" target="_blank">Open the mobile profile in a new tab ↗</a> · <a href="/blog/spike-source?spike=01-terrain">View source</a></p>
<p>We reduced segment density, object count, render resolution pressure, and fog range. The question was simple. Can this world remain readable and responsive on mobile class constraints without rewriting the entire renderer.</p>
<p>Third was behavior generation reliability for creator workflows. We evaluated valid JSON rate, semantic correctness against expected primitives, and response latency. If this had failed, we would have moved to strict form based behavior authoring.</p>
<p>The key insight from this chapter is that these unflashy spikes changed architecture faster than visual spikes did. They set hard boundaries on network topology, mobile promises, and tool UX.</p>
<p>In part 4 we return to visible terrain work and test movement-time streaming behavior rather than static loading screenshots.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Cloudflare Durable Objects.</strong> Edge-deployed stateful serverless instances with built-in persistence and WebSocket support. Each Durable Object holds authoritative state for a world shard (or chunk). Players connect via WebSocket and receive position broadcasts from other players in the same shard. When the player moves to an adjacent chunk, they connect to that chunk's Durable Object. Durable Objects auto-persist state to disk and scale to thousands of concurrent instances. See <a href="https://developers.cloudflare.com/durable-objects/">Cloudflare Durable Objects docs</a> and our <a href="/guides/browser-3d-open-world-tech#multiplayer-networking">browser 3D tech guide on multiplayer networking</a>.</p>
<p><strong>Spatial sharding.</strong> Dividing the world across server instances by geographic region. Each shard owns a rectangular area of the world grid. As player density shifts, shards can split or merge. Players near a shard boundary see both shards' content through cross-shard visibility queries. This is how <a href="/guides/browser-3d-open-world-tech#server-architecture">EVE Online handles thousands of players</a> in one universe.</p>
<p><strong>WebSocket broadcast fan-out.</strong> Distributing real-time position updates from one server to many connected clients. Per-client downstream bandwidth scales linearly with the crowd you can see:</p>
<p>$$
B_\text{client} = N_\text{visible} \times b_\text{player}
$$</p>
<p>At game-like tick rates (20-30 Hz) each player generates $b_\text{player} \approx 800$ bytes/second of position data, so 200 players in view costs $200 \times 800 = 160$ KB/s per client. The naive all-to-all server cost is worse, growing like $N^2$, which is exactly why relevance filtering (spatial interest management) caps $N_\text{visible}$ before it pushes to each connection within the tick budget. See our <a href="/guides/browser-3d-open-world-tech#client-server-communication">networking guide</a> for delta compression and update frequency tradeoffs.</p>
<p><strong>Mobile rendering constraints.</strong> Mobile GPUs have 1/5 to 1/10 the throughput of desktop GPUs, ~1 GB memory limit (vs 2-4 GB on desktop), and thermal throttling under sustained load. A mobile quality profile reduces segment density, object count, render resolution, draw distance, and shadow quality. The goal isn't parity with desktop but maintaining readability and responsiveness. See <a href="/guides/browser-3d-open-world-tech#browser-3d-performance-real-numbers">browser 3D performance numbers</a> for real GPU benchmarks.</p>
<hr>
<p>Part 3 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-02-worker-physics">Part 2 - Worker physics and the input lag fear</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">Part 4 - Streaming before fancy terrain</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 4: Streaming before fancy terrain]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We tested chunk load and swap first with simple content, then moved to progressive heightmap refinement. That order paid off.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 4: Streaming before fancy terrain</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Streaming is where &quot;looks good&quot; projects usually fall apart.</p>
<p>You can hide a lot in a still frame. You cannot hide a 40 ms hitch while crossing a chunk boundary.</p>
<p>We intentionally tested streaming before we built advanced terrain representation. That gave us clean signal on load and unload behavior.</p>
<p>Spike 6 validated neighborhood churn with simple chunk content.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/06-chunk-streaming/" title="Spike 6 Chunk Load Swap" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/06-chunk-streaming/" target="_blank">Open Spike 6 in a new tab ↗</a> · <a href="/blog/spike-source?spike=06-chunk-streaming">View source</a></p>
<p>Then we moved to the real terrain path in Spike 11. Height chunk streaming with worker side decode and progressive refinement from 17 to 33 to 65 sample grids.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/11-chunk-streaming/" title="Spike 11 Heightmap Chunk Streaming" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/11-chunk-streaming/" target="_blank">Open Spike 11 in a new tab ↗</a> · <a href="/blog/spike-source?spike=11-chunk-streaming">View source</a></p>
<p>The sequencing mattered more than we expected. If we had started directly with compressed height chunks, every hitch would have been ambiguous. Decode issue, texture upload issue, or geometry update issue. Spike 6 removed one uncertainty layer before Spike 11 added complexity.</p>
<p>A practical lesson from this chapter carried into later spikes. Upload stalls must be measured directly rather than inferred from average FPS. Average FPS hides frame spikes, and frame spikes are what users actually feel.</p>
<p>In part 5 we move into the visual cost chapter where vegetation, terrain shaders, and cascaded shadows compete for the same frame budget.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Chunk-based streaming.</strong> The world is divided into a grid of independent chunks (typically 64x64 meters). As the player moves, chunks on the trailing edge unload while chunks on the leading edge stream in. This is how <a href="/guides/browser-3d-open-world-tech#skyrim-s-cell-system">Skyrim's cell system</a> works: a 5x5 grid of cells loaded around the player, swapping as they move. The browser version adds network latency to the equation, making predictive pre-fetching based on player velocity critical. See our <a href="/guides/landscape-generation-browser#streaming-architecture-for-terrain">streaming architecture guide</a>.</p>
<p><strong>Progressive heightmap refinement.</strong> Send terrain at low resolution first, then refine. The grid sizes aren't arbitrary: each level is a $(2^k + 1) \times (2^k + 1)$ grid, so $17 = 2^4 + 1$, $33 = 2^5 + 1$, $65 = 2^6 + 1$. The $+1$ keeps a shared sample on every boundary so neighbors line up, and each step roughly quadruples the sample count ($n^2$ grows as the side doubles). A 17x17 grid (the minimum for a 64m chunk at 4m spacing) is ~200 bytes compressed and renders a visible surface instantly. Then stream the 33x33 refinement, then the full 65x65 resolution. Each level adds samples without replacing previous data. This maps directly to geometry clipmap LOD rings where distant terrain uses low-resolution data and close-up terrain uses full resolution. See <a href="/guides/landscape-generation-browser#progressive-chunk-loading">progressive chunk loading</a>.</p>
<p><strong>Delta encoding and compression.</strong> Heightmap data compresses well because adjacent cells have similar values. Delta encoding stores the difference between each cell and its predicted value (average of neighbors), clustering values near zero. Combined with zlib or brotli, a 65x65 chunk drops from 8.4 KB raw to 1-2 KB compressed. At reduced precision for distant chunks (8-bit instead of 16-bit): 0.5-1 KB. See <a href="/guides/landscape-generation-browser#terrain-data-compression-for-streaming">terrain data compression</a>.</p>
<p><strong>Predictive pre-fetching.</strong> Loading chunks before the player arrives. The lead distance has to cover how far the player travels while a chunk loads, $d_\text{prefetch} = v \cdot t_\text{load}$, so it scales with speed: at walking speed (5 km/h) pre-fetch 2 chunks ahead (128m), at running speed (15 km/h) pre-fetch 4. The load ring shifts with velocity direction. A priority queue sorts pending requests by urgency and cancels requests for chunks the player has moved away from. See <a href="/guides/landscape-generation-browser#predictive-pre-fetching">predictive pre-fetching</a>.</p>
<hr>
<p>Part 4 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes">Part 3 - The unflashy spikes that saved us</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty">Part 5 - Budgeting the pretty stuff</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 5: Budgeting the pretty stuff]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Vegetation, terrain materials, and cascaded shadows looked great. The real work was proving they could fit the frame budget.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 5: Budgeting the pretty stuff</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>This was the chapter where visual ambition met arithmetic.</p>
<p>We split rendering cost into separate spikes because bundled results are hard to diagnose. If you turn everything on at once, you only learn that the frame is slow. You don't learn which feature ate the budget.</p>
<p>Spike 7 targeted vegetation density and animation cost. The approach was runtime scattering from 32x32 density maps per terrain chunk, feeding large <code>InstancedMesh</code> sets. Each grass blade and shrub cluster got vertex-shader wind driven by a scrolling noise texture. The key number we watched wasn't triangle count but draw call overhead and vertex throughput on mid-range GPUs. We found that batching instances into fewer meshes mattered more than reducing per-blade polygon count.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/07-gpu-vegetation/" title="Spike 7 GPU Vegetation" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/07-gpu-vegetation/" target="_blank">Open Spike 7 in a new tab ↗</a> · <a href="/blog/spike-source?spike=07-gpu-vegetation">View source</a></p>
<p>Spike 8 pushed terrain material complexity. Multi-layer blending weighted by slope angle and altitude, optional triplanar projection for cliff faces, and per-layer normal maps. The shader was doing slope-based splatting with four texture layers, each needing a diffuse and normal sample. That's $4 \times 2 = 8$ texture fetches per fragment before you add any lighting, and the count grows linearly with layers, so a fifth layer means 10 fetches every pixel. We profiled on integrated Intel GPUs specifically to find the floor. The takeaway was that triplanar projection on vertical surfaces was worth the cost, but adding a fifth splat layer wasn't.</p>
<p><a href="/spikes/08-terrain-material/" target="_blank">Open Spike 8 in a new tab ↗</a> · <a href="/blog/spike-source?spike=08-terrain-material">View source</a></p>
<p>Spike 9 focused on cascaded shadow map cost under realistic terrain and object load. CSM with three cascades was baseline. We tested with low-angle sun positions specifically because that's where cascade pressure gets worst. The far cascade covers a huge frustum slice, and shadow detail is set by texel density, $\rho \approx \frac{R^2}{A}$ (a shadow map of resolution $R$ stretched over ground area $A$). One map over the whole view distance makes $A$ enormous and $\rho$ collapses. Cascades fix this by splitting the frustum so each slice gets its own $R \times R$ map over a small $A$, keeping $\rho$ roughly constant from near to far. We measured the GPU time difference between two and four cascades, then between 1024 and 2048 shadow map resolution. The result was that three cascades at 1024 gave us acceptable contact shadows near the camera without exceeding 2ms of GPU time on our target hardware.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/09-csm-shadows/" title="Spike 9 CSM Shadows" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/09-csm-shadows/" target="_blank">Open Spike 9 in a new tab ↗</a> · <a href="/blog/spike-source?spike=09-csm-shadows">View source</a></p>
<p>The hard part in this phase was product discipline. Some effects looked excellent and still had to be constrained because they consumed too much of the frame budget relative to their visual impact.</p>
<p>Our rule became simple. A feature moves forward only if it can explain its cost with measured frame-time data.</p>
<p>That sounds obvious. It's not common in fast prototype cycles where everyone is excited about the next visual win. Keeping this rule early made architecture decisions around clipmaps and volumetric zones much cleaner later, because we already knew the per-feature cost of everything competing for the same 16ms.</p>
<p>In part 6 we hit the first major terrain architecture pivot with geometry clipmaps.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>InstancedMesh and GPU vegetation.</strong> Three.js's <code>InstancedMesh</code> renders N copies of the same geometry with one draw call. For vegetation, a density map (32x32 per chunk) drives runtime scattering of grass blades and shrub clusters into instance buffers. Wind animation runs in the vertex shader using a scrolling noise texture. At scale, WebGPU's <code>ComputeInstanceCulling</code> eliminates off-screen and distant instances before rasterization, and <code>IndirectBatchedMesh</code> packs multiple vegetation types into a single buffer drawn with multi-draw indirect. See our <a href="/guides/landscape-generation-browser#gpu-driven-vegetation-culling">landscape guide on GPU vegetation culling</a>.</p>
<p><strong>Triplanar mapping.</strong> Standard UV-mapped textures stretch on steep slopes because UV coordinates compress. Triplanar mapping projects textures along all three axes (X, Y, Z) and blends based on the surface normal. Cliff faces get the X or Z projection (no stretching), flat ground gets the Y projection. The blending is smooth and automatic with no UV unwrapping required. For PBR terrain, the same blending weights apply to albedo, normal, roughness, and ambient occlusion channels. See <a href="/guides/landscape-generation-browser#triplanar-mapping">triplanar mapping details</a>.</p>
<p><strong>Slope and altitude-based material splatting.</strong> Instead of hand-painted splat maps, materials are assigned procedurally in the fragment shader based on terrain properties. Flat ground at low altitude gets grass, steep slopes get rock, high altitude gets snow (only on surfaces flat enough for accumulation), near sea level gets sand. The transitions use <code>smoothstep</code> for smooth blending. In our implementation, each terrain chunk evaluates four texture layers with diffuse and normal samples per layer, resulting in eight texture fetches per fragment before lighting. See <a href="/guides/landscape-generation-browser#slope-and-altitude-based-material-assignment">slope and altitude material assignment</a>.</p>
<p><strong>Cascaded Shadow Maps (CSM).</strong> CSM splits the camera's view frustum into 3-4 distance ranges (cascades). Each cascade renders a shadow map from the sun's perspective at a resolution matched to its distance. Close cascades get high-resolution shadows (detailed contact shadows under trees and buildings), far cascades get lower resolution (broad mountain shadows). The terrain shader samples all cascades and selects the appropriate one per fragment. Performance cost: 3-4 cascades at 1024x1024 add ~0.5-1 ms for shadow map rendering plus ~0.2-0.3 ms for sampling. See <a href="/guides/landscape-generation-browser#shadows-for-terrain">shadows for terrain</a>.</p>
<hr>
<p>Part 5 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">Part 4 - Streaming before fancy terrain</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-06-clipmaps">Part 6 - Clipmaps changed the plot</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 6: Clipmaps changed the plot]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-06-clipmaps</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-06-clipmaps</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Geometry clipmaps gave us a way to keep terrain cost predictable while moving through a much larger world.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 6: Clipmaps changed the plot</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Before Spike 10, our mental model was still &quot;bigger world means more geometry.&quot; After Spike 10, the model became &quot;constant geometry budget, camera-centered ring updates.&quot; That shift changed the project trajectory.</p>
<p>The idea behind geometry clipmaps is straightforward. You render terrain as a set of concentric rings centered on the camera. The innermost ring has the highest vertex density. Each ring $k$ outward doubles the vertex spacing, $s_k = s_0 \cdot 2^k$, so it covers $4\times$ the ground area of the ring inside it.</p>
<p>That doubling is what makes clipmaps work. View distance grows geometrically with the number of rings, $d_\text{view} \approx s_0 \cdot 2^{L}$, while the vertex cost grows only linearly:</p>
<p>$$
V_\text{total} \approx N^2 \cdot L
$$</p>
<p>for $L$ rings of $N \times N$ vertices each. Doubling how far you can see costs one more ring rather than four times the geometry. The triangle count stays roughly constant no matter the world size, because you always render the same $L$ rings at the same resolution.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/10-clipmap-geomorph/" title="Spike 10 Geometry Clipmaps Geomorphing" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/10-clipmap-geomorph/" target="_blank">Open Spike 10 in a new tab ↗</a> · <a href="/blog/spike-source?spike=10-clipmap-geomorph">View source</a></p>
<p>The practical trick was geomorphing at ring boundaries. When a vertex transitions from one LOD ring to the next, its height has to blend smoothly between the high-res and low-res sample. Without that, you get visible pops every time the camera moves and rings shift. We handled this with a blend factor based on the vertex's distance to the ring edge, interpolating height in the vertex shader:</p>
<p>$$
h = \operatorname{lerp}(h_\text{fine},, h_\text{coarse},, \alpha), \qquad \alpha = \operatorname{smoothstep}(d_\text{near},, d_\text{far},, d)
$$</p>
<p>where $d$ is the vertex's distance from the camera. Inside the ring ($d \le d_\text{near}$) the vertex uses its full-resolution height, and by the time it reaches the next ring ($d \ge d_\text{far}$) it has already migrated to the coarse height that ring will use, so there's nothing left to pop.</p>
<p>One subtle lesson came from camera movement testing. It's easy to judge clipmaps in static screenshots and miss transition artifacts. We spent time running constant-speed traversals through ring boundaries and watching for temporal noise. Screenshots lied. Motion told the truth.</p>
<p>This spike also gave us a clean architectural boundary. Near-field terrain could become dynamic and expensive over time, with volumetric editing, higher material complexity, and physics interaction. Far-field terrain could stay stable, predictable, and cheap. That separation became the backbone of every architectural decision from this point forward.</p>
<p>If you're evaluating clipmaps for your own project, test stress loops rather than beauty shots. Long traversal paths, changing camera altitude, and repeated boundary crossings are what expose the real problems.</p>
<p>In part 7 we add volumetric meshing and move from &quot;terrain as a surface&quot; to &quot;terrain as editable volume.&quot; That was the point where this project stopped being a renderer and started becoming a world editor.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Geometry clipmaps.</strong> Introduced by Losasso and Hoppe at SIGGRAPH 2004 (<a href="https://hhoppe.com/geomclipmap.pdf">paper</a>), geometry clipmaps render terrain as concentric square rings centered on the camera. Each ring is twice the area of the previous one at half the vertex resolution. The total vertex count is constant: roughly $N^2 \cdot L$. With $N = 256$ and $L = 8$ levels, that's $256^2 \times 8 \approx 524{,}000$ vertices regardless of world size. The CPU updates heightmap data for each ring as the camera moves. The vertex shader reads height from a texture and displaces the flat grid. See our <a href="/guides/landscape-generation-browser#geometry-clipmaps">landscape guide on geometry clipmaps</a> and <a href="https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-2-terrain-rendering-using-gpu-based-geometry">GPU Gems 2, Chapter 2</a>.</p>
<p><strong>Geomorphing.</strong> The biggest visual artifact in terrain LOD is popping: vertices suddenly jump when a patch switches LOD level. Geomorphing eliminates this by blending vertex positions between LOD levels over a transition zone. Each vertex stores both its current-LOD height and its coarser-LOD height. A morph factor based on camera distance smoothly interpolates between them: <code>morphedHeight = mix(fineLodHeight, coarseLodHeight, smoothstep(lodNear, lodFar, distance))</code>. The transition zone is typically the outer 20% of each ring. At normal camera speeds, the transition is invisible. See <a href="/guides/landscape-generation-browser#geomorphing-pop-free-lod-transitions">geomorphing details</a>.</p>
<p><strong>CDLOD (Quadtree-Adaptive Clipmaps).</strong> An improvement on fixed-ring clipmaps by Strugar (2014, <a href="https://www.vertexasylum.com/CDLOD/cdlod_latest.pdf">paper</a>). Instead of concentric rings with uniform resolution, CDLOD uses a quadtree that adapts to terrain complexity. Flat areas use coarse nodes, while areas with high detail (cliffs, ridges) get finer subdivision. This matters for creator worlds where different chunks have vastly different complexity. See <a href="/guides/landscape-generation-browser#cdlod-quadtree-adaptive-clipmaps">CDLOD in our landscape guide</a>.</p>
<hr>
<p>Part 6 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty">Part 5 - Budgeting the pretty stuff</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Part 7 - Marching cubes and the first real caves</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 7: Marching cubes and the first real caves]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-07-marching-cubes</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-07-marching-cubes</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 12 brought real-time WebGPU marching cubes into the project and changed what terrain could be.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 7: Marching cubes and the first real caves</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Heightmaps are great until you need overhangs.</p>
<p>The moment you want carved tunnels, floating rock lips, or cave ceilings, a pure heightfield pipeline starts blocking you. A heightmap stores one Y value per XZ coordinate. It's physically incapable of representing any surface that folds back over itself. We needed a volumetric representation.</p>
<p>Spike 12 implemented marching cubes on the GPU using WebGPU compute shaders. The algorithm evaluates a signed distance field (SDF) on a 3D grid and extracts a triangle mesh at the zero-crossing surface. Each cell has 8 corners, each either inside or outside the surface, which gives $2^8 = 256$ possible sign patterns. A lookup table maps each pattern to a set of triangles. Vertices sit on the cell edges at the point where the field crosses zero. For an edge between corners $a$ and $b$ with field values $f_a$ and $f_b$, linear interpolation places the vertex at</p>
<p>$$
\mathbf{v} = \mathbf{p}_a + t,(\mathbf{p}_b - \mathbf{p}_a), \qquad t = \frac{-f_a}{f_b - f_a}
$$</p>
<p>which is the fraction along the edge where the field hits zero. Because $f_a$ and $f_b$ have opposite signs on a crossing edge, $t$ always lands in $[0, 1]$. We ran this on four active 64-cubed chunks simultaneously and tested animated SDF edits with per-frame remesh.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/12-webgpu-marching-cubes/" title="Spike 12 WebGPU Marching Cubes" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/12-webgpu-marching-cubes/" target="_blank">Open Spike 12 in a new tab ↗</a> · <a href="/blog/spike-source?spike=12-webgpu-marching-cubes">View source</a></p>
<p>The first win was confidence in the compute pipeline itself. A single dispatch could evaluate the SDF, classify cells, and emit vertices into a GPU buffer without any CPU readback. The second win was discovering how fast &quot;it works&quot; turns into artifact hunting. Missing triangles were rarely a marching cubes theory problem. They were table index mismatches, incorrect draw ranges reading past the active vertex count, or edge-case interactions near chunk boundaries where neighboring SDF samples weren't available.</p>
<p>This spike forced us to think in zones. Near the camera, you want volumetric freedom so players can carve, dig, and see caves. Far from the camera, you want clipmap efficiency where a flat heightmap is cheaper and perfectly adequate. That duality became the backbone of the architecture we kept refining from Spike 13 onward.</p>
<p>One of my favorite debugging moments was the wireframe toggle while edits were running. Watching topology form and dissolve in real time made quality tradeoffs immediately visible. You could see where vertex density was high enough, where it got too coarse, and exactly where LOD transitions would eventually need Transvoxel support to avoid cracks.</p>
<p>In part 8 we cover the integration challenge. Keeping raw compute-driven meshes and Three.js scene graph logic in one stable rendering pipeline was harder than the isolated demo suggested.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Marching cubes.</strong> An algorithm for extracting a triangle mesh from a 3D scalar field (Lorensen and Cline, 1987). Each cell in a regular 3D grid is classified by sampling the field at its 8 corners. The sign pattern produces a case index (0-255), and a lookup table maps each case to a set of triangles. Vertices are placed on grid edges by interpolating between the two corners. The algorithm is embarrassingly parallel since each cell processes independently, making it ideal for GPU compute. See our <a href="/guides/landscape-generation-browser#signed-distance-fields-sdfs">landscape guide on SDFs and marching cubes</a>.</p>
<p><strong>Signed Distance Fields (SDFs).</strong> A volumetric representation that stores, at every point in 3D space, the signed distance to the nearest surface. Positive values are outside, negative are inside, and the zero-crossing is the surface. SDFs can represent arbitrary 3D shapes: caves, arches, overhangs, and floating geometry that heightmaps can't express. Editing is natural set algebra on the field. Adding material (union of two shapes) is $d = \min(d_1, d_2)$, removing (digging) is $d = \max(d_1, -d_2)$ with the carve shape negated, and a smooth blend uses a soft minimum such as</p>
<p>$$
\operatorname{smin}(d_1, d_2, k) = \min(d_1, d_2) - \frac{h^2}{4k}, \qquad h = \max\bigl(k - |d_1 - d_2|,, 0\bigr)
$$</p>
<p>where $k$ controls the blend radius. As $k \to 0$ this collapses back to a hard $\min$. See <a href="/guides/landscape-generation-browser#signed-distance-fields-sdfs">SDF terrain representation</a>.</p>
<p><strong>WebGPU compute shaders.</strong> GPU programs that run general-purpose computation outside the rasterization pipeline. A compute shader dispatches workgroups of threads that execute in parallel. For marching cubes, each thread processes one grid cell: sample the SDF, classify the cell, look up triangulation, interpolate edge vertices, and append to a mesh buffer using atomic counters. No CPU readback is needed because the output buffer is used directly as vertex data for rendering. Will Usher's <a href="https://www.willusher.io/webgpu-marching-cubes/">webgpu-marching-cubes</a> demonstrates real-time 256^3 grid processing in the browser. See our <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">landscape guide on WebGPU-driven LOD</a>.</p>
<p><strong>Hybrid heightmap + SDF architecture.</strong> The practical approach for browser terrain: heightmaps cover the entire world (cheap, compact), while SDF volumes exist only in chunks that need caves, overhangs, or creator-carved features (5-10% of chunks). Near the camera, volumetric freedom allows carving and caves. Far away, heightmaps provide efficient flat terrain. See <a href="/guides/landscape-generation-browser#hybrid-heightmap-base--volumetric-overlays">hybrid terrain representation</a>.</p>
<hr>
<p>Part 7 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-06-clipmaps">Part 6 - Clipmaps changed the plot</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-08-webgpu-integration">Part 8 - Integration without losing our baseline</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 8: Integration without losing our baseline]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-08-webgpu-integration</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-08-webgpu-integration</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spikes 13 and 14 were less about features and more about process discipline. We froze a clean baseline, then hardened one layer at a time.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 8: Integration without losing our baseline</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Integration is where projects get messy. You have working pieces in isolation. You connect them and suddenly every bug looks like it could be anywhere.</p>
<p>Spikes 13 and 14 were our answer to that trap. Spike 13 established a clean Three.js WebGPU baseline. Just a renderer, a scene, a camera, and a simple mesh. There was no terrain, compute or effects. We confirmed that Three.js's WebGPU backend initialized correctly, that the render loop was stable, and that TSL (Three.js Shading Language) node materials worked as expected. Only after that checkpoint passed did we start adding layers.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/13-threejs-webgpu/" title="Spike 13 Three.js WebGPU Baseline" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/13-threejs-webgpu/" target="_blank">Open Spike 13 in a new tab ↗</a> · <a href="/blog/spike-source?spike=13-threejs-webgpu">View source</a></p>
<p>Spike 14 was incremental hardening. We added one capability at a time: first camera controls, then lighting, then the compute-generated mesh from the marching cubes pipeline, then buffer plumbing to feed GPU output directly into Three.js geometry attributes. After each addition, we verified that the previous layer still behaved correctly.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/14-threejs-webgpu-incremental/" title="Spike 14 Incremental Hardening" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/14-threejs-webgpu-incremental/" target="_blank">Open Spike 14 in a new tab ↗</a> · <a href="/blog/spike-source?spike=14-threejs-webgpu-incremental">View source</a></p>
<p>That sounds slow. It was slow for exactly one day, and it saved us multiple days soon after when seam logic and policy switching got complicated.</p>
<p>The specific category of bug that justified this discipline was hairline artifacts. Thin slivers that looked like geometry corruption but were actually stale data. The compute shader would write N vertices into a buffer, but the draw call would still be configured to render N+M vertices from the previous frame. Those extra vertices contained garbage from the old dispatch. The visual result was flickering razor-thin triangles that appeared and vanished unpredictably.</p>
<p>You don't beat that class of bug with intuition. You beat it with controlled deltas where you know exactly what changed between the last working state and the current broken state.</p>
<p>The WebGPU integration also taught us about buffer lifecycle. GPU buffers in WebGPU are immutable once mapped for a specific usage. If you need to resize a vertex buffer because the marching cubes output grew, you have to create a new buffer and update the binding. There's no <code>realloc</code>. Getting that lifecycle right, destroying old buffers without racing against in-flight GPU work, required explicit fence management that doesn't exist in WebGL.</p>
<p>In part 9 we move into Transvoxel seam work. That chapter starts with a scaffold by design. By this point we had fully internalized the lesson that rushing integration produces mysteries, and controlled setup produces debuggable problems.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>WebGPU.</strong> The successor to WebGL, providing low-level GPU access in the browser with compute shaders and indirect rendering. WebGPU's two critical features for open worlds: compute shaders enable GPU-side terrain generation, foliage placement, and culling, and indirect rendering lets the GPU decide what to draw based on compute output, eliminating CPU bottlenecks in dense scenes. Available in Chrome, Edge, and Firefox on desktop. See <a href="/guides/browser-3d-open-world-tech#webgpu-the-performance-unlock">WebGPU as a performance unlock</a>.</p>
<p><strong>Three.js Shading Language (TSL).</strong> Three.js's node-based shader system that replaces raw GLSL/WGSL with composable JavaScript expressions. TSL nodes like <code>texture()</code>, <code>positionWorld</code>, <code>smoothstep()</code>, and <code>fog()</code> build a shader graph at runtime that compiles to the appropriate backend (WebGL GLSL or WebGPU WGSL). TSL makes it possible to write material logic once and target both renderers. The node graph is evaluated per-frame, so dynamic uniforms and conditional branching work naturally.</p>
<p><strong>GPU buffer lifecycle in WebGPU.</strong> WebGPU buffers are created with specific usage flags (<code>VERTEX</code>, <code>STORAGE</code>, <code>COPY_DST</code>, etc.) and can't be resized after creation. If a marching cubes dispatch produces more vertices than the buffer can hold, you must create a new buffer, update the binding, and destroy the old one. Destroying a buffer that's still referenced by an in-flight GPU command causes errors. Explicit fence management (via <code>device.queue.onSubmittedWorkDone()</code>) ensures the old buffer isn't destroyed until the GPU finishes using it. This lifecycle discipline doesn't exist in WebGL, where the driver manages memory implicitly.</p>
<p><strong>Incremental hardening.</strong> A process discipline for integration: establish a known-good baseline, add one capability at a time, and verify the previous layer still works after each addition. This approach is slower for one day and saves days during later debugging because each regression can be traced to a specific, controlled change. The baseline-then-increment pattern is common in <a href="/guides/browser-3d-open-world-tech#what-we-d-build-first">AAA open world development</a> where systems are integrated in a specific order to manage risk.</p>
<hr>
<p>Part 8 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Part 7 - Marching cubes and the first real caves</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut">Part 9 - Transvoxel started with a scaffold</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 9: Transvoxel started with a scaffold]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We didn't jump into full seam coverage. We built a seam test rig first, then validated one face with reference data.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 9: Transvoxel started with a scaffold</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Seams are where confidence goes to die.</p>
<p>Everything can look stable until two resolutions meet. A chunk at LOD 0 sits next to a chunk at LOD 1. Their meshes are generated independently. Where they share a boundary, the vertex positions don't match because the lower-resolution chunk has half the grid density. The result is visible cracks, T-junctions, and flickering edges.</p>
<p>The Transvoxel algorithm solves this by generating special transition cells along the boundary face between two chunks at different resolutions. These cells sample from both the high-res and low-res grids simultaneously and produce triangles that stitch the two surfaces together. The algorithm uses its own lookup tables, separate from the regular marching cubes tables, with 512 transition cell cases.</p>
<p>We had enough integration scars by this point to know better than to rush the implementation.</p>
<p>Spike 15 had one job: build a seam test rig we could trust before touching the full algorithm. We set up a controlled environment where two chunks of known SDF data sat side by side at different resolutions, with visualization controls to toggle the main mesh, the seam mesh, wireframe, and normals independently.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/15-transvoxel-seam/" title="Spike 15 Transvoxel Seam Scaffold" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/15-transvoxel-seam/" target="_blank">Open Spike 15 in a new tab ↗</a> · <a href="/blog/spike-source?spike=15-transvoxel-seam">View source</a></p>
<p>Once the test rig was stable, Spike 16 validated table-driven transition cell generation on a single face. We picked one axis-aligned face (+X boundary), implemented the transition cell evaluation for that face only, and compared the output against reference data from the Transvoxel paper.</p>
<p><a href="/spikes/16-transvoxel-face/" target="_blank">Open Spike 16 in a new tab ↗</a> · <a href="/blog/spike-source?spike=16-transvoxel-face">View source</a></p>
<p>We tested one face at a time, because transition table wiring has many independent failure modes. Case index computation depends on sampling the correct vertices from both grids. Vertex indexing within a transition cell uses a different numbering scheme than regular marching cubes cells. Winding order has to be consistent with the main mesh or backface culling will eat your seam triangles. If you test all six faces at once, every symptom looks random. If you test one face thoroughly, you get meaningful, debuggable failures.</p>
<p>Another subtle win from this phase was tooling investment. We built visibility toggles, seam-only rendering, and color-coded LOD indicators early. Those controls felt like overhead at the time. Later, when corner cases got ugly, they paid for themselves over and over because we could isolate exactly which seam cells were misbehaving.</p>
<p>By the end of this chapter we weren't &quot;done with seams.&quot; We were in a position where seam bugs could be reasoned about instead of feared.</p>
<p>In part 10 the real roller coaster starts. Mixed LOD corners, winding flips, partial overdraw ghosts, and those moments where you're sure the algorithm is wrong and then discover the bug is a draw range reading past the active vertex count.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>The Transvoxel algorithm.</strong> Designed by Eric Lengyel (<a href="https://transvoxel.org/">transvoxel.org</a>), Transvoxel solves the hardest problem in volumetric terrain LOD: seams between chunks at different resolutions. When a high-res chunk sits next to a low-res chunk, the marching cubes meshes don't align at the boundary, producing visible cracks. Transvoxel inserts special transition cells along boundary faces that bridge the resolution difference with additional triangles matching both sides. The algorithm uses its own lookup tables (separate from regular marching cubes) with 512 transition cell cases, reduced to 73 equivalence classes. It's patent-free and has been used in shipped games (Space Engineers, Astroneer). See our <a href="/guides/landscape-generation-browser#the-transvoxel-algorithm">landscape guide on Transvoxel</a>.</p>
<p><strong>Transition cells.</strong> Special cells generated at the face between two LOD levels. Unlike regular marching cubes cells that sample 8 corners from one grid, transition cells sample from both the high-res and low-res grids simultaneously. The high-res face has $3 \times 3 = 9$ sample points, while the low-res face has $2 \times 2 = 4$. Those 9 samples are what give the algorithm its $2^9 = 512$ raw cases, which collapse to 73 distinct triangulations once you fold out rotations and reflections. The cell classification and triangulation use dedicated tables that produce triangles connecting vertices at both resolutions. The vertex numbering scheme is different from regular MC cells, which is a common source of implementation bugs.</p>
<p><strong>LOD transition seams.</strong> The boundary between two mesh resolutions where topology mismatch causes visual artifacts. Without stitching, a LOD 0 chunk (1m grid) next to a LOD 1 chunk (2m grid) produces T-junctions: the fine mesh has vertices along the boundary that the coarse mesh doesn't share, causing cracks where light bleeds through. Transvoxel, geomorphing, and skirt geometry are three approaches to fixing these seams. For volumetric terrain, Transvoxel is the standard solution because geomorphing only works for heightmaps. See <a href="/guides/landscape-generation-browser#lod-for-volumetric-terrain">LOD for volumetric terrain</a>.</p>
<hr>
<p>Part 9 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-08-webgpu-integration">Part 8 - Integration without losing our baseline</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-10-seam-chaos">Part 10 - Seam chaos and the corner boss fight</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 10: Seam chaos and the corner boss fight]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-10-seam-chaos</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-10-seam-chaos</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spikes 17 to 22 were where theory met edge cases. We chased winding bugs, missing triangles, overdraw ghosts, and hybrid fallback logic.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 10: Seam chaos and the corner boss fight</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>If the earlier parts felt methodical, this chapter felt like combat.</p>
<p>Spikes 17 through 22 were our corner-case era. Dual-LOD marching cubes, heightmap-to-MC boundary seams, mixed-resolution corner chunks where three or four LOD levels meet, GPU seam generation, and fallback mode behavior. Each spike addressed a specific failure scenario we'd encountered or anticipated.</p>
<p>Spike 17 tested dual marching cubes with two LOD levels active simultaneously. The challenge was that a single chunk's neighbors could be at different resolutions on different faces. The transition cell logic from Spike 16 worked for one face at a time, but when a chunk needed transition cells on multiple faces, the vertex buffer management got complicated. Each face's transition cells had to be generated and appended without overwriting the others.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/19-transvoxel-corner-grid/" title="Spike 19 Corner Grid Transvoxel" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/19-transvoxel-corner-grid/" target="_blank">Open Spike 19 in a new tab ↗</a> · <a href="/blog/spike-source?spike=19-transvoxel-corner-grid">View source</a></p>
<p>The first repeated villain was winding order. Several times we thought we had topology problems, then found orientation problems. Backface culling was eating valid seam triangles because the winding was flipped relative to the main mesh. Same root cause, different visual symptom depending on camera angle. The fix was enforcing a consistent winding convention in the transition cell emission code and verifying it with a double-sided material toggle.</p>
<p>The second villain was false confidence from partial correctness. A seam could look perfect from one camera angle and break when LOD roles swapped between higher and lower resolution chunks. The transition cell is asymmetric. It samples from the high-res side and the low-res side differently. If you get the &quot;which side is high-res&quot; logic backwards for one configuration, you only see the bug when the camera moves to a specific position.</p>
<p>Then came one of our favorite recoveries. We were chasing a seam cutoff artifact on heightmap tiles and blaming the transition logic. Burned two days on it. The real culprit was stale overdraw. Higher-resolution geometry from a previous frame was still living in the buffer tail after the chunk downscaled to a lower LOD. The draw range was still set to the old, larger vertex count. Once we clipped the draw range to the active vertex count reported by the compute shader's atomic counter, the &quot;mystery seam issue&quot; disappeared.</p>
<p>That was a great reminder that rendering bugs often masquerade as meshing bugs. The geometry was correct the whole time. The draw call was just reading past the end of valid data.</p>
<p>By Spike 22 we were testing hybrid fallback where chunks could switch from marching cubes to heightmap mode under specific conditions, like when the chunk contains no volumetric edits and sits far enough from the camera. This gave us a more practical path than an all-or-nothing policy. Near-field edited chunks use MC for volumetric freedom. Far-field unedited chunks use heightmaps for efficiency.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/22-gpu-mc-heightmap-fallback/" title="Spike 22 MC Heightmap Fallback" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/22-gpu-mc-heightmap-fallback/" target="_blank">Open Spike 22 in a new tab ↗</a> · <a href="/blog/spike-source?spike=22-gpu-mc-heightmap-fallback">View source</a></p>
<p>This chapter was the steep drop of the roller coaster. Frustrating and productive at the same time. Many of the individual fixes were small, sometimes a single line changing a comparison operator or an offset. But the understanding they produced about how LOD transitions, buffer management, and draw ranges interact wasn't small at all.</p>
<p>In part 11 we cover the stabilization layer that came after the chaos: policy-based chunk modes and the transition from reactive bug-fixing to explicit system rules.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Dual-LOD marching cubes.</strong> Running marching cubes at two resolution levels simultaneously, with transition cells stitching the boundary. The challenge is that a single chunk's neighbors can be at different resolutions on different faces, requiring independent transition cell generation per face. Each face's transition cells are appended to the vertex buffer without overwriting the others. Atomic counters track the total active vertex count across all faces.</p>
<p><strong>Winding order.</strong> The vertex order within each triangle determines which side is the &quot;front&quot; face. Consistent winding (typically counter-clockwise when viewed from outside) is required for backface culling. When transition cells emit triangles, the winding must match the main mesh's convention. Getting it backwards causes backface culling to eat valid seam triangles, which looks like missing surfaces from certain camera angles. A common debugging technique is toggling <code>side: THREE.DoubleSide</code> on the material to confirm whether artifacts are winding issues or genuine topology gaps.</p>
<p><strong>Heightmap-to-MC fallback.</strong> A hybrid chunk mode where far or unedited chunks use heightmap terrain (cheap, flat surface) while near or edited chunks use marching cubes (volumetric, supports caves). The fallback decision depends on distance from camera and whether the chunk contains SDF edits. The seam between a heightmap chunk and an MC chunk requires its own transition geometry, similar to Transvoxel but bridging two different representations rather than two LOD levels. See <a href="/guides/landscape-generation-browser#hybrid-heightmap-base--volumetric-overlays">hybrid heightmap + volumetric overlays</a>.</p>
<p><strong>Draw range and atomic counters.</strong> In GPU-driven mesh generation, the compute shader writes vertices into a buffer and increments an atomic counter to track how many vertices were emitted. The draw call must use this counter as the vertex count rather than the buffer capacity. If the draw range isn't clipped to the active count, stale vertices from previous frames (still living in the buffer tail) produce ghost geometry: thin slivers and flickering triangles that look like topology errors but are actually rendering artifacts from reading past valid data.</p>
<hr>
<p>Part 10 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut">Part 9 - Transvoxel started with a scaffold</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-11-policy-modes">Part 11 - Policy mode, not hardcoded mode</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 11: Policy mode, not hardcoded mode]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-11-policy-modes</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-11-policy-modes</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 23 shifted us from reactive fixes to explicit policy. Distance-driven LOD, edit-driven HM/MC switching, and better seam debugging controls.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 11: Policy mode, not hardcoded mode</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>After the seam chaos chapter, we needed to stop reacting and start governing.</p>
<p>Spike 23 replaced ad-hoc behavior with explicit policy rules. Instead of chunks doing whatever their local state suggested, a central policy system now made the decisions. The system decided which LOD level each chunk got, whether it was rendered as heightmap or marching cubes, and whether it needed transition cells and on which faces. The answers came from a policy function that evaluated distance to camera, edit history, and neighbor resolution states.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/23-policy-chunk-modes/" title="Spike 23 Policy Chunk Modes" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/23-policy-chunk-modes/" target="_blank">Open Spike 23 in a new tab ↗</a> · <a href="/blog/spike-source?spike=23-policy-chunk-modes">View source</a></p>
<p>The distance-based LOD assignment used concentric rings around the camera, similar to the clipmap concept but applied to the chunk grid. Ring 0 chunks get full-resolution MC. Ring 1 gets half-resolution MC. Ring 2 and beyond get heightmap mode. The adjacency constraint was critical: for any two neighboring chunks we require $|L_i - L_j| \le 1$. The resolution ratio across a face is $2^{|L_i - L_j|}$, and the Transvoxel transition tables are defined for the 2:1 case only ($|L_i - L_j| = 1$). A jump of 2 levels would need a 4:1 transition the tables can't express, so the policy forces the lower-detail chunk to upgrade until the constraint holds.</p>
<p>The HM/MC switching logic checked each chunk's edit bitmap. If a chunk had any volumetric edits (caves, tunnels, terrain sculpts), it stayed in MC mode regardless of distance. Unedited chunks could drop to heightmap mode when they moved far enough away. This hybrid approach gave us volumetric freedom where it mattered and efficiency where it didn't.</p>
<p>This spike looked smaller from the outside than some earlier ones. In practice it was a major quality-of-life improvement for development.</p>
<p>When your system can explain why a chunk switched mode, you spend less time guessing. We added color-coded overlays: green for heightmap chunks, blue for MC chunks, orange for transition-active faces. When seam visibility has dedicated render controls, visual debugging ambiguity drops. When draw ranges are explicitly tied to active vertex counts from the policy system, stale geometry ghosts stop wasting your afternoon.</p>
<p>We also overhauled camera behavior in this spike. Earlier spikes had simple orbit controls fine for screenshots but useless for reproducing bugs. Spike 23 added WASD fly camera with configurable speed, altitude lock toggle, and position readout. That sounds minor. It meant the difference between &quot;I saw a bug somewhere near that ridge&quot; and &quot;the bug appears at position (142, 12, -67) facing northwest.&quot;</p>
<p>The key insight from this chapter is that policy didn't reduce complexity. It organized complexity. The same number of edge cases existed. But now each edge case had a name, a trigger condition, and a place in the code where you could set a breakpoint. That's a different kind of win, and it's what determines whether a system can keep evolving or collapses under its own weight.</p>
<p>By the end of Spike 23, we had a near-field behavior layer that was predictable enough to connect to a far-field clipmap ring strategy without constant fear of interaction bugs.</p>
<p>In part 12 we cover Spike 24, where ring transitions, skybox fog, and Three.js version-level shader integration close out this chapter of the project.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Distance-based LOD policy.</strong> A central function that assigns LOD level and rendering mode to each chunk based on distance to camera, edit history, and neighbor states. Concentric distance rings determine the base LOD: ring 0 = full-res MC, ring 1 = half-res MC, ring 2+ = heightmap mode. The policy function runs per frame as the camera moves and triggers chunk transitions. This replaces ad-hoc per-chunk decisions with a predictable, debuggable rule system. See <a href="/guides/landscape-generation-browser#gpu-driven-lod-with-webgpu">GPU-driven LOD selection</a> for the compute shader equivalent.</p>
<p><strong>Adjacency constraints.</strong> The Transvoxel algorithm handles 2:1 resolution ratios only. If two neighboring chunks differ by more than one LOD level (e.g., LOD 0 next to LOD 2), the transition tables can't produce valid seam geometry. The policy system enforces this by upgrading the lower-detail chunk when the LOD difference exceeds 1. This constraint propagation can cascade: upgrading one chunk may force its neighbors to upgrade as well. The implementation is a simple iterative pass that converges in 2-3 iterations for typical grid configurations.</p>
<p><strong>Edit bitmap for mode selection.</strong> Each chunk maintains a bitmap recording whether it contains volumetric SDF edits (caves, tunnels, sculpts). Chunks with any edits stay in marching cubes mode regardless of distance, preserving the creator's modifications. Unedited chunks drop to heightmap mode when far enough from the camera, saving compute and memory. The bitmap is a single flag per chunk but can be extended to track edit density for more granular mode decisions.</p>
<p><strong>Debug visualization overlays.</strong> Color-coded chunk rendering where green = heightmap mode, blue = MC mode, orange = transition-active faces. Per-chunk overlays with LOD level numbers, mode labels, and wireframe toggles. These are development tools rather than shipped features, but they pay for themselves repeatedly when debugging LOD transitions and seam artifacts. Combined with a WASD fly camera that reports exact world position, they turn &quot;I saw a bug somewhere&quot; into &quot;the bug appears at (142, 12, -67) with this LOD configuration.&quot;</p>
<hr>
<p>Part 11 of 12.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-10-seam-chaos">Part 10 - Seam chaos and the corner boss fight</a><br>
Next: <a href="/blog/2026-02-25-open-world-browser-part-12-lessons">Part 12 - Rings, sky fog, and what we would do again</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an open world in the browser, part 12: Rings, sky fog, and what we would do again]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-12-lessons</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-part-12-lessons</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Spike 24 closed this chapter with clipmap ring transitions, skybox fog integration, and one long list of hard-earned lessons.]]></description>
            <content:encoded><![CDATA[<h1>Building an open world in the browser, part 12: Rings, sky fog, and what we would do again</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>If you're new, start with the <a href="/blog/2026-02-25-open-world-browser-series-guide">series guide</a>. It explains what a spike is and links all parts.</p>
<p>Spike 24 was supposed to be &quot;add clipmap rings to the terrain.&quot; It became a full finale that touched rendering, shaders, module infrastructure, and visual integration all at once.</p>
<p>The core terrain task was generating concentric clipmap rings in the vertex shader. Each ring is a flat grid mesh centered on the camera, with vertices displaced by heightmap samples. The inner ring uses full resolution. Each subsequent ring doubles the vertex spacing and covers a larger area. The tricky part is the boundary between rings: where a high-resolution ring meets a low-resolution ring, edge vertices on the finer mesh need to snap to the midpoint of the coarser mesh's edge. We did 2:1 edge morphing by detecting boundary vertices (those whose grid coordinate is odd along the ring edge) and snapping their height to the midpoint of their two even neighbors, $h = \tfrac{1}{2}(h_\text{left} + h_\text{right})$. That's exactly the point the coarse ring's single edge would sit at, so the fine and coarse edges describe the same line. This produces watertight seams without transition geometry.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0;border:1px solid rgba(255,255,255,0.12)">
<iframe src="/spikes/24-gpu-clipmap-rings/" title="Spike 24 Clipmap Rings and Sky Fog" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;background:#000" loading="lazy" allowfullscreen></iframe>
</div>
<p><a href="/spikes/24-gpu-clipmap-rings/" target="_blank">Open Spike 24 in a new tab ↗</a> · <a href="/blog/spike-source?spike=24-gpu-clipmap-rings">View source</a></p>
<p>Then came the fog and sky integration. We wanted distant terrain to fade into the actual sky color rather than a flat constant. That meant the fog shader needed to know what color the sky would be in the direction of each fragment. We loaded an equirectangular HDR skybox texture and sampled it in the fragment shader using the view direction from camera to fragment, converted to equirectangular UV coordinates via TSL's <code>equirectUV</code> node. The fog factor was distance-based using <code>positionView.z.negate()</code> for camera-space depth, blended with <code>smoothstep</code> between a near and far distance.</p>
<p>Module wiring turned out to be more annoying than any of the geometry. We upgraded to Three.js 0.183.1, which restructured the build outputs. The <code>three/tsl</code> import needed to resolve to <code>three.tsl.js</code>, and TSL internally imported <code>three/webgpu</code> as a bare specifier. Both mappings had to be explicit in the HTML import map. Missing either one produced cryptic &quot;does not provide an export&quot; or &quot;failed to resolve module specifier&quot; errors with no indication of which mapping was wrong. Once both were in the import map, the shader graph loaded correctly.</p>
<p>We also had a skybox orientation issue where the texture rendered upside down. The fix was <code>flipY = true</code> on the equirectangular texture, which is the Three.js default for loaded textures but was set to <code>false</code> in our initial code.</p>
<p>The original fog implementation sampled the sky at a near-constant direction, producing a thin horizon-colored band instead of a natural gradient. The fix was computing the actual camera-to-fragment world direction per pixel using <code>positionWorld.sub(cameraPosition).normalize()</code> and passing that into <code>equirectUV</code> for the fog color lookup. This made terrain fragments fade into the sky color that's actually behind them, which looks correct from any camera angle.</p>
<p>Underneath all the individual fixes, the core outcome held. We now have a terrain system that combines near-field volumetric editing (marching cubes with Transvoxel seams), mid-field heightmap chunks, and far-field clipmap rings, all governed by a policy layer that decides mode, LOD, and transition behavior.</p>
<p>If I had to name the patterns I'd repeat on the next project, they'd be these:</p>
<p>Start with risk spikes before feature work. Spike 1 killed the &quot;can we even render fast enough&quot; question before we invested in content pipelines.</p>
<p>Freeze known-good baselines before integration jumps. Spikes 13 and 14 saved us days of bisecting regressions.</p>
<p>Force policy and observability before optimization marathons. Spike 23 turned mystery bugs into named conditions with trigger rules.</p>
<p>Test under motion rather than with screenshots. Clipmap pops, seam flicker, and streaming hitches all hide in still frames.</p>
<p>Measure frame-time cost per feature rather than average FPS. Averages hide the spikes that users actually feel.</p>
<p>And publish the messy parts. The wrong turns, the stale-buffer ghost hunts, the two days blaming transition logic when the draw range was wrong. Those are the parts people can actually learn from.</p>
<h2>External reality check: Vuntra City devlogs</h2>
<p>After finishing this series, we reviewed the <code>@VuntraCity</code> devlogs as an external implementation check against our own open-world assumptions. It's a native UE5 project rather than a browser stack, but the system patterns map well enough that the comparison is useful.</p>
<p>The first signal is that traversal speed has to be treated as a streaming control as well as gameplay. In Vuntra City, high-speed transit is intentionally routed above most interiors, and detail range scales with movement speed to avoid spawn churn and stalls (<a href="https://www.youtube.com/watch?v=KKeBElJS6-M">transport system</a>, <a href="https://www.youtube.com/watch?v=aPuYXyJet38">performance techniques</a>). That matches our policy-layer direction: movement mode should directly influence chunk radius, interior activation, and allowed work per frame.</p>
<p>The second signal is architecture. Their maps and address system required separating world topology from rendered objects so global queries can run for unloaded regions (<a href="https://www.youtube.com/watch?v=6dLn1GQpu2c">maps and addresses</a>). That's the same separation we need in browser for world search, quest routing, moderation scans, and POI indexing without forcing render-bound data paths.</p>
<p>The third signal is simulation tiering. Their million-NPC design keeps coarse schedule state cheap and global, then spends expensive behavior budget only near the player (<a href="https://www.youtube.com/watch?v=nBV0yAAJUf0">million-NPC overview</a>, <a href="https://www.youtube.com/watch?v=eUi7DB1ar3s">system deep dive</a>). That reinforces our own AOI-first simulation model, where near-field fidelity and far-field determinism are separate concerns with separate budgets.</p>
<p>And the fourth signal is design quality rather than raw scale. Their strongest exploration moments come from weighted distributions, rare outliers, and diegetic navigation clues instead of constant UI overlays (<a href="https://www.youtube.com/watch?v=4MZ5-KQW3pc">procedural environment notes</a>, <a href="https://www.youtube.com/watch?v=ixR1hqZJlv4">no minimap loop</a>). For us, this is a reminder that technical systems should be tuned to produce discoverable variation rather than just maximal throughput.</p>
<h2>Technology referenced in this chapter</h2>
<p><strong>Clipmap ring geometry.</strong> Each ring is a flat grid mesh centered on the camera with vertices displaced by heightmap samples. The inner ring uses full resolution. Each subsequent ring doubles vertex spacing and covers a larger area. The tricky part is the boundary: where a high-res ring meets a low-res ring, edge vertices on the finer mesh snap to the midpoint of the coarser mesh's edge. The technique originates from Losasso and Hoppe's SIGGRAPH 2004 paper (<a href="https://hhoppe.com/geomclipmap.pdf">PDF</a>) and is detailed in <a href="https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-2-terrain-rendering-using-gpu-based-geometry">GPU Gems 2, Chapter 2</a>. See our <a href="/guides/landscape-generation-browser#geometry-clipmaps">landscape guide on geometry clipmaps</a>.</p>
<p><strong>2:1 edge morphing.</strong> At the boundary between two clipmap rings, the finer ring has vertices at positions the coarser ring doesn't share. Boundary vertices whose grid coordinate is odd along the ring edge are detected and their height is interpolated between the two neighboring even vertices. This produces watertight seams without dedicated transition geometry. The interpolation runs in the vertex shader: <code>morphedHeight = mix(heightLeft, heightRight, 0.5)</code> for boundary vertices, using the same geomorphing framework described in <a href="/guides/landscape-generation-browser#geomorphing-pop-free-lod-transitions">our guide</a>.</p>
<p><strong>Equirectangular skybox mapping.</strong> A single 2D image that maps the full sphere of sky directions using longitude-latitude projection. The horizontal axis covers 0-360 degrees, the vertical axis covers 0-180 degrees. A normalized view direction $\hat{d} = (d_x, d_y, d_z)$ converts to UV coordinates by reading off its longitude and latitude:</p>
<p>$$
u = \frac{1}{2} + \frac{\operatorname{atan2}(d_z,, d_x)}{2\pi}, \qquad v = \frac{1}{2} - \frac{\arcsin(d_y)}{\pi}
$$</p>
<p>In Three.js, setting <code>texture.mapping = EquirectangularReflectionMapping</code> with <code>SRGBColorSpace</code> enables this as a scene background. In TSL, <code>equirectUV(direction)</code> applies that same conversion, turning a 3D view direction into the 2D UV coordinates for sampling the texture.</p>
<p><strong>Per-fragment fog color from sky.</strong> Standard fog blends fragments toward a single constant color. For a scene with a detailed skybox, this looks wrong because the sky color varies by direction. The fix is to compute the camera-to-fragment world direction per pixel (<code>positionWorld.sub(cameraPosition).normalize()</code>) and sample the skybox at that direction for the fog color. Each fragment fades toward the sky color that's actually behind it, producing correct blending from any camera angle. The fog factor uses <code>smoothstep(nearDist, farDist, viewDepth)</code> with <code>positionView.z.negate()</code> for camera-space depth.</p>
<p><strong>Import maps for ES modules.</strong> A browser-native mechanism (<code>&lt;script type=&quot;importmap&quot;&gt;</code>) that maps bare module specifiers (like <code>three/tsl</code>) to actual URLs. When Three.js 0.183.1 restructured its build outputs, <code>three/tsl</code> needed to resolve to <code>three.tsl.js</code> and TSL internally imported <code>three/webgpu</code> as a bare specifier. Both mappings had to be explicit in the import map, or the browser produced &quot;does not provide an export&quot; or &quot;failed to resolve module specifier&quot; errors.</p>
<h2>Further reading</h2>
<p>For deeper coverage of the technologies used throughout this series, see our companion guides:</p>
<ul>
<li><a href="/guides/landscape-generation-browser">Landscape Generation with Dynamic LOD and Streaming for Browser Open Worlds</a> covers heightmaps, SDFs, marching cubes, Transvoxel, geometry clipmaps, geomorphing, streaming architecture, terrain materials, and vegetation rendering.</li>
<li><a href="/guides/browser-3d-open-world-tech">Browser 3D Open World Tech for Multiplayer Creator Worlds</a> covers rendering stacks, WebGPU, physics, networking, multiplayer architecture, and lessons from Skyrim, The Witcher 3, Breath of the Wild, and GTA V.</li>
</ul>
<p>Thank you for following this twelve-part ride.</p>
<p>Part 1: <a href="/blog/2026-02-25-open-world-browser-part-01-risk-first">We started by trying to break it</a><br>
Part 2: <a href="/blog/2026-02-25-open-world-browser-part-02-worker-physics">Worker physics and the input lag fear</a><br>
Part 3: <a href="/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes">The unflashy spikes that saved us</a><br>
Part 4: <a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">Streaming before fancy terrain</a><br>
Part 5: <a href="/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty">Budgeting the pretty stuff</a><br>
Part 6: <a href="/blog/2026-02-25-open-world-browser-part-06-clipmaps">Clipmaps changed the plot</a><br>
Part 7: <a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Marching cubes and the first real caves</a><br>
Part 8: <a href="/blog/2026-02-25-open-world-browser-part-08-webgpu-integration">Integration without losing our baseline</a><br>
Part 9: <a href="/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut">Transvoxel started with a scaffold</a><br>
Part 10: <a href="/blog/2026-02-25-open-world-browser-part-10-seam-chaos">Seam chaos and the corner boss fight</a><br>
Part 11: <a href="/blog/2026-02-25-open-world-browser-part-11-policy-modes">Policy mode, not hardcoded mode</a></p>
<hr>
<p>Part 12 of 14.<br>
Previous: <a href="/blog/2026-02-25-open-world-browser-part-11-policy-modes">Part 11 - Policy mode, not hardcoded mode</a><br>
Next: <a href="/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting">Part 13 - Terrain sculpting and the death of the math function</a><br>
Series guide: <a href="/blog/2026-02-25-open-world-browser-series-guide">/blog/2026-02-25-open-world-browser-series-guide</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open world in browser series guide]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Reading order for the 29-part open world browser series, plus a plain-English spike glossary and live demo map.]]></description>
            <content:encoded><![CDATA[<h1>Open world in browser series guide</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>This page is the navigation hub for the full series.</p>
<p>If you arrived from one random part, start here.</p>
<p>March 2026 update: we added an external implementation cross-check from the Vuntra City devlogs in <a href="/blog/2026-02-25-open-world-browser-part-12-lessons">Part 12</a> and expanded the companion <a href="/guides/browser-3d-open-world-tech">browser open world tech guide</a> with the same findings.</p>
<p>April 2026 update: Parts 13-14 cover terrain sculpting (Spikes 25-27) and the visual/gameplay layer: multi-material texturing, instanced vegetation, and a character controller with HM+SDF collision (Spikes 28-30).</p>
<p>May 2026 update: the series ran to 29 parts. Parts 15-29 cover the long middle of the build, multiplayer terrain and water, a code-structure refactor, animations and AI scattering, imposters and parallax, the visibility buffer that didn't pay off, clouds and meshlet culling, batched avatars and proximity voice, world persistence and GPU wind, universal characters, three takes on water, a procedural island, grass and occlusion, and a pluggable character controller that drives any body (Spikes 31-60).</p>
<p>June 2026 update: Part 30 adds a collision-aware camera, a spring-arm boom with a pluggable collider contract and a signed-distance probe that stops the view against overhangs and cave ceilings as well as hills.</p>
<h2>What &quot;spike&quot; means in this series</h2>
<p>A spike is a short, focused experiment.</p>
<p>Each spike tests one risky question. We keep scope tight, measure what matters, and decide what to do next. It's a learning instrument rather than a polished feature.</p>
<p>In this project, spikes are mostly standalone pages under <code>/spikes/*</code> that you can run live.</p>
<h2>Read the series in order</h2>
<ol>
<li><a href="/blog/2026-02-25-open-world-browser-part-01-risk-first">Part 1: We started by trying to break it</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-02-worker-physics">Part 2: Worker physics and the input lag fear</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-03-the-unflashy-spikes">Part 3: The unflashy spikes that saved us</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-04-streaming-before-fancy">Part 4: Streaming before fancy terrain</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-05-budgeting-the-pretty">Part 5: Budgeting the pretty stuff</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-06-clipmaps">Part 6: Clipmaps changed the plot</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-07-marching-cubes">Part 7: Marching cubes and the first real caves</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-08-webgpu-integration">Part 8: Integration without losing our baseline</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-09-transvoxel-first-cut">Part 9: Transvoxel started with a scaffold</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-10-seam-chaos">Part 10: Seam chaos and the corner boss fight</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-11-policy-modes">Part 11: Policy mode, not hardcoded mode</a></li>
<li><a href="/blog/2026-02-25-open-world-browser-part-12-lessons">Part 12: Rings, sky fog, and what we would do again</a></li>
<li><a href="/blog/2026-04-13-open-world-browser-part-13-terrain-sculpting">Part 13: Terrain sculpting and the death of the math function</a></li>
<li><a href="/blog/2026-04-13-open-world-browser-part-14-world-comes-alive">Part 14: The world comes alive</a></li>
<li><a href="/blog/2026-04-13-open-world-browser-part-15-multiplayer-and-water">Part 15: Replace the baseline, then sync it</a></li>
<li><a href="/blog/2026-04-28-open-world-browser-part-16-structure-and-authoring">Part 16: Structure for a world that keeps growing</a></li>
<li><a href="/blog/2026-05-01-open-world-browser-part-17-animations-and-search">Part 17: Animations that didn't need retargeting, and a live asset search</a></li>
<li><a href="/blog/2026-05-02-open-world-browser-part-18-ai-scattering">Part 18: A scatter brush that feels AI-placed</a></li>
<li><a href="/blog/2026-05-04-open-world-browser-part-19-imposters">Part 19: The imposter that has to survive a forest</a></li>
<li><a href="/blog/2026-05-05-open-world-browser-part-20-parallax-occlusion">Part 20: Faking depth on a flat plane</a></li>
<li><a href="/blog/2026-05-06-open-world-browser-part-21-visibility-buffer">Part 21: A faster renderer that wasn't faster</a></li>
<li><a href="/blog/2026-05-07-open-world-browser-part-22-clouds-and-meshlets">Part 22: Clouds you can light, and culling that has to be fed</a></li>
<li><a href="/blog/2026-05-08-open-world-browser-part-23-avatars-and-voice">Part 23: Fifty avatars and a voice in the room</a></li>
<li><a href="/blog/2026-05-09-open-world-browser-part-24-persistence-and-wind">Part 24: Saving a world, and wind you can see</a></li>
<li><a href="/blog/2026-05-10-open-world-browser-part-25-universal-characters">Part 25: One skeleton, every outfit</a></li>
<li><a href="/blog/2026-05-12-open-world-browser-part-26-water">Part 26: Three ways to make water</a></li>
<li><a href="/blog/2026-05-13-open-world-browser-part-27-island-and-terrain">Part 27: An island from noise, ground that looks like ground</a></li>
<li><a href="/blog/2026-05-14-open-world-browser-part-28-grass-and-occlusion">Part 28: Grass to the horizon, and ground that hides itself</a></li>
<li><a href="/blog/2026-05-15-open-world-browser-part-29-pluggable-character">Part 29: One controller, any body</a></li>
<li><a href="/blog/2026-06-04-open-world-browser-part-30-collision-aware-camera">Part 30: A camera that respects walls</a></li>
</ol>
<h2>Live spike map</h2>
<p>Start with these if you want to click through the technical timeline directly.</p>
<p><a href="/spikes/01-terrain/" target="_blank">Spike 1</a> terrain and instancing · <a href="/blog/spike-source?spike=01-terrain">source</a><br>
<a href="/spikes/02-rapier-worker/" target="_blank">Spike 2</a> worker physics · <a href="/blog/spike-source?spike=02-rapier-worker">source</a><br>
Spike 3 Durable Object broadcast load test ran as a service script, not a standalone page<br>
Spike 4 mobile quality constraints, tested via Spike 1 query param<br>
Spike 5 LLM behavior reliability, ran as a script, not a standalone page<br>
<a href="/spikes/06-chunk-streaming/" target="_blank">Spike 6</a> chunk load and swap · <a href="/blog/spike-source?spike=06-chunk-streaming">source</a><br>
<a href="/spikes/07-gpu-vegetation/" target="_blank">Spike 7</a> vegetation from density maps · <a href="/blog/spike-source?spike=07-gpu-vegetation">source</a><br>
<a href="/spikes/08-terrain-material/" target="_blank">Spike 8</a> terrain material cost · <a href="/blog/spike-source?spike=08-terrain-material">source</a><br>
<a href="/spikes/09-csm-shadows/" target="_blank">Spike 9</a> cascaded shadows budget · <a href="/blog/spike-source?spike=09-csm-shadows">source</a><br>
<a href="/spikes/10-clipmap-geomorph/" target="_blank">Spike 10</a> clipmaps and geomorphing · <a href="/blog/spike-source?spike=10-clipmap-geomorph">source</a><br>
<a href="/spikes/11-chunk-streaming/" target="_blank">Spike 11</a> heightmap chunk streaming · <a href="/blog/spike-source?spike=11-chunk-streaming">source</a><br>
<a href="/spikes/12-webgpu-marching-cubes/" target="_blank">Spike 12</a> WebGPU marching cubes · <a href="/blog/spike-source?spike=12-webgpu-marching-cubes">source</a><br>
<a href="/spikes/13-threejs-webgpu/" target="_blank">Spike 13</a> WebGPU integration baseline · <a href="/blog/spike-source?spike=13-threejs-webgpu">source</a><br>
<a href="/spikes/14-threejs-webgpu-incremental/" target="_blank">Spike 14</a> incremental hardening · <a href="/blog/spike-source?spike=14-threejs-webgpu-incremental">source</a><br>
<a href="/spikes/15-transvoxel-seam/" target="_blank">Spike 15</a> seam scaffold · <a href="/blog/spike-source?spike=15-transvoxel-seam">source</a><br>
<a href="/spikes/16-transvoxel-face/" target="_blank">Spike 16</a> first Transvoxel face · <a href="/blog/spike-source?spike=16-transvoxel-face">source</a><br>
<a href="/spikes/17-dual-mc-lod/" target="_blank">Spike 17</a> dual MC LOD · <a href="/blog/spike-source?spike=17-dual-mc-lod">source</a><br>
<a href="/spikes/18-transvoxel-heightmap-seam/" target="_blank">Spike 18</a> heightmap seam · <a href="/blog/spike-source?spike=18-transvoxel-heightmap-seam">source</a><br>
<a href="/spikes/19-transvoxel-corner-grid/" target="_blank">Spike 19</a> mixed-resolution corner · <a href="/blog/spike-source?spike=19-transvoxel-corner-grid">source</a><br>
<a href="/spikes/20-gpu-transvoxel-corner/" target="_blank">Spike 20</a> GPU corner seam · <a href="/blog/spike-source?spike=20-gpu-transvoxel-corner">source</a><br>
<a href="/spikes/21-gpu-mc-transvoxel-corner/" target="_blank">Spike 21</a> GPU MC corner seam · <a href="/blog/spike-source?spike=21-gpu-mc-transvoxel-corner">source</a><br>
<a href="/spikes/22-gpu-mc-heightmap-fallback/" target="_blank">Spike 22</a> MC to HM fallback · <a href="/blog/spike-source?spike=22-gpu-mc-heightmap-fallback">source</a><br>
<a href="/spikes/23-policy-chunk-modes/" target="_blank">Spike 23</a> policy-based chunk modes · <a href="/blog/spike-source?spike=23-policy-chunk-modes">source</a><br>
<a href="/spikes/24-gpu-clipmap-rings/" target="_blank">Spike 24</a> clipmap rings and sky fog · <a href="/blog/spike-source?spike=24-gpu-clipmap-rings">source</a><br>
<a href="/spikes/25-heightmap-brush/" target="_blank">Spike 25</a> heightmap brush on sampled data · <a href="/blog/spike-source?spike=25-heightmap-brush">source</a><br>
<a href="/spikes/26-sdf-brush/" target="_blank">Spike 26</a> SDF brush via GPU compute · <a href="/blog/spike-source?spike=26-sdf-brush">source</a><br>
<a href="/spikes/27-hm-mc-brush/" target="_blank">Spike 27</a> HM + MC + brush integration · <a href="/blog/spike-source?spike=27-hm-mc-brush">source</a><br>
<a href="/spikes/28-multi-material/" target="_blank">Spike 28</a> multi-material texturing · <a href="/blog/spike-source?spike=28-multi-material">source</a><br>
<a href="/spikes/29-vegetation/" target="_blank">Spike 29</a> vegetation and shader grass · <a href="/blog/spike-source?spike=29-vegetation">source</a><br>
<a href="/spikes/30-physics/" target="_blank">Spike 30</a> terrain physics and character controller · <a href="/blog/spike-source?spike=30-physics">source</a><br>
<a href="/spikes/31-multiplayer-sync/" target="_blank">Spike 31</a> multiplayer terrain sync · <a href="/blog/spike-source?spike=31-multiplayer-sync">source</a><br>
<a href="/spikes/32-water-swimming/" target="_blank">Spike 32</a> water and swimming · <a href="/blog/spike-source?spike=32-water-swimming">source</a><br>
<a href="/spikes/33-code-structure/" target="_blank">Spike 33</a> code structure refactor · <a href="/blog/spike-source?spike=33-code-structure">source</a><br>
<a href="/spikes/34-world-authoring/" target="_blank">Spike 34</a> in-world authoring · <a href="/blog/spike-source?spike=34-world-authoring">source</a><br>
<a href="/spikes/35-combat-animations/" target="_blank">Spike 35</a> combat animations and retargeting · <a href="/blog/spike-source?spike=35-combat-animations">source</a><br>
<a href="/spikes/36-polyhaven-models/" target="_blank">Spike 36</a> live Poly Haven asset search · <a href="/blog/spike-source?spike=36-polyhaven-models">source</a><br>
<a href="/spikes/37-ai-scattering/" target="_blank">Spike 37</a> AI-assisted prop scattering · <a href="/blog/spike-source?spike=37-ai-scattering">source</a><br>
<a href="/spikes/38-imposters/" target="_blank">Spike 38</a> octahedral imposters · <a href="/blog/spike-source?spike=38-imposters">source</a><br>
<a href="/spikes/39-parallax-pom/" target="_blank">Spike 39</a> parallax occlusion mapping · <a href="/blog/spike-source?spike=39-parallax-pom">source</a><br>
<a href="/spikes/40-visibility-buffer/" target="_blank">Spike 40</a> visibility buffer renderer · <a href="/blog/spike-source?spike=40-visibility-buffer">source</a><br>
<a href="/spikes/41-imposter-forest/" target="_blank">Spike 41</a> imposters in a forest · <a href="/blog/spike-source?spike=41-imposter-forest">source</a><br>
<a href="/spikes/42-imposter-flicker/" target="_blank">Spike 42</a> imposter flicker fix · <a href="/blog/spike-source?spike=42-imposter-flicker">source</a><br>
<a href="/spikes/43-clouds-atmosphere/" target="_blank">Spike 43</a> atmosphere and volumetric clouds · <a href="/blog/spike-source?spike=43-clouds-atmosphere">source</a><br>
<a href="/spikes/44-meshlet-clusters/" target="_blank">Spike 44</a> meshlet Hi-Z culling · <a href="/blog/spike-source?spike=44-meshlet-clusters">source</a><br>
<a href="/spikes/45-avatar-network-sync/" target="_blank">Spike 45</a> batched avatar skinning and network sync · <a href="/blog/spike-source?spike=45-avatar-network-sync">source</a><br>
<a href="/spikes/46-proximity-voice/" target="_blank">Spike 46</a> proximity voice chat · <a href="/blog/spike-source?spike=46-proximity-voice">source</a><br>
<a href="/spikes/47-world-persistence/" target="_blank">Spike 47</a> server-authoritative world persistence · <a href="/blog/spike-source?spike=47-world-persistence">source</a><br>
Spike 48 avatar rig integration, reused as shared code by later spikes (no standalone page)<br>
<a href="/spikes/49-gpu-wind-props/" target="_blank">Spike 49</a> GPU wind on props and foliage · <a href="/blog/spike-source?spike=49-gpu-wind-props">source</a><br>
<a href="/spikes/50-universal-characters/" target="_blank">Spike 50</a> universal characters and wearables · <a href="/blog/spike-source?spike=50-universal-characters">source</a><br>
<a href="/spikes/51-water-ssr-caustics/" target="_blank">Spike 51</a> screen-space reflection water · <a href="/blog/spike-source?spike=51-water-ssr-caustics">source</a><br>
<a href="/spikes/52-water-planar/" target="_blank">Spike 52</a> planar mirror water · <a href="/blog/spike-source?spike=52-water-planar">source</a><br>
<a href="/spikes/53-water-pro/" target="_blank">Spike 53</a> production water library · <a href="/blog/spike-source?spike=53-water-pro">source</a><br>
<a href="/spikes/54-procgen-island/" target="_blank">Spike 54</a> procedural island generation · <a href="/blog/spike-source?spike=54-procgen-island">source</a><br>
<a href="/spikes/55-terrain-shading/" target="_blank">Spike 55</a> terrain shading and tiling breakup · <a href="/blog/spike-source?spike=55-terrain-shading">source</a><br>
<a href="/spikes/56-grass/" target="_blank">Spike 56</a> GPU cross-quad grass · <a href="/blog/spike-source?spike=56-grass">source</a><br>
<a href="/spikes/57-terrain-occlusion/" target="_blank">Spike 57</a> terrain occlusion culling · <a href="/blog/spike-source?spike=57-terrain-occlusion">source</a><br>
<a href="/spikes/58-pluggable-character/" target="_blank">Spike 58</a> pluggable character controller · <a href="/blog/spike-source?spike=58-pluggable-character">source</a><br>
<a href="/spikes/59-pluggable-with-avatar/" target="_blank">Spike 59</a> controller with a real avatar · <a href="/blog/spike-source?spike=59-pluggable-with-avatar">source</a><br>
<a href="/spikes/60-polygon-animations/" target="_blank">Spike 60</a> Synty polygon animations · <a href="/blog/spike-source?spike=60-polygon-animations">source</a></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2026-02-25-open-world-browser-series-medium]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-medium</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-medium</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[]]></description>
            <content:encoded><![CDATA[<h1>What It Actually Takes to Build an Open World in a Browser</h1>
<p>A small team at Cinevva just published one of the most transparent engineering journals in recent game-dev memory: a 12-part series documenting their attempt to build a multiplayer open world that runs entirely in the browser. No download. No app store. Just a URL.</p>
<p>The project spanned 24 technical experiments they call &quot;spikes&quot; -- short, focused prototypes designed to answer one risky question each. Every spike shipped with live source code you can open and run in your browser right now. The series was written by Oleg Sidorkin, CTO and co-founder of Cinevva, and it reads less like marketing and more like a field journal from the frontlines of what browsers can actually do in 2026.</p>
<p>What makes the series worth reading -- even if you never plan to build terrain systems -- is the method underneath. It's a case study in how to de-risk an ambitious project before you've committed to anything expensive.</p>
<h2>Starting with the hardest question first</h2>
<p>Most open-world projects die in a predictable sequence. First you get a beautiful concept. Then a pretty scene. Then you discover that your frame budget was already spent before gameplay existed.</p>
<p>Cinevva's team inverted the order. Their first spike was deliberately ugly: a 512-meter terrain mesh, 500 instanced objects, procedural height noise, a water plane, and fog. No shadows, no beauty pass. The only question was whether a browser could hold a stable frame rate while the camera moved through it.</p>
<p>It could. And that &quot;yes&quot; established something Sidorkin calls a &quot;baseline contract&quot; -- a measured reference cost for a minimal scene that every subsequent feature had to justify itself against. If a new effect looked great but blew the frame budget, it didn't ship. Not yet, anyway.</p>
<p>That kind of discipline sounds obvious. In practice, it's rare in fast-moving prototype environments where everyone is excited about the next visual win.</p>
<h2>The physics gamble</h2>
<p>The second experiment tackled an architectural debate that divides browser game developers: should physics run on the main thread, where it's simpler, or in a Web Worker, where it can't block rendering?</p>
<p>Worker-based physics is cleaner on paper. In practice, the fear is latency. Every input event has to cross a message boundary twice: once to reach the worker, once to bring back the result. If that round trip is too slow, pressing a key and seeing your character move will feel sluggish.</p>
<p>Sidorkin's team integrated the Rapier physics engine (compiled from Rust to WebAssembly) in a dedicated worker, wired up the message pipeline, and measured. The overhead was negligible. Controls still felt immediate. But the team was careful to note that they'd validated one specific scenario, not a universal rule. When GPU pressure and streaming complexity changed later, assumptions would need rechecking.</p>
<h2>The boring spikes that saved the project</h2>
<p>Part three of the series has no screenshots. It covers three experiments that looked unglamorous but carried product-level consequences.</p>
<p>The first tested whether Cloudflare Durable Objects could handle real-time position broadcasts at game-like tick rates -- the multiplayer backbone. If this had failed, the entire network architecture would have needed early sharding rather than single-island ownership.</p>
<p>The second validated a mobile quality profile: not a desktop preset renamed, but an explicit low-cost rendering path from the same terrain baseline. The question was whether the world could remain readable and responsive under mobile GPU constraints without rewriting the renderer.</p>
<p>The third evaluated whether AI-generated behavior scripts for creator workflows would be reliable enough for production use.</p>
<p>None of these produced demo reels. All three set hard boundaries that shaped every architectural decision afterward. Sidorkin writes that these &quot;unflashy spikes changed architecture faster than visual spikes did.&quot;</p>
<h2>Streaming: where pretty projects fall apart</h2>
<p><img src="spike-6-chunk-streaming.png" alt="Spike 6: Chunk streaming in action. Each colored area is a terrain chunk that loads and unloads dynamically as the camera moves. The HUD shows 120 FPS with 29 active chunks and sub-millisecond unload times."></p>
<p>You can hide a lot in a still frame. You can't hide a 40-millisecond stutter when crossing a chunk boundary while running.</p>
<p>The team tested streaming before building advanced terrain, deliberately separating concerns. Spike 6 validated neighborhood chunk loading with simple content. Only after that clean signal did Spike 11 introduce compressed heightmap streaming with progressive refinement -- loading terrain at 17-sample resolution first, then 33, then the full 65-sample grid.</p>
<p>The sequencing mattered more than they expected. Had they started directly with compressed height chunks, every hitch would have been ambiguous. Was it a decode issue, a texture upload stall, or a geometry update problem? Testing simple streaming first eliminated one entire category of uncertainty.</p>
<p>A practical lesson emerged: measure upload stalls directly, not through average FPS. Averages hide frame spikes, and frame spikes are what players actually feel.</p>
<h2>The visual budget wars</h2>
<p>Three separate experiments attacked rendering costs in isolation rather than bundling them. Vegetation density and wind animation. Multi-layer terrain materials with triplanar mapping for cliff faces. Cascaded shadow maps under realistic terrain load.</p>
<p>The vegetation spike revealed that batching instances into fewer meshes mattered more than reducing per-blade polygon count. The material spike found that triplanar projection on vertical surfaces was worth the GPU cost, but adding a fifth texture splat layer wasn't. The shadow spike determined that three cascades at 1024 resolution delivered acceptable contact shadows without exceeding 2 milliseconds of GPU time.</p>
<p>The team adopted a blunt rule: a feature moves forward only if it can explain its cost with measured frame-time data. That constraint, set early, made later architectural decisions around volumetric terrain and clipmaps significantly cleaner.</p>
<h2>The pivot that changed the project's trajectory</h2>
<p>Before Spike 10, the team's mental model was &quot;bigger world means more geometry.&quot; After Spike 10, it became &quot;constant geometry budget, camera-centered ring updates.&quot;</p>
<p>Geometry clipmaps -- concentric rings of terrain centered on the camera, each ring progressively coarser -- meant the triangle count stayed roughly constant regardless of draw distance. The practical trick was geomorphing at ring boundaries: smoothly blending vertex heights in the shader so that the shift between resolution levels is invisible in motion.</p>
<p>A subtle lesson came from testing methodology. Clipmaps look fine in screenshots. They reveal their artifacts only under sustained camera movement through ring boundaries. The team spent time running constant-speed traversals and watching for temporal noise. &quot;Screenshots lied,&quot; Sidorkin writes. &quot;Motion told the truth.&quot;</p>
<h2>Going underground</h2>
<p>Heightmaps can't represent caves. They store one elevation value per point on a grid. The moment you need tunnels, overhangs, or carved rock faces, you need volumetric terrain.</p>
<p>Spike 12 implemented marching cubes on the GPU using WebGPU compute shaders, extracting triangle meshes from a 3D signed distance field. Four 64-cubed chunks ran simultaneously with per-frame mesh updates from animated SDF edits. The compute shader handled everything -- evaluating the field, classifying cells, emitting vertices -- without any CPU readback.</p>
<p>The challenge wasn't making it work. It was making it work alongside everything else. Integration with Three.js's scene graph, buffer lifecycle management (WebGPU buffers can't be resized), fence handling to avoid destroying GPU resources still in flight -- the series devotes two full parts to what they call &quot;incremental hardening,&quot; the unglamorous process of adding one capability at a time and verifying the previous layer still functions after each addition.</p>
<h2>The seam nightmare</h2>
<p>The most technically harrowing section of the series spans Parts 9 through 11, covering what happens when terrain chunks at different resolutions meet.</p>
<p>When a high-detail chunk sits next to a low-detail chunk, their independently generated meshes don't align at the boundary. The result is visible cracks, flickering edges, and T-junctions where light bleeds through. The Transvoxel algorithm solves this with special transition cells that bridge resolution differences -- but implementing it correctly across all chunk configurations, with consistent winding order, proper buffer management, and accurate draw ranges, consumed six separate experiments.</p>
<p>The team's most memorable debugging story: two days chasing a seam artifact they blamed on transition logic. The actual culprit was stale data. The GPU compute shader wrote N vertices into a buffer, but the draw call was still configured to render N+M vertices from the previous frame. Those extra vertices contained garbage that produced flickering razor-thin triangles. One line fix: clip the draw range to the atomic counter's active vertex count.</p>
<p>&quot;Rendering bugs often masquerade as meshing bugs,&quot; Sidorkin observes. &quot;The geometry was correct the whole time.&quot;</p>
<h2>From chaos to governance</h2>
<p>After the seam battle, the team replaced ad-hoc chunk behavior with an explicit policy system. A central function now decided each chunk's LOD level, rendering mode (heightmap or marching cubes), and which faces needed transition cells. Distance rings determined the base LOD. An adjacency constraint ensured no two neighboring chunks differed by more than one resolution level. An edit bitmap kept volumetric chunks in marching-cubes mode regardless of distance if they contained creator modifications.</p>
<p>Color-coded debug overlays -- green for heightmap chunks, blue for marching cubes, orange for transition faces -- turned &quot;I saw a bug somewhere near that ridge&quot; into &quot;the bug appears at position (142, 12, -67) facing northwest.&quot;</p>
<p>&quot;Policy didn't reduce complexity,&quot; Sidorkin writes. &quot;It organized complexity.&quot;</p>
<h2>What it adds up to</h2>
<p><img src="open-world-browser-120fps.png" alt="The open world running in a browser at 120 FPS -- terrain, trees, physics, and a player capsule, all rendered in a single tab with no install required."></p>
<p>The final spike combined clipmap rings, per-fragment sky fog (sampling the actual skybox color in the direction of each terrain fragment), and Three.js module wiring into a unified demonstration. The result is a terrain system that layers near-field volumetric editing, mid-field heightmap chunks, and far-field clipmap rings under a policy layer that governs mode, LOD, and transitions.</p>
<p>The series closes with lessons Sidorkin says he'd repeat on any future project:</p>
<ul>
<li><strong>Start with risk spikes before feature work.</strong> Kill the &quot;can we even do this?&quot; questions before investing in content pipelines.</li>
<li><strong>Freeze known-good baselines before integration jumps.</strong> The day spent establishing a clean checkpoint saves multiple days bisecting regressions later.</li>
<li><strong>Force policy and observability before optimization marathons.</strong> Named conditions with trigger rules beat mystery bugs every time.</li>
<li><strong>Test under motion, not screenshots.</strong> Pops, flicker, and streaming hitches all hide in still frames.</li>
<li><strong>Measure per-feature frame time, not average FPS.</strong> Averages hide the spikes that users actually feel.</li>
<li><strong>Publish the messy parts.</strong> The wrong turns, the ghost hunts, the two days blaming the wrong system. Those are the parts people can actually learn from.</li>
</ul>
<h2>Why this matters beyond Cinevva</h2>
<p>The series is significant for three reasons that extend past one company's terrain pipeline.</p>
<p>First, it demonstrates that WebGPU compute shaders, WebAssembly physics, and edge-deployed Durable Objects have crossed a threshold. A multiplayer open world with volumetric terrain, real-time editing, and streaming LOD is architecturally viable in a browser tab in 2026. That was not true two years ago.</p>
<p>Second, the spike methodology -- small, focused experiments that each answer one risky question with live, measurable results -- offers a template for any team attempting something that might not work. The discipline of measuring before committing, of establishing baselines before integrating, of naming edge cases before optimizing, applies far beyond terrain systems.</p>
<p>Third, the radical transparency is the point. Publishing source code for all 24 experiments, including the dead ends and the two-day debugging detours, makes this more than a technical blog. It's a public engineering notebook that treats the reader as a colleague rather than a customer.</p>
<p>The full series is available at <a href="https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide">Cinevva's blog</a>, with every spike running live in the browser.</p>
<hr>
<p><em>Cinevva is a game creation platform where anyone can build, publish, and share games using AI-powered tools. The open-world browser series was written by <a href="https://app.cinevva.com/about">Oleg Sidorkin</a>, CTO and co-founder.</em></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2026-02-25-open-world-browser-social-posts]]></title>
            <link>https://app.cinevva.com/blog/2026-02-25-open-world-browser-social-posts</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-25-open-world-browser-social-posts</guid>
            <pubDate>Wed, 25 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[]]></description>
            <content:encoded><![CDATA[<h1>Social Media Posts — Open World Browser Series</h1>
<p><strong>Article</strong>: <a href="https://vio-202020.medium.com/de-risking-an-ambitious-project-before-committing-to-anything-big-like-an-online-open-world-c94a7c05ee06">https://vio-202020.medium.com/de-risking-an-ambitious-project-before-committing-to-anything-big-like-an-online-open-world-c94a7c05ee06</a>
<strong>Blog Series</strong>: <a href="https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide">https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide</a></p>
<hr>
<h2>LinkedIn (Cinevva Company Page)</h2>
<p><strong>Schedule: Tuesday March 10, 10:00 AM ET</strong>
<strong>Image</strong>: <a href="https://app.cinevva.com/img/blog/open-world-browser-120fps.png">https://app.cinevva.com/img/blog/open-world-browser-120fps.png</a></p>
<p>Our CTO Oleg Sidorkin just published the full engineering journal behind building a multiplayer open world that runs entirely in a browser. No download. No app store. Just a URL.</p>
<p>24 experiments. 12 parts. The series documents the full sequence -- wins, dead ends, and recovery patterns -- with live source code for every experiment.</p>
<ul>
<li>The first experiment was deliberately ugly -- measuring whether a browser could even hold a stable frame rate before investing in anything pretty</li>
<li>Physics in a Web Worker with Rapier compiled to WebAssembly -- and whether the input lag fear was justified (it wasn't)</li>
<li>The &quot;boring&quot; spikes that set hard boundaries on network architecture, mobile constraints, and AI behavior reliability</li>
<li>Streaming chunk transitions that expose 40ms hitches no screenshot can hide</li>
<li>GPU-driven marching cubes via WebGPU compute shaders for caves and overhangs</li>
<li>A six-experiment seam nightmare debugging Transvoxel transitions across mixed LOD chunks</li>
<li>The two-day bug hunt where the geometry was correct the whole time -- the draw call was reading past the buffer</li>
</ul>
<p>The methodology matters as much as the tech. Start with risk. Freeze baselines before integration jumps. Measure per-feature frame time, not averages. Test under motion, not screenshots.</p>
<p>Whether you're building games, tools, or anything ambitious in the browser -- the spike-based de-risking approach transfers.</p>
<p>#gamedev #WebGPU #webdev #softwareengineering</p>
<hr>
<h2>X (Twitter) Thread — @CINEVVAGames</h2>
<p><strong>Schedule: Tuesday March 10, 9:00 AM ET</strong>
<strong>Note</strong>: X/Zapier integration is text-only (no image field). Post images manually via X app after thread is live.</p>
<h3>Tweet 1 (main)</h3>
<p>Our CTO Oleg Sidorkin (<a href="http://linkedin.com/in/osidorkin">linkedin.com/in/osidorkin</a>) just published something unusual -- the full engineering journal behind building a multiplayer open world that runs entirely in a browser tab.</p>
<p>24 experiments. 12 parts. Every spike ships with live source code.</p>
<p><a href="https://vio-202020.medium.com/de-risking-an-ambitious-project-before-committing-to-anything-big-like-an-online-open-world-c94a7c05ee06">https://vio-202020.medium.com/de-risking-an-ambitious-project-before-committing-to-anything-big-like-an-online-open-world-c94a7c05ee06</a></p>
<p>🧵</p>
<h3>Tweet 2</h3>
<p>The methodology matters as much as the tech:</p>
<ul>
<li>First experiment was deliberately ugly -- just measuring if a browser can hold a stable frame rate</li>
<li>Physics in a Web Worker with Rapier compiled to Wasm</li>
<li>GPU marching cubes via WebGPU compute shaders for caves</li>
<li>A two-day bug where the geometry was correct the whole time</li>
</ul>
<p>No install. No app store. Just a URL.</p>
<h3>Tweet 3</h3>
<p>Whether you're building games, tools, or anything ambitious in the browser -- the spike-based de-risking approach transfers.</p>
<p>Full series with all 24 live experiments: <a href="https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide">https://app.cinevva.com/blog/2026-02-25-open-world-browser-series-guide</a></p>
<p>#gamedev #WebGPU #webdev</p>
<hr>
<h2>Instagram (Cinevva)</h2>
<p><strong>Schedule: Tuesday March 10 (or post anytime — Instagram is less time-sensitive)</strong>
<strong>Images (carousel)</strong>:</p>
<ol>
<li><a href="https://app.cinevva.com/img/blog/open-world-browser-120fps.png">https://app.cinevva.com/img/blog/open-world-browser-120fps.png</a></li>
<li><a href="https://app.cinevva.com/img/blog/open-world-chunk-streaming.png">https://app.cinevva.com/img/blog/open-world-chunk-streaming.png</a></li>
</ol>
<p>No download. No app store. Just a URL.</p>
<p>Our CTO Oleg Sidorkin published the full engineering journal behind building a multiplayer open world that runs entirely in a browser.</p>
<p>24 experiments called &quot;spikes&quot; -- each one designed to answer a single risky question before committing to anything expensive. Every experiment ships with live source code.</p>
<p>What stood out:</p>
<p>→ The first experiment was deliberately ugly. No shadows. No beauty pass. Just: can a browser hold 60fps while a camera moves through 500 objects?
→ Physics running in a Web Worker with Rust compiled to WebAssembly -- and the input lag everyone feared didn't show up
→ GPU-driven marching cubes via WebGPU compute shaders for caves and overhangs
→ A six-experiment nightmare debugging seams between terrain chunks at different resolutions
→ The two-day bug hunt where the geometry was correct the whole time -- the draw call was reading past the buffer</p>
<p>&quot;Screenshots lied. Motion told the truth.&quot;</p>
<p>The spike methodology applies far beyond games. Start with risk. Measure before committing. Publish the messy parts.</p>
<p>Full series link in bio.</p>
<p>.
.
.
#gamedev #gamedevelopment #webdev #webgpu #indiedev #indiegames #browsergames #openworld #javascript #threejs #webassembly #softwareengineering #techblog #buildinpublic #cinevva</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2026-02-18-a-breaker-belt-medium]]></title>
            <link>https://app.cinevva.com/blog/2026-02-18-a-breaker-belt-medium</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-18-a-breaker-belt-medium</guid>
            <pubDate>Wed, 18 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[]]></description>
            <content:encoded><![CDATA[<h1>A Breaker Belt: Snake meets Arkanoid, vibe coded in three days</h1>
<p>We made a game where your snake is the paddle and the bricks fight back. It shipped on web, mobile, and PC. It took two of us about three days. On and off, not crunching. And it's fun to play.</p>
<h2>The mashup nobody asked for</h2>
<p>Snake is about growth and spatial awareness. Arkanoid is about reflexes and angle prediction. They come from completely different design philosophies, and mashing them together sounds like the kind of pitch that gets politely declined.</p>
<p>But <a href="https://app.cinevva.com/engine">A Breaker Belt</a> makes it work. You're a cosmic serpent, a living arc of neon current threading through an asteroid field of breakable blocks. Your head is the paddle. Your growing tail is both your greatest weapon and your most constant threat. The orbs ricochet off your body to shatter bricks, but one wrong turn into your own tail and you're done.</p>
<p>It's the kind of weird cross-genre experiment that usually dies before anyone gets to play it, because the development cost of finding out whether a weird idea works has traditionally been measured in months. Here it was measured in afternoons.</p>
<h2>What actually shipped</h2>
<p>The scope is what makes this interesting. This isn't a game jam prototype with placeholder rectangles and no sound.</p>
<p>The game runs 50 waves deep. That's not 50 variations of the same brick wall. The formations evolve from gentle onboarding arcs into fortress rings that demand angled shots through side gaps, then into layered diagonal mazes with one-tile-wide openings that require precision steering. Explosive bricks blow their neighbors apart. Phantom bricks flicker in and out of existence. Regenerating bricks heal back after you break them. Portal bricks teleport your orbs across the arena. Gravity wells bend your shots into slow, curving hymns. Laser emitters sketch red lines across the void. Mimic bricks look harmless until they decide they're not. By wave 15, you're navigating something that feels less like a puzzle and more like a living system that's learning your habits.</p>
<p>The music isn't a loop. It's a reactive soundtrack that builds with your gameplay. Bass, lead synth, pad, drums all running in E minor, and as the action intensifies, additional layers fade in. When things calm down between waves, ambient pads take over. The music breathes with you. A dedicated composer would spend weeks tuning that kind of responsiveness. Here it was part of the creative flow.</p>
<p>The sound effects aren't samples pulled from a free pack. Every brick shatter, orb bounce, and collision is synthesized in real time. Different pitch for head contacts versus tail contacts. Warm reverb for the spacey feel. When you chain a combo, the audio tells you before the screen does.</p>
<p>And then there's the storytelling. Each wave opens with a narrative beat delivered by AI-generated voice. Wave one: &quot;They call it the Breaker Belt: a ribbon of engineered debris that circles the old star like a warning.&quot; By wave 38: &quot;The Belt stops feeling like a wall and starts feeling like a mind. It tests not your reflexes, but your habits.&quot; It's 50 chapters of cosmic mythology that makes you care about why you're a snake breaking bricks in space.</p>
<p>The backgrounds evolve too. Early waves are calm indigo starfields with soft meteor rain. By mid-game, aurora bands and nebula clouds appear. Late game drops you into Ion Storm territory with sharp cyan streaks against near-black space. The game communicates progression through atmosphere as much as difficulty.</p>
<p>All of this runs on keyboard, gamepad, or touchscreen. Published to web, mobile, and PC from one codebase.</p>
<h2>The team that wasn't needed</h2>
<p>A game with this depth would typically need a game designer, a couple of programmers, an artist, a sound designer, a composer, a level designer, a narrative writer, and QA. Eight or nine people. Three to six months of coordinated work. Standups, Jira tickets, asset pipelines, platform-specific debugging.</p>
<p>Two of us made this in a long weekend on the <a href="https://app.cinevva.com/engine">Cinevva Engine</a>.</p>
<p>The talent required didn't change. The ratio between creative intent and implementation overhead did. The time was spent deciding what the game should feel like, not fighting tools to make it happen.</p>
<h2>Why this matters if you make things</h2>
<p>The interesting question isn't whether AI tools can help make games faster. That's been answered. The interesting question is what happens to ideas that used to be too risky to try.</p>
<p>&quot;Snake but you're the paddle in an Arkanoid arena&quot; is not something a producer greenlights. A few indie devs have tried variations on <a href="http://itch.io">itch.io</a> (<a href="https://newdron.itch.io/breaksnake">BreakSnake</a>, <a href="https://neop87.itch.io/snakeout">SnakeOut</a>, <a href="https://merrak.itch.io/snake-break">Snake Break</a>), but they're all small game jam experiments. The genre fusion has never been given a real production pass with reactive music, AI narration, dozens of brick types, and 50 waves of escalating design. In traditional development, that kind of polish on a risky concept gets killed in a meeting before anyone writes a line of code.</p>
<p>When trying something weird costs an afternoon instead of a quarter's budget, the strange ideas get built. Some of them turn out to be genuinely good. A Breaker Belt is one of those.</p>
<h2>Play it. Or make your own.</h2>
<p><a href="https://app.cinevva.com/engine">A Breaker Belt</a> is playable right now on web, mobile, and PC. If it makes you want to build something, the <a href="https://app.cinevva.com/engine">Cinevva Engine</a> is free to use. Describe what you want, iterate on what comes back, ship when it's ready. The <a href="https://app.cinevva.com/tools/music">music</a>, <a href="https://app.cinevva.com/tools/sfx">sound effects</a>, <a href="https://app.cinevva.com/tools/flux">art</a>, and <a href="https://app.cinevva.com/tools/hunyuan3d">3D models</a> are all built in.</p>
<p>Your weird game idea might be three days away from existing.</p>
<hr>
<p><em><a href="https://app.cinevva.com/engine">Play A Breaker Belt</a> | <a href="https://app.cinevva.com/engine">Build your own game</a> | <a href="https://cinevva.com/charts">Browse community games</a></em></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Breaker Belt: Snake meets Arkanoid, vibe coded in three days]]></title>
            <link>https://app.cinevva.com/blog/2026-02-18-a-breaker-belt</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-18-a-breaker-belt</guid>
            <pubDate>Wed, 18 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A cosmic serpent breaks bricks across 50 waves with reactive music, AI narration, and 23 brick types. Two people. Three days. Web, mobile, and PC.]]></description>
            <content:encoded><![CDATA[<h1>A Breaker Belt: Snake meets Arkanoid, vibe coded in three days</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/breaker-belt-cover.webp" alt="A Breaker Belt gameplay: a neon cosmic serpent breaking bricks in space" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>We made a game where your snake is the paddle and the bricks fight back. It shipped on web, mobile, and PC. It took two of us about three days. On and off, not crunching. And it's genuinely fun to play.</p>
<p>That last part is the thing worth paying attention to.</p>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:8px;margin:1.5rem 0">
<iframe src="https://www.youtube.com/embed/VaFkfCT3OuU" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen></iframe>
</div>
<h2>The mashup nobody asked for</h2>
<p>Snake is about growth and spatial awareness. Arkanoid is about reflexes and angle prediction. They come from completely different design philosophies, and mashing them together sounds like the kind of pitch that gets politely declined.</p>
<p>But <a href="https://app.cinevva.com/engine">A Breaker Belt</a> makes it work. You're a cosmic serpent, a living arc of neon current stitched from drift-metal vertebrae and comet silk, threading through an asteroid field of breakable blocks. Your head is the paddle. Your growing tail is both your greatest weapon and your most constant threat. The orbs ricochet off your body to shatter bricks, but one wrong turn into your own tail and you're done.</p>
<p>It's the kind of weird cross-genre experiment that usually dies before anyone gets to play it, because the development cost of finding out whether a weird idea works has traditionally been measured in months. Here it was measured in afternoons.</p>
<h2>What actually shipped</h2>
<p>The scope is what makes this interesting. This isn't a game jam prototype with placeholder rectangles and no sound.</p>
<p>The game runs 50 waves deep. That's not 50 variations of the same brick wall. The formations evolve from gentle onboarding arcs into fortress rings that demand angled shots through side gaps, then into layered diagonal mazes with one-tile-wide openings that require precision steering. Explosive bricks blow their neighbors apart. Phantom bricks flicker in and out of existence. Regenerating bricks heal back after you break them, forcing you to prioritize targets instead of sweeping left to right. Portal bricks teleport your orbs across the arena. Gravity wells bend your shots into slow, curving hymns. Laser emitters sketch red lines across the void. Mimic bricks look harmless until they decide they're not. By wave 15, you're navigating something that feels less like a puzzle and more like a living system that's learning your habits.</p>
<p>The music isn't a loop. It's a reactive soundtrack that builds with your gameplay. The underlying system runs a bass line, lead synth, pad, kick, snare, and hi-hat in E minor at 140 BPM, and as the action intensifies, additional percussion and synth layers fade in. When things calm down between waves, ambient pads take over. The music breathes with you. A dedicated composer would spend weeks tuning that kind of responsiveness. Here it was part of the creative flow.</p>
<p>The sound effects aren't samples pulled from a free pack. Every brick shatter, power-up pickup, orb bounce, and collision is synthesized in real time. Different pitch for head contacts versus tail contacts. Warm reverb for the spacey feel. Lowpass filtering to keep things satisfying without getting harsh. When you chain a combo, the audio tells you before the screen does.</p>
<p>And then there's the storytelling. Each wave opens with a narrative beat delivered by AI-generated voice. The writing has genuine personality. Wave one: &quot;They call it the Breaker Belt: a ribbon of engineered debris that circles the old star like a warning.&quot; By wave 38: &quot;The Belt stops feeling like a wall and starts feeling like a mind. It tests not your reflexes, but your habits. You break the habit. The Belt notices.&quot; It's 50 chapters of cosmic mythology that makes you care about why you're a snake breaking bricks in space.</p>
<p>The backgrounds evolve too. Early waves are calm indigo starfields with soft meteor rain. By mid-game, aurora bands and nebula clouds appear. Late game goes full Ion Storm with sharp cyan streaks against near-black space. Wave 15 and beyond, you're in Event Horizon territory: deep void punctuated by slow-moving nebula filaments and faint black hole lensing. The game communicates progression through atmosphere as much as difficulty.</p>
<p>All of this runs on keyboard, gamepad, or touchscreen. Published to web, mobile, and PC from one codebase. No separate builds. No porting.</p>
<h2>The team that wasn't needed</h2>
<p>Here's the part that should make any game developer pause.</p>
<p>A game with this depth of content would typically need a game designer, a couple of programmers, a 2D artist, a sound designer, a music composer, a level designer, a narrative writer, and QA. That's eight or nine people. At a modest indie pace, you're looking at three to six months of coordinated work. Standups, Jira tickets, asset pipelines, platform-specific debugging.</p>
<p>Two of us made this in a long weekend on the <a href="https://app.cinevva.com/engine">Cinevva Engine</a>.</p>
<p>The talent required didn't change. The ratio between creative intent and implementation overhead did. The time was spent deciding what the game should feel like, not fighting tools to make it happen.</p>
<h2>Why this matters if you make things</h2>
<p>The interesting question isn't whether AI tools can help make games faster. That's been answered. The interesting question is what happens to ideas that used to be too risky to try.</p>
<p>&quot;Snake but you're the paddle in an Arkanoid arena&quot; is not something a producer greenlights. A few indie devs have tried variations of this mashup on <a href="http://itch.io">itch.io</a> (<a href="https://newdron.itch.io/breaksnake">BreakSnake</a>, <a href="https://neop87.itch.io/snakeout">SnakeOut</a>, <a href="https://merrak.itch.io/snake-break">Snake Break</a>), but they're all small game jam experiments. The genre fusion has never been given a real production pass with reactive music, AI narration, dozens of brick types, and 50 waves of escalating level design. In traditional development, that kind of polish on a risky concept gets killed in a meeting before anyone writes a line of code.</p>
<p>When trying something weird costs an afternoon instead of a quarter's budget, the strange ideas get built. Some of them turn out to be genuinely good. A Breaker Belt is one of those.</p>
<h2>Play it. Or make your own.</h2>
<p><a href="https://app.cinevva.com/engine">A Breaker Belt</a> is playable right now on web, mobile, and PC. If it makes you want to build something, the <a href="https://app.cinevva.com/engine">Cinevva Engine</a> is free to use. Describe what you want, iterate on what comes back, ship when it's ready. The <a href="https://app.cinevva.com/tools/music">music</a>, <a href="https://app.cinevva.com/tools/sfx">sound effects</a>, <a href="https://app.cinevva.com/tools/flux">art</a>, and <a href="https://app.cinevva.com/tools/hunyuan3d">3D models</a> are all built in.</p>
<p>Your weird game idea might be three days away from existing.</p>
<hr>
<p><em><a href="https://app.cinevva.com/engine">Play A Breaker Belt</a> | <a href="https://app.cinevva.com/engine">Build your own game</a> | <a href="https://cinevva.com/charts">Browse community games</a></em></p>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/signals/2026-03-13-vibe-coding-new-game-jam">Vibe coding is the new game jam</a> — how AI tools collapse the gap between idea and prototype</li>
<li><a href="/guides/game-jams-hackathons">Game Jams &amp; Hackathons</a> — the jam format that makes weird mashups possible</li>
<li><a href="/guides/web-game-engines-comparison">Web Game Engines Comparison</a> — engines for shipping to web, mobile, and PC</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We didn't expect to build a radio station]]></title>
            <link>https://app.cinevva.com/blog/2026-02-17-we-didnt-expect-a-radio-station</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-17-we-didnt-expect-a-radio-station</guid>
            <pubDate>Tue, 17 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[We have a music generator on Cinevva so game creators can make soundtracks. People started making music just because they could. 362 tracks later, Cinevva Radio is live.]]></description>
            <content:encoded><![CDATA[<h1>We didn't expect to build a radio station</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/cinevva-radio-lofi-cafe.png" alt="Cinevva Community Radio with 8 stations including Soundstage, Voltage, Lo-Fi Cafe, Main Stage, Ivory Tower, and Electric Dreams, currently playing Quiet Flute Drone" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<p>We have a <a href="https://app.cinevva.com/tools/music">music generator</a> on the Cinevva platform so game creators can make game soundtracks and SFX without licensing headaches. What happened next, we did not plan for. People started making music because they wanted to make music. Not for games or projects. Just music production.</p>
<h2>Bella Bay made over 100 tracks in two weeks</h2>
<p>I'm not exaggerating. One of our creators, Bella Bay, generated over 100 tracks in about two weeks. When you listen through them on <a href="https://cinevva.com/radio">Cinevva Radio</a>, you can hear the progression. The early tracks are experiments. The later ones sound like someone who found their style. That kind of creative acceleration doesn't happen when you're fighting your tools. It happens when the tools get out of the way.</p>
<p>Bella Bay isn't an outlier in spirit, just in volume. All across the platform, people started treating the music generator not as a utility for game assets but as a creative instrument. Producers experimenting with genres they'd never tried. People iterating on a sound until it clicked. Bedroom artists who'd never had access to a full production toolkit suddenly had one and went all in.</p>
<h2>So we built a radio</h2>
<p>It had to be done.</p>
<p>We had all these tracks sitting in people's accounts with no collective space. No way to discover what others were making. No way to stumble onto a track that changes your afternoon.</p>
<p><a href="https://cinevva.com/radio">Cinevva Radio</a> is now live. Eight stations. 362 community-created tracks and growing every day. Every single song was made by someone on the platform. You open it and something is playing. You don't have to search. You don't have to decide. You just listen.</p>
<p><strong><a href="https://cinevva.com/radio#cinematic">Soundstage</a></strong> is our biggest station. 111 tracks of cinematic and epic scores. I honestly didn't see that coming. People love making dramatic, film-style music.</p>
<p><strong><a href="https://cinevva.com/radio#mixed">Discovery</a></strong> caught everything that doesn't fit neatly into a genre. 78 tracks. Latin beats next to Afrobeats next to country next to something that defies description. This station is wild.</p>
<p><strong><a href="https://cinevva.com/radio#pop">Main Stage</a></strong> is pop and vocal tracks. 56 tracks with full lyrics and vocals. People are writing love songs, breakup songs, worship music, ballads. Some of it is genuinely catchy.</p>
<p><strong><a href="https://cinevva.com/radio#rock">Voltage</a></strong> is rock and metal. 53 tracks. Guitar riffs, punk energy, grunge, hard rock. I keep this one on while working.</p>
<p><strong><a href="https://cinevva.com/radio#lofi">Lo-Fi Cafe</a></strong> is exactly what it sounds like. 25 chill ambient tracks for studying, working, or just vibing.</p>
<p><strong><a href="https://cinevva.com/radio#electronic">Electric Dreams</a></strong> has 22 electronic and synth tracks. Synthwave, techno, EDM, drum and bass.</p>
<p><strong><a href="https://cinevva.com/radio#classical">Ivory Tower</a></strong> is classical and orchestral. 10 tracks. Piano pieces, string arrangements, symphonic stuff. Small but growing.</p>
<p><strong><a href="https://cinevva.com/radio#hiphop">The Cipher</a></strong> is hip-hop and rap. 7 tracks so far. Newest station, still finding its voice.</p>
<h2>What you see when you listen</h2>
<p>When you open <a href="https://cinevva.com/radio">Cinevva Radio</a>, it's a live stream. Think of it less like a playlist app and more like an actual radio station. Tracks play continuously. You can react in real time, chat with other listeners, and see who made each track.</p>
<p>Creators get credited on screen while their track plays. Their name, their prompt, the genre. If you hear something you like, you know who made it. It's community-created content with a discovery layer on top. No algorithms deciding what's worthy. No gatekeepers. You made a track, it goes on the station that matches its genre, and people hear it.</p>
<h2>This is bigger than a feature</h2>
<p>For decades, music production required expensive software, years of training, and access to equipment most people couldn't afford. What we're seeing is a different kind of creator. People who think in descriptions and feelings rather than notes and time signatures.</p>
<p>&quot;Rainy night jazz with a broken piano&quot; is a creative direction. The person who wrote that prompt made an artistic choice. They directed the mood, the instrumentation, the emotional register. They just don't happen to play piano.</p>
<p>I don't think that makes their output less valid. I think it means the definition of &quot;musician&quot; is stretching. And watching someone like Bella Bay go from zero to a hundred tracks in two weeks tells me the creative drive was always there. The tools just weren't.</p>
<h2>What's next</h2>
<p>We're working on community profiles where producers can showcase their catalog and build a following. The <a href="https://cinevva.com/charts">charts page</a> already shows community creations across all tools, and we want to bring that same energy specifically to music.</p>
<p>But right now, the radio is live. <a href="https://cinevva.com/radio">Go listen</a>. And if you want to make your own tracks, the <a href="https://app.cinevva.com/tools/music">music generator</a> is free to use. Your track might end up on the air.</p>
<hr>
<p><em><a href="https://cinevva.com/radio">Listen to Cinevva Radio</a> | <a href="https://app.cinevva.com/tools/music">Make music</a> | <a href="https://cinevva.com/charts">Browse community creations</a></em></p>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/guides/frontier-gen-ai-models">Frontier Open-Source Gen AI Models</a> — the AI music and audio models behind the scenes</li>
<li><a href="/tutorials/web-audio-api-games">Web Audio API for games</a> — building interactive audio in the browser</li>
<li><a href="/signals/2026-03-13-vibe-coding-new-game-jam">Vibe coding is the new game jam</a> — how describing intent becomes the primary creative input</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The intuitive mind in an age of AI]]></title>
            <link>https://app.cinevva.com/blog/2026-02-10-the-intuitive-mind</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-02-10-the-intuitive-mind</guid>
            <pubDate>Tue, 10 Feb 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Jensen Huang says raw math skills are now a commodity. Here's why that resonates with someone who failed the SAT, ignored the rules, and built something people actually wanted.]]></description>
            <content:encoded><![CDATA[<h1>The intuitive mind in an age of AI</h1>
<p><em>By <a href="/about">Mariana Muntean</a>, CEO of Cinevva</em></p>
<img src="https://cdn.cinevva.com/blog/game-jam-houston-2018.png" alt="Mariana Muntean with classmates during a 48 hours game jam in Houston 2018" style="width:100%;border-radius:8px;margin:1.5rem 0" />
<small>With classmates during a 48-hour game jam in Houston, 2018</small>
<p>AI has essentially commoditized raw logic and computational ability. The skills we used to worship, the mental math, the pattern recognition, the ability to grind through complex algorithms, AI does all of that now. Faster. Better. Without getting tired. Do we still need to know it? Absolutely, but perceptions change. Now everyone needs to adjust to the new era - an era of intuitive intreaction and outcomes.</p>
<p>According to <a href="https://business.columbia.edu/insights/digital-future/nvidia-ceo-jensen-huang-reveals-keys-ai-and-leadership">Jensen Huang</a>, NVIDIA's CEO, what matters now is the ability to sense a &quot;vibe&quot; and see around corners before the data appears. The intersection of technical literacy and deep empathy. The intuitive understanding that silicon can't touch.</p>
<p>I've never heard anyone with his credibility say something that validated my entire life trajectory quite so directly.</p>
<h2>The SAT and the system that wasn't built for me</h2>
<p>A few years back I took the SAT and failed. I'm not proud of it, but I also didn't try again. Something felt fundamentally wrong about the whole thing, and I couldn't shake that feeling no matter how much people told me to just study harder and take it again.</p>
<p>Looking back, I think I was right.</p>
<p>The SAT is designed for the American education system. That sounds obvious, but the implications run deep. American high schools teach to specific patterns, question types, and ways of framing problems. Students grow up marinating in that style of standardized testing from elementary school onward. By the time they hit the SAT, they've internalized the rhythm.</p>
<p>International students don't have that advantage. We come from systems with different educational philosophies. European schools often emphasize depth over breadth, essay-based examination over multiple choice, oral defense over bubble sheets. Asian systems have their own standardized tests, but they measure different things in different ways. South American, African, Middle Eastern educational traditions each carry their own logic.</p>
<p>When you drop an international student into the SAT, you're not just testing their knowledge. You're testing how quickly they can adapt to a foreign testing culture while simultaneously demonstrating mastery of content. You're testing cultural fluency as much as academic ability.</p>
<p>I was expected to prep for this over a summer and ace it. Learn an entire testing culture, unlearn my own educational instincts, and perform at a level that would impress American admissions officers. All in a few months.</p>
<p>I chose not to.</p>
<p>When you're young, you're smart in different ways. Intuitive ways. I was clearing a path for myself, even if I couldn't articulate exactly why at the time. Something in me knew this system wasn't mine.</p>
<h2>Following the creative thread instead</h2>
<p>I studied game development and design because I loved the idea of using creativity and visual effects to build virtual worlds people could play and interact with. I loved the intersection of art and technology, storytelling and interactivity.</p>
<p>What I found shocked me.</p>
<p>Games require serious technical depth. Physics simulations, collision detection, vector math, lighting calculations, optimization. I knew that going in. The math and engineering aren't obstacles to game development. They're part of what makes games work.</p>
<p>The problem was the gap between creative vision and implementation. The engines and tools dominating the industry were designed by engineers for engineers. Everything ran on &quot;ifs&quot; and &quot;thens&quot; and node-based blueprints. You wanted a vortex effect? Learn shader programming. Specific lighting mood? Dig into material graphs. Character movement that feels right? Debug character controller or physics parameters for hours.</p>
<p>If you're a visual person, if you think in vivid colors and moving images, if ideas come to you as fully formed scenes with sound and texture and emotional weight, you had to translate all of that into technical language before you could build any of it. You see a world in your mind, complete with lighting and atmosphere and the way characters move through space. Then you sit down at your computer and spend the next six hours debugging why your character falls through the floor.</p>
<p>The technical foundation matters. But the tools forced creators to live in implementation details instead of abstracting that complexity away. Game creation should feel like telling a story or directing a movie where people get to participate. That's the magic of the medium. Instead it felt like taking an engineering exam before you could even start.</p>
<p>Movie directors don't spend years learning physics engines before they can express their vision. They get a budget and a team that handles the technical execution. But in indie game development, you rarely have a budget. What you have is time and access to tools. And if you're a technical person, you can build a killer game. But only if.</p>
<p>This is how we got titles like Limbo, made by a small team with a singular artistic vision and the technical chops to execute it. Or Undertale, created largely by one person who happened to have the right combination of creative instinct and programming ability. Or Stardew Valley, where Eric Barone spent years teaching himself everything from pixel art to music composition to C# programming.</p>
<p>These games succeeded against enormous odds. But for every Limbo there are millions of creative visions that died because the tools demanded technical fluency their creators couldn't provide. Less than 3% of indie game developers ever achieve meaningful success. How many brilliant games never got made because their creators hit a wall of &quot;ifs&quot; and &quot;thens&quot; and gave up?</p>
<p>The barrier to entry wasn't creativity. It was technical gatekeeping built into the tools themselves.</p>
<h2>Building what should have existed</h2>
<p>So 5 years ago I started building something different.</p>
<p>The pitch was simple: game development should be accessible to anyone with a creative vision. You shouldn't need a computer science degree to express yourself through interactive media. The tools should adapt to how creative people actually think, not the other way around.</p>
<p>VCs from Sequoia, Pear, Draper, and dozens of other firms told me it wouldn't work. It's B2C. The market isn't there. Indies don't pay for anything. You can't simplify game development without sacrificing capability. Gamers want complex games, and complex games require complex tools. Millions of excuses dressed up as market analysis.</p>
<p>People told me I was crazy. Maybe I was. But I kept coming back to the same question: why should multimillion dollar budgets be a prerequisite for creative expression? Movie directors and celebrity game producers have teams and resources. Everyone else gets a code editor and a prayer. I wanted to build the thing that closes that gap. You describe what you want, and it happens in front of your eyes. Every part of me knew this was right. I could feel it in every cell of my body.</p>
<p>Today thousands of people use Cinevva daily for 3D game assets, games, music, levels and experiences. Millions of views on projects created so far. Growing every single day. A two-minute pitch to Sand Hill Road isn't exactly the format for &quot;I failed the SAT but trust my intuition.&quot;</p>
<h2>What intuition actually means</h2>
<p><a href="https://singjupost.com/transcript-jensen-huangs-interview-cisco-ai-summit-2026/">Huang</a> wasn't just making a philosophical point. He was describing a real shift in what constitutes valuable intelligence.</p>
<p>For decades, we optimized for the wrong things. We built educational systems that rewarded memorization and calculation. We designed standardized tests that measured pattern-matching against previously seen problems. We hired people based on credentials that proved they could survive four years of academic gatekeeping. AI just made all of that less special.</p>
<p>What AI can't do, at least not yet, is sense what's missing. Feel when something is off. Intuit what people need before they can articulate it themselves. Read a room. Understand context that isn't captured in any dataset.</p>
<p>I poured my time, international life experience, money, and intuitive knowledge into building Cinevva. That's a mix hard to obtain in college. Hard to test for on the SAT. Hard to capture in any credential system designed before AI made raw cognitive horsepower abundant.</p>
<p>Sixteen or twenty years ago, computer scientists decided what tools should look like and how they should work. They built for themselves, for people who thought like them. The rest of us were expected to adapt. That era is ending. The people who will shape what comes next are the ones who understand what humans actually want. Who can feel when something is wrong and when something is right. Who build for people instead of for technical elegance.</p>
<p>I trusted something in myself that the system told me was worthless. And I was right.</p>
<hr>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/blog/2026-01-18-skills-over-degrees">The job market is transforming — from credentials to skills</a></li>
<li><a href="/guides/game-dev-courses">Online Game Development Courses</a> — skills-first paths that bypass traditional gatekeeping</li>
<li><a href="/signals/2026-03-04-everyone-wants-ai-game-engine">Everyone wants to be the AI game engine now</a> — the industry shift toward tools that adapt to how people think</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI controversy, trust, and the post‑AI economy for games]]></title>
            <link>https://app.cinevva.com/blog/2026-01-18-ai-controversy-and-post-ai-economy</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-01-18-ai-controversy-and-post-ai-economy</guid>
            <pubDate>Sun, 18 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[A practical view: AI isn't the point—trust is. Why labeling, filters, and fair distribution matter more than 'pro' vs 'anti' AI debates.]]></description>
            <content:encoded><![CDATA[<h1>AI controversy, trust, and the post-AI economy for games</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>AI in games became a contested subject around mid-2024. Jobs are disappearing and people are convinced they're next. The copyright questions are still open, the aesthetic debates loop back on themselves, and Steam is filling with releases nobody asked for. Underneath all of it sits a worry every creator now carries: whether they're making something or just typing prompts.</p>
<p>We run a platform, and one lesson arrives fast when you do. Nobody likes feeling tricked.</p>
<h2>The numbers</h2>
<p>We expected AI adoption to grow, but the shape of the 2025 numbers still surprised us.</p>
<table>
<thead>
<tr>
<th>What we tracked</th>
<th>2024</th>
<th>2025</th>
<th>The shift</th>
</tr>
</thead>
<tbody>
<tr>
<td>Steam games disclosing AI</td>
<td>~1,000</td>
<td>7,818</td>
<td>7x jump</td>
</tr>
<tr>
<td>New Steam releases using AI</td>
<td>~3%</td>
<td>~20%</td>
<td>One in five</td>
</tr>
<tr>
<td>Devs who think AI hurts quality</td>
<td>34%</td>
<td>47%</td>
<td>Thirteen points higher</td>
</tr>
<tr>
<td>Devs who think AI helps quality</td>
<td>n/a</td>
<td>11%</td>
<td>Not many</td>
</tr>
<tr>
<td>Revenue from AI-disclosed games</td>
<td>n/a</td>
<td>$660M</td>
<td>Twelve games broke 8 figures</td>
</tr>
</tbody>
</table>
<p>Sources: Tom's Hardware / Totally Human Media analysis, GDC 2025 Developer Survey, Unity 2025 Gaming Report</p>
<h2>What happened to make players this skeptical</h2>
<p>The skepticism has specific causes, and people remember them.</p>
<h3>Voice actors found out they'd been cloned on launch day</h3>
<p><em>Tomb Raider 4-6 Remastered</em> shipped with AI-generated versions of the original voice performances. The actors learned about it on launch day, at the same time as everyone else. The publisher eventually patched the voices out after legal pressure built up. The eleven-month SAG-AFTRA strike was driven by exactly this scenario.</p>
<h3>&quot;AI slop&quot; became a phrase</h3>
<p><em>Call of Duty: Black Ops 6</em> added AI disclosure to its Steam page after the game was already out. Players had noticed visual glitches scattered through it, including a loading screen character with six fingers. &quot;AI slop&quot; turned into shorthand for anything that looks hollow, as if nobody cared enough to check.</p>
<h3>An award nomination vanished</h3>
<p><em>Clair Obscur: Expedition 33</em> had its Game of the Year nomination pulled at the Indie Game Awards. The shipped game didn't use AI. The problem was AI placeholders during development, internal material that never reached players, and the final assets were entirely human-made. That didn't matter, and the argument about where the line should be ran for weeks.</p>
<h3>Teams that never touched AI had to prove it</h3>
<p><em>Chessplus</em> and <em>Peak</em> were both accused of using AI. Neither had, and both were award nominees. Both teams ended up digging through old screenshots and layer files to demonstrate that their work was handmade. The <em>Peak</em> team put it best: &quot;We might be slop, but we're human-made, locally-sourced artisanal slop.&quot;</p>
<h3>Studios went in opposite directions</h3>
<p>SNK's Discord moderators walked out after AI-looking visuals appeared in a <em>Fatal Fury: City of the Wolves</em> trailer. Games Workshop banned AI entirely across all Warhammer properties. Larian Studios said it used AI only for very early concept sketches on Baldur's Gate 3, with nothing in the final game. Tim Sweeney declared Steam's AI labels worthless and said to scrap them, and Valve replied that developers complaining about AI labels usually worry their work looks &quot;low effort.&quot;</p>
<h2>Finding games turned into a trust problem</h2>
<p>Games are now made faster than anyone can properly evaluate them, and the questions a player asks have changed. What am I looking at, who made it, will I regret the time I spend on it, and does any of it match what the trailer promised?</p>
<p>We don't expect a grand resolution or a definitive ruling on AI versus human-made. What's more likely is filters, real transparency, and incentive structures that reward honesty.</p>
<h2>Small studios in the middle</h2>
<p>Indie developers landed in a strange spot.</p>
<p>The upside is hard to dismiss. You iterate faster, costs drop when four people are making everything, solo developers can finish things, and localization stops eating the budget.</p>
<p>The downside is just as real. Output can feel generic. Training data and IP concerns are unresolved. Teams ship systems they don't fully understand, which some people call comprehension debt. And everyone gets grouped in with the flood of low-effort releases. Nearly half of surveyed developers think AI makes games worse overall.</p>
<p>Unity's 2025 report says 79% of developers feel positive about AI tools, which sounds definitive. The reality is messier. Teams doing this well tend to use AI for the tedious parts, rough passes and QA, and keep creative direction human.</p>
<h2>Where Cinevva lands: neutral on AI, strict on honesty</h2>
<p>We don't turn games away for using AI, and we don't give them special treatment either. The rule is simple: if AI was involved, say so. Players decide what they care about, and filters work once the labels are truthful. Our <a href="/ai-content">AI-generated content policy</a> spells it out.</p>
<h2>Filters work better than arguments</h2>
<p>The AI debate in games isn't heading for consensus, and it may never get there. Individual preferences are clear enough, though. Some players specifically want human-directed art, writing that came from a person, and visible craft. Others don't mind at all. Filters let both groups find what they're looking for, and nobody has to win the argument.</p>
<h2>Payment models matter more than opinions</h2>
<p>When revenue is tied to playtime instead of unit sales, you make money by getting players engaged quickly, keeping their attention, and delivering what your marketing promised. Quality becomes the obvious path and how you made the game matters less. A trailer that overpromises loses players immediately and retention drops. A trailer that shows exactly what players are getting keeps them, playtime builds, and revenue follows.</p>
<h2>What 2026 probably brings</h2>
<p>More rules, as the EU AI Act keeps expanding and US protections for voice and likeness grow after SAG-AFTRA. Specialized tools built for small teams and designed to keep humans steering. Smarter labels, because &quot;Made with AI&quot; is too crude and the useful distinction is between AI-assisted workflows and AI-generated final assets. Audiences splitting, with some players seeking out traditionally-made games and others not giving it a thought, both groups large enough to build for. And platform competition, where how storefronts handle transparency and discovery becomes a real differentiator.</p>
<h2>What moves things forward</h2>
<p>Arguing won't settle the AI question. Players picking based on what matters to them will, along with creators being open about how they work and platforms building tools that help both groups find each other. That's the post-AI economy: trust holding the whole thing together rather than warring camps.</p>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/ai-content">AI-generated content policy</a></li>
<li><a href="/creators">For game creators</a></li>
<li><a href="/faq">FAQ</a></li>
<li><a href="/guides/frontier-gen-ai-models">Frontier Open-Source Gen AI Models</a>: the specific models and how they work</li>
<li><a href="/signals/2026-03-06-open-source-ai-pollution">Open source has an AI pollution problem</a>: what happens when AI output floods open-source projects</li>
</ul>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The job market is moving from credentials to skills]]></title>
            <link>https://app.cinevva.com/blog/2026-01-18-skills-over-degrees</link>
            <guid isPermaLink="true">https://app.cinevva.com/blog/2026-01-18-skills-over-degrees</guid>
            <pubDate>Sun, 18 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[90% of companies now prioritize skills over degrees. Here's what this means for fresh graduates entering tech and game development.]]></description>
            <content:encoded><![CDATA[<h1>The job market is moving from credentials to skills</h1>
<p><em>By <a href="/about">Oleg Sidorkin</a>, CTO and Co-Founder of Cinevva</em></p>
<p>I watched my cousin graduate with honors in 2023. Computer science degree from a good state school, solid GPA. He spent fourteen months applying to jobs before landing one. Meanwhile, a friend who dropped out sophomore year to build indie games had three offers within a month of deciding to look.</p>
<p>That's no longer an anomaly. It's the pattern.</p>
<h2>The numbers caught up with what we'd been seeing</h2>
<p>By 2025, <strong>90% of HR leaders</strong> reported hiring outside traditional four-year degrees (<a href="https://fortune.com/2025/07/01/90-percent-hr-leaders-looking-to-hire-outside-of-traditional-college-degrees-as-they-prioritize-skills/">Fortune</a>). A quarter of U.S. companies dropped bachelor's requirements entirely (<a href="https://www.hrdive.com/news/employer-eliminate-degree-requirements-2025/748998/">HR Dive</a>). And if you just finished paying off loans, the next number stings: <strong>94% of employers say skills-based hires outperform those hired on credentials</strong> (<a href="https://www.forbes.com/sites/cynthiapong/2024/12/26/90-of-companies-make-better-hires-based-on-skills-over-degrees/">Forbes</a>).</p>
<p>Verizon now says 99% of its roles don't require a degree. Sergey Brin admitted Google hires &quot;tons&quot; of people without bachelor's degrees. IBM made half its U.S. openings degree-optional through its &quot;New Collar&quot; program.</p>
<p>This isn't companies being charitable. They found that degrees weren't predicting who'd be good at the job.</p>
<h2>Why the old system broke</h2>
<p>Degrees became a lazy filter.</p>
<p>When you're hiring and you've got 400 applications, requiring a bachelor's degree cuts the pile in half. It doesn't tell you who can do the work. It tells you who had the money, the time, and the family stability to sit in classrooms for four years. That correlation with ability was always weaker than we pretended.</p>
<p>Then three things happened at once.</p>
<p><strong>The skills moved too fast.</strong> Game engines, AI tools, web frameworks. By the time a curriculum committee approves a course on something, that thing is already outdated. A four-year degree teaches you theory from four years ago, and in tech that's ancient history.</p>
<p><strong>Portfolios became undeniable.</strong> There's no need to guess whether someone can code when you can look at their GitHub, or whether they can ship a game when their <a href="http://itch.io">itch.io</a> page has five finished projects with player reviews.</p>
<p><strong>Companies got desperate.</strong> The talent shortage is real. Excluding everyone without a degree means excluding people who might be exactly what you need. Some hiring managers learned this the hard way, after watching self-taught developers outperform their credentialed hires.</p>
<h2>The game industry saw this coming</h2>
<p>I think games have been ahead of the curve here, and the reason is worth understanding.</p>
<p>Studios never cared much where you went to school. They cared what you shipped. A polished 48-hour jam game tells a hiring manager more than a four-year game design degree ever could. It proves you can finish things under pressure, that you made hard decisions about scope, and that the game is playable rather than theoretical.</p>
<p>If you're trying to break into games in 2026, what matters is this (<a href="https://www.dice.com/career-advice/aspiring-video-game-designers-in-2025-what-you-need-to-know">Dice</a>, <a href="https://combinegr.com/2025-global-gaming-employment-outlook-trends-talent-strategy/">CombineGR</a>): two or three polished, playable demos, case studies explaining what you did and why, evidence that you finish things, and fluency with at least one major engine, shown through real projects.</p>
<p>Hiring managers are looking for proof rather than potential.</p>
<h2>The uncomfortable part</h2>
<p>One finding frustrated me when I dug into the research.</p>
<p>A Harvard/Burning Glass study found that companies dropping degree requirements often didn't hire more non-degreed candidates. The increase was only about 3.5 percentage points (<a href="https://www.forbes.com/sites/jenamcgregor/2024/02/14/companies-are-dropping-diploma-requirements-for-more-jobs-but-hiring-few-non-degreed-workers-to-fill-them/">Forbes</a>). The policy changed and the hiring practices lagged.</p>
<p>That means if you're going the non-traditional route, you still have to work harder. The door is more open than it used to be, but you're not walking through on equal footing yet. Your portfolio needs to be undeniable, and your projects need to speak louder than someone else's credential.</p>
<p>It isn't fair, but knowing it helps you prepare.</p>
<h2>What I'd tell someone starting out right now</h2>
<p>If you're in school, don't stop. But understand that the degree alone isn't enough anymore. Build things on the side. Do game jams. Get a <a href="https://grow.google/certificates/">Google Career Certificate</a> or Unity certification. Treat the degree as one credential among several rather than the credential.</p>
<p>If you're not pursuing a degree, you have a different path, and it isn't necessarily a harder one. Build aggressively. Ship things. Document everything. Your <a href="https://github.com">GitHub</a>, your <a href="https://itch.io">itch.io</a> page and your personal site are your credential now.</p>
<p>Either way, practice explaining your work: what you built, why you made the choices you made, what you'd do differently, and what you learned. Interviewers remember people who can articulate their thinking.</p>
<h2>This is bigger than hiring</h2>
<p>The shift in how companies fill roles is also a shift in what we collectively value.</p>
<p>For decades, credentials served as a filter. Expensive and time-consuming, but legible. If someone had a degree, you could assume certain things. It was a signal rather than a direct measure, and it was good enough.</p>
<p>That signal is breaking now. Technology makes it possible to see what someone can do. Remote work proved that outputs matter more than where you sat. AI is making theoretical knowledge less valuable than practical application.</p>
<p>I find this hopeful, even if the transition is messy. The question used to be &quot;where did you study?&quot; Now it's &quot;what can you build?&quot;, and that's a better question.</p>
<h2>Sources</h2>
<ul>
<li><a href="https://fortune.com/2025/07/01/90-percent-hr-leaders-looking-to-hire-outside-of-traditional-college-degrees-as-they-prioritize-skills/">Fortune: 90% of HR leaders hiring outside traditional degrees</a></li>
<li><a href="https://www.forbes.com/sites/cynthiapong/2024/12/26/90-of-companies-make-better-hires-based-on-skills-over-degrees/">Forbes: 90% of companies make better hires based on skills</a></li>
<li><a href="https://www.forbes.com/sites/jenamcgregor/2024/02/14/companies-are-dropping-diploma-requirements-for-more-jobs-but-hiring-few-non-degreed-workers-to-fill-them/">Forbes: Companies dropping degree requirements but hiring few non-degreed workers</a></li>
<li><a href="https://www.hrdive.com/news/employer-eliminate-degree-requirements-2025/748998/">HR Dive: Employers eliminating degree requirements</a></li>
<li><a href="https://www.computerworld.com/article/1623286/no-degree-no-problem-tech-firms-move-away-from-college-requirement-for-new-hires.html">Computerworld: Tech firms move away from college requirement</a></li>
<li><a href="https://www.dice.com/career-advice/aspiring-video-game-designers-in-2025-what-you-need-to-know">Dice: Aspiring video game designers in 2025</a></li>
<li><a href="https://combinegr.com/2025-global-gaming-employment-outlook-trends-talent-strategy/">CombineGR: 2025 Global Gaming Employment Outlook</a></li>
</ul>
<p><strong>Related:</strong></p>
<ul>
<li><a href="/guides/game-jams-hackathons">How to succeed in game jams</a></li>
<li><a href="/guides/game-dev-courses">Online Game Development Courses</a>: skills-first learning paths for every budget</li>
<li><a href="/tutorials/agentic-code-tools">Agentic AI code tools</a>: the tools reshaping what skills matter</li>
<li><a href="/blog/2026-02-10-the-intuitive-mind">The intuitive mind</a>: why intuition matters more than credentials</li>
</ul>
]]></content:encoded>
        </item>
    </channel>
</rss>
