Repository navigation
A straight prim gets one quad per profile edge, and rows its parameters collapse emit no triangles - #557
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
6bf1df7 to
4a697b4
Compare
LLVolume::generate split every profile edge into detail * 0.66 pieces, and gave a straight path at least split + 2 rings, so that vertex lighting and texture interpolation had more vertices across stretched triangles. A default box at LOD 3 carried 96 vertices and 108 triangles where 24 and 12 describe it exactly. On a straight path with no twist and no taper, every side quad is a parallelogram and every face is flat or ruled straight along the path, so the extra points sit on the surface and affine UV interpolation is exact without them. There, split is 0 and the path has 2 rings: a box is 24 / 12 at every LOD, a cylinder 102 / 96 at LOD 3 instead of 152 / 192, and the uncut cube cap a single quad. Twisted, tapered, circular and flexible paths keep their split. A square hole pulled in to its wall is not straight between its corners, so its profile keeps the split points that shape it. Positions and UVs at kept vertices match within 7e-7, and every removed vertex lies on the new surface with the UV it had. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A square or triangle hole's inner side is one face, and createSide copied every profile point after the first so each strip got its own normals, split points included, plus a closing column. The copies at the hole's corners are its creases; the ones at split points made the inner side of a twisted or circular hollow prim faceted strip by strip while its outer sides are smooth, and each pair added a zero-width quad. The profile now records which points are the hole's corners, and the inner side copies those alone, so it is smooth from corner to corner as the outer sides are. The zero-width quads emit no triangles, decided from the column layout, never from positions, so flexible prims keep a topology fixed by their parameters. A hole pulled in to its wall counts every point as a corner. The hollow box is 52 / 32 at every LOD, a twisted hollow box at LOD 3 500 vertices instead of 612. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w or column A prim tapered to a point puts a whole row of vertices at its apex, and a sphere puts a whole column at each pole; half the triangles touching them have no area. A shared volume (not unique, not a sculpt) now emits none there. Which rows and columns collapse is decided from the parameters alone: a straight path scaled to 0 at an end it reaches, a circular path tapered by 1, and a half circle on a circle path with a hole size of 1 in y, no skew, no x taper and a constant twist in whole half turns. The vertices stay, since each column carries its own UV and normal, and no face is left empty. A sphere at LOD 3 is 325 / 528 instead of 325 / 576. The index loop is a template over whether a face has collapsed rows, so the common case runs the loop it always did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sphere pole override gave the first point of a hollow sphere's flat inner side the axis as its normal, while the last point kept its strip's, which shaded half of that side with a 45-degree gradient. Both ends now keep their strip's normal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4a697b4 to
5eb8b96
Compare
LLVolume::generatesplits every profile edge intodetail * 0.66pieces, and gives a straight path at leastsplit + 2rings. That gave vertex lighting more vertices to interpolate across. Under per-pixel lighting, a straight path with no twist and no taper makes only flat or straight-ruled faces, so those extra vertices sit on the surface and change nothing. This PR stops making them, and stops emitting triangles that have no area.This is part 2 of a stack of 7. Merge them in order: each PR is based on the one before it and shows only its own commits.
Changes
Straight prims: on a straight path with no twist and no taper,
splitis 0 and the path has 2 rings.The uncut cube cap is a single quad. Twisted, tapered, circular and flexible paths keep their split. So does a square hole pulled in to its wall, which isn't straight between its corners.
Flat inner sides: a square or triangle hole's inner side now copies only the hole's corners, which are its creases. Before, it also copied every split point, which faceted the inner side of twisted or circular hollow prims strip by strip, and each copy added a quad of zero width. Those quads now emit no triangles. That is decided from the column layout, never from positions, so a flexible prim's topology still depends only on its parameters.
Collapsed rows and columns: a shared volume now emits no triangles where its parameters collapse a row or a column: a taper to a point, or a sphere's poles. The vertices stay, because each column carries its own UV and normal. A sphere at LOD 3 has 528 triangles instead of 576. The index loop is a template, so the common case runs the loop it always did.
Hollow sphere: its inner side now takes its strip's normal at both ends. The pole override used to shade half of that side with a 45-degree gradient.
ARC and streaming cost read parameter-based counts. Those counts are unchanged, so land impact doesn't move.
Testing
llmath_tests, shuffled: 409 cases. 408 pass and 1 is skipped.🤖 Generated with Claude Code