Bake laser engraving into the 3D stock (flat and rotary) - #361
Open
knipknap wants to merge 5 commits into
Open
Conversation
Laser raster and vector ops now char the stock in the 3D preview instead of floating preview quads: the material fold emits a burn surface map, the stock compiler maps it onto prism vertices via power UVs, and the stock shader renders a power-keyed scorch ramp with a heat halo on top-facing surfaces. Texture layers covered by a visible stock's burn are suppressed, the show_lut_overlay toggle is removed in favor of mutually exclusive stock/underlay visibility, and the dependency is bumped to raygeo 1.44.0.
Rotary layers now char their cylindrical stock like flat stock does:
the intent builder emits a material fold per rotary layer against a
raygeo CylinderStock over the unrolled axial x circumference domain
(centered on the machine origin), keyed stock:{layer.uid}; material
states resolve to layers as well as stock items. The cylinder shell
duplicates its seam at the bottom so power UVs span the unrolled
domain without crossing the texture cut, and the shader burns lateral
faces only via a uRotary guard on local normals.
Also: rotary LUT quads are suppressed when a burn map covers them,
the wireframe cylinder stays hidden while a layer's solid rotary
stock is visible, the stock visibility toggle now covers rotary
layers, and the dependency is bumped to raygeo 1.45.0.
The material manager now owns default-material resolution: it prefers the user-configured default (new config setting), then oak from any registered library, then a bundled oak shipped under rayforge/resources/materials/ that is never registered as a library and thus invisible in the material manager UI. New stock assets and layers get the configured default material and thickness at creation time (stock_cmd/layer_cmd). The 3D scene presenter falls back to the default material for flat and rotary stock, the wireframe cylinder placeholder is removed, and the 2D canvas resolves the default when a stock's material cannot be resolved. The materials settings page gains a New Stock Defaults group with a default material selector and thickness row.
All materials are now tintable by default: a material is tinted when its color is set and untinted (texture shown as-is) when it is None. The tintable field, its UI switch, and the per-renderer gates are removed, and the color tag is dropped from all built-in material definitions since every material ships with a texture. The stock properties color row is always available. Website docs updated in all languages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Laser engraving is no longer shown as floating preview quads in the
3D view — it is now baked into the stock itself as persistent
charring, for flat and rotary (cylindrical) stock.
MaterialFoldnode per visiblestock item (and per rotary layer), folding upstream raster/vector
material effects into a raygeo
MaterialStatewith a burn surfacemap. Nodes are keyed
stock:{uid}with deterministic versiontokens; results flow through a new
MaterialStateArtifactandresolve to stock items as well as layers.
vertices via power UVs; the stock shader renders a power-keyed
scorch→char→ash color ramp with roughness shift and a heat halo on
top-facing surfaces.
CylinderStockover the unrolled axial × circumference domain(centered on the machine origin). The cylinder shell duplicates its
seam at the bottom so power UVs never cross the texture cut, and the
shader burns lateral faces only (
uRotaryguard on local normals).skipped (flat and rotary); mutually exclusive stock/underlay
visibility replaces the LUT overlay debug toggle.
in rotary layers, and hides/shows the solid cylinder.
Test plan
layer-keyed state dispatch, presenter spec attachment + refresh,
rotary compile with power UVs/seam/AABB, scene-compiler suppression,
overlay toggle behavior.
execute_stagesproducing acylindrical state with a surface map; offscreen EGL render of the
real StockRenderer shows the burned region darkening by ~98
brightness units.
clean.