Commit Graph
187 Commits
Author SHA1 Message Date
dotCooCoo 86a036f724 Merge main into feat/vector-3d-materials 2026-11-30 15:37:03 -08:00
dotCooCoo 3b37cc5e9a 3D: a material drag brought back to its start leaves the effect as it was
A Roughness or Metallic drag that returned to its starting value kept the
last preview in the document, and the release committed it. A drag back
to the start now restores the effect while held, and its release records
no undo step. A setting brought back during a drag that changes another
one is left in its stored form, and the Properties fields stand in for
`material` so an object that only writes out a left-out default is not a
change.

Docs: the material module notes that the drawn paint stops at 1 and that
the highlight is screened; docs/mcp.md says the BRDF applies in shaded
rendering and that USD's `inputs:metallic` is written only when Metallic
is not 0; docs/three-d.md says a mixed number is shown blank;
docs/effects-parity.md lists no base-material library.
2026-11-30 04:39:53 -08:00
dotCooCoo b8b8f4c110 Merge main into feat/vector-3d-materials 2026-11-29 23:33:15 -08:00
dotCooCoo 6866aa8190 3D: Roughness and Metallic on the Materials tab shade and export the surface
Extrude & Bevel, Revolve, Inflate and Rotate take a `material` parameter,
{roughness, metallic}, each a number from 0 to 1 (defaults 1 and 0). The
3D and Materials panel's Materials tab shows them under Properties as two
sliders; each change is one undo step for every selected 3D object. A
value the selected objects hold differently is shown blank with its reset
dot filled, and a typed or dragged value or a reset sets it on all of
them while each keeps its own value of the other property.

- The default material draws exactly as before and calls no BRDF.
- Any other material is shaded through craft-pbr with the glTF 2.0
  metallic-roughness BRDF (Appendix B, with the separable Smith
  visibility of B.3.2) for each light and a split-sum environment scaled
  by Ambient Light. The reflected light is screened over each face as
  vector gradient ramps; graphics on a side or on Inflate's faces lie
  under it, and graphics on caps and the plane take the cap's mean
  reflected light in their colors.
- Smoothed bevel bands take the normals they share at their edges and
  draw as two triangles, so neighboring bands meet without a step, with
  perspective and twist too. A bevel whose split bands would pass the
  solid's face limit keeps one facet per band, so a material never makes
  a solid that draws with the default material too complex. Wireframe
  mode draws the same edges for every material.
- A gradient with transparent stops stays transparent: the faces are drawn
  opaque under one mask of its coverage. A pattern surface takes no
  highlight.
- glTF exports write roughnessFactor and metallicFactor, and USD exports
  write inputs:roughness and inputs:metallic (when it is not 0). OBJ's
  MTL writes neither, so parts of one color and picture share one OBJ
  material as before.
- A material that is not an object, an unknown key, or a value that is not
  a number from 0 to 1 is refused; the 3D (Classic) effects take none. A
  loaded material that fails these rules draws as the default.

