mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 07:01:18 +00:00
3D: a gradient fill with transparent stops and its stroke draw their graphic once
Under a colored light, a fill in a gradient with transparent stops carries an opacity mask, and a graphic mapped onto Extrude & Bevel's cap or onto a Plane was placed twice: once on the fill's cap with the mask and again on the stroke's cap. The fill and stroke now share one graphic when they have the same opacity and blending mode, as they do without the mask. It is drawn after the last of their faces on that cap and takes the mask of the surface it is drawn after, so an opaque stroke leaves it unmasked. A masked fill without a stroke keeps its masked graphic, and members of a 3D group drawn with a mask keep graphics of their own. Unmasked fills and strokes alone draw as before.
This commit is contained in:
@@ -1259,6 +1259,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- A 3D effect on one fill or stroke ([the help page](https://helpx.adobe.com/illustrator/using/effects.html)) leaves the object's other fills and strokes drawn with the path's or compound path's fill rule, so an even-odd compound path keeps its holes in them; this holds for Extrude & Bevel, Inflate, Rotate and Revolve, and for the Classic Extrude & Bevel, Rotate and Revolve. Tests: `solids::tests::a_fill_or_stroke_without_the_effect_keeps_the_even_odd_hole`, `revolve::tests::a_fill_without_the_revolve_keeps_the_even_odd_hole`.
|
||||
- With caps and opaque paint, Extrude & Bevel (both kinds) and Inflate draw each side face of the fill's solid before the faces of the same object's strokes that overlap it (strokes on closed paths without dashes, a width profile or a brush, in a solid color or an opaque gradient), so the stroke's walls cover the fill's walls at concave corners instead of showing stripes of the fill. Tests: `solids::tests::a_fills_walls_are_drawn_before_the_stroke_faces_over_them`, `solids::tests::the_draw_order_moves_a_fill_wall_before_the_stroke_faces_it_overlaps`, `solid::tests::facets_tell_the_sides_from_the_ends_and_the_faces_turned_away`.
|
||||
- When the fill and strokes are at full opacity with Normal blending, under a stroke that leaves parts of the fill's edge uncovered (dashed, with a width profile or a brush, on an open subpath, or in a paint that may show through), Extrude & Bevel (both kinds) and Inflate cut each stroke face that passes through a face of the fill's solid, or of another of the shape's strokes, where their depths meet, and draw the faces of the shape's fill and strokes that overlap in the order of their depths where they overlap, instead of by the depths of their centers. Inflate orders a plain stroke the same way, since its fill can rise in front of the stroke. The fill no longer paints over a nearer dash, and a dash's end no longer covers the fill wall in front of it; a fill wall in a gap between dashes stays visible. The same order applies inside a group member's own opacity mask or blending mode, to a gradient with transparent stops under a colored light with graphics on its caps, and to Inflate in gradients under a colored light. Tests: `solids::tests::fill_walls_and_strokes_that_leave_gaps_draw_in_the_order_of_their_depths_where_they_overlap`, `solids::tests::local_order_puts_overlapping_fill_walls_and_stroke_faces_in_depth_order`, `solids::tests::a_stroke_face_through_a_fill_wall_is_cut_where_their_depths_meet`, `solids::tests::a_masked_members_fill_and_stroke_faces_go_in_one_order`, `solids::tests::a_colored_inflate_in_gradients_draws_its_faces_in_one_order`, `solids::tests::a_depth_cycle_keeps_the_cap_last`, `solids::graphics::tests::a_transparent_gradient_with_a_graphic_keeps_the_shared_face_order`.
|
||||
- A graphic mapped onto Extrude & Bevel's cap or onto a Plane is drawn once when the fill is a gradient with transparent stops under a colored light and the object has a stroke (dashed or plain) with the same opacity and blending mode: the fill and stroke share it, as they do without the mask, and it is drawn after the stroke's cap with the mask of the stroke's surface (none for an opaque stroke), instead of once on the fill's cap and again on the stroke's. Members of a 3D group drawn with a mask keep graphics of their own. Unmasked fills and strokes alone draw as before. Tests: `solids::graphics::tests::a_transparent_gradient_with_a_graphic_keeps_the_shared_face_order`, `solids::graphics::tests::a_plane_in_a_transparent_gradient_with_a_stroke_draws_its_graphic_once`, `solids::graphics::tests::members_in_transparent_gradients_keep_graphics_of_their_own`.
|
||||
- Under a colored light, an Inflate fill and strokes in solid colors, opaque with Normal blending, also draw their faces in that one order, inside a group member's own opacity mask too, instead of each solid as one composite with the stroke's faces over every fill face. Each face keeps the composite's paint, light ramps and seam width; a lone solid, the solids of an object with a translucent or blended fill or stroke, and such solids holding more than 30,720 faces together (VectorCraft's own limit) are still drawn as one composite each. Tests: `solids::tests::colored_solid_fills_and_strokes_share_face_depth_order`, `solids::tests::a_colored_solid_face_on_its_own_keeps_the_composites_colors`, `solids::tests::colored_solid_inflate_batches_channels_and_clips_once_per_surface`, `solids::tests::colored_solids_past_the_face_limit_draw_as_composites`.
|
||||
- Without a twist, a tapered Extrude & Bevel wall (and each bevel band) is one flat face; only a twist cuts walls into slices, so no seam between slices paints a light tick or a light line on a tapered, untwisted wall (#7019). Test: `solid::tests::a_tapered_wall_is_one_flat_face_and_a_twisted_one_is_sliced`.
|
||||
- Extrude & Bevel, Inflate and Rotate apply to type: it makes a solid of its glyph outlines, painted with its own fills and strokes or, when it has none, its characters' colour (the first run's), and stays type, so editing the text reshapes the solid (#4715).
|
||||
|
||||
+7
-3
@@ -153,7 +153,8 @@ The rest is our reading:
|
||||
depths where they overlap, with caps on or off. A fill wall in a gap stays in its own depth order. Inflate's
|
||||
curved surfaces follow this only as closely as their flat facets do. A solid painted with a gradient that has
|
||||
transparent stops under a light that is not white is drawn with an opacity mask: its faces keep their places in
|
||||
this order, in runs that each carry the mask, and so do its graphics. A member of a 3D group with its own opacity
|
||||
this order, in runs that each carry the mask, and a graphic drawn after one of its faces carries the mask too
|
||||
([Graphics](#graphics)). A member of a 3D group with its own opacity
|
||||
mask or blending mode draws its fill's and strokes' faces in this order inside that mask or blending mode when
|
||||
they are opaque with Normal blending. Otherwise each solid is drawn on its own with its opacity and blending, the
|
||||
lower item's first. With a light that is not white, a puffed, shaded Inflate surface in a solid color takes its
|
||||
@@ -375,8 +376,11 @@ These rules are VectorCraft's own:
|
||||
turned, foreshortened by the perspective and twisted and tapered with the face, and clipped to it. It is shaded
|
||||
with the face's light: each color is multiplied by the light that falls on the face, except in pattern tiles,
|
||||
which keep their own colors. It is drawn with the
|
||||
opacity and blending mode of the fill or stroke the face is painted with. A graphic on a face turned away from
|
||||
the viewer is not drawn.
|
||||
opacity and blending mode of the fill or stroke the face is painted with. Solids whose fills and strokes have the
|
||||
same opacity and blending mode share one graphic on each face, clipped to their faces there and drawn after the
|
||||
last of them. An object's fill and stroke share it when the fill is drawn with an opacity mask too, and the
|
||||
graphic takes the mask of the solid it is drawn after; members of a 3D group drawn with a mask keep graphics of
|
||||
their own. A graphic on a face turned away from the viewer is not drawn.
|
||||
- On the back cap, X runs to the right as the back is seen from behind, so the graphic reads the right way round
|
||||
there.
|
||||
- On Revolve a graphic lies on the swept side, which has one face (Front), unrolled flat. X runs around the axis:
|
||||
|
||||
Reference in New Issue
Block a user