mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 11:05:03 +00:00
Merge main into feat/3d-custom-bevels
This commit is contained in:
@@ -180,7 +180,7 @@ VectorCraft choices; an original approximation, never compared with another appl
|
||||
|---|---|
|
||||
| Revolve | initial: live, editable profile, rotation and light gizmos, default-on Cap with continuous curved rims, smooth vector shading and round seam joins, SVG/PDF output, Expand Appearance ([revolve.md](revolve.md), #846) |
|
||||
| Extrude & Bevel, Inflate, Rotate | initial: live, depth, twist, taper, solid or hollow caps, five original bevel shapes and custom bevels drawn as open paths in the bevels file ([add custom bevel paths](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/add-custom-bevel-paths.html), [three-d.md](three-d.md#custom-bevels)), Inflate volume, both sides, twist, taper and cap, Rotate of every fill and stroke, groups and layers turned about one shared axis (#4506), contours that cross, touch or overlap merged first ([three-d.md](three-d.md)), Position presets, rotation and light gizmos, SVG/PDF output, Expand Appearance ([three-d.md](three-d.md)) |
|
||||
| Materials panel, lighting, ray-traced render | Window › 3D and Materials panel with the object types (Plane, Extrude, Revolve, Inflate) and the Object, Rotation and Lighting settings of the applied effect, and Quick Actions › Expand as Wireframes ([three-d.md](three-d.md#3d-and-materials-panel)); one to ten directional lights with per-light Color (opaque RGB, white by default), Intensity, Rotation, Height, Softness and neutral Ambient Light, Revolve and colored Inflate use smooth vector shading; Extrude & Bevel and Rotate retain planar shading; original Standard, Diffuse, Top Left and Right lighting rigs; hard-edged shadows behind or below the object from the first light ([three-d.md](three-d.md#shadows)); no materials, soft shadows or ray tracing |
|
||||
| Materials panel, lighting, ray-traced render | Window › 3D and Materials panel with the object types (Plane, Extrude, Revolve, Inflate) and the Object, Rotation and Lighting settings of the applied effect, and Quick Actions › Expand as Wireframes ([three-d.md](three-d.md#3d-and-materials-panel)); one to ten directional lights with per-light Color (opaque RGB, white by default), Intensity, Rotation, Height, Softness and neutral Ambient Light, Revolve and colored Inflate use smooth vector shading; Extrude & Bevel and Rotate retain planar shading; original Standard, Diffuse, Top Left and Right lighting rigs; hard-edged shadows behind or below the object from the first light ([three-d.md](three-d.md#shadows)); the Materials tab's Graphics, document symbols mapped onto Extrude & Bevel's caps and onto a plane, moved with an artboard handle ([three-d.md](three-d.md#graphics)); no base materials, graphics on curved surfaces, soft shadows or ray tracing |
|
||||
| 3D (Classic): Extrude & Bevel, Revolve, Rotate | Extrude & Bevel (Classic) initial: live, Extrude Depth, Cap, five original bevel shapes and the custom bevels with Height and Bevel Extent In or Out, Position presets and rotation gizmo, Perspective, Wireframe, No Shading, Diffuse and Plastic surfaces with one to ten lights, Light Intensity, Ambient Light, Highlight Intensity and Size, Blend Steps, Black, Custom or no Shading Color, Draw Hidden Faces ([create 3D objects](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/create-3d-objects.html)); Revolve (Classic) initial: live, Angle, Cap, Offset from the left or right edge, Position presets and rotation gizmo, Perspective, the same four surfaces, lights, highlight, Blend Steps and Shading Color, groups and layers revolved about one shared axis (same page); Rotate (Classic) initial: live, every fill and stroke turned as one plane, Position presets and rotation gizmo, Perspective, No Shading and Diffuse surfaces with lights, Ambient Light, Blend Steps and Shading Color ([rotate objects in 3D](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/rotate-objects-in-3d.html)); Map Art: none |
|
||||
| Turntable (30.0 beta) | none |
|
||||
| Export 3D objects (OBJ, USDA, glTF) | initial: Asset Export's Export 3D Object collects an object with Extrude & Bevel, Revolve, Inflate or Rotate as a 3D asset, and Export writes its solids as a USDA (the default), USDZ, glTF or OBJ mesh with a material in each solid's paint color (`assets.add3D`, `assets.set3DFormat`, `assets.export3D`); no textures, map art or shading ([3D export help](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/export-3d-vector-artwork.html)) |
|
||||
|
||||
+25
-1
@@ -3428,6 +3428,30 @@ checked as that effect's. It is one undo step. Any other `threeDType` value, or
|
||||
{"name":"run_command","arguments":{"command":"effect.setParams","params":{"index":0,"item":null,"threeDType":"inflate","params":{"volume":70}}}}
|
||||
```
|
||||
|
||||
## 3D graphics
|
||||
|
||||
`threeD.addGraphic {name?, ids?|id?}` keeps the selected art as a new document symbol (default name `Graphic`, made
|
||||
unique) and leaves the art as it is: the 3D and Materials panel's Add as Single Graphic. It returns `{name}`. A
|
||||
`name` that is not a string or is empty, or any other key, is refused.
|
||||
|
||||
`threeD.mapGraphic {symbol, face?, x?, y?, scale?, rotation?, index?, item?, ids?|id?}` adds a graphic to the 3D
|
||||
effect of each selected object, in one undo step: `face` is `front` (default) or `back`, `x` and `y` are the
|
||||
offset in points of the graphic's center from the center of the object's bounds in the face's plane, `scale` is a
|
||||
percentage of the symbol's size (1..10000; omitted, 100 or less so the graphic fits inside the object) and
|
||||
`rotation` is in degrees counterclockwise (-360..360). Without `index` each object's first 3D effect takes it, and `item` is refused.
|
||||
Every object's 3D effect must be Extrude & Bevel with Cap on (front only at a depth of 0) or Rotate (the Plane type,
|
||||
front only), and `symbol` must name a document symbol; otherwise the command is refused and nothing changes. It returns `{ids, graphic}`.
|
||||
|
||||
The graphics are the `graphics` parameter of `threeD.extrude` and `threeD.rotate`, which `effect.setParams` also
|
||||
edits: an array of up to 64 `{symbol, face, x, y, scale, rotation}` objects, drawn on the face turned,
|
||||
foreshortened and shaded with it and clipped to it ([Map artworks on 3D object](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/map-artwork-on-3d-objects.html)).
|
||||
A graphic naming a symbol the document does not have is refused, unless the effect already holds a graphic of it.
|
||||
The drawing rules are VectorCraft's own; see [three-d.md](three-d.md#graphics).
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"threeD.mapGraphic","params":{"symbol":"Graphic","face":"front","x":10,"scale":80,"rotation":15}}}
|
||||
```
|
||||
|
||||
## Expand as Wireframes
|
||||
|
||||
`effect.expandAsWireframes {ids?}` (**Window › 3D and Materials** › Quick Actions › Expand as Wireframes) replaces
|
||||
@@ -6623,7 +6647,7 @@ paint or width, guides, paths with no segment, type that draws no characters, a
|
||||
shape left out; with `selectionOnly`, the brushes the selected
|
||||
objects' strokes use), `brushes` (`[{name, type}]`: those brushes with their types, `calligraphic`, `scatter`, `art`,
|
||||
`pattern` or `bristle`, and `null` for a brush the Brushes panel does not hold; the brushes category's rows give each
|
||||
name with its type, such as `Art brush`, or `missing from the Brushes panel`), `panelBrushNames` (the Brushes panel's brushes, whether art uses them or not), `repeatObjects` (`[{id, name, type, instances, rows?, cols?}]`: every Repeat object, those in
|
||||
name with its type, such as `Art Brush`, or `missing from the Brushes panel`, in English; the Document Info panel shows them in the interface language), `panelBrushNames` (the Brushes panel's brushes, whether art uses them or not), `repeatObjects` (`[{id, name, type, instances, rows?, cols?}]`: every Repeat object, those in
|
||||
groups and in other repeats included, with its type `radial`, `grid` or `mirror` and the number of instances it makes,
|
||||
and a grid's `rows` and `cols`; with `selectionOnly`, the Repeat objects in the selection), `patternObjects`
|
||||
(`[{id, name, patterns}]`: every object filled or stroked with a pattern, once each, those in groups and type objects
|
||||
|
||||
File diff suppressed because one or more lines are too long
+64
-7
@@ -64,9 +64,9 @@ pages describe it.
|
||||
own choice. The group keeps the object's place, id, name, opacity, blending mode, opacity mask, attributes
|
||||
and text wrap and is selected; objects without a visible 3D effect do not change. It is one undo step, and an error changes nothing
|
||||
when no selected object has a visible 3D effect.
|
||||
- The Lighting tab also holds the Shadows switch and its settings ([Shadows](#shadows)). The Materials tab and
|
||||
ray-traced rendering are not built (see below). The rotation and light rings on the artboard are part of the
|
||||
options dialog only.
|
||||
- The Lighting tab also holds the Shadows switch and its settings ([Shadows](#shadows)). The Materials tab holds
|
||||
the Graphics ([Graphics](#graphics)); base materials and ray-traced rendering are not built (see below). The
|
||||
rotation and light rings on the artboard are part of the options dialog only.
|
||||
|
||||
## Extrude & Bevel
|
||||
|
||||
@@ -316,6 +316,58 @@ Our reading:
|
||||
- Canvas, SVG and PDF exports draw the shadow, the art's bounds take it in, and Expand Appearance keeps it as a
|
||||
path below the faces. Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) have no shadow.
|
||||
|
||||
## Graphics
|
||||
|
||||
The public [Map artworks on 3D object](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/map-artwork-on-3d-objects.html)
|
||||
page describes graphics: art kept with the document and placed on single surfaces of a 3D object, and the
|
||||
[3D and Materials panel options](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/3d-materials-panel-options.html)
|
||||
page lists Graphics and Add Materials and Graphics on the Materials tab. VectorCraft maps graphics onto planar faces:
|
||||
Extrude & Bevel's front and back caps, and the plane of the Plane type (Rotate).
|
||||
|
||||
- The panel's **Materials** tab shows the document's graphics as thumbnails. A graphic is a document symbol, as
|
||||
the public page allows existing symbols to be used. **Add as Single Graphic** keeps the selected art as a new
|
||||
symbol (`threeD.addGraphic`) and leaves the art as it is; art dragged from the artboard onto the thumbnails is
|
||||
added the same way. The thumbnails and Add as Single Graphic show without a selected 3D object too.
|
||||
- Clicking a thumbnail maps that graphic onto the front of the 3D effect of each selected object
|
||||
(`threeD.mapGraphic`), in one undo step. A graphic larger than the object starts scaled down to fit inside it.
|
||||
- Below the thumbnails the tab lists the graphics mapped onto the first selected object. The selected one shows
|
||||
its Face (Front or Back; Plane has only a front), X and Y (the offset of its center from the center of the
|
||||
object's bounds, in the face's plane), Scale (a percentage of the symbol's size) and Rotation
|
||||
(counterclockwise), and **Remove Graphic** takes it off. Each change is one undo step.
|
||||
- While the tab is open, a blue handle sits on the center of each mapped graphic whose face is turned toward the
|
||||
viewer. Dragging a handle moves that graphic over its face, previewed while the pointer is down and recorded as
|
||||
one undo step when it is released. The handles are hidden while the selected objects have different graphics,
|
||||
and while a geometry effect (such as Transform) comes after the 3D effect. A press on the canvas while its
|
||||
context menu is open only closes the menu and does not grab a handle.
|
||||
|
||||
These rules are VectorCraft's own:
|
||||
|
||||
- A graphic is drawn on the visible face of each of the object's solids (a fill's, and a stroke's outline),
|
||||
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, and 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.
|
||||
- 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.
|
||||
- The symbol's fills and strokes are drawn as filled areas, a stroke as its outline, and their gradients and
|
||||
patterns are placed with the graphic. Images, hidden objects,
|
||||
guides and clipping paths in the symbol are left out, and clipping groups draw their art unclipped. Instances
|
||||
of other symbols in it are drawn. Symbols may nest in its art up to 8 levels deep, and its objects may be nested
|
||||
up to 128 levels deep; commands refuse a graphic past either limit, and a loaded file draws the object without it.
|
||||
- Without perspective, the graphic maps exactly. With perspective, straight lines stay straight and each curve is
|
||||
cut into 8 cubic pieces before it is mapped. The part of a graphic at or behind the eye is left out.
|
||||
- An object takes up to 64 graphics. One graphic draws up to 4,096 fills and strokes, and the graphics of one 3D
|
||||
effect draw up to 400,000 path elements together. Commands refuse a graphic past either limit. A loaded file
|
||||
draws the object without a graphic past the first limit, and without all of its graphics past the second.
|
||||
- A hollow Extrude & Bevel has no caps, so its graphics are not drawn until Cap is turned on again, and
|
||||
`threeD.mapGraphic` refuses to map a new one onto it. Changing the type to Revolve or Inflate
|
||||
drops the graphics, and changing between Extrude and Plane keeps them, except that Plane drops the graphics
|
||||
on the back cap.
|
||||
- `effect.apply` and `effect.setParams` refuse a graphic that names a symbol the document does not have, unless
|
||||
the effect already holds a graphic of that symbol. A graphic whose symbol is deleted is no longer drawn. Renaming a symbol renames it in the graphics that use it,
|
||||
in the layers, in the art of symbols, patterns, graph designs, brushes and opacity masks, and in graphic
|
||||
styles, and Select All Unused in the Symbols panel counts a symbol a graphic uses as used, a graphic in a graphic style included.
|
||||
|
||||
## Parameters (`effect.apply`, `effect.setParams`)
|
||||
|
||||
`threeD.extrude`: `depth`, `twist`, `taper` (%), `cap`, `bevel` (`none`, `classic`, `rounded`, `cove`, `step`,
|
||||
@@ -324,6 +376,10 @@ Our reading:
|
||||
uses: `rotationX`, `rotationY`, `rotationZ`, `perspectiveAngle` (degrees), `shade`, `lightColor` (`#rrggbb`, default `#ffffff`), `lightIntensity` (%), `lightRotation`,
|
||||
`lightHeight` (degrees), `lightSoftness` (%), `ambient` (%, to 200), `lightBehind`. Lengths are points and scale with the object (Scale Strokes & Effects).
|
||||
Commands validate the shape and the parameters before the document changes. All four also take `lights`: null (the default, use the earlier single-light fields), or an array of one to ten objects. Each object takes `color` (opaque `#rrggbb`, white), `intensity` (0..100%, 80), `rotation` (-180..180 degrees, 125.26), `height` (0..90 degrees, 30), `softness` (0..100%, 0), and `behind` (boolean, false). Omitted settings use those defaults. An explicit list replaces the earlier single light; `ambient` and `shade` remain shared. Set `lights` to null to return to the single-light fields. Invalid lists, counts, keys and values are rejected before editing; malformed loaded lists fall back to the earlier light safely. All four take `shadow` (boolean, false), `shadowPosition` (`behind` or `below`), `shadowDistance` (0..100%, 0) and `shadowBounds` (10..400%, 100) ([Shadows](#shadows)); values out of range are rejected before editing.
|
||||
`threeD.extrude` and `threeD.rotate` take `graphics` ([Graphics](#graphics)): an array of up to 64 objects, each
|
||||
with `symbol` (the name of a document symbol), `face` (`front` or `back`, default `front`; `threeD.rotate` takes
|
||||
`front` only), `x` and `y` (points, default 0), `scale` (1..10000%, default 100) and `rotation` (-360..360 degrees,
|
||||
default 0). Other keys, values out of range and graphics on the other 3D effects are rejected before editing.
|
||||
|
||||
## What differs from the public documentation
|
||||
|
||||
@@ -332,10 +388,11 @@ and [Create 3D objects](https://helpx.adobe.com/illustrator/desktop/special-effe
|
||||
pages, and the archived Extrude & Bevel option list (depth 0–2,000, cap on/off, bevel height, bevel extent in or
|
||||
out, perspective). No Adobe software, assets, presets or bevel shapes were used.
|
||||
|
||||
- **Materials** (base, Adobe Substance and graphics), soft shadows, shadows of lights after the first,
|
||||
and **ray-traced rendering** are not built: shading uses directional lights, in the paint of the fill or
|
||||
stroke the solid is built for ([Fills and strokes](#fills-and-strokes)), and the shadow is hard-edged
|
||||
([Shadows](#shadows)).
|
||||
- **Materials** (base and Adobe Substance), graphics on curved surfaces (Revolve, Inflate and Extrude & Bevel's
|
||||
walls and bevels), soft shadows, shadows of lights after the first, and **ray-traced rendering** are not built:
|
||||
shading uses directional lights, in the paint of the fill or stroke the solid is built for
|
||||
([Fills and strokes](#fills-and-strokes)), and the shadow is hard-edged ([Shadows](#shadows)). Graphics map
|
||||
onto planar faces only ([Graphics](#graphics)).
|
||||
- The bevel shapes and their names are our own. Custom bevels come from VectorCraft's own bevels file
|
||||
([Custom bevels](#custom-bevels)) and are cut into straight lines.
|
||||
- Visibility is a painter's algorithm: faces of a closed solid turned away are left out, and the rest are drawn
|
||||
|
||||
Reference in New Issue
Block a user