Docs: docs/three-d.md (Material properties; the Inflate graphics text is
corrected; the Properties are listed as built), README, docs/mcp.md,
docs/effects-parity.md, docs/target-app-parity.md, ROADMAP.
2026-11-29 23:32:57 -08:00
dotCooCoo 87005e7ae7 Docs: readiness and depth scores match what main ships
Rescore the area, dimension and audience tables against the code on
main, using each doc's own formulas: feature depth 8342/105 (~79%),
breadth ~96% (menu items 815 of 816 wired, tools 91 of 92, vector
effects 50 of 50), full readiness ~67%, mainstream ~65%, essentials
~77%, UI/UX ~60%. File formats stay at ~75%. Stability, Raster effects
in ROADMAP, and Export/print in the essentials table go down where open
crash reports or the area table say so. Hours are not recomputed.
2026-11-29 22:58:55 -08:00
dotCooCoo d4ba715061 Docs: effects-parity.md matches what main ships
- 3D and Materials: the summary row counts Revolve (Classic) and
  Rotate (Classic) beside Extrude & Bevel (Classic) (#6174, #6817,
  #6826).
- Path: Use Preview Bounds measures type with Outline Object by its
  glyph outlines in Align, Distribute and the Transform panel (#2595).
- Stylize: Scribble Options has its Settings presets (#4274).
- Warp: the Mesh tool and Direct Selection edit a warp envelope's
  points (#7064).
2026-11-29 18:40:34 -08:00
dotCooCoo a641167bdc Docs: the ring fix applies to Extrude & Bevel and Inflate, not Rotate
Rotate draws each shape as one plane and does not reach the face sorter.
2026-11-28 09:46:28 -08:00
dotCooCoo 2f1d7a2c8d Merge main into train/carry8496 2026-11-28 09:14:09 -08:00
BFlat 0f7580c97e Merge pull request #8830 from Hassan1305/docs-8312-3d-status
Docs: list first-light 3D shadows and graphics as built (#8312)
2026-11-25 17:45:40 +07:00
dotCooCoo 4a6924669e 3D: meshes carry UVs, smooth bevel normals and a part index
Every mesh the 3D effects build now carries texture coordinates for
each corner and a part for each triangle (front, back, side, front
bevel, back bevel, end cap, cut side). Corners shared by two bands of
one bevel take the mean of the bands' normals unless the bevel turns
there by 60 degrees or more or a band lies flat toward the front or
back, and Inflate's puffed front and back keep the surface's own
normals. The vector facets do not change.

- Caps, Rotate's plane and Inflate's front and back map the art's
  bounds; walls and bevels run u along each contour and v from the
  front cap's edge to the back cap's; Revolve's side runs u around the
  sweep and v along the profile.
- OBJ, glTF and USD write every corner's texture coordinates, not only
  those of faces with mapped graphics.
- Mesh::join checks its index offsets, and joining or exporting a mesh
  whose lists do not match or that holds a value that is not a number
  is an error.

Docs: docs/three-d.md (3D meshes), docs/mcp.md, docs/effects-parity.md,
docs/target-app-parity.md.
2026-11-21 18:25:03 -08:00
HassanKhan 74efef35c7 docs: drop angular cut caps from the 3D missing lists (#8312)
Revolve's Cap closes a partial sweep's angular cut sides (revolve.md).
2026-11-20 17:05:28 +05:00
HassanKhan 0595f6e8ab docs: list first-light shadows and 3D graphics as built (#8312)
README's What's missing no longer names Extrude & Bevel, Inflate and
Rotate; G3 and the effects-parity 3D summary name what remains: base and
Substance materials and shadows from lights after the first.
2026-11-20 16:50:24 +05:00
Drew Dibble 28d7b2cafe Merge upstream main into the #7023 ring fix again 2026-11-20 00:11:13 -07:00
dotCooCoo 856e61afb4 Merge main into feat/3d-custom-bevels 2026-11-19 11:13:58 -08:00
bflatastic a383279b73 Merge remote-tracking branch 'origin/main' into fix/7766
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	docs/mcp.md
2026-11-19 23:15:56 +07:00
dotCooCoo 3fb77f58bb Merge main into feat/3d-custom-bevels 2026-11-19 04:54:39 -08:00
dotCooCoo db1442db8a Merge main into feat/3d-custom-bevels 2026-11-18 23:53:53 -08:00
Drew Dibble 7902e4b56f Merge upstream main into the #7023 ring fix; the roadmap and parity rows say a ring past the step limit breaks as before 2026-11-18 08:32:22 -07:00
dotCooCoo 87abf8b66b Merge main into feat/pathfinder-effect-options 2026-11-18 01:36:33 -08:00
dotCooCoo 19b5ca1869 Merge main into feat/3d-classic-map-art 2026-11-18 01:15:52 -08:00
Drew Dibble fc318eb2c0 3D: a ring of overlapping faces is broken at one of its own faces
Where overlapping faces of a solid are put in the order of their depths
(local_order, also Revolve's surface_order) and some lie in front of
one another in a ring, no order draws them all correctly. When the sort
could draw no face next, it drew the first face left by depth, whether
or not that face was part of a ring. A face that is only in front of a
ring's face, and comes before the ring by depth, was then drawn under
it: dashed strokes on bars that overlap in a ring, extruded as a 3D
group, had whole wall panels drawn over their dashes.

The sort now follows the faces that go before the first face left back,
among the faces that come before the next face drawn last, to a ring
that waits for no other of them (Tarjan's algorithm on the pairs
reversed, stopped at the first component completed). That ring gives up
its own face that comes first in the order of their depths, and the
faces left are looked at afresh, since they may be a smaller ring or
none. Only pairs of a ring, and pairs with a face drawn last, are then
drawn the wrong way round. A face drawn last (a cap) still follows
every face before it.

Cost and memory:
- Comparing pairs and looking for rings share MAX_LOCAL_CHECKS steps:
  every face and pair looked at takes a step, and a face's list of the
  faces before it is charged before it is read. Past the limit the
  first face left by depth goes next, as before.
- A first face left that waits only for the next face drawn last, or
  faces after it, goes next with no search and no step: each face keeps
  a count of the faces not drawn before it that come before the face
  drawn last.
- The search goes on from where it stopped, less the group that gave
  up a face, so rings apart or one behind the other take a few steps a
  face. A ring that is still a ring after it gives up a face is walked
  again, so a large ring can cost about the square of its faces.
- The pairs are held as two u32 (8 bytes), dropped once each face's
  list of the faces after it is made; both kinds of list are one array
  of 4 bytes a pair. The lists of the faces before each face take a
  step a pair to make, not taken from the limit, and are made only when
  the room left is at least a quarter of the pairs, so making them
  costs no more than four times the room left. A solid whose comparing
  leaves less breaks its rings at the first face left by depth.

draw_order, cut_stroke_faces and in_one_order are unchanged.

Tests (solids::tests):
- a_face_in_front_of_a_cycle_waits_for_it: [0, 2, 3, 1] where the
  first face by depth gave [3, 0, 2, 1]; with a cap, it stays last.
- the_faces_left_are_looked_at_afresh_after_each_face_released,
  the_ring_released_waits_for_no_face_outside_it,
  a_ring_is_looked_for_before_the_next_face_drawn_last.
- breaking_a_ring_draws_no_more_pairs_wrong_than_the_first_face_by_depth:
  6,000 random sets (up to 30 faces, pairs shuffled and repeated, up to
  four faces drawn last), each held to the order worked out plainly.
- breaking_rings_stops_at_its_room,
  breaking_rings_takes_a_few_steps_a_face_but_for_a_ring_of_many_pairs:
  the steps are counted, not timed, and bounded from above.
- a_face_that_waits_only_for_the_face_drawn_last_costs_no_search:
  1,000 such faces before a ring take no search.
- the_lists_for_rings_are_made_only_with_room_for_a_quarter_of_the_pairs.
- a_list_longer_than_the_room_left_is_not_read: the entries read are
  counted where they are read, and stay within the room.
- a_depth_cycle_keeps_the_cap_last is unchanged and passes.
With no ring looked for, the ring tests fail; without the skip or the
room for the lists, their tests fail.

Docs: docs/three-d.md, docs/revolve.md, docs/effects-parity.md,
docs/target-app-parity.md.

Part of #7023.
2026-11-17 16:52:48 -07:00
dotCooCoo eb040a8390 Merge main into feat/3d-custom-bevels 2026-11-17 12:41:57 -08:00
dotCooCoo 8920f81410 Merge main into feat/3d-graphics-extrude-side 2026-11-17 12:41:57 -08:00
dotCooCoo 848633a629 Merge main into feat/3d-classic-map-art 2026-11-17 12:37:23 -08:00
BFlat aab753f4f2 Merge pull request #7819 from dotCooCoo/feat/textures-map-art-and-shading
Export 3D Object: mapped graphics export as textures of their faces
2026-11-18 03:23:34 +07:00
dotCooCoo 66f805f098 Merge main into feat/pathfinder-effect-options 2026-11-17 08:06:49 -08:00
Don Omondi 4881a46f34 Merge remote-tracking branch 'upstream/main' into fix/twist-smooth-7069
# Conflicts:
#	docs/effects-parity.md
#	docs/target-app-parity.md
2026-11-17 08:33:56 -05:00
dotCooCoo 1d082e161e Merge main into feat/3d-graphics-extrude-side 2026-11-15 22:10:50 -08:00
dotCooCoo 66b0aa4995 Merge main into feat/3d-custom-bevels 2026-11-15 22:09:03 -08:00
dotCooCoo 6e80aa6fc2 Merge main into feat/3d-classic-map-art 2026-11-15 22:08:30 -08:00
dotCooCoo ea42075eb8 Merge main into feat/3d-soft-shadows 2026-11-15 20:12:19 -08:00
dotCooCoo 5a230be1bc Merge main into feat/3d-graphics-extrude-side 2026-11-15 20:02:35 -08:00
dotCooCoo 62204d9897 Merge main into feat/3d-custom-bevels 2026-11-15 19:52:16 -08:00
dotCooCoo 5dea503631 Merge main into feat/3d-classic-map-art 2026-11-15 19:42:25 -08:00
dotCooCoo 7c09d22c97 Merge main into feat/revolve-cut-caps 2026-11-15 17:49:31 -08:00
dotCooCoo 68243f6720 Merge main into feat/3d-graphics-extrude-side 2026-11-15 17:43:44 -08:00
dotCooCoo 121038bd11 Merge main into feat/3d-custom-bevels 2026-11-15 17:33:31 -08:00
dotCooCoo fdf91a9ca4 Merge main into feat/3d-classic-map-art 2026-11-15 17:28:18 -08:00
dotCooCoo 0813f69d0d Merge main into feat/3d-soft-shadows 2026-11-15 17:24:39 -08:00
dotCooCoo da21d68d4a Merge main into feat/3d-graphics-extrude-side 2026-11-15 13:43:19 -08:00
dotCooCoo 946dcb5910 Merge main into feat/3d-classic-black-overprint 2026-11-15 13:43:05 -08:00
dotCooCoo 10d55e3ff8 Merge main into feat/3d-classic-map-art 2026-11-15 13:43:05 -08:00
dotCooCoo e33551614c Merge main into feat/3d-soft-shadows 2026-11-15 13:41:56 -08:00
dotCooCoo f154aab7f5 Merge main into feat/3d-custom-bevels 2026-11-15 13:41:31 -08:00
dotCooCoo 1caffdf463 Merge main into feat/revolve-cut-caps 2026-11-15 11:13:27 -08:00
dotCooCoo 30c83c684f Merge main into feat/textures-map-art-and-shading 2026-11-15 11:05:49 -08:00
dotCooCoo f38da5e93b Merge main into feat/3d-classic-map-art 2026-11-15 11:02:48 -08:00
dotCooCoo 8c54726fd4 Merge main into feat/3d-classic-light-sphere 2026-11-15 11:01:12 -08:00
dotCooCoo 8f069ba034 Merge main into feat/pathfinder-effect-options
# Conflicts:
#	crates/ui-egui/src/dialogs/effect.rs
2026-11-15 11:00:47 -08:00
dotCooCoo 4e787e2617 Merge main into feat/3d-custom-bevels 2026-11-15 10:38:47 -08:00