Finish local geometry node sample corpus
This commit is contained in:
parent
9bc09bb7c2
commit
182b2f17c6
14 changed files with 1387 additions and 41 deletions
|
|
@ -117,9 +117,12 @@ Completed Cartesian function graph entry:
|
|||
Completed pie chart entry:
|
||||
|
||||
- `docs/research/translations/shriinivas-piechart.md`
|
||||
- Source groups: `NodeGroup`, `Pie Chart`
|
||||
- Source groups: `NodeGroup`, `Pie Chart`, `getPie.002` through
|
||||
`getPie.012`, `Extended Pie Chart`
|
||||
- Verification: translated segment and three-slice chart match evaluated source
|
||||
geometry with sorted max vertex delta `0.0` in Blender 5.1.1.
|
||||
geometry with sorted max vertex delta `0.0` in Blender 5.1.1; extended
|
||||
segment and extended ten-slice chart also match source geometry with sorted
|
||||
max vertex delta `0.0`.
|
||||
|
||||
Completed field value helper entry:
|
||||
|
||||
|
|
@ -142,24 +145,24 @@ Completed field value helper entry:
|
|||
Completed parametric/polar equation entry:
|
||||
|
||||
- `docs/research/translations/shriinivas-paramnpolareq.md`
|
||||
- Source groups: `NodeGroup`, `NodeGroup.001`, `NodeGroup.002`,
|
||||
`NodeGroup.003`, `Archimedes Spiral`, `Epicycloid`,
|
||||
`Geometry Nodes Group.002`
|
||||
- Source groups: `chooseFloatVal`, `chooseFloatVal.001`, `chooseStrVal`,
|
||||
`chooseStrVal.001`, `NodeGroup`, `NodeGroup.001`, `NodeGroup.002`,
|
||||
`NodeGroup.003`, `getxy.001`, `Archimedes Spiral`, `Epicycloid`,
|
||||
`Geometry Nodes Group`, `Geometry Nodes Group.002`
|
||||
- Verification: scalar equation helpers match by placing outputs into a single
|
||||
vertex position; Archimedes, epicycloid, and mirrored root spiral evaluated
|
||||
vertices match source geometry with max sorted deltas at or near `0.0`.
|
||||
- Translation value: accumulated parameter ramps, parametric equations, polar
|
||||
conversion, mirrored curve streams, and scalar-harness design.
|
||||
|
||||
Started CurveToMeshUV utility entry:
|
||||
Completed CurveToMeshUV utility entry:
|
||||
|
||||
- `docs/research/translations/quellenform-curve-to-mesh-uv.md`
|
||||
- Source group translated so far: `Auto Smooth`
|
||||
- Source groups: `Auto Smooth`, `Curve to Mesh UV`, `_258246`, `_Title`
|
||||
- Verification: source and translated `Auto Smooth` preserve cube geometry and
|
||||
match smooth-face flags in Blender 5.1.1.
|
||||
- Boundary: the main `Curve to Mesh UV` group is a 126-node utility graph and
|
||||
should be approached through staged subcontracts: curve resampling, spline
|
||||
parameter UVs, cap masks, named attributes, then final mesh output.
|
||||
match smooth-face flags in Blender 5.1.1; main utility mesh, UV-field
|
||||
harness, caps-mask harness, demo geometry, and title geometry all match
|
||||
source evaluated geometry.
|
||||
|
||||
## Extraction Workflow
|
||||
|
||||
|
|
|
|||
|
|
@ -484,6 +484,38 @@ there looking employed.
|
|||
|
||||
Verification cue: choose cases on both sides of the branch boundary.
|
||||
|
||||
## Clone Families Want Tables
|
||||
|
||||
Reach for Python tables when a source file contains numbered near-clones:
|
||||
`getPie.002`, `getPie.003`, `getPie.004`, and so on.
|
||||
|
||||
Mental move: identify the stable contract once, then express each clone as a
|
||||
row of values feeding the same group. Do not preserve source duplication as
|
||||
though repetition itself were insight.
|
||||
|
||||
```python
|
||||
values = [value_1, value_2, value_3, value_4]
|
||||
labels = [label_1, label_2, label_3, label_4]
|
||||
start_angle = 0.0
|
||||
segments = []
|
||||
|
||||
for index, (segment_value, label) in enumerate(zip(values, labels), start=1):
|
||||
end_angle, geometry = vg_extended_pie_segment(
|
||||
value=segment_value,
|
||||
total=total,
|
||||
start_angle=start_angle,
|
||||
text=label,
|
||||
)
|
||||
segments.append(geometry)
|
||||
start_angle = end_angle
|
||||
```
|
||||
|
||||
Metaphor in use: clone families are form letters. Python fills the blanks;
|
||||
Geometry Script emits the one reusable machine.
|
||||
|
||||
Verification cue: verify at least one member alone and the composed family.
|
||||
The contract can be correct while baton order in the compositor is wrong.
|
||||
|
||||
## Boolean Thickets Are Often Tables
|
||||
|
||||
Reach for table translation when a dense boolean region is mostly comparisons
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
`Curve to Mesh UV v1.7.02.230213-FREE - Blender 3.4+.blend`
|
||||
- Source group translated in this pass:
|
||||
- `Auto Smooth`
|
||||
- `Curve to Mesh UV`
|
||||
- `_258246`
|
||||
- `_Title`
|
||||
- Geometry Script recreation:
|
||||
`examples/geometry_script/quellenform_curve_to_mesh_uv.py`
|
||||
|
||||
|
|
@ -17,8 +20,9 @@ resampling, spline parameters, UV fields, capture attributes, endpoint masks,
|
|||
domain-size accounting, and named attribute outputs. That is useful quarry, but
|
||||
not a single-pass snack.
|
||||
|
||||
`Auto Smooth` is the small utility attached to that system. It teaches how a
|
||||
graph can be a surface-finishing gate instead of a shape generator.
|
||||
`Auto Smooth` is the small utility attached to that system. The main
|
||||
`Curve to Mesh UV` group teaches how a utility can output geometry plus fields
|
||||
that only make sense when sampled on that geometry.
|
||||
|
||||
## Auto Smooth Map
|
||||
|
||||
|
|
@ -53,6 +57,41 @@ Results from Blender 5.1.1:
|
|||
| --- | ---: | ---: | ---: | --- |
|
||||
| Auto Smooth cube vertices | 8 | 8 | 0.0 | accepted |
|
||||
| Auto Smooth smooth faces | 6 | 6 | exact flags | accepted |
|
||||
| Curve To Mesh UV mesh | 192 | 192 | 0.0 | accepted |
|
||||
| Curve To Mesh UV UV-field harness | 192 | 192 | 0.0 | accepted |
|
||||
| Curve To Mesh UV caps-mask harness | 192 | 192 | 0.0 | accepted |
|
||||
| Demo geometry | 512 | 512 | 0.0 | accepted |
|
||||
| Title geometry | 12 | 12 | 0.0 | accepted |
|
||||
|
||||
## Curve To Mesh UV Map
|
||||
|
||||
Source group: `Curve to Mesh UV`
|
||||
|
||||
Geometry Script group: `VG Curve To Mesh UV`
|
||||
|
||||
Mechanism:
|
||||
|
||||
- Resample the source curve and profile curve.
|
||||
- Capture point triplets and curve indices before converting the curves to a
|
||||
mesh.
|
||||
- Convert the curve/profile pair with `Curve to Mesh`.
|
||||
- Use corner-domain accumulation to identify cap regions.
|
||||
- Build side UVs from captured curve/profile point positions.
|
||||
- Build cap UVs by remapping profile source positions through a bounding box.
|
||||
- Switch between side UVs and cap UVs with the cap mask.
|
||||
|
||||
Metaphor: the curve and profile are two rulers crossing. The mesh is the cloth
|
||||
stretched across them; the captured indices are the ruler marks that survive
|
||||
after the cloth exists.
|
||||
|
||||
## Demo And Title
|
||||
|
||||
`VG Curve To Mesh UV Demo` recreates `_258246` as a simple closed curve/profile
|
||||
example that calls `VG Curve To Mesh UV`.
|
||||
|
||||
`VG Curve To Mesh UV Title` recreates `_Title` as decorative text, plinth, and
|
||||
backdrop geometry. It is useful mostly because it exercises text curves,
|
||||
stored UV attributes, face flipping, and map-range UV generation.
|
||||
|
||||
## Lessons
|
||||
|
||||
|
|
@ -62,3 +101,8 @@ Results from Blender 5.1.1:
|
|||
edge continuity, then stamp final face smoothness.
|
||||
- Utility mega-graphs should be entered through their small helpers first.
|
||||
They expose the local contracts the main group relies on.
|
||||
- Field outputs need field-shaped verification. The UV output was checked by
|
||||
driving vertex position with the UV vector; the caps mask was checked by
|
||||
using it as a deletion selection.
|
||||
- Utility graphs often return several contracts at once. Verify geometry,
|
||||
fields, and masks separately so one passing output does not launder the rest.
|
||||
|
|
|
|||
|
|
@ -5,12 +5,18 @@
|
|||
- Repository: https://github.com/Shriinivas/geometrynodes
|
||||
- Source file: `paramnpolareq.blend`
|
||||
- Source groups:
|
||||
- `chooseFloatVal`
|
||||
- `chooseFloatVal.001`
|
||||
- `chooseStrVal`
|
||||
- `chooseStrVal.001`
|
||||
- `NodeGroup`
|
||||
- `NodeGroup.001`
|
||||
- `NodeGroup.002`
|
||||
- `NodeGroup.003`
|
||||
- `getxy.001`
|
||||
- `Archimedes Spiral`
|
||||
- `Epicycloid`
|
||||
- `Geometry Nodes Group`
|
||||
- `Geometry Nodes Group.002`
|
||||
- Geometry Script recreation:
|
||||
`examples/geometry_script/shriinivas_paramnpolareq.py`
|
||||
|
|
@ -77,6 +83,27 @@ then joins them.
|
|||
Metaphor: the first arm is a chalk line unwinding from the center; the second
|
||||
arm is the same chalk line reflected through the origin.
|
||||
|
||||
## Selector And Wrapper
|
||||
|
||||
Source groups: `chooseFloatVal`, `chooseStrVal`, `getxy.001`,
|
||||
`Geometry Nodes Group`
|
||||
|
||||
Geometry Script groups: `VG Choose Float Val`, `VG Choose Str Val`,
|
||||
`VG Param XY`, `VG Param Curve`
|
||||
|
||||
Mechanism:
|
||||
|
||||
- Normalize `Curve Type` with absolute value and modulo.
|
||||
- Compute five candidate curve formulas:
|
||||
epicycloid, epitrochoid, hypocycloid, hypotrochoid, and Archimedes spiral.
|
||||
- Use switch chains to select the active `x`, `y`, and equation label.
|
||||
- Build a mesh-line parameter conveyor for `t`.
|
||||
- Convert the parameterized point stream to a curve, give it a circular
|
||||
profile, and optionally add a text label.
|
||||
|
||||
Metaphor: `getxy.001` is a rotary selector on a plotting machine. The machine
|
||||
prepares five pens, then the selector lets exactly one touch the paper.
|
||||
|
||||
## Verification
|
||||
|
||||
Run:
|
||||
|
|
@ -96,6 +123,8 @@ Results from Blender 5.1.1:
|
|||
| Archimedes Spiral vertices | 64 | 64 | 4.47e-8 | accepted |
|
||||
| Epicycloid vertices | 80 | 80 | 0.0 | accepted |
|
||||
| Mirrored Root Spiral vertices | 192 | 192 | 0.0 | accepted |
|
||||
| Param XY curve types | 5 cases | 5 cases | 0.0 | accepted |
|
||||
| Param Curve wrapper vertices | 2048 | 2048 | 0.0 | accepted |
|
||||
|
||||
The scalar helpers are verified by putting the scalar into a single vertex's X
|
||||
position. The curve groups are verified by sorted evaluated vertex comparison.
|
||||
|
|
@ -111,3 +140,8 @@ position. The curve groups are verified by sorted evaluated vertex comparison.
|
|||
when the UI spelling drifts.
|
||||
- A scalar harness should preserve numeric value, not just count geometry.
|
||||
Driving a vertex coordinate is often cleaner than driving `Mesh Line.Count`.
|
||||
- Selector graphs are better translated as named candidate formulas plus one
|
||||
switchboard than as copied switch-node ceremony.
|
||||
- Optional label geometry should be verified separately from the curve when
|
||||
possible. The wrapper geometry path was accepted with labels off so curve
|
||||
behavior could be isolated first.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
- Source groups:
|
||||
- `NodeGroup`
|
||||
- `Pie Chart`
|
||||
- `getPie.002` through `getPie.012`
|
||||
- `Extended Pie Chart`
|
||||
- Geometry Script recreation:
|
||||
`examples/geometry_script/shriinivas_piechart.py`
|
||||
|
||||
|
|
@ -92,6 +94,30 @@ Metaphor: the chart group is not a shape maker. It is an accountant-conductor:
|
|||
it totals the values, cues each segment in order, and makes sure every slice
|
||||
starts where the previous one ended.
|
||||
|
||||
## Extended Chart Map
|
||||
|
||||
Source groups: `getPie.002` through `getPie.012`, `Extended Pie Chart`
|
||||
|
||||
Geometry Script groups: `VG Extended Pie Segment`, `VG Extended Pie Chart`
|
||||
|
||||
Mechanism:
|
||||
|
||||
- Collapse the numbered `getPie.*` clones into one parameterized extended
|
||||
segment helper.
|
||||
- Add radius, pie height, text height, text size, text offset, label text, and
|
||||
percentage toggle controls.
|
||||
- Generate the segment label as either `Text` or percentage-plus-text.
|
||||
- Place label geometry along the segment midpoint at `Text Offset * Radius`.
|
||||
- Build a filled/extruded wedge at `Radius` and `Pie Height`.
|
||||
- Compose up to ten slices by passing each segment's `End Angle` into the next
|
||||
segment.
|
||||
- Gate slices 2-10 with `Segment Count`.
|
||||
- Add title text below the chart.
|
||||
|
||||
Metaphor: the small chart is a three-slice accountant. The extended chart is a
|
||||
ten-slot serving line: each station can be open or closed, but the serving
|
||||
angle still passes down the line.
|
||||
|
||||
## Verification
|
||||
|
||||
Run:
|
||||
|
|
@ -106,11 +132,15 @@ Results from Blender 5.1.1:
|
|||
| --- | ---: | ---: | --- |
|
||||
| Segment | 319 | 0.0 | accepted |
|
||||
| Chart | 957 | 0.0 | accepted |
|
||||
| Extended Segment | 319 | 0.0 | accepted |
|
||||
| Extended Chart | 3190 | 0.0 | accepted |
|
||||
|
||||
Generated groups saved and reinspected:
|
||||
|
||||
- `VG Pie Segment`: 30 nodes, 48 links.
|
||||
- `VG Pie Chart`: 8 nodes, 25 links.
|
||||
- `VG Pie Segment`
|
||||
- `VG Pie Chart`
|
||||
- `VG Extended Pie Segment`
|
||||
- `VG Extended Pie Chart`
|
||||
|
||||
## Lessons
|
||||
|
||||
|
|
@ -125,3 +155,9 @@ Generated groups saved and reinspected:
|
|||
- Charts and other sequential structures often need cumulative scalar flow.
|
||||
In Geometry Script, nested `@tree` calls make that flow readable as ordinary
|
||||
Python variable passing.
|
||||
- Numbered source clones are not doctrine. Translate the stable contract once,
|
||||
then use Python lists and loops to express the repeated composition.
|
||||
- Output order matters when a group returns both state and geometry. The
|
||||
extended segment preserves the source order `End Angle`, then `Pie`; grabbing
|
||||
those in the wrong order made the whole chart disappear until verification
|
||||
caught it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue