Repository navigation
feat(examples): add ray-cast-space and lattice-deform - #304
Merged
Merged
Conversation
ray-cast-space: Object.ray_cast takes object-local coordinates; Scene.ray_cast takes world coordinates. The script casts five closed-form rays at a block that is translated, rotated about Z and scaled unevenly. - Scene.ray_cast hits every world point and normal exactly (exit 3). - Object.ray_cast, given matrix_world.inverted() origins and directions mapped through the 3x3 only, hits the same polygons and maps back within 5e-7 m (exit 4). - World coordinates passed straight to Object.ray_cast land at least 0.287 m from the true hits (exit 5). - --world-to-object exits 4 with a 1.125 m error. lattice-deform: a 2x2x2 KEY_LINEAR lattice with two corners moved through co_deform puts all 602 evaluated vertices on the trilinear closed form, max error 5.6e-7, through a translated and unevenly scaled lattice. - An unmoved lattice is the identity (exit 3). - The mesh really does move (exit 5). - --bspline, the default interpolation, misses by 0.2145 and exits 4. Both pass the default check on Blender 4.5.11, 5.1.2 and 5.2.1, and each falsifier is proven on 4.5.11 and 5.2.1. Contact sheets are committed under docs/gallery/contact-sheets/. Counts are updated in README, AGENTS, CLAUDE and new-example-prompt; the AGENTS and CLAUDE showcase counts are corrected from 67 to 72 as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
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.
Adds two rendered gallery examples taken from the ROADMAP candidate pool.
ray-cast-space
Contract:
Object.ray_casttakes object-local coordinates andScene.ray_casttakes world coordinates. The script casts five closed-form rays at a block that is translated, rotated 32° about Z and scaled 1.55 × 0.62 × 0.62.Scene.ray_casthits every world point and normal exactlyObject.ray_cast, fedmatrix_world.inverted()origins and directions mapped through the 3×3 only, hits the same polygon. Mapped back, it lands within 5e-7 mObject.ray_castmust land at least 0.25 m off (measured: 0.287 m). Without this, the trap check could pass by coincidenceFalsifier:
--world-to-objectexits 4. Ray 0 mapped back lands 1.1253 m off and hits polygon 2 instead of 3.lattice-deform
Contract: a 2×2×2 lattice with
interpolation_type_u/v/w = 'KEY_LINEAR', two top corners moved throughLatticePoint.co_deform, read back through the depsgraph (evaluated_get/to_mesh/to_mesh_clear). All 602 evaluated vertices land on the trilinear closed form, max error 5.62e-07. The lattice object is translated and scaled unevenly.Falsifier:
--bspline(the default interpolation) exits 4. The max error is 0.2145.Evidence: live local runs
All binaries are under
.scratch/; each run went through a single-Blender lock.--world-to-object--bsplineScene.ray_castexit 3 (1.46 m off). An identity transform exits 5.tests/smoke/run_example.pyreports[PASS]for lattice-deform on 5.2.1 and 4.5.11.Contact sheets (
docs/gallery/contact-sheets/)Wiring
examples/gallery.json,tests/smoke/catalog.jsonand.cursor-plugin/plugin.jsonhave entries for both examples.use_outside.docs/gallery/is regenerated. The alt text and witnesses callout on both new pages matchgallery.jsoncharacter for character.Local checks (all pass):
check_site_links(129 pages, 0 failures),check_exit_code_readme,check_engine_id,check_gallery_images,check_falsifier_targets.Established by inspection only: the heroes were produced by a scratch stand-in that calls
render_hero.py's functions with the same settings, becauserender_hero.pyrejects names that are not yet ingallery.json. With the entries now wired,render_hero.py --only <name>reproduces them.🤖 Generated with Claude Code