Mesh resident block models with native culling and UV-aware merging
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
`horizon-world::block_render::FaceVisibility` decides whether to emit a model
|
||||
quad with a culling direction beside a neighboring block. It prepares immutable
|
||||
face geometry from the pinned raw occlusion shapes, shares faces across states,
|
||||
and caches shape-pair subtraction with bounded memory. It is ready for chunk
|
||||
meshing; it does not yet replace the development scene's cube-only culling.
|
||||
and caches shape-pair subtraction with bounded memory. The development client
|
||||
now uses it for resident chunk model meshing, including cross-chunk neighbors.
|
||||
|
||||
The decision preserves the native order: a canonical full neighbor face hides
|
||||
the quad, block-specific suppression can hide it, canonical empty faces bypass
|
||||
|
||||
+34
-17
@@ -1,28 +1,33 @@
|
||||
# Horizon native development client
|
||||
|
||||
`horizon-client` opens a native Rust window and renders a controlled block scene
|
||||
stored in Horizon's resident chunks, alongside sixteen blockstate-driven model placements. It
|
||||
loads the block registry, models and sprites from pinned Java Edition 26.3
|
||||
resources. A padded chunk mesh
|
||||
culls hidden faces across chunk boundaries and merges adjacent matching faces;
|
||||
the GPU draws the rectangles as instances. A separate instanced draw renders
|
||||
baked cuboid faces without expanding them into cube approximations. The camera
|
||||
is a free inspection tool.
|
||||
stored in Horizon's resident chunks. Every occupied cell selects models from its
|
||||
registry state, including the terrain and sixteen featured placements. It loads
|
||||
block definitions, cuboid models, sprites and occlusion grids from pinned Java
|
||||
Edition 26.3 resources. Model selection uses the default block position seed;
|
||||
neighbor visibility uses the validated Rust face rules across chunk boundaries.
|
||||
The camera remains a free inspection tool.
|
||||
|
||||
Eligible opaque unit-cube faces use greedy rectangles only when texture layer,
|
||||
UV rotation/mirroring and shading match. Each rectangle retains its signed UV
|
||||
basis, so weighted texture variation survives merging. Other baked geometry and
|
||||
binary-alpha cutouts use the separate model-face instance pipeline. Geometry
|
||||
with nonintegral UV-lock rounding also stays on that path.
|
||||
|
||||
This checkpoint has no player simulation, vanilla world generation, block
|
||||
interaction, inventory, sound, networking or world save/load. It does not meet
|
||||
the [playable-build acceptance criteria](rust-parity.md#completion-criteria-and-playable-builds).
|
||||
The model gallery now uses blockstate dispatch, weighted variants, multipart
|
||||
conditions and transformed baking. Chunk-wide model rendering, fractional
|
||||
transparency, tinting, lighting, resource packs, chunk streaming and full visual
|
||||
parity remain unfinished.
|
||||
The controlled chunk scene now uses blockstate dispatch, weighted variants,
|
||||
multipart conditions and transformed baking. Full block-catalog material support,
|
||||
fractional transparency, tinting, lighting, resource packs, chunk streaming and
|
||||
full visual parity remain unfinished.
|
||||
|
||||
The resource gallery sits beside the pyramid and includes oak stairs, a slab,
|
||||
an anvil, a torch, a lantern, connected fences and iron bars, a cobweb, a wall
|
||||
grindstone, a ladder, a sideways amethyst cluster and four weighted stone
|
||||
placements. Registry state properties select the models: the stairs are an
|
||||
upside-down inner corner, the slab is a top slab and the fence gate is open.
|
||||
These remain static inspection placements without simulation callbacks. Binary-alpha cutouts are rendered;
|
||||
These are resident chunk states; simulation callbacks remain unfinished. Binary-alpha cutouts are rendered;
|
||||
the lantern's three frames advance every eight inspection ticks at 20 ticks/s.
|
||||
The animation metadata codec and frame selection now use the shared
|
||||
`horizon-assets` implementation checked against the pinned client. GPU
|
||||
@@ -170,8 +175,8 @@ selector and predicate cases: 3,802 definitions and 687,466 state results match,
|
||||
with 220 expected binding errors. It checks the native replacement-before-abort
|
||||
behavior for overlapping variants, eager multipart validation even when variants
|
||||
cover every state, integer-property aliases, nested conditions and empty part
|
||||
selections. The development gallery now uses this binder; general chunk model
|
||||
rendering remains unfinished.
|
||||
selections. The controlled chunk renderer now uses this binder for its model
|
||||
catalog.
|
||||
|
||||
The Java integer-property parser is shared by `horizon-core`, client binding and
|
||||
world-state decoding. Its [codec regression](../benchmarks/rust-blockstate-model-binding-2026-10-06/shared-integer-codec.json)
|
||||
@@ -231,8 +236,8 @@ python3 tools/test_native_client.py --vscreen
|
||||
The mesh tests compare expanded rectangles against independently enumerated
|
||||
exposed voxel faces, including solid neighbors, cavities, material boundaries,
|
||||
negative chunk origins and random surroundings. The startup runner launches a
|
||||
nine-chunk scene, requires 30 presented frames and a clean exit, verifies 209
|
||||
baked gallery faces across 18 sprite layers, and writes GPU,
|
||||
nine-chunk scene, requires 30 presented frames and a clean exit, verifies 3,169
|
||||
greedy cube rectangles and 179 other model faces across 18 sprite layers, and writes GPU,
|
||||
platform, binary and source information to ignored
|
||||
`.local/horizon-client/startup-smoke.json`. It has an external timeout as well as
|
||||
the application's frame deadline. These checks do not establish gameplay or
|
||||
@@ -265,4 +270,16 @@ IDs, properties, positions and models are recorded in the startup report.
|
||||
|
||||
[Neighbor-face visibility](face-visibility.md) now has native client/server
|
||||
coverage across all registered states and suppression-rule families. Integrating
|
||||
that result with resident chunk model meshing is the next rendering step.
|
||||
that result with resident chunk model meshing is now covered by the scene check
|
||||
below.
|
||||
|
||||
The [resident-model report](../benchmarks/rust-native-chunk-models-2026-10-06/startup-smoke.json)
|
||||
checks all 10,919 occupied cells in the bounded startup scene against a separately
|
||||
constructed native scene. Actual Java state-model selection, parent geometry,
|
||||
rotated culling directions and `Block.shouldRenderFace` produce the same 5,991
|
||||
visible and 59,636 culled model faces. The sixteen featured model selections also
|
||||
retain their direct native comparison. Expanded greedy-rectangle tests cover
|
||||
rotated and mirrored UV bases, texture and shade boundaries, negative origins,
|
||||
neighbor seams and cavities; cube projection tests cover all XYZ quarter turns.
|
||||
These checks cover CPU mesh behavior and GPU startup, not native shader pixels
|
||||
or a hardware performance comparison.
|
||||
|
||||
+8
-5
@@ -3,8 +3,8 @@
|
||||
The behavior target is the repository's pinned **Minecraft Java Edition 26.3**.
|
||||
One-to-one vanilla gameplay parity is the acceptance criterion. It has **not**
|
||||
been reached. Horizon now has a [native development client](native-client.md)
|
||||
that renders a controlled block scene and sixteen blockstate-driven model placements with a
|
||||
free camera. It does not run a
|
||||
that renders a controlled resident-chunk scene with blockstate-selected models
|
||||
and a free camera. It does not run a
|
||||
complete game server or gameplay simulation.
|
||||
The Rust workspace implements core arithmetic/random streams, world data and
|
||||
resident sections, scheduled tick ordering, geometry, contained fluid states,
|
||||
@@ -24,11 +24,14 @@ binding now also matches native selection across registered and special
|
||||
item-frame states. Weighted selection and multipart random draw consumption
|
||||
also match native traces. Transformed baking now checks every bundled
|
||||
model/rotation/UV-lock tuple and all XYZ quarter-turn combinations against native
|
||||
geometry by exact float bits. The native renderer now draws an
|
||||
inspection gallery from registry-bound, selected and transformed models, including binary
|
||||
geometry by exact float bits. The native renderer now draws its controlled
|
||||
resident chunks from registry-bound, selected and transformed models, including binary
|
||||
cutouts, multipart connections, weighted stone variants and stepped lantern
|
||||
animation. All 16 scene selections match native model collection. These are not
|
||||
yet gameplay blocks; general chunk model rendering remains unfinished.
|
||||
yet simulated gameplay blocks. Resident chunk meshing now preserves weighted
|
||||
variants and UV orientation when greedily merging matching cube faces, and uses
|
||||
native-checked neighbor visibility. Full block-catalog material support, lighting
|
||||
and chunk streaming remain unfinished.
|
||||
[Neighbor face visibility](face-visibility.md) now matches both reference JARs
|
||||
across 1,441,816 state pairs, including all pinned suppression-rule families.
|
||||
Animation metadata, frame sequences and tick-state selection now have native
|
||||
|
||||
Reference in New Issue
Block a user