Repository navigation
Feature/auto lod - #117
Merged
Merged
Feature/auto lod#117
Conversation
mattvb91
force-pushed
the
feature/auto-lod
branch
from
December 1, 2026 19:29
6335a16 to
752e01a
Compare
Models get an Auto LOD option. Each mesh is split into clusters of about 128 triangles, then groups of neighbouring clusters are simplified to half with their shared borders locked, level by level, into a hierarchy (meshoptimizer). Each frame the renderer draws, per cluster, the coarsest level whose error stays under a pixel threshold, so detail falls off across a mesh without cracks or popping between hand-made LODs. - AutoLod/buildClusterDag builds the hierarchy; selectClusters picks the clusters for a view; AutoLodMesh swaps a mesh's index buffer for the chosen clusters, sharing its vertex attributes and material - The clusters are saved as <model>.lod.bin next to the model through a new dev server endpoint, and built while loading when missing or stale - Model props autoLod and lodErrorPixels, with fields in the Properties panel (scene objects can now give the panel fields, and an info field shows text), and a cluster view and triangle count in Render debug - Skinned, morphing, instanced, multi-material and small meshes stay as they are
…connect
- The sky system waited for the connection with geckos' socket.onConnect(),
which starts another connection: the second WebRTC handshake broke the
first ("Cannot set a local answer in state stable"). NetworkManager now
triggers `connect`, which the sky listens to instead
- The editor's sync overlay and Network panel no longer poll
GET /api/game/dev/net/sync. They send cl_sync_watch, and a dev server
sends sv_sync then and whenever the sync changes, checked up to 4 times
a second. Counters that move every tick don't count, so an idle world
sends nothing. The HTTP endpoint stays for the CLI and MCP tools
… mode - Vegetation and scatter brush entries get an Auto LOD option: their instanced meshes draw fixed levels of detail cut from the model's cluster hierarchy, per Foliage chunk or per scatter instance by distance - Each imported model has a max triangles setting, its finest detail, saved next to it as <model>.lod.json and followed live by every Model and brush using it. Set in the asset preview, a Model's properties and the Poly Haven preview, which shows the model at that cap - LOD distance slider on Models; an LOD levels shading mode colouring Auto LOD triangles by level - The dev server saves Auto LOD files next to models a plugin imported - Vegetation groups save on their own after each edit, rather than only on Save, so models dragged in aren't lost when the panel reloads
mattvb91
force-pushed
the
feature/auto-lod
branch
from
December 1, 2026 20:44
cd55161 to
94b0c88
Compare
…r groups - Scatter brush and vegetation entries get lodScale and lodErrorPixels, with sliders in the brushes panel next to the model's triangle cap - Cluster DAG building tries pruning loose pieces, then sloppy simplification, when edge collapses can't reduce a group; bump the LOD file version so existing .lod.bin files are rebuilt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.