The UI state was saved as RON through eframe's storage, and a dock read
through a JSON value lost RON's enum variant names, so every saved layout
loaded as the default. The UI state is now saved as JSON in a store of
its own: ui.json beside eframe's settings on the desktop, a storage key on
the web. A saved state this build cannot fully read is kept beside it
before the next save, and the state earlier builds saved still loads.
Divide each blurred detail size by the share of the blur window inside its
UV tile block, so texels near a block or map edge keep their strength
instead of fading toward zero. Raw mode reads mid gray when there is no
curvature to sample. The size cache keeps one layout per curvature map.
Mask previews of hidden layers build their sizes once before the tiles run
in parallel. effect.set rejects a sizes array with a non-numeric entry.
The reach job was only polled while the high poly was drawn, so leaving
bake mode or hiding the high poly mid-reach kept busy() true and the view
repainting every frame. Poll it at the start of every sync.
The resend test now waits for the rebuilt cage's reach before checking
that a resend starts none, so it no longer depends on thread timing.
textureSet.meshMap.import takes its paths in files[].path, which
authorize_command did not look at, so a control client could import an
image from outside --read-root. Treat a path or dir in any files entry
like a top-level one, and document that automation imports baked maps
through resource_import plus textureSet.meshMap.set.
Add filter still adds a neutral HSL filter, and its slot now opens the
picker straight away; Esc keeps the HSL and one undo removes it.
effect.set naming the filter the effect already is edits its parameters
instead of rebuilding it from defaults. The picker's filter list is
worked out once. The slot cuts long names short between the thumbnail
and the caret, stays highlighted while its picker is open and shows an
outline while it has keyboard focus. More engine tests: a swap on a
mask, an explicit name, refused swaps leave no change and no undo step.
A table over distance starts (painted amount 1 and 2) and a cage-mesh
start covers both inclusive ends of the ray range, a name mismatch and
Ignore Backface both ways. Also test a request with no high poly.
Shader Settings starts with the shader model; its description moves to the
model's tooltip. The height to normal strength stays in the texture set
settings only. Subsurface scattering and Transmission are collapsible
sections. The History and Log lists fill their panel's height.
Curvature and edge wear generators read the baked curvature map one
texel at a time, so they only marked the sharpest edges. They now take a
mode (edges, cavities, both, raw) and seven detail size weights: the map
itself and the map blurred at 1 to 32 texels at 2K, padded past the UV
islands and built once per map and layout. Each size's edges and
cavities combine like a screen blend.
New curvature and edge wear generators use detail sizes. Generators saved
without them, and smart masks, read the map exactly as before.
effect.set takes filter: <id> to swap a filter effect's type in place,
keeping its place, blending, opacity and visibility (one undo step).
A reusable resource_picker shows grouped, searchable shelf tiles at a
slot; the filter slot uses it, and Add filter adds a neutral filter.
The 3D view in bake mode gets a Baking Visualization panel (high poly, cage,
UV seams, low poly, selected texture set only). The cage is built from the
bake's own ray starts (a RayFrame now shared by the bake and the view), so it
grows and shrinks with the distance sliders exactly as the rays do, and
high-poly vertices the transfer rays cannot reach are drawn red.
Refs #330
New command tool.swapMaskValue (mask value becomes 1 - value), default
shortcut X, enabled only while the selected layer's mask or one of its
mask effects is the paint target. Ctrl+X stays cut. Closes#332.
- Each tiled file is keyed by its own tile number and its image passed to
use_images, so tiles named differently or renamed on import still match
- Files of a tiled set without one of its tiles, and maps missing a tile, go
to unmatched instead of failing the import
- Nothing to import leaves no undo step
- The map is read from the file name after the set name
- Toast counts maps; a failed import keeps the file list
- Cap the bytes one import reads; whole-method cleanup of set, use_images,
tile_images and new_project
New project > Advanced settings gets the project's normal map format and
Import baked maps: Add lists image files, and Create imports them with the
new textureSet.meshMap.import command, which sets each file as the mesh map
of the texture set and slot its name names (Body_ambient_occlusion.png,
Body_normal.1001.png) in one undo step and reports the files it left out.
The 2D view keeps the end of the last finished stroke in texture coordinates,
with its texture set, so a line drawn after zooming or panning joins the same
texels, and previews the line while Shift is held, as the 3D view does. A
cancelled stroke (Escape) leaves the line start where it was.
Session::continue_stroke_uv stamps a long segment in batches of 4096 up to
1 << 17 stamps instead of stopping at 4096, keeps its carry within one step,
and seeds stamps from the stroke's running count (UvStrokeState) so noise
alphas don't repeat every pointer sample. The line preview is clipped to the
view, keeping its dash phase.
Refs #306
- A box drag always finishes: on release (even after a failed move), before
any edit, undo, redo or tool change, and when a scripted box fails or
starts while another drag is open. A camera move mid-drag (wheel zoom)
keeps the drag and selects again from the new camera.
- A drag projects the mesh once, skips repaints whose box hasn't moved,
and builds each grouping once; triangle edges are computed once.
- 2D clicks read the triangle from the set's UV G-buffer at the clicked
texel, so collapsed UV faces can't take the click.
- Brush strokes no longer record the nearest-triangle buffer; only polygon
fill asks for it (EyeDepth::render_with_triangles). Screen projection is
shared through paint::screen_point.
- A box touching the view's edge or zero-size on whole pixels selects
exactly the pixels it covers.
- Click fills never merge into a box drag's undo step; FillMode moves to
its own file; partial box parameters get their own error.
Name the fill's two gaps, give the edited offsets and hardness their own
names, reuse the fill's id salt for the section, shorten the doc comments,
and cover a fill effect's own open state and the cylindrical Axis.
A drag in the 3D or 2D view draws a rectangle and fills what it selects
live; releasing it records one undo step. A click still fills one target,
now also in the 2D view. Fill modes gain Polygon (the source quad or n-gon,
from the importer's diagonals), and Mesh fills connected geometry. The
hit-test picks polygons the rectangle touches or whose center it holds;
visible polygons only uses a nearest-triangle buffer next to the eye-depth
raster, leaving hidden texture sets out.
Polygon fill's properties show its own settings and, by selection, the
material, the mask gray, or why it can't fill. Wireframes show while the
tool is active without changing the saved toggles.
Commands: tool.fillMode takes polygon, tool.fillSelection sets hitTest and
visibleOnly, and tool.click takes a screen box, a UV point or a UV box.
A plain right click in the 3D or 2D view (no drag, no Ctrl/Alt/Shift) opens what
the Properties panel shows in a popup at the cursor; a click outside, Escape or
leaving Painting closes it, and the closing click doesn't paint. Every right-drag
gesture is unchanged.
Closes#149
Curvature from the normal map took a 4-texel (at 2K) difference of the
tangent-space normal. The wide difference split each sharp normal change
into two thin peaks with rings around small details, and the tangent map
bends against a smooth-shaded low poly's own shading, so flat faces baked
as concave.
It now measures how fast the baked world normal turns along the surface
direction of each texel step (from each low-poly triangle's UV mapping),
with differences that never read uncovered texels or cross a UV tile, a
1-2-1 average across each derivative so lines are equally wide in every
direction, and a soft roll-off instead of clipping. Details keeps its
meaning; the default response is about 25% softer.
Fixes#316
Fill Properties keep the projection kind, its axis and the tri-planar
hardness visible, and move scale, rotation and offsets into a collapsible
"UV transformations" section, open by default, so the material channels
sit higher. Each fill keeps its own open or closed state. The tri-planar
"Blend sharpness" slider is now labelled "Hardness"; its range and effect
are unchanged.
The normal-map method cannot see the low poly's own edges: a box baked
from itself gets flat curvature, and a box baked from a beveled high poly
gets a dark line along its convex edges. New projects now start on the
mesh method; projects that store a method keep it.
The UI state was saved as RON through eframe's storage, and a dock read
through a JSON value lost RON's enum variant names, so every saved layout
loaded as the default. The UI state is now saved as JSON in a store of
its own: ui.json beside eframe's settings on the desktop, a storage key on
the web. A saved state this build cannot fully read is kept beside it
before the next save, and the state earlier builds saved still loads.