Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge main and raise the archive budget for the modifiers and navigation (part of #42)

Nguyen Xuan An97bcb833e492
diff --cc CHANGELOG.md
index 660884c6,86cd3e0e..51f91fd3
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,9 -2,8 +2,11 @@@
## Unreleased
+- Add the `weighted_normal` and `smooth_by_angle` modifiers as edits and stack nodes (part of issue #42). `smooth_by_angle` marks edges over an angle sharp and the rest smooth, overriding the geometry `smoothAngle`; `weighted_normal` stores an area-weighted normal per corner that the render extraction uses as is. The edge attribute `smooth` is new.
+- Add the `lattice`, `curve`, `hook` and `wave` modifiers as edits and stack nodes (part of issue #42). `lattice` moves up to 64 control points of a grid over the mesh bounds, `curve` bends a mesh along a Catmull-Rom path, `hook` pulls the vertices near a point and `wave` is a travelling ripple that matches Blender 5.2 at the same frame on two cases. Lists are bounded and the errors name the limit.
+- Add the `screw`, `wireframe` and `skin` modifiers as edits and stack nodes (part of issue #42). `screw` revolves the edges of a mesh about an axis with steps, iterations and lift, and `wireframe` leaves a rim on every face with thickness, offset and even offset; both match Blender 5.2 on counts, area and positions (`wireframe` on three cases, `screw` on two). `skin` is a simple version, a closed square tube per edge with a radius per vertex and no branch solver. Sizes are bounded and the errors say what to lower. Details are in `scene_capabilities` `meshModifiers`, and the modifier entry of the mesh tool schemas is now one free record that the backend validates, so the schemas no longer grow with each modifier.
+ - Compare cloth with a Blender cloth bake by picture and find why the drape did not match (part of issue #62, which stays open: soft bodies are not built). `npm run reference -- --cloth` renders a pinned banner in wind (1 and 2 s) and a sheet dropped on a ball (0.5, 1 and 2 s) from 67js and from Blender's cloth modifier in Cycles and EEVEE and scores them with FLIP into `bench/reference/cloth.json`: the banner scores 0.043 against Cycles (EEVEE 0.042) and the drape 0.08 to 0.09 (EEVEE 0.04). The earlier 63 percent drape mismatch was a mirrored vertex order in `scripts/blender-cloth.py` plus Blender's default air damping, which on a 3 g particle is a drag of about 54 per second against 0.3 here. Cloth `damping` now accepts up to 100 per second. With the drag matched, the sheet lands like Blender within 5 percent at 0.5 s; Blender then wrinkles into a bell while this solver hangs smooth panels.
+
- Add walking routes over terrain with holes (part of issue #64; splat layers stay at four, see `docs/terrain.md`). `addons/navmesh` builds a walkable grid from triangles (slope limit, agent radius, holes, obstacle footprints) and `findPath` runs A* with line-of-sight string pulling, deterministic, with cell and search budgets that throw a `RangeError` naming what to raise. `scene_inspect` takes `path: { ground, from, to, avoid, ... }` and returns keyframes for a node translation track, described in `scene_capabilities` `navigation`; the `scene_capabilities` result grew by 624 bytes and the `scene_inspect` schema by one record field. The suite gets `terrain-path-walk` (two holes and a rock) and records `pathQueries`; the `walkPath` check takes several openings and `avoidNodes`. Size: `entry:navmesh` 3,257 B gzip, `agent-scene+lazy` +4.5 KB, core entries unchanged.
- Darken the automatic floor and measure the default look with a blind pairwise judge (part of issue #53). `bench/agent-modeling/default-judge.mjs` draws the six cold recipes under two defaults from the three-quarter view and the recipe camera (what `scene_look` draws), shows a Sonnet judge both in a seeded random order and reports wins with an exact binomial p. The current default beats no floor 18 of 18 (p 0.0000076, 9 of 9 in each position); the control, one image against itself, picks "first" 17 of 18, so a tie goes to the first. The floor colour goes from 0.6, 0.6, 0.58 to 0.22, 0.22, 0.21 because the judge named a floor too close to the backdrop: it beats the old floor 18 of 18, while 0.38 won 13 of 18 (p 0.096) and was dropped. Only recipes that get the automatic floor change; the judge spend was $4.50, above its $4 plan. Core did not change.
diff --cc bench/size/budgets.json
index 91a71478,5e6a9001..96432618
--- a/bench/size/budgets.json
+++ b/bench/size/budgets.json
@@@ -1,5 -1,5 +1,5 @@@
{
-- "archiveBytes": 724000,
++ "archiveBytes": 732000,
"goals": {
"lit-box": 50000,
"gltf-box": 80000,
diff --cc docs/parity.md
index cbbd8be1,87d8b94f..976df052
--- a/docs/parity.md
+++ b/docs/parity.md
@@@ -106,11 -106,11 +106,11 @@@ To move to a new Blender release, run `
| Modeling > Modifiers > Deform > Surface Deform Modifier | missing | `addons/surface-attachment` binds points, not whole meshes. | | |
| Modeling > Modifiers > Deform > Volume Displace Modifier | missing | No volume objects. | | |
| Modeling > Modifiers > Deform > Warp Modifier | missing | No equivalent. | | |
-| Modeling > Modifiers > Deform > Wave Modifier | missing | No equivalent. Not in the first slice of #42, which took the modifiers agents use most. | | #42 |
+| Modeling > Modifiers > Deform > Wave Modifier | partial | `wave` edit and stack node: height, width, narrowness, speed, frame `time`, offset, start, cyclic, x and y axes and along the normal. Positions match Blender at the same frame on 2 cases. No falloff, lifetime or damping, no texture and no vertex groups. | [mesh-deform-modifiers](../tests/mesh-deform-modifiers.test.js), [Blender results](../tests/fixtures/blender/golden.json) | #42 |
| Modeling > Modifiers > Normals > Normal Edit Modifier | missing | No equivalent. | | |
-| Modeling > Modifiers > Normals > Weighted Normal Modifier | missing | No equivalent. Not in the first slice of #42, which took the modifiers agents use most. | | #42 |
-| Modeling > Modifiers > Normals > Smooth By Angle Modifier | partial | `smoothAngle` is a geometry setting. It is not a stack node. Not in the first slice of #42, which took the modifiers agents use most. | | #42 |
+| Modeling > Modifiers > Normals > Weighted Normal Modifier | partial | `weighted_normal` edit and stack node: face area weighting with a `weight` from 1 to 100 (power weight / 50) inside smooth groups bounded by sharp edges and an `angle`, stored as one normal per corner that the render uses. No corner angle or face influence modes, no keep-sharp switch, no vertex groups and no Blender comparison of normals. | [mesh-normal-modifiers](../tests/mesh-normal-modifiers.test.js) | #42 |
+| Modeling > Modifiers > Normals > Smooth By Angle Modifier | done | `smooth_by_angle` edit and stack node with `angle` and `ignoreSharp`: edges bending more than the angle become sharp, the rest smooth, over the geometry `smoothAngle`. Hand-marked sharp edges stay unless ignored, as in Blender. No vertex groups and no Blender comparison of normals. | [mesh-normal-modifiers](../tests/mesh-normal-modifiers.test.js) | |
- | Modeling > Modifiers > Physics > Cloth Modifier | partial | Recipe `cloth`: a position-based sheet solver with pinned edges, steady wind, gravity and fixed ball or box colliders, recorded at 60 frames a second so a seek repeats exactly. No self collision, no per-vertex stiffness or pin weights. A hanging sheet matches a Blender bake to 0.08 percent of its height; a sheet dropped on a ball does not match (mean vertex distance 63 percent of the sheet size at 2 s, 58 percent at 8 s). It is not stretch (longest edge 1.02 against 1.05, area 1.003 against 1.013); Blender's bake had not settled even at 8 s. See docs/physics.md. | [cloth](../tests/cloth.test.js), [cloth-blender](../tests/cloth-blender.test.js) | #62 |
+ | Modeling > Modifiers > Physics > Cloth Modifier | partial | Recipe `cloth`: a position-based sheet solver with pinned edges, steady wind, gravity and fixed ball or box colliders, recorded at 60 frames a second so a seek repeats exactly. No self collision, no per-vertex stiffness or pin weights. A hanging sheet matches a Blender bake to 0.08 percent of its height. A sheet dropped on a ball lands like Blender with the drag matched (mean vertex distance 5 percent at 0.5 s) and then drapes as smooth flat panels where Blender wrinkles into a bell (17 percent at 1 s, 35 percent at 2 s); the old 63 percent came from mirrored vertex pairing and a 180 times difference in air drag. Picture scores against Cycles (FLIP): banner 0.043, drape 0.08 to 0.09, EEVEE 0.04. See docs/physics.md and bench/reference/README.md. | [cloth](../tests/cloth.test.js), [cloth-blender](../tests/cloth-blender.test.js) | #62 |
| Modeling > Modifiers > Physics > Collision Modifier | partial | Rapier colliders fitted to recipe geometry as box, ball, capsule, convex hull or trimesh, so a body rests on an authored mesh. | [agent-physics](../tests/agent-physics.test.js) | #61 |
| Modeling > Modifiers > Physics > Dynamic Paint Modifier | missing | No equivalent. | | |
| Modeling > Modifiers > Physics > Explode Modifier | missing | No equivalent. | | |