From ec859420d5b11e57e25c5c30eef2465d5fdb6cec Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 15 Oct 2026 01:33:13 +0700 Subject: [PATCH] TextureCraft: clean-room 3D texture painting in pure Rust An open-source, clean-room implementation of a Substance 3D Painter-style texturing workflow, written in pure Rust with egui and wgpu. - Layer stack with 32 blend modes, masks, generators, content effects and anchor points - Painting, projection, smudge, clone, path, lasso fill, particle brush and quick mask - 43 procedural materials, 17 smart materials and 10 smart masks - Mesh map baking with high-poly, cage and match-by-name support - PBR viewport with HDR environments, TAA and a path-traced Rendering mode - glTF, FBX, COLLADA, OBJ, PLY and STL import; texture export presets; OBJ and GLB export - Dockable Painter-style UI, shortcut editor, web build, MCP server and CLI Co-Authored-By: Claude Opus 5.5 --- .cargo/config.toml | 2 + .gitattributes | 5 + .github/workflows/ci.yml | 65 + .github/workflows/freebsd.yml | 59 + .github/workflows/packaging-lint.yml | 70 + .github/workflows/release.yml | 381 ++ .github/workflows/windows-arm64.yml | 91 + .gitignore | 11 + AGENTS.md | 166 + ATTRIBUTION.md | 35 + CLAUDE.md | 5 + Cargo.lock | 5080 +++++++++++++++++ Cargo.toml | 100 + LICENSE-APACHE | 177 + LICENSE-MIT | 21 + NOTICE | 16 + README.md | 278 + ROADMAP.md | 52 + apps/texturecraft-cli/Cargo.toml | 22 + apps/texturecraft-cli/build.rs | 2 + apps/texturecraft-cli/src/main.rs | 403 ++ apps/texturecraft-cli/tests/cli.rs | 129 + apps/texturecraft-web/Cargo.toml | 26 + apps/texturecraft-web/Trunk.toml | 10 + apps/texturecraft-web/index.html | 30 + apps/texturecraft-web/src/main.rs | 41 + apps/texturecraft-web/src/web.rs | 69 + apps/texturecraft/Cargo.toml | 23 + apps/texturecraft/build.rs | 80 + apps/texturecraft/src/control_server.rs | 114 + apps/texturecraft/src/main.rs | 120 + .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 14833 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 827 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 1575 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 30727 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 2502 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 4567 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 65004 bytes .../apps/ai.storyteller.texturecraft.png | Bin 0 -> 7026 bytes .../apps/ai.storyteller.texturecraft.svg | 169 + assets/app-icon/icon-1024.png | Bin 0 -> 136893 bytes assets/app-icon/icon.py | 164 + assets/app-icon/icon.svg | 169 + assets/app-icon/texturecraft.icns | Bin 0 -> 304850 bytes assets/app-icon/texturecraft.ico | Bin 0 -> 66846 bytes clippy.toml | 4 + crates/automation/Cargo.toml | 28 + crates/automation/README.md | 45 + crates/automation/src/bridge.rs | 107 + crates/automation/src/budgets.rs | 75 + crates/automation/src/headless.rs | 306 + crates/automation/src/lib.rs | 49 + crates/automation/src/render.rs | 168 + crates/automation/src/rpc.rs | 273 + crates/automation/src/security.rs | 171 + crates/automation/src/server.rs | 499 ++ crates/automation/src/workspace.rs | 259 + crates/automation/tests/agent_tasks.rs | 377 ++ crates/bake/Cargo.toml | 16 + crates/bake/README.md | 22 + crates/bake/src/lib.rs | 236 + crates/bake/src/maps.rs | 356 ++ crates/bake/src/tests.rs | 423 ++ crates/compose/Cargo.toml | 16 + crates/compose/src/below.rs | 222 + crates/compose/src/display.rs | 166 + crates/compose/src/eval.rs | 1642 ++++++ crates/compose/src/lib.rs | 19 + crates/compose/src/pattern.rs | 298 + crates/compose/src/store.rs | 120 + crates/compose/tests/cache_and_instances.rs | 201 + crates/core/Cargo.toml | 14 + crates/core/src/blend.rs | 441 ++ crates/core/src/channel.rs | 206 + crates/core/src/layer.rs | 716 +++ crates/core/src/lib.rs | 38 + crates/core/src/project.rs | 744 +++ crates/engine/Cargo.toml | 25 + crates/engine/src/bake_cmds.rs | 390 ++ crates/engine/src/commands.rs | 177 + crates/engine/src/file_cmds.rs | 432 ++ crates/engine/src/inspect.rs | 143 + crates/engine/src/instance_cmds.rs | 163 + crates/engine/src/layer_cmds.rs | 404 ++ crates/engine/src/layer_ops.rs | 217 + crates/engine/src/lib.rs | 64 + crates/engine/src/mask_cmds.rs | 485 ++ crates/engine/src/material_lib.rs | 142 + crates/engine/src/materials.rs | 579 ++ crates/engine/src/painting.rs | 511 ++ crates/engine/src/path_tool.rs | 184 + crates/engine/src/preview.rs | 143 + crates/engine/src/project_cmds.rs | 77 + crates/engine/src/quick_mask.rs | 137 + crates/engine/src/resource_cmds.rs | 152 + crates/engine/src/session.rs | 698 +++ crates/engine/src/set_cmds.rs | 127 + crates/engine/src/smart_masks.rs | 152 + crates/engine/src/tool_cmds.rs | 322 ++ crates/engine/src/view_cmds.rs | 227 + crates/engine/tests/bake.rs | 129 + crates/engine/tests/content_effects.rs | 113 + crates/engine/tests/instances.rs | 232 + crates/engine/tests/path_tool.rs | 131 + crates/engine/tests/perf.rs | 137 + crates/engine/tests/session.rs | 193 + crates/engine/tests/tools.rs | 130 + crates/formats/Cargo.toml | 26 + crates/formats/README.md | 131 + crates/formats/src/export/mod.rs | 698 +++ crates/formats/src/export/tests.rs | 355 ++ crates/formats/src/image_res.rs | 49 + crates/formats/src/lib.rs | 103 + crates/formats/src/mesh_export.rs | 284 + crates/formats/src/mesh_import/dae.rs | 344 ++ crates/formats/src/mesh_import/fbx.rs | 613 ++ crates/formats/src/mesh_import/gltf.rs | 250 + crates/formats/src/mesh_import/mod.rs | 359 ++ crates/formats/src/mesh_import/obj.rs | 85 + crates/formats/src/mesh_import/ply.rs | 262 + crates/formats/src/mesh_import/scene_tests.rs | 455 ++ crates/formats/src/mesh_import/stl.rs | 78 + crates/formats/src/mesh_import/tests.rs | 415 ++ crates/formats/src/presets.rs | 170 + crates/formats/src/project_file/mod.rs | 387 ++ crates/formats/src/project_file/tests.rs | 168 + crates/geom/Cargo.toml | 16 + crates/geom/src/bvh.rs | 379 ++ crates/geom/src/camera.rs | 140 + crates/geom/src/gbuffer.rs | 195 + crates/geom/src/lib.rs | 28 + crates/geom/src/mesh.rs | 325 ++ crates/geom/src/primitives.rs | 373 ++ crates/geom/src/unwrap.rs | 384 ++ crates/paint/Cargo.toml | 17 + crates/paint/src/brush.rs | 289 + crates/paint/src/commit.rs | 192 + crates/paint/src/lib.rs | 28 + crates/paint/src/particles.rs | 101 + crates/paint/src/path.rs | 97 + crates/paint/src/pickup.rs | 193 + crates/paint/src/raster.rs | 291 + crates/paint/src/stroke.rs | 277 + crates/paint/src/visibility.rs | 135 + crates/render/Cargo.toml | 25 + crates/render/src/headless.rs | 30 + crates/render/src/ibl.rs | 354 ++ crates/render/src/lib.rs | 23 + crates/render/src/mesh_maps.rs | 26 + crates/render/src/renderer.rs | 1277 +++++ crates/render/src/shaders/mesh.wgsl | 393 ++ crates/render/src/shaders/post.wgsl | 133 + crates/render/src/shaders/shadow.wgsl | 8 + crates/render/src/shaders/util.wgsl | 61 + crates/render/src/trace.rs | 799 +++ crates/render/tests/headless.rs | 352 ++ crates/texel/Cargo.toml | 11 + crates/texel/src/dilate.rs | 118 + crates/texel/src/lib.rs | 57 + crates/texel/src/noise.rs | 166 + crates/texel/src/tile.rs | 315 + crates/ui-egui/Cargo.toml | 33 + crates/ui-egui/src/control.rs | 156 + crates/ui-egui/src/dock.rs | 1321 +++++ crates/ui-egui/src/docking.rs | 612 ++ crates/ui-egui/src/gpu.rs | 251 + crates/ui-egui/src/i18n.rs | 43 + crates/ui-egui/src/keymap.rs | 295 + crates/ui-egui/src/lib.rs | 349 ++ crates/ui-egui/src/menus.rs | 286 + crates/ui-egui/src/parity.rs | 52 + crates/ui-egui/src/render_mode.rs | 274 + crates/ui-egui/src/shelf.rs | 266 + crates/ui-egui/src/state.rs | 250 + crates/ui-egui/src/theme.rs | 113 + crates/ui-egui/src/thumbs.rs | 236 + crates/ui-egui/src/toolbar.rs | 260 + crates/ui-egui/src/viewport.rs | 597 ++ crates/ui-egui/src/web_files.rs | 314 + crates/ui-egui/src/widgets.rs | 172 + crates/ui-egui/src/windows.rs | 874 +++ docs/architecture.md | 92 + docs/brand/LICENSE-brand.txt | 42 + docs/brand/artcraft-logo-white.png | Bin 0 -> 32161 bytes docs/brand/artcraft-logo-white.svg | 7 + docs/brand/artcraft-logo.png | Bin 0 -> 31302 bytes docs/brand/artcraft-logo.svg | 7 + docs/brand/artcraft-mark-black.png | Bin 0 -> 26793 bytes docs/brand/artcraft-mark-black.svg | 4 + docs/brand/artcraft-mark.png | Bin 0 -> 24715 bytes docs/brand/artcraft-mark.svg | 4 + docs/control-protocol.md | 225 + docs/images/texturecraft-workspace.png | Bin 0 -> 564779 bytes docs/parity.md | 89 + docs/release-playbook.md | 8 + docs/releasing.md | 104 + packaging/.shellcheckrc | 3 + packaging/env.sh | 53 + packaging/freebsd/package.sh | 100 + packaging/icons.sh | 57 + packaging/linux/AppRun | 72 + .../linux/ai.storyteller.texturecraft.desktop | 14 + ...i.storyteller.texturecraft.metainfo.xml.in | 68 + .../ai.storyteller.texturecraft.mime.xml | 41 + packaging/linux/apprun-test.sh | 98 + packaging/linux/flatpak-bundle.sh | 72 + .../ai.storyteller.TextureCraft.bundle.yml | 50 + .../flatpak/ai.storyteller.TextureCraft.yml | 66 + packaging/linux/nfpm.yaml | 81 + packaging/linux/package.sh | 144 + packaging/linux/postinst.sh | 13 + packaging/macos/Info.plist.in | 183 + packaging/macos/entitlements.plist | 9 + packaging/macos/import-cert.sh | 50 + packaging/macos/package.sh | 165 + packaging/macos/verify.sh | 149 + packaging/web/.htaccess | 16 + packaging/web/README.md | 88 + packaging/web/_headers | 13 + packaging/web/package.sh | 56 + packaging/windows/package.ps1 | 128 + packaging/windows/sign.ps1 | 95 + packaging/windows/texturecraft.wxs | 89 + rustfmt.toml | 3 + xtask/Cargo.toml | 13 + xtask/src/ico.rs | 173 + xtask/src/layers.rs | 220 + xtask/src/main.rs | 180 + xtask/src/version.rs | 148 + 229 files changed, 46344 insertions(+) create mode 100644 .cargo/config.toml create mode 100644 .gitattributes create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/freebsd.yml create mode 100644 .github/workflows/packaging-lint.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/windows-arm64.yml create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 ATTRIBUTION.md create mode 100644 CLAUDE.md create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 LICENSE-APACHE create mode 100644 LICENSE-MIT create mode 100644 NOTICE create mode 100644 README.md create mode 100644 ROADMAP.md create mode 100644 apps/texturecraft-cli/Cargo.toml create mode 100644 apps/texturecraft-cli/build.rs create mode 100644 apps/texturecraft-cli/src/main.rs create mode 100644 apps/texturecraft-cli/tests/cli.rs create mode 100644 apps/texturecraft-web/Cargo.toml create mode 100644 apps/texturecraft-web/Trunk.toml create mode 100644 apps/texturecraft-web/index.html create mode 100644 apps/texturecraft-web/src/main.rs create mode 100644 apps/texturecraft-web/src/web.rs create mode 100644 apps/texturecraft/Cargo.toml create mode 100644 apps/texturecraft/build.rs create mode 100644 apps/texturecraft/src/control_server.rs create mode 100644 apps/texturecraft/src/main.rs create mode 100644 assets/app-icon/hicolor/128x128/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/16x16/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/24x24/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/256x256/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/32x32/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/48x48/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/512x512/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/64x64/apps/ai.storyteller.texturecraft.png create mode 100644 assets/app-icon/hicolor/scalable/apps/ai.storyteller.texturecraft.svg create mode 100644 assets/app-icon/icon-1024.png create mode 100644 assets/app-icon/icon.py create mode 100644 assets/app-icon/icon.svg create mode 100644 assets/app-icon/texturecraft.icns create mode 100644 assets/app-icon/texturecraft.ico create mode 100644 clippy.toml create mode 100644 crates/automation/Cargo.toml create mode 100644 crates/automation/README.md create mode 100644 crates/automation/src/bridge.rs create mode 100644 crates/automation/src/budgets.rs create mode 100644 crates/automation/src/headless.rs create mode 100644 crates/automation/src/lib.rs create mode 100644 crates/automation/src/render.rs create mode 100644 crates/automation/src/rpc.rs create mode 100644 crates/automation/src/security.rs create mode 100644 crates/automation/src/server.rs create mode 100644 crates/automation/src/workspace.rs create mode 100644 crates/automation/tests/agent_tasks.rs create mode 100644 crates/bake/Cargo.toml create mode 100644 crates/bake/README.md create mode 100644 crates/bake/src/lib.rs create mode 100644 crates/bake/src/maps.rs create mode 100644 crates/bake/src/tests.rs create mode 100644 crates/compose/Cargo.toml create mode 100644 crates/compose/src/below.rs create mode 100644 crates/compose/src/display.rs create mode 100644 crates/compose/src/eval.rs create mode 100644 crates/compose/src/lib.rs create mode 100644 crates/compose/src/pattern.rs create mode 100644 crates/compose/src/store.rs create mode 100644 crates/compose/tests/cache_and_instances.rs create mode 100644 crates/core/Cargo.toml create mode 100644 crates/core/src/blend.rs create mode 100644 crates/core/src/channel.rs create mode 100644 crates/core/src/layer.rs create mode 100644 crates/core/src/lib.rs create mode 100644 crates/core/src/project.rs create mode 100644 crates/engine/Cargo.toml create mode 100644 crates/engine/src/bake_cmds.rs create mode 100644 crates/engine/src/commands.rs create mode 100644 crates/engine/src/file_cmds.rs create mode 100644 crates/engine/src/inspect.rs create mode 100644 crates/engine/src/instance_cmds.rs create mode 100644 crates/engine/src/layer_cmds.rs create mode 100644 crates/engine/src/layer_ops.rs create mode 100644 crates/engine/src/lib.rs create mode 100644 crates/engine/src/mask_cmds.rs create mode 100644 crates/engine/src/material_lib.rs create mode 100644 crates/engine/src/materials.rs create mode 100644 crates/engine/src/painting.rs create mode 100644 crates/engine/src/path_tool.rs create mode 100644 crates/engine/src/preview.rs create mode 100644 crates/engine/src/project_cmds.rs create mode 100644 crates/engine/src/quick_mask.rs create mode 100644 crates/engine/src/resource_cmds.rs create mode 100644 crates/engine/src/session.rs create mode 100644 crates/engine/src/set_cmds.rs create mode 100644 crates/engine/src/smart_masks.rs create mode 100644 crates/engine/src/tool_cmds.rs create mode 100644 crates/engine/src/view_cmds.rs create mode 100644 crates/engine/tests/bake.rs create mode 100644 crates/engine/tests/content_effects.rs create mode 100644 crates/engine/tests/instances.rs create mode 100644 crates/engine/tests/path_tool.rs create mode 100644 crates/engine/tests/perf.rs create mode 100644 crates/engine/tests/session.rs create mode 100644 crates/engine/tests/tools.rs create mode 100644 crates/formats/Cargo.toml create mode 100644 crates/formats/README.md create mode 100644 crates/formats/src/export/mod.rs create mode 100644 crates/formats/src/export/tests.rs create mode 100644 crates/formats/src/image_res.rs create mode 100644 crates/formats/src/lib.rs create mode 100644 crates/formats/src/mesh_export.rs create mode 100644 crates/formats/src/mesh_import/dae.rs create mode 100644 crates/formats/src/mesh_import/fbx.rs create mode 100644 crates/formats/src/mesh_import/gltf.rs create mode 100644 crates/formats/src/mesh_import/mod.rs create mode 100644 crates/formats/src/mesh_import/obj.rs create mode 100644 crates/formats/src/mesh_import/ply.rs create mode 100644 crates/formats/src/mesh_import/scene_tests.rs create mode 100644 crates/formats/src/mesh_import/stl.rs create mode 100644 crates/formats/src/mesh_import/tests.rs create mode 100644 crates/formats/src/presets.rs create mode 100644 crates/formats/src/project_file/mod.rs create mode 100644 crates/formats/src/project_file/tests.rs create mode 100644 crates/geom/Cargo.toml create mode 100644 crates/geom/src/bvh.rs create mode 100644 crates/geom/src/camera.rs create mode 100644 crates/geom/src/gbuffer.rs create mode 100644 crates/geom/src/lib.rs create mode 100644 crates/geom/src/mesh.rs create mode 100644 crates/geom/src/primitives.rs create mode 100644 crates/geom/src/unwrap.rs create mode 100644 crates/paint/Cargo.toml create mode 100644 crates/paint/src/brush.rs create mode 100644 crates/paint/src/commit.rs create mode 100644 crates/paint/src/lib.rs create mode 100644 crates/paint/src/particles.rs create mode 100644 crates/paint/src/path.rs create mode 100644 crates/paint/src/pickup.rs create mode 100644 crates/paint/src/raster.rs create mode 100644 crates/paint/src/stroke.rs create mode 100644 crates/paint/src/visibility.rs create mode 100644 crates/render/Cargo.toml create mode 100644 crates/render/src/headless.rs create mode 100644 crates/render/src/ibl.rs create mode 100644 crates/render/src/lib.rs create mode 100644 crates/render/src/mesh_maps.rs create mode 100644 crates/render/src/renderer.rs create mode 100644 crates/render/src/shaders/mesh.wgsl create mode 100644 crates/render/src/shaders/post.wgsl create mode 100644 crates/render/src/shaders/shadow.wgsl create mode 100644 crates/render/src/shaders/util.wgsl create mode 100644 crates/render/src/trace.rs create mode 100644 crates/render/tests/headless.rs create mode 100644 crates/texel/Cargo.toml create mode 100644 crates/texel/src/dilate.rs create mode 100644 crates/texel/src/lib.rs create mode 100644 crates/texel/src/noise.rs create mode 100644 crates/texel/src/tile.rs create mode 100644 crates/ui-egui/Cargo.toml create mode 100644 crates/ui-egui/src/control.rs create mode 100644 crates/ui-egui/src/dock.rs create mode 100644 crates/ui-egui/src/docking.rs create mode 100644 crates/ui-egui/src/gpu.rs create mode 100644 crates/ui-egui/src/i18n.rs create mode 100644 crates/ui-egui/src/keymap.rs create mode 100644 crates/ui-egui/src/lib.rs create mode 100644 crates/ui-egui/src/menus.rs create mode 100644 crates/ui-egui/src/parity.rs create mode 100644 crates/ui-egui/src/render_mode.rs create mode 100644 crates/ui-egui/src/shelf.rs create mode 100644 crates/ui-egui/src/state.rs create mode 100644 crates/ui-egui/src/theme.rs create mode 100644 crates/ui-egui/src/thumbs.rs create mode 100644 crates/ui-egui/src/toolbar.rs create mode 100644 crates/ui-egui/src/viewport.rs create mode 100644 crates/ui-egui/src/web_files.rs create mode 100644 crates/ui-egui/src/widgets.rs create mode 100644 crates/ui-egui/src/windows.rs create mode 100644 docs/architecture.md create mode 100644 docs/brand/LICENSE-brand.txt create mode 100644 docs/brand/artcraft-logo-white.png create mode 100644 docs/brand/artcraft-logo-white.svg create mode 100644 docs/brand/artcraft-logo.png create mode 100644 docs/brand/artcraft-logo.svg create mode 100644 docs/brand/artcraft-mark-black.png create mode 100644 docs/brand/artcraft-mark-black.svg create mode 100644 docs/brand/artcraft-mark.png create mode 100644 docs/brand/artcraft-mark.svg create mode 100644 docs/control-protocol.md create mode 100644 docs/images/texturecraft-workspace.png create mode 100644 docs/parity.md create mode 100644 docs/release-playbook.md create mode 100644 docs/releasing.md create mode 100644 packaging/.shellcheckrc create mode 100644 packaging/env.sh create mode 100644 packaging/freebsd/package.sh create mode 100644 packaging/icons.sh create mode 100644 packaging/linux/AppRun create mode 100644 packaging/linux/ai.storyteller.texturecraft.desktop create mode 100644 packaging/linux/ai.storyteller.texturecraft.metainfo.xml.in create mode 100644 packaging/linux/ai.storyteller.texturecraft.mime.xml create mode 100644 packaging/linux/apprun-test.sh create mode 100644 packaging/linux/flatpak-bundle.sh create mode 100644 packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml create mode 100644 packaging/linux/flatpak/ai.storyteller.TextureCraft.yml create mode 100644 packaging/linux/nfpm.yaml create mode 100644 packaging/linux/package.sh create mode 100644 packaging/linux/postinst.sh create mode 100644 packaging/macos/Info.plist.in create mode 100644 packaging/macos/entitlements.plist create mode 100644 packaging/macos/import-cert.sh create mode 100644 packaging/macos/package.sh create mode 100644 packaging/macos/verify.sh create mode 100644 packaging/web/.htaccess create mode 100644 packaging/web/README.md create mode 100644 packaging/web/_headers create mode 100644 packaging/web/package.sh create mode 100644 packaging/windows/package.ps1 create mode 100644 packaging/windows/sign.ps1 create mode 100644 packaging/windows/texturecraft.wxs create mode 100644 rustfmt.toml create mode 100644 xtask/Cargo.toml create mode 100644 xtask/src/ico.rs create mode 100644 xtask/src/layers.rs create mode 100644 xtask/src/main.rs create mode 100644 xtask/src/version.rs diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..5592118f --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +xtask = "run -p xtask --" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..12adf75e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +* text=auto eol=lf +*.png binary +*.ico binary +*.icns binary +*.ps1 text eol=crlf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9a9a3648 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +# Format, lint, test, dependency layering and the wasm32 check on Linux and Windows. +# No macOS here: the org's macOS runner slots are reserved for release.yml +# (craftrules release/cut-a-release.md, Gotchas). +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + RUST_BACKTRACE: 1 + +# A newer push to a PR branch cancels its older run. Runs on main are never cancelled, so every +# main state that gets a run is checked to the end. +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + check: + name: check (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Install Linux system dependencies (egui/winit/wgpu/rfd) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev \ + libgl1-mesa-dev libgtk-3-dev + + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + with: + components: clippy, rustfmt + targets: wasm32-unknown-unknown + + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + + - name: Format + run: cargo fmt --all -- --check + + - name: Clippy + run: cargo clippy --workspace --all-targets --locked -- -D warnings + + - name: Test + run: cargo test --workspace --locked + + - name: Dependency layering + run: cargo xtask layers + + - name: wasm32 check + run: cargo xtask wasm diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 00000000..0063fed4 --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,59 @@ +# Builds and tests the workspace on FreeBSD, inside a FreeBSD VM on a Linux runner +# (GitHub has no FreeBSD runners). It then runs packaging/freebsd/package.sh, the script the +# release job runs, and checks the tarball, so a broken FreeBSD package fails here before it can +# fail a release. Nothing is uploaded and no secrets are used. +name: FreeBSD + +# The VM build takes one to several hours, so it runs nightly on main rather than on every push. +# PRs that change the FreeBSD packaging itself still run it. +on: + schedule: + - cron: "17 2 * * *" + pull_request: + paths: + - .github/workflows/freebsd.yml + - packaging/freebsd/** + - packaging/env.sh + workflow_dispatch: + +concurrency: + group: freebsd-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + freebsd: + name: FreeBSD 14 (build + test + package) + runs-on: ubuntu-latest + timeout-minutes: 300 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Build, test and package in a FreeBSD VM + # vmactions/freebsd-vm v1.5.9, pinned by commit (it runs our build). + uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9 + with: + release: "14.3" + usesh: true + cpu: 4 + mem: 12288 + # Nothing to bring back; copying the target dir out of the VM fails on large builds. + copyback: false + prepare: | + pkg install -y bash git curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable + run: | + set -e + . "$HOME/.cargo/env" + # The checkout is synced in under another owner; let tests that call git read it. + git config --global --add safe.directory "*" + rustc --version + # One test thread: the VM's software Vulkan driver crashes when several tests set up a + # GPU device at once (PhotoCraft). GPU tests must skip themselves when there is no adapter. + CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked -- --test-threads=1 + # The release package, as release.yml builds it. Free the debug build's disk first. + rm -rf target/debug + CARGO_BUILD_JOBS=4 bash packaging/freebsd/package.sh + tar -tzf dist/release/texturecraft-*-freebsd-x86_64.tar.gz \ + | grep -E '/bin/texturecraft$|/bin/texturecraft-cli$|/share/applications/ai\.storyteller\.texturecraft\.desktop$|/share/doc/texturecraft/LICENSE-MIT$' diff --git a/.github/workflows/packaging-lint.yml b/.github/workflows/packaging-lint.yml new file mode 100644 index 00000000..176a9538 --- /dev/null +++ b/.github/workflows/packaging-lint.yml @@ -0,0 +1,70 @@ +# Quick static checks for the release pipeline (seconds, no Rust build): workflow syntax, +# packaging shell/PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata. +name: Packaging lint + +on: + push: + branches: [main, release] + paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"] + pull_request: + paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: packaging-lint-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + env: + ACTIONLINT_VERSION: 1.7.12 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install tools + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends shellcheck desktop-file-utils appstream libxml2-utils python3-yaml + curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" \ + | tar -xz -C "$RUNNER_TEMP" actionlint + - name: actionlint + run: | + "$RUNNER_TEMP/actionlint" -color + - name: shellcheck + run: shellcheck packaging/*.sh packaging/*/*.sh packaging/linux/AppRun + - name: AppImage AppRun desktop integration + run: bash packaging/linux/apprun-test.sh + - name: PowerShell + shell: pwsh + run: | + foreach ($f in Get-ChildItem packaging/windows/*.ps1) { + $errors = $null + [System.Management.Automation.Language.Parser]::ParseFile($f.FullName, [ref]$null, [ref]$errors) | Out-Null + if ($errors) { $errors | ForEach-Object { Write-Output "::error file=$($f.Name)::$_" }; exit 1 } + Write-Output "ok $($f.Name)" + } + - name: XML, desktop entry, AppStream, Flatpak manifest + run: | + xmllint --noout packaging/windows/texturecraft.wxs packaging/macos/*.plist* packaging/linux/*.xml* + # Windows Installer needs Icon ids ending in .ico or .exe, or shortcuts show a blank icon (ICE50). + if grep -oE '"$RUNNER_TEMP/ai.storyteller.texturecraft.metainfo.xml" + appstreamcli validate --no-net --explain "$RUNNER_TEMP/ai.storyteller.texturecraft.metainfo.xml" + python3 - <<'EOF' + import yaml + src = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.TextureCraft.yml")) + bundle = yaml.safe_load(open("packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml")) + for m in (src, bundle): + assert m["id"] == "ai.storyteller.texturecraft" and m["command"] == "texturecraft", m["id"] + for key in ("runtime", "runtime-version", "sdk", "finish-args"): + assert src[key] == bundle[key], f"Flatpak manifests disagree on {key}: {src[key]} vs {bundle[key]}" + print("Flatpak manifests ok") + EOF + - name: FreeBSD tarball layout (stub binaries) + run: bash packaging/freebsd/package.sh --dry-run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..870f0d99 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,381 @@ +# Release pipeline: every push to `release` builds platform artifacts (signed where credentials +# are configured) and creates or updates the draft GitHub Release "TextureCraft v". +# See docs/releasing.md and craftrules release/playbook.md. +# +# The signing jobs (macOS, Windows) and the draft-release job run in the `release` environment +# (restricted to the `release` branch), which holds the signing secrets. Every secret is optional: +# missing ones produce unsigned artifacts and a warning, never a failed build. The jobs that sign +# nothing (version, Linux, Flatpak, FreeBSD, web) run without it, so a dispatch on any branch is a +# dry run of them; the release job needs the signed jobs, so a branch run never drafts a release. +name: Release + +on: + push: + branches: [release] + workflow_dispatch: + inputs: + version: + description: "Version override for a test run, e.g. 0.2.0-rc.1 (empty: Cargo.toml)" + type: string + default: "" + +permissions: + contents: read + +concurrency: + group: release-${{ github.ref }} + # Never cancel a run mid-notarization or mid-upload; a newer push waits its turn. + cancel-in-progress: false + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + RUST_BACKTRACE: 1 + TEXTURECRAFT_BUILD_SHA: ${{ github.sha }} + INPUT_VERSION: ${{ inputs.version }} + +jobs: + version: + name: version + runs-on: ubuntu-latest + # No `environment: release` here or on the other jobs that sign nothing: no release secrets. + outputs: + version: ${{ steps.v.outputs.version }} + date: ${{ steps.v.outputs.date }} + prerelease: ${{ steps.v.outputs.prerelease }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - id: v + name: Resolve version + run: | + . packaging/env.sh + v="${INPUT_VERSION#v}" + v="${v:-$VERSION}" + if ! printf '%s' "$v" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$'; then + echo "::error::'$v' is not a version like 1.2.3 or 1.2.3-rc.1" + exit 1 + fi + case "$v" in *-*) pre=true ;; *) pre=false ;; esac + { + echo "version=$v" + echo "date=$(date -u +%Y-%m-%d)" + echo "prerelease=$pre" + } >>"$GITHUB_OUTPUT" + echo "### TextureCraft v$v (\`${GITHUB_SHA::9}\`)" >>"$GITHUB_STEP_SUMMARY" + + macos: + name: macOS universal + needs: version + runs-on: macos-15-xlarge # M2 Pro larger runner; use only in release.yml (actions_macos_xl budget caps spend) + environment: release + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + with: + targets: aarch64-apple-darwin, x86_64-apple-darwin + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + key: release-macos-universal + - name: Apply version override + if: inputs.version != '' + run: cargo xtask version set "$TEXTURECRAFT_VERSION" + - name: Import signing certificate + env: + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: bash packaging/macos/import-cert.sh + - name: Build, sign, notarize + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + run: bash packaging/macos/package.sh --arch universal + # Unpacks the CLI zip and checks the binary users get: Developer ID, hardened runtime, + # timestamp, and Gatekeeper's notarization lookup; also the DMG's stapled ticket. Strict when + # the signing secrets are present, warnings otherwise. + - name: Verify signatures and notarization + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + run: bash packaging/macos/verify.sh --arch universal + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-macos + path: dist/release/* + if-no-files-found: error + - name: Remove temporary keychain + if: always() + run: | + if [ -n "${MACOS_KEYCHAIN:-}" ]; then security delete-keychain "$MACOS_KEYCHAIN" || true; fi + + windows: + name: Windows ${{ matrix.arch }} + needs: version + runs-on: windows-latest + environment: release + strategy: + fail-fast: false + matrix: + include: + - { arch: x64, target: x86_64-pc-windows-msvc } + - { arch: x86, target: i686-pc-windows-msvc } + # Windows on ARM: cross-compiled on the x64 runner, so signing and WiX run as above. + # .github/workflows/windows-arm64.yml installs and runs it on ARM64 hardware. + - { arch: arm64, target: aarch64-pc-windows-msvc } + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + with: + targets: ${{ matrix.target }} + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + key: release-windows-${{ matrix.arch }} + - name: Apply version override + if: inputs.version != '' + shell: bash + run: cargo xtask version set "$TEXTURECRAFT_VERSION" + - name: Install WiX + shell: pwsh + run: dotnet tool install --global wix --version 5.0.2 + - name: Build, sign, package + shell: pwsh + env: + WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} + WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + AZURE_SIGNING_ENDPOINT: ${{ secrets.AZURE_SIGNING_ENDPOINT }} + AZURE_SIGNING_ACCOUNT: ${{ secrets.AZURE_SIGNING_ACCOUNT }} + AZURE_CERT_PROFILE: ${{ secrets.AZURE_CERT_PROFILE }} + run: ./packaging/windows/package.ps1 -Arch ${{ matrix.arch }} + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-windows-${{ matrix.arch }} + path: dist/release/* + if-no-files-found: error + + linux: + name: Linux ${{ matrix.arch }} + needs: version + # The oldest GitHub-hosted image, so the binaries only need glibc >= 2.35 (Ubuntu 22.04+, + # Debian 12+, Fedora 36+, RHEL 10). See docs/releasing.md. + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - { arch: x86_64, runner: ubuntu-22.04, deb: amd64 } + - { arch: aarch64, runner: ubuntu-22.04-arm, deb: arm64 } + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + NFPM_VERSION: 2.47.0 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install build and packaging tools + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev \ + desktop-file-utils appstream python3-yaml zsync + curl -fsSL -o "$RUNNER_TEMP/nfpm.deb" \ + "https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_${{ matrix.deb }}.deb" + sudo dpkg -i "$RUNNER_TEMP/nfpm.deb" + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + key: release-linux-${{ matrix.arch }} + - name: Apply version override + if: inputs.version != '' + run: cargo xtask version set "$TEXTURECRAFT_VERSION" + - name: Build and package (AppImage, deb, rpm, tar.gz) + run: bash packaging/linux/package.sh + - name: Check the packages + run: | + dpkg-deb --info dist/release/*.deb + dpkg-deb --contents dist/release/*.deb | grep -E 'usr/bin/texturecraft$|metainfo|applications' + ldd target/release/texturecraft + python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/flatpak/ai.storyteller.TextureCraft.yml')); assert m['id'] == 'ai.storyteller.texturecraft'" + for appimage in dist/release/*.AppImage; do + chmod +x "$appimage" + APPIMAGE_EXTRACT_AND_RUN=1 "$appimage" --version + # Update information is embedded, and the .zsync for delta updates sits beside it. + "$appimage" --appimage-updateinformation | grep -F 'gh-releases-zsync|' + test -s "$appimage.zsync" + done + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-linux-${{ matrix.arch }} + path: dist/release/* + if-no-files-found: error + + flatpak: + name: Flatpak ${{ matrix.arch }} + needs: [version, linux] + # Repackages the Linux job's tarball (the same binaries as the AppImage/deb/rpm); no Rust + # build here. 24.04 for a newer flatpak-builder (1.4) than 22.04 ships. + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - { arch: x86_64, runner: ubuntu-24.04 } + - { arch: aarch64, runner: ubuntu-24.04-arm } + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: release-linux-${{ matrix.arch }} + path: dist/linux + - name: Install flatpak-builder + run: | + sudo apt-get update + # librsvg2-common: the SVG pixbuf loader. flatpak-builder runs the host's + # `appstreamcli compose`, which renders the scalable icon and fails without it. + sudo apt-get install -y --no-install-recommends flatpak flatpak-builder librsvg2-common + # Ubuntu 24.04's AppArmor blocks the unprivileged user namespaces bubblewrap needs. + sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: Build the Flatpak bundle + run: bash packaging/linux/flatpak-bundle.sh "dist/linux/texturecraft-$TEXTURECRAFT_VERSION-linux-${{ matrix.arch }}.tar.gz" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-flatpak-${{ matrix.arch }} + path: dist/release/*.flatpak + if-no-files-found: error + + freebsd: + name: FreeBSD x86_64 + needs: version + # GitHub has no FreeBSD runners: build in a FreeBSD 14.3 VM, the same image and packages as + # .github/workflows/freebsd.yml. + runs-on: ubuntu-latest + timeout-minutes: 180 + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Build and package in a FreeBSD VM (tar.gz) + # vmactions/freebsd-vm v1.5.9, pinned by commit (it runs our build). + uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1.5.9 + with: + release: "14.3" + usesh: true + cpu: 4 + mem: 12288 + # Passed into the VM by name; never templated into the script below. + envs: "TEXTURECRAFT_VERSION TEXTURECRAFT_BUILD_DATE TEXTURECRAFT_BUILD_SHA INPUT_VERSION" + # The FreeBSD CI packages, plus bash for the packaging script. + prepare: | + pkg install -y bash git curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable + run: | + set -e + . "$HOME/.cargo/env" + git config --global --add safe.directory "$PWD" + # Build outside the checkout so only dist/ is copied back out of the VM (copying the + # target dir back fails on large builds). 4 jobs: more runs the VM out of memory. + export CARGO_TARGET_DIR=/var/tmp/texturecraft-target CARGO_BUILD_JOBS=4 + if [ -n "$INPUT_VERSION" ]; then cargo xtask version set "$TEXTURECRAFT_VERSION"; fi + bash packaging/freebsd/package.sh + tar -tzf dist/release/texturecraft-*-freebsd-x86_64.tar.gz \ + | grep -E '/bin/texturecraft$|/bin/texturecraft-cli$|/share/applications/ai\.storyteller\.texturecraft\.desktop$|/share/doc/texturecraft/LICENSE-MIT$' + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-freebsd-x86_64 + path: dist/release/* + if-no-files-found: error + + web: + name: Web (wasm) + needs: version + runs-on: ubuntu-latest + env: + TEXTURECRAFT_VERSION: ${{ needs.version.outputs.version }} + TEXTURECRAFT_BUILD_DATE: ${{ needs.version.outputs.date }} + TRUNK_VERSION: 0.21.14 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + with: + targets: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + key: release-web + - name: Install trunk + run: | + curl -fsSL "https://github.com/trunk-rs/trunk/releases/download/v${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz" \ + | tar -xz -C "$HOME/.cargo/bin" trunk + trunk --version + - name: Apply version override + if: inputs.version != '' + run: cargo xtask version set "$TEXTURECRAFT_VERSION" + - name: Build and zip + run: bash packaging/web/package.sh + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-web + path: dist/release/* + if-no-files-found: error + + release: + name: Draft GitHub Release + needs: [version, macos, windows, linux, flatpak, freebsd, web] + runs-on: ubuntu-latest + environment: release + permissions: + contents: write + env: + VERSION: ${{ needs.version.outputs.version }} + PRERELEASE: ${{ needs.version.outputs.prerelease }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + steps: + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + pattern: release-* + path: artifacts + merge-multiple: true + - name: Checksums + working-directory: artifacts + run: | + sha256sum -- * | tee SHA256SUMS.txt + - name: Create or update the draft release + working-directory: artifacts + run: | + tag="v$VERSION" + title="TextureCraft v$VERSION" + pre=() + if [ "$PRERELEASE" = true ]; then pre=(--prerelease); fi + if draft="$(gh release view "$tag" --json isDraft --jq .isDraft 2>/dev/null)"; then + if [ "$draft" != "true" ]; then + echo "::error::Release $tag is already published. Bump the version (cargo xtask version set) before pushing to release." + exit 1 + fi + echo "Updating draft $tag: replacing its assets" + gh release view "$tag" --json assets --jq '.assets[].name' | while read -r asset; do + gh release delete-asset "$tag" "$asset" --yes + done + gh release edit "$tag" --draft --title "$title" --target "$GITHUB_SHA" --prerelease="$PRERELEASE" + gh release upload "$tag" --clobber -- * + else + echo "Creating draft $tag" + gh release create "$tag" --draft --title "$title" --target "$GITHUB_SHA" --generate-notes "${pre[@]}" -- * + fi + { + echo "Draft release **$title** at \`${GITHUB_SHA::9}\`:" + echo + sed 's/^/ /' SHA256SUMS.txt + } >>"$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/windows-arm64.yml b/.github/workflows/windows-arm64.yml new file mode 100644 index 00000000..d4476cd7 --- /dev/null +++ b/.github/workflows/windows-arm64.yml @@ -0,0 +1,91 @@ +# Windows on ARM: package the ARM64 release the way release.yml does (cross-compiled on an x64 +# runner, unsigned here), then install that MSI on a Windows 11 ARM64 runner, check the installed +# binaries are ARM64, run the CLI natively, and uninstall. (A native ARM64 `cargo test` job is left +# out for now: PdfCraft saw an intermittent access violation in egui UI tests there.) +name: Windows ARM64 + +# Nightly on main (dependency and runner-image drift shows up within a day), and on PRs that +# change the Windows packaging itself. +on: + pull_request: + paths: + - .github/workflows/windows-arm64.yml + - packaging/windows/** + schedule: + - cron: "41 4 * * *" + workflow_dispatch: + +concurrency: + group: windows-arm64-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + package: + name: package (cross-compiled on x64) + runs-on: windows-latest + timeout-minutes: 90 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable + with: + targets: aarch64-pc-windows-msvc + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + key: windows-arm64-package + - name: Install WiX + shell: pwsh + run: dotnet tool install --global wix --version 5.0.2 + - name: Build and package (unsigned) + shell: pwsh + env: + DIST: ${{ github.workspace }}\dist\arm64 + run: ./packaging/windows/package.ps1 -Arch arm64 + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: texturecraft-windows-arm64 + path: dist/arm64/* + if-no-files-found: error + retention-days: 7 + + install: + name: install and run on ARM64 + needs: package + runs-on: windows-11-arm + timeout-minutes: 30 + steps: + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: texturecraft-windows-arm64 + path: dist + - name: Install the MSI, check it, run it, uninstall it + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $msi = (Get-ChildItem dist/*.msi | Select-Object -First 1).FullName + $p = Start-Process msiexec.exe -ArgumentList '/i', "`"$msi`"", '/qn', '/l*v', 'install.log' -Wait -PassThru + if ($p.ExitCode -ne 0) { Get-Content install.log -Tail 60; throw "msiexec /i exited $($p.ExitCode)" } + $dir = Join-Path $env:ProgramFiles 'TextureCraft' + foreach ($exe in 'texturecraft.exe', 'texturecraft-cli.exe') { + $path = Join-Path $dir $exe + if (-not (Test-Path $path)) { throw "$exe not installed in $dir" } + $bytes = [System.IO.File]::ReadAllBytes($path) + $machine = [BitConverter]::ToUInt16($bytes, [BitConverter]::ToInt32($bytes, 0x3C) + 4) + if ($machine -ne 0xAA64) { throw "$exe is for machine 0x$('{0:X}' -f $machine), not ARM64" } + Write-Output "ok $path (ARM64)" + } + # The installed CLI runs natively on ARM64. + $cli = Join-Path $dir 'texturecraft-cli.exe' + $out = & $cli --version 2>&1 | Out-String + if ($LASTEXITCODE -ne 0) { Write-Output $out; throw "texturecraft-cli --version exited $LASTEXITCODE" } + Write-Output "ok texturecraft-cli --version: $($out.Trim())" + $p = Start-Process msiexec.exe -ArgumentList '/x', "`"$msi`"", '/qn' -Wait -PassThru + if ($p.ExitCode -ne 0) { throw "msiexec /x exited $($p.ExitCode)" } + if (Test-Path (Join-Path $dir 'texturecraft.exe')) { throw 'uninstall left texturecraft.exe behind' } + Write-Output 'ok uninstalled' diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..0996cb2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*~ +plan/ +/target +target/ +/dist +/corpus +/log +/secrets +/temp +/craft-fonts +*.tcraft.tmp diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..44c16bc4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,166 @@ +# AGENTS.md: guide for AI agents and contributors + +TextureCraft is an open-source, native 3D texture painter: a clean-room implementation of the +workflow known from Adobe Substance 3D Painter, written in **Rust only** (no JavaScript or TypeScript). **No Tauri, Electron or webview +shells:** the desktop app is native egui/eframe on wgpu, and the web build is the same Rust compiled +to WebAssembly (trunk + wasm-bindgen). Never add Tauri (or any webview/JS UI framework) as a +dependency, build step or packaging target. The product name is always written **TextureCraft** +(`{Function}Craft` in PascalCase, like its siblings PhotoCraft, VectorCraft, FilmCraft, LightCraft, +PdfCraft, EffectCraft, DesignCraft) in user-facing text: UI, window titles, About, installers, +release names, docs prose. Machine names stay lowercase: crates (`texturecraft-*`), binaries, file +names, ids (`ai.storyteller.texturecraft`), the native project extension `.tcraft`. + +Standards and learnings shared across the crafting apps live in `../craftrules` (checked out next +to this repo, or `storytold/craftrules`). Read its `AGENTS.md` at the start of a session, follow its +standards, and contribute reusable learnings back there. Shared code goes only in craft-libs +(`standards/shared-libraries.md`); otherwise copy, don't depend. + +The goal is 1:1 parity with Substance 3D Painter's workflow (same panels, menus, shortcuts, layer +stack semantics and export conventions) with better performance, every feature drivable by agents, +and builds for Windows, macOS, Linux, FreeBSD and the web. Read this file first, then `docs/`. + +## 1. Orientation (5 minutes) + +| Read | Why | +|---|---| +| `docs/architecture.md` | Crate map, layers, the CPU texel engine + GPU viewport split, data flow | +| `docs/control-protocol.md` | The JSON control channel and MCP: how agents drive the running app | +| `ROADMAP.md` | Honest parity estimate, milestones, **current focus** | +| `docs/parity.md` | Generated list of Painter menu items: live or missing | +| `docs/releasing.md` | Versioning (`cargo xtask version`), the `release` branch, packaging | +| `ATTRIBUTION.md` | Every bundled asset with author, source, license | +| `crates//README.md` (where present) | Public API of that crate | + +## 2. Workspace map + +```text +crates/ + core texel geom L0 document model + blend math; sparse COW tiles, padding, noise; meshes, BVH, UV G-buffer, camera + compose bake L1 CPU layer-stack compositor (the oracle) + display conversion; mesh map bakers + paint formats L2 brush engine (strokes, stamps, visibility, commit); mesh import, texture export, .tcraft + engine render L3 Session + command registry (every action is a command); wgpu viewport renderer + automation L4 MCP server + headless JSON-lines RPC + bridge to the running app + ui-egui L5 egui shell (thin: every action goes through engine commands) +apps/ + texturecraft desktop app (eframe/wgpu), `--control ` loopback control server + texturecraft-cli headless CLI (info, run, commands, bake, export, render, mcp, serve) + texturecraft-web the same app in the browser (trunk + wasm-bindgen) +xtask/ cargo xtask layers | wasm | ci | version | ico | icns | parity +``` + +**Layering is enforced** by `cargo xtask layers`: a crate may depend only on lower layers. Nothing +below `ui-egui` may use egui, eframe, winit or rfd; only `render`, `ui-egui` and the apps may use +wgpu. A new crate must be registered in `xtask/src/layers.rs`. + +**The UI crate is swappable.** `texturecraft-ui-egui` holds no document logic: it calls engine +commands (`texturecraft_engine::execute`) and the session's stroke API. Another front end could +replace it without touching the engine. + +## 3. Golden rules + +### Assets, icons and images (absolutely essential) + +- **Never use any icon, image, logo, texture, material, brush, environment, font or other asset + from Adobe, Avid, Image-Line or Autodesk products**, and never copy files from any installed + commercial application (proprietary formats such as `.sbsar`, `.spexp`, `.sppr` or `.spsm`, HDR + environments, UI icons). Not as reference files in the repo either. +- Every image or icon must be **open source, public domain, Creative Commons (CC0/CC-BY), or + original** (made by a contributor who has the right to license it). Prefer generating content in + code (TextureCraft's environments, materials, alphas, meshes and thumbnails are all procedural). +- **Every bundled asset gets a row in [`ATTRIBUTION.md`](ATTRIBUTION.md)** (path, title, author, + source, license) **in the same change that adds it**, plus its license file next to it when the + license requires one. Assets compiled in through dependencies (icon fonts, default fonts) get a + row too. No row, no merge. +- Demo images and README screenshots show TextureCraft rendering original or public-domain content + only. Never personal photos. +- The ArtCraft logos in `docs/brand/` are not open source (`docs/brand/LICENSE-brand.txt`). +- Fonts live in [storytold/craft-fonts](https://github.com/storytold/craft-fonts); never commit font + files here. + +### Clean room + +TextureCraft is an independent, clean-room implementation of a professional texture-painting +workflow. Work from public documentation, general domain knowledge, public algorithms +(GGX/Smith/Schlick, split-sum IBL, MikkTSpace, jump-flood/BFS dilation, Möller–Trumbore, SAH BVH, +spherical harmonics, reoriented normal mapping, W3C blend modes) and public engine conventions +(glTF, Unreal, Unity packing). Never copy proprietary code, shaders, presets or file formats; +Painter file compatibility (`.spp`, `.spexp`, `.sbsar`) is a non-goal. Always describe TextureCraft +as a clean-room implementation, in code, docs and commits. + +### Never crash (outranks feature work) + +People trust TextureCraft with hours of painting. A malformed mesh or project, a bad command or MCP +param, an odd keystroke or a full disk must produce an error the user or agent can act on, never a +panic. The shared standard is `../craftrules/standards/never-crash.md`. + +- Non-test code never panics: no `unwrap()`, `expect()`, `panic!`, `unreachable!`, `todo!` or + `unimplemented!`. Every production crate root carries + `#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]`. +- No `unsafe` (`unsafe_code = "forbid"` for the workspace). +- Input-derived numbers are hostile: `get()` instead of `[i]`, checked/saturating arithmetic, caps + on allocations (mesh triangles, image sizes, zip entries), NaN guards. +- Every crash fix comes with a regression test. The engine's `panic_hunt` test runs every command + with hostile params; keep it green when adding commands. + +### Architecture rules + +1. **Everything is a command.** New user-visible behaviour = a command in the engine + (`crates/engine/src/*_cmds.rs`, registered in `commands.rs`) with id, label, menu path, + shortcut, params doc, `enabled` and `run`, plus tests. The menus, shortcuts, CLI, control channel + and MCP all dispatch commands by id. Menu items come from the catalog in + `crates/ui-egui/src/menus.rs`; an item goes live when its id is implemented. +2. **Programmatic calls never open dialogs.** A command run through the control channel or MCP runs + with defaults; only `ui.menu.invoke` behaves like a menu click. +3. **Inspect shows the agent's work.** `project.inspect` / `session.inspect` must reveal every + layer, mask, effect, fill source and painted tile count an agent changed. +4. **CPU oracle, GPU display.** Layers live as sparse copy-on-write 64×64 tiles; compositing, + painting, baking and export run on the CPU per dirty tile (rayon) and are fully testable; dirty + tiles are uploaded to wgpu textures for the viewport. Any GPU acceleration must match the CPU + compositor in parity tests. +5. **Undo is snapshots.** `Session::edit` clones the document (copy-on-write tiles make this cheap) + and restores it on error, so every command is atomic. +6. **Never break wasm.** L0–L5 must `cargo check --target wasm32-unknown-unknown` + (`cargo xtask wasm`). File-system code is `cfg(not(target_arch = "wasm32"))` with byte-based + alternatives. +7. **Performance is a feature.** Never scan a full texture set per frame; work on dirty tiles. + Benchmark heavy paths (bake, composite, export) in release and record numbers in the dev log. +8. **Verify UI changes visually.** Launch with `--control ` and call `ui.screenshot` (whole + window) or `viewport.screenshot`; look at the PNG. + +## 4. Picking work + +1. `ROADMAP.md` → **Current focus** and the parity table. +2. `docs/parity.md` → missing menu items, grouped by menu. +3. Run the app, take screenshots of TextureCraft and fix the biggest visible gaps in the workflow. +4. `log/devlog.md` (local) → the "Still open" bullets of recent entries. + +## 5. Before you finish a task + +```sh +cargo fmt --all +cargo test -p --release +cargo clippy --workspace --all-targets -- -D warnings +cargo xtask layers +cargo xtask wasm # if you touched L0–L5 +cargo test -p texturecraft-engine --test session panic_hunt # if you added/changed commands +``` + +Then append a terse entry to `log/devlog.md` (what landed, numbers, what's still open). Commit +after every arc of work that builds and passes. + +## 6. Parallel agents + +- Use your own target dir (`CARGO_TARGET_DIR=target/agent-`) and edit only the files you own. + Shared files (`engine/src/commands.rs`, `engine/src/lib.rs`, `ui-egui/src/menus.rs`, + `ui-egui/src/lib.rs`, the root `Cargo.toml`) get small, surgical edits; re-read before editing. +- Put new commands in a **new module** with its own `specs()` registered by one line. +- Write manifests atomically; one broken `Cargo.toml` breaks every agent's build. +- Delete your `target/agent-*` dir when done. + +## 7. Where things are tracked + +- `ROADMAP.md`: milestones, parity estimate and remaining effort. +- `docs/parity.md`: generated Painter menu coverage. +- `docs/releasing.md` and `../craftrules/release/playbook.md`: release builds and signing. +- `plan/` (local, gitignored): execution plan and notes. +- `log/` (local, gitignored): the dev log. diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md new file mode 100644 index 00000000..c5af3f0e --- /dev/null +++ b/ATTRIBUTION.md @@ -0,0 +1,35 @@ +# Attribution + +Every bundled non-code asset in this repository, with its author, source and license. The rule: +**each asset gets a row here in the same change that adds it.** TextureCraft's own code and +original assets are MIT OR Apache-2.0 (see [`LICENSE-MIT`](LICENSE-MIT), +[`LICENSE-APACHE`](LICENSE-APACHE) and [`NOTICE`](NOTICE)); third-party assets must be permissively +licensed and keep their license file next to them. + +| Path | Title | Author | Source | License | +|---|---|---|---|---| +| `assets/app-icon/icon.py` | App icon generator (octopus) | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/icon.svg` | App icon, master vector (generated by `icon.py`) | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/icon-1024.png` | App icon, 1024 px | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/texturecraft.ico` | Windows app icon (16-256 px) | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/texturecraft.icns` | macOS app icon (16-1024 px) | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/hicolor/{16x16,24x24,32x32,48x48,64x64,128x128,256x256,512x512}/apps/ai.storyteller.texturecraft.png` | App icon, hicolor theme PNGs | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `assets/app-icon/hicolor/scalable/apps/ai.storyteller.texturecraft.svg` | App icon, hicolor scalable (copy of `icon.svg`) | TextureCraft contributors | original | MIT OR Apache-2.0 | +| `docs/brand/artcraft-*.svg`, `docs/brand/artcraft-*.png` | ArtCraft logo and mark | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms, not open source ([`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt)) | + +## Third-party assets compiled into the binary + +These come from Rust crate dependencies (not files in this repository) and keep their licenses. + +| Asset | Used for | Author | Source | License | +|---|---|---|---|---| +| Phosphor Icons (regular), via the `egui-phosphor` crate | Every UI icon (tools, layers, panels) | Phosphor Icons (Helena Zhang, Tobias Fried) | https://phosphoricons.com, https://github.com/amPerl/egui-phosphor | MIT (icons); crate MIT OR Apache-2.0 | +| egui default fonts (Ubuntu-Light, Hack, Noto Emoji, emoji-icon-font), via `epaint_default_fonts` | UI text | Canonical / Source Foundry / Google / Jessie Jung | https://github.com/emilk/egui | Ubuntu Font Licence 1.0, MIT, OFL 1.1, MIT | + +## Procedural content (no asset files) + +Built-in environments (`crates/render/src/ibl.rs`), smart materials and procedurals +(`crates/engine/src/materials.rs`, `crates/compose/src/pattern.rs`), brush alphas +(`crates/paint/src/brush.rs`), meshes (`crates/geom/src/primitives.rs`) and shelf thumbnails +(`crates/ui-egui/src/thumbs.rs`) are generated in code by TextureCraft contributors (MIT OR +Apache-2.0). None of them is derived from another product's presets, shaders, materials or images. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..3e690427 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +# TextureCraft: instructions for Claude + +Read [`AGENTS.md`](AGENTS.md) first: it is the guide for every agent working in this repository +(workspace map, golden rules including the asset and attribution rules, the definition of done). +Then read `../craftrules/AGENTS.md` for the standards shared by all Crafting Apps. diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..9b7de418 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5080 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "accesskit" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" +dependencies = [ + "enumn", + "serde", + "uuid", +] + +[[package]] +name = "accesskit_atspi_common" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954" +dependencies = [ + "accesskit", + "accesskit_consumer 0.36.0", + "atspi-common", + "phf", + "serde", + "zvariant", +] + +[[package]] +name = "accesskit_consumer" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53cf47daed85312e763fbf85ceca136e0d7abc68e0a7e12abe11f48172bc3b10" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_consumer" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_consumer" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_macos" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076" +dependencies = [ + "accesskit", + "accesskit_consumer 0.38.0", + "hashbrown 0.16.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "accesskit_unix" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff7009f1a532e917d66970a1e80c965140c6cfbbabbdde3d64e5431e6c78e21" +dependencies = [ + "accesskit", + "accesskit_consumer 0.35.0", + "hashbrown 0.16.1", + "static_assertions", + "windows", + "windows-core", +] + +[[package]] +name = "accesskit_winit" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fe9a94394896352cc4660ca2288bd4ef883d83238853c038b44070c8f134313" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arboard" +version = "3.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" +dependencies = [ + "clipboard-win", + "image", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.60.2", + "x11rb", +] + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.5", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.5", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.5", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atspi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d" +dependencies = [ + "atspi-common", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-proxies" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" +dependencies = [ + "atspi-common", + "serde", + "zbus", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" +dependencies = [ + "bitflags 2.13.2", + "polling", + "rustix 1.1.5", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop 0.14.5", + "rustix 1.1.5", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cap-primitives" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes 3.0.1", + "ipnet", + "maybe-owned", + "rustix 1.1.5", + "rustix-linux-procfs", + "windows-sys 0.61.2", + "winx", +] + +[[package]] +name = "cap-std" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ec78e242cfa2cfe276807ac2ecc00315a6c97786977414bcd1c3963b6c91b8" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes 3.0.1", + "rustix 1.1.5", +] + +[[package]] +name = "cc" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6651c9ed80effdc7db0ff72512157f901af5e3549e341e24b1dd4887d836d838" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "clipboard-win" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" +dependencies = [ + "error-code", +] + +[[package]] +name = "codespan-reporting" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +dependencies = [ + "serde", + "termcolor", + "unicode-width", +] + +[[package]] +name = "color" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.9", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "derive_arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b034bd7d5f032402a2479444dcc6f74e36a03f31854d41680fb240ef682a1ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "libc", + "objc2 0.6.5", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "duplicate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e92f10a49176cbffacaedabfaa11d51db1ea0f80a83c26e1873b43cd1742c24" +dependencies = [ + "heck", + "proc-macro2", + "proc-macro2-diagnostics", +] + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "ecolor" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0656a7530b9e2841ee7a5f983965bdd9840c32f4012f759cfd44b912cced6b34" +dependencies = [ + "bytemuck", + "emath", + "serde", +] + +[[package]] +name = "eframe" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ad41fac6e3149abb4866e93df37dbd33baa95db525c3368c944584e95a5dc2" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "egui-wgpu", + "egui-winit", + "egui_glow", + "glutin", + "glutin-winit", + "image", + "js-sys", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "pollster 1.0.1", + "profiling", + "raw-window-handle", + "ron", + "serde", + "static_assertions", + "wasm-bindgen", + "web-sys", + "web-time", + "wgpu", + "windows-sys 0.61.2", + "winit", +] + +[[package]] +name = "egui" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc938cc27cd911415e1e4d151bc56ff9df063d8db081374e87aeb805ea74b2ba" +dependencies = [ + "accesskit", + "ahash", + "bitflags 2.13.2", + "emath", + "epaint", + "itertools", + "log", + "nohash-hasher", + "profiling", + "ron", + "serde", + "smallvec", + "unicode-segmentation", + "web-sys", +] + +[[package]] +name = "egui-phosphor" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4299551488dddaa8f757727e1eb4ffdaf277ffe6e30b413403468f5ecf4634" +dependencies = [ + "egui", +] + +[[package]] +name = "egui-wgpu" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cef1f6d1bba40b09a4d0d62cb822b81030922cfbf65c5373398c3a3caafc5bd" +dependencies = [ + "ahash", + "bytemuck", + "document-features", + "egui", + "epaint", + "log", + "profiling", + "thiserror 2.0.21", + "type-map", + "web-time", + "wgpu", + "winit", +] + +[[package]] +name = "egui-winit" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98466000559d66ba4db786a30448b01483946add4188e7f10f522a27b4fb89cc" +dependencies = [ + "accesskit_winit", + "arboard", + "bytemuck", + "egui", + "log", + "objc2 0.6.5", + "objc2-foundation 0.3.2", + "objc2-ui-kit 0.3.2", + "profiling", + "raw-window-handle", + "serde", + "smithay-clipboard", + "web-time", + "winit", +] + +[[package]] +name = "egui_dock" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d9f668eb59ff0ab130c8bce71a513135e1d3017fb3103fb8758e9eea99d759f" +dependencies = [ + "duplicate", + "egui", + "paste", + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "egui_glow" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "606ed4167daf341e5753d703285c4c1d562324b2c07aa8f405cd7d066fe58f3b" +dependencies = [ + "bytemuck", + "egui", + "glow", + "log", + "profiling", + "winit", +] + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "emath" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c8d4141cf0f60fb2f7aefaf352d3ffa5171ef0ab09731c64391801e95e48f1" +dependencies = [ + "bytemuck", + "serde", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "enumn" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "epaint" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ec0308dc23130fc1a7d4623a8534c2ed069c6dc84e258ee4f3de99615aa1a3" +dependencies = [ + "ahash", + "bytemuck", + "ecolor", + "emath", + "epaint_default_fonts", + "font-types", + "harfrust", + "log", + "nohash-hasher", + "parking_lot", + "profiling", + "self_cell", + "serde", + "skrifa", + "smallvec", + "unicode-general-category", + "unicode-segmentation", + "vello_cpu", +] + +[[package]] +name = "epaint_default_fonts" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773fa9c96dd0dbef887e39d0ed6177f141cce4d68e6041df77570aa3702dfa13" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" + +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "exr" +version = "1.74.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide 0.8.9", + "num-complex", + "pulp", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "fearless_simd" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c92d9081c7ab3bd83ef1eecdfad090f3d966e3ce74106779664114cfe1a6274" +dependencies = [ + "bytemuck", + "serde", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "fs-set-times" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" +dependencies = [ + "io-lifetimes 2.0.4", + "rustix 1.1.5", + "windows-sys 0.59.0", +] + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.5", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glam" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" + +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" +dependencies = [ + "bytemuck", + "serde_core", +] + +[[package]] +name = "glifo" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed4a1bb24121291d27230c1b1b44e07d6a9b28cefdb32fe1581dfb84e14f940a" +dependencies = [ + "bytemuck", + "foldhash", + "hashbrown 0.17.1", + "log", + "peniko", + "skrifa", + "smallvec", + "vello_common", +] + +[[package]] +name = "glow" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gltf" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ce1918195723ce6ac74e80542c5a96a40c2b26162c1957a5cd70799b8cacf7" +dependencies = [ + "base64 0.13.1", + "byteorder", + "gltf-json", + "image", + "lazy_static", + "serde_json", + "urlencoding", +] + +[[package]] +name = "gltf-derive" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51" +dependencies = [ + "inflections", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gltf-json" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14" +dependencies = [ + "gltf-derive", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.13.2", + "cfg_aliases", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gpu-allocator" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +dependencies = [ + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.21", + "windows", +] + +[[package]] +name = "guillotiere" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab" +dependencies = [ + "euclid", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "harfrust" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "read-fonts", + "smallvec", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "exr", + "image-webp", + "moxcms", + "num-traits", + "png", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "inflections" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" + +[[package]] +name = "io-extras" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f" +dependencies = [ + "io-lifetimes 3.0.1", + "windows-sys 0.60.2", +] + +[[package]] +name = "io-lifetimes" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" + +[[package]] +name = "io-lifetimes" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96" + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "khronos-egl" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" + +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.4", +] + +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mikktspace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d0b56b403871a8f992ca626d52cc0a690d4841baea8955dc4af6304ac62f8b0" +dependencies = [ + "glam 0.15.2", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.21", + "unicode-ident", +] + +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash 1.1.0", + "thiserror 2.0.21", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + +[[package]] +name = "peniko" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6" +dependencies = [ + "bytemuck", + "color", + "kurbo", + "linebender_resource_handle", + "smallvec", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "pollster" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6355899e1c9462875b6757c79f3caa011a1fdae12bbb1a2e72dd1f234f8336" + +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "version_check", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "737970939a87c6fa31e7acad13307bccbb017a073b695b6089a2c484f929e20e" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rfd" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220" +dependencies = [ + "block2 0.6.2", + "dispatch2", + "js-sys", + "libc", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "percent-encoding", + "pollster 0.4.0", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rmcp" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5023804cbe0304cbe06197ac16e645a0a0d0ffa2953bf735c15c2fa0213350" +dependencies = [ + "chrono", + "futures", + "indexmap", + "pastey", + "pin-project-lite", + "rmcp-macros", + "schemars", + "serde", + "serde_json", + "thiserror 2.0.21", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "uuid", +] + +[[package]] +name = "rmcp-macros" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1da498700030856ba63114bceefa30ba21f5e278cb975e5b9de3529fe842b40" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "serde_json", + "syn 3.0.9", +] + +[[package]] +name = "ron" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3" +dependencies = [ + "bitflags 2.13.2", + "once_cell", + "serde", + "serde_derive", + "typeid", + "unicode-ident", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.1.5", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" +dependencies = [ + "chrono", + "dyn-clone", + "ref-cast", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1c3a92094fa7d61aa124645844facb6b554dfc797136d0f5fd1f890e2bffc69" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 3.0.9", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "self_cell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_derive_internals" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "skrifa" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" +dependencies = [ + "bytemuck", + "read-fonts", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" +dependencies = [ + "serde", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.13.0", + "calloop-wayland-source 0.3.0", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.14.5", + "calloop-wayland-source 0.4.1", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 1.1.5", + "thiserror 2.0.21", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smithay-clipboard" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226" +dependencies = [ + "libc", + "smithay-client-toolkit 0.20.0", + "wayland-backend", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spirv" +version = "0.4.0+sdk-1.4.341.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "texturecraft" +version = "0.1.0" +dependencies = [ + "eframe", + "egui", + "image", + "log", + "serde_json", + "texturecraft-engine", + "texturecraft-ui-egui", + "winresource", +] + +[[package]] +name = "texturecraft-automation" +version = "0.1.0" +dependencies = [ + "base64 0.22.1", + "cap-std", + "getrandom 0.3.4", + "image", + "rayon", + "rmcp", + "schemars", + "serde", + "serde_json", + "texturecraft-engine", + "texturecraft-formats", + "texturecraft-render", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "texturecraft-bake" +version = "0.1.0" +dependencies = [ + "rayon", + "texturecraft-core", + "texturecraft-geom", + "texturecraft-texel", + "thiserror 2.0.21", +] + +[[package]] +name = "texturecraft-cli" +version = "0.1.0" +dependencies = [ + "image", + "serde_json", + "texturecraft-automation", + "texturecraft-engine", + "tokio", + "winresource", +] + +[[package]] +name = "texturecraft-compose" +version = "0.1.0" +dependencies = [ + "half", + "rayon", + "texturecraft-core", + "texturecraft-geom", + "texturecraft-texel", +] + +[[package]] +name = "texturecraft-core" +version = "0.1.0" +dependencies = [ + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "texturecraft-engine" +version = "0.1.0" +dependencies = [ + "image", + "rayon", + "serde", + "serde_json", + "texturecraft-bake", + "texturecraft-compose", + "texturecraft-core", + "texturecraft-formats", + "texturecraft-geom", + "texturecraft-paint", + "texturecraft-texel", + "thiserror 2.0.21", +] + +[[package]] +name = "texturecraft-formats" +version = "0.1.0" +dependencies = [ + "exr", + "flate2", + "gltf", + "image", + "quick-xml", + "rayon", + "serde", + "serde_json", + "texturecraft-compose", + "texturecraft-core", + "texturecraft-geom", + "texturecraft-texel", + "thiserror 2.0.21", + "tobj", + "zip", +] + +[[package]] +name = "texturecraft-geom" +version = "0.1.0" +dependencies = [ + "glam 0.30.10", + "mikktspace", + "rayon", + "serde", + "thiserror 2.0.21", +] + +[[package]] +name = "texturecraft-paint" +version = "0.1.0" +dependencies = [ + "rayon", + "serde", + "texturecraft-compose", + "texturecraft-core", + "texturecraft-geom", + "texturecraft-texel", +] + +[[package]] +name = "texturecraft-render" +version = "0.1.0" +dependencies = [ + "bytemuck", + "half", + "image", + "pollster 0.4.0", + "rayon", + "texturecraft-compose", + "texturecraft-core", + "texturecraft-geom", + "texturecraft-texel", + "wgpu", +] + +[[package]] +name = "texturecraft-texel" +version = "0.1.0" + +[[package]] +name = "texturecraft-ui-egui" +version = "0.1.0" +dependencies = [ + "base64 0.22.1", + "eframe", + "egui", + "egui-phosphor", + "egui_dock", + "image", + "js-sys", + "log", + "rayon", + "rfd", + "serde", + "serde_json", + "texturecraft-engine", + "texturecraft-render", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "zip", +] + +[[package]] +name = "texturecraft-web" +version = "0.1.0" +dependencies = [ + "eframe", + "log", + "texturecraft-engine", + "texturecraft-ui-egui", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "tobj" +version = "4.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eb8e04167c1c0c76b5de63226fd733485ad63ef71e40de31e16272f47b099e2" + +[[package]] +name = "tokio" +version = "1.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "1.1.8+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.17+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "type-map" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" +dependencies = [ + "rustc-hash 2.1.3", +] + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "uuid" +version = "1.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc1186384beb7dd8eedea376413fd654937285ea6c9cfbb928dc3043ea4b606" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "vello_common" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e9aed918117e8152c9eddfd8362d73c465c23f26c44786aa331707b8a64fa2" +dependencies = [ + "bytemuck", + "fearless_simd", + "guillotiere", + "log", + "peniko", + "smallvec", + "thiserror 2.0.21", +] + +[[package]] +name = "vello_cpu" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac7349e1f55f6b801c7c277958df4ea53e7f20f21e8014910ad888b2ecda93ea" +dependencies = [ + "bytemuck", + "glifo", + "hashbrown 0.17.1", + "vello_common", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.5", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.5", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.5", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "wgpu" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" +dependencies = [ + "arrayvec", + "bitflags 2.13.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "js-sys", + "log", + "naga", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.2", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "indexmap", + "log", + "naga", + "naga-types", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.21", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-wasm", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-naga-bridge", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-wasm" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d260ca2ca8adc654f513a869bf3cac0b47f5b8d3f87803d6942015f8de597aae" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "glow", + "glutin_wgl_sys", + "gpu-allocator", + "hashbrown 0.17.1", + "js-sys", + "khronos-egl", + "libc", + "libloading", + "log", + "naga", + "naga-types", + "ndk-sys", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "once_cell", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "raw-window-metal", + "renderdoc-sys", + "smallvec", + "static_assertions", + "thiserror 2.0.21", + "wasm-bindgen", + "wayland-sys", + "web-sys", + "wgpu-naga-bridge", + "wgpu-types", + "windows", + "windows-core", + "windows-result", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "js-sys", + "log", + "naga-types", + "raw-window-handle", + "static_assertions", + "web-sys", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "smithay-client-toolkit 0.19.2", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "winresource" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bc6d36480b829272a5bdabf08e6dca8004761c1da7e35efef800540c66221b" +dependencies = [ + "toml", + "version_check", +] + +[[package]] +name = "winx" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" +dependencies = [ + "bitflags 2.13.2", + "windows-sys 0.59.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.5", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + +[[package]] +name = "xtask" +version = "0.1.0" +dependencies = [ + "serde_json", +] + +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix 1.1.5", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus-lockstep" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +dependencies = [ + "serde", + "winnow", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "5.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" +dependencies = [ + "serde", + "winnow", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zcheapstr" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473" +dependencies = [ + "serde", +] + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zip" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap", + "memchr", + "thiserror 2.0.21", + "zopfli", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zopfli" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zune-core" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1d34c27cc6cdd1f458427519dd6b8612f7b7e3f7b9a0b2355d041dda9869147" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow", + "zcheapstr", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.9", + "winnow", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..b671bc82 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,100 @@ +[workspace] +resolver = "3" +members = ["crates/core", "crates/texel", "crates/geom", "crates/compose", "crates/bake", "crates/formats", "crates/paint", "crates/engine", "crates/render", "crates/automation", "crates/ui-egui", "apps/texturecraft", "apps/texturecraft-cli", "apps/texturecraft-web", "xtask"] +default-members = ["crates/core", "crates/texel", "crates/geom", "crates/compose", "crates/bake", "crates/formats", "crates/paint", "crates/engine", "crates/render", "crates/automation", "crates/ui-egui", "apps/texturecraft", "apps/texturecraft-cli", "xtask"] + +[workspace.package] +version = "0.1.0" +edition = "2024" +license = "MIT OR Apache-2.0" +rust-version = "1.95" +repository = "https://github.com/storytold/texturecraft" + +[workspace.dependencies] +# internal +texturecraft-core = { path = "crates/core" } +texturecraft-texel = { path = "crates/texel" } +texturecraft-geom = { path = "crates/geom" } +texturecraft-bake = { path = "crates/bake" } +texturecraft-paint = { path = "crates/paint" } +texturecraft-formats = { path = "crates/formats" } +texturecraft-compose = { path = "crates/compose" } +texturecraft-engine = { path = "crates/engine" } +texturecraft-render = { path = "crates/render" } +texturecraft-automation = { path = "crates/automation" } +texturecraft-ui-egui = { path = "crates/ui-egui" } + +# external +thiserror = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +glam = { version = "0.30", features = ["serde", "bytemuck"] } +bytemuck = { version = "1", features = ["derive"] } +rayon = "1" +log = "0.4" +image = { version = "0.25", default-features = false, features = ["png", "jpeg", "tga", "tiff", "exr", "hdr", "bmp", "webp"] } +half = "2" +exr = { version = "1.73", default-features = false } +eframe = { version = "0.36", default-features = false } +egui = "0.36" +wgpu = "30" +rfd = "0.17" +zip = { version = "2", default-features = false, features = ["deflate"] } +gltf = { version = "1.4", default-features = false, features = ["import", "utils", "names", "KHR_materials_emissive_strength"] } +tobj = { version = "4", default-features = false } +flate2 = "1" +quick-xml = "0.41" +mikktspace = { version = "0.3", default-features = false, features = ["glam"] } +proptest = "1" +rmcp = { version = "3.5", default-features = false, features = ["server", "macros", "transport-io"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "sync", "net", "io-util", "time"] } +schemars = "1" +base64 = "0.22" +cap-std = "4" +getrandom = "0.3" + +[workspace.lints.rust] +unsafe_code = "forbid" + +[workspace.lints.clippy] +dbg_macro = "warn" +todo = "warn" +# Index loops read better than zipped iterators in per-texel code. +needless_range_loop = "allow" +field_reassign_with_default = "allow" + +[profile.dev.package."*"] +opt-level = 2 + +[profile.dev] +opt-level = 1 + +[profile.release] +lto = "thin" +codegen-units = 1 + +[profile.wasm-release] +inherits = "release" +opt-level = "s" +lto = "fat" +codegen-units = 1 +strip = "debuginfo" + +[profile.wasm-release.package."*"] +opt-level = "s" + +[profile.wasm-release.package.texturecraft-texel] +opt-level = 3 +[profile.wasm-release.package.texturecraft-compose] +opt-level = 3 +[profile.wasm-release.package.texturecraft-paint] +opt-level = 3 +[profile.wasm-release.package.texturecraft-geom] +opt-level = 3 +[profile.wasm-release.package.texturecraft-bake] +opt-level = 3 +# Path tracing and the vector math under it run per pixel. +[profile.wasm-release.package.texturecraft-render] +opt-level = 3 +[profile.wasm-release.package.glam] +opt-level = 3 diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 00000000..f433b1a5 --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..efc19869 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 ArtCraft Team and the TextureCraft contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..f8db46ba --- /dev/null +++ b/NOTICE @@ -0,0 +1,16 @@ +TextureCraft +Copyright (c) 2026 ArtCraft Team and the TextureCraft contributors. +Licensed under the MIT License or the Apache License, Version 2.0, at your option +(LICENSE-MIT, LICENSE-APACHE). + +The ArtCraft name, wordmark and logos in docs/brand/ are trademarks of the ArtCraft Team. They are +not open source and are not covered by the license above; their terms are in +docs/brand/LICENSE-brand.txt. + +Third-party material + +This product bundles third-party material under its own licenses, listed below. The per-file +list (author, source, license) is in ATTRIBUTION.md. + +None: every bundled asset is original to TextureCraft (generated in code or drawn for this +project). See ATTRIBUTION.md. diff --git a/README.md b/README.md new file mode 100644 index 00000000..9beb2041 --- /dev/null +++ b/README.md @@ -0,0 +1,278 @@ +

+ + + + ArtCraft + + +

+ +

TextureCraft

+ +

+ 3D texture painting; an open-source, clean-room reimplementation of Adobe Substance 3D Painter, rebuilt in pure Rust.
+ Paint PBR materials straight onto your models in layers with masks, bake mesh maps,
+ drive smart materials from them, and export textures for any engine. Open source, offline, and yours. +

+ +

+ 100% Rust + macOS · Windows · Linux · FreeBSD · Web + License: MIT OR Apache-2.0 + Status: early alpha +

+ +

+ Join the ArtCraft community on Discord +

+ +

+ TextureCraft on getartcraft.com · + ArtCraft · + All Crafting Apps +

+ +
+ +

+ The TextureCraft workspace: the asset shelf on the left, the 3D viewport with a material ball wearing a painted-steel smart material on a rusted iron base, the 2D UV view, and the texture set list, layer stack and properties on the right +
+ The workspace: asset shelf, 3D viewport, 2D UV view, texture sets, layer stack and properties. +

+ +> [!NOTE] +> **ArtCraft is a community of artists from all walks of life.** Painters, sculptors, game +> artists, photographers, filmmakers, illustrators, designers, hobbyists, and people who picked up +> a stylus last week. If you make things, you belong here. **[Come say hi on Discord](https://discord.gg/artcraft).** + +

+ Features · + Painting · + Layers · + Bake and export · + Agents · + Get started · + Downloads · + Crafting Apps · + Discord +

+ +
+ + + + + + + + +
+

🎨 Familiar by design

+ Texture sets, a layer stack with per-channel blending, masks and generators, the tool shelf, the 3D and 2D views: everything sits where a Painter user expects it. +
+

⚡ Native and fast

+ A tiled, copy-on-write texel engine on every CPU core and a wgpu viewport (Vulkan, Metal, DX12, WebGPU). No Electron, no web view, no waiting. +
+

🧵 Seamless by construction

+ Brush stamps live on the 3D surface, so strokes flow across UV seams, and the camera's visibility keeps paint off the back of your model. +
+

🤖 Agent-ready

+ Every action is a command, so you can drive the same engine from the UI, the CLI, a JSON control channel or an MCP server. +
+ +## Features + +### Paint in 3D + +- **Brushes** with size, flow, stroke opacity, spacing, hardness, angle and follow path; size, + angle, flow and position jitter; tangent or camera alignment, angle fade, backface culling, lazy + mouse, X/Y/Z mirror symmetry and pen pressure. Seven procedural brush alphas (round, square, + spray, grunge, cloud, star, dry streaks), or any imported image as the alpha. +- **Tools:** paint, eraser, **projection** with image stencils (hold S to move, turn and scale the + stencil), polygon fill (triangle, UV island or the whole mesh), **smudge**, **clone** (V + click + sets the source), color picker, Shift+click straight lines, and painting directly in the + **2D UV view**. +- **Quick mask** (Y): paint a temporary mask (U to edit, Ctrl+Shift+I to invert) that protects + everything outside it while you paint. +- **Every channel at once:** base color, metallic, roughness, height, normal, emissive, opacity, + ambient occlusion and specular level, each toggled per stroke, the way Painter's material + properties work. + +### Layers, masks and smart materials + +- **Paint, fill and folder layers** with **32 blend modes per channel** (Normal through Normal map + detail), per-channel opacity, visibility, color tags, drag-and-drop reordering, duplicate, group, + flatten, cut, copy and paste across texture sets. +- **Content effects** on any layer: fill, paint, levels, blur, sharpen, invert, threshold and + **HSL**, applied to the layer's channels before it blends. **Anchor points** record the stack at a + layer so masks and fills higher up can react to it (for example, edge detail from painted height). +- **Masks** with a white or black background and a stack of effects: painted strokes, fills, + **mesh-map generators** (edge wear, dirt, thin areas, curvature, AO, position and direction + gradients, all with world-space noise), levels, blur, sharpen, invert, threshold, ID color + selection and compare. Alt+click a mask to view it alone. +- **Fill layers** take uniform values, **procedurals** (clouds, Perlin, noise, cells, grunge, + scratches, checker, stripes, gradient, wood grain, bricks, tiles, fabric weave, leather grain, + hammered, brushed lines, marble veins, Voronoi, streaks, fingerprints, pores, paint chips) or your + own **images**, through UV, tri-planar, planar, spherical or cylindrical projection. +- **43 materials** (metals from measured reflectance, woods, stone and masonry, plastics, fabric, + leather, ceramic, glass), **17 smart materials** (rusted iron, worn and rust-streaked paint, + military paint, oxidized copper, bronze statue, weathered wood, chipped paint, dirty concrete, + mossy brick…) and **10 smart masks** (worn and chipped edges, dirt, dust, ground dirt, rust + leaks, scratches, grunge, paint chips, fingerprints), all procedural, so they work at any + resolution. The shelf groups them in tabs, with search across every tab. +- **Your own library:** right-click a layer or folder, choose *Create smart material*, and it + appears under *My smart materials*, pixels and images included. + +### Bake and export + +- **Bake mesh maps** on every CPU core: ambient occlusion, curvature, thickness, world-space + normal, position, ID, and normal and height maps from a high poly. A 1024² bake of seven maps on + the material ball takes about 1.5 seconds. +- **Export presets** for glTF PBR Metal Roughness, Unreal Engine (packed), Unity HDRP (mask map), + Unity Standard, Blender (Principled BSDF), separate maps, mesh maps and document channels, in + PNG, JPEG, TGA, TIFF, BMP, WEBP, EXR or HDR at 8, 16 or 32 bits, with UV padding, size + override and OpenGL or DirectX normals. +- **Projects** are a single `.tcraft` file: the mesh, every layer (sparse and lossless), baked maps + and imported images. + +### The viewport + +- Physically based shading (metallic/roughness or specular/glossiness) with image-based lighting + from six procedural studio and outdoor environments or **your own HDR/EXR panoramas**, exposure, + rotation, blur, ACES or linear tone mapping, key-light shadows, bloom, vignette, sharpen and + grain, parallax occlusion, and temporal anti-aliasing that refines the image while you look. +- **Rendering mode** (F10): a progressive, path-traced view of your textures with multi-bounce + light, environment importance sampling and one-click PNG save. +- View any channel, any baked mesh map, or a UV checker; Alt+drag to orbit, middle-drag to pan, + wheel to zoom, F to frame, M / C / B to cycle views. + +## Built for agents + +Everything you can do in the window, an agent can do too: + +- **CLI:** `texturecraft-cli new builtin:material_ball out.tcraft`, `bake`, `export`, `render`, + `run `, `commands`. +- **MCP server:** `texturecraft-cli mcp` gives Claude and other agents tools to create projects, + add layers and masks, paint strokes, bake, export, render previews and inspect everything they + changed. +- **Control channel:** launch the app with `--control ` to drive the running UI: run any + command, invoke menu items, paint, and take screenshots. + +See [`docs/control-protocol.md`](docs/control-protocol.md) for the full protocol and examples. + +## Get started + +You need a recent stable Rust toolchain (1.95 or newer). + +```sh +git clone https://github.com/storytold/texturecraft +cd texturecraft +cargo run --release -p texturecraft +``` + +The app opens with a baked sample project. **File ▸ New project** starts from one of the built-in +meshes or your own glTF, GLB, OBJ, PLY or STL file (UVs are generated if the mesh has none). + +Run the tests with `cargo test --workspace --release`. The architecture is described in +[`docs/architecture.md`](docs/architecture.md), the plan and parity estimate in +[`ROADMAP.md`](ROADMAP.md), and contributor rules in [`AGENTS.md`](AGENTS.md). + +## Downloads + +The easiest way to install TextureCraft is from its page on the ArtCraft website: +**[getartcraft.com/apps/texturecraft](https://getartcraft.com/apps/texturecraft)**. + +Technical users can grab builds from GitHub: the +[latest release](https://github.com/storytold/texturecraft/releases/latest) or +[all releases](https://github.com/storytold/texturecraft/releases). + +| Windows | File | +|---|---| +| Installer (x64, x86, arm64) | `texturecraft--windows-.msi` | +| Portable (x64, x86, arm64) | `texturecraft--windows--portable.zip` | + +| macOS | File | +|---|---| +| Universal app (Apple silicon and Intel), signed and notarized | `texturecraft--macos-universal.dmg` | +| Command-line tools | `texturecraft-cli--macos-universal.zip` | + +| Linux (x86_64, aarch64) | File | +|---|---| +| AppImage (any distribution) | `texturecraft--linux-.AppImage` | +| Debian, Ubuntu, Mint, Pop!_OS | `texturecraft--linux-.deb` | +| Fedora, openSUSE, RHEL | `texturecraft--linux-.rpm` | +| Flatpak bundle | `texturecraft--linux-.flatpak` | +| Plain archive | `texturecraft--linux-.tar.gz` | + +| FreeBSD | File | +|---|---| +| x86_64 | `texturecraft--freebsd-x86_64.tar.gz` | + +| Web (WebAssembly) | File | +|---|---| +| Static site to host or embed | `texturecraft-web-.zip` | + +## The Crafting Apps + +TextureCraft is one of the **Crafting Apps**: free, open-source creative tools from the +[ArtCraft](https://getartcraft.com/) team, each written from scratch in Rust and each able to +stand on its own. + +| | App | What it's for | Code | Learn more | +|:-:|---|---|---|---| +| | **TextureCraft** | **3D texture painting · you are here** | [GitHub](https://github.com/storytold/texturecraft) | [Website](https://getartcraft.com/apps/texturecraft) | +| | **PhotoCraft** | Image editing: layers, masks, type and real PSD files | [GitHub](https://github.com/storytold/photocraft) | [Website](https://getartcraft.com/apps/photocraft) | +| | **VectorCraft** | Vector illustration | [GitHub](https://github.com/storytold/vectorcraft) | [Website](https://getartcraft.com/apps/vectorcraft) | +| | **FilmCraft** | Video editing, color and sound | [GitHub](https://github.com/storytold/filmcraft) | [Website](https://getartcraft.com/apps/filmcraft) | +| | **LightCraft** | Photo library and raw development | [GitHub](https://github.com/storytold/lightcraft) | [Website](https://getartcraft.com/apps/lightcraft) | +| | **PdfCraft** | Reading, organizing and protecting PDFs | [GitHub](https://github.com/storytold/pdfcraft) | [Website](https://getartcraft.com/apps/pdfcraft) | +| | **EffectCraft** | Motion graphics and visual effects | [GitHub](https://github.com/storytold/effectcraft) | [Website](https://getartcraft.com/apps/effectcraft) | +| | **DesignCraft** | Page layout and publishing | [GitHub](https://github.com/storytold/designcraft) | [Website](https://getartcraft.com/apps/designcraft) | +| | **GridCraft** | Spreadsheets and data | [GitHub](https://github.com/storytold/gridcraft) | [Website](https://getartcraft.com/apps/gridcraft) | + +And [**ArtCraft**](https://getartcraft.com/) itself, our AI image and video studio for artists who want real control. + +
+ +

+ Join the ArtCraft community on Discord +

+ +

Come make things with us

+ +

+ Our Discord is where artists of every kind hang out: people who paint, sculpt, model, shoot, draw, + cut film, set type, and people still figuring out what they like to make. Share what you're + working on, ask for help, tell us what's broken, or tell us what you wish these tools could do. + Whatever your medium and however long you've been at it, you're welcome here. +

+ +

+ discord.gg/artcraft · + getartcraft.com · + The Crafting Apps · + TextureCraft +

+ +## License and credits + +TextureCraft is dual-licensed under [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option. +Copyright (c) 2026 ArtCraft Team and the TextureCraft contributors. Required notices are in [NOTICE](NOTICE). + +Bundled fonts, icons, images and other assets keep their own open licenses; each one is listed +with its author, source and license in [ATTRIBUTION.md](ATTRIBUTION.md). + +Every material, environment, brush alpha and mesh shown is generated procedurally by TextureCraft +itself; no third-party textures or models appear in the screenshots. + +The ArtCraft name, wordmark and logos in [`docs/brand/`](docs/brand/) are trademarks of the +ArtCraft Team and are not covered by this license. They may be used only unmodified, and only as +part of this repository and TextureCraft, under [`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt). +Forks and modified versions must remove them. + +Adobe, Substance 3D Painter, Photoshop, Illustrator, Premiere Pro, Lightroom, Acrobat, After Effects and InDesign are trademarks or registered trademarks of Adobe Inc. in the United States and/or other countries. TextureCraft is an independent, open-source project and is not affiliated with, sponsored by or endorsed by Adobe Inc.; these names are used only to describe the workflows it is compatible with. + +

+ ArtCraft
+ Made by the ArtCraft team and community. +

diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 00000000..1b9f7156 --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,52 @@ +# TextureCraft roadmap + +TextureCraft aims for 1:1 parity with Adobe Substance 3D Painter's texturing workflow, with better +performance, a smaller footprint, every feature drivable by agents (MCP, CLI, control channel), and +builds for Windows, macOS, Linux, FreeBSD and the web. + +## Honest parity estimate (2026-10-14) + +Weighted by how much of a professional's daily work each area carries. "Done" counts what works +end to end today (engine + UI + automation + tests), not what is planned. + +| Area | Weight | Done | What works | Main gaps | +|---|---:|---:|---|---| +| Project and files | 8 | 75% | New project from glTF/GLB, FBX (binary and ASCII 7.x), COLLADA, OBJ, PLY, STL or built-in meshes (auto-unwrap when UVs are missing), `.tcraft` open/save/save as/save a copy, autosave, recent files, drag and drop (projects, meshes, images), reimport mesh, image resources, remove unused resources, OBJ and textured GLB mesh export, browser open/save/download | USD, Alembic import; FBX 6; project templates; preserving strokes on reimport | +| Texture sets | 6 | 62% | One set per material, list with visibility, sizes 128–8192 with resampling, add/remove channels (11 channel types incl. specular and glossiness), height strength, normal format | UDIM / UV tiles, per-channel bit depth, normal and AO mixing options, UV padding modes | +| Layer stack | 16 | 75% | Paint, fill and folder layers; 32 per-channel blend modes and opacities; white/black/painted masks; generator, fill, levels, invert/threshold, color selection, compare, blur, sharpen and HSL effects on masks **and layer content**; anchor points read by masks and fills above; smart masks; mask view (Alt+click); duplicate, group, drag to reorder, rename, color tags, copy/cut/paste across sets, flatten, instantiate across sets, save layers as smart materials and add them back | Instance layers, mask with height combination, anchor position inside a content stack | +| Painting tools | 14 | 68% | Paint, eraser, projection with image stencils, polygon fill (triangle, UV island, mesh), smudge, clone, color picker, quick mask, Shift+click lines, 2D view painting; size, flow, stroke opacity, spacing, hardness, angle, follow path, jitters, alignment, angle fade, backface culling, lazy mouse, X/Y/Z symmetry, pen pressure, 7 procedural alphas and image alphas, seam-free 3D stamps with camera visibility | Pen tilt, path / filled path / ribbon tools, particle brushes, geometry decals, clone from the current layer only | +| Materials and assets | 8 | 55% | 43 built-in procedural materials, 17 smart materials, 10 smart masks (`mask.smart.apply`), 22 procedurals, 6 environments plus imported HDR/EXR panoramas, image resources, a user smart material library, a tabbed shelf with search across tabs | Filter and alpha libraries; drag from shelf onto layers (Substance `.sbsar` support is a non-goal: the engine is proprietary) | +| Baking | 10 | 60% | AO, curvature, thickness, world normal, position, ID, normal and height from high poly (engine), resolution, antialiasing, dilation, rays, progress and cancel, bake mode UI | High-poly / cage UI, match by name, bent normals, opacity and color transfer, curvature from normal map, GPU ray-traced baking | +| Viewport and display | 12 | 72% | PBR with image-based lighting, 6 procedural environments or imported HDR/EXR panoramas with exposure, rotation, blur, opacity, ACES/linear tone mapping, HDR pipeline with bloom, vignette, sharpen and grain, key-light shadows, 4× MSAA plus idle temporal accumulation, channel / mesh-map / mask / UV checker views, 3D and 2D wireframes, brush cursor, axis gizmos, **path-traced Rendering mode** (F10) with environment importance sampling | Subsurface scattering, depth of field, multiple cameras, GPU path tracing | +| Shader | 6 | 45% | Metallic/roughness and specular/glossiness PBR, height-to-normal, painted normals, parallax occlusion, emissive, opacity (dithered), AO intensity | OpenPBR features (coat, sheen, subsurface, anisotropy, thin film), tessellated displacement | +| Export | 8 | 70% | 8 presets (glTF, Unreal, Unity HDRP/Standard, Blender, separate maps, mesh maps, document channels), PNG/JPEG/TGA/TIFF/BMP/WEBP/EXR/HDR, 8/16/32-bit, padding modes, size override, OpenGL/DirectX normals, template file names, OBJ and textured GLB mesh export, zip download in the browser | Output template editor, USD export | +| UI and UX | 8 | 65% | Painter-style layout: menus, tool shelf, tool bar, asset shelf, texture set list, layer stack with context menu, properties, display/shader/history windows, export dialog, new project dialog, bake mode, rendering mode, settings (interface scale, autosave), saved UI layouts; all 51 menu items live ([docs/parity.md](docs/parity.md)) | Docking, shortcut editor, localization, tooltips everywhere | +| Platforms | 4 | 60% | Windows, macOS (universal, signed and notarized), Linux (AppImage, deb, rpm, tar.gz, Flatpak), FreeBSD and web release workflows | First real release run; web build polish | +| **Total** | **100** | **≈ 65%** | | | + +Beyond Painter: every command is available to agents through MCP, the CLI and the app's +control channel, and the whole engine runs headless. + +## Remaining effort + +Estimated in wall-clock hours of Claude Opus 5.5 agent work, with three or four agents working in +parallel on separate crates: + +| Milestone | Scope | Estimate | +|---|---|---:| +| M1 Layer stack depth | Instance layers, height-combined masks | 3 h | +| M2 Tools | Path, filled-path and ribbon tools, particle brushes, decals, pen tilt | 6 h | +| M3 Assets | Filter and alpha libraries, shelf drag and drop | 5 h | +| M4 Baking | High-poly and cage UI, match by name, bent normals, transfers, GPU ray-traced baking | 8 h | +| M5 Viewport | SSS, depth of field, cameras, GPU path tracing | 6 h | +| M6 Shader | OpenPBR lobes (coat, sheen, subsurface, anisotropy), displacement | 4 h | +| M7 Formats | USD, Alembic import; USD export; output template editor; UDIM | 8 h | +| M8 UX | Docking, shortcut editor, localization, performance passes at 4K/8K | 6 h | +| M9 Release | First signed release on every platform, web deployment, README screenshots refresh | 4 h | +| **Total** | | **≈ 50 h** | + +## Current focus + +1. Baking (M4): high-poly and cage UI, match by name, bent normals, transfers. +2. Tools (M2): path, filled-path and ribbon tools; particle brushes. +3. UX (M8): docking and a shortcut editor; release (M9) once the repository exists. diff --git a/apps/texturecraft-cli/Cargo.toml b/apps/texturecraft-cli/Cargo.toml new file mode 100644 index 00000000..d458a8d0 --- /dev/null +++ b/apps/texturecraft-cli/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "texturecraft-cli" +description = "Headless TextureCraft: info, run, batch, bake, export, render, MCP server, JSON-lines server" +version.workspace = true +edition.workspace = true +license.workspace = true +build = "build.rs" + +[lints] +workspace = true + +[dependencies] +texturecraft-automation = { workspace = true } +texturecraft-engine = { workspace = true } +serde_json = { workspace = true } +tokio = { workspace = true } + +[dev-dependencies] +image = { workspace = true } + +[build-dependencies] +winresource = "0.1" diff --git a/apps/texturecraft-cli/build.rs b/apps/texturecraft-cli/build.rs new file mode 100644 index 00000000..37e0bd12 --- /dev/null +++ b/apps/texturecraft-cli/build.rs @@ -0,0 +1,2 @@ +// The same build provenance and Windows icon/VERSIONINFO as the app; see that file. +include!("../texturecraft/build.rs"); diff --git a/apps/texturecraft-cli/src/main.rs b/apps/texturecraft-cli/src/main.rs new file mode 100644 index 00000000..5cc9a6a3 --- /dev/null +++ b/apps/texturecraft-cli/src/main.rs @@ -0,0 +1,403 @@ +//! Headless TextureCraft command line: inspect, script, bake, export and render projects, and +//! serve agents over MCP or JSON lines. Never opens a window. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +use std::path::Path; +use std::sync::{Arc, Mutex}; + +use serde_json::{Value, json}; +use texturecraft_automation::security::{client_token, server_token}; +use texturecraft_automation::{AuthorizedWorkspace, BridgeClient, Filesystem, Headless, RenderOptions, TexturecraftMcp, rpc}; +use texturecraft_engine::core::PROJECT_EXT; +use texturecraft_engine::formats::{MeshReport, import_mesh_bytes}; + +const USAGE: &str = "\ +texturecraft-cli: headless TextureCraft + +USAGE: + texturecraft-cli --version + texturecraft-cli info + Texture sets, layers, triangles, materials and the UV report, as JSON. + texturecraft-cli commands [--filter ] + List the engine commands (id, label, params). + texturecraft-cli run [params-json] [-o ] + Run one command and print its JSON result; -o saves the project. + texturecraft-cli batch + Run [{\"id\", \"params\"}, ...] or {\"open\": , \"steps\": [...], \"save\": }. + texturecraft-cli bake [-o ] [--resolution ] [--maps ] + Bake mesh maps for every texture set (a project is saved in place without -o). + texturecraft-cli export [--preset ] [--format ] [--padding ] [--size ] + Export textures (default preset: Document channels + Normal + AO). + texturecraft-cli render [--size x] [--view 3d|2d] [--yaw ] [--pitch ] + [--samples ] [--bounces ] + Render the viewport to PNG (needs a GPU or software adapter); --samples path traces it on + the CPU instead (Rendering mode). + texturecraft-cli new > [--resolution ] [--sample] + New project; --sample bakes and applies a smart material to every texture set. + texturecraft-cli mcp [--bridge ] [--token ] [--read-root ] [--write-root ] + MCP server on stdio: headless (file access only below the roots), or bridged to + `texturecraft --control `. + texturecraft-cli serve [--port ] [--read-root ] [--write-root ] + JSON lines ({\"id\",\"method\",\"params\"}) on stdio, or on 127.0.0.1: with a token. + + is a .tcraft project, a mesh file (.glb .gltf .fbx .dae .obj .ply .stl) or builtin: +(material_ball, sphere, cube, rounded_cube, cylinder, torus, plane, crate). +See docs/control-protocol.md. +"; + +/// (name, flags taking a value, bare flags) +const SUBCOMMANDS: &[(&str, &[&str], &[&str])] = &[ + ("info", &[], &[]), + ("commands", &["--filter"], &[]), + ("run", &["-o"], &[]), + ("batch", &[], &[]), + ("bake", &["-o", "--resolution", "--maps"], &[]), + ("export", &["--preset", "--format", "--padding", "--size"], &[]), + ("render", &["--size", "--view", "--yaw", "--pitch", "--samples", "--bounces"], &[]), + ("new", &["--resolution"], &["--sample"]), + ("mcp", &["--bridge", "--token", "--read-root", "--write-root"], &[]), + ("serve", &["--port", "--read-root", "--write-root"], &[]), +]; + +struct Args { + pos: Vec, + flags: Vec<(String, Option)>, +} + +impl Args { + fn get(&self, k: &str) -> Option<&str> { + self.flags.iter().rev().find(|(f, _)| f == k).and_then(|(_, v)| v.as_deref()) + } + fn has(&self, k: &str) -> bool { + self.flags.iter().any(|(f, _)| f == k) + } + fn num(&self, k: &str) -> Result, String> { + self.get(k).map(|v| v.parse().map_err(|_| format!("{k}: `{v}` is not a valid number"))).transpose() + } + fn pos(&self, n: usize, what: &str) -> Result<&str, String> { + self.pos.get(n).map(String::as_str).ok_or_else(|| format!("missing {what}")) + } +} + +fn parse(values: &[&str], bare: &[&str], args: &[String]) -> Result { + let mut a = Args { pos: Vec::new(), flags: Vec::new() }; + let mut it = args.iter(); + while let Some(s) = it.next() { + let (k, inline) = match s.split_once('=') { + Some((k, v)) if k.starts_with("--") => (k, Some(v.to_string())), + _ => (s.as_str(), None), + }; + if values.contains(&k) { + let v = match inline { + Some(v) => v, + None => it.next().ok_or_else(|| format!("{k} needs a value"))?.clone(), + }; + a.flags.push((k.to_string(), Some(v))); + } else if bare.contains(&k) && inline.is_none() { + a.flags.push((k.to_string(), None)); + } else if k.starts_with('-') && k.len() > 1 && k.parse::().is_err() { + return Err(format!("unknown option `{s}`")); + } else { + a.pos.push(s.clone()); + } + } + Ok(a) +} + +fn version() -> String { + let sha = env!("TEXTURECRAFT_BUILD_SHA"); + let short = sha.get(..7).unwrap_or(sha); + let date = env!("TEXTURECRAFT_BUILD_DATE"); + match (short.is_empty(), date.is_empty()) { + (true, true) => format!("TextureCraft {}", texturecraft_engine::VERSION), + (true, false) => format!("TextureCraft {} ({date})", texturecraft_engine::VERSION), + _ => format!("TextureCraft {} ({short} {date})", texturecraft_engine::VERSION), + } +} + +fn main() { + let args: Vec = std::env::args().skip(1).collect(); + let code = match args.first().map(String::as_str) { + None => { + eprint!("{USAGE}"); + 2 + } + Some("--version" | "-V" | "version") => { + println!("{}", version()); + 0 + } + Some("--help" | "-h" | "help") => { + print!("{USAGE}"); + 0 + } + Some(cmd) => match SUBCOMMANDS.iter().find(|(n, _, _)| *n == cmd) { + None => { + eprintln!("texturecraft-cli: unknown command `{cmd}`\n\n{USAGE}"); + 2 + } + Some(_) if args.iter().any(|a| a == "--help" || a == "-h") => { + print!("{USAGE}"); + 0 + } + Some((name, values, bare)) => match parse(values, bare, args.get(1..).unwrap_or_default()) { + Err(e) => { + eprintln!("texturecraft-cli {name}: {e}\n\n{USAGE}"); + 2 + } + Ok(a) => match dispatch(name, &a) { + Ok(()) => 0, + Err(e) => { + eprintln!("texturecraft-cli {name}: error: {e}"); + 1 + } + }, + }, + }, + }; + std::process::exit(code); +} + +type R = Result<(), String>; + +fn dispatch(name: &str, a: &Args) -> R { + match name { + "info" => info(a), + "commands" => commands(a), + "run" => run(a), + "batch" => batch(a), + "bake" => bake(a), + "export" => export(a), + "render" => render(a), + "new" => new(a), + "mcp" => mcp(a), + "serve" => serve(a), + other => Err(format!("unknown command `{other}`")), + } +} + +fn s(e: impl std::fmt::Display) -> String { + e.to_string() +} + +fn print_json(v: &Value) -> R { + println!("{}", serde_json::to_string_pretty(v).map_err(s)?); + Ok(()) +} + +fn is_project(path: &str) -> bool { + Path::new(path).extension().is_some_and(|e| e.eq_ignore_ascii_case(PROJECT_EXT)) +} + +/// A trusted local session on `input`: a project, a mesh file or `builtin:`. +fn open(input: &str, resolution: Option) -> Result { + let mut h = Headless::new(Headless::default_session().map_err(s)?, Filesystem::TrustedLocal); + match input.strip_prefix("builtin:") { + Some(id) => h.command_run("project.new", json!({"mesh": id, "resolution": resolution.unwrap_or(1024), "name": id})).map(|_| ()), + None if is_project(input) => h.open(input).map(|_| ()), + None => h.import_mesh(input, resolution, None).map(|_| ()), + } + .map_err(s)?; + Ok(h) +} + +fn save(h: &mut Headless, out: &str) -> R { + let r = h.save(Some(out)).map_err(s)?; + eprintln!("saved {}", r["path"].as_str().unwrap_or_default()); + Ok(()) +} + +fn report_json(r: &MeshReport) -> Value { + json!({ + "triangles": r.triangles, "vertices": r.vertices, "materials": r.materials, "uvsGenerated": r.uvs_generated, + "uvOutOfRange": r.uv_out_of_range, "overlapRatio": r.overlap_ratio, "zeroAreaUvTriangles": r.zero_area_uv_triangles, "warnings": r.warnings, + }) +} + +fn info(a: &Args) -> R { + let file = a.pos(0, "")?; + if !is_project(file) { + let bytes = std::fs::read(file).map_err(|e| format!("cannot read {file}: {e}"))?; + let m = import_mesh_bytes(file, &bytes).map_err(s)?; + return print_json(&json!({ + "file": file, "kind": "mesh", "triangles": m.mesh.triangle_count(), "vertices": m.mesh.vertex_count(), + "materials": m.mesh.materials, "textureSets": m.mesh.materials, "uv": report_json(&m.report), + })); + } + let h = open(file, None)?; + let mut v = h.inspect(); + v["file"] = json!(file); + v["kind"] = json!("project"); + // The embedded mesh is re-imported for its UV report (built-in meshes have none). + v["uv"] = match &h.session.mesh_source { + Some((ext, bytes)) => import_mesh_bytes(&format!("mesh.{ext}"), bytes).map(|m| report_json(&m.report)).map_err(s)?, + None => Value::Null, + }; + print_json(&v) +} + +fn commands(a: &Args) -> R { + let h = open("builtin:cube", Some(128))?; + for c in h.command_list(a.get("--filter")).as_array().into_iter().flatten() { + let f = |k: &str| c.get(k).and_then(Value::as_str).unwrap_or_default().to_string(); + println!("{:<28} {:<36} {}", f("id"), f("label"), f("params")); + } + Ok(()) +} + +fn run(a: &Args) -> R { + let (input, id) = (a.pos(0, "")?, a.pos(1, "")?); + let params: Value = match a.pos.get(2) { + Some(j) => serde_json::from_str(j).map_err(|e| format!("params are not JSON: {e}"))?, + None => json!({}), + }; + let mut h = open(input, None)?; + print_json(&h.command_run(id, params).map_err(s)?)?; + match a.get("-o") { + Some(out) => save(&mut h, out), + None => Ok(()), + } +} + +fn batch(a: &Args) -> R { + let path = a.pos(0, "")?; + let text = std::fs::read_to_string(path).map_err(|e| format!("cannot read {path}: {e}"))?; + let script: Value = serde_json::from_str(&text).map_err(|e| format!("{path} is not JSON: {e}"))?; + let steps = + script.as_array().or_else(|| script.get("steps").and_then(Value::as_array)).ok_or("the script must be a list of steps or {\"steps\": [...]}")?; + let field = |k: &str| script.get(k).and_then(Value::as_str); + let mut h = open(field("open").unwrap_or("builtin:material_ball"), None)?; + let reply = h.batch(steps); + print_json(&reply)?; + if let Some(f) = reply.get("failed").filter(|f| !f.is_null()) { + return Err(format!("step {} (`{}`) failed: {}", f["index"], f["id"].as_str().unwrap_or_default(), f["error"].as_str().unwrap_or_default())); + } + match field("save") { + Some(out) => save(&mut h, out), + None => Ok(()), + } +} + +fn bake(a: &Args) -> R { + let input = a.pos(0, "")?; + let out = a.get("-o").or(is_project(input).then_some(input)).ok_or("give -o to save the baked project")?; + let mut p = json!({"ts": "all"}); + if let Some(r) = a.num::("--resolution")? { + p["resolution"] = json!(r); + } + if let Some(m) = a.get("--maps") { + p["maps"] = json!(m.split(',').map(str::trim).filter(|m| !m.is_empty()).collect::>()); + } + let mut h = open(input, None)?; + h.command_run("bake.run", p).map_err(s)?; + save(&mut h, out)?; + print_json(&h.inspect()["textureSets"]) +} + +fn export(a: &Args) -> R { + let (input, dir) = (a.pos(0, "")?, a.pos(1, "")?); + let mut p = json!({"dir": dir}); + for k in ["preset", "format", "padding"] { + if let Some(v) = a.get(&format!("--{k}")) { + p[k] = json!(v); + } + } + if let Some(v) = a.num::("--size")? { + p["size"] = json!(v); + } + let mut h = open(input, None)?; + let r = h.export(&p).map_err(s)?; + for w in r["warnings"].as_array().into_iter().flatten() { + eprintln!("warning: {}", w.as_str().unwrap_or_default()); + } + for f in r["files"].as_array().into_iter().flatten() { + println!("{}", f.as_str().unwrap_or_default()); + } + Ok(()) +} + +fn render(a: &Args) -> R { + let (input, out) = (a.pos(0, "")?, a.pos(1, "")?); + let (width, height) = match a.get("--size") { + Some(sz) => { + let (w, h) = sz.split_once(['x', 'X']).ok_or("--size must be x, e.g. 1280x800")?; + (Some(w.parse().map_err(|_| "bad --size width")?), Some(h.parse().map_err(|_| "bad --size height")?)) + } + None => (None, None), + }; + let o = RenderOptions { + view: a.get("--view").map(str::to_string), + width, + height, + yaw: a.num("--yaw")?, + pitch: a.num("--pitch")?, + samples: a.num("--samples")?, + bounces: a.num("--bounces")?, + }; + let mut h = open(input, None)?; + let (w, ht, png) = h.render_png(&o).map_err(s)?; + std::fs::write(out, png).map_err(|e| format!("cannot write {out}: {e}"))?; + let by = if o.samples.is_some() { "path traced" } else { h.adapter().unwrap_or("GPU") }; + eprintln!("wrote {out} ({w}x{ht}, {by})"); + Ok(()) +} + +fn new(a: &Args) -> R { + let (input, out) = (a.pos(0, "")?, a.pos(1, "")?); + if is_project(input) { + return Err(format!("{input} is already a project")); + } + let res = a.num::("--resolution")?; + let mut h = open(input, res)?; + if a.has("--sample") { + let bake_res = h.session.doc.project.texture_sets.first().map_or(1024, |t| t.resolution.min(1024)); + h.command_run("bake.run", json!({"ts": "all", "resolution": bake_res})).map_err(s)?; + for ts in 0..h.session.set_count() { + h.command_run("textureSet.select", json!({"ts": ts})).map_err(s)?; + h.command_run("material.apply", json!({"material": "steel_painted_worn"})).map_err(s)?; + } + h.command_run("textureSet.select", json!({"ts": 0})).map_err(s)?; + } + save(&mut h, out) +} + +fn workspace(a: &Args) -> Result { + let (r, w) = (a.get("--read-root").map(Path::new), a.get("--write-root").map(Path::new)); + if r.is_none() && w.is_none() { + return Ok(Filesystem::Denied); + } + Ok(Filesystem::Workspace(AuthorizedWorkspace::new(r, w).map_err(s)?)) +} + +fn port_of(v: &str) -> Result { + let p = v.strip_prefix("127.0.0.1:").or_else(|| v.strip_prefix("localhost:")).unwrap_or(v); + p.parse::().ok().filter(|p| *p != 0).ok_or_else(|| format!("`{v}` is not a loopback port (1-65535)")) +} + +fn mcp(a: &Args) -> R { + let server = match a.get("--bridge") { + Some(b) => { + let port = port_of(b)?; + TexturecraftMcp::bridge(BridgeClient::new(port, client_token(port, a.get("--token").map(str::to_string)).map_err(s)?)) + } + None => TexturecraftMcp::headless(Headless::new(Headless::default_session().map_err(s)?, workspace(a)?)), + }; + let rt = tokio::runtime::Builder::new_multi_thread().enable_all().build().map_err(s)?; + rt.block_on(server.serve_stdio()).map_err(s) +} + +fn serve(a: &Args) -> R { + let h = Arc::new(Mutex::new(Headless::new(Headless::default_session().map_err(s)?, workspace(a)?))); + match a.get("--port") { + None => rpc::serve_lines(&h, std::io::stdin().lock(), std::io::stdout().lock()).map_err(s), + Some(p) => { + let port = port_of(p)?; + let (token, file) = server_token(port).map_err(s)?; + rpc::serve_tcp(port, h, token, |addr| match file { + Some(f) => eprintln!("texturecraft-cli: serving on {addr}; token in {}", f.display()), + None => eprintln!("texturecraft-cli: serving on {addr}; token from TEXTURECRAFT_CONTROL_TOKEN"), + }) + .map_err(s) + } + } +} diff --git a/apps/texturecraft-cli/tests/cli.rs b/apps/texturecraft-cli/tests/cli.rs new file mode 100644 index 00000000..31d4b8c7 --- /dev/null +++ b/apps/texturecraft-cli/tests/cli.rs @@ -0,0 +1,129 @@ +//! Drives the `texturecraft-cli` binary. + +use std::path::{Path, PathBuf}; +use std::process::{Command, Output}; + +use serde_json::Value; + +fn cli(args: &[&str]) -> Output { + Command::new(env!("CARGO_BIN_EXE_texturecraft-cli")).args(args).output().unwrap() +} + +fn ok(args: &[&str]) -> String { + let o = cli(args); + assert!(o.status.success(), "{args:?} failed: {}", String::from_utf8_lossy(&o.stderr)); + String::from_utf8(o.stdout).unwrap() +} + +fn json(args: &[&str]) -> Value { + serde_json::from_str(&ok(args)).unwrap() +} + +fn tmp(name: &str) -> PathBuf { + let d = std::env::temp_dir().join(format!("tc-cli-{}-{name}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(&d).unwrap(); + d +} + +fn p(path: &Path) -> &str { + path.to_str().unwrap() +} + +#[test] +fn version_and_usage_errors() { + let v = ok(&["--version"]); + assert!(v.starts_with("TextureCraft "), "{v}"); + assert_eq!(v.lines().count(), 1); + assert!(ok(&["--help"]).contains("texturecraft-cli mcp")); + assert_eq!(cli(&[]).status.code(), Some(2)); + assert_eq!(cli(&["frobnicate"]).status.code(), Some(2)); + assert_eq!(cli(&["info", "--bogus"]).status.code(), Some(2)); + let o = cli(&["info", "does/not/exist.tcraft"]); + assert_eq!(o.status.code(), Some(1)); + assert!(String::from_utf8_lossy(&o.stderr).contains("error")); + assert_eq!(cli(&["run", "builtin:nope", "layer.add.fill"]).status.code(), Some(1)); + assert_eq!(cli(&["run", "builtin:cube", "layer.add.fill", "{not json"]).status.code(), Some(1)); + assert_eq!(cli(&["render", "builtin:cube", "x.png", "--size", "big"]).status.code(), Some(1)); +} + +#[test] +fn new_info_run_bake_export_batch() { + let d = tmp("flow"); + let a = d.join("a.tcraft"); + ok(&["new", "builtin:cube", p(&a), "--resolution", "128"]); + let info = json(&["info", p(&a)]); + assert_eq!(info["kind"], "project"); + assert_eq!(info["textureSets"][0]["resolution"], 128); + assert!(info["mesh"]["triangles"].as_u64().unwrap() >= 12); + + let b = d.join("b.tcraft"); + let r = json(&["run", p(&a), "layer.add.fill", r#"{"color":[1,0,0],"roughness":0.3}"#, "-o", p(&b)]); + assert!(r["layer"].is_u64(), "{r}"); + assert_eq!(json(&["info", p(&b)])["layers"][0]["kind"], "fill"); + + ok(&["bake", p(&b), "--resolution", "128", "--maps", "ambientOcclusion,curvature"]); + let maps = json(&["info", p(&b)])["textureSets"][0]["baked"]["maps"].clone(); + assert_eq!(maps.as_array().unwrap().len(), 2, "{maps}"); + + let tex = d.join("tex"); + let files = ok(&["export", p(&b), p(&tex), "--preset", "glTF PBR Metal Roughness", "--size", "128"]); + assert!(files.lines().count() >= 3, "{files}"); + for f in files.lines() { + assert!(Path::new(f).is_file(), "{f}"); + } + + let script = d.join("script.json"); + let c = d.join("c.tcraft"); + let body = serde_json::json!({"open": p(&b), "steps": [{"id": "layer.add.paint", "params": {"name": "Scripted"}}], "save": p(&c)}); + std::fs::write(&script, body.to_string()).unwrap(); + assert_eq!(json(&["batch", p(&script)])["completed"], 1); + assert_eq!(json(&["info", p(&c)])["layers"][0]["name"], "Scripted"); + std::fs::write(&script, r#"[{"id":"layer.add.paint"},{"id":"no.such"}]"#).unwrap(); + assert_eq!(cli(&["batch", p(&script)]).status.code(), Some(1)); + let _ = std::fs::remove_dir_all(&d); +} + +#[test] +fn info_on_a_mesh_reports_uvs() { + let d = tmp("mesh"); + let obj = d.join("quad.obj"); + std::fs::write(&obj, "v 0 0 0\nv 1 0 0\nv 1 1 0\nv 0 1 0\nvt 0 0\nvt 1 0\nvt 1 1\nvt 0 1\nusemtl Paint\nf 1/1 2/2 3/3 4/4\n").unwrap(); + let info = json(&["info", p(&obj)]); + assert_eq!(info["kind"], "mesh"); + assert_eq!(info["triangles"], 2); + assert_eq!(info["materials"][0], "Paint"); + assert_eq!(info["uv"]["uvsGenerated"], false); + let _ = std::fs::remove_dir_all(&d); +} + +#[test] +fn render_writes_a_png() { + let d = tmp("render"); + let out = d.join("ball.png"); + let o = cli(&["render", "builtin:material_ball", p(&out), "--size", "160x120", "--yaw", "30"]); + if !o.status.success() { + let err = String::from_utf8_lossy(&o.stderr); + assert!(err.contains("cannot render"), "{err}"); + eprintln!("skipping: {err}"); + return; + } + let img = image::open(&out).unwrap(); + assert_eq!((img.width(), img.height()), (160, 120)); + let _ = std::fs::remove_dir_all(&d); +} + +#[test] +fn path_traced_render_needs_no_gpu() { + let d = tmp("trace"); + let out = d.join("ball.png"); + ok(&["render", "builtin:material_ball", p(&out), "--size", "96x64", "--samples", "4"]); + let img = image::open(&out).unwrap().to_rgb8(); + assert_eq!(img.dimensions(), (96, 64)); + // The lit ball in the middle is brighter than the dark backdrop corner. + let lum = |x, y| img.get_pixel(x, y).0.iter().map(|v| *v as u32).sum::(); + assert!(lum(48, 28) > lum(1, 1) + 60); + assert_eq!(cli(&["render", "builtin:cube", p(&out), "--samples", "0"]).status.code(), Some(1)); + assert_eq!(cli(&["render", "builtin:cube", p(&out), "--samples", "4", "--view", "2d"]).status.code(), Some(1)); + let _ = std::fs::remove_dir_all(&d); +} diff --git a/apps/texturecraft-web/Cargo.toml b/apps/texturecraft-web/Cargo.toml new file mode 100644 index 00000000..92238e43 --- /dev/null +++ b/apps/texturecraft-web/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "texturecraft-web" +description = "TextureCraft in the browser (eframe web runner, WebGPU with WebGL2 fallback)" +version.workspace = true +edition.workspace = true +license.workspace = true +publish = false + +[lints] +workspace = true + +[[bin]] +name = "texturecraft-web" +path = "src/main.rs" + +[dependencies] +texturecraft-engine = { workspace = true } +texturecraft-ui-egui = { workspace = true } +log = { workspace = true } + +[target.'cfg(target_arch = "wasm32")'.dependencies] +# `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. +eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "persistence"] } +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "Location"] } diff --git a/apps/texturecraft-web/Trunk.toml b/apps/texturecraft-web/Trunk.toml new file mode 100644 index 00000000..3befdb40 --- /dev/null +++ b/apps/texturecraft-web/Trunk.toml @@ -0,0 +1,10 @@ +# Build with: trunk build --release (from apps/texturecraft-web; packaging/web/package.sh) +[build] +target = "index.html" +dist = "../../dist/web" +public_url = "./" +filehash = true + +[serve] +addresses = ["127.0.0.1"] +port = 8765 diff --git a/apps/texturecraft-web/index.html b/apps/texturecraft-web/index.html new file mode 100644 index 00000000..738f8699 --- /dev/null +++ b/apps/texturecraft-web/index.html @@ -0,0 +1,30 @@ + + + + + + TextureCraft + + + + + +
+

Loading TextureCraft…

+

This is taking longer than usual. If TextureCraft doesn't start, its files may have failed to + download or come from a different version of this page. Reload to try again; the browser + console lists what failed.

+
+ + diff --git a/apps/texturecraft-web/src/main.rs b/apps/texturecraft-web/src/main.rs new file mode 100644 index 00000000..cd4045c4 --- /dev/null +++ b/apps/texturecraft-web/src/main.rs @@ -0,0 +1,41 @@ +//! TextureCraft in the browser. +//! +//! Runs the same [`texturecraft_ui_egui::TextureCraftApp`] as the desktop app through eframe's web +//! runner (wgpu: WebGPU where available, WebGL2 otherwise). Build with `trunk build --release` +//! from this directory (`packaging/web/package.sh` zips the result). +//! +//! Differences from the desktop app: no control server (browsers can't listen on sockets), and +//! file I/O goes through `texturecraft_ui_egui::web_files` (file picker in, downloads out). +//! +//! URL query flag: `?webgl` forces the WebGL2 backend instead of WebGPU. + +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +#[cfg(target_arch = "wasm32")] +mod web; + +#[cfg(target_arch = "wasm32")] +fn main() { + web::start(); +} + +#[cfg(not(target_arch = "wasm32"))] +fn main() { + eprintln!("texturecraft-web only runs in the browser: build it with `trunk build --release` in apps/texturecraft-web"); +} + +#[cfg(test)] +mod tests { + /// A WebAssembly module that never downloads runs no Rust, so the page itself replaces the + /// endless "Loading" with a way to retry, without a hand-written script. + #[test] + fn loading_page_offers_a_reload_when_startup_stalls() { + let html = include_str!("../index.html"); + let (_, hint) = html.split_once("

").expect("stalled-startup hint in the loading element"); + assert!(hint.contains("failed to") && hint.contains("Reload"), "{hint}"); + assert!(html.contains("animation: texturecraft-stalled"), "the hint appears after a delay"); + assert!(html.contains("id=\"texturecraft_canvas\"") && html.contains("data-cargo-profile=\"wasm-release\"")); + assert!(!html.contains("().ok()) { + Some(canvas) => run(canvas).await, + None => Err(format!("the page has no ")), + }; + if let Some(el) = document.get_element_by_id(LOADING_ID) { + match result { + Ok(()) => el.remove(), + Err(e) => { + log::error!("TextureCraft failed to start: {e}"); + el.set_text_content(Some(&format!("TextureCraft failed to start: {e}. It needs a browser with WebGPU or WebGL2."))); + } + } + } + }); +} + +async fn run(canvas: web_sys::HtmlCanvasElement) -> Result<(), String> { + let mut options = eframe::WebOptions::default(); + if query().contains("webgl") + && let eframe::egui_wgpu::WgpuSetup::CreateNew(create) = &mut options.wgpu_options.wgpu_setup + { + create.instance_descriptor.backends = eframe::wgpu::Backends::GL; + } + eframe::WebRunner::new() + .start( + canvas, + options, + Box::new(|cc| { + if let Some(rs) = &cc.wgpu_render_state { + log::info!("TextureCraft: wgpu backend {:?}", rs.adapter.get_info().backend); + } + Ok(Box::new(TextureCraftApp::new(cc, initial_session()?))) + }), + ) + .await + .map_err(|e| e.as_string().unwrap_or_else(|| format!("{e:?}"))) +} + +/// The baked sample project, or an empty material ball if that fails. Texture and bake sizes are +/// kept small: the web build composites and bakes on one thread (bake 256 took ~12 s to start on a +/// fast desktop CPU, 128 ~7.5 s). +fn initial_session() -> Result { + texturecraft_engine::sample_session(1024, 128) + .or_else(|e| { + log::warn!("sample project failed: {e}"); + Session::new_project("Untitled", texturecraft_engine::geom::primitives::material_ball(), "builtin:material_ball", None, 1024) + }) + .map_err(|e| e.to_string()) +} + +fn query() -> String { + web_sys::window().and_then(|w| w.location().search().ok()).unwrap_or_default() +} diff --git a/apps/texturecraft/Cargo.toml b/apps/texturecraft/Cargo.toml new file mode 100644 index 00000000..66964286 --- /dev/null +++ b/apps/texturecraft/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "texturecraft" +description = "TextureCraft: an open-source 3D texture painter (desktop app)" +version.workspace = true +edition.workspace = true +license.workspace = true +default-run = "texturecraft" +build = "build.rs" + +[lints] +workspace = true + +[dependencies] +texturecraft-engine = { workspace = true } +texturecraft-ui-egui = { workspace = true } +eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "persistence"] } +egui = { workspace = true } +image = { workspace = true } +serde_json = { workspace = true } +log = { workspace = true } + +[build-dependencies] +winresource = "0.1" diff --git a/apps/texturecraft/build.rs b/apps/texturecraft/build.rs new file mode 100644 index 00000000..c77d91bd --- /dev/null +++ b/apps/texturecraft/build.rs @@ -0,0 +1,80 @@ +// Build provenance for every target, plus the Windows icon and VERSIONINFO. +// +// Shared by `texturecraft` and `texturecraft-cli` (whose build.rs `include!`s this file). +// +// - Always sets `TEXTURECRAFT_BUILD_SHA` (full git commit) and `TEXTURECRAFT_BUILD_DATE` +// (`YYYY-MM-DD`, UTC) for `env!`. They come from the same-named environment variables (CI and +// packaging/env.sh set them), else from `git` and the clock (`SOURCE_DATE_EPOCH` wins for +// reproducible builds); either is an empty string when unknown, so source tarballs, wasm and +// offline builds still compile. Without the env vars the commit is read when this script runs, +// so a local build can show a stale commit; release builds always set the variable. +// - Windows targets only: embeds assets/app-icon/texturecraft.ico and VERSIONINFO into the exe. +// A missing resource compiler is a warning, so a cross-compile still links, unless +// `TEXTURECRAFT_REQUIRE_WINRES=1` (set by packaging/windows/package.ps1) makes it an error. + +use std::process::Command; + +const ICON: &str = "../../assets/app-icon/texturecraft.ico"; + +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed={ICON}"); + for var in ["TEXTURECRAFT_BUILD_SHA", "TEXTURECRAFT_BUILD_DATE", "TEXTURECRAFT_REQUIRE_WINRES", "SOURCE_DATE_EPOCH"] { + println!("cargo:rerun-if-env-changed={var}"); + } + println!("cargo:rustc-env=TEXTURECRAFT_BUILD_SHA={}", env_or("TEXTURECRAFT_BUILD_SHA", git_sha)); + println!("cargo:rustc-env=TEXTURECRAFT_BUILD_DATE={}", env_or("TEXTURECRAFT_BUILD_DATE", today)); + + if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") { + windows_resources(); + } +} + +fn env_or(var: &str, fallback: fn() -> Option) -> String { + std::env::var(var).ok().map(|v| v.trim().to_owned()).filter(|v| !v.is_empty()).or_else(fallback).unwrap_or_default() +} + +fn git_sha() -> Option { + let out = Command::new("git").args(["rev-parse", "HEAD"]).output().ok().filter(|o| o.status.success())?; + let sha = String::from_utf8(out.stdout).ok()?.trim().to_owned(); + (sha.len() >= 7 && sha.bytes().all(|b| b.is_ascii_hexdigit())).then_some(sha) +} + +/// UTC date of `SOURCE_DATE_EPOCH`, or of now. +fn today() -> Option { + let secs = match std::env::var("SOURCE_DATE_EPOCH") { + Ok(v) => v.trim().parse::().ok()?, + Err(_) => std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).ok()?.as_secs(), + }; + // Days since 1970-01-01 to a civil date (Howard Hinnant's algorithm, proleptic Gregorian). + let z = i64::try_from(secs / 86_400).ok()? + 719_468; + let era = z.div_euclid(146_097); + let doe = z.rem_euclid(146_097); + let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365; + let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); + let mp = (5 * doy + 2) / 153; + let day = doy - (153 * mp + 2) / 5 + 1; + let month = if mp < 10 { mp + 3 } else { mp - 9 }; + let year = yoe + era * 400 + i64::from(month <= 2); + Some(format!("{year:04}-{month:02}-{day:02}")) +} + +fn windows_resources() { + let name = std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "texturecraft".into()); + let description = if name.ends_with("-cli") { "TextureCraft command-line tool" } else { "TextureCraft 3D texture painter" }; + let mut res = winresource::WindowsResource::new(); + res.set_icon(ICON) + .set("ProductName", "TextureCraft") + .set("FileDescription", description) + .set("CompanyName", "Learning Machines LLC") + .set("LegalCopyright", "Copyright (c) the TextureCraft contributors. MIT OR Apache-2.0.") + .set("OriginalFilename", &format!("{name}.exe")) + .set("InternalName", &name); + if let Err(e) = res.compile() { + if std::env::var_os("TEXTURECRAFT_REQUIRE_WINRES").is_some() { + println!("cargo::error=embedding Windows resources into {name}.exe failed: {e}"); + } else { + println!("cargo:warning={name}.exe built without icon/version resources: {e}"); + } + } +} diff --git a/apps/texturecraft/src/control_server.rs b/apps/texturecraft/src/control_server.rs new file mode 100644 index 00000000..f7ee3b2a --- /dev/null +++ b/apps/texturecraft/src/control_server.rs @@ -0,0 +1,114 @@ +//! Loopback JSON-lines control server (`--control `): one request per line, +//! `{"id", "method", "params"}`, one reply per line. The first request must be +//! `{"method":"auth","params":{"token":"…"}}` with the token from `TEXTURECRAFT_CONTROL_TOKEN` +//! or, when that is unset, the token written to `/texturecraft-control-.token`. + +use std::io::{BufRead, BufReader, Read, Write}; +use std::net::{TcpListener, TcpStream}; +use std::sync::mpsc::{Receiver, Sender, channel}; +use std::time::Duration; + +use serde_json::{Value, json}; +use texturecraft_ui_egui::ControlRequest; + +/// Requests larger than this are rejected (screenshots go the other way). +const MAX_REQUEST: u64 = 8 << 20; + +fn token(port: u16) -> String { + if let Ok(t) = std::env::var("TEXTURECRAFT_CONTROL_TOKEN") + && t.len() >= 16 + { + return t; + } + use std::hash::{BuildHasher, Hasher}; + let mut out = String::new(); + for i in 0..4u64 { + let mut h = std::collections::hash_map::RandomState::new().build_hasher(); + h.write_u64(i ^ u64::from(std::process::id())); + h.write_u128(std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_nanos()).unwrap_or(0)); + out.push_str(&format!("{:016x}", h.finish())); + } + let path = std::env::temp_dir().join(format!("texturecraft-control-{port}.token")); + if let Err(e) = std::fs::write(&path, &out) { + eprintln!("texturecraft: could not write the control token to {}: {e}", path.display()); + } else { + eprintln!("texturecraft: control token written to {}", path.display()); + } + out +} + +pub fn start(port: u16, ctx: egui::Context) -> Receiver { + let (tx, rx) = channel::(); + let listener = match TcpListener::bind(("127.0.0.1", port)) { + Ok(l) => l, + Err(e) => { + eprintln!("texturecraft: control server failed to bind 127.0.0.1:{port}: {e}"); + return rx; + } + }; + let token = token(port); + eprintln!("texturecraft: control server listening on 127.0.0.1:{port}"); + std::thread::spawn(move || { + for stream in listener.incoming().flatten() { + let (tx, ctx, token) = (tx.clone(), ctx.clone(), token.clone()); + std::thread::spawn(move || serve(stream, &token, tx, ctx)); + } + }); + rx +} + +fn serve(stream: TcpStream, token: &str, tx: Sender, ctx: egui::Context) { + let _ = stream.set_read_timeout(Some(Duration::from_secs(600))); + let Ok(read) = stream.try_clone() else { return }; + let mut reader = BufReader::new(read.take(u64::MAX)); + let mut out = stream; + let mut authed = false; + loop { + let mut line = String::new(); + let n = match reader.by_ref().take(MAX_REQUEST).read_line(&mut line) { + Ok(n) => n, + Err(_) => break, + }; + if n == 0 { + break; + } + if !line.ends_with('\n') && n as u64 >= MAX_REQUEST { + let _ = writeln!(out, "{}", json!({"id": null, "ok": false, "error": "request too large"})); + break; + } + if line.trim().is_empty() { + continue; + } + let msg: Value = match serde_json::from_str(&line) { + Ok(v) => v, + Err(e) => { + let _ = writeln!(out, "{}", json!({"id": null, "ok": false, "error": format!("bad JSON: {e}")})); + continue; + } + }; + let id = msg.get("id").cloned().unwrap_or(Value::Null); + let method = msg.get("method").and_then(Value::as_str).unwrap_or("").to_string(); + let params = msg.get("params").cloned().unwrap_or(json!({})); + let mut reply = if !authed { + let ok = method == "auth" && params.get("token").and_then(Value::as_str) == Some(token); + authed = ok; + if ok { json!({"ok": true}) } else { json!({"ok": false, "error": "authenticate first: {\"method\":\"auth\",\"params\":{\"token\":…}}"}) } + } else { + let (req, rrx) = ControlRequest::new(method, params); + if tx.send(req).is_err() { + break; + } + ctx.request_repaint(); + rrx.recv_timeout(Duration::from_secs(120)).unwrap_or_else(|_| json!({"ok": false, "error": "timeout"})) + }; + if let Some(o) = reply.as_object_mut() { + o.insert("id".into(), id); + } + if writeln!(out, "{reply}").is_err() || out.flush().is_err() || !authed { + if !authed { + continue; + } + break; + } + } +} diff --git a/apps/texturecraft/src/main.rs b/apps/texturecraft/src/main.rs new file mode 100644 index 00000000..92634e36 --- /dev/null +++ b/apps/texturecraft/src/main.rs @@ -0,0 +1,120 @@ +//! TextureCraft desktop app. +//! +//! Usage: `texturecraft [project.tcraft | mesh.glb] [--control ] [--empty] [--version]` +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +mod control_server; + +use texturecraft_engine::Session; +use texturecraft_ui_egui::TextureCraftApp; + +const ICON_PNG: &[u8] = include_bytes!("../../../assets/app-icon/hicolor/256x256/apps/ai.storyteller.texturecraft.png"); + +fn version() -> String { + let sha = env!("TEXTURECRAFT_BUILD_SHA"); + let short = sha.get(..7).unwrap_or(sha); + let date = env!("TEXTURECRAFT_BUILD_DATE"); + match (short.is_empty(), date.is_empty()) { + (true, true) => format!("TextureCraft {}", texturecraft_engine::VERSION), + (true, false) => format!("TextureCraft {} ({date})", texturecraft_engine::VERSION), + _ => format!("TextureCraft {} ({short} {date})", texturecraft_engine::VERSION), + } +} + +struct Args { + file: Option, + control: Option, + empty: bool, +} + +fn parse_args() -> Result, String> { + let mut args = Args { file: None, control: None, empty: false }; + let mut it = std::env::args().skip(1); + while let Some(a) = it.next() { + match a.as_str() { + "--version" | "-V" => { + println!("{}", version()); + return Ok(None); + } + "--help" | "-h" => { + println!("{}\n\nUsage: texturecraft [project.tcraft | mesh file] [--control ] [--empty]", version()); + return Ok(None); + } + "--control" => { + let p = it.next().ok_or("--control needs a port")?; + args.control = Some(p.parse().map_err(|_| format!("invalid port `{p}`"))?); + } + "--empty" => args.empty = true, + f if !f.starts_with('-') => args.file = Some(f.to_string()), + other => return Err(format!("unknown option `{other}`")), + } + } + Ok(Some(args)) +} + +fn initial_session(args: &Args) -> Session { + if let Some(f) = &args.file { + match texturecraft_engine::file_cmds::open_path(f) { + Ok(s) => return s, + Err(e) => eprintln!("texturecraft: could not open {f}: {e}"), + } + } + if !args.empty + && let Ok(s) = texturecraft_engine::sample_session(2048, 512) + { + return s; + } + match Session::new_project("Untitled", texturecraft_engine::geom::primitives::material_ball(), "builtin:material_ball", None, 2048) { + Ok(s) => s, + Err(e) => { + eprintln!("texturecraft: {e}"); + std::process::exit(1); + } + } +} + +fn icon() -> Option { + let img = image::load_from_memory(ICON_PNG).ok()?.into_rgba8(); + let (w, h) = img.dimensions(); + Some(egui::IconData { rgba: img.into_raw(), width: w, height: h }) +} + +fn main() { + let args = match parse_args() { + Ok(Some(a)) => a, + Ok(None) => return, + Err(e) => { + eprintln!("texturecraft: {e}"); + std::process::exit(2); + } + }; + let prev = std::panic::take_hook(); + std::panic::set_hook(Box::new(move |info| { + eprintln!("texturecraft: internal error: {info}"); + prev(info); + })); + let session = initial_session(&args); + let mut viewport = egui::ViewportBuilder::default().with_title("TextureCraft").with_inner_size([1600.0, 960.0]).with_min_inner_size([960.0, 600.0]); + if let Some(i) = icon() { + viewport = viewport.with_icon(i); + } + let options = eframe::NativeOptions { viewport, renderer: eframe::Renderer::Wgpu, ..Default::default() }; + let control = args.control; + let r = eframe::run_native( + "TextureCraft", + options, + Box::new(move |cc| { + let mut app = TextureCraftApp::new(cc, session); + if let Some(port) = control { + app.control = Some(control_server::start(port, cc.egui_ctx.clone())); + } + Ok(Box::new(app)) + }), + ); + if let Err(e) = r { + eprintln!("texturecraft: {e}"); + std::process::exit(1); + } +} diff --git a/assets/app-icon/hicolor/128x128/apps/ai.storyteller.texturecraft.png b/assets/app-icon/hicolor/128x128/apps/ai.storyteller.texturecraft.png new file mode 100644 index 0000000000000000000000000000000000000000..03736467866ec4b776b8b62196c1c35d52fdb87e GIT binary patch literal 14833 zcmVc*O^Sjvm7)X$ zJ{1g|08$fb8W0G{f8M!wmXpifWH-qM{B)it?6PrQE@v*};>-vcl29u21Mnv?D${XZM~Rt4g_ z)4%Y)409Sxi|Qf&aS*`2$p1%yg9yCw53~J$k^fJE?k3L3%TV}Im(aiP&jWAo_P&O; z|1bO_LE+x_UsLa&3~3?W^e_CQ!I%Dluq!6n_Ve&SA1V^?&sviIso4UtiPuso`utUj zNlKxZ#1#H~XUrAKDpW6$k6#1*ys2EM9|fq_^6Is0XdeFT?+$-k0!X}?O1ol{71FOT zf)6RAdjfRg*?jC$x@$rdAQJplE0UM~Zt%AwfOXMH6sZtlMTS5`iQ-f;qBzy9QXyuJ{6+ZF-vPXo2QZCpa{xPEwl{&+9!lgz7YHg)fDv7{c1=dCAl*{{LWtb5 zoe5yWrbzPf@m7DnbTv7d4n`lQG;Jk84DBihQQOJ|Zfj9-TN3~fKX+#wBVGVVZ_&Il zwP@CuTB_IFgm}drcnl^-!T(pU{fSns`H5c(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-YH?T}(?& zo8v`k=>#1(Kt}Q(<_i4e(3Vl(kAX)kO|(oU_q1iO?P4MMsdZblsBffnfl$sO?&Tu; zcb1d^xeb@?xXtI3KO@1>i9~w&i-`%hvK&SUfC%ZTew&-f2b4Dn09*~qZ`G=IQtev# zXwf$-=&_#NIH~rCpD(q1yasJmp?0`~arQHMDj>5M028@+^G0zaM}OEoAt7O@^%?&U X;MjMm*3V3900000NkvXXu0mjfhU6K@ literal 0 HcmV?d00001 diff --git a/assets/app-icon/hicolor/16x16/apps/ai.storyteller.texturecraft.png b/assets/app-icon/hicolor/16x16/apps/ai.storyteller.texturecraft.png new file mode 100644 index 0000000000000000000000000000000000000000..e1fef320f61665f2bc2befd79f05b513bf263b08 GIT binary patch literal 827 zcmV-B1H}A^P)Yxd7=@ql_+#vhJ&t3?B#q;IKx#Q9w4^N+l`8r{O1pvXy6B=(7hU#0^jB2f(M7kV zi%O^)(v&K=(4qtg!9Zeg9I%Newlj`B9(#t%ATSEAbah|dd(W9O=e*vf@89|joO2v3 zj|bZqc-~@zY4UnW7rY0-1}d%S7+viUK`o9XL3z7`Vm26TJRmGy^vgNteHCmeQ9SQ{ zO?K`$!B7Y-5_ZpvTiYz>u5u$E;k0xY|Nc&2=!>QoRB6wi=ETAmY!-?y!Otop`T;>W znwsKTU=Bm--@R0@w{J5!{|P_+e4ee+BQlvI3`RBg&bDoqulz@?QDgU^$19)smR7e)7a!J6k@1-f()vvz z6Ir5K#8nU${qeQyq%-rF`nCX{rJGF>mOsGzq+ww0wNb-|IC^ZJ+%3Txo@V^$JU*Y# zl{tIzBUTDe*i8)cUUr6it2x?b10x_I{rJOoPI~Sg5{V&NtsbrRJ|1C^Ux2InE~*-& zW7&j75{jZAIpUWjhf1YNHNS@Ul>I+?p(UgVcU6tp=s0G_A~_rvdxtO2e9FZ?FOiH7 zigX?$89M&GM?{SZQ?1(~1@S0WSwRx3<5h@82idq^pja%4Y4(uIEfWc=++ELeX5nKT zHAcs%5i76o4C}^dN(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UhQclHe96W54GqLgT>QY$ICos7_#xyzMbyvf+#{!Tm|=j&g6nMCtRB4yh_f-SR$ zqHGWu??fw>a4lWI>VE>gB+=C5!|4|yd*bM=+>9c Z{~H0OZjyCShfn|j002ovPDHLkV1iB_54QjS literal 0 HcmV?d00001 diff --git a/assets/app-icon/hicolor/256x256/apps/ai.storyteller.texturecraft.png b/assets/app-icon/hicolor/256x256/apps/ai.storyteller.texturecraft.png new file mode 100644 index 0000000000000000000000000000000000000000..c15bfa9104f774042da34b2fd04eaccd71d3caa6 GIT binary patch literal 30727 zcmV*9Kybf_P) z3Aj~N*~iyq6fT1xf-DC+4!I_O^2I0>Zqg2(C|>_4sAy6bJJ@d#ePTJ7e061Ck}6FG7$f^rj9!5s8Te1 z)X-o~I^@S%HBGJzZupicaC)X^ew)^npiag+OCmIhFF_|;KI3y0$v%rJmD z@z+tuRszKYECWa-`4H!?qmDYZ1~fD@96_>BLpr_p?Rt_=9d&FyXfo!VE*;wL(ez}9sQ$YIw0~!tdSOo;b!@F@Ix$u)Kpl0|(K1nI0Cm){6{F4o>ZoHYMx6oF zQO8z{Is>Sqj;$DNOdTy23s!A33s-J3#iC=oR%SrAwx*7jhdKkOA*@`#*}T1UgZ+E< z()DIl@IOSpVC6>p*qq=oUQ-F|)oYu~-@Q7uF})g7N2!1JcBWI?R;FjC)|toZs9w}} zs0tyH`;7%_GX&1x)r73;SrGm@VGaWV#?Tlr1{lZ30&SvGySnvR4X87KD!{Y_>nuSb z!TDV&DP9S{ynGA{2GGA-JIfHz8u|xJp{_Ah9`zM(2FwoB_^ESOn&RJ=u1cYBI3E#I*Z_}@D zZ~OO<1NZYjo_VZq?qg9{wtR(|G2>r3kI$X=o|!lQy`0zR$4dpwh9moTGDG@xsA~sh zLY)DW5!mk!&st$72ShK9x}+F#z<#Dnm(FI;z}?NjJ$E-ety^aq#i~`SgU9EZLLtoH$o`FW&7g#+Gk`MS$vLac6SG$)cHBYi z5I4Ue_#_g$+Aw40zs=;SFPeF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GDCw_W?&zd2jJRCs{I7Zc4*8$W2Lj=w!*{F@iM z@A2wmrC>ecA0U2%3(w1B`N3p-YJW>5e&FtdzW1k}`KKk;$xr{q66B_U%qSO*3wk%K zShvY$ZlYN+8-O*J7ID7tAC5vXH}yc-;H>^^)v6U|g?(3~VS>sKI0j!U#4(uD2cQ5a zpzGA&@S)n+Gx8Xa)UfQv~37Ge`eA`9F_dEP<4F6DPH=}m_jjZOC?aGilV7rvP2 zhpYa_)pBGu9Z5nzow7J5W-ZA%FjkU!jv97E-u>Zuse8~3P<;M{mQMV@)d2Kf$?#4X zBe@o5oOX)&(?fqTD_5_!X5?GTj9IfbI!O-ce^3ynC8{v>g_rF)`rb7^v>LB_reHME zQctQd;}AcH<(h;EJa^tF-r3w_9%?X6vAS!zRZ@k(4%DErMOtb>aP&zRZ?(2{`d7dN zVAJ8=Y$AtWm)#1)Cjd|bi(vqTXaE`{3EkDJk5?Oz&zJAuIz_93xoSTL2Z}ljq#XMZ zHlzX*<*Kd7+s}STR7g4_S*9ACRol2WP~FE~b-DS=E&J!= z-)-Br&50j<^wDc^?jd$;f@GmrFW!5X6>B!!75sZb)N5CIvZM+D1SAP698B?63#8(1 zhYI$R*NL4F`YpHq#%$BRz3J4slUcc9Wkw<k3dx@)e?GHD@xqFS77N%!sF zf0xW>iq?DaH@{}Sb;&n!u7UFgV}Mx)pZD+wA1pX4ApVa`O#DBEet3ZGn-voP0000< KMNUMnLSTYtdLGRH literal 0 HcmV?d00001 diff --git a/assets/app-icon/hicolor/32x32/apps/ai.storyteller.texturecraft.png b/assets/app-icon/hicolor/32x32/apps/ai.storyteller.texturecraft.png new file mode 100644 index 0000000000000000000000000000000000000000..a633d495cc35e35f8b20ee7cef176c651c15cd81 GIT binary patch literal 2502 zcmV;%2|4zOP)wvPJ`BAqh)J$i7TwCYfaR<@NU-$AAqY?H}zgXU=)Q_wMiB z`@8phzxPIW`mkiBTlYX`C|6yENicOC{ykGa97@r8k@MHwP!AeAD zAtp=W7el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ets/app-icon/hicolor/64x64/apps/ai.storyteller.texturecraft.png b/assets/app-icon/hicolor/64x64/apps/ai.storyteller.texturecraft.png new file mode 100644 index 0000000000000000000000000000000000000000..21b0442464a58c54f84cb0a0f6029d4ff529c11c GIT binary patch literal 7026 zcmV-&8;#_NP)1 zcU+X$(teg*md?_Pbg`jg@4XRY>^*AiHO)j#Za!0tCb@|zYD|o=YwW!@z-|x=SP)Q= z-lX@o?6UjKoD~Gc$g20ROn$^I@B5x}=1h6!nX@uHmP>Pdr$DROjDLej45s#2b9W2B zG~oYToYQ>qzh?0)v{tcZ63M@6=bsj`1lhlK@hr4<1N_THhX0|Y7poDQt3qr}Il^-# zC{}6kFfIQd@3AnEqk)43Or;ulnQKwsMh;&GBbdwoH+%IzQNWqlVjPK9B08fG9a{Rp zw{06t@@Wh=*LtwDv_P|_jcdIxDLEC%^p}vBgzGnMA?$t>f@1O!cOeN~>szCflN9~x zo8fheWrB)r=kBFy`i85zldv@{p5*=6e0 za}+M}&iGMKSlb{|W{bH2*@&SS^D6R63RrPHALr9$*uVEL%$PReAFtiJ|EO5Ni-fQ7 z4?JJvGfxjU+zE?Bo7OFaTXgEs23}sCaP;uT!gH^tgqK#py4yua(pn+F|4^+#Ex(`; z!B<17-WSk&4uUTd5h%(0M~|C<)Bfj$C8#SZ#J>*qwvb39w0I9F6qab%zzaUjnvxQ- zP*kqL%g9S9AULTMXW~l8-&fZf?`c`_^EWto`YdKlogkFJ?#7A_zIFqjE%*?>uik{WM-PLmyE}G8 zmOx+8TLDK2;LMsm>IaF5N~>9cpSWA{OH>ev=up6=u-F(^`L z^$v)7DS)9ZqdNvTwF#RiPxf_7r8SKnIYeZWF(Zf4XO_a<-lVx)`ui$nhPG(erX|kA z6zTJ5{S?4}r$g&z&o%F+WS*~k_n#KFg#LcLg*$YivG_eJp2wBR<%r0W==D6kkYHGP z8M+PX{>B1%0wdW9|QYq{yPxHca zbMpweL?Ajk4tw?;!TwzvpIZPuPuRRijhha+p&^P(DAh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0`pEw~K{W>|JhExJD}94q98aso0%BIq)K%J~(ukt!^A@6G z;xJ_Jn>uaoK8Wt!J5h_=0QniI=%J{I&mX22A+|&&XfI}v`D7Q%A8R(_{W;S_?|&b4 zliK$5gWS{{W~J%qY)=T0V(F#CQaH8fEc{ntWr5I}VVoY2o&E?OMGxU(Aw^w9Mh|R= z4ESFTMTXKq5V47rPKOTakA0NQy7ufrEK>+t*cv?F0y3%X%|XSLqHv}8H=;iLPV%dm z*jTibXFYRIwxy?FbC?ULUL+|VA9LNaeW&nIPHV-F;xNTiNj-htH5!KoM5N{sB5X;Z zsgaoI)QN8+_VzWjch>LtTTqG$+Y(GrE;E5)UNV6!>M0Vp!Do~>lVxRPBSWKOMxLvH zasz51dAe1hz6VjUqA+RFupy%FgrcoQ&6ZhGK?S^gS|BCmkvKbaI^aUpcbv=l6jx4i zJWOPA!P)0i?@^=Gtv*jp3$%3;G&uV{gCCAN{wI#1lSLu)k!wW?WPA64N4u_2m>Hv+ zK^)?51;d2M+jAGLh@*GhZj(``skGub3dkz!@}X|=_=O5q7tV? z*aaj8Q=fhipXji(sdAzRF|0h_tDti7-K23?x*@aH!lw}XN*VxemzCq zFnh)%@ry7E!U}6wuEgy6`k(!0yW|FpjCvX|YK3qyEq$6{U_}|K9KOV4-J+^gL1VZ` zi){Zi~+^CSEZc%fxC@>fb#;dk#LH8}|(=lp5$r9@Qd|8qtM z3qypYB%x#Pez-|I5tWR+@|QLSQ0fzZyz8l{vPZ(InRy5&st7QW~I0V?_$r38#7 QU;qFB07*qoM6N<$f^-m%ng9R* literal 0 HcmV?d00001 diff --git a/assets/app-icon/hicolor/scalable/apps/ai.storyteller.texturecraft.svg b/assets/app-icon/hicolor/scalable/apps/ai.storyteller.texturecraft.svg new file mode 100644 index 00000000..1bb8fbd2 --- /dev/null +++ b/assets/app-icon/hicolor/scalable/apps/ai.storyteller.texturecraft.svg @@ -0,0 +1,169 @@ + + TextureCraft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/app-icon/icon-1024.png b/assets/app-icon/icon-1024.png new file mode 100644 index 0000000000000000000000000000000000000000..58eceab1964d05c5978186cf58582068a5689a6c GIT binary patch literal 136893 zcmYhjcRbba{|9`X$R@e>-ie*6Jczq!^R@O0svss)73Hs00I4r089+f zAFPl}IDj90sHdfAe*g6%<S{SqFNB>uNQ$Us`W?}ZI z@}{k^&AZkM(*2*eX6Thd6eCW#7`n?bhEueEM7U&r{v$aN5gCQ{P&8$7Ig1yTW2h5V zd9kof94CKozLE5O%)K}yIeB3HFNx*jYTC+=#cO368JpKK`aXfDOJCeCv;VB|SrO5q zq30K0b5I(}dY&J~@EeoS*gLimxi4kZEoNlL&m{arG9fCpY|nxYhX6z0ji~+`v+8NJG`vjXil9Ip{bQ~P=+*KDb}oeGO}u$vMOj&S zUC{P2A!KiP>N{Jfgf75~YZvWEcUj>@SV>vo&qB&!5V6t-pD$D5A*aq6ORH=50UI7> zpr}qyuGO#YkX~9iiXf%2tZgm;Xl-CEQ&82oHZd@jHoA3YrEhTEH4g6LF9te&U)lTJ z<5&!cJ}h5xW_xXl;f@v@ z^xM}tZQwlBw)XlodL9_uInJg8JqS!Wg=Jmzw>RfTC&!ydKJ3}iS&PDOpVN~u-4EN_ z+led~wJ-b6eH{wPF`XN4Pg-BkV~qvO;PXefeS(Znr#06NwY^-R^t$pHJgiYE%G2d<2bYEE=e z_aDQvjST#MJbOkUP{-!o7M;DAEy)Lp1)jMZ<^{LBa&9<~kHb1I*XUEWf1F(1mm^*a z)nOV_;KAl1A_j&~Rue=u>%V!u`=V?-zPxa4{((#cu3ra^f5b`JXHOTWg?e@p))~gM zw{N%SML9b&bwPP7FM(g(VVE3Lvb?zX+7-G38Z`^dQ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TMdZ8?k_+Kg?|ZO z?!7R%o}t>4dN`0NJ$}+43v9Oo8!epqU#PCVXE}Km-LK>{Wpjkp3a@dNFS~5lc4rth z+K}OPcqyDRUrm)z{XE)dT^5pGYY$W2j%~lbMPUNzn$x4_cmD2!sl6f|euKeh=85Br zdlhUGjbM!rzfzexL#>+BO{wq4arir) zFLx$CUr_oZGngSkZWE)UqIFjOs~P&hzL;0&_W!sA?!G2T8h!7--Hwu>6LFC~ zm}@fWIO$8@ed*lp`p0efzS~)TdaZOf_{p&De+^S^GF@0_fX)3E5_z=8NF9<>XdL-) zChLyxA0*vH2D=Dv3hQDN_>}uS792RLRo_5Rv3o~Z3Eq3?y4ZS3GbLutuKe^VUc<0$ z13rq%ku+5j1I(TuO;Z%IxZ1LX;<*x)@;mA3k1^@G6JV9Gy8~Wm7HLPH&YK%4({||N z9&K^Qx<2`^9V$6_6|8uLxxxobGlZGemc{$oo@lW`ySzQZ&#(`E3*Upj$aKSRqAB1L zvXDSX+u&<=J@#f@%PgTTri~W7$Gbd%GIHT9FK}dHt~XFGfFHX^SEHQu(tm0d+yH~0tVmv^=pOXCB*HyBn!T$%zP!xv% literal 0 HcmV?d00001 diff --git a/assets/app-icon/icon.py b/assets/app-icon/icon.py new file mode 100644 index 00000000..a85a64a3 --- /dev/null +++ b/assets/app-icon/icon.py @@ -0,0 +1,164 @@ +"""TextureCraft app icon: an octopus drawn in code, written to icon.svg beside this file. + +Original artwork (no traced or third-party source), MIT OR Apache-2.0 like the rest of the repo. +Follows craftrules standards/icon-design.md: 512 tile with rx=112, three colours only (ink, paper, +TextureCraft copper), a tight head-and-shoulders portrait with big eyes, carved lines that swell +and taper. Edit the shapes here, run `python3 assets/app-icon/icon.py`, then `packaging/icons.sh` +to render every PNG, the .ico and the .icns. Plain Python 3, no dependencies. +""" +import math +from pathlib import Path + +INK, PAPER, APP = "#0b0b0c", "#efe9dc", "#c2672b" + + +def catmull(pts, n=24, closed=False): + out = [] + m = len(pts) + segs = m if closed else m - 1 + for i in range(segs): + g = (lambda k: pts[k % m]) if closed else (lambda k: pts[min(max(k, 0), m - 1)]) + p0, p1, p2, p3 = g(i - 1), g(i), g(i + 1), g(i + 2) + for s in range(n): + t = s / n + t2, t3 = t * t, t * t * t + out.append(tuple(0.5 * ((2 * p1[j]) + (-p0[j] + p2[j]) * t + (2 * p0[j] - 5 * p1[j] + 4 * p2[j] - p3[j]) * t2 + + (-p0[j] + 3 * p1[j] - 3 * p2[j] + p3[j]) * t3) for j in range(2))) + if not closed: + out.append(pts[-1]) + return out + + +def arclen(pts): + acc = [0.0] + for a, b in zip(pts, pts[1:]): + acc.append(acc[-1] + math.dist(a, b)) + total = acc[-1] or 1.0 + return [a / total for a in acc] + + +def normals(pts): + out = [] + for i in range(len(pts)): + a = pts[max(i - 1, 0)] + b = pts[min(i + 1, len(pts) - 1)] + dx, dy = b[0] - a[0], b[1] - a[1] + d = math.hypot(dx, dy) or 1.0 + out.append((-dy / d, dx / d)) + return out + + +def path(pts, close=True): + s = "M" + " L".join(f"{x:.1f} {y:.1f}" for x, y in pts) + return s + (" Z" if close else "") + + +def ribbon(center, width, offset=lambda u: 0.0, u0=0.0, u1=1.0): + """Closed outline of a stroke along `center` whose width (and sideways offset) vary with u.""" + us = arclen(center) + ns = normals(center) + left, right = [], [] + for p, n, u in zip(center, ns, us): + if u < u0 or u > u1: + continue + v = (u - u0) / ((u1 - u0) or 1) + w, o = width(v) / 2, offset(u) + left.append((p[0] + n[0] * (o + w), p[1] + n[1] * (o + w))) + right.append((p[0] + n[0] * (o - w), p[1] + n[1] * (o - w))) + return left + right[::-1] + + +def swell(peak, lo=0.0): + """Carved line: thin at both ends, `peak` wide in the middle.""" + return lambda v: lo + (peak - lo) * math.sin(math.pi * min(max(v, 0), 1)) ** 0.8 + + +def at(center, u): + us = arclen(center) + ns = normals(center) + for i in range(1, len(us)): + if us[i] >= u: + return center[i], ns[i] + return center[-1], ns[-1] + + +out = [] +el = out.append + + +def arm(points, base, tip, side, suckers=(0.45, 0.97), shade=(0.05, 0.75)): + """An arm: paper body with ink contour, a carved shading line, suckers along `side`.""" + c = catmull(points) + w = lambda v: tip + (base - tip) * (1 - v) ** 1.15 + el(f'') + # Shading line on the side away from the suckers. + el(f'') + # Suckers: paper discs with an ink ring and a dark centre, shrinking toward the tip. + u = suckers[0] + while u < suckers[1]: + p, n = at(c, u) + r = max(w(u) * 0.2, 3.2) + cx, cy = p[0] + n[0] * side * w(u) * 0.36, p[1] + n[1] * side * w(u) * 0.36 + el(f'') + if r > 5: + el(f'') + u += max(r * 2.9, 8) / 420 + + +# Arms, back to front. +arm([(206, 262), (140, 292), (78, 300), (38, 278), (32, 242), (58, 226), (80, 242), (70, 262)], 96, 7, 1, suckers=(0.42, 0.97)) # left curl +arm([(306, 262), (372, 292), (434, 300), (474, 278), (480, 242), (454, 226), (432, 242), (442, 262)], 96, 7, -1, suckers=(0.42, 0.97)) # right curl +arm([(222, 262), (196, 300), (150, 352), (104, 424), (76, 540)], 98, 34, -1, suckers=(0.3, 1.0)) # left, off the bottom +arm([(290, 262), (316, 300), (360, 352), (420, 402), (462, 452), (452, 494), (416, 492), (410, 464), (428, 452)], 98, 7, 1, suckers=(0.4, 0.97)) # right, curl +arm([(240, 250), (236, 302), (222, 382), (196, 446), (184, 540)], 104, 40, 1, suckers=(0.34, 1.0)) # front left +arm([(274, 250), (280, 302), (302, 372), (302, 432), (278, 476), (244, 472), (236, 446), (254, 436)], 104, 7, 1, suckers=(0.4, 0.97)) # front right curl + +# Head: mantle + eye region, one silhouette. +head = catmull([(262, 62), (338, 74), (390, 116), (406, 176), (378, 226), (364, 254), (332, 286), (256, 302), (180, 286), + (148, 254), (134, 226), (108, 176), (128, 112), (186, 72)], closed=True) +el(f'') +el(f'') +# Engraved shading: contour-following lines that thicken toward the shadow side (right and below). +cx0, cy0 = 236, 156 +for k, f in enumerate([0.95, 0.88, 0.81, 0.74, 0.67]): + ring = [(cx0 + (x - cx0) * f, cy0 + (y - cy0) * f) for x, y in head] + n = len(ring) + # Right flank of the mantle, in shadow. + arc = ring[int(n * (0.03 + k * 0.012)):int(n * (0.30 - k * 0.012))] + el(f'') +for k, f in enumerate([0.95, 0.9]): + ring = [(cx0 + (x - cx0) * f, cy0 + (y - cy0) * f) for x, y in head] + n = len(ring) + # Under the head, where the arms join. + arc = ring[int(n * (0.40 + k * 0.02)):int(n * (0.60 - k * 0.02))] + el(f'') +# A few carved strokes over the dome (texture), left side lighter. +for pts, wd in [([(196, 104), (176, 124), (166, 150)], 6), ([(222, 96), (212, 108)], 4.5), ([(288, 98), (312, 112), (330, 134)], 6)]: + el(f'') + +# Eyes. +for ex, ey, look in [(172, 214, 4), (340, 214, -4)]: + el(f'') + el(f'') + el(f'') + el(f'') + el(f'') + s = 1 if ex < 256 else -1 + # Upper lid: a heavy carved arc. + lid = catmull([(ex - 50 * s, ey - 18), (ex - 20 * s, ey - 50), (ex + 22 * s, ey - 52), (ex + 48 * s, ey - 28)]) + el(f'') + # Lower lid crease. + low = catmull([(ex - 34 * s, ey + 44), (ex, ey + 58), (ex + 36 * s, ey + 46)]) + el(f'') + +body = "\n ".join(out) +svg = f''' + TextureCraft + + + + {body} + + +''' +Path(__file__).with_name("icon.svg").write_text(svg, encoding="utf-8", newline="\n") diff --git a/assets/app-icon/icon.svg b/assets/app-icon/icon.svg new file mode 100644 index 00000000..1bb8fbd2 --- /dev/null +++ b/assets/app-icon/icon.svg @@ -0,0 +1,169 @@ + + TextureCraft + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/app-icon/texturecraft.icns b/assets/app-icon/texturecraft.icns new file mode 100644 index 0000000000000000000000000000000000000000..b7c64eca4fc7087fdf8737185333bc4b14575cb7 GIT binary patch literal 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|_`V$QortV1(Q8ni@|u{D+?=T30uYJ91LeGEgGu#`^`X83r_q1<95%5BfXV zB;=ToEw)f&+`-d79~w{FHPKdf@80mA;|oR%WAjfD{oD3f6+xCaZn}=2is+NooyRH; z;czsT$H{tHL$$9I#^c-MM=IfBb21wEW~!mG!w^QpIbCH>P!JCFt7#m zk|L7$GAAcT1uq;^QJ|V!MIDt=)8~>a zyDOxWHuS)vmq-yuUY=%_6s57-&$e_ulWI|T(L z;Uk!n;~@e#3YgyprBS>XN5>0-0WoQE@>K83GHl7KXHE;aOQHVp5+n-n#vUUmykvLb ztB&+}Lo!D;R$j!jokZ+wmd7A@!5nm3urLmo&Uw})bEm!*2cQb| Vx--mlVFBQey0XrrDn*-!{{x5nqgns} literal 0 HcmV?d00001 diff --git a/assets/app-icon/texturecraft.ico b/assets/app-icon/texturecraft.ico new file mode 100644 index 0000000000000000000000000000000000000000..7592b7950875d40da07e83780c34fe973a82c155 GIT binary patch literal 66846 zcmagEQ;;Z4(=|FXdu-dbZQHhO+qP}b?6GazwrzX*<;ns8 z00e*lfQJY8x8ehE{Q&?-1poj*M*a_b0s{cd|FfZ^|A)yy0RW`H0RZsv|HC5?0054# z0089V|KSoC008!X@6yx%hgT5*0Jcd00QmX;!;V-008MNF0RH~};d>4M08*uY4*xy> zpMNlS006WY0DuU2Suq$$Ovry`7zuG<#eeI+F9d)G|K}e7@A20F0N@Xhgs_0Jd$viU zj2)61dPv^=o6%J?Ppr`>am=ANza*9LNaCBTp=)cKfj?pc3lKn3sWo)u2<+JK0Rcuvy0xg*K7vUY1dB4?d}Imwi7mW z9M~qB`;K9d#e=5=S{GP9C}s5-y3RGc08K2hfJbMrAuGByH$JuQ(ev>oW?~knBSyU;Svc+uf$s~r=^F9hGWcW(6p5n~1sv?$B#Op8rw?Uz`!f|;pjVoRNH3M{!j zc0^X|3VR`kH!Fg^#XX(FN!#V^FbQfY@=VV!X#+Kp*S8M{jDad0^9=vFo~27pOi7gX zqDc>D`>gD<(Cek5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qgn>Al5i*!~FmME*OHen3yWTDSX?f^~xdFi9#Y10Z2b3(+V3_N+bcFl0%EcQGX$u7xqUY2%p2o!hnk z*&&MfK@K}U^w#NT1rCDWnj%q(Bp^{OrCb;l7H=r!wLZyuWSKk3!qg-+R-9ZS_2JSw z6*p6xouClNhba4B11-Sy@}dPqwU!pxcz-~=vPb+z)juYrBpKM6jDXN5PkG6z{k)%j zg7{tA6UpC_yZmUta5)S3re@B1%RV+aq#aij5H$D@0MdT9UHjX=Ia|I|c!0zg6U|K< zKWL|pzddC9n-{z9@#LI_otuvrzO_OPyfXd zM?kdN-_Cx5;L1qFFH;fHjvEalY^$jzTdv^+4I+tp04(sugF2eOIJmg31s$ z245@0F__Z_pa3VJ>(t=zq1xEwn_;PJKqa@jcbN#}^-L5R9dOHli%A0(ViQLq3*1F{-a)@E<##aYO@|qc zP4^^loq;+RzL@BTtNzE;a%46gNkTuJvN$JZEy+1BR+4&-8g@k9{o#43d(aI~eEx-& zPW-^t0Q6qT@J<*bxfW-fc8dAaLw_+VSFg5a0JnuG~Fcit!7+1z9vYA{W)x@)>sQiZ?{)S$6NT53T7 ze*u90aP&zRZ?(2{`d7dNVAJ8=Y$AtWm)#1)Cjd|bi(vqTXaE`{3EkDJk5?Oz&zJAu zIz_93xoSTL2Z}ljq#XMZHlzX*<*Kd7+s}STR7g4_S*9ACRol2WP~FE~b-DS=E&J!=-)-Br&50j<^wDc^?jd$;f@GmrFW!5X6>B!!75sZb)N5CI zvZM+D1SAP698B?63#8(1hYI$R*NL4F`YpHq#%$BRz3J4slUcc9Wkw<k3d zx@)e?GHD@xqFS77N%!sFf0xW>iq?DaH@{}Sb;&n!u7UFgV}Mx)pZD+wA1pX4ApVa` aO#DBEet3ZGn-voP0000 Headless; + pub fn default_session() -> Result; // material ball, 1024 + pub fn command_run(&mut self, id: &str, params: Value) -> Result; + pub fn batch(&mut self, steps: &[Value]) -> Value; // stops at the first error + pub fn open(&mut self, path: &str) -> Result; // .tcraft or mesh + pub fn import_mesh(&mut self, path: &str, resolution: Option, name: Option<&str>) -> Result; + pub fn save(&mut self, path: Option<&str>) -> Result; + pub fn export(&mut self, params: &Value) -> Result; + pub fn render_png(&mut self, o: &RenderOptions) -> Result<(u32, u32, Vec), AutomationError>; + pub fn handle(&mut self, method: &str, params: &Value) -> Result; // JSON-lines methods +} +pub enum Filesystem { Denied, TrustedLocal, Workspace(AuthorizedWorkspace) } + +// Read and write roots as cap-std directory capabilities: `..`, absolute paths, drive +// prefixes, device names and symlink/junction escapes fail. +pub struct AuthorizedWorkspace; +pub fn workspace::authorize_command(id: &str, params: &Value) -> Result<(), AutomationError>; + +pub struct TexturecraftMcp; // rmcp server: ::headless(Headless) | ::bridge(BridgeClient) +pub struct BridgeClient; // client of `texturecraft --control ` +pub mod rpc; // serve_lines (stdio), serve_tcp (loopback + token) +pub mod security; // tokens, bounded line reads, connection limit +pub mod budgets; // reply ceilings: 8 MiB JSON, 5 MiB / 2048 px PNG +``` + +## Rules + +- Untrusted callers (MCP, `serve`) reach files only through `Filesystem::Workspace`; path-taking + `file.*` commands are refused by `authorize_command`. The CLI's own subcommands use + `Filesystem::TrustedLocal` (the user typed the paths). +- Renders create the GPU device on first use and return an error when there is no adapter; a + wgpu panic is caught and reported, and the device is recreated on the next render. +- Tests: `tests/agent_tasks.rs` drives the MCP server in process (tokio duplex) through ten + agent tasks, the workspace boundary and junk params for every tool. diff --git a/crates/automation/src/bridge.rs b/crates/automation/src/bridge.rs new file mode 100644 index 00000000..fbd8e809 --- /dev/null +++ b/crates/automation/src/bridge.rs @@ -0,0 +1,107 @@ +//! Client for the running app's control channel (`texturecraft --control `): one JSON +//! request per line, replies matched by `id`. Keeps one connection, reconnects once on failure. + +use std::sync::atomic::{AtomicU64, Ordering}; +use std::time::Duration; + +use serde_json::{Value, json}; +use tokio::io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader}; +use tokio::net::TcpStream; +use tokio::net::tcp::{OwnedReadHalf, OwnedWriteHalf}; +use tokio::sync::Mutex; + +use crate::AutomationError; +use crate::budgets::MAX_BRIDGE_REPLY_BYTES; + +type Conn = (BufReader, OwnedWriteHalf); + +pub struct BridgeClient { + port: u16, + token: String, + conn: Mutex>, + next_id: AtomicU64, +} + +impl BridgeClient { + /// A client for the app on `127.0.0.1:port` (loopback only, like the server). + pub fn new(port: u16, token: String) -> BridgeClient { + BridgeClient { port, token, conn: Mutex::new(None), next_id: AtomicU64::new(1) } + } + + pub fn port(&self) -> u16 { + self.port + } + + async fn connect(&self) -> Result { + let addr = ("127.0.0.1", self.port); + let s = tokio::time::timeout(Duration::from_secs(5), TcpStream::connect(addr)) + .await + .map_err(|_| AutomationError::Bridge(format!("timed out connecting to 127.0.0.1:{}", self.port)))? + .map_err(|e| { + AutomationError::Bridge(format!("cannot connect to 127.0.0.1:{} ({e}); start the app with `texturecraft --control {}`", self.port, self.port)) + })?; + let (r, w) = s.into_split(); + let mut conn = (BufReader::new(r), w); + let id = self.next_id.fetch_add(1, Ordering::Relaxed); + tokio::time::timeout(Duration::from_secs(5), exchange(&mut conn, id, "auth", &json!({"token": self.token}))) + .await + .map_err(|_| AutomationError::Bridge("authentication timed out".into()))?? + .map_err(|e| AutomationError::Bridge(format!("authentication failed: {e}")))?; + Ok(conn) + } + + /// Call a control method; returns its `result` or the app's error. + pub async fn call(&self, method: &str, params: Value) -> Result { + let mut guard = self.conn.lock().await; + for attempt in 0..2 { + let mut conn = match guard.take() { + Some(c) => c, + None => self.connect().await?, + }; + let id = self.next_id.fetch_add(1, Ordering::Relaxed); + match tokio::time::timeout(Duration::from_secs(150), exchange(&mut conn, id, method, ¶ms)).await { + Ok(Ok(reply)) => { + // An oversized reply (`Bridge`) leaves unread bytes: drop that connection. + if !matches!(reply, Err(AutomationError::Bridge(_))) { + *guard = Some(conn); + } + return reply; + } + // A dropped connection (the app restarted) is retried once on a fresh one. + Ok(Err(e)) if attempt == 1 => return Err(e), + Ok(Err(_)) => {} + Err(_) => return Err(AutomationError::Bridge(format!("`{method}` timed out"))), + } + } + Err(AutomationError::Bridge(format!("`{method}` failed"))) + } +} + +/// Outer `Err`: transport failure (retryable). Inner: the app's answer. +async fn exchange(conn: &mut Conn, id: u64, method: &str, params: &Value) -> Result, AutomationError> { + let io = |e: std::io::Error| AutomationError::Bridge(e.to_string()); + let line = format!("{}\n", json!({"id": id, "method": method, "params": params})); + conn.1.write_all(line.as_bytes()).await.map_err(io)?; + conn.1.flush().await.map_err(io)?; + let mut buf = Vec::new(); + loop { + buf.clear(); + let n = (&mut conn.0).take(MAX_BRIDGE_REPLY_BYTES as u64 + 1).read_until(b'\n', &mut buf).await.map_err(io)?; + if n == 0 { + return Err(AutomationError::Bridge("the app closed the connection".into())); + } + if n > MAX_BRIDGE_REPLY_BYTES { + // Not retried: the request may have completed. + return Ok(Err(AutomationError::Bridge(format!("reply over {MAX_BRIDGE_REPLY_BYTES} bytes; the operation may have completed")))); + } + let Ok(v) = serde_json::from_slice::(&buf) else { continue }; + if v.get("id").and_then(Value::as_u64) != Some(id) { + continue; // a stale reply to an earlier, timed-out request + } + return Ok(if v.get("ok").and_then(Value::as_bool) == Some(true) { + Ok(v.get("result").cloned().unwrap_or(Value::Null)) + } else { + Err(AutomationError::App(v.get("error").and_then(Value::as_str).unwrap_or("unknown error").to_string())) + }); + } +} diff --git a/crates/automation/src/budgets.rs b/crates/automation/src/budgets.rs new file mode 100644 index 00000000..8c0cb0c4 --- /dev/null +++ b/crates/automation/src/budgets.rs @@ -0,0 +1,75 @@ +//! Ceilings for automation replies: rendered and screenshot PNGs and JSON payloads. + +use serde::Serialize; + +use crate::{AutomationError, bad}; + +/// Largest JSON reply (MCP tool text, one JSON line). +pub const MAX_RESPONSE_BYTES: usize = 8 << 20; +/// Largest PNG returned to a client (before base64). +pub const MAX_PNG_BYTES: usize = 5 << 20; +/// Largest render or screenshot edge returned to a client; larger screenshots are downscaled. +pub const MAX_PNG_SIDE: u32 = 2048; +/// Largest render edge for local CLI renders. +pub const MAX_LOCAL_RENDER_SIDE: u32 = 4096; +/// Largest reply line read from the app (full-window screenshots are big). +pub const MAX_BRIDGE_REPLY_BYTES: usize = 64 << 20; + +/// Serialize compactly, refusing replies over [`MAX_RESPONSE_BYTES`]. +pub fn json_text(v: &impl Serialize) -> Result { + let s = serde_json::to_string(v).map_err(|e| AutomationError::Other(format!("cannot encode the reply: {e}")))?; + if s.len() > MAX_RESPONSE_BYTES { + return Err(bad(format!("reply is {} bytes, over the {MAX_RESPONSE_BYTES}-byte limit; the operation may have completed", s.len()))); + } + Ok(s) +} + +pub fn check_png(bytes: usize) -> Result<(), AutomationError> { + if bytes > MAX_PNG_BYTES { + return Err(bad(format!("PNG is {bytes} bytes, over the {MAX_PNG_BYTES}-byte limit; render smaller"))); + } + Ok(()) +} + +pub fn encode_png(w: u32, h: u32, rgba: Vec) -> Result, AutomationError> { + let img = image::RgbaImage::from_raw(w, h, rgba).ok_or_else(|| AutomationError::Other("render buffer has the wrong size".into()))?; + let mut png = Vec::new(); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).map_err(|e| AutomationError::Other(format!("PNG encoding failed: {e}")))?; + Ok(png) +} + +/// Downscale a PNG (an app screenshot) so its longest edge is at most `max_side`, then check its +/// byte size. Decoding is capped: a small compressed reply can still claim a huge image. +pub fn fit_png(png: Vec, max_side: u32) -> Result, AutomationError> { + let mut reader = image::ImageReader::with_format(std::io::Cursor::new(&png), image::ImageFormat::Png); + let mut limits = image::Limits::default(); + limits.max_image_width = Some(16_384); + limits.max_image_height = Some(16_384); + limits.max_alloc = Some(1 << 30); + reader.limits(limits); + let img = reader.decode().map_err(|e| AutomationError::Other(format!("screenshot is not a valid PNG: {e}")))?; + let out = if img.width().max(img.height()) > max_side { + let small = img.thumbnail(max_side, max_side).into_rgba8(); + encode_png(small.width(), small.height(), small.into_raw())? + } else { + png + }; + check_png(out.len())?; + Ok(out) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn fit_png_downscales_and_rejects_garbage() { + let big = encode_png(3000, 10, vec![200; 3000 * 10 * 4]).unwrap(); + let small = fit_png(big, MAX_PNG_SIDE).unwrap(); + let img = image::load_from_memory(&small).unwrap(); + assert_eq!(img.width(), MAX_PNG_SIDE); + assert!(fit_png(b"not a png".to_vec(), 64).is_err()); + assert!(json_text(&"x".repeat(MAX_RESPONSE_BYTES)).is_err()); + assert!(check_png(MAX_PNG_BYTES + 1).is_err()); + } +} diff --git a/crates/automation/src/headless.rs b/crates/automation/src/headless.rs new file mode 100644 index 00000000..ef73e813 --- /dev/null +++ b/crates/automation/src/headless.rs @@ -0,0 +1,306 @@ +//! The headless backend: a [`Session`] plus file I/O and windowless renders. Synchronous and +//! UI-free; the MCP server, the RPC server and the CLI all drive it. + +use std::path::Path; + +use serde_json::{Value, json}; +use texturecraft_engine::core::PROJECT_EXT; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, commands, file_cmds, inspect}; +use texturecraft_render::ViewKind; + +use crate::budgets::{MAX_LOCAL_RENDER_SIDE, MAX_PNG_SIDE, check_png, encode_png}; +use crate::render::Gpu; +use crate::workspace::{MAX_READ_BYTES, authorize_command}; +use crate::{AuthorizedWorkspace, AutomationError, bad}; + +/// Where file paths given to [`Headless`] may point. +pub enum Filesystem { + /// No file access (an MCP server started without roots). + Denied, + /// Host paths as given: the local CLI user typed them. + TrustedLocal, + /// Relative paths under the authorized roots (remote or agent callers). + Workspace(AuthorizedWorkspace), +} + +/// What [`Headless::render_png`] draws. +#[derive(Clone, Debug, Default)] +pub struct RenderOptions { + /// `3d` (default) or `2d`/`uv` (the UV view of the active texture set). + pub view: Option, + /// Pixels; default the session viewport (the space `tool.stroke` points live in). + pub width: Option, + pub height: Option, + /// Camera overrides in degrees (the session camera is not changed). + pub yaw: Option, + pub pitch: Option, + /// Path trace with this many samples per pixel (Rendering mode) instead of the GPU view. + pub samples: Option, + /// Light bounces for path tracing (default 6). + pub bounces: Option, +} + +/// Most samples per pixel a path-traced render may take. +pub const MAX_TRACE_SAMPLES: u32 = 4096; + +pub struct Headless { + pub session: Session, + fs: Filesystem, + /// Created on the first render; `Err` once no adapter was found. + gpu: Option>, +} + +fn ext_of(path: &str) -> String { + Path::new(path).extension().and_then(|e| e.to_str()).unwrap_or_default().to_ascii_lowercase() +} + +fn join(dir: &str, name: &str) -> String { + if dir == "." { name.to_string() } else { format!("{}/{name}", dir.trim_end_matches('/')) } +} + +impl Headless { + pub fn new(session: Session, fs: Filesystem) -> Headless { + Headless { session, fs, gpu: None } + } + + /// The session a fresh server starts with: the material ball at 1024. + pub fn default_session() -> Result { + Ok(Session::new_project("Untitled", primitives::material_ball(), "builtin:material_ball", None, 1024)?) + } + + fn trusted(&self) -> bool { + matches!(self.fs, Filesystem::TrustedLocal) + } + + fn read(&self, path: &str) -> Result, AutomationError> { + match &self.fs { + Filesystem::Denied => Err(bad("file access is not granted: start the server with --read-root

")), + Filesystem::TrustedLocal => { + let len = std::fs::metadata(path).map_err(|e| AutomationError::Io(format!("cannot read {path}: {e}")))?.len(); + if len > MAX_READ_BYTES { + return Err(bad(format!("{path} is {len} bytes (limit {MAX_READ_BYTES})"))); + } + std::fs::read(path).map_err(|e| AutomationError::Io(format!("cannot read {path}: {e}"))) + } + Filesystem::Workspace(w) => w.read(path), + } + } + + fn write(&self, path: &str, bytes: &[u8]) -> Result<(), AutomationError> { + match &self.fs { + Filesystem::Denied => Err(bad("file access is not granted: start the server with --write-root ")), + Filesystem::TrustedLocal => { + // Atomic: a crash or full disk never leaves a half-written project. + let tmp = format!("{path}.tmp"); + let res = std::fs::write(&tmp, bytes).and_then(|()| std::fs::rename(&tmp, path)); + if res.is_err() { + let _ = std::fs::remove_file(&tmp); + } + res.map_err(|e| AutomationError::Io(format!("cannot write {path}: {e}"))) + } + Filesystem::Workspace(w) => w.write(path, bytes), + } + } + + fn create_dir_all(&self, dir: &str) -> Result<(), AutomationError> { + match &self.fs { + _ if dir == "." => Ok(()), + Filesystem::Denied => Err(bad("file access is not granted: start the server with --write-root ")), + Filesystem::TrustedLocal => std::fs::create_dir_all(dir).map_err(|e| AutomationError::Io(format!("cannot create {dir}: {e}"))), + Filesystem::Workspace(w) => w.create_dir_all(dir), + } + } + + /// Replace the session, keeping the viewport size scripted strokes use. + fn replace(&mut self, mut next: Session) -> Value { + next.viewport = self.session.viewport; + self.session = next; + self.inspect() + } + + pub fn inspect(&self) -> Value { + inspect::session(&self.session) + } + + pub fn command_list(&self, filter: Option<&str>) -> Value { + commands::list(&self.session, filter) + } + + /// Run an engine command. Untrusted callers can't reach host paths through it. + pub fn command_run(&mut self, id: &str, params: Value) -> Result { + if !self.trusted() { + authorize_command(id, ¶ms)?; + } + Ok(texturecraft_engine::execute(&mut self.session, id, ¶ms)?) + } + + /// Run `[{id, params?}]` in order, stopping at the first error (reported with its index). + pub fn batch(&mut self, steps: &[Value]) -> Value { + let mut results = Vec::new(); + for (i, step) in steps.iter().enumerate() { + let id = step.get("id").and_then(Value::as_str).unwrap_or_default(); + match self.command_run(id, step.get("params").cloned().unwrap_or(Value::Null)) { + Ok(v) => results.push(v), + Err(e) => return batch_reply(results, Some((i, id, e.to_string()))), + } + } + batch_reply(results, None) + } + + /// Open a `.tcraft` project or a mesh file (a new project at 2048). + pub fn open(&mut self, path: &str) -> Result { + if ext_of(path) != PROJECT_EXT { + return self.import_mesh(path, None, None); + } + let mut next = Session::from_project_bytes(&self.read(path)?)?; + next.path = Some(path.to_string()); + next.modified = false; + Ok(self.replace(next)) + } + + /// A new project from a mesh file: one texture set per material. + pub fn import_mesh(&mut self, path: &str, resolution: Option, name: Option<&str>) -> Result { + let bytes = self.read(path)?; + let stem = Path::new(path).file_stem().and_then(|s| s.to_str()).unwrap_or("Untitled"); + let next = Session::from_mesh_bytes(path, &bytes, resolution.unwrap_or(2048), name.unwrap_or(stem))?; + Ok(self.replace(next)) + } + + /// Import an image file as a project resource (for `layer.add.image`, `tool.stencil`). + pub fn import_resource(&mut self, path: &str) -> Result { + let bytes = self.read(path)?; + Ok(json!({ "name": self.session.import_resource_bytes(path, bytes)? })) + } + + /// Save a layer (default: the selected one) as a smart material file (`.tcmat`). + pub fn material_save(&mut self, p: &Value) -> Result { + let path = p.get("path").and_then(Value::as_str).ok_or_else(|| bad("`path` is required"))?; + let s = &self.session; + let id = match p.get("layer").and_then(Value::as_u64) { + Some(i) => texturecraft_engine::core::LayerId(i), + None => s.selected_layer().ok_or_else(|| bad("no layer selected and no `layer` given"))?, + }; + let name = match p.get("name").and_then(Value::as_str) { + Some(n) => n.to_string(), + None => s.doc.project.layer(id).map(|l| l.name.clone()).map_err(|_| bad(format!("no layer {}", id.0)))?, + }; + let bytes = s.smart_material_bytes(id, &name)?; + let ext = texturecraft_engine::material_lib::SMART_MATERIAL_EXT; + let path = if ext_of(path) == ext { path.to_string() } else { format!("{path}.{ext}") }; + self.write(&path, &bytes)?; + Ok(json!({ "path": path })) + } + + /// Add a smart material from a `.tcmat` file above the selection. + pub fn material_load(&mut self, path: &str) -> Result { + let bytes = self.read(path)?; + Ok(json!({ "layer": self.session.add_smart_material_bytes(&bytes)?.0 })) + } + + /// Save as `.tcraft` to `path`, or to the project's own file. + pub fn save(&mut self, path: Option<&str>) -> Result { + let target = match path.or(self.session.path.as_deref()) { + Some(p) if ext_of(p) == PROJECT_EXT => p.to_string(), + Some(p) => format!("{p}.{PROJECT_EXT}"), + None => return Err(bad("the project has no file yet: give `path`")), + }; + self.write(&target, &self.session.to_project_bytes()?)?; + self.session.path = Some(target.clone()); + self.session.modified = false; + Ok(json!({ "path": target })) + } + + /// Export textures to `dir` (`file.exportTextures` params: preset, ts, format, padding, size…). + pub fn export(&mut self, p: &Value) -> Result { + let dir = p.get("dir").and_then(Value::as_str).filter(|d| !d.is_empty()).ok_or_else(|| bad("`dir` is required"))?; + let opts = file_cmds::export_options(p, "textures.export")?; + let n = self.session.set_count(); + let sets: Vec = match p.get("ts") { + None | Some(Value::Null) => (0..n).collect(), + Some(Value::String(a)) if a == "all" => (0..n).collect(), + Some(v) => vec![v.as_u64().and_then(|t| usize::try_from(t).ok()).filter(|t| *t < n).ok_or_else(|| bad(format!("invalid `ts` {v}")))?], + }; + let files = self.session.export_files(&sets, &opts)?; + self.create_dir_all(dir)?; + let mut written = Vec::new(); + for f in &files { + let path = join(dir, &f.name); + self.write(&path, &f.bytes)?; + written.push(path); + } + let warnings: Vec<&String> = files.iter().flat_map(|f| &f.warnings).collect(); + Ok(json!({ "files": written, "warnings": warnings })) + } + + /// Render the session to PNG: `(width, height, png)`. Errors without a GPU adapter. + pub fn render_png(&mut self, o: &RenderOptions) -> Result<(u32, u32, Vec), AutomationError> { + let s = &self.session; + let kind = match o.view.as_deref().unwrap_or("3d") { + "3d" => ViewKind::Scene, + "2d" | "uv" => ViewKind::Uv { ts: s.ts(), zoom: 1.0, pan: [0.0, 0.0] }, + other => return Err(bad(format!("unknown view `{other}` (3d, 2d or uv)"))), + }; + let max = if self.trusted() { MAX_LOCAL_RENDER_SIDE } else { MAX_PNG_SIDE }; + let side = |v: Option, d: f32| { + let v = v.unwrap_or(d.round() as u32); + if (16..=max).contains(&v) { Ok(v) } else { Err(bad(format!("render size {v} must be 16 to {max} pixels"))) } + }; + let size = [side(o.width, s.viewport.x)?, side(o.height, s.viewport.y)?]; + let mut camera = s.camera; + for (v, slot, lim) in [(o.yaw, &mut camera.yaw, 1e6), (o.pitch, &mut camera.pitch, 89.0)] { + if let Some(v) = v { + if !v.is_finite() { + return Err(bad("camera angles must be finite")); + } + *slot = v.clamp(-lim, lim).to_radians(); + } + } + if let Some(samples) = o.samples { + if !(1..=MAX_TRACE_SAMPLES).contains(&samples) || o.view.as_deref().is_some_and(|v| v != "3d") { + return Err(bad(format!("path tracing renders the 3D view with 1 to {MAX_TRACE_SAMPLES} samples"))); + } + let settings = texturecraft_render::trace::TraceSettings { bounces: o.bounces.unwrap_or(6).clamp(1, 32) }; + let (w, h, rgba) = crate::render::path_trace(&mut self.session, size, camera, samples, &settings); + let png = encode_png(w, h, rgba)?; + if !self.trusted() { + check_png(png.len())?; + } + return Ok((w, h, png)); + } + let gpu = match self.gpu.get_or_insert_with(Gpu::new) { + Ok(g) => g, + Err(e) => return Err(AutomationError::Other(format!("cannot render: {e}"))), + }; + // Last-resort guard: wgpu panics on device errors; drop the device and report instead. + let session = &mut self.session; + let out = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| gpu.render(session, kind, size, camera))); + let (w, h, rgba) = match out { + Ok(Some(px)) => px, + Ok(None) => return Err(AutomationError::Other("the GPU returned no image".into())), + Err(_) => { + self.gpu = None; + return Err(AutomationError::Other("the GPU renderer failed".into())); + } + }; + let png = encode_png(w, h, rgba)?; + if !self.trusted() { + check_png(png.len())?; + } + Ok((w, h, png)) + } + + /// The GPU adapter used for renders, if one was created. + pub fn adapter(&self) -> Option<&str> { + self.gpu.as_ref().and_then(|g| g.as_ref().ok()).map(Gpu::adapter) + } +} + +/// `{completed, results, failed: {index, id, error} | null}` for `command_batch`. +pub fn batch_reply(results: Vec, failed: Option<(usize, &str, String)>) -> Value { + json!({ + "completed": results.len(), + "results": results, + "failed": failed.map(|(index, id, error)| json!({ "index": index, "id": id, "error": error })), + }) +} diff --git a/crates/automation/src/lib.rs b/crates/automation/src/lib.rs new file mode 100644 index 00000000..e6fdb71d --- /dev/null +++ b/crates/automation/src/lib.rs @@ -0,0 +1,49 @@ +//! # texturecraft-automation +//! +//! Agent-facing automation, L4 (no UI toolkit): +//! +//! * [`TexturecraftMcp`]: an MCP server (official `rmcp` SDK). Headless mode drives an in-process +//! [`Headless`] session; bridge mode forwards to a running desktop app over the JSON-lines +//! control channel (`docs/control-protocol.md`). +//! * [`Headless`]: a [`texturecraft_engine::Session`] plus file I/O through an +//! [`AuthorizedWorkspace`] and windowless GPU renders. Shared by the MCP server, the RPC server +//! and `texturecraft-cli`. +//! * [`rpc`]: the control channel's methods (plus `render`) over stdio or loopback TCP, used by +//! `texturecraft-cli serve`. +//! * [`BridgeClient`]: the client side of the app's control channel. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod bridge; +pub mod budgets; +pub mod headless; +pub mod render; +pub mod rpc; +pub mod security; +pub mod server; +pub mod workspace; + +pub use bridge::BridgeClient; +pub use headless::{Filesystem, Headless, RenderOptions}; +pub use server::{Backend, TexturecraftMcp}; +pub use workspace::AuthorizedWorkspace; + +#[derive(Debug, thiserror::Error)] +pub enum AutomationError { + #[error("{0}")] + BadRequest(String), + #[error("I/O: {0}")] + Io(String), + #[error(transparent)] + Engine(#[from] texturecraft_engine::EngineError), + #[error("bridge: {0}")] + Bridge(String), + #[error("app: {0}")] + App(String), + #[error("{0}")] + Other(String), +} + +pub(crate) fn bad(msg: impl Into) -> AutomationError { + AutomationError::BadRequest(msg.into()) +} diff --git a/crates/automation/src/render.rs b/crates/automation/src/render.rs new file mode 100644 index 00000000..7e9d2c32 --- /dev/null +++ b/crates/automation/src/render.rs @@ -0,0 +1,168 @@ +//! Windowless renders of a session: the desktop app's per-frame GPU sync (`ui-egui/src/gpu.rs`) +//! and viewport shading (`ui-egui/src/viewport.rs`), done in one shot. + +use rayon::prelude::*; +use texturecraft_engine::compose::{DisplayKind, all_tiles, tile_bytes}; +use texturecraft_engine::{Session, ViewMode}; +use texturecraft_render::trace::{TraceDisplay, TraceScene, TraceSet, TraceSettings, Tracer}; +use texturecraft_render::{Frame, Shade, ViewKind}; + +/// A headless GPU device that remembers what it already holds of the session. +pub struct Gpu { + h: texturecraft_render::headless::Headless, + mesh_id: u64, + sets: Vec<(u32, usize)>, + env: String, +} + +impl Gpu { + /// Errors when there is no GPU (or software) adapter. + pub fn new() -> Result { + Ok(Gpu { h: texturecraft_render::headless::Headless::new()?, mesh_id: 0, sets: Vec::new(), env: String::new() }) + } + + pub fn adapter(&self) -> &str { + &self.h.adapter_name + } + + /// Bring the GPU up to date with `s` (mesh, texture sets, environment, dirty tiles). + fn sync(&mut self, s: &mut Session) { + s.update(); + let h = &mut self.h; + let mut reupload = false; + if self.mesh_id != s.mesh_id { + h.renderer.set_mesh(&h.device, &h.queue, &s.mesh, s.mesh_id); + self.mesh_id = s.mesh_id; + self.sets.clear(); + reupload = true; + } + let sets: Vec<(u32, usize)> = s.doc.project.texture_sets.iter().map(|t| (t.resolution, t.material)).collect(); + if sets != self.sets { + h.renderer.set_texture_sets(&h.device, &h.queue, &sets, s.mesh.materials.len().max(1)); + self.sets = sets; + reupload = true; + } + let d = &s.doc.project.display; + if d.environment != self.env { + let image = d.environment_resource().and_then(|n| s.images.get(n)); + h.renderer.set_environment(&h.device, &h.queue, &d.environment, image.map(|i| i.as_ref())); + self.env.clone_from(&d.environment); + } + for ts in 0..s.caches.len() { + let mut tiles = s.take_uploads(ts); + let Some(cache) = s.caches.get(ts) else { continue }; + if reupload { + tiles = all_tiles(cache.resolution); + } + let empty = Default::default(); + let baked = s.doc.baked.get(&ts).unwrap_or(&empty); + let comp = &cache.composite; + let bytes: Vec<_> = tiles + .par_iter() + .flat_map_iter(|&(tx, ty)| DisplayKind::ALL.into_iter().map(move |k| (k, tx, ty))) + .map(|(k, tx, ty)| (k, tx, ty, tile_bytes(comp, baked, k, tx, ty))) + .collect(); + for (k, tx, ty, b) in bytes { + h.renderer.upload_tile(&h.queue, ts, k, tx, ty, &b); + } + // The aux texture behind the mesh-map and mask views (rebuilt every render). + let res = cache.resolution.min(2048); + let aux = match s.view { + ViewMode::MeshMap(m) => Some(texturecraft_render::mesh_maps::mesh_map_rgba(s.doc.baked.get(&ts), m, res)), + ViewMode::Mask(id) if s.doc.project.locate(id).is_some_and(|(t, _, _)| t == ts) => s.mask_view_rgba(id, res), + _ => None, + }; + if let Some(rgba) = aux { + h.renderer.upload_aux(&h.queue, ts, res, &rgba); + } + } + } + + /// Render `s` with `kind` at `size` through `camera`; RGBA8 (sRGB) pixels. + pub fn render(&mut self, s: &mut Session, kind: ViewKind, size: [u32; 2], camera: texturecraft_engine::geom::OrbitCamera) -> Option<(u32, u32, Vec)> { + self.sync(s); + let frame = Frame { view_id: 1, size, kind, camera, shade: shade(s), visible: s.doc.project.texture_sets.iter().map(|t| t.visible).collect() }; + self.h.render(&frame) + } +} + +/// A progressive CPU path trace of the session's 3D view (the app's Rendering mode), finished +/// after `samples` passes and denoised; RGBA8 (sRGB) pixels. +pub fn path_trace(s: &mut Session, size: [u32; 2], camera: texturecraft_engine::geom::OrbitCamera, samples: u32, settings: &TraceSettings) -> (u32, u32, Vec) { + s.update(); + let sets = s + .doc + .project + .texture_sets + .iter() + .zip(&s.caches) + .map(|(ts, c)| TraceSet { material: ts.material, composite: c.composite.clone(), height_strength: ts.height_strength }) + .collect(); + let d = &s.doc.project.display; + let env_image = d.environment_resource().and_then(|n| s.images.get(n)); + let scene = TraceScene::for_display(s.mesh.clone(), s.bvh.clone(), sets, d, env_image.map(|i| i.as_ref())); + let mut tracer = Tracer::new(size[0], size[1]); + for _ in 0..samples { + tracer.pass(&scene, &camera, settings); + } + (tracer.width, tracer.height, tracer.rgba8(&TraceDisplay { denoise: true, ..TraceDisplay::from_display(d) })) +} + +/// How the viewport shades the session (the app's `viewport::shade`). +pub fn shade(s: &Session) -> Shade { + let (view_mode, channel) = match s.view { + ViewMode::Material => (0, 0), + ViewMode::Channel(c) => (1, c.index() as u32), + ViewMode::MeshMap(_) | ViewMode::Mask(_) => (2, 0), + ViewMode::UvChecker => (3, 0), + }; + Shade { + height_strength: s.doc.project.texture_sets.get(s.ts()).map(|t| t.height_strength).unwrap_or(1.0), + view_mode, + channel, + // The app's default (only the 2D view draws it). + wireframe: true, + ..Shade::from_display(&s.doc.project.display) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + use texturecraft_engine::execute; + + /// A 64×32 Radiance `.hdr` (flat RGBE scanlines): a hot orange sky over a dim blue ground. + fn sky_hdr() -> Vec { + let rgbe = |c: [f32; 3]| { + let e = c.iter().copied().fold(0.0f32, f32::max).log2().floor() as i32 + 1; + let k = 256.0 / 2f32.powi(e); + [(c[0] * k) as u8, (c[1] * k) as u8, (c[2] * k) as u8, (e + 128) as u8] + }; + let mut out = b"#?RADIANCE\nFORMAT=32-bit_rle_rgbe\n\n-Y 32 +X 64\n".to_vec(); + for y in 0..32 { + let px = rgbe(if y < 16 { [12.0, 4.0, 1.0] } else { [0.02, 0.05, 0.2] }); + out.extend((0..64).flat_map(|_| px)); + } + out + } + + #[test] + fn renders_with_an_imported_hdr_environment() { + let mesh = texturecraft_engine::geom::primitives::material_ball(); + let mut s = Session::new_project("t", mesh, "builtin:material_ball", None, 256).unwrap(); + let name = s.import_resource_bytes("sky.hdr", sky_hdr()).unwrap(); + assert!(s.images[&name].rgba[0][0] > 10.0, "the decoder keeps HDR values"); + let Ok(mut gpu) = Gpu::new() else { + eprintln!("skipping: no GPU adapter"); + return; + }; + let cam = s.camera; + let (_, _, base) = gpu.render(&mut s, ViewKind::Scene, [160, 120], cam).unwrap(); + execute(&mut s, "display.set", &json!({"environment": format!("resource:{name}"), "specGloss": true, "parallax": true})).unwrap(); + let (_, _, lit) = gpu.render(&mut s, ViewKind::Scene, [160, 120], cam).unwrap(); + assert_ne!(base, lit, "the HDR environment changes the render"); + let warm = |px: &[u8]| px.chunks(4).map(|p| p[0] as f32 - p[2] as f32).sum::(); + assert!(warm(&lit) > warm(&base), "the orange sky warms the image"); + } +} diff --git a/crates/automation/src/rpc.rs b/crates/automation/src/rpc.rs new file mode 100644 index 00000000..d8e50d38 --- /dev/null +++ b/crates/automation/src/rpc.rs @@ -0,0 +1,273 @@ +//! Headless JSON-lines server with the app's control-channel envelope: +//! `{"id","method","params"}` → `{"id","ok":true,"result"}` | `{"id","ok":false,"error"}`. +//! `texturecraft-cli serve` runs it on stdio or on a loopback TCP port (first request `auth`). +//! +//! Methods: the app's `ping`, `command.run {id, params?}`, `command.list {filter?}`, +//! `session.inspect`, plus `command.batch {steps}`, `project.open {path}`, +//! `project.save {path?}`, `mesh.import {path, resolution?, name?}`, `resource.import {path}`, +//! `material.save {path, layer?, name?}`, `material.load {path}` (workspace-scoped versions of +//! the engine commands), +//! `textures.export {dir, …}`, `render {view?, width?, height?, yaw?, pitch?}` (PNG base64, the +//! shape of the app's `viewport.screenshot`) and `methods`. + +use std::io::{BufRead, Write}; +use std::net::TcpListener; +use std::sync::{Arc, Mutex, PoisonError}; + +use base64::Engine as _; +use serde_json::{Value, json}; + +use crate::budgets::json_text; +use crate::headless::RenderOptions; +use crate::security::{ConnectionLimiter, LineRead, MAX_BATCH_STEPS, MAX_CONNECTIONS, MAX_REQUEST_BYTES, read_bounded_line, token_matches}; +use crate::{AutomationError, Headless, bad}; + +pub const METHODS: &[&str] = &[ + "ping", + "methods", + "session.inspect", + "command.list", + "command.run", + "command.batch", + "project.open", + "project.save", + "mesh.import", + "resource.import", + "material.save", + "material.load", + "textures.export", + "render", +]; + +fn str_of<'a>(p: &'a Value, k: &str) -> Option<&'a str> { + p.get(k).and_then(Value::as_str) +} + +fn u32_of(p: &Value, k: &str) -> Result, AutomationError> { + match p.get(k) { + None | Some(Value::Null) => Ok(None), + Some(v) => v.as_u64().and_then(|v| u32::try_from(v).ok()).map(Some).ok_or_else(|| bad(format!("`{k}` must be a whole number"))), + } +} + +fn f32_of(p: &Value, k: &str) -> Result, AutomationError> { + match p.get(k) { + None | Some(Value::Null) => Ok(None), + Some(v) => v.as_f64().map(|v| Some(v as f32)).ok_or_else(|| bad(format!("`{k}` must be a number"))), + } +} + +fn required<'a>(p: &'a Value, k: &str) -> Result<&'a str, AutomationError> { + str_of(p, k).ok_or_else(|| bad(format!("`{k}` is required"))) +} + +impl Headless { + /// Dispatch one request. Unknown methods and bad params are errors, never panics. + pub fn handle(&mut self, method: &str, p: &Value) -> Result { + match method { + "ping" => Ok(json!("pong")), + "methods" => Ok(json!(METHODS)), + "session.inspect" => Ok(self.inspect()), + "command.list" => Ok(self.command_list(str_of(p, "filter"))), + "command.run" => self.command_run(required(p, "id")?, p.get("params").cloned().unwrap_or(Value::Null)), + "command.batch" => { + let steps = p.get("steps").and_then(Value::as_array).ok_or_else(|| bad("`steps` must be an array of {id, params}"))?; + if steps.len() > MAX_BATCH_STEPS { + return Err(bad(format!("at most {MAX_BATCH_STEPS} steps per batch"))); + } + Ok(self.batch(steps)) + } + "project.open" => self.open(required(p, "path")?), + "project.save" => self.save(str_of(p, "path")), + "mesh.import" => self.import_mesh(required(p, "path")?, u32_of(p, "resolution")?, str_of(p, "name")), + "resource.import" => self.import_resource(required(p, "path")?), + "material.save" => self.material_save(p), + "material.load" => self.material_load(required(p, "path")?), + "textures.export" => self.export(p), + "render" => { + let o = RenderOptions { + view: str_of(p, "view").map(str::to_string), + width: u32_of(p, "width")?, + height: u32_of(p, "height")?, + yaw: f32_of(p, "yaw")?, + pitch: f32_of(p, "pitch")?, + samples: u32_of(p, "samples")?, + bounces: u32_of(p, "bounces")?, + }; + let (w, h, png) = self.render_png(&o)?; + Ok(json!({ "width": w, "height": h, "png": base64::engine::general_purpose::STANDARD.encode(png) })) + } + m if m.starts_with("ui.") || m == "viewport.screenshot" => { + Err(bad(format!("`{m}` needs the running app (texturecraft --control ); headless renders use `render`"))) + } + other => Err(bad(format!("unknown method `{other}` (see `methods`)"))), + } + } +} + +/// Answer one request line. A panic inside a command becomes an error reply (edits run on a +/// snapshot, so the session stays consistent). +pub fn respond(h: &Mutex, line: &str) -> Value { + let req: Value = match serde_json::from_str(line) { + Ok(v) => v, + Err(e) => return json!({"id": null, "ok": false, "error": format!("bad JSON: {e}")}), + }; + let id = req.get("id").cloned().unwrap_or(Value::Null); + let Some(method) = req.get("method").and_then(Value::as_str) else { + return json!({"id": id, "ok": false, "error": "`method` is required"}); + }; + let params = req.get("params").cloned().unwrap_or(Value::Null); + let r = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| h.lock().unwrap_or_else(PoisonError::into_inner).handle(method, ¶ms))) + .unwrap_or_else(|_| Err(AutomationError::Other(format!("internal error in `{method}`")))); + match r { + Ok(v) => json!({"id": id, "ok": true, "result": v}), + Err(e) => json!({"id": id, "ok": false, "error": e.to_string()}), + } +} + +/// Write one reply line; an oversized reply becomes an error with the same id. +fn write_reply(w: &mut impl Write, reply: &Value) -> std::io::Result<()> { + let text = json_text(reply).unwrap_or_else(|e| json!({"id": reply.get("id"), "ok": false, "error": e.to_string()}).to_string()); + writeln!(w, "{text}")?; + w.flush() +} + +/// Serve JSON lines from `r` to `w` until EOF (stdio mode: no authentication). +pub fn serve_lines(h: &Mutex, mut r: impl BufRead, mut w: impl Write) -> std::io::Result<()> { + let mut line = String::new(); + loop { + let reply = match read_bounded_line(&mut r, &mut line) { + Ok(LineRead::Eof) => return Ok(()), + Ok(LineRead::TooLong) => json!({"id": null, "ok": false, "error": format!("request exceeds {MAX_REQUEST_BYTES} bytes")}), + Err(e) if e.kind() == std::io::ErrorKind::InvalidData => json!({"id": null, "ok": false, "error": "request is not UTF-8"}), + Err(e) => return Err(e), + Ok(LineRead::Line) if line.trim().is_empty() => continue, + Ok(LineRead::Line) => respond(h, &line), + }; + write_reply(&mut w, &reply)?; + } +} + +/// One TCP connection: the first request must be `auth {token}`, as on the app's channel. +fn serve_connection(h: &Mutex, stream: std::net::TcpStream, token: &str) -> std::io::Result<()> { + stream.set_read_timeout(Some(std::time::Duration::from_secs(600)))?; + let mut r = std::io::BufReader::new(stream.try_clone()?); + let mut w = stream; + let mut line = String::new(); + let mut authed = false; + loop { + match read_bounded_line(&mut r, &mut line)? { + LineRead::Eof => return Ok(()), + LineRead::TooLong => return write_reply(&mut w, &json!({"id": null, "ok": false, "error": "request too large"})), + LineRead::Line if line.trim().is_empty() => continue, + LineRead::Line => {} + } + if authed { + write_reply(&mut w, &respond(h, &line))?; + continue; + } + let req: Value = serde_json::from_str(&line).unwrap_or(Value::Null); + let supplied = req.get("params").and_then(|p| p.get("token")).and_then(Value::as_str).unwrap_or_default(); + authed = req.get("method").and_then(Value::as_str) == Some("auth") && token_matches(token, supplied); + let id = req.get("id").cloned().unwrap_or(Value::Null); + if !authed { + return write_reply(&mut w, &json!({"id": id, "ok": false, "error": "authenticate first: {\"method\":\"auth\",\"params\":{\"token\":…}}"})); + } + write_reply(&mut w, &json!({"id": id, "ok": true}))?; + } +} + +/// Serve authenticated JSON lines on `127.0.0.1:port` (0 picks a port) with one shared +/// session. `ready` gets the bound address. +pub fn serve_tcp(port: u16, h: Arc>, token: String, ready: impl FnOnce(std::net::SocketAddr)) -> Result<(), AutomationError> { + let listener = TcpListener::bind(("127.0.0.1", port)).map_err(|e| AutomationError::Io(format!("cannot listen on 127.0.0.1:{port}: {e}")))?; + ready(listener.local_addr().map_err(|e| AutomationError::Io(e.to_string()))?); + let limiter = ConnectionLimiter::default(); + let token = Arc::new(token); + for stream in listener.incoming() { + let Ok(mut stream) = stream else { continue }; + let Some(permit) = limiter.try_acquire(MAX_CONNECTIONS) else { + let _ = writeln!(stream, "{}", json!({"id": null, "ok": false, "error": "too many connections"})); + continue; + }; + let (h, token) = (h.clone(), token.clone()); + std::thread::spawn(move || { + let _permit = permit; + let _ = serve_connection(&h, stream, &token); + }); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::headless::Filesystem; + + fn session() -> Mutex { + let s = texturecraft_engine::Session::new_project("t", texturecraft_engine::geom::primitives::cube(2.0), "builtin:cube", None, 128).unwrap(); + Mutex::new(Headless::new(s, Filesystem::Denied)) + } + + #[test] + fn lines_round_trip_and_errors() { + let h = session(); + let input = concat!( + r#"{"id":1,"method":"command.run","params":{"id":"layer.add.fill","params":{"color":[1,0,0]}}}"#, + "\n\n", + r#"{"id":2,"method":"session.inspect"}"#, + "\n", + r#"{"id":3,"method":"nope"}"#, + "\n", + "not json\n", + r#"{"id":4,"method":"command.run","params":{"id":"file.open","params":{"path":"/etc/passwd"}}}"#, + "\n", + r#"{"id":5,"method":"project.open","params":{"path":"x.tcraft"}}"#, + "\n", + r#"{"id":6,"method":"command.batch","params":{"steps":[{"id":"layer.add.paint"},{"id":"nope"},{"id":"layer.add.paint"}]}}"#, + "\n", + ); + let mut out = Vec::new(); + serve_lines(&h, input.as_bytes(), &mut out).unwrap(); + let r: Vec = String::from_utf8(out).unwrap().lines().map(|l| serde_json::from_str(l).unwrap()).collect(); + assert_eq!(r.len(), 7); + assert_eq!(r[0]["ok"], true); + assert_eq!(r[1]["result"]["layers"][0]["kind"], "fill"); + assert_eq!(r[2]["ok"], false); + assert_eq!(r[3]["id"], Value::Null); + assert!(r[4]["error"].as_str().unwrap().contains("disabled for automation"), "{}", r[4]); + assert!(r[5]["error"].as_str().unwrap().contains("not granted"), "{}", r[5]); + assert_eq!(r[6]["result"]["completed"], 1); + assert_eq!(r[6]["result"]["failed"]["index"], 1); + } + + #[test] + fn tcp_requires_the_token() { + use std::io::{BufRead, BufReader}; + let h = Arc::new(session()); + let (tx, rx) = std::sync::mpsc::channel(); + let token = "0123456789abcdef0123".to_string(); + std::thread::spawn(move || serve_tcp(0, h, token, |a| tx.send(a).unwrap())); + let addr = rx.recv().unwrap(); + let talk = |lines: &[&str]| { + let s = std::net::TcpStream::connect(addr).unwrap(); + let mut w = s.try_clone().unwrap(); + let mut r = BufReader::new(s); + lines + .iter() + .map(|l| { + writeln!(w, "{l}").unwrap(); + let mut reply = String::new(); + r.read_line(&mut reply).unwrap(); + serde_json::from_str::(&reply).unwrap() + }) + .collect::>() + }; + let denied = talk(&[r#"{"id":1,"method":"session.inspect"}"#]); + assert_eq!(denied[0]["ok"], false); + let ok = talk(&[r#"{"id":1,"method":"auth","params":{"token":"0123456789abcdef0123"}}"#, r#"{"id":2,"method":"ping"}"#]); + assert_eq!(ok[0]["ok"], true); + assert_eq!(ok[1]["result"], "pong"); + assert_eq!(ok[1]["id"], 2); + } +} diff --git a/crates/automation/src/security.rs b/crates/automation/src/security.rs new file mode 100644 index 00000000..c781dfb3 --- /dev/null +++ b/crates/automation/src/security.rs @@ -0,0 +1,171 @@ +//! Tokens and bounded framing for the loopback JSON-lines transports (the app's control channel +//! and `texturecraft-cli serve` share the token conventions). + +use std::io::BufRead; +use std::path::PathBuf; +use std::sync::Arc; +use std::sync::atomic::{AtomicUsize, Ordering}; + +use crate::{AutomationError, bad}; + +/// Environment variable holding the control token (both sides). +pub const TOKEN_ENV: &str = "TEXTURECRAFT_CONTROL_TOKEN"; +/// Largest JSON request line, newline included (the app's limit too). +pub const MAX_REQUEST_BYTES: usize = 8 << 20; +/// Simultaneous TCP connections served by `serve --port`. +pub const MAX_CONNECTIONS: usize = 16; +/// Steps in one `command_batch`. +pub const MAX_BATCH_STEPS: usize = 256; + +/// The token file the app (and `serve --port`) writes when the environment gives no token. +pub fn token_file(port: u16) -> PathBuf { + std::env::temp_dir().join(format!("texturecraft-control-{port}.token")) +} + +/// The app accepts any environment token of at least 16 characters; generated ones are 64 hex. +fn validate_token(t: &str) -> Result<(), AutomationError> { + if (16..=1024).contains(&t.len()) && t.bytes().all(|b| b.is_ascii_graphic()) { + Ok(()) + } else { + Err(bad("control token must be 16 to 1024 printable ASCII characters")) + } +} + +/// A fresh 256-bit token as 64 hex digits, from the OS random generator. +pub fn generate_token() -> Result { + let mut bytes = [0u8; 32]; + getrandom::fill(&mut bytes).map_err(|e| AutomationError::Other(format!("cannot generate a control token: {e}")))?; + Ok(bytes.iter().map(|b| format!("{b:02x}")).collect()) +} + +/// Token for a client of `port`: explicit, else `TEXTURECRAFT_CONTROL_TOKEN`, else the token file. +pub fn client_token(port: u16, supplied: Option) -> Result { + let token = match supplied.or_else(|| std::env::var(TOKEN_ENV).ok()) { + Some(t) => t, + None => { + let path = token_file(port); + std::fs::read_to_string(&path) + .map_err(|e| bad(format!("no control token: set {TOKEN_ENV} or start the app with `--control {port}` so it writes {} ({e})", path.display())))? + } + }; + let token = token.trim().to_string(); + validate_token(&token)?; + Ok(token) +} + +/// Token for a server on `port`: `TEXTURECRAFT_CONTROL_TOKEN`, else a fresh one written to +/// [`token_file`] (owner-only on Unix). Returns the token and where it was written. +pub fn server_token(port: u16) -> Result<(String, Option), AutomationError> { + if let Ok(t) = std::env::var(TOKEN_ENV) { + validate_token(t.trim())?; + return Ok((t.trim().to_string(), None)); + } + let token = generate_token()?; + let path = token_file(port); + let mut o = std::fs::OpenOptions::new(); + o.write(true).create(true).truncate(true); + #[cfg(unix)] + std::os::unix::fs::OpenOptionsExt::mode(&mut o, 0o600); + let res = o.open(&path).and_then(|mut f| std::io::Write::write_all(&mut f, token.as_bytes())); + res.map_err(|e| AutomationError::Io(format!("cannot write the control token to {}: {e}", path.display())))?; + Ok((token, Some(path))) +} + +/// Compare equal-length tokens without an early exit. +pub fn token_matches(expected: &str, supplied: &str) -> bool { + expected.len() == supplied.len() && expected.bytes().zip(supplied.bytes()).fold(0u8, |d, (a, b)| d | (a ^ b)) == 0 +} + +pub enum LineRead { + Eof, + Line, + /// Over [`MAX_REQUEST_BYTES`]; the rest of the line is still unread. + TooLong, +} + +/// Read one line, never buffering more than [`MAX_REQUEST_BYTES`] + 1 bytes. +pub fn read_bounded_line(r: &mut impl BufRead, line: &mut String) -> std::io::Result { + line.clear(); + let mut bytes = Vec::new(); + let n = std::io::Read::take(&mut *r, (MAX_REQUEST_BYTES + 1) as u64).read_until(b'\n', &mut bytes)?; + if n == 0 { + return Ok(LineRead::Eof); + } + if n > MAX_REQUEST_BYTES { + if bytes.last() != Some(&b'\n') { + discard_rest_of_line(r)?; + } + return Ok(LineRead::TooLong); + } + *line = String::from_utf8(bytes).map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))?; + Ok(LineRead::Line) +} + +fn discard_rest_of_line(r: &mut impl BufRead) -> std::io::Result<()> { + loop { + let buf = r.fill_buf()?; + if buf.is_empty() { + return Ok(()); + } + if let Some(end) = buf.iter().position(|&b| b == b'\n') { + r.consume(end + 1); + return Ok(()); + } + let n = buf.len(); + r.consume(n); + } +} + +/// Counts live connections; a permit is released when dropped. +#[derive(Clone, Default)] +pub struct ConnectionLimiter(Arc); + +pub struct Permit(Arc); + +impl ConnectionLimiter { + pub fn try_acquire(&self, max: usize) -> Option { + self.0.fetch_update(Ordering::AcqRel, Ordering::Acquire, |n| (n < max).then_some(n + 1)).ok().map(|_| Permit(self.0.clone())) + } +} + +impl Drop for Permit { + fn drop(&mut self) { + self.0.fetch_sub(1, Ordering::AcqRel); + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn tokens() { + let a = generate_token().unwrap(); + assert_eq!(a.len(), 64); + assert_ne!(a, generate_token().unwrap()); + assert!(token_matches(&a, &a.clone())); + assert!(!token_matches(&a, "short")); + assert!(client_token(1, Some("too short".into())).is_err()); + assert!(client_token(1, Some(format!(" {a}\n"))).is_ok()); + } + + #[test] + fn oversized_lines_are_skipped() { + let input = format!("{}\n{{\"ok\":1}}\n", "x".repeat(MAX_REQUEST_BYTES + 10)); + let mut r = std::io::Cursor::new(input); + let mut line = String::new(); + assert!(matches!(read_bounded_line(&mut r, &mut line).unwrap(), LineRead::TooLong)); + assert!(matches!(read_bounded_line(&mut r, &mut line).unwrap(), LineRead::Line)); + assert_eq!(line, "{\"ok\":1}\n"); + assert!(matches!(read_bounded_line(&mut r, &mut line).unwrap(), LineRead::Eof)); + } + + #[test] + fn limiter_releases() { + let l = ConnectionLimiter::default(); + let p = l.try_acquire(1).unwrap(); + assert!(l.try_acquire(1).is_none()); + drop(p); + assert!(l.try_acquire(1).is_some()); + } +} diff --git a/crates/automation/src/server.rs b/crates/automation/src/server.rs new file mode 100644 index 00000000..fc3ef49f --- /dev/null +++ b/crates/automation/src/server.rs @@ -0,0 +1,499 @@ +//! The MCP server (rmcp). Tool names are `snake_case`; each tool maps to one control-channel +//! method (see [`crate::rpc`]), answered in process (headless) or by the running app (bridge). + +use std::sync::{Arc, Mutex, PoisonError}; + +use base64::Engine as _; +use rmcp::handler::server::router::tool::ToolRouter; +use rmcp::handler::server::wrapper::Parameters; +use rmcp::model::{CallToolResult, ContentBlock as Content}; +use rmcp::{ErrorData as McpError, ServerHandler, ServiceExt, tool, tool_handler, tool_router}; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use serde_json::{Value, json}; + +use crate::budgets::{MAX_PNG_SIDE, check_png, fit_png, json_text}; +use crate::headless::batch_reply; +use crate::security::MAX_BATCH_STEPS; +use crate::workspace::authorize_command; +use crate::{AutomationError, BridgeClient, Headless, bad}; + +/// Where tools run. +pub enum Backend { + /// An in-process session. + Headless(Arc>), + /// The running desktop app, over its control channel. + Bridge(Arc), +} + +#[derive(Clone)] +pub struct TexturecraftMcp { + backend: Arc, + tool_router: ToolRouter, +} + +// --------------------------------------------------------------------------------------------- +// Parameters (serialized back to JSON as the control method's params) + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct FilterParams { + /// Only commands whose id or label contains this text (case-insensitive). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub filter: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct RunParams { + /// Command id from `command_list`, e.g. `layer.add.fill`, `mask.add.black`, `edit.undo`. + pub id: String, + /// Command parameters (see the command's `params` doc). Omitted = defaults; never a dialog. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub params: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct BatchParams { + /// Commands run in order; the batch stops at the first error and reports its index. + pub steps: Vec, +} + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct NewParams { + /// Built-in mesh: material_ball (default), sphere, cube, rounded_cube, cylinder, torus, plane, crate. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mesh: Option, + /// Texture set resolution, a power of two from 128 to 8192 (default 1024). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resolution: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct OpenParams { + /// Forward-slash path relative to the read root. + pub path: String, +} + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct SaveParams { + /// Forward-slash path relative to the write root (`.tcraft` is appended if missing). Omit to + /// save to the project's own file. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct MaterialSaveParams { + /// `.tcmat` file relative to the write root (the extension is appended if missing). + pub path: String, + /// Layer or folder id (default: the selected layer). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub layer: Option, + /// Material name (default: the layer name). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct ImportParams { + /// Mesh file relative to the read root: .glb, .gltf (self-contained), .fbx, .dae, .obj, .ply, .stl. + pub path: String, + /// Texture set resolution (default 2048). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resolution: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct ExportParams { + /// Output folder relative to the write root (created if missing; `.` = the root). + pub dir: String, + /// Preset name from `command_run export.presets`, e.g. "glTF PBR Metal Roughness". + #[serde(default, skip_serializing_if = "Option::is_none")] + pub preset: Option, + /// Texture set index or "all" (default all). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ts: Option, + /// File format override: png, jpg, tga, tif, exr, … + #[serde(default, skip_serializing_if = "Option::is_none")] + pub format: Option, + /// none | dilation | dilationDefault | infinite + #[serde(default, skip_serializing_if = "Option::is_none")] + pub padding: Option, + /// Output size in pixels (power of two). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub size: Option, +} + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct BakeParams { + /// Texture set index or "all" (default: the active one). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ts: Option, + /// Bake resolution (power of two). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resolution: Option, + /// Mesh map ids, e.g. ["ambientOcclusion", "curvature"] (default: the set's bake settings). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub maps: Option>, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct StrokeParams { + /// Stroke points `[[x, y], …]` in viewport pixels (origin top-left), as in `viewport_render`. + pub points: Vec<[f64; 2]>, + /// Viewport size `[w, h]` the points refer to (default: the session viewport, 1280×800). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub viewport: Option<[f64; 2]>, + /// Base color: `[r, g, b]` linear 0..1 or `"#rrggbb"`. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub color: Option, + /// 0..1 + #[serde(default, skip_serializing_if = "Option::is_none")] + pub roughness: Option, + /// 0..1 + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metallic: Option, + /// -1..1 + #[serde(default, skip_serializing_if = "Option::is_none")] + pub height: Option, + /// Brush size 0..100 (Painter's scale). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub size: Option, + /// Brush hardness 0..100. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub hardness: Option, +} + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct RenderParams { + /// `3d` (default) or `2d` (the UV view of the active texture set). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub view: Option, + /// Pixels, 16..2048 (default: the session viewport, the space `paint_stroke` points use). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub width: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub height: Option, + /// Camera yaw in degrees for this render only. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub yaw: Option, + /// Camera pitch in degrees (-89..89) for this render only. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub pitch: Option, + /// Path trace the 3D view with this many samples per pixel (1..4096) instead of the + /// real-time viewport: slower, physically based light transport, no GPU needed. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub samples: Option, + /// Light bounces when path tracing (default 6). + #[serde(default, skip_serializing_if = "Option::is_none")] + pub bounces: Option, +} + +#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)] +pub struct ScreenshotParams { + /// `3d` (default) or `2d`. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub view: Option, +} + +#[derive(Debug, Deserialize, Serialize, JsonSchema)] +pub struct MenuParams { + /// Menu item id from the app's `ui.menu.list`, e.g. `file.save`, `viewport.frame`. + pub id: String, +} + +// --------------------------------------------------------------------------------------------- +// Results + +fn ok_json(v: &Value) -> CallToolResult { + match json_text(v) { + Ok(text) => CallToolResult::success(vec![Content::text(text)]), + Err(e) => fail(e), + } +} + +fn fail(e: impl std::fmt::Display) -> CallToolResult { + CallToolResult::error(vec![Content::text(e.to_string())]) +} + +fn to_result(r: Result) -> Result { + Ok(match r { + Ok(v) => ok_json(&v), + Err(e) => fail(e), + }) +} + +/// A `{width, height, png: base64}` reply (render or app screenshot) as image content. +fn image_result(r: Result, note: &str, refit: bool) -> Result { + let png = r.and_then(|v| { + let b64 = v.get("png").and_then(Value::as_str).ok_or_else(|| AutomationError::Other("the reply has no PNG".into()))?; + if !refit { + check_png(b64.len() / 4 * 3)?; + return Ok(b64.to_string()); + } + let bytes = base64::engine::general_purpose::STANDARD.decode(b64).map_err(|e| AutomationError::Other(format!("bad PNG data: {e}")))?; + Ok(base64::engine::general_purpose::STANDARD.encode(fit_png(bytes, MAX_PNG_SIDE)?)) + }); + Ok(match png { + Ok(b64) => CallToolResult::success(vec![Content::image(b64, "image/png"), Content::text(note.to_string())]), + Err(e) => fail(e), + }) +} + +fn params(p: &T) -> Value { + serde_json::to_value(p).unwrap_or(Value::Null) +} + +impl TexturecraftMcp { + pub fn headless(h: Headless) -> Self { + Self::with_backend(Backend::Headless(Arc::new(Mutex::new(h)))) + } + + pub fn bridge(client: BridgeClient) -> Self { + Self::with_backend(Backend::Bridge(Arc::new(client))) + } + + pub fn with_backend(backend: Backend) -> Self { + TexturecraftMcp { backend: Arc::new(backend), tool_router: Self::tool_router() } + } + + /// Serve MCP on stdin/stdout until the client disconnects. + pub async fn serve_stdio(self) -> Result<(), AutomationError> { + let running = self.serve(rmcp::transport::stdio()).await.map_err(|e| AutomationError::Other(format!("MCP start: {e}")))?; + running.waiting().await.map_err(|e| AutomationError::Other(e.to_string()))?; + Ok(()) + } + + fn is_bridge(&self) -> bool { + matches!(*self.backend, Backend::Bridge(_)) + } + + /// One control-channel method on the backend. + async fn call(&self, method: &str, p: Value) -> Result { + match &*self.backend { + Backend::Headless(h) => { + let (h, m) = (h.clone(), method.to_string()); + // A panicking command poisons the lock, but edits run on a document snapshot + // (`Session::edit`), so the session stays consistent: keep serving. + tokio::task::spawn_blocking(move || h.lock().unwrap_or_else(PoisonError::into_inner).handle(&m, &p)) + .await + .unwrap_or_else(|_| Err(AutomationError::Other(format!("internal error in `{method}`")))) + } + Backend::Bridge(b) => match method { + "command.run" => { + let id = p.get("id").and_then(Value::as_str).unwrap_or_default(); + authorize_command(id, p.get("params").unwrap_or(&Value::Null))?; + b.call(method, p).await + } + "project.save" if p.get("path").is_none() => b.call("ui.menu.invoke", json!({"id": "file.save"})).await, + "project.save" | "project.open" | "mesh.import" | "resource.import" | "material.save" | "material.load" | "textures.export" + | "command.batch" | "render" => { + Err(bad(format!("`{method}` with paths works in headless mode only: the running app reads and writes its own files (use ui_menu_invoke)"))) + } + _ => b.call(method, p).await, + }, + } + } + + async fn run(&self, id: &str, p: Value) -> Result { + self.call("command.run", json!({"id": id, "params": p})).await + } + + async fn bridge_only(&self, method: &str, p: Value) -> Result { + if self.is_bridge() { + self.call(method, p).await + } else { + Err(bad(format!( + "`{method}` needs the running app: start `texturecraft --control ` and run `texturecraft-cli mcp --bridge ` (headless renders: viewport_render)" + ))) + } + } + + async fn stroke(&self, p: StrokeParams) -> Result { + self.run("tool.paint", json!({})).await?; + if let Some(c) = p.color { + self.run("tool.material", json!({"channel": "baseColor", "color": c})).await?; + } + for (channel, v) in [("roughness", p.roughness), ("metallic", p.metallic), ("height", p.height)] { + if let Some(v) = v { + self.run("tool.material", json!({"channel": channel, "value": v})).await?; + } + } + if p.size.is_some() || p.hardness.is_some() { + self.run("tool.brush", json!({"size": p.size, "hardness": p.hardness})).await?; + } + self.run("tool.stroke", json!({"points": p.points, "viewport": p.viewport})).await + } +} + +// --------------------------------------------------------------------------------------------- +// Tools + +#[tool_router] +impl TexturecraftMcp { + #[tool(description = "The whole session as JSON: project, mesh, texture sets (resolution, channels, baked maps), the layer stack \ + top to bottom (fill sources, masks, effects, painted tile counts), tool, camera, display and history.")] + async fn session_inspect(&self) -> Result { + to_result(self.call("session.inspect", json!({})).await) + } + + #[tool(description = "List engine commands: id, label, menu path, shortcut, params doc and whether it can run now.")] + async fn command_list(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("command.list", params(&p)).await) + } + + #[tool(description = "Run an engine command by id with JSON params (see command_list). Runs with defaults, never opens a \ + dialog. Commands given host paths (file.open, file.save, resource.import, material.save, …) are disabled: use the \ + workspace tools (project_open, project_save, mesh_import, resource_import, material_save, material_load, textures_export).")] + async fn command_run(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("command.run", params(&p)).await) + } + + #[tool(description = "Run several commands in order: steps [{id, params}]. Stops at the first error. Returns {completed, \ + results, failed: {index, id, error} | null}; a failed batch is a tool error.")] + async fn command_batch(&self, Parameters(p): Parameters) -> Result { + if p.steps.len() > MAX_BATCH_STEPS { + return Ok(fail(format!("at most {MAX_BATCH_STEPS} steps per batch"))); + } + let reply = if self.is_bridge() { + let mut results = Vec::new(); + let mut failed = None; + for (i, s) in p.steps.iter().enumerate() { + match self.call("command.run", params(s)).await { + Ok(v) => results.push(v), + Err(e) => { + failed = Some((i, s.id.as_str(), e.to_string())); + break; + } + } + } + batch_reply(results, failed) + } else { + match self.call("command.batch", params(&p)).await { + Ok(v) => v, + Err(e) => return Ok(fail(e)), + } + }; + Ok(if reply["failed"].is_null() { ok_json(&reply) } else { fail(json_text(&reply).unwrap_or_else(|e| e.to_string())) }) + } + + #[tool(description = "Start a new project on a built-in mesh (one texture set per material, each with an empty paint layer). \ + Returns the session.")] + async fn project_new(&self, Parameters(p): Parameters) -> Result { + to_result(self.run("project.new", params(&p)).await) + } + + #[tool(description = "Open a .tcraft project or a mesh file (path relative to the read root). Returns the session.")] + async fn project_open(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("project.open", params(&p)).await) + } + + #[tool(description = "Save the project as .tcraft (path relative to the write root; omit to save to its own file).")] + async fn project_save(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("project.save", params(&p)).await) + } + + #[tool(description = "New project from a mesh file (path relative to the read root): one texture set per material. Returns \ + the session; import warnings are in the session log.")] + async fn mesh_import(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("mesh.import", params(&p)).await) + } + + #[tool(description = "Import an image (png, jpg, tga, tif, bmp, webp, exr, hdr; path relative to the read root) as a project \ + resource. Returns its name, for command_run layer.add.image {name} or tool.stencil {image}.")] + async fn resource_import(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("resource.import", params(&p)).await) + } + + #[tool(description = "Save a layer or folder (default: the selected one) as a smart material file (.tcmat) below the write root.")] + async fn material_save(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("material.save", params(&p)).await) + } + + #[tool(description = "Add a smart material from a .tcmat file (relative to the read root) above the selection. Returns its layer.")] + async fn material_load(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("material.load", params(&p)).await) + } + + #[tool(description = "Export textures with a preset into a folder relative to the write root. Returns the written files and \ + warnings.")] + async fn textures_export(&self, Parameters(p): Parameters) -> Result { + to_result(self.call("textures.export", params(&p)).await) + } + + #[tool(description = "Bake mesh maps (ambient occlusion, curvature, thickness, …) for generators and smart materials.")] + async fn bake(&self, Parameters(p): Parameters) -> Result { + to_result(self.run("bake.run", params(&p)).await) + } + + #[tool(description = "Paint a stroke with the paint tool on the selected layer (or its mask target): sets the brush material \ + (color, roughness, metallic, height) and size/hardness, then strokes through `points` in viewport pixels. See \ + viewport_render for where the mesh is.")] + async fn paint_stroke(&self, Parameters(p): Parameters) -> Result { + to_result(self.stroke(p).await) + } + + #[tool(description = "Headless: render the 3D view (or the 2D UV view) as a PNG image, up to 2048 px a side. Camera yaw/pitch \ + apply to this render only. In bridge mode use viewport_screenshot.")] + async fn viewport_render(&self, Parameters(p): Parameters) -> Result { + let note = format!("render {}", params(&p)); + image_result(self.call("render", params(&p)).await, ¬e, false) + } + + #[tool(description = "Bridge mode: PNG of the live app's 3D or 2D viewport.")] + async fn viewport_screenshot(&self, Parameters(p): Parameters) -> Result { + image_result(self.bridge_only("viewport.screenshot", params(&p)).await, "screenshot of the app viewport", true) + } + + #[tool(description = "Bridge mode: PNG of the whole app window (downscaled to 2048 px a side at most).")] + async fn ui_screenshot(&self) -> Result { + image_result(self.bridge_only("ui.screenshot", json!({})).await, "screenshot of the app window", true) + } + + #[tool(description = "Bridge mode: the app's UI state (panels, windows, mode, layout, viewport rect, toasts).")] + async fn ui_inspect(&self) -> Result { + to_result(self.bridge_only("ui.inspect", json!({})).await) + } + + #[tool(description = "Bridge mode: activate a menu item by id like a click (may open a window). ui.menu.list lists ids.")] + async fn ui_menu_invoke(&self, Parameters(p): Parameters) -> Result { + to_result(self.bridge_only("ui.menu.invoke", params(&p)).await) + } +} + +#[tool_handler( + router = self.tool_router, + name = "texturecraft", + instructions = "TextureCraft 3D texture painter. Every edit is an engine command: `command_list` shows ids and params, \ + `command_run`/`command_batch` run them. Start with `project_new` (built-in mesh) or `project_open`/`mesh_import` (files \ + relative to the workspace root), check your work with `session_inspect` and `viewport_render`, paint with `paint_stroke`, \ + bake with `bake`, then `project_save` (.tcraft) and `textures_export`. Undo: command_run edit.undo." +)] +impl ServerHandler for TexturecraftMcp {} + +#[cfg(test)] +mod tests { + use super::*; + use crate::headless::Filesystem; + + #[tokio::test(flavor = "multi_thread")] + async fn a_panic_does_not_wedge_the_session() { + let s = texturecraft_engine::Session::new_project("t", texturecraft_engine::geom::primitives::cube(2.0), "builtin:cube", None, 128).unwrap(); + let mcp = TexturecraftMcp::headless(Headless::new(s, Filesystem::Denied)); + let Backend::Headless(h) = &*mcp.backend else { panic!("headless") }; + let h2 = h.clone(); + let _ = tokio::task::spawn_blocking(move || { + let _g = h2.lock().unwrap(); + panic!("boom") + }) + .await; + assert!(mcp.call("session.inspect", json!({})).await.is_ok()); + } + + #[test] + fn oversized_replies_become_errors() { + let r = ok_json(&json!("x".repeat(crate::budgets::MAX_RESPONSE_BYTES))); + assert_eq!(r.is_error, Some(true)); + } +} diff --git a/crates/automation/src/workspace.rs b/crates/automation/src/workspace.rs new file mode 100644 index 00000000..2015c090 --- /dev/null +++ b/crates/automation/src/workspace.rs @@ -0,0 +1,259 @@ +//! Capability-based file access for untrusted automation paths (MCP, `serve`). +//! +//! Roots are trusted launch-time configuration (`--read-root`, `--write-root`); request paths +//! are untrusted, forward-slash relative paths resolved by `cap-std` beneath the held directory +//! handle, so `..`, absolute paths, drive prefixes and symlink or junction escapes all fail. + +use std::io::{Read, Write}; +use std::path::{Path, PathBuf}; +use std::sync::Arc; + +use cap_std::ambient_authority; +use cap_std::fs::{Dir, OpenOptions}; +use serde_json::Value; + +use crate::{AutomationError, bad}; + +/// Largest file read through automation (the mesh importer's own limit). +pub const MAX_READ_BYTES: u64 = texturecraft_engine::formats::mesh_import::MAX_MESH_FILE_BYTES; + +/// Separate read and write directory capabilities. A missing authority fails closed. +#[derive(Clone, Default)] +pub struct AuthorizedWorkspace { + read: Option>, + write: Option>, +} + +impl AuthorizedWorkspace { + pub fn new(read_root: Option<&Path>, write_root: Option<&Path>) -> Result { + Ok(Self { read: open_root(read_root, "read")?, write: open_root(write_root, "write")? }) + } + + /// Read one regular file below the read root. + pub fn read(&self, path: &str) -> Result, AutomationError> { + let rel = relative_path(path)?; + let root = self.read.as_ref().ok_or_else(|| denied("read"))?; + let file = root.open(&rel).map_err(|e| file_error("read", path, e))?; + let meta = file.metadata().map_err(|e| file_error("read", path, e))?; + if !meta.is_file() { + return Err(bad(format!("not a regular file: `{path}`"))); + } + if meta.len() > MAX_READ_BYTES { + return Err(bad(format!("`{path}` is {} bytes (limit {MAX_READ_BYTES})", meta.len()))); + } + let mut bytes = Vec::new(); + file.take(MAX_READ_BYTES).read_to_end(&mut bytes).map_err(|e| file_error("read", path, e))?; + Ok(bytes) + } + + /// Create or replace one file below the write root: a temporary file beside the target, + /// synced and renamed over it. The parent directory must exist. + pub fn write(&self, path: &str, bytes: &[u8]) -> Result<(), AutomationError> { + let rel = relative_path(path)?; + let root = self.write.as_ref().ok_or_else(|| denied("write"))?; + let leaf = rel.file_name().map(|n| n.to_string_lossy().into_owned()).unwrap_or_default(); + let tmp = rel.with_file_name(format!(".{leaf}.{}.tmp", std::process::id())); + let mut options = OpenOptions::new(); + options.write(true).create_new(true); + let res = root + .open_with(&tmp, &options) + .and_then(|mut f| { + f.write_all(bytes)?; + f.sync_all() + }) + .and_then(|()| root.rename(&tmp, root, &rel)); + if let Err(e) = res { + let _ = root.remove_file(&tmp); + return Err(file_error("write", path, e)); + } + Ok(()) + } + + /// Create a directory (and its parents) below the write root. + pub fn create_dir_all(&self, path: &str) -> Result<(), AutomationError> { + let rel = relative_path(path)?; + let root = self.write.as_ref().ok_or_else(|| denied("write"))?; + root.create_dir_all(&rel).map_err(|e| file_error("create", path, e)) + } +} + +fn open_root(path: Option<&Path>, authority: &str) -> Result>, AutomationError> { + let Some(path) = path else { return Ok(None) }; + if path.as_os_str().is_empty() { + return Err(bad(format!("the automation {authority} root is empty"))); + } + let dir = + Dir::open_ambient_dir(path, ambient_authority()).map_err(|e| AutomationError::Io(format!("cannot open {authority} root `{}`: {e}", path.display())))?; + Ok(Some(Arc::new(dir))) +} + +/// Validate an untrusted path before any I/O (cap-std then confines resolution to the root). +pub fn relative_path(raw: &str) -> Result { + let reject = |why: &str| bad(format!("path rejected ({why}): `{raw}`; use a forward-slash path relative to the workspace root")); + if raw.is_empty() { + return Err(reject("empty")); + } + if raw.contains('\\') { + return Err(reject("backslash")); + } + if raw.starts_with('/') { + return Err(reject("absolute")); + } + if raw.contains(':') { + return Err(reject("drive, scheme or stream prefix")); + } + for c in raw.split('/') { + if c.is_empty() || c == "." || c == ".." { + return Err(reject("empty, `.` or `..` component")); + } + if c.ends_with(['.', ' ']) || c.chars().any(char::is_control) { + return Err(reject("component ends in a dot or space, or has control characters")); + } + let stem = c.split('.').next().unwrap_or(c).to_ascii_uppercase(); + let device = matches!(stem.as_str(), "CON" | "PRN" | "AUX" | "NUL" | "CONIN$" | "CONOUT$") + || (stem.len() == 4 && (stem.starts_with("COM") || stem.starts_with("LPT")) && stem.ends_with(|ch: char| ch.is_ascii_digit())); + if device { + return Err(reject("reserved device name")); + } + } + Ok(PathBuf::from(raw)) +} + +fn denied(authority: &str) -> AutomationError { + bad(format!("file access is not granted: no {authority} root (start the server with --{authority}-root )")) +} + +fn file_error(op: &str, path: &str, e: std::io::Error) -> AutomationError { + AutomationError::Io(format!("{op} `{path}` failed: {e}")) +} + +/// Engine commands that take host paths (`file.open`, `file.exportTextures`, `resource.import`, +/// `material.save`, …) would bypass the workspace: automation clients use the workspace-scoped +/// methods instead. Any command given a `path` or `dir` is refused, and every `file.*` command +/// but `file.close` and `file.removeUnused` (`file.save` even without `path`: a headless session's path is +/// workspace-relative, not a host path; `file.reimportMesh` without `path` re-reads the +/// embedded mesh). +pub fn authorize_command(id: &str, params: &Value) -> Result<(), AutomationError> { + let has_path = ["path", "dir"].iter().any(|k| params.get(k).is_some_and(|v| !v.is_null())); + let ok = match id { + "file.close" | "file.removeUnused" => true, + "file.reimportMesh" => !has_path, + _ => !id.starts_with("file.") && !has_path, + }; + if ok { + Ok(()) + } else { + Err(bad(format!( + "`{id}` with host paths is disabled for automation; use project_open, project_save, mesh_import, resource_import, material_save, material_load or textures_export" + ))) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + + fn roots(name: &str) -> (PathBuf, PathBuf, AuthorizedWorkspace) { + let base = std::env::temp_dir().join(format!("tc-ws-{}-{name}", std::process::id())); + let _ = std::fs::remove_dir_all(&base); + let (inside, outside) = (base.join("inside"), base.join("outside")); + std::fs::create_dir_all(&inside).unwrap(); + std::fs::create_dir_all(&outside).unwrap(); + let ws = AuthorizedWorkspace::new(Some(&inside), Some(&inside)).unwrap(); + (inside, outside, ws) + } + + #[test] + fn reads_and_writes_stay_in_the_root() { + let (inside, _, ws) = roots("valid"); + std::fs::write(inside.join("a.txt"), b"canary").unwrap(); + assert_eq!(ws.read("a.txt").unwrap(), b"canary"); + ws.create_dir_all("out/deep").unwrap(); + ws.write("out/deep/b.txt", b"one").unwrap(); + ws.write("out/deep/b.txt", b"two").unwrap(); + assert_eq!(std::fs::read(inside.join("out/deep/b.txt")).unwrap(), b"two"); + let leftovers = std::fs::read_dir(inside.join("out/deep")).unwrap().count(); + assert_eq!(leftovers, 1, "no temporary files left behind"); + assert!(ws.write("missing/c.txt", b"x").is_err(), "parent must exist"); + } + + #[test] + fn escapes_and_malformed_paths_are_rejected() { + let (_, outside, ws) = roots("reject"); + let abs = outside.join("x.txt").display().to_string(); + for p in ["", "/abs", "../x", "a/../../x", "a\\b", "C:/x", "a//b", "./a", "a:b", "NUL", "con.txt", "x/COM1.log", "dot.", abs.as_str()] { + assert!(ws.read(p).is_err(), "read accepted {p:?}"); + assert!(ws.write(p, b"x").is_err(), "write accepted {p:?}"); + assert!(ws.create_dir_all(p).is_err(), "mkdir accepted {p:?}"); + } + } + + #[test] + fn authorities_are_separate_and_fail_closed() { + let (inside, _, _) = roots("separate"); + std::fs::write(inside.join("r.txt"), b"r").unwrap(); + let ro = AuthorizedWorkspace::new(Some(&inside), None).unwrap(); + assert!(ro.read("r.txt").is_ok()); + assert!(ro.write("w.txt", b"x").is_err()); + let none = AuthorizedWorkspace::default(); + assert!(none.read("r.txt").is_err()); + } + + #[cfg(unix)] + #[test] + fn symlink_escape_is_rejected() { + let (inside, outside, ws) = roots("symlink"); + std::fs::write(outside.join("secret.txt"), b"s").unwrap(); + std::os::unix::fs::symlink(&outside, inside.join("link")).unwrap(); + assert!(ws.read("link/secret.txt").is_err()); + assert!(ws.write("link/new.txt", b"x").is_err()); + assert!(!outside.join("new.txt").exists()); + } + + #[cfg(windows)] + #[test] + fn junction_escape_is_rejected() { + let (inside, outside, ws) = roots("junction"); + std::fs::write(outside.join("secret.txt"), b"s").unwrap(); + let link = inside.join("junction"); + let made = std::process::Command::new("cmd.exe").args(["/D", "/C", "mklink", "/J"]).arg(&link).arg(&outside).output(); + if !made.is_ok_and(|o| o.status.success()) { + eprintln!("skipping: cannot create a junction"); + return; + } + assert!(ws.read("junction/secret.txt").is_err()); + assert!(ws.write("junction/new.txt", b"x").is_err()); + assert!(!outside.join("new.txt").exists()); + let _ = std::fs::remove_dir(link); + } + + #[test] + fn path_commands_are_denied() { + for id in ["file.open", "file.new", "file.save", "file.saveAs", "file.saveCopy", "file.exportTextures"] { + assert!(authorize_command(id, &json!({})).is_err(), "{id}"); + } + for id in ["resource.import", "material.save", "material.load", "anything.new"] { + assert!(authorize_command(id, &json!({"path": "/etc/x"})).is_err(), "{id}"); + assert!(authorize_command(id, &json!({"dir": "/etc"})).is_err(), "{id}"); + } + assert!(authorize_command("file.reimportMesh", &json!({"path": "/etc/x.obj"})).is_err()); + assert!(authorize_command("file.reimportMesh", &json!({})).is_ok()); + assert!(authorize_command("file.close", &json!({})).is_ok()); + assert!(authorize_command("layer.add.fill", &json!({"color": "#ff0000", "path": null})).is_ok()); + } + + /// Every registry command documenting a host path must be classified (fails when a new + /// path-taking command is added without an automation policy). + #[test] + fn registry_path_params_are_classified() { + let probe = json!({"path": "/outside/probe", "dir": "/outside", "mesh": "/outside/m.obj"}); + let open: Vec<&str> = texturecraft_engine::command_specs() + .iter() + .filter(|c| c.params.contains("path") || c.params.contains("{dir")) + .filter(|c| authorize_command(c.id, &probe).is_ok()) + .map(|c| c.id) + .collect(); + assert!(open.is_empty(), "path-taking commands need an automation policy: {open:?}"); + } +} diff --git a/crates/automation/tests/agent_tasks.rs b/crates/automation/tests/agent_tasks.rs new file mode 100644 index 00000000..a202285e --- /dev/null +++ b/crates/automation/tests/agent_tasks.rs @@ -0,0 +1,377 @@ +//! Acceptance: an agent completes realistic texturing tasks over MCP, checked only through MCP +//! results (plus the exported files on disk), and the server holds its security line. + +use base64::Engine as _; +use rmcp::model::{CallToolRequestParams, CallToolResult, ClientConfig}; +use rmcp::service::RunningService; +use rmcp::{ClientHandler, RoleClient, ServiceExt}; +use serde_json::{Value, json}; +use texturecraft_automation::{AuthorizedWorkspace, BridgeClient, Filesystem, Headless, TexturecraftMcp, rpc}; + +#[derive(Clone, Default)] +struct Client; +impl ClientHandler for Client { + fn get_info(&self) -> ClientConfig { + ClientConfig::default() + } +} + +type Conn = RunningService; +type Server = tokio::task::JoinHandle<()>; + +async fn connect(fs: Filesystem) -> (Conn, Server) { + let (s, c) = tokio::io::duplex(1 << 22); + let session = texturecraft_engine::Session::new_project("t", texturecraft_engine::geom::primitives::cube(2.0), "builtin:cube", None, 128).unwrap(); + let server = tokio::spawn(async move { + if let Ok(running) = TexturecraftMcp::headless(Headless::new(session, fs)).serve(s).await { + let _ = running.waiting().await; + } + }); + (Client.serve(c).await.expect("client init"), server) +} + +/// Close the client and wait for the server, so its directory handles are released before the +/// test removes the folder (Windows refuses otherwise). +async fn shutdown(c: Conn, server: Server) { + c.cancel().await.unwrap(); + server.await.unwrap(); +} + +fn tmp(name: &str) -> std::path::PathBuf { + let d = std::env::temp_dir().join(format!("tc-agent-{}-{name}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(&d).unwrap(); + d +} + +fn workspace(root: &std::path::Path) -> Filesystem { + Filesystem::Workspace(AuthorizedWorkspace::new(Some(root), Some(root)).unwrap()) +} + +fn text(r: &CallToolResult) -> String { + r.content.iter().filter_map(|c| c.as_text()).map(|t| t.text.clone()).collect::>().join("\n") +} + +async fn call(c: &Conn, name: &str, args: Value) -> Result { + let mut p = CallToolRequestParams::new(name.to_owned()); + if let Value::Object(m) = args { + p = p.with_arguments(m); + } + c.call_tool(p).await +} + +/// Call a tool and parse its JSON result, failing the test on a tool error. +async fn tool(c: &Conn, name: &str, args: Value) -> Value { + let r = call(c, name, args).await.expect("transport"); + assert_ne!(r.is_error, Some(true), "{name} failed: {}", text(&r)); + serde_json::from_str(&text(&r)).unwrap_or(Value::String(text(&r))) +} + +/// The tool's error text (the test fails if the tool succeeded). +async fn tool_err(c: &Conn, name: &str, args: Value) -> String { + match call(c, name, args).await { + Ok(r) => { + assert_eq!(r.is_error, Some(true), "{name} should fail: {}", text(&r)); + text(&r) + } + Err(e) => e.to_string(), + } +} + +async fn run(c: &Conn, id: &str, params: Value) -> Value { + tool(c, "command_run", json!({"id": id, "params": params})).await +} + +async fn inspect(c: &Conn) -> Value { + tool(c, "session_inspect", json!({})).await +} + +fn top(s: &Value) -> &Value { + &s["layers"][0] +} + +/// Painted tiles of a paint layer's base color. +fn painted(layer: &Value) -> u64 { + layer["painted"].as_array().into_iter().flatten().filter(|p| p["channel"] == "baseColor").map(|p| p["tiles"].as_u64().unwrap()).sum() +} + +/// Sort `painted` lists by channel: their order follows a hash map in the engine. +fn canon(v: &mut Value) { + match v { + Value::Object(m) => { + if let Some(Value::Array(p)) = m.get_mut("painted") { + p.sort_by(|a, b| a["channel"].as_str().cmp(&b["channel"].as_str())); + } + m.values_mut().for_each(canon); + } + Value::Array(a) => a.iter_mut().for_each(canon), + _ => {} + } +} + +#[tokio::test(flavor = "multi_thread")] +async fn agent_completes_texturing_tasks() { + let dir = tmp("tasks"); + let (c, server) = connect(workspace(&dir)).await; + + // 1. New project on a built-in mesh. + let s = tool(&c, "project_new", json!({"mesh": "sphere", "resolution": 256, "name": "Agent"})).await; + assert_eq!(s["project"], "Agent"); + assert!(s["mesh"]["triangles"].as_u64().unwrap() > 1000, "task 1: {}", s["mesh"]); + assert_eq!(s["textureSets"][0]["resolution"], 256); + assert_eq!(top(&s)["kind"], "paint"); + + // 2. Fill layer with a color and roughness. + run(&c, "layer.add.fill", json!({"color": [0.2, 0.4, 0.6], "roughness": 0.2})).await; + let s = inspect(&c).await; + let fill = &top(&s)["fill"]["sources"]; + assert_eq!(top(&s)["kind"], "fill", "task 2: {}", top(&s)); + assert!((fill["roughness"]["uniform"][0].as_f64().unwrap() - 0.2).abs() < 1e-6, "task 2: {fill}"); + assert!((fill["baseColor"]["uniform"][2].as_f64().unwrap() - 0.6).abs() < 1e-6, "task 2: {fill}"); + + // 3. Bake, then a black mask with an edge-wear generator. + tool(&c, "bake", json!({"resolution": 128})).await; + run(&c, "mask.add.black", json!({})).await; + run(&c, "effect.add.generator", json!({"generator": "edgeWear", "level": 0.4})).await; + let s = inspect(&c).await; + assert!(!s["textureSets"][0]["baked"]["maps"].as_array().unwrap().is_empty(), "task 3: {}", s["textureSets"]); + let mask = &top(&s)["mask"]; + assert_eq!(mask["background"], "black", "task 3: {mask}"); + assert_eq!(mask["effects"][0]["kind"], "Generator", "task 3: {mask}"); + assert_eq!(mask["effects"][0]["generator"]["type"], "EdgeWear", "task 3: {mask}"); + assert!((mask["effects"][0]["generator"]["level"].as_f64().unwrap() - 0.4).abs() < 1e-6); + + // 4. Paint a red stroke across the middle of the view on a new paint layer. + run(&c, "layer.add.paint", json!({"name": "Ink"})).await; + let r = tool(&c, "paint_stroke", json!({"points": [[600, 400], [680, 400]], "color": [1, 0, 0], "roughness": 0.9, "size": 10})).await; + assert!(r["stamps"].as_u64().unwrap() > 1, "task 4: {r}"); + let s = inspect(&c).await; + assert_eq!(top(&s)["name"], "Ink"); + let tiles = painted(top(&s)); + assert!(tiles > 0, "task 4: {}", top(&s)); + + // 5. Undo and redo the stroke. + run(&c, "edit.undo", json!({})).await; + assert_eq!(painted(top(&inspect(&c).await)), 0, "task 5: undo"); + run(&c, "edit.redo", json!({})).await; + assert_eq!(painted(top(&inspect(&c).await)), tiles, "task 5: redo"); + + // 6. A smart material lands as a folder of layers. + run(&c, "material.apply", json!({"material": "iron_rusted"})).await; + let s = inspect(&c).await; + assert_eq!(top(&s)["kind"], "group", "task 6: {}", top(&s)); + assert_eq!(top(&s)["name"], "Iron Rusted"); + assert!(!top(&s)["children"].as_array().unwrap().is_empty()); + + // 7. Export with the glTF preset. + let r = tool(&c, "textures_export", json!({"dir": "tex", "preset": "glTF PBR Metal Roughness"})).await; + let files: Vec<&str> = r["files"].as_array().unwrap().iter().map(|f| f.as_str().unwrap()).collect(); + assert!(files.iter().any(|f| f.contains("BaseColor")), "task 7: {r}"); + assert!(files.iter().any(|f| f.contains("OcclusionRoughnessMetallic")), "task 7: {r}"); + for f in &files { + assert!(std::fs::metadata(dir.join(f)).unwrap().len() > 100, "task 7: {f}"); + } + + std::fs::create_dir_all(dir.join("lib")).unwrap(); + // 11. Import an image resource and use it as a fill layer (kept by save/reopen below). + image::RgbaImage::from_fn(32, 32, |x, y| image::Rgba([(x * 8) as u8, (y * 8) as u8, 90, 255])).save(dir.join("grunge.png")).unwrap(); + let r = tool(&c, "resource_import", json!({"path": "grunge.png"})).await; + let name = r["name"].as_str().unwrap().to_string(); + run(&c, "layer.add.image", json!({"name": name})).await; + let s = inspect(&c).await; + // The selected layer is the material's folder, so the new layer goes inside it. + let layer = &top(&s)["children"][0]; + assert_eq!(layer["fill"]["sources"]["baseColor"]["image"], name.as_str(), "task 11: {layer}"); + + // 12. Save the rust folder as a smart material file and load it back as a new folder. + let rust = top(&s)["id"].clone(); + let saved = tool(&c, "material_save", json!({"path": "lib/rust", "layer": rust, "name": "My Rust"})).await; + assert_eq!(saved["path"], "lib/rust.tcmat", "task 12: parent folders must exist: {saved}"); + let loaded = tool(&c, "material_load", json!({"path": "lib/rust.tcmat"})).await["layer"].clone(); + // Added above the selection: inside the selected folder. + let s = inspect(&c).await; + let copy = top(&s)["children"].as_array().unwrap().iter().find(|l| l["id"] == loaded).cloned().unwrap_or_default(); + assert_eq!(copy["name"], "My Rust", "task 12: {}", top(&s)); + assert_eq!(copy["kind"], "group", "task 12: {copy}"); + + // 8. Save, reopen and compare. + let before = inspect(&c).await; + let saved = tool(&c, "project_save", json!({"path": "agent"})).await; + assert_eq!(saved["path"], "agent.tcraft"); + tool(&c, "project_new", json!({"mesh": "cube", "resolution": 128})).await; + let after = tool(&c, "project_open", json!({"path": "agent.tcraft"})).await; + let (mut before, mut after) = (before, after); + canon(&mut before); + canon(&mut after); + for k in ["project", "mesh", "textureSets", "layers"] { + assert_eq!(before[k], after[k], "task 8: `{k}` differs after reopening"); + } + assert_eq!(after["path"], "agent.tcraft"); + assert_eq!(after["modified"], false); + + // 9. Render a PNG (skipped without a GPU adapter). + match call(&c, "viewport_render", json!({"width": 320, "height": 200, "yaw": 30})).await.unwrap() { + r if r.is_error == Some(true) => { + assert!(text(&r).contains("cannot render"), "task 9: {}", text(&r)); + eprintln!("skipping render: {}", text(&r)); + } + r => { + let img = r.content.iter().find_map(|c| c.as_image()).expect("image content"); + assert_eq!(img.mime_type, "image/png"); + let png = base64::engine::general_purpose::STANDARD.decode(&img.data).unwrap(); + let px = image::load_from_memory(&png).unwrap().into_rgba8(); + assert_eq!(px.dimensions(), (320, 200)); + assert_ne!(px.get_pixel(160, 100), px.get_pixel(2, 2), "task 9: the mesh differs from the background"); + } + } + + // 10. A batch stops at the failing step and says which. + let err = tool_err(&c, "command_batch", json!({"steps": [{"id": "layer.add.paint"}, {"id": "no.such.command"}, {"id": "layer.add.paint"}]})).await; + let v: Value = serde_json::from_str(&err).unwrap(); + assert_eq!(v["completed"], 1, "task 10: {v}"); + assert_eq!(v["failed"]["index"], 1, "task 10: {v}"); + + shutdown(c, server).await; + std::fs::remove_dir_all(&dir).unwrap(); +} + +const TOOLS: [&str; 19] = [ + "resource_import", + "material_save", + "material_load", + "session_inspect", + "command_list", + "command_run", + "command_batch", + "project_new", + "project_open", + "project_save", + "mesh_import", + "textures_export", + "bake", + "paint_stroke", + "viewport_render", + "viewport_screenshot", + "ui_screenshot", + "ui_inspect", + "ui_menu_invoke", +]; + +#[tokio::test(flavor = "multi_thread")] +async fn paths_outside_the_workspace_are_rejected() { + let base = tmp("security"); + let (root, outside) = (base.join("root"), base.join("outside")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&outside).unwrap(); + let (c, server) = connect(workspace(&root)).await; + tool(&c, "project_save", json!({"path": "ok.tcraft"})).await; + std::fs::copy(root.join("ok.tcraft"), outside.join("secret.tcraft")).unwrap(); + let abs = outside.join("secret.tcraft").display().to_string(); + for path in ["../outside/secret.tcraft", abs.as_str(), "C:/secret.tcraft", "/etc/passwd", "a/../../outside/secret.tcraft", "a\\..\\x.tcraft"] { + tool_err(&c, "project_open", json!({"path": path})).await; + tool_err(&c, "mesh_import", json!({"path": path})).await; + tool_err(&c, "resource_import", json!({"path": path})).await; + tool_err(&c, "material_load", json!({"path": path})).await; + tool_err(&c, "material_save", json!({"path": path})).await; + tool_err(&c, "project_save", json!({"path": path})).await; + } + let e = tool_err(&c, "textures_export", json!({"dir": "../outside/tex"})).await; + assert!(e.contains("rejected"), "{e}"); + assert!(!outside.join("tex").exists()); + for (id, p) in [ + ("file.open", json!({"path": abs})), + ("file.saveAs", json!({"path": abs})), + ("file.save", json!({})), + ("file.exportTextures", json!({"dir": "x"})), + ("resource.import", json!({"path": abs})), + ("material.save", json!({"path": abs})), + ] { + let e = tool_err(&c, "command_run", json!({"id": id, "params": p})).await; + assert!(e.contains("disabled for automation"), "{id}: {e}"); + } + shutdown(c, server).await; + + // Without roots there is no file access at all. + let (c, server) = connect(Filesystem::Denied).await; + assert!(tool_err(&c, "project_save", json!({"path": "x.tcraft"})).await.contains("not granted")); + assert!(tool_err(&c, "project_open", json!({"path": "x.tcraft"})).await.contains("not granted")); + shutdown(c, server).await; + std::fs::remove_dir_all(&base).unwrap(); +} + +#[tokio::test(flavor = "multi_thread")] +async fn every_tool_rejects_junk_without_panicking() { + let (c, server) = connect(Filesystem::Denied).await; + let listed: Vec = c.list_all_tools().await.unwrap().into_iter().map(|t| t.name.to_string()).collect(); + for t in TOOLS { + assert!(listed.iter().any(|l| l == t), "missing tool {t}"); + } + let wrong_types = json!({ + "id": 7, "params": "x", "filter": 3, "steps": "x", "mesh": 1, "resolution": "big", "name": [], "path": 5, "dir": false, + "preset": 1, "ts": "nope", "format": 1, "padding": 2, "size": -1, "maps": "x", "points": "x", "viewport": 1, "color": "nope", + "roughness": "x", "metallic": "x", "height": "x", "hardness": "x", "view": 5, "width": -5, "yaw": "x", "pitch": "x" + }); + let hostile = json!({ + "id": "no.such", "params": {"layer": 1e300}, "filter": "\u{0}", "steps": [{"id": "x"}], "mesh": "../../etc", "resolution": 3, "name": "", + "path": "../../x", "dir": "../x", "preset": "nope", "ts": 99, "format": "zzz", "padding": "?", "size": 3, "maps": ["nope"], "points": [], + "viewport": [0, 0], "color": "#zzzzzz", "roughness": 1e30, "metallic": -1e30, "height": 1e30, "hardness": 1e30, "view": "4d", + "width": 99999, "yaw": 1e30, "pitch": -1e30 + }); + for (n, junk) in [Value::Null, wrong_types, hostile].into_iter().enumerate() { + for t in &listed { + // No arguments means defaults for these (a real project, a real bake): not junk. + if n == 0 && ["project_new", "bake", "viewport_render"].contains(&t.as_str()) { + continue; + } + let may_succeed = t == "session_inspect" || (t == "command_list" && n != 1); + let r = call(&c, t, junk.clone()).await; + let failed = r.as_ref().map_or(true, |r| r.is_error == Some(true)); + assert!(failed || may_succeed, "{t} accepted junk #{n}: {:?}", r.map(|r| text(&r))); + } + } + // Still serving. + assert!(inspect(&c).await["layers"].is_array()); + shutdown(c, server).await; +} + +/// Bridge mode against a control-protocol server (the headless one speaks the app's protocol). +#[tokio::test(flavor = "multi_thread")] +async fn bridge_mode_forwards_to_a_control_server() { + let session = texturecraft_engine::Session::new_project("t", texturecraft_engine::geom::primitives::cube(2.0), "builtin:cube", None, 128).unwrap(); + let h = std::sync::Arc::new(std::sync::Mutex::new(Headless::new(session, Filesystem::Denied))); + let token = "bridge-test-token-0123456789".to_string(); + let (tx, rx) = std::sync::mpsc::channel(); + let t = token.clone(); + std::thread::spawn(move || rpc::serve_tcp(0, h, t, |a| tx.send(a.port()).unwrap())); + let port = rx.recv().unwrap(); + + let (s, c) = tokio::io::duplex(1 << 20); + let server = tokio::spawn(async move { + if let Ok(running) = TexturecraftMcp::bridge(BridgeClient::new(port, token)).serve(s).await { + let _ = running.waiting().await; + } + }); + let c = Client.serve(c).await.unwrap(); + run(&c, "layer.add.fill", json!({"roughness": 0.7})).await; + run(&c, "layer.add.paint", json!({})).await; + tool(&c, "paint_stroke", json!({"points": [[640, 400]], "color": "#ff0000"})).await; + let s = inspect(&c).await; + assert_eq!(s["layers"][1]["kind"], "fill"); + assert!(painted(&s["layers"][0]) > 0, "{}", s["layers"][0]); + let b = tool(&c, "command_batch", json!({"steps": [{"id": "layer.add.paint"}, {"id": "edit.undo"}]})).await; + assert_eq!(b["completed"], 2); + assert!(tool_err(&c, "command_run", json!({"id": "file.open", "params": {"path": "/etc/passwd"}})).await.contains("disabled")); + assert!(tool_err(&c, "project_open", json!({"path": "x.tcraft"})).await.contains("headless mode only")); + assert!(tool_err(&c, "ui_inspect", json!({})).await.contains("running app")); + shutdown(c, server).await; + + let (s, c) = tokio::io::duplex(1 << 20); + let server = tokio::spawn(async move { + if let Ok(running) = TexturecraftMcp::bridge(BridgeClient::new(port, "wrong-token-0123456789".into())).serve(s).await { + let _ = running.waiting().await; + } + }); + let c = Client.serve(c).await.unwrap(); + assert!(tool_err(&c, "session_inspect", json!({})).await.contains("authentication failed")); + shutdown(c, server).await; +} diff --git a/crates/bake/Cargo.toml b/crates/bake/Cargo.toml new file mode 100644 index 00000000..9b893562 --- /dev/null +++ b/crates/bake/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "texturecraft-bake" +description = "TextureCraft mesh-map baking: high-poly transfer (cage, match by name) of normal, height, AO, bent normals, curvature, thickness, ID, opacity, color, position and world-space maps" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-geom = { workspace = true } +texturecraft-texel = { workspace = true } +rayon = { workspace = true } +thiserror = { workspace = true } diff --git a/crates/bake/README.md b/crates/bake/README.md new file mode 100644 index 00000000..38b89fe1 --- /dev/null +++ b/crates/bake/README.md @@ -0,0 +1,22 @@ +# texturecraft-bake + +CPU mesh-map baker: `bake(&BakeRequest, &Progress) -> BakeOutput` turns one texture set's UV layout into float maps (0..1, rows top → bottom), supersampled, padded and deterministic. All requested maps are evaluated in one pass per texel (rayon over rows, no per-texel allocation). + +With a high poly (`BakeRequest::high`, every high-definition mesh appended into one), each low-poly sample casts one ray from the cage (`BakeRequest::cage`, same triangles as the low poly) or from `max_frontal` in front of the surface back through it to `max_rear` behind (both relative to the bounding-box diagonal), along normals averaged over hard edges when `average_normals` is on. With `BakeMatch::ByMeshName`, a low-poly part only sees high-poly parts of the same name once `low_suffix` / `high_suffix` are removed (`wheel_low` ↔ `wheel_high`, case-insensitive). Every map but position and world-space direction then reads the high-poly surface that ray found (AO, thickness and bent normals cast against the high poly). + +| Map | Meaning | Range | +| --- | --- | --- | +| Ambient occlusion | How open the surface is to the sky (cosine-weighted rays, distance falloff) | 0 occluded … 1 open | +| Bent normals | Mean unoccluded direction of the AO rays, world space | packed ·0.5+0.5 | +| Thickness | Mean distance through the mesh along inward rays, relative to the max distance | 0 thin … 1 thick | +| Curvature | Mean curvature of the position-welded mesh, or (`curvature_from_normal`) the divergence of the baked normal map | 0 concave … 0.5 flat … 1 convex | +| Normal | Tangent-space normal from the high poly (OpenGL, +Y up); flat without one | packed ·0.5+0.5 | +| Height | High-poly offset along the ray, scaled by frontal + rear distance | 0 rear … 0.5 surface … 1 front | +| World normal | Shading normal in world space | packed ·0.5+0.5 | +| Position | Position inside the low-poly bounding box, per axis | 0 … 1 | +| ID | A distinct hue per mesh part (submesh) | RGB 0 … 1 | +| Opacity | 1 where the high poly was found (times its vertex alpha), 0 where the ray missed | 0 … 1 | +| Color map | The high poly's vertex colors (white without) | RGB 0 … 1 | +| World space direction | Facing ratio towards `direction` | 0 away … 0.5 perpendicular … 1 facing | + +Uncovered texels beyond the padding get `BakedMap::neutral` values. Benchmark (2K, the 7 default maps, per-map breakdown): `cargo test -p texturecraft-bake --release -- --ignored --nocapture bench`. diff --git a/crates/bake/src/lib.rs b/crates/bake/src/lib.rs new file mode 100644 index 00000000..d76ec85f --- /dev/null +++ b/crates/bake/src/lib.rs @@ -0,0 +1,236 @@ +//! # texturecraft-bake +//! +//! CPU mesh-map baking. [`bake`] rasterizes one texture set's UV layout with a supersampled +//! [`UvGBuffer`], evaluates every requested [`BakedMap`] per sample in one pass (rayon over rows, +//! BVH ray casts for the high-poly transfer, AO, bent normals and thickness), box-downsamples, +//! and pads the UV islands with [`DilationMap`]. With a high poly, every map but position and +//! world-space direction reads the high-poly surface found along the cage / frontal-rear ray. +//! Sampling is deterministic, so the same request always gives the same pixels. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +mod maps; +#[cfg(test)] +mod tests; + +use std::collections::BTreeMap; +use std::sync::atomic::{AtomicBool, AtomicU32, AtomicU64, Ordering::Relaxed}; + +use rayon::prelude::*; +use texturecraft_core::{BakeSettings, BakedMap}; +use texturecraft_geom::glam::Vec2; +use texturecraft_geom::{Bvh, Mesh, UvGBuffer}; +use texturecraft_texel::DilationMap; + +/// Largest accepted output resolution (per axis). +pub const MAX_RESOLUTION: u32 = 8192; +/// Largest accepted ray count per texel (AO, thickness). +pub const MAX_RAYS: u32 = 4096; +/// Supersampled texels rasterized at once: bounds the G-buffer at ~200 MB for any resolution × AA. +const STRIP_TEXELS: usize = 1 << 24; + +/// Shared progress / cancellation flag of a running bake. +#[derive(Debug, Default)] +pub struct Progress { + /// Basis points, 0..=10_000 (all requested maps done). + pub done: AtomicU32, + pub cancel: AtomicBool, +} + +impl Progress { + pub fn new() -> Self { + Self::default() + } + + /// Completed fraction, 0..=1. + pub fn fraction(&self) -> f32 { + self.done.load(Relaxed).min(10_000) as f32 / 10_000.0 + } + + /// Ask the bake to stop; it returns [`BakeError::Cancelled`] at the next row. + pub fn cancel(&self) { + self.cancel.store(true, Relaxed); + } +} + +/// A high-poly source mesh (all high-definition meshes appended into one). +#[derive(Clone, Copy, Debug)] +pub struct HighPoly<'a> { + pub mesh: &'a Mesh, + pub bvh: &'a Bvh, +} + +/// One texture set to bake. +#[derive(Clone, Copy, Debug)] +pub struct BakeRequest<'a> { + pub mesh: &'a Mesh, + /// BVH of the whole low-poly mesh: every material occludes. + pub bvh: &'a Bvh, + pub material: usize, + pub settings: &'a BakeSettings, + pub high: Option>, + /// Cage: the low poly inflated (same triangles); transfer rays start on it. + pub cage: Option<&'a Mesh>, +} + +/// Baked maps: row-major `resolution × resolution`, `BakedMap::components()` floats per texel, +/// rows top → bottom (y = v·H, as [`UvGBuffer`]). +#[derive(Clone, Debug, PartialEq)] +pub struct BakeOutput { + pub resolution: u32, + pub maps: BTreeMap>, +} + +#[derive(Debug, thiserror::Error)] +pub enum BakeError { + #[error("bake cancelled")] + Cancelled, + #[error("invalid bake request: {0}")] + Invalid(String), +} + +fn validate(req: &BakeRequest) -> Result<(), BakeError> { + let s = req.settings; + let invalid = |m: String| Err(BakeError::Invalid(m)); + if s.resolution == 0 || s.resolution > MAX_RESOLUTION { + return invalid(format!("resolution {} is not in 1..={MAX_RESOLUTION}", s.resolution)); + } + if ![1, 2, 4, 8].contains(&s.antialiasing) { + return invalid(format!("antialiasing {} is not 1, 2, 4 or 8", s.antialiasing)); + } + if s.rays == 0 || s.rays > MAX_RAYS { + return invalid(format!("ray count {} is not in 1..={MAX_RAYS}", s.rays)); + } + if !(s.max_distance.is_finite() && s.max_distance > 0.0) { + return invalid(format!("max distance {} must be positive", s.max_distance)); + } + if !s.curvature_strength.is_finite() { + return invalid("curvature strength is not finite".into()); + } + if !(s.direction.iter().all(|c| c.is_finite()) && s.direction.iter().any(|c| *c != 0.0)) { + return invalid(format!("direction {:?} must be finite and non-zero", s.direction)); + } + if !(s.max_frontal.is_finite() && s.max_frontal >= 0.0 && s.max_rear.is_finite() && s.max_rear >= 0.0) { + return invalid(format!("frontal/rear distances {}/{} must be finite and ≥ 0", s.max_frontal, s.max_rear)); + } + req.mesh.validate().map_err(|e| BakeError::Invalid(e.to_string()))?; + if req.material >= req.mesh.materials.len().max(1) { + return invalid(format!("material {} out of range ({} materials)", req.material, req.mesh.materials.len())); + } + if let Some(h) = &req.high { + h.mesh.validate().map_err(|e| BakeError::Invalid(format!("high poly: {e}")))?; + } + if let Some(c) = req.cage { + c.validate().map_err(|e| BakeError::Invalid(format!("cage: {e}")))?; + if c.indices.len() != req.mesh.indices.len() { + return invalid(format!("the cage has {} triangles, the low poly {}", c.triangle_count(), req.mesh.triangle_count())); + } + } + Ok(()) +} + +/// `vec![value; n]` that reports allocation failure instead of aborting. +fn alloc(n: usize, value: T) -> Result, BakeError> { + let mut v = Vec::new(); + v.try_reserve_exact(n).map_err(|_| BakeError::Invalid(format!("out of memory allocating {n} texels")))?; + v.resize(n, value); + Ok(v) +} + +/// Bake the maps in `req.settings.maps` for one material of the low-poly mesh. +pub fn bake(req: &BakeRequest, progress: &Progress) -> Result { + bake_in_strips(req, progress, STRIP_TEXELS) +} + +fn bake_in_strips(req: &BakeRequest, progress: &Progress, strip_texels: usize) -> Result { + validate(req)?; + let s = req.settings; + let (res, aa) = (s.resolution as usize, s.antialiasing as usize); + let ctx = maps::Ctx::new(req)?; + progress.done.store(0, Relaxed); + + // Curvature from the normal map needs the normal map: baked alongside when not requested. + let from_normal = s.curvature_from_normal && s.maps.contains(&BakedMap::Curvature); + let mut maps: Vec = s.maps.iter().copied().collect(); + if from_normal && !maps.contains(&BakedMap::Normal) { + maps.push(BakedMap::Normal); + } + let mut bufs = maps.iter().map(|m| alloc(res * res * m.components(), 0.0f32)).collect::, _>>()?; + let mut covered = alloc(res * res, false)?; + let total = res.max(1) as u64; + let rows_done = AtomicU64::new(0); + let strip_err = || BakeError::Invalid("strip out of range".into()); + + // Rasterize in horizontal strips of the supersampled image: a strip's G-buffer is built from + // UVs shifted so that y = v*H - strip_top, which keeps memory bounded at 8K x 8 AA. + let sw = res * aa; + let strip_rows = (strip_texels / (sw * aa)).max(1).min(res); + let mut strip_mesh = Mesh { indices: req.mesh.indices.clone(), submeshes: req.mesh.submeshes.clone(), ..Mesh::default() }; + for y0 in (0..res).step_by(strip_rows) { + let rows = strip_rows.min(res - y0); + let (sy0, sh) = (y0 * aa, rows * aa); + strip_mesh.uvs = req.mesh.uvs.iter().map(|uv| Vec2::new(uv.x, (uv.y * sw as f32 - sy0 as f32) / sh as f32)).collect(); + let g = UvGBuffer::new(&strip_mesh, req.material, sw as u32, sh as u32); + let subsamples = |r: usize, x: usize| (0..aa * aa).map(move |k| (r * aa + k / aa) * sw + x * aa + k % aa); + + // Per output row: its coverage and its slice of every map. + let cov = covered.get_mut(y0 * res..(y0 + rows) * res).ok_or_else(strip_err)?; + let mut out_rows: Vec<(&mut [bool], Vec<&mut [f32]>)> = cov.chunks_mut(res).map(|c| (c, Vec::with_capacity(maps.len()))).collect(); + for (m, data) in maps.iter().zip(bufs.iter_mut()) { + let comps = m.components(); + let strip = data.get_mut(y0 * res * comps..(y0 + rows) * res * comps).ok_or_else(strip_err)?; + for ((_, row), chunk) in out_rows.iter_mut().zip(strip.chunks_mut(res * comps)) { + row.push(chunk); + } + } + out_rows.par_iter_mut().enumerate().try_for_each(|(r, (cov, row))| { + if progress.cancel.load(Relaxed) { + return Err(BakeError::Cancelled); + } + let mut sample = [[0.0f32; 3]; BakedMap::ALL.len()]; + for x in 0..res { + let mut acc = [[0.0f32; 3]; BakedMap::ALL.len()]; + let mut n = 0u32; + for i in subsamples(r, x) { + let (Some(surf), Some(&bary)) = (g.surface(req.mesh, i), g.bary.get(i)) else { continue }; + // Seed by the global supersample index so strips don't change the noise. + ctx.evaluate(&maps, &surf, bary, (sy0 * sw + i) as u64, &mut sample); + for (a, v) in acc.iter_mut().zip(&sample) { + a.iter_mut().zip(v).for_each(|(a, v)| *a += v); + } + n += 1; + } + if let Some(c) = cov.get_mut(x) { + *c = n > 0; + } + for ((m, dst), a) in maps.iter().zip(row.iter_mut()).zip(&acc) { + let comps = m.components(); + let mean = a.map(|a| a / n.max(1) as f32); + let v = if n == 0 || mean.iter().any(|v| !v.is_finite()) { m.neutral() } else { mean }; + if let Some(d) = dst.get_mut(x * comps..(x + 1) * comps) { + d.iter_mut().zip(v).for_each(|(d, v)| *d = v); + } + } + } + let d = rows_done.fetch_add(1, Relaxed) + 1; + progress.done.fetch_max((d.saturating_mul(10_000) / total).min(10_000) as u32, Relaxed); + Ok(()) + })?; + } + + let mut out: BTreeMap> = maps.into_iter().zip(bufs).collect(); + if from_normal { + let normal = if s.maps.contains(&BakedMap::Normal) { out.get(&BakedMap::Normal).cloned() } else { out.remove(&BakedMap::Normal) }; + if let (Some(normal), Some(curv)) = (normal, out.get_mut(&BakedMap::Curvature)) { + maps::curvature_from_normal(&normal, &covered, res, s.curvature_strength, curv); + } + } + if s.dilation > 0 { + let pad = DilationMap::new(&covered, s.resolution, s.resolution, Some(s.dilation)); + for (m, data) in out.iter_mut() { + pad.apply(data, m.components()); + } + } + progress.done.store(10_000, Relaxed); + Ok(BakeOutput { resolution: s.resolution, maps: out }) +} diff --git a/crates/bake/src/maps.rs b/crates/bake/src/maps.rs new file mode 100644 index 00000000..2b069e9f --- /dev/null +++ b/crates/bake/src/maps.rs @@ -0,0 +1,356 @@ +//! Per-sample evaluation of every baked map. + +use std::collections::HashMap; +use std::f32::consts::TAU; +use std::ops::{Add, Mul}; + +use texturecraft_core::{BakeMatch, BakeSettings, BakedMap}; +use texturecraft_geom::glam::{Vec3, Vec4}; +use texturecraft_geom::{Bvh, Mesh, Surface, surface_at}; + +use crate::{BakeError, BakeRequest}; + +/// Triangles that belong to no submesh (never matched by name). +const NO_KEY: u32 = u32::MAX; + +/// A mesh the bakers sample: the low poly, or the high poly detail is transferred from. +struct Source<'a> { + mesh: &'a Mesh, + bvh: &'a Bvh, + /// Per-vertex curvature offset from 0.5 (empty unless mesh curvature is baked). + curvature: Vec, + /// Submesh (part) index of each triangle. + part: Vec, + /// Match key of each triangle ([`BakeMatch::ByMeshName`] only, else empty). + key: Vec, +} + +impl<'a> Source<'a> { + fn new(mesh: &'a Mesh, bvh: &'a Bvh, s: &BakeSettings, diag: f32, suffix: &str, keys: &mut HashMap) -> Source<'a> { + let mesh_curvature = s.maps.contains(&BakedMap::Curvature) && !s.curvature_from_normal; + let tris = mesh.triangle_count(); + let mut part = vec![NO_KEY; tris]; + for (i, sm) in mesh.submeshes.iter().enumerate() { + let (a, b) = ((sm.start / 3) as usize, (sm.start.saturating_add(sm.count) / 3) as usize); + part.get_mut(a.min(b)..b.min(tris)).unwrap_or_default().fill(i as u32); + } + let key = match s.matching { + BakeMatch::Always => Vec::new(), + BakeMatch::ByMeshName => { + let ids: Vec = mesh.submeshes.iter().map(|sm| match_key(&sm.name, suffix, keys)).collect(); + part.iter().map(|p| ids.get(*p as usize).copied().unwrap_or(NO_KEY)).collect() + } + }; + Source { mesh, bvh, curvature: if mesh_curvature { vertex_curvature(mesh, diag, s.curvature_strength) } else { Vec::new() }, part, key } + } + + fn curvature(&self, s: &Surface, bary: [f32; 2]) -> f32 { + (0.5 + interpolate(self.mesh, &self.curvature, s.tri, bary).unwrap_or(0.0)).clamp(0.0, 1.0) + } + + fn color(&self, s: &Surface, bary: [f32; 2]) -> Vec4 { + interpolate(self.mesh, &self.mesh.colors, s.tri, bary).unwrap_or(Vec4::ONE) + } +} + +/// The part name without its low / high suffix (case-insensitive), as a shared id. +fn match_key(name: &str, suffix: &str, keys: &mut HashMap) -> u32 { + let name = name.trim().to_lowercase(); + let suffix = suffix.trim().to_lowercase(); + let base = name.strip_suffix(suffix.as_str()).filter(|_| !suffix.is_empty()).unwrap_or(&name).to_string(); + let next = keys.len() as u32; + *keys.entry(base).or_insert(next) +} + +/// Barycentric interpolation of a per-vertex attribute over triangle `tri`. +fn interpolate + Add>(mesh: &Mesh, v: &[T], tri: u32, [b1, b2]: [f32; 2]) -> Option { + let [a, b, c] = mesh.tri(tri as usize)?; + Some(*v.get(a)? * (1.0 - b1 - b2) + *v.get(b)? * b1 + *v.get(c)? * b2) +} + +/// The high-poly surface found for a low-poly sample, and where along the ray. +struct Transfer { + surf: Surface, + bary: [f32; 2], + /// Hit distance from the ray origin, and the origin's distance in front of the low poly. + t: f32, + front: f32, +} + +/// Everything a sample needs, computed once per bake. +pub(crate) struct Ctx<'a> { + low: Source<'a>, + high: Option>, + cage: Option<&'a Mesh>, + /// Normals averaged over coincident vertices (rays don't split at hard edges); empty when off. + ray_normals: Vec, + lo: Vec3, + extent: Vec3, + /// Ray offset off the surface. + eps: f32, + /// AO / thickness ray length. + dmax: f32, + frontal: f32, + rear: f32, + rays: u32, + direction: Vec3, + curvature_from_normal: bool, + occlusion: bool, +} + +impl<'a> Ctx<'a> { + pub(crate) fn new(req: &BakeRequest<'a>) -> Result, BakeError> { + let s = req.settings; + let (lo, hi) = req.mesh.bounds(); + let diag = (hi - lo).length().max(1e-6); + if !diag.is_finite() { + return Err(BakeError::Invalid("mesh bounds are too large".into())); + } + let mut keys = HashMap::new(); + let low = Source::new(req.mesh, req.bvh, s, diag, &s.low_suffix, &mut keys); + let high = req.high.map(|h| Source::new(h.mesh, h.bvh, s, diag, &s.high_suffix, &mut keys)); + let ray_normals = match s.average_normals && high.is_some() { + true => { + let (weld, _, nrm) = welded(req.mesh, diag); + weld.iter().map(|w| nrm.get(*w as usize).copied().unwrap_or(Vec3::Y)).collect() + } + false => Vec::new(), + }; + Ok(Ctx { + low, + high, + cage: req.cage, + ray_normals, + lo, + extent: hi - lo, + eps: 1e-4 * diag, + dmax: s.max_distance * diag, + frontal: s.max_frontal * diag, + rear: s.max_rear * diag, + rays: s.rays, + direction: Vec3::from(s.direction).try_normalize().unwrap_or(Vec3::Y), + curvature_from_normal: s.curvature_from_normal, + occlusion: s.maps.contains(&BakedMap::AmbientOcclusion) || s.maps.contains(&BakedMap::BentNormal), + }) + } + + /// Every map of `maps` at one low-poly surface sample, into `out` (scalars fill all three). + pub(crate) fn evaluate(&self, maps: &[BakedMap], s: &Surface, bary: [f32; 2], seed: u64, out: &mut [[f32; 3]]) { + let transfer = self.high.as_ref().and_then(|h| self.transfer(h, s, bary)); + // The surface the bakers read: the high poly where a ray found it, else the low poly. + let (src, surf, sb) = match (&self.high, &transfer) { + (Some(h), Some(tr)) => (h, &tr.surf, tr.bary), + _ => (&self.low, s, bary), + }; + let missed = self.high.is_some() && transfer.is_none(); + let (ao, bent) = if self.occlusion { self.occlusion(src, surf, seed) } else { (1.0, surf.nrm) }; + for (&map, o) in maps.iter().zip(out.iter_mut()) { + *o = match map { + BakedMap::AmbientOcclusion => [ao; 3], + BakedMap::BentNormal => pack(bent), + BakedMap::Thickness => [self.thickness(src, surf, seed); 3], + BakedMap::Curvature if self.curvature_from_normal => [0.5; 3], + BakedMap::Curvature => [src.curvature(surf, sb); 3], + BakedMap::WorldNormal => pack(surf.nrm), + BakedMap::Position => ((surf.pos - self.lo) / self.extent.max(Vec3::splat(1e-20))).clamp(Vec3::ZERO, Vec3::ONE).to_array(), + BakedMap::Id => material_color(src.part.get(surf.tri as usize).copied().unwrap_or(0) as usize), + BakedMap::Normal => transfer.as_ref().map_or(map.neutral(), |tr| tangent_normal(s, tr.surf.nrm)), + BakedMap::Height => [transfer.as_ref().map_or(0.5, |tr| (0.5 + (tr.front - tr.t) / (tr.front + self.rear)).clamp(0.0, 1.0)); 3], + BakedMap::Opacity if missed => [0.0; 3], + BakedMap::Opacity => [src.color(surf, sb).w; 3], + BakedMap::ColorMap if missed => map.neutral(), + BakedMap::ColorMap => src.color(surf, sb).truncate().to_array(), + BakedMap::WorldDirection => [surf.nrm.dot(self.direction) * 0.5 + 0.5; 3], + }; + } + } + + /// Cast from the cage (or `frontal` in front of the low poly) back through it to `rear` + /// behind, and take the closest high-poly surface (of the matching part). + fn transfer(&self, high: &Source, s: &Surface, bary: [f32; 2]) -> Option { + let n = interpolate(self.low.mesh, &self.ray_normals, s.tri, bary).and_then(Vec3::try_normalize).unwrap_or(s.nrm); + let cage = self.cage.and_then(|c| interpolate(c, &c.positions, s.tri, bary)).map(|c| s.pos - c).filter(|v| v.length() > self.eps); + let (o, d, front) = match cage { + Some(v) => (s.pos - v, v.normalize(), v.length()), + None => (s.pos + n * self.frontal, -n, self.frontal), + }; + let tmax = front + self.rear; + let hit = match self.low.key.get(s.tri as usize) { + Some(&k) => high.bvh.closest_filtered(o, d, tmax, &|t| k != NO_KEY && high.key.get(t as usize) == Some(&k))?, + None => high.bvh.closest(o, d, tmax)?, + }; + let surf = surface_at(high.mesh, hit.tri, hit.u, hit.v)?; + Some(Transfer { surf, bary: [hit.u, hit.v], t: hit.t, front }) + } + + /// Geometric normal flipped to the side of the shading normal. + fn geo(s: &Surface) -> Vec3 { + if s.geo_nrm.dot(s.nrm) < 0.0 { -s.geo_nrm } else { s.geo_nrm } + } + + /// Call `f` with cosine-weighted directions around `axis` (Hammersley points with a + /// per-sample Cranley–Patterson rotation), skipping those below the plane of `geo`. + fn directions(&self, axis: Vec3, geo: Vec3, seed: u64, mut f: impl FnMut(Vec3)) { + let h = splitmix64(seed); + let (r1, r2) = ((h >> 40) as f32 / (1u64 << 24) as f32, ((h >> 16) & 0xff_ffff) as f32 / (1u64 << 24) as f32); + let (t, b) = axis.any_orthonormal_pair(); + for i in 0..self.rays { + let u1 = (i as f32 / self.rays as f32 + r1).fract(); + let u2 = (i.reverse_bits() as f32 / 4_294_967_296.0 + r2).fract(); + let (phi, r) = (TAU * u1, u2.sqrt()); + let d = t * (r * phi.cos()) + b * (r * phi.sin()) + axis * (1.0 - u2).max(0.0).sqrt(); + if d.dot(geo) > 0.0 { + f(d); + } + } + } + + /// Ambient occlusion (1 = open, 0 = fully occluded) and the bent normal (mean unoccluded + /// direction), from one set of rays. + fn occlusion(&self, src: &Source, s: &Surface, seed: u64) -> (f32, Vec3) { + let geo = Self::geo(s); + let o = s.pos + geo * self.eps; + let (mut occ, mut bent, mut n) = (0.0f32, Vec3::ZERO, 0u32); + self.directions(s.nrm, geo, seed, |d| { + let v = src.bvh.closest(o, d, self.dmax).map_or(0.0, |h| 1.0 - (h.t / self.dmax).powi(2)); + occ += v; + bent += d * (1.0 - v); + n += 1; + }); + let ao = if n == 0 { 1.0 } else { (1.0 - occ / n as f32).clamp(0.0, 1.0) }; + (ao, bent.try_normalize().unwrap_or(s.nrm)) + } + + /// Mean distance through the mesh along inward rays, relative to the max distance (1 = thick). + fn thickness(&self, src: &Source, s: &Surface, seed: u64) -> f32 { + let geo = Self::geo(s); + let o = s.pos - geo * self.eps; + let (mut sum, mut n) = (0.0f32, 0u32); + self.directions(-s.nrm, -geo, seed, |d| { + sum += src.bvh.closest(o, d, self.dmax).map_or(self.dmax, |h| h.t); + n += 1; + }); + if n == 0 { 1.0 } else { (sum / n as f32 / self.dmax).clamp(0.0, 1.0) } + } +} + +/// A unit vector packed to 0..1. +fn pack(v: Vec3) -> [f32; 3] { + (v * 0.5 + 0.5).clamp(Vec3::ZERO, Vec3::ONE).to_array() +} + +/// `n` in the tangent space of low-poly sample `s` (OpenGL: +Y up the image), packed to 0..1. +fn tangent_normal(s: &Surface, n: Vec3) -> [f32; 3] { + let z = s.nrm; + let t = (s.tangent.truncate() - z * z.dot(s.tangent.truncate())).try_normalize().unwrap_or_else(|| z.any_orthonormal_vector()); + let b = z.cross(t) * s.tangent.w; + pack(Vec3::new(t.dot(n), b.dot(n), z.dot(n))) +} + +/// Curvature from a baked tangent-space normal map: the divergence of its XY over `radius` +/// texels (convex = above 0.5). Writes covered texels of `out` (one float per texel). +pub(crate) fn curvature_from_normal(normal: &[f32], covered: &[bool], res: usize, strength: f32, out: &mut [f32]) { + use rayon::prelude::*; + let r = (res / 512).max(1); + let n = |x: usize, y: usize, c: usize, fallback: f32| match covered.get(y * res + x) { + Some(true) => normal.get((y * res + x) * 3 + c).copied().unwrap_or(fallback), + _ => fallback, + }; + out.par_chunks_mut(res).enumerate().for_each(|(y, row)| { + for (x, v) in row.iter_mut().enumerate() { + if covered.get(y * res + x) != Some(&true) { + continue; + } + let (cx, cy) = (n(x, y, 0, 0.5), n(x, y, 1, 0.5)); + let (l, r_) = (n(x.saturating_sub(r), y, 0, cx), if x + r < res { n(x + r, y, 0, cx) } else { cx }); + let (u, d) = (n(x, y.saturating_sub(r), 1, cy), if y + r < res { n(x, y + r, 1, cy) } else { cy }); + // Image rows run down while +Y (OpenGL) points up: convex bumps tilt +Y above. + *v = (0.5 + strength * ((r_ - l) + (u - d))).clamp(0.0, 1.0); + } + }); +} + +/// Position-welded copy of `mesh` (UV seams and hard edges share neighbours): the weld id of +/// every vertex, welded positions and their averaged normals. +fn welded(mesh: &Mesh, diag: f32) -> (Vec, Vec, Vec) { + let q = diag * 1e-5; + let mut ids: HashMap<[i64; 3], u32> = HashMap::new(); + let (mut pos, mut nrm) = (Vec::new(), Vec::::new()); + let weld: Vec = mesh + .positions + .iter() + .zip(&mesh.normals) + .map(|(p, n)| { + let key = [p.x, p.y, p.z].map(|c| (c / q).round() as i64); + let id = *ids.entry(key).or_insert_with(|| { + pos.push(*p); + nrm.push(Vec3::ZERO); + (pos.len() - 1) as u32 + }); + if let Some(acc) = nrm.get_mut(id as usize) { + *acc += *n; + } + id + }) + .collect(); + let nrm = nrm.into_iter().map(|n| n.try_normalize().unwrap_or(Vec3::ZERO)).collect(); + (weld, pos, nrm) +} + +/// Per-vertex curvature offset `−k · avg_edge · strength`, where `k` is the mean of +/// `n·(p_j − p_i)/|p_j − p_i|²` over the 1-ring of the welded mesh. Convex edges give a +/// positive offset. +fn vertex_curvature(mesh: &Mesh, diag: f32, strength: f32) -> Vec { + let q = diag * 1e-5; + let (weld, pos, nrm) = welded(mesh, diag); + let (mut ksum, mut kcnt) = (vec![0.0f32; pos.len()], vec![0u32; pos.len()]); + let (mut edge_sum, mut edge_cnt) = (0.0f64, 0u64); + for t in mesh.indices.chunks_exact(3) { + for (a, b) in [(0, 1), (1, 2), (2, 0), (1, 0), (2, 1), (0, 2)] { + let (Some(&wa), Some(&wb)) = (t.get(a).and_then(|v| weld.get(*v as usize)), t.get(b).and_then(|v| weld.get(*v as usize))) else { continue }; + let (Some(pa), Some(pb), Some(na)) = (pos.get(wa as usize), pos.get(wb as usize), nrm.get(wa as usize)) else { continue }; + let d = *pb - *pa; + let l2 = d.length_squared(); + if wa == wb || l2 <= q * q { + continue; + } + if let (Some(k), Some(c)) = (ksum.get_mut(wa as usize), kcnt.get_mut(wa as usize)) { + *k += na.dot(d) / l2; + *c += 1; + } + edge_sum += f64::from(l2.sqrt()); + edge_cnt += 1; + } + } + let scale = (edge_sum / edge_cnt.max(1) as f64) as f32 * strength; + weld.iter() + .map(|w| { + let i = *w as usize; + let k = ksum.get(i).copied().unwrap_or(0.0) / kcnt.get(i).copied().unwrap_or(0).max(1) as f32; + if k.is_finite() { -k * scale } else { 0.0 } + }) + .collect() +} + +/// A well-separated hue per part (golden-ratio steps around the HSV wheel). +fn material_color(part: usize) -> [f32; 3] { + let h = ((part as f64 * 0.618_033_988_75 + 0.05).fract() * 6.0) as f32; + let (s, v) = (0.7f32, 0.95f32); + let f = h.fract(); + let (p, q, t) = (v * (1.0 - s), v * (1.0 - s * f), v * (1.0 - s * (1.0 - f))); + match h as u32 { + 0 => [v, t, p], + 1 => [q, v, p], + 2 => [p, v, t], + 3 => [p, q, v], + 4 => [t, p, v], + _ => [v, p, q], + } +} + +fn splitmix64(x: u64) -> u64 { + let mut z = x.wrapping_add(0x9e37_79b9_7f4a_7c15); + z = (z ^ (z >> 30)).wrapping_mul(0xbf58_476d_1ce4_e5b9); + z = (z ^ (z >> 27)).wrapping_mul(0x94d0_49bb_1331_11eb); + z ^ (z >> 31) +} diff --git a/crates/bake/src/tests.rs b/crates/bake/src/tests.rs new file mode 100644 index 00000000..74a54025 --- /dev/null +++ b/crates/bake/src/tests.rs @@ -0,0 +1,423 @@ +use std::sync::atomic::Ordering::Relaxed; + +use texturecraft_core::BakeMatch; +use texturecraft_geom::glam::{Vec2, Vec3, Vec4}; +use texturecraft_geom::primitives; + +use super::*; + +fn settings(res: u32, maps: &[BakedMap]) -> BakeSettings { + BakeSettings { resolution: res, dilation: 0, rays: 64, maps: maps.iter().copied().collect(), ..BakeSettings::default() } +} + +fn run(mesh: &Mesh, s: &BakeSettings) -> Result { + let bvh = Bvh::new(mesh); + bake(&BakeRequest { mesh, bvh: &bvh, material: 0, settings: s, high: None, cage: None }, &Progress::new()) +} + +/// Values of `map` (first component) at texels the UV layout covers, with their surface positions. +fn covered_values(mesh: &Mesh, out: &BakeOutput, map: BakedMap) -> Vec<(Vec3, f32)> { + let res = out.resolution; + let g = UvGBuffer::new(mesh, 0, res, res); + let data = &out.maps[&map]; + (0..(res * res) as usize).filter_map(|i| g.surface(mesh, i).map(|s| (s.pos, data[i * map.components()]))).collect() +} + +fn mean(v: impl Iterator) -> f32 { + let (s, n) = v.fold((0.0, 0), |(s, n), x| (s + x, n + 1)); + assert!(n > 0, "no samples"); + s / n as f32 +} + +fn quad() -> Mesh { + Mesh::from_parts( + vec![Vec3::new(-1.0, 0.0, -1.0), Vec3::new(1.0, 0.0, -1.0), Vec3::new(1.0, 0.0, 1.0), Vec3::new(-1.0, 0.0, 1.0)], + Some(vec![Vec3::Y; 4]), + vec![Vec2::new(0.0, 0.0), Vec2::new(1.0, 0.0), Vec2::new(1.0, 1.0), Vec2::new(0.0, 1.0)], + vec![0, 2, 1, 0, 3, 2], + "Quad", + ) + .unwrap() +} + +#[test] +fn open_quad_is_unoccluded() { + let m = quad(); + let out = run(&m, &settings(32, &[BakedMap::AmbientOcclusion])).unwrap(); + let ao = covered_values(&m, &out, BakedMap::AmbientOcclusion); + assert!(ao.iter().all(|(_, v)| *v > 0.999), "{:?}", ao.iter().map(|v| v.1).fold(1.0f32, f32::min)); +} + +#[test] +fn inside_of_a_closed_box_is_occluded() { + let mut m = primitives::cube(2.0); + for t in m.indices.chunks_exact_mut(3) { + t.swap(1, 2); + } + for n in &mut m.normals { + *n = -*n; + } + m.compute_tangents(); + let s = BakeSettings { max_distance: 4.0, ..settings(48, &[BakedMap::AmbientOcclusion]) }; + let out = run(&m, &s).unwrap(); + let ao = mean(covered_values(&m, &out, BakedMap::AmbientOcclusion).into_iter().map(|v| v.1)); + assert!(ao < 0.3, "{ao}"); +} + +#[test] +fn thin_slab_is_thinner_than_a_block() { + let thick = |m: &Mesh| mean(covered_values(m, &run(m, &settings(48, &[BakedMap::Thickness])).unwrap(), BakedMap::Thickness).into_iter().map(|v| v.1)); + let slab = thick(&primitives::rounded_box(Vec3::new(1.0, 0.05, 1.0), 0.0)); + let block = thick(&primitives::cube(2.0)); + assert!(slab < 0.4 && block > 0.6, "slab {slab}, block {block}"); +} + +#[test] +fn sphere_curvature_is_nearly_constant() { + let m = primitives::sphere(1.0, 64, 32); + let out = run(&m, &settings(64, &[BakedMap::Curvature])).unwrap(); + let c: Vec = covered_values(&m, &out, BakedMap::Curvature).into_iter().map(|v| v.1).collect(); + let (lo, hi) = c.iter().fold((1.0f32, 0.0f32), |(lo, hi), v| (lo.min(*v), hi.max(*v))); + assert!(lo >= 0.5 && hi < 0.6 && hi - lo < 0.03, "{lo}..{hi}"); +} + +/// Bevel / edge texels (two coordinates near the half extent) are convex-bright; face centres +/// stay mid-grey. +fn check_box_curvature(m: &Mesh, edge: f32) { + let s = BakeSettings { dilation: 4, ..settings(128, &[BakedMap::Curvature]) }; + let c = covered_values(m, &run(m, &s).unwrap(), BakedMap::Curvature); + let near = |p: Vec3, t: f32| p.abs().to_array().iter().filter(|c| **c > t).count(); + let edges: Vec = c.iter().filter(|(p, _)| near(*p, edge) >= 2).map(|v| v.1).collect(); + let faces: Vec = c.iter().filter(|(p, _)| near(*p, 0.5) == 1).map(|v| v.1).collect(); + assert!(!edges.is_empty() && !faces.is_empty()); + let min_edge = edges.iter().copied().fold(1.0, f32::min); + assert!(min_edge > 0.55, "edge min {min_edge}"); + assert!(faces.iter().all(|v| (0.45..=0.55).contains(v)), "face {:?}", faces.iter().copied().fold((1.0f32, 0.0f32), |(a, b), v| (a.min(v), b.max(v)))); +} + +#[test] +fn rounded_box_bevels_are_convex() { + check_box_curvature(&primitives::rounded_box(Vec3::ONE, 0.15), 0.9); +} + +#[test] +fn cube_edges_are_convex() { + check_box_curvature(&primitives::cube(2.0), 0.97); +} + +#[test] +fn two_runs_are_identical_and_sized() { + let m = primitives::material_ball(); + let s = BakeSettings { antialiasing: 2, dilation: 2, rays: 8, maps: BakedMap::ALL.into_iter().collect(), ..settings(40, &[]) }; + let a = run(&m, &s).unwrap(); + let b = run(&m, &s).unwrap(); + assert_eq!(a, b); + assert_eq!(a.maps.len(), BakedMap::ALL.len()); + for (map, data) in &a.maps { + assert_eq!(data.len(), 40 * 40 * map.components(), "{map:?}"); + assert!(data.iter().all(|v| v.is_finite() && (0.0..=1.0).contains(v)), "{map:?}"); + } +} + +#[test] +fn strips_match_a_single_pass() { + let m = primitives::material_ball(); + let bvh = Bvh::new(&m); + let s = BakeSettings { antialiasing: 2, rays: 4, maps: BakedMap::ALL.into_iter().collect(), ..settings(64, &[]) }; + let req = BakeRequest { mesh: &m, bvh: &bvh, material: 0, settings: &s, high: None, cage: None }; + let whole = bake(&req, &Progress::new()).unwrap(); + // 128 × 2 supersampled texels per strip = 1 output row: 64 strips. + let strips = bake_in_strips(&req, &Progress::new(), 128 * 2).unwrap(); + for (map, a) in &whole.maps { + let b = &strips.maps[map]; + let off = a.iter().zip(b).filter(|(a, b)| (*a - *b).abs() > 1e-3).count(); + assert!(off * 200 < a.len(), "{map:?}: {off} of {} differ", a.len()); + } +} + +#[test] +fn cancel_and_progress() { + let m = primitives::sphere(1.0, 16, 8); + let bvh = Bvh::new(&m); + let s = settings(16, &[BakedMap::AmbientOcclusion, BakedMap::Position]); + let req = BakeRequest { mesh: &m, bvh: &bvh, material: 0, settings: &s, high: None, cage: None }; + let p = Progress::new(); + p.cancel(); + assert!(matches!(bake(&req, &p), Err(BakeError::Cancelled))); + let p = Progress::new(); + bake(&req, &p).unwrap(); + assert_eq!(p.done.load(Relaxed), 10_000); + assert_eq!(p.fraction(), 1.0); +} + +#[test] +fn invalid_requests_are_errors() { + let m = quad(); + let ok = settings(8, &[BakedMap::AmbientOcclusion]); + let bad = [ + BakeSettings { resolution: 0, ..ok.clone() }, + BakeSettings { resolution: 8193, ..ok.clone() }, + BakeSettings { antialiasing: 3, ..ok.clone() }, + BakeSettings { antialiasing: 0, ..ok.clone() }, + BakeSettings { rays: 0, ..ok.clone() }, + BakeSettings { max_distance: f32::NAN, ..ok.clone() }, + BakeSettings { max_distance: 0.0, ..ok.clone() }, + BakeSettings { max_rear: -1.0, ..ok.clone() }, + BakeSettings { curvature_strength: f32::INFINITY, ..ok.clone() }, + ]; + for s in &bad { + assert!(matches!(run(&m, s), Err(BakeError::Invalid(_))), "{s:?}"); + } + let bvh = Bvh::new(&m); + let req = |mesh: &Mesh, material| bake(&BakeRequest { mesh, bvh: &bvh, material, settings: &ok, high: None, cage: None }, &Progress::new()); + assert!(matches!(req(&m, 1), Err(BakeError::Invalid(_)))); + let mut broken = m.clone(); + broken.indices[0] = 99; + assert!(matches!(req(&broken, 0), Err(BakeError::Invalid(_)))); + let mut nan = m.clone(); + nan.positions[0].x = f32::NAN; + assert!(matches!(req(&nan, 0), Err(BakeError::Invalid(_)))); + // An empty mesh bakes to neutral values. + let empty = Mesh { materials: vec!["m".into()], ..Mesh::default() }; + let out = req(&empty, 0).unwrap(); + assert!(out.maps[&BakedMap::AmbientOcclusion].iter().all(|v| *v == 1.0)); +} + +#[test] +fn neutral_values_and_padding() { + // The quad covers only the left half of UV space. + let mut m = quad(); + for uv in &mut m.uvs { + uv.x *= 0.5; + } + let maps = [BakedMap::AmbientOcclusion, BakedMap::Curvature, BakedMap::Thickness, BakedMap::Normal, BakedMap::Position]; + let out = run(&m, &BakeSettings { dilation: 2, ..settings(16, &maps) }).unwrap(); + let pos = &out.maps[&BakedMap::Position]; + let at = |x: usize, y: usize| &pos[(y * 16 + x) * 3..(y * 16 + x) * 3 + 3]; + assert_eq!(at(9, 5)[0], at(7, 5)[0], "padded texel copies a texel of the last covered column"); + assert_eq!(at(12, 5), [0.0, 0.0, 0.0], "beyond the padding"); + assert_eq!(out.maps[&BakedMap::AmbientOcclusion][5 * 16 + 12], 1.0); + assert_eq!(out.maps[&BakedMap::Curvature][5 * 16 + 12], 0.5); + assert_eq!(out.maps[&BakedMap::Thickness][5 * 16 + 12], 1.0); + assert_eq!(&out.maps[&BakedMap::Normal][(5 * 16 + 12) * 3..(5 * 16 + 12) * 3 + 3], [0.5, 0.5, 1.0]); +} + +#[test] +fn normal_and_height_transfer_from_a_high_poly() { + let low = quad(); + let mut high = quad(); + for p in &mut high.positions { + p.y += 0.005; + } + let tilt = Vec3::new(0.3, 1.0, 0.0).normalize(); + high.normals = vec![tilt; 4]; + high.compute_tangents(); + let (lb, hb) = (Bvh::new(&low), Bvh::new(&high)); + let s = settings(16, &[BakedMap::Normal, BakedMap::Height]); + let out = + bake(&BakeRequest { mesh: &low, bvh: &lb, material: 0, settings: &s, high: Some(HighPoly { mesh: &high, bvh: &hb }), cage: None }, &Progress::new()) + .unwrap(); + let i = 8 * 16 + 8; + let n = &out.maps[&BakedMap::Normal][i * 3..i * 3 + 3]; + // Tangent = +X (u), bitangent = −Z (up the image), normal = +Y. + assert!((n[0] - (0.5 + 0.5 * tilt.x)).abs() < 1e-3 && (n[1] - 0.5).abs() < 1e-3 && (n[2] - (0.5 + 0.5 * tilt.y)).abs() < 1e-3, "{n:?}"); + let diag = 8.0f32.sqrt(); + let expected = 0.5 + 0.005 / (0.02 * diag); + assert!((out.maps[&BakedMap::Height][i] - expected).abs() < 1e-3, "{}", out.maps[&BakedMap::Height][i]); + // Without a high poly both maps are flat. + let flat = run(&low, &s).unwrap(); + assert_eq!(&flat.maps[&BakedMap::Normal][i * 3..i * 3 + 3], [0.5, 0.5, 1.0]); + assert_eq!(flat.maps[&BakedMap::Height][i], 0.5); +} + +fn transfer(low: &Mesh, high: &Mesh, cage: Option<&Mesh>, s: &BakeSettings) -> Result { + let (lb, hb) = (Bvh::new(low), Bvh::new(high)); + bake(&BakeRequest { mesh: low, bvh: &lb, material: 0, settings: s, high: Some(HighPoly { mesh: high, bvh: &hb }), cage }, &Progress::new()) +} + +/// Texel (x, y) of a `res`² bake of [`quad`] sits over world (2u − 1, 0, 2v − 1). +fn quad_texel(res: u32, x: f32, z: f32) -> usize { + let t = |c: f32| (((c + 1.0) * 0.5 * res as f32) as usize).min(res as usize - 1); + t(z) * res as usize + t(x) +} + +/// [`quad`]'s footprint with a smooth bump `h · exp(−r²/σ²)`. +fn bumped(h: f32, sigma: f32) -> Mesh { + let mut m = primitives::plane(2.0, 128); + for p in &mut m.positions { + p.y = h * (-(p.x * p.x + p.z * p.z) / (sigma * sigma)).exp(); + } + m.compute_normals(); + m.compute_tangents(); + m +} + +#[test] +fn bump_tilts_the_baked_normal() { + let (h, sigma) = (0.1f32, 0.4f32); + let s = BakeSettings { max_frontal: 0.06, max_rear: 0.02, ..settings(64, &[BakedMap::Normal, BakedMap::Height]) }; + let out = transfer(&quad(), &bumped(h, sigma), None, &s).unwrap(); + let normal = &out.maps[&BakedMap::Normal]; + for (x, z) in [(0.3f32, 0.0f32), (-0.3, 0.0), (0.0, 0.3), (0.0, -0.3), (0.25, 0.25)] { + let i = quad_texel(64, x, z); + // Analytic normal of the bump at the texel centre. + let (cx, cz) = (((i % 64) as f32 + 0.5) / 32.0 - 1.0, ((i / 64) as f32 + 0.5) / 32.0 - 1.0); + let f = h * (-(cx * cx + cz * cz) / (sigma * sigma)).exp(); + let (dx, dz) = (-2.0 * cx / (sigma * sigma) * f, -2.0 * cz / (sigma * sigma) * f); + let n = Vec3::new(-dx, 1.0, -dz).normalize(); + // Tangent = +X, bitangent = −Z, normal = +Y. + let expected = [0.5 + 0.5 * n.x, 0.5 - 0.5 * n.z, 0.5 + 0.5 * n.y]; + let got = &normal[i * 3..i * 3 + 3]; + assert!(got.iter().zip(expected).all(|(g, e)| (g - e).abs() < 0.02), "at {x},{z}: {got:?} vs {expected:?}"); + assert!((got[0] - 0.5) * x >= 0.0 && (got[1] - 0.5) * -z >= 0.0, "tilts away from the bump centre at {x},{z}: {got:?}"); + } + let height = &out.maps[&BakedMap::Height]; + assert!(height[quad_texel(64, 0.0, 0.0)] > height[quad_texel(64, 0.6, 0.6)] + 0.2, "the bump top is higher"); +} + +#[test] +fn curvature_from_the_normal_map_sees_the_bump() { + let s = BakeSettings { max_frontal: 0.06, max_rear: 0.02, curvature_from_normal: true, ..settings(64, &[BakedMap::Curvature]) }; + let out = transfer(&quad(), &bumped(0.1, 0.4), None, &s).unwrap(); + assert!(!out.maps.contains_key(&BakedMap::Normal), "the helper normal map is not returned"); + let c = &out.maps[&BakedMap::Curvature]; + assert!(c[quad_texel(64, 0.0, 0.0)] > 0.55, "convex top {}", c[quad_texel(64, 0.0, 0.0)]); + assert!((c[quad_texel(64, 0.9, 0.9)] - 0.5).abs() < 0.02, "flat corner {}", c[quad_texel(64, 0.9, 0.9)]); +} + +/// Two unit boxes 0.2 apart: "A" (material 0, centre x = −0.6) and "B" (material 1, x = +0.6). +fn two_boxes(suffix: &str, colors: Option<[Vec4; 2]>) -> Mesh { + let part = |name: &str, x: f32, color: Option| { + let mut b = primitives::cube(1.0); + b.positions.iter_mut().for_each(|p| p.x += x); + b.submeshes[0].name = format!("{name}{suffix}"); + b.colors = color.map(|c| vec![c; b.positions.len()]).unwrap_or_default(); + b + }; + let mut m = part("A", -0.6, colors.map(|c| c[0])); + m.append(&part("B", 0.6, colors.map(|c| c[1]))); + m +} + +#[test] +fn match_by_mesh_name_pairs_the_right_parts() { + let (red, blue) = (Vec4::new(1.0, 0.0, 0.0, 1.0), Vec4::new(0.0, 0.0, 1.0, 1.0)); + let (low, high) = (two_boxes("_low", None), two_boxes("_HIGH", Some([red, blue]))); + // Rays start 1.3 in front of A's +X face: beyond B, so B's high poly is hit first unless + // parts are matched by name. + let s = BakeSettings { max_frontal: 0.5, ..settings(64, &[BakedMap::ColorMap]) }; + let face = |s: &BakeSettings| { + let out = transfer(&low, &high, None, s).unwrap(); + covered_values(&low, &out, BakedMap::ColorMap) + .into_iter() + .filter(|(p, _)| p.x > -0.105 && p.y.abs() < 0.4 && p.z.abs() < 0.4) + .map(|v| v.1) + .collect::>() + }; + let always = face(&s); + assert!(!always.is_empty() && always.iter().all(|r| *r < 0.01), "always: B's (blue) high poly occludes A's face"); + let by_name = face(&BakeSettings { matching: BakeMatch::ByMeshName, ..s.clone() }); + assert!(by_name.iter().all(|r| *r > 0.99), "by name: A's face gets A's red"); + // Parts without a counterpart get nothing. + let lonely = BakeSettings { matching: BakeMatch::ByMeshName, low_suffix: "_none".into(), ..s }; + assert!(face(&lonely).iter().all(|r| *r == 0.0)); +} + +#[test] +fn bent_normals_point_away_from_occluders() { + // A floor (material 0) with a wall standing at x = +1, facing −X (material 1). + let mut m = quad(); + let wall = Mesh::from_parts( + vec![Vec3::new(1.0, 0.0, -1.0), Vec3::new(1.0, 0.0, 1.0), Vec3::new(1.0, 2.0, 1.0), Vec3::new(1.0, 2.0, -1.0)], + Some(vec![-Vec3::X; 4]), + vec![Vec2::ZERO, Vec2::X, Vec2::ONE, Vec2::Y], + vec![0, 2, 1, 0, 3, 2], + "Wall", + ) + .unwrap(); + m.append(&wall); + let s = BakeSettings { max_distance: 2.0, ..settings(32, &[BakedMap::BentNormal, BakedMap::AmbientOcclusion]) }; + let out = run(&m, &s).unwrap(); + let bent = &out.maps[&BakedMap::BentNormal]; + let ao = covered_values(&m, &out, BakedMap::AmbientOcclusion); + let g = UvGBuffer::new(&m, 0, 32, 32); + let near: Vec<&[f32]> = (0..32 * 32).filter(|i| g.surface(&m, *i).is_some_and(|s| s.pos.x > 0.6)).map(|i| &bent[i * 3..i * 3 + 3]).collect(); + let far: Vec<&[f32]> = (0..32 * 32).filter(|i| g.surface(&m, *i).is_some_and(|s| s.pos.x < -0.6)).map(|i| &bent[i * 3..i * 3 + 3]).collect(); + let mean_x = |v: &[&[f32]]| mean(v.iter().map(|b| b[0] * 2.0 - 1.0)); + assert!(mean_x(&near) < -0.15, "near the wall the bent normal leans away from it: {}", mean_x(&near)); + assert!(mean_x(&near) < mean_x(&far), "{} vs {}", mean_x(&near), mean_x(&far)); + assert!(near.iter().all(|b| b[1] > 0.6), "still points up"); + let ao_near = mean(ao.iter().filter(|(p, _)| p.x > 0.6).map(|v| v.1)); + assert!(ao_near < mean(ao.iter().filter(|(p, _)| p.x < -0.6).map(|v| v.1))); +} + +#[test] +fn opacity_and_color_transfer_where_the_high_poly_is() { + // The high poly covers x < 0 only, colored green. + let mut high = quad(); + high.positions.iter_mut().for_each(|p| p.x = p.x.min(0.0)); + high.colors = vec![Vec4::new(0.0, 1.0, 0.0, 0.5); 4]; + let out = transfer(&quad(), &high, None, &settings(32, &[BakedMap::Opacity, BakedMap::ColorMap])).unwrap(); + let (op, col) = (&out.maps[&BakedMap::Opacity], &out.maps[&BakedMap::ColorMap]); + let (left, right) = (quad_texel(32, -0.5, 0.0), quad_texel(32, 0.5, 0.0)); + assert_eq!((op[left], op[right]), (0.5, 0.0), "vertex alpha where covered, 0 where missed"); + assert_eq!(&col[left * 3..left * 3 + 3], [0.0, 1.0, 0.0]); + assert_eq!(&col[right * 3..right * 3 + 3], BakedMap::ColorMap.neutral()); + // Without a high poly the low poly covers itself (white, opaque). + let own = run(&quad(), &settings(32, &[BakedMap::Opacity, BakedMap::ColorMap])).unwrap(); + assert_eq!((own.maps[&BakedMap::Opacity][right], own.maps[&BakedMap::ColorMap][right * 3]), (1.0, 1.0)); +} + +#[test] +fn ray_distances_and_the_cage_limit_hits() { + let low = quad(); + let mut high = quad(); + high.positions.iter_mut().for_each(|p| p.y += 0.2); + let diag = 8.0f32.sqrt(); + let opacity = |s: &BakeSettings, cage: Option<&Mesh>| transfer(&low, &high, cage, s).map(|o| o.maps[&BakedMap::Opacity][quad_texel(16, 0.0, 0.0)]); + let near = settings(16, &[BakedMap::Opacity]); + assert_eq!(opacity(&near, None).unwrap(), 0.0, "0.2 above is beyond the default frontal distance"); + assert_eq!(opacity(&BakeSettings { max_frontal: 0.25 / diag, ..near.clone() }, None).unwrap(), 1.0); + // The rear distance only reaches below the surface. + let mut below = high.clone(); + below.positions.iter_mut().for_each(|p| p.y -= 0.4); + let rear = |r: f32| transfer(&low, &below, None, &BakeSettings { max_rear: r, ..near.clone() }).unwrap().maps[&BakedMap::Opacity][quad_texel(16, 0.0, 0.0)]; + assert_eq!((rear(0.1 / diag), rear(0.25 / diag)), (0.0, 1.0)); + // A cage 0.3 above the low poly starts the rays above the high poly. + let mut cage = low.clone(); + cage.positions.iter_mut().for_each(|p| p.y += 0.3); + assert_eq!(opacity(&near, Some(&cage)).unwrap(), 1.0); + // A cage 0.1 above starts below it. + cage.positions.iter_mut().for_each(|p| p.y -= 0.2); + assert_eq!(opacity(&near, Some(&cage)).unwrap(), 0.0); + // The cage must have the low poly's triangles. + assert!(matches!(opacity(&near, Some(&primitives::cube(1.0))), Err(BakeError::Invalid(_)))); +} + +#[test] +fn world_space_direction_is_a_facing_ratio() { + let m = quad(); + let at = + |d: [f32; 3]| run(&m, &BakeSettings { direction: d, ..settings(8, &[BakedMap::WorldDirection]) }).map(|o| o.maps[&BakedMap::WorldDirection][4 * 8 + 4]); + assert_eq!(at([0.0, 2.0, 0.0]).unwrap(), 1.0); + assert_eq!(at([1.0, 0.0, 0.0]).unwrap(), 0.5); + assert_eq!(at([0.0, -1.0, 0.0]).unwrap(), 0.0); + assert!(matches!(at([0.0; 3]), Err(BakeError::Invalid(_)))); +} + +/// `cargo test -p texturecraft-bake --release -- --ignored --nocapture bench` +#[test] +#[ignore] +fn bench_material_ball_2k() { + let m = primitives::material_ball(); + let bvh = Bvh::new(&m); + let all = BakeSettings { resolution: 2048, ..BakeSettings::default() }; + for maps in + [vec![BakedMap::Position], vec![BakedMap::AmbientOcclusion], vec![BakedMap::Thickness], vec![BakedMap::Curvature], all.maps.iter().copied().collect()] + { + let s = BakeSettings { maps: maps.into_iter().collect(), ..all.clone() }; + let t = std::time::Instant::now(); + let out = bake(&BakeRequest { mesh: &m, bvh: &bvh, material: 0, settings: &s, high: None, cage: None }, &Progress::new()).unwrap(); + println!("material ball, material 0, {}² × {:?}, {} rays: {:.2?}", out.resolution, out.maps.keys(), s.rays, t.elapsed()); + } +} diff --git a/crates/compose/Cargo.toml b/crates/compose/Cargo.toml new file mode 100644 index 00000000..a2ea4edb --- /dev/null +++ b/crates/compose/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "texturecraft-compose" +description = "TextureCraft layer-stack compositor (CPU reference), patterns, UV padding, display conversion" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-texel = { workspace = true } +texturecraft-geom = { workspace = true } +rayon = { workspace = true } +half = { workspace = true } diff --git a/crates/compose/src/below.rs b/crates/compose/src/below.rs new file mode 100644 index 00000000..8d3db8bd --- /dev/null +++ b/crates/compose/src/below.rs @@ -0,0 +1,222 @@ +//! A per-tile cache of the composited stack below one "hot" layer (the layer being painted or +//! edited), so recompositing a tile only evaluates that layer and the layers above it. The +//! cache is keyed by everything the cached part reads; any change to it empties the cache, so +//! results are always identical to a full evaluation. + +use std::collections::{BTreeSet, HashMap, VecDeque}; +use std::sync::Arc; + +use texturecraft_core::{BakedMap, Channel, Layer, LayerId, LayerKind, Project, TextureSet}; +use texturecraft_texel::TileImage; + +use crate::eval::{Inputs, PaintTarget}; +use crate::store::{BakedMaps, ImageStore, PixelStore}; + +/// Default byte budget of a [`BelowCache`]. +pub const BELOW_BUDGET: usize = 256 << 20; + +/// See the module docs. One per texture set. +#[derive(Debug)] +pub struct BelowCache { + hot: Option, + key: Option, + tiles: HashMap<(u32, u32), Vec>, + /// Insertion order, oldest first (eviction beyond the budget). + order: VecDeque<(u32, u32)>, + bytes: usize, + /// Byte budget; the oldest tiles are dropped beyond it. + pub budget: usize, + /// Tiles of the whole pass a caller splits into several composites (0: each composite is a + /// pass). A pass larger than the cache records only what fits. + pub pass: usize, +} + +impl Default for BelowCache { + fn default() -> Self { + BelowCache { hot: None, key: None, tiles: HashMap::new(), order: VecDeque::new(), bytes: 0, budget: BELOW_BUDGET, pass: 0 } + } +} + +/// Everything compositing `roots` of a texture set reads: equal keys composite identically. +/// Pixels are compared by tile identity (copy-on-write), so building and comparing keys is cheap. +#[derive(Debug, PartialEq)] +pub struct StackKey { + /// The texture set without its name, description, stack and bake settings. + set: TextureSet, + roots: Vec, + /// The layers drawn, without names and other display-only fields. + layers: Vec, + pixels: Vec<(LayerId, Option, Shared)>, + baked: (u32, Vec<(BakedMap, usize)>), + images: Vec<(String, usize)>, +} + +impl StackKey { + /// The key of `roots` (layers of texture set `ts`, bottom → top) and their effects. + pub fn new(project: &Project, pixels: &PixelStore, baked: &BakedMaps, images: &ImageStore, ts: usize, roots: &[LayerId]) -> Option { + let mut set = project.texture_set(ts).ok()?.clone(); + set.name.clear(); + set.description.clear(); + set.stack.clear(); + set.bake = Default::default(); + let tree = project.render_tree(roots); + let effects: BTreeSet = tree.iter().filter_map(|id| project.layers.get(id)).flat_map(effect_ids).collect(); + let pixels = tree + .iter() + .chain(&effects) + .flat_map(|id| { + let layer = Channel::ALL.into_iter().filter_map(move |c| pixels.layer(*id, c).map(|img| (*id, Some(c), Shared(img.clone())))); + layer.chain(pixels.masks.get(id).map(|img| (*id, None, Shared(img.clone())))) + }) + .collect(); + let mut images: Vec<(String, usize)> = images.iter().map(|(n, i)| (n.clone(), Arc::as_ptr(i) as usize)).collect(); + images.sort(); + Some(StackKey { + set, + roots: roots.to_vec(), + layers: tree.iter().filter_map(|id| project.layers.get(id)).map(render_view).collect(), + pixels, + baked: (baked.resolution, baked.maps.iter().map(|(m, d)| (*m, Arc::as_ptr(d) as usize)).collect()), + images, + }) + } +} + +/// An image compared by tile identity: holding the clone keeps its tiles alive, and a tile +/// rewritten since is a different allocation (copy-on-write), so pointer equality means the +/// same pixels without reading them. +#[derive(Debug)] +struct Shared(TileImage); + +impl PartialEq for Shared { + fn eq(&self, other: &Self) -> bool { + let (a, b) = (&self.0, &other.0); + a.width() == b.width() + && a.height() == b.height() + && a.comps() == b.comps() + && (0..a.tiles_y()).all(|ty| { + (0..a.tiles_x()).all(|tx| match (a.tile_handle(tx, ty), b.tile_handle(tx, ty)) { + (None, None) => true, + (Some(x), Some(y)) => Arc::ptr_eq(x, y), + _ => false, + }) + }) + } +} + +/// Ids of a layer's mask and content effects. +fn effect_ids(l: &Layer) -> impl Iterator + '_ { + l.mask.iter().flat_map(|m| m.effects.iter()).chain(l.content_effects.iter()).map(|e| e.id) +} + +/// A layer as far as compositing is concerned (names, color tags and folding don't matter). +fn render_view(l: &Layer) -> Layer { + let mut l = l.clone(); + l.name.clear(); + l.color_tag = None; + if let LayerKind::Group { collapsed, .. } = &mut l.kind { + *collapsed = false; + } + l +} + +impl BelowCache { + /// Cache the stack below `hot` from now on (a different layer empties the cache). + pub fn set_hot(&mut self, hot: Option) { + if self.hot != hot { + self.hot = hot; + self.clear(); + } + } + + pub fn clear(&mut self) { + self.tiles.clear(); + self.order.clear(); + self.bytes = 0; + self.key = None; + } + + pub fn bytes(&self) -> usize { + self.bytes + } + + pub fn len(&self) -> usize { + self.tiles.len() + } + + pub fn is_empty(&self) -> bool { + self.tiles.is_empty() + } + + pub(crate) fn tile(&self, t: (u32, u32)) -> Option<&[f32]> { + self.tiles.get(&t).map(Vec::as_slice) + } + + pub(crate) fn insert(&mut self, t: (u32, u32), data: Vec) { + let size = data.len() * std::mem::size_of::(); + if size > self.budget { + return; + } + while self.bytes + size > self.budget { + let Some(old) = self.order.pop_front() else { break }; + if let Some(d) = self.tiles.remove(&old) { + self.bytes = self.bytes.saturating_sub(d.len() * std::mem::size_of::()); + } + } + if let Some(d) = self.tiles.insert(t, data) { + self.bytes = self.bytes.saturating_sub(d.len() * std::mem::size_of::()); + } else { + self.order.push_back(t); + } + self.bytes += size; + } + + /// Where the stack splits for `inp`: layers of the texture set's top level before the + /// returned index are served from the cache. None when the hot layer is not drawn in the set + /// or the cached part could change (it reads anchors or holds the live stroke). Empties the + /// cache when what the cached part reads changed. + pub(crate) fn prepare(&mut self, inp: &Inputs) -> Option { + let hot = self.hot?; + let p = inp.project; + let set = p.texture_set(inp.ts).ok()?; + let split = set.stack.iter().position(|id| p.render_tree(&[*id]).contains(&hot))?; + let below = set.stack.get(..split)?; + // Anchors carry values across the split. + if p.render_tree(&set.stack).iter().any(|id| p.layers.get(id).is_some_and(Layer::reads_anchor)) { + return None; + } + if let Some(pv) = inp.preview { + let (PaintTarget::Layer(t) | PaintTarget::Mask(t)) = pv.target; + let tree = p.render_tree(below); + if tree.contains(&t) || tree.iter().filter_map(|id| p.layers.get(id)).flat_map(effect_ids).any(|e| e == t) { + return None; + } + } + let key = StackKey::new(p, inp.pixels, inp.baked, inp.images, inp.ts, below)?; + if self.key.as_ref() != Some(&key) { + self.clear(); + self.key = Some(key); + } + Some(split) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn insert_keeps_to_the_budget_dropping_the_oldest() { + let mut c = BelowCache { budget: 3 * 16, ..BelowCache::default() }; + for i in 0..5 { + c.insert((i, 0), vec![0.0; 4]); + } + assert_eq!(c.len(), 3); + assert_eq!(c.bytes(), 48); + assert!(c.tile((0, 0)).is_none() && c.tile((4, 0)).is_some()); + c.insert((9, 9), vec![0.0; 100]); + assert!(c.tile((9, 9)).is_none(), "bigger than the whole budget"); + c.set_hot(Some(LayerId(3))); + assert!(c.is_empty() && c.bytes() == 0); + } +} diff --git a/crates/compose/src/display.rs b/crates/compose/src/display.rs new file mode 100644 index 00000000..6ad9e4f9 --- /dev/null +++ b/crates/compose/src/display.rs @@ -0,0 +1,166 @@ +//! Conversion of composited tiles to the texture formats the viewport samples. + +use texturecraft_core::{BakedMap, Channel}; +use texturecraft_texel::{TILE, TILE_AREA, srgb_lut}; + +use crate::eval::Composite; +use crate::store::BakedMaps; + +/// One of the textures the viewport shader samples. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum DisplayKind { + /// sRGB8: base color, alpha = opacity. + BaseColor, + /// RGBA8 linear: ambient occlusion (channel × baked), roughness (1 − glossiness when the set + /// has a Glossiness channel), metallic, specular level. + Orm, + /// RGBA8: painted tangent-space normal. + Normal, + /// RGBA16F: height in r, the linear Specular (F0) color in gba. + Height, + /// sRGB8: emissive color. + Emissive, +} + +impl DisplayKind { + pub const ALL: [DisplayKind; 5] = [DisplayKind::BaseColor, DisplayKind::Orm, DisplayKind::Normal, DisplayKind::Height, DisplayKind::Emissive]; + + /// Bytes per texel of the upload format. + pub fn bytes_per_texel(self) -> usize { + if self == DisplayKind::Height { 8 } else { 4 } + } + + /// Display textures affected by a channel. + pub fn of_channel(c: Channel) -> DisplayKind { + match c { + Channel::BaseColor | Channel::Opacity => DisplayKind::BaseColor, + Channel::Normal => DisplayKind::Normal, + Channel::Height | Channel::Specular => DisplayKind::Height, + Channel::Emissive => DisplayKind::Emissive, + _ => DisplayKind::Orm, + } + } +} + +fn u8_of(v: u16) -> u8 { + (v >> 8) as u8 +} + +/// Tile bytes (`TILE × TILE`, row-major) for `kind` from the composite, or None when the tile is +/// absent in every source (the GPU texture keeps its cleared default). +pub fn tile_bytes(comp: &Composite, baked: &BakedMaps, kind: DisplayKind, tx: u32, ty: u32) -> Vec { + let bpt = kind.bytes_per_texel(); + let mut out = vec![0u8; TILE_AREA * bpt]; + let lut = srgb_lut(); + let get = |c: Channel| comp.channels.get(&c).and_then(|img| img.tile(tx, ty)); + let res = comp.resolution; + let default16 = |c: Channel| texturecraft_texel::to_u16(c.default_value()[0]); + match kind { + DisplayKind::BaseColor | DisplayKind::Emissive => { + let (c, alpha) = if kind == DisplayKind::BaseColor { (Channel::BaseColor, get(Channel::Opacity)) } else { (Channel::Emissive, None) }; + let src = get(c); + let d = c.default_value().map(|v| (texturecraft_texel::linear_to_srgb(v) * 255.0 + 0.5) as u8); + for i in 0..TILE_AREA { + let px = &mut out[i * 4..i * 4 + 4]; + match src { + Some(s) => { + for k in 0..3 { + px[k] = lut[(s.get(i * 3 + k).copied().unwrap_or(0) >> 4) as usize]; + } + } + None => px[..3].copy_from_slice(&d), + } + px[3] = alpha.map(|a| u8_of(a.get(i).copied().unwrap_or(65535))).unwrap_or(255); + } + } + DisplayKind::Orm => { + let (ao, m, s) = (get(Channel::AmbientOcclusion), get(Channel::Metallic), get(Channel::SpecularLevel)); + // Specular/glossiness sets: the viewport shades roughness = 1 − glossiness. + let gloss = comp.channels.contains_key(&Channel::Glossiness); + let (r, r_default) = if gloss { (get(Channel::Glossiness), default16(Channel::Glossiness)) } else { (get(Channel::Roughness), default16(Channel::Roughness)) }; + for i in 0..TILE_AREA { + let (x, y) = (tx * TILE + (i as u32 % TILE), ty * TILE + (i as u32 / TILE)); + let baked_ao = baked.scalar(BakedMap::AmbientOcclusion, x, y, res).unwrap_or(1.0); + let ch_ao = ao.and_then(|a| a.get(i)).map(|v| *v as f32 / 65535.0).unwrap_or(1.0); + let px = &mut out[i * 4..i * 4 + 4]; + px[0] = ((baked_ao * ch_ao).clamp(0.0, 1.0) * 255.0 + 0.5) as u8; + let v = r.and_then(|t| t.get(i).copied()).unwrap_or(r_default); + px[1] = u8_of(if gloss { 65535 - v } else { v }); + px[2] = u8_of(m.and_then(|t| t.get(i).copied()).unwrap_or(0)); + px[3] = u8_of(s.and_then(|t| t.get(i).copied()).unwrap_or(default16(Channel::SpecularLevel))); + } + } + DisplayKind::Normal => { + let n = get(Channel::Normal); + for i in 0..TILE_AREA { + let px = &mut out[i * 4..i * 4 + 4]; + match n { + Some(t) => { + for (k, d) in px.iter_mut().take(3).enumerate() { + *d = u8_of(t.get(i * 3 + k).copied().unwrap_or(0)); + } + } + None => px[..3].copy_from_slice(&[128, 128, 255]), + } + px[3] = 255; + } + } + DisplayKind::Height => { + let (h, spec) = (get(Channel::Height), get(Channel::Specular)); + let spec_default = Channel::Specular.default_value(); + for i in 0..TILE_AREA { + let v = h.and_then(|t| t.get(i)).map(|v| texturecraft_texel::from_u16_signed(*v)).unwrap_or(0.0); + let f0 = |k: usize| spec.and_then(|t| t.get(i * 3 + k)).map(|v| *v as f32 / 65535.0).unwrap_or(spec_default[k]); + for (k, c) in [v, f0(0), f0(1), f0(2)].into_iter().enumerate() { + out[i * 8 + k * 2..i * 8 + k * 2 + 2].copy_from_slice(&half::f16::from_f32(c).to_le_bytes()); + } + } + } + } + out +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_texel::to_u16; + + #[test] + fn base_color_uses_srgb_and_opacity() { + let mut comp = Composite::new(&[Channel::BaseColor, Channel::Opacity], 64); + comp.channels.get_mut(&Channel::BaseColor).unwrap().set(0, 0, &[to_u16(1.0), to_u16(0.5), 0]); + comp.channels.get_mut(&Channel::Opacity).unwrap().set(0, 0, &[to_u16(0.5)]); + let b = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::BaseColor, 0, 0); + assert_eq!(b[0], 255); + assert!((b[1] as i32 - 188).abs() <= 1, "{}", b[1]); + assert_eq!(b[2], 0); + assert!((b[3] as i32 - 127).abs() <= 1); + } + + #[test] + fn missing_channels_fall_back_to_defaults() { + let comp = Composite::new(&[], 64); + let orm = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::Orm, 0, 0); + assert_eq!(&orm[..4], &[255, 128, 0, 128]); + let n = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::Normal, 0, 0); + assert_eq!(&n[..4], &[128, 128, 255, 255]); + let h = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::Height, 0, 0); + assert_eq!(h.len(), TILE_AREA * 8); + assert_eq!(half::f16::from_le_bytes([h[2], h[3]]).to_f32(), half::f16::from_f32(0.04).to_f32(), "default F0"); + } + + #[test] + fn glossiness_shows_as_roughness_and_specular_rides_in_height() { + let mut comp = Composite::new(&[Channel::Glossiness, Channel::Specular], 64); + comp.channels.get_mut(&Channel::Glossiness).unwrap().set(0, 0, &[to_u16(0.8)]); + comp.channels.get_mut(&Channel::Specular).unwrap().set(0, 0, &[to_u16(1.0), to_u16(0.5), 0]); + let orm = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::Orm, 0, 0); + assert!((orm[1] as i32 - 51).abs() <= 1, "roughness = 1 - 0.8, got {}", orm[1]); + let h = tile_bytes(&comp, &BakedMaps::default(), DisplayKind::Height, 0, 0); + let at = |k: usize| half::f16::from_le_bytes([h[k * 2], h[k * 2 + 1]]).to_f32(); + assert_eq!(at(0), 0.0); + assert!((at(1) - 1.0).abs() < 1e-3 && (at(2) - 0.5).abs() < 1e-3 && at(3) == 0.0); + assert_eq!(DisplayKind::of_channel(Channel::Specular), DisplayKind::Height); + assert_eq!(DisplayKind::of_channel(Channel::Glossiness), DisplayKind::Orm); + } +} diff --git a/crates/compose/src/eval.rs b/crates/compose/src/eval.rs new file mode 100644 index 00000000..2d74065e --- /dev/null +++ b/crates/compose/src/eval.rs @@ -0,0 +1,1642 @@ +//! The layer-stack evaluator: composites a texture set's stack into one image per channel, +//! tile by tile in parallel. This is the reference implementation (the oracle) for the viewport +//! and for export. + +use std::collections::{BTreeMap, HashMap}; + +use rayon::prelude::*; +use texturecraft_core::{ + BakedMap, BlendMode, Channel, ChannelKind, CompareOp, Effect, EffectKind, Fill, Filter, Generator, GeneratorKind, HeightMask, Layer, LayerId, LayerKind, + Mask, MaskBackground, Project, Projection, Source, blend1, blend3, hsl_adjust, lum, mix3, +}; +use texturecraft_geom::glam::{Vec2, Vec3}; +use texturecraft_geom::{Mesh, NO_TRI, UvGBuffer}; +use texturecraft_texel::{DilationMap, TILE, TILE_AREA, TileImage, from_u16, to_u16, to_u16_signed}; + +use crate::below::BelowCache; +use crate::pattern::{Coords, image_samples, procedural, world_noise}; +use crate::store::{BakedMaps, ImageStore, PixelStore, decode}; + +const NCH: usize = Channel::ALL.len(); + +/// What a live stroke paints into. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PaintTarget { + /// A paint layer's channels. + Layer(LayerId), + /// A paint effect inside a mask. + Mask(LayerId), +} + +/// A screen-pinned image painted through the camera (projection tool / stencil). +#[derive(Clone, Debug)] +pub struct Stencil { + pub image: std::sync::Arc, + /// Camera view-projection captured when the stroke started. + pub view_proj: texturecraft_geom::glam::Mat4, + /// Image placement in normalized device coordinates: center, half extents, rotation. + pub center: [f32; 2], + pub half: [f32; 2], + pub rotation: f32, + /// Repeat the image beyond its bounds (otherwise nothing is painted outside it). + pub tile: bool, +} + +impl Stencil { + /// Linear color and alpha of the stencil at world point `p` (None outside the image). + pub fn sample_world(&self, p: Vec3) -> Option<([f32; 3], f32)> { + let c = self.view_proj * p.extend(1.0); + if c.w <= 1e-6 { + return None; + } + let (dx, dy) = (c.x / c.w - self.center[0], c.y / c.w - self.center[1]); + let (sn, cs) = (-self.rotation).sin_cos(); + let lx = (dx * cs - dy * sn) / self.half[0].max(1e-6); + let ly = (dx * sn + dy * cs) / self.half[1].max(1e-6); + if !self.tile && (lx.abs() > 1.0 || ly.abs() > 1.0) { + return None; + } + let s = self.image.sample(lx * 0.5 + 0.5, 0.5 - ly * 0.5); + let rgb = if self.image.srgb { [s[0], s[1], s[2]].map(texturecraft_texel::srgb_to_linear) } else { [s[0], s[1], s[2]] }; + Some((rgb, s[3].clamp(0.0, 1.0))) + } +} + +/// The stroke being drawn, shown before it is committed. +#[derive(Clone, Debug)] +pub struct StrokePreview { + pub target: PaintTarget, + /// Stroke alpha per texel (1 component, 0..1). + pub alpha: TileImage, + /// Stroke opacity cap. + pub opacity: f32, + pub erase: bool, + /// Values painted per channel (layer targets). + pub values: BTreeMap, + /// Gray value painted into a mask. + pub mask_value: f32, + /// Projection tool: base color (and alpha) come from a screen-pinned image. + pub stencil: Option, + /// Clone and smudge: straight values per channel carried by the stroke (replace `values`). + pub carried: BTreeMap, +} + +/// Everything the evaluator reads. +pub struct Inputs<'a> { + pub project: &'a Project, + pub ts: usize, + pub mesh: &'a Mesh, + pub gbuf: &'a UvGBuffer, + pub pixels: &'a PixelStore, + pub baked: &'a BakedMaps, + pub preview: Option<&'a StrokePreview>, + /// Imported image resources (fill sources). + pub images: &'a ImageStore, + /// Mesh bounds, for scale-independent procedural coordinates. + pub bounds: (Vec3, Vec3), +} + +/// The composited channels of one texture set. +#[derive(Clone, Debug, PartialEq)] +pub struct Composite { + pub resolution: u32, + pub channels: BTreeMap, +} + +impl Composite { + pub fn new(channels: &[Channel], resolution: u32) -> Composite { + Composite { resolution, channels: channels.iter().map(|c| (*c, TileImage::new(resolution, resolution, c.components()))).collect() } + } + + /// Channel value at a texel (the channel default when absent). + pub fn value(&self, c: Channel, x: u32, y: u32) -> [f32; 3] { + let Some(img) = self.channels.get(&c) else { return c.default_value() }; + let raw = img.get(x, y); + let k = c.kind(); + if !img.is_allocated(x / TILE, y / TILE) { + return c.default_value(); + } + if c.components() == 3 { [decode(k, raw[0]), decode(k, raw[1]), decode(k, raw[2])] } else { [decode(k, raw[0]); 3] } + } +} + +/// Every tile of an image of `res`. +pub fn all_tiles(res: u32) -> Vec<(u32, u32)> { + let n = res.div_ceil(TILE); + (0..n).flat_map(|y| (0..n).map(move |x| (x, y))).collect() +} + +/// Tiles that hold at least one covered texel. +pub fn covered_tiles(gbuf: &UvGBuffer) -> Vec<(u32, u32)> { + let (tw, th) = (gbuf.width.div_ceil(TILE), gbuf.height.div_ceil(TILE)); + let mut out = Vec::new(); + for ty in 0..th { + for tx in 0..tw { + let any = (ty * TILE..((ty + 1) * TILE).min(gbuf.height)) + .any(|y| (tx * TILE..((tx + 1) * TILE).min(gbuf.width)).any(|x| gbuf.tri.get((y * gbuf.width + x) as usize).is_some_and(|t| *t != NO_TRI))); + if any { + out.push((tx, ty)); + } + } + } + out +} + +// --------------------------------------------------------------------------------------------- +// Per-tile plan: the stack flattened with each layer's tile slices looked up once per tile. + +struct ChanPlan<'a> { + ch: usize, + kind: ChannelKind, + comps: usize, + blend: BlendMode, + opacity: f32, + data: Option<&'a [u16]>, + /// Visible content effects, holding this channel's tile for paint effects (empty, and + /// allocation free, for layers without content effects). + effects: Vec>, + /// A content neighbourhood filter precomputed over the region: continue the effects after + /// effect `.0` starting from the field's value. + start: Option<(usize, &'a Field)>, +} + +enum Content<'a> { + Paint { preview: bool }, + Fill(&'a Fill), + Group(Vec>), +} + +struct EffectPlan<'a> { + kind: &'a EffectKind, + blend: BlendMode, + opacity: f32, + data: Option<&'a [u16]>, + preview: bool, +} + +struct MaskPlan<'a> { + background: f32, + effects: Vec>, + /// A neighbourhood filter (blur, sharpen) precomputed over the region: continue the stack + /// after effect `.0` starting from the field's value. + start: Option<(usize, &'a Field)>, +} + +/// A layer's mask (one value per texel) or one content channel (straight value and coverage) +/// after its last neighbourhood filter, over a texel region. +pub struct Field { + x0: u32, + y0: u32, + w: u32, + h: u32, + comps: usize, + data: Vec, +} + +impl Field { + fn get(&self, x: u32, y: u32) -> Option<&[f32]> { + if x < self.x0 || y < self.y0 || x >= self.x0 + self.w || y >= self.y0 + self.h { + return None; + } + let i = ((y - self.y0) * self.w + (x - self.x0)) as usize * self.comps; + self.data.get(i..i + self.comps) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum FieldKey { + Mask(LayerId), + Content(LayerId, Channel), +} + +pub type Fields = HashMap; + +/// Index (among visible effects) of the last neighbourhood filter of an effect stack, its +/// radius in texels and its sharpen amount. +fn neighbourhood(effects: &[Effect], res: u32) -> Option<(usize, f32, Option)> { + effects + .iter() + .filter(|e| e.visible) + .enumerate() + .filter_map(|(i, e)| match &e.kind { + EffectKind::Filter(Filter::Blur { radius }) if *radius > 0.0 => Some((i, (radius * res as f32 / 2048.0).max(0.5), None)), + EffectKind::Filter(Filter::Sharpen { amount }) => Some((i, (1.5 * res as f32 / 2048.0).max(0.75), Some(*amount))), + _ => None, + }) + .last() +} + +/// Fixed-point scale of the blur. Integer running sums make a texel's result independent of +/// the region it is computed in, so tiles composited in any grouping agree exactly. +const FIX: f64 = (1u64 << 24) as f64; + +/// Three running-sum box blurs (≈ Gaussian) of a `w × h` image along rows then along columns. +/// Rows (and columns, transposed) blur in parallel. +fn blur(data: &mut [f32], w: usize, h: usize, r: usize) { + let fix = |v: &f32| if v.is_finite() { (f64::from(v.clamp(-1e6, 1e6)) * FIX).round() as i64 } else { 0 }; + let mut v: Vec = data.par_iter().map(fix).collect(); + blur_rows(&mut v, w, r); + let mut t = transpose(&v, w, h); + blur_rows(&mut t, h, r); + data.par_iter_mut().zip(transpose(&t, h, w)).for_each(|(d, s)| *d = (s as f64 / FIX) as f32); +} + +/// Three box blurs of radius `r` along every row (`w` long) of `data`. +fn blur_rows(data: &mut [i64], w: usize, r: usize) { + if w == 0 { + return; + } + data.par_chunks_mut(w).for_each(|row| { + let mut tmp = vec![0i64; row.len()]; + for _ in 0..3 { + box_line(row, &mut tmp, r); + row.copy_from_slice(&tmp); + } + }); +} + +/// One box blur of radius `r` of a line (texels past the ends count as 0). +fn box_line(src: &[i64], dst: &mut [i64], r: usize) { + let n = (2 * r + 1) as i64; + // Rounded division of a window sum. + let avg = |acc: i64| (2 * acc + n).div_euclid(2 * n); + let mut acc: i64 = src.iter().take(r + 1).sum(); + for (i, d) in dst.iter_mut().enumerate() { + *d = avg(acc); + acc += src.get(i + r + 1).copied().unwrap_or(0); + if i >= r { + acc -= src.get(i - r).copied().unwrap_or(0); + } + } +} + +/// `src` (`w × h`, row-major) transposed to `h × w`. +fn transpose(src: &[i64], w: usize, h: usize) -> Vec { + let mut out = vec![0i64; src.len()]; + if h > 0 { + out.par_chunks_mut(h).enumerate().for_each(|(x, col)| { + for (y, d) in col.iter_mut().enumerate() { + *d = src.get(y * w + x).copied().unwrap_or(0); + } + }); + } + out +} + +/// Covered texels of tile (tx, ty): (x, y, offset inside the tile). +fn tile_texels(gbuf: &UvGBuffer, tx: u32, ty: u32) -> impl Iterator + '_ { + let res = gbuf.width; + (0..TILE).flat_map(|ly| (0..TILE).map(move |lx| (lx, ly))).filter_map(move |(lx, ly)| { + let (x, y) = (tx * TILE + lx, ty * TILE + ly); + (x < res && y < res && gbuf.tri.get((y * res + x) as usize).is_some_and(|t| *t != NO_TRI)).then_some((x, y, (ly * TILE + lx) as usize)) + }) +} + +/// Live stroke alpha at offset `o` of a preview tile. +fn stroke_at(preview: Option<&[u16]>, o: usize) -> f32 { + preview.and_then(|t| t.get(o)).map(|v| from_u16(*v)).unwrap_or(0.0) +} + +/// The full stack of tile (tx, ty) when `layer` reads anchor points (empty otherwise): evaluated +/// up to the layer, it records the anchors below it. +fn anchor_plan<'a>(inp: &Inputs<'a>, id: LayerId, channels: &[Channel], tx: u32, ty: u32, fields: Option<&'a Fields>) -> Vec> { + match inp.project.texture_set(inp.ts) { + Ok(set) if reads_anchor(inp.project, id) => plan(inp, &set.stack, channels, tx, ty, 0, fields), + _ => Vec::new(), + } +} + +/// Whether layer `id` (its own mask, or the content it draws) reads an anchor point. +pub(crate) fn reads_anchor(p: &Project, id: LayerId) -> bool { + p.layers.get(&id).is_some_and(Layer::reads_anchor) || p.content_layer(id).is_some_and(Layer::reads_anchor) +} + +/// The mask layer `id` draws with: its own, or an instance source's. +fn layer_mask(p: &Project, id: LayerId) -> Option<&Mask> { + p.layers.get(&p.mask_owner(id))?.mask.as_ref() +} + +/// Layers of `list` in drawing order (bottom → top, folder and instanced folder contents after +/// their folder). +fn draw_order(p: &Project, list: &[LayerId], depth: usize, out: &mut Vec) { + if depth > texturecraft_core::project::MAX_DEPTH { + return; + } + for id in list { + out.push(*id); + if let Some(l) = p.content_layer(*id) { + draw_order(p, l.children(), depth + 1, out); + } + } +} + +/// What a field holds. +#[derive(Clone, Copy)] +enum Job<'a> { + Mask(&'a Mask), + Content(Channel), +} + +/// One neighbourhood-filtered field of `layer` over `tiles` plus the filter's reach, built on +/// the fields already computed below it. +fn field(inp: &Inputs, channels: &[Channel], below: &Fields, id: LayerId, job: Job, tiles: &[(u32, u32)]) -> Option { + let res = inp.gbuf.width; + let effects = match job { + Job::Mask(m) => &m.effects, + Job::Content(_) => &inp.project.content_layer(id)?.content_effects, + }; + let (k, radius, sharpen) = neighbourhood(effects, res)?; + let opacity = effects.iter().filter(|e| e.visible).nth(k).map(|e| e.opacity.clamp(0.0, 1.0)).unwrap_or(1.0); + // Clamped: a hostile radius must not overflow the halo and window arithmetic. + let r = radius.round().clamp(1.0, res as f32) as u32; + // Three box passes reach 3r texels. + let halo = (3 * r).div_ceil(TILE); + let (tx0, ty0) = tiles.iter().fold((u32::MAX, u32::MAX), |(a, b), t| (a.min(t.0), b.min(t.1))); + let (tx1, ty1) = tiles.iter().fold((0, 0), |(a, b), t| (a.max(t.0), b.max(t.1))); + let (rx0, ry0) = (tx0.saturating_sub(halo) * TILE, ty0.saturating_sub(halo) * TILE); + let (rx1, ry1) = (((tx1 + 1 + halo) * TILE).min(res), ((ty1 + 1 + halo) * TILE).min(res)); + let (w, h) = (rx1.saturating_sub(rx0), ry1.saturating_sub(ry0)); + if w == 0 || h == 0 { + return None; + } + let comps = match job { + Job::Mask(_) => 1, + Job::Content(_) => 4, + }; + // Evaluate the stack before the filter, tile by tile (content premultiplied by coverage). + let region_tiles: Vec<(u32, u32)> = (ry0 / TILE..ry1.div_ceil(TILE)).flat_map(|y| (rx0 / TILE..rx1.div_ceil(TILE)).map(move |x| (x, y))).collect(); + let parts: Vec> = region_tiles + .par_iter() + .map(|&(tx, ty)| { + let full = anchor_plan(inp, id, channels, tx, ty, Some(below)); + let preview_tile = inp.preview.and_then(|p| p.alpha.tile(tx, ty)); + let mut mask = None; + let mut nodes = Vec::new(); + match job { + Job::Mask(m) => { + let Some(mut mp) = mask_plan(inp, id, m, tx, ty, None) else { return Vec::new() }; + mp.effects.truncate(k); + mask = Some(mp); + } + Job::Content(ch) => { + nodes = plan(inp, &[id], &[ch], tx, ty, 0, Some(below)); + if let Some(c) = nodes.first_mut().and_then(|n| n.chans.first_mut()) { + c.effects.truncate(k); + c.start = None; + } + } + } + tile_texels(inp.gbuf, tx, ty) + .map(|(x, y, o)| { + let mut tex = Texel::new(inp, x, y, o, stroke_at(preview_tile, o)); + if !full.is_empty() { + tex.anchors_below(&full, id); + } + let v = match (&mask, nodes.first()) { + (Some(mp), _) => [tex.mask(mp), 0.0, 0.0, 0.0], + (None, Some(n)) => match n.chans.first().and_then(|c| tex.content(&n.content, c)) { + Some((v, cov)) => [v[0] * cov, v[1] * cov, v[2] * cov, cov], + None => [0.0; 4], + }, + (None, None) => [0.0; 4], + }; + (x, y, v) + }) + .collect() + }) + .collect(); + // Scatter into the region, a row of tiles at a time (the region is tile aligned). + let n = (w * h) as usize; + let mut orig = vec![0.0f32; n * comps]; + let mut cover = vec![0.0f32; n]; + let row_tiles = (rx1.div_ceil(TILE) - rx0 / TILE).max(1) as usize; + let band = (TILE * w) as usize; + orig.par_chunks_mut(band * comps).zip(cover.par_chunks_mut(band)).zip(parts.par_chunks(row_tiles)).for_each(|((orig, cover), row)| { + for &(x, y, v) in row.iter().flatten() { + let i = (((y - ry0) % TILE) * w + (x - rx0)) as usize; + if let (Some(c), Some(px)) = (cover.get_mut(i), orig.get_mut(i * comps..(i + 1) * comps)) { + *c = 1.0; + px.copy_from_slice(&v[..comps]); + } + } + }); + // Weighted so uncovered texels don't bleed in. + let (wu, hu, ru) = (w as usize, h as usize, r as usize); + let mut weights = cover; + blur(&mut weights, wu, hu, ru); + let mut data = orig.clone(); + for p in 0..comps { + let mut vals: Vec = orig.par_chunks(comps).map(|px| px.get(p).copied().unwrap_or(0.0)).collect(); + blur(&mut vals, wu, hu, ru); + data.par_chunks_mut(comps).zip(vals.par_iter()).zip(weights.par_iter()).for_each(|((px, v), wt)| { + if *wt > 1e-6 + && let Some(slot) = px.get_mut(p) + { + let (o, blurred) = (*slot, v / wt); + let filtered = match sharpen { + Some(amount) => o + amount * (o - blurred), + None => blurred, + }; + *slot = o + (filtered - o) * opacity; + } + }); + } + data.par_chunks_mut(comps).for_each(|px| match px { + [v] => *v = v.clamp(0.0, 1.0), + [r, g, b, cov] => { + *cov = cov.clamp(0.0, 1.0); + let inv = if *cov > 1e-5 { 1.0 / *cov } else { 0.0 }; + *r *= inv; + *g *= inv; + *b *= inv; + } + _ => {} + }); + Some(Field { x0: rx0, y0: ry0, w, h, comps, data }) +} + +/// Precompute the neighbourhood-filtered masks and content channels of every layer that needs +/// one, over `tiles` plus the filter's reach. Walks bottom → top so each field sees the fields +/// (and anchors) below it. Cheap when no layer has a blur or sharpen. +pub fn neighbourhood_fields(inp: &Inputs, channels: &[Channel], tiles: &[(u32, u32)]) -> Fields { + let stack = inp.project.texture_set(inp.ts).map(|s| s.stack.as_slice()).unwrap_or_default(); + fields_of(inp, channels, stack, tiles) +} + +/// [`neighbourhood_fields`] of the layers drawn by `list` only. +fn fields_of(inp: &Inputs, channels: &[Channel], list: &[LayerId], tiles: &[(u32, u32)]) -> Fields { + let mut out = Fields::new(); + if tiles.is_empty() || inp.gbuf.width == 0 { + return out; + } + let res = inp.gbuf.width; + let mut order = Vec::new(); + draw_order(inp.project, list, 0, &mut order); + for id in order { + let Some(layer) = inp.project.content_layer(id) else { continue }; + if let Some(m) = layer_mask(inp.project, id).filter(|m| m.enabled && neighbourhood(&m.effects, res).is_some()) + && let Some(f) = field(inp, channels, &out, id, Job::Mask(m), tiles) + { + out.insert(FieldKey::Mask(id), f); + } + if layer.is_group() || neighbourhood(&layer.content_effects, res).is_none() { + continue; + } + for ch in channels.iter().filter(|c| layer.channels.contains_key(c)) { + if let Some(f) = field(inp, channels, &out, id, Job::Content(*ch), tiles) { + out.insert(FieldKey::Content(id, *ch), f); + } + } + } + out +} + +struct Node<'a> { + id: LayerId, + content: Content<'a>, + chans: Vec>, + mask: Option>, + /// Visible anchor points of the layer (recorded after it is applied). + anchors: Vec, + /// The node or one of its children records an anchor. + has_anchor: bool, + height_mask: HeightMask, +} + +/// Plans of the visible effects of a stack: mask effects (`channel` None) or the content +/// effects of one channel (paint effects then read that channel's pixels). +fn effect_plans<'a>(inp: &Inputs<'a>, effects: &'a [Effect], tx: u32, ty: u32, channel: Option) -> Vec> { + effects + .iter() + .filter(|e| e.visible) + .map(|e| { + let (img, target) = match channel { + Some(c) => (inp.pixels.layer(e.id, c), PaintTarget::Layer(e.id)), + None => (inp.pixels.masks.get(&e.id), PaintTarget::Mask(e.id)), + }; + EffectPlan { + kind: &e.kind, + blend: e.blend, + opacity: e.opacity, + data: matches!(e.kind, EffectKind::Paint).then(|| img.filter(|i| i.width() == inp.gbuf.width).and_then(|i| i.tile(tx, ty))).flatten(), + preview: inp.preview.is_some_and(|p| p.target == target), + } + }) + .collect() +} + +fn mask_plan<'a>(inp: &Inputs<'a>, id: LayerId, mask: &'a Mask, tx: u32, ty: u32, fields: Option<&'a Fields>) -> Option> { + if !mask.enabled { + return None; + } + let background = if mask.background == MaskBackground::White { 1.0 } else { 0.0 }; + let effects = effect_plans(inp, &mask.effects, tx, ty, None); + let start = fields.and_then(|f| f.get(&FieldKey::Mask(id))).and_then(|field| neighbourhood(&mask.effects, inp.gbuf.width).map(|(k, _, _)| (k, field))); + Some(MaskPlan { background, effects, start }) +} + +fn plan<'a>(inp: &Inputs<'a>, list: &[LayerId], channels: &[Channel], tx: u32, ty: u32, depth: usize, fields: Option<&'a Fields>) -> Vec> { + let mut out = Vec::new(); + if depth > texturecraft_core::project::MAX_DEPTH { + return out; + } + for id in list { + let Some(own): Option<&'a Layer> = inp.project.layers.get(id) else { continue }; + // Instances draw their source's content (a missing source draws nothing). + let Some(layer): Option<&'a Layer> = inp.project.content_layer(*id) else { continue }; + if !own.visible { + continue; + } + let paint = matches!(layer.kind, LayerKind::Paint); + let fx = !layer.is_group() && layer.content_effects.iter().any(|e| e.visible); + let fx_start = if fx { neighbourhood(&layer.content_effects, inp.gbuf.width).map(|n| n.0) } else { None }; + let chans = channels + .iter() + .filter_map(|c| { + let b = layer.blend(*c)?; + if b.mode == BlendMode::Disable || b.opacity <= 0.0 { + return None; + } + // shortcut: an instance in a set of another resolution draws no painted pixels; + // resample the source's pixels if instances across sizes become common. + let data = + if paint { inp.pixels.layer(layer.id, *c).filter(|img| img.width() == inp.gbuf.width).and_then(|img| img.tile(tx, ty)) } else { None }; + let effects = if fx { effect_plans(inp, &layer.content_effects, tx, ty, Some(*c)) } else { Vec::new() }; + let start = fx_start.zip(fields.and_then(|f| f.get(&FieldKey::Content(*id, *c)))); + Some(ChanPlan { ch: c.index(), kind: c.kind(), comps: c.components(), blend: b.mode, opacity: b.opacity.clamp(0.0, 1.0), data, effects, start }) + }) + .collect::>(); + let content = match &layer.kind { + LayerKind::Paint => Content::Paint { preview: inp.preview.is_some_and(|p| p.target == PaintTarget::Layer(layer.id)) }, + LayerKind::Fill(f) => Content::Fill(f), + LayerKind::Group { children, .. } => Content::Group(plan(inp, children, channels, tx, ty, depth + 1, fields)), + // `content_layer` already followed instance links. + LayerKind::Instance { .. } => continue, + }; + // A paint layer with nothing painted (and not being painted) or added by its content + // effects contributes nothing. + if let Content::Paint { preview: false } = content + && chans.iter().all(|c| c.data.is_none() && c.effects.is_empty()) + { + continue; + } + if chans.is_empty() { + continue; + } + let mask = layer_mask(inp.project, *id).and_then(|m| mask_plan(inp, *id, m, tx, ty, fields)); + let anchors: Vec = + if fx { layer.content_effects.iter().filter(|e| e.visible && matches!(e.kind, EffectKind::Anchor)).map(|e| e.id).collect() } else { Vec::new() }; + let has_anchor = !anchors.is_empty() || matches!(&content, Content::Group(nodes) if nodes.iter().any(|n| n.has_anchor)); + out.push(Node { id: *id, content, chans, mask, anchors, has_anchor, height_mask: layer.height_mask }); + } + out +} + +/// Apply a 0..1 function to each component of a channel value: signed values map through +/// 0..1, normals are left alone. +fn per_unit(kind: ChannelKind, v: [f32; 3], f: impl Fn(f32) -> f32) -> [f32; 3] { + match kind { + ChannelKind::NormalMap => v, + ChannelKind::Signed => v.map(|x| f(x * 0.5 + 0.5) * 2.0 - 1.0), + ChannelKind::Color | ChannelKind::Scalar => v.map(f), + } +} + +#[inline] +fn blend_chan(c: &ChanPlan, mode: BlendMode, a: [f32; 3], b: [f32; 3]) -> [f32; 3] { + if c.comps == 3 { blend3(mode, a, b) } else { [blend1(mode, a[0], b[0]); 3] } +} + +/// Lay value `p` with weight `a` over a straight value and coverage (premultiplied "over"). +fn over(c: &ChanPlan, mode: BlendMode, v: [f32; 3], cov: f32, p: [f32; 3], a: f32) -> ([f32; 3], f32) { + if a <= 0.0 { + return (v, cov); + } + let b = if cov > 0.0 { blend_chan(c, mode, v, p) } else { p }; + let nc = a + cov * (1.0 - a); + (mix3(v, b, a / nc.max(1e-5)), nc) +} + +/// Per-texel context. +struct Texel<'a, 'b> { + inp: &'b Inputs<'a>, + x: u32, + y: u32, + /// Offset of this texel inside a tile (in texels). + o: usize, + res: u32, + coords: Option, + stroke: f32, + /// `eval` stops when it reaches this layer. + stop: Option, + /// Stack values recorded by the anchor points evaluated so far. + anchors: Vec<(LayerId, [[f32; 3]; NCH])>, +} + +impl<'a, 'b> Texel<'a, 'b> { + fn new(inp: &'b Inputs<'a>, x: u32, y: u32, o: usize, stroke: f32) -> Self { + Texel { inp, x, y, o, res: inp.gbuf.width, coords: None, stroke, stop: None, anchors: Vec::new() } + } + + fn coords(&mut self) -> Coords { + if let Some(c) = self.coords { + return c; + } + let g = self.inp.gbuf; + let i = (self.y * g.width + self.x) as usize; + let (lo, hi) = self.inp.bounds; + let center = (lo + hi) * 0.5; + let r = ((hi - lo).length() * 0.5).max(1e-4); + let c = match g.surface(self.inp.mesh, i) { + Some(s) => Coords { uv: s.uv, pos: (s.pos - center) / r, nrm: s.nrm }, + None => Coords { uv: Vec2::new((self.x as f32 + 0.5) / self.res as f32, (self.y as f32 + 0.5) / self.res as f32), pos: Vec3::ZERO, nrm: Vec3::Y }, + }; + self.coords = Some(c); + c + } + + /// World position of this texel (None when uncovered). + fn world(&self) -> Option { + let i = (self.y * self.inp.gbuf.width + self.x) as usize; + self.inp.gbuf.surface(self.inp.mesh, i).map(|s| s.pos) + } + + fn baked(&self, m: BakedMap) -> Option { + self.inp.baked.scalar(m, self.x, self.y, self.res) + } + + fn source(&mut self, s: &Source, proj: &Projection, kind: ChannelKind) -> [f32; 3] { + match s { + Source::Uniform(v) => *v, + Source::Procedural { pattern, low, high } => { + let c = self.coords(); + let t = procedural(pattern, proj, &c); + mix3(*low, *high, t) + } + Source::Image { name } => { + let Some(img) = self.inp.images.get(name) else { return [0.5; 3] }; + let c = self.coords(); + let mut acc = [0.0f32; 4]; + for (uv, w) in image_samples(proj, &c).into_iter().filter(|(_, w)| *w > 0.0) { + let s = img.sample(uv.x, uv.y); + for k in 0..4 { + acc[k] += s[k] * w; + } + } + match kind { + ChannelKind::Color if img.srgb => [acc[0], acc[1], acc[2]].map(texturecraft_texel::srgb_to_linear), + ChannelKind::Color | ChannelKind::NormalMap => [acc[0], acc[1], acc[2]], + ChannelKind::Scalar => [acc[0]; 3], + ChannelKind::Signed => [acc[0] * 2.0 - 1.0; 3], + } + } + Source::Anchor { anchor, channel } => { + // An anchor not evaluated yet (above this layer, hidden) reads the channel default. + let v = self.anchors.iter().rev().find(|(id, _)| id == anchor).and_then(|(_, acc)| acc.get(channel.index()).copied()); + let v = v.unwrap_or_else(|| channel.default_value()); + let gray = matches!(channel.kind(), ChannelKind::Color | ChannelKind::NormalMap) && matches!(kind, ChannelKind::Scalar | ChannelKind::Signed); + if gray { [lum(v); 3] } else { v } + } + } + } + + fn generator(&mut self, g: &Generator) -> f32 { + let c = self.coords(); + let s = match g.kind { + GeneratorKind::EdgeWear => (self.baked(BakedMap::Curvature).unwrap_or(0.5) - 0.5) * 2.0, + GeneratorKind::Curvature => self.baked(BakedMap::Curvature).unwrap_or(0.5), + GeneratorKind::Dirt => 1.0 - self.baked(BakedMap::AmbientOcclusion).unwrap_or(1.0), + GeneratorKind::AmbientOcclusion => self.baked(BakedMap::AmbientOcclusion).unwrap_or(1.0), + GeneratorKind::ThinAreas => 1.0 - self.baked(BakedMap::Thickness).unwrap_or(1.0), + GeneratorKind::Position => c.pos.dot(Vec3::from(g.direction).try_normalize().unwrap_or(Vec3::Y)) * 0.5 + 0.5, + GeneratorKind::Direction => c.nrm.dot(Vec3::from(g.direction).try_normalize().unwrap_or(Vec3::Y)) * 0.5 + 0.5, + }; + let s = if g.noise_amount > 0.0 { s + (world_noise(c.pos, g.noise_scale, g.seed) - 0.5) * g.noise_amount } else { s }; + let th = 1.0 - g.level.clamp(0.0, 1.0); + let soft = g.softness.max(1e-3); + let t = ((s - (th - soft)) / (2.0 * soft)).clamp(0.0, 1.0); + let v = t * t * (3.0 - 2.0 * t); + if g.invert { 1.0 - v } else { v } + } + + fn mask(&mut self, m: &MaskPlan) -> f32 { + let mut v = m.background; + let mut skip = 0; + if let Some((k, field)) = m.start + && let Some(f) = field.get(self.x, self.y).and_then(|d| d.first().copied()) + { + v = f; + skip = k + 1; + } + for e in m.effects.iter().skip(skip) { + let o = e.opacity.clamp(0.0, 1.0); + match e.kind { + EffectKind::Paint => { + let (mut pv, mut cov) = match e.data { + Some(d) => (from_u16(d.get(self.o * 2).copied().unwrap_or(0)), from_u16(d.get(self.o * 2 + 1).copied().unwrap_or(0))), + None => (0.0, 0.0), + }; + if e.preview + && let Some(p) = self.inp.preview + { + let a = (self.stroke * p.opacity).clamp(0.0, 1.0); + if p.erase { + pv *= 1.0 - a; + cov *= 1.0 - a; + } else { + pv = p.mask_value * a + pv * (1.0 - a); + cov = a + cov * (1.0 - a); + } + } + if cov > 0.0 { + let val = pv / cov.max(1e-5); + v += (blend1(e.blend, v, val) - v) * cov * o; + } + } + EffectKind::Fill { source, projection } => { + let val = self.source(source, projection, ChannelKind::Scalar)[0]; + v += (blend1(e.blend, v, val) - v) * o; + } + EffectKind::Generator(g) => { + let val = self.generator(g); + v += (blend1(e.blend, v, val) - v) * o; + } + EffectKind::Levels(l) => v += (l.apply(v) - v) * o, + EffectKind::Filter(f) => { + let val = match f { + Filter::Invert => 1.0 - v, + Filter::Threshold { level } => { + if v >= *level { + 1.0 + } else { + 0.0 + } + } + // A mask is gray: only its lightness changes. + Filter::Hsl { lightness, .. } => hsl_adjust([v; 3], 0.0, 0.0, *lightness)[0], + // Neighbourhood filters come precomputed through `MaskPlan::start`. + Filter::Blur { .. } | Filter::Sharpen { .. } => v, + }; + v += (val - v) * o; + } + EffectKind::ColorSelection { colors, tolerance } => { + let id = self.inp.baked.sample(BakedMap::Id, self.x, self.y, self.res); + let hit = id.is_some_and(|c| colors.iter().any(|k| (k[0] - c[0]).abs().max((k[1] - c[1]).abs()).max((k[2] - c[2]).abs()) <= *tolerance)); + let val = if hit { 1.0 } else { 0.0 }; + v += (blend1(e.blend, v, val) - v) * o; + } + EffectKind::Compare { op, value, tolerance } => { + let pass = match op { + CompareOp::LesserThan => v < *value, + CompareOp::GreaterThan => v > *value, + CompareOp::WithinTolerance => (v - value).abs() <= *tolerance, + }; + let val = if pass { 1.0 } else { 0.0 }; + v += (val - v) * o; + } + // Content-only effects. + EffectKind::Material(_) | EffectKind::Anchor => {} + } + } + v.clamp(0.0, 1.0) + } + + /// Composite `nodes` over `acc`, recording anchors. Returns true when it reached the `stop` + /// layer (`acc` then holds the stack below it). + fn eval(&mut self, nodes: &[Node], acc: &mut [[f32; 3]; NCH]) -> bool { + for n in nodes { + if self.stop == Some(n.id) { + return true; + } + let m = self.node_mask(n); + match &n.content { + // A masked-out group still runs when it records anchors (they hold its inner + // stack) or may hold the stop layer. + Content::Group(children) if m > 0.0 || n.has_anchor || self.stop.is_some() => { + let mut inner = *acc; + if self.eval(children, &mut inner) { + return true; + } + if m > 0.0 { + for c in &n.chans { + if let (Some(a), Some(b)) = (acc.get(c.ch).copied(), inner.get(c.ch).copied()) + && let Some(slot) = acc.get_mut(c.ch) + { + *slot = mix3(a, b, c.opacity * m); + } + } + } + } + Content::Fill(_) | Content::Paint { .. } if m > 0.0 => { + for c in &n.chans { + if let Some((v, cov)) = self.content(&n.content, c) { + apply(acc, c, v, cov, m); + } + } + } + _ => {} + } + for a in &n.anchors { + self.anchors.push((*a, *acc)); + } + } + false + } + + /// The mask of node `n` at this texel, combined with the layer's height when it masks with + /// height. + fn node_mask(&mut self, n: &Node) -> f32 { + let m = match &n.mask { + Some(mp) => self.mask(mp), + None => 1.0, + }; + if !n.height_mask.enabled || m <= 0.0 || m >= 1.0 { + return m; + } + let height = Channel::Height.index(); + let h = n.chans.iter().find(|c| c.ch == height).and_then(|c| self.content(&n.content, c)).map_or(0.0, |(v, _)| v[0]); + n.height_mask.apply(m, h) + } + + /// Record the anchors of the stack below layer `id` (`full` is the planned stack), to + /// evaluate that layer on its own. + fn anchors_below(&mut self, full: &[Node], id: LayerId) { + self.anchors.clear(); + self.stop = Some(id); + let mut acc = Channel::ALL.map(Channel::default_value); + self.eval(full, &mut acc); + self.stop = None; + } + + /// Straight value and coverage of one channel of a paint or fill layer at this texel + /// (content effects and live stroke preview included). None where the layer is empty. + fn content(&mut self, content: &Content, c: &ChanPlan) -> Option<([f32; 3], f32)> { + let (mut v, mut cov, skip) = match c.start.and_then(|(k, f)| f.get(self.x, self.y).map(|d| (k, d))) { + Some((k, d)) => { + let px = |i: usize| d.get(i).copied().unwrap_or(0.0); + ([px(0), px(1), px(2)], px(3), k + 1) + } + None => { + let (v, cov) = match content { + Content::Fill(f) => { + let ch = Channel::ALL.get(c.ch).copied()?; + // A channel without a source fills with its default (no clone per texel). + let v = match f.sources.get(&ch) { + Some(s) => self.source(s, &f.projection, ch.kind()), + None => ch.default_value(), + }; + (v, 1.0) + } + Content::Paint { preview } => self.painted(c.data, c, *preview), + Content::Group(_) => return None, + }; + (v, cov, 0) + } + }; + for e in c.effects.iter().skip(skip) { + (v, cov) = self.content_effect(e, c, v, cov); + } + (cov > 0.0).then_some((v, cov.min(1.0))) + } + + /// Straight value and coverage of painted data of one channel (premultiplied values plus + /// coverage per texel), with the live stroke when `preview`. + fn painted(&mut self, data: Option<&[u16]>, c: &ChanPlan, preview: bool) -> ([f32; 3], f32) { + let pv = if preview { self.inp.preview } else { None }; + let mut sa = pv.map(|p| (self.stroke * p.opacity).clamp(0.0, 1.0)).unwrap_or(0.0); + // Projection: the stencil's alpha shapes the stroke and its color is the base color. + let stencil = match pv.and_then(|p| p.stencil.as_ref()) { + Some(st) if sa > 0.0 => { + let s = self.world().and_then(|w| st.sample_world(w)); + sa *= s.map(|(_, a)| a).unwrap_or(0.0); + s.map(|(c, _)| c) + } + _ => None, + }; + let mut val = [0.0f32; 3]; + let mut cov = 0.0f32; + if let Some(d) = data { + let base = self.o * (c.comps + 1); + for (k, slot) in val.iter_mut().take(c.comps).enumerate() { + *slot = decode(c.kind, d.get(base + k).copied().unwrap_or(0)); + } + cov = from_u16(d.get(base + c.comps).copied().unwrap_or(0)); + } + if let Some(p) = pv + && sa > 0.0 + { + if p.erase { + val = val.map(|v| v * (1.0 - sa)); + cov *= 1.0 - sa; + } else if let Some(ch) = Channel::ALL.get(c.ch) + && let Some(pval) = p.values.get(ch) + { + let pval = match stencil { + Some(col) if *ch == Channel::BaseColor => col, + _ => match p.carried.get(ch) { + Some(img) => { + let raw = img.get(self.x, self.y).map(|v| decode(c.kind, v)); + [raw[0], raw[1], raw[2]] + } + None => *pval, + }, + }; + for k in 0..c.comps { + val[k] = pval[k] * sa + val[k] * (1.0 - sa); + } + cov = sa + cov * (1.0 - sa); + } + } + if cov <= 0.0 { + return ([0.0; 3], 0.0); + } + let inv = 1.0 / cov.max(1e-5); + let v = if c.comps == 3 { val.map(|x| x * inv) } else { [val[0] * inv; 3] }; + (v, cov.min(1.0)) + } + + /// Apply one content effect to a channel's straight value and coverage. + fn content_effect(&mut self, e: &EffectPlan, c: &ChanPlan, v: [f32; 3], cov: f32) -> ([f32; 3], f32) { + let o = e.opacity.clamp(0.0, 1.0); + match e.kind { + EffectKind::Paint => { + let (p, pc) = self.painted(e.data, c, e.preview); + over(c, e.blend, v, cov, p, pc * o) + } + EffectKind::Material(f) => match Channel::ALL.get(c.ch).and_then(|ch| f.sources.get(ch).map(|s| (*ch, s))) { + Some((ch, s)) => { + let p = self.source(s, &f.projection, ch.kind()); + over(c, e.blend, v, cov, p, o) + } + None => (v, cov), + }, + EffectKind::Levels(l) => (mix3(v, per_unit(c.kind, v, |x| l.apply(x)), o), cov), + EffectKind::Filter(f) => { + let out = match f { + Filter::Invert => per_unit(c.kind, v, |x| 1.0 - x), + Filter::Threshold { level } => per_unit(c.kind, v, |x| if x >= *level { 1.0 } else { 0.0 }), + Filter::Hsl { hue, saturation, lightness } => match c.kind { + ChannelKind::Color => hsl_adjust(v, *hue, *saturation, *lightness), + _ => per_unit(c.kind, v, |x| hsl_adjust([x; 3], 0.0, 0.0, *lightness)[0]), + }, + // Neighbourhood filters come precomputed through `ChanPlan::start`. + Filter::Blur { .. } | Filter::Sharpen { .. } => v, + }; + (mix3(v, out, o), cov) + } + // Anchors are recorded by `eval`; mask-only effects leave content as it is. + EffectKind::Anchor | EffectKind::Fill { .. } | EffectKind::Generator(_) | EffectKind::ColorSelection { .. } | EffectKind::Compare { .. } => (v, cov), + } + } +} + +#[inline] +fn apply(acc: &mut [[f32; 3]; NCH], c: &ChanPlan, v: [f32; 3], cov: f32, mask: f32) { + let Some(a) = acc.get(c.ch).copied() else { return }; + let w = if c.blend == BlendMode::Replace { c.opacity * mask } else { cov * c.opacity * mask }; + let blended = blend_chan(c, c.blend, a, v); + if let Some(slot) = acc.get_mut(c.ch) { + *slot = mix3(a, blended, w); + } +} + +/// Composite `tiles` of texture set `inp.ts` into `out` (other tiles are left as they are). +pub fn composite_tiles(inp: &Inputs, out: &mut Composite, tiles: &[(u32, u32)]) { + composite_tiles_cached(inp, out, tiles, None); +} + +/// Tiles per side of the blocks a composite works through (bounds neighbourhood-filter memory). +const BLOCK: u32 = 16; + +/// [`composite_tiles`], serving the stack below the hot layer from `below` where it can (and +/// filling it). Results are identical to [`composite_tiles`]. +pub fn composite_tiles_cached(inp: &Inputs, out: &mut Composite, tiles: &[(u32, u32)], mut below: Option<&mut BelowCache>) { + let Ok(set) = inp.project.texture_set(inp.ts) else { return }; + let res = out.resolution; + if inp.gbuf.width != res || inp.gbuf.height != res { + return; + } + let split = below.as_deref_mut().and_then(|b| b.prepare(inp)); + // A pass over more tiles than the cache holds records only what fits: recording the rest + // would just evict it again. + let tile_bytes = TILE_AREA * set.channel_list().iter().map(|c| c.components()).sum::() * std::mem::size_of::(); + let fits = below.as_deref().is_some_and(|b| tiles.len().max(b.pass) <= b.budget / tile_bytes.max(1)); + let mut blocks: BTreeMap<(u32, u32), Vec<(u32, u32)>> = BTreeMap::new(); + for t in tiles { + blocks.entry((t.1 / BLOCK, t.0 / BLOCK)).or_default().push(*t); + } + for block in blocks.values() { + let quota = match below.as_deref() { + Some(_) if fits => usize::MAX, + Some(b) => b.budget.saturating_sub(b.bytes()) / tile_bytes.max(1), + None => 0, + }; + let snaps = composite_block(inp, &set.stack, out, block, below.as_deref().zip(split), quota); + if let Some(b) = below.as_deref_mut() { + for (t, snap) in snaps { + b.insert(t, snap); + } + } + } +} + +/// Rows of a tile composited as one parallel task. +const BAND: u32 = 16; + +/// One band of a tile: per-channel buffers, the stack-below values to cache (empty when not +/// recorded) and whether any texel is covered. +type BandResult = (Vec>, Vec, bool); + +/// Composite one block of tiles; returns the stack-below values to cache (for at most `quota` +/// tiles). +fn composite_block( + inp: &Inputs, + stack: &[LayerId], + out: &mut Composite, + tiles: &[(u32, u32)], + below: Option<(&BelowCache, usize)>, + quota: usize, +) -> Vec<((u32, u32), Vec)> { + let channels: Vec = inp.project.texture_set(inp.ts).map(|s| s.channel_list()).unwrap_or_default(); + let res = out.resolution; + // Layers below the split are only evaluated on tiles the cache lacks. + let (lo, hi) = stack.split_at(below.map_or(0, |(_, i)| i.min(stack.len()))); + let cached = |t: (u32, u32)| below.and_then(|(b, _)| b.tile(t)); + let fresh: Vec<(u32, u32)> = tiles.iter().copied().filter(|t| cached(*t).is_none()).collect(); + let recorded: std::collections::BTreeSet<(u32, u32)> = if lo.is_empty() { Default::default() } else { fresh.iter().copied().take(quota).collect() }; + let mut fields = fields_of(inp, &channels, lo, &fresh); + fields.extend(fields_of(inp, &channels, hi, tiles)); + let stride: usize = channels.iter().map(|c| c.components()).sum(); + // Tiles split into bands of rows, so a handful of tiles still keeps every thread busy. + let bands = TILE / BAND; + let tasks: Vec<((u32, u32), u32)> = tiles.iter().flat_map(|t| (0..bands).map(move |b| (*t, b))).collect(); + let results: Vec = tasks + .par_iter() + .map(|&((tx, ty), band)| { + let cached = cached((tx, ty)); + let record = recorded.contains(&(tx, ty)); + let lo_nodes = if cached.is_none() { plan(inp, lo, &channels, tx, ty, 0, Some(&fields)) } else { Vec::new() }; + let nodes = plan(inp, hi, &channels, tx, ty, 0, Some(&fields)); + let rows = (BAND * TILE) as usize; + let mut snap = if record { vec![0.0f32; rows * stride] } else { Vec::new() }; + let preview_tile = inp.preview.and_then(|p| p.alpha.tile(tx, ty)); + let mut bufs: Vec> = channels.iter().map(|c| vec![0u16; rows * c.components()]).collect(); + let defaults: [[f32; 3]; NCH] = Channel::ALL.map(Channel::default_value); + let mut anchors = Vec::new(); + let mut any = false; + for ly in band * BAND..(band + 1) * BAND { + let y = ty * TILE + ly; + if y >= res { + break; + } + for lx in 0..TILE { + let x = tx * TILE + lx; + if x >= res { + break; + } + let gi = (y * res + x) as usize; + // Offset in the tile, and in this band. + let o = (ly * TILE + lx) as usize; + let ob = ((ly - band * BAND) * TILE + lx) as usize; + let covered = inp.gbuf.tri.get(gi).is_some_and(|t| *t != NO_TRI); + let mut acc = defaults; + if covered { + any = true; + if let Some(c) = cached { + load_below(c, &channels, stride, o, &mut acc); + } + let mut tex = Texel::new(inp, x, y, o, stroke_at(preview_tile, o)); + // Reuse one anchor buffer per band. + tex.anchors = std::mem::take(&mut anchors); + tex.eval(&lo_nodes, &mut acc); + if record { + store_below(&mut snap, &channels, stride, ob, &acc); + } + tex.eval(&nodes, &mut acc); + anchors = tex.anchors; + anchors.clear(); + } + for (c, buf) in channels.iter().zip(&mut bufs) { + let v = acc.get(c.index()).copied().unwrap_or([0.0; 3]); + let n = c.components(); + for (k, x) in v.iter().take(n).enumerate() { + let enc = if c.kind() == ChannelKind::Signed { to_u16_signed(*x) } else { to_u16(*x) }; + if let Some(slot) = buf.get_mut(ob * n + k) { + *slot = enc; + } + } + } + } + } + (bufs, snap, any) + }) + .collect(); + // Join the bands of each tile (in parallel; uncovered tiles are freed). + type Joined = (Vec>>>, Option>); + let joined: Vec = results + .par_chunks(bands as usize) + .map(|parts| { + let any = parts.iter().any(|p| p.2); + let data = (0..channels.len()) + .map(|k| { + any.then(|| { + let mut v = Vec::with_capacity(parts.iter().map(|p| p.0.get(k).map_or(0, Vec::len)).sum()); + for p in parts { + v.extend_from_slice(p.0.get(k).map_or(&[][..], Vec::as_slice)); + } + std::sync::Arc::new(v) + }) + }) + .collect(); + let snap = parts.first().is_some_and(|p| !p.1.is_empty()).then(|| parts.iter().flat_map(|p| p.1.as_slice()).copied().collect()); + (data, snap) + }) + .collect(); + let mut snaps = Vec::new(); + for (&(tx, ty), (data, snap)) in tiles.iter().zip(joined) { + for (c, d) in channels.iter().zip(data) { + if let Some(img) = out.channels.get_mut(c) { + img.set_tile(tx, ty, d); + } + } + if let Some(snap) = snap { + snaps.push(((tx, ty), snap)); + } + } + snaps +} + +/// Restore the cached stack value of texel `o`. Scalars are cached once: only their first +/// component is ever read. +fn load_below(cache: &[f32], channels: &[Channel], stride: usize, o: usize, acc: &mut [[f32; 3]; NCH]) { + let mut i = o * stride; + for c in channels { + let n = c.components(); + if let (Some(src), Some(slot)) = (cache.get(i..i + n), acc.get_mut(c.index())) { + *slot = if n == 3 { [src[0], src[1], src[2]] } else { [src[0]; 3] }; + } + i += n; + } +} + +fn store_below(cache: &mut [f32], channels: &[Channel], stride: usize, o: usize, acc: &[[f32; 3]; NCH]) { + let mut i = o * stride; + for c in channels { + let n = c.components(); + if let (Some(dst), Some(v)) = (cache.get_mut(i..i + n), acc.get(c.index())) { + dst.copy_from_slice(&v[..n]); + } + i += n; + } +} + +/// UV padding for display: fill uncovered texels in `tiles` and their neighbours from their +/// nearest covered texel. Returns the tiles it wrote. +pub fn pad_tiles(out: &mut Composite, dmap: &DilationMap, tiles: &[(u32, u32)]) -> std::collections::BTreeSet<(u32, u32)> { + let mut written = std::collections::BTreeSet::new(); + let res = out.resolution; + if dmap.width != res { + return written; + } + let n = res.div_ceil(TILE) as i64; + let mut set = std::collections::BTreeSet::new(); + for &(tx, ty) in tiles { + for dy in -1..=1i64 { + for dx in -1..=1i64 { + let (x, y) = (tx as i64 + dx, ty as i64 + dy); + if x >= 0 && y >= 0 && x < n && y < n { + set.insert((x as u32, y as u32)); + } + } + } + } + let set: Vec<(u32, u32)> = set.into_iter().collect(); + for img in out.channels.values_mut() { + let comps = img.comps(); + let src: &TileImage = img; + // Padding writes only uncovered texels and reads only covered ones, so tiles pad + // independently (in parallel) from the unpadded image. + let padded: Vec<((u32, u32), Vec)> = set + .par_iter() + .filter_map(|&(tx, ty)| { + let mut data: Option> = None; + for ly in 0..TILE { + for lx in 0..TILE { + let (x, y) = (tx * TILE + lx, ty * TILE + ly); + if x >= res || y >= res { + continue; + } + let Some((sx, sy)) = dmap.source(x, y) else { continue }; + if (sx, sy) == (x, y) { + continue; + } + let v = src.get(sx, sy); + let d = data.get_or_insert_with(|| src.tile(tx, ty).map_or_else(|| vec![0; TILE_AREA * comps], <[u16]>::to_vec)); + let o = (ly * TILE + lx) as usize * comps; + if let Some(px) = d.get_mut(o..o + comps) { + px.copy_from_slice(&v[..comps]); + } + } + } + Some(((tx, ty), data?)) + }) + .collect(); + for ((tx, ty), d) in padded { + img.set_tile(tx, ty, Some(std::sync::Arc::new(d))); + written.insert((tx, ty)); + } + } + written +} + +/// The mask of layer `id` as an 8-bit grayscale image of `size × size` (nearest texel of the +/// texture set; uncovered texels black). None when the layer has no enabled mask. +pub fn mask_image(inp: &Inputs, id: LayerId, size: u32) -> Option> { + let mask = layer_mask(inp.project, id).filter(|m| m.enabled)?; + let channels = inp.project.texture_set(inp.ts).map(|t| t.channel_list()).unwrap_or_default(); + let res = inp.gbuf.width; + let all = all_tiles(res); + let fields = neighbourhood_fields(inp, &channels, &all); + let tiles: Vec<(u32, u32, Vec)> = all + .par_iter() + .filter_map(|&(tx, ty)| { + let mp = mask_plan(inp, id, mask, tx, ty, Some(&fields))?; + let full = anchor_plan(inp, id, &channels, tx, ty, Some(&fields)); + let mut buf = vec![0u8; TILE_AREA]; + for (x, y, o) in tile_texels(inp.gbuf, tx, ty) { + let mut tex = Texel::new(inp, x, y, o, 0.0); + if !full.is_empty() { + tex.anchors_below(&full, id); + } + if let Some(b) = buf.get_mut(o) { + *b = (tex.mask(&mp) * 255.0 + 0.5) as u8; + } + } + Some((tx, ty, buf)) + }) + .collect(); + let size = size.max(1); + let mut out = vec![0u8; (size * size) as usize]; + let lookup: std::collections::HashMap<(u32, u32), &Vec> = tiles.iter().map(|(x, y, b)| ((*x, *y), b)).collect(); + for y in 0..size { + for x in 0..size { + let (sx, sy) = ((x as u64 * res as u64 / size as u64) as u32, (y as u64 * res as u64 / size as u64) as u32); + if let Some(t) = lookup.get(&(sx / TILE, sy / TILE)) + && let Some(v) = t.get(((sy % TILE) * TILE + sx % TILE) as usize) + && let Some(d) = out.get_mut((y * size + x) as usize) + { + *d = *v; + } + } + } + Some(out) +} + +/// One flattened tile of one channel: (channel, tile, premultiplied value + coverage data). +pub type FlatTile = (Channel, (u32, u32), Vec); + +/// Flatten one paint or fill layer: its content (with content effects) times its mask, as +/// premultiplied (value, coverage) tiles per enabled channel, ready to become a plain paint +/// layer. Groups are not supported (None). +pub fn flatten_layer(inp: &Inputs, id: LayerId, tiles: &[(u32, u32)]) -> Option> { + let set = inp.project.texture_set(inp.ts).ok()?; + if inp.project.content_layer(id)?.is_group() { + return None; + } + let channels: Vec = set.channel_list(); + // Plan the layer forced visible so hidden layers flatten too. + let mut solo = inp.project.clone(); + if let Some(l) = solo.layers.get_mut(&id) { + l.visible = true; + } + let solo_inp = Inputs { project: &solo, preview: None, ..*inp }; + let fields = neighbourhood_fields(&solo_inp, &channels, tiles); + let out: Vec> = tiles + .par_iter() + .map(|&(tx, ty)| { + let nodes = plan(&solo_inp, &[id], &channels, tx, ty, 0, Some(&fields)); + let Some(n) = nodes.first() else { return Vec::new() }; + let full = anchor_plan(&solo_inp, id, &channels, tx, ty, Some(&fields)); + let mut bufs: Vec<(Channel, Vec, bool)> = n + .chans + .iter() + .filter_map(|c| Channel::ALL.get(c.ch).map(|ch| (*ch, vec![0u16; TILE_AREA * (c.comps + 1)], false))) + .collect(); + for (ch, buf, _) in &mut bufs { + if ch.kind() == ChannelKind::Signed { + for px in buf.chunks_exact_mut(2) { + px[0] = to_u16_signed(0.0); + } + } + } + for (x, y, o) in tile_texels(inp.gbuf, tx, ty) { + let mut tex = Texel::new(&solo_inp, x, y, o, 0.0); + if !full.is_empty() { + tex.anchors_below(&full, id); + } + let m = tex.node_mask(n); + for (c, (ch, buf, any)) in n.chans.iter().zip(bufs.iter_mut()) { + let Some((v, cov)) = tex.content(&n.content, c) else { continue }; + let a = (cov * m).clamp(0.0, 1.0); + if a <= 0.0 { + continue; + } + *any = true; + let comps = c.comps; + let Some(px) = buf.get_mut(o * (comps + 1)..(o + 1) * (comps + 1)) else { continue }; + for (slot, pv) in px.iter_mut().zip(v.iter().take(comps)) { + *slot = if ch.kind() == ChannelKind::Signed { to_u16_signed(pv * a) } else { to_u16(pv * a) }; + } + if let Some(slot) = px.get_mut(comps) { + *slot = to_u16(a); + } + } + } + bufs.into_iter().filter(|(_, _, any)| *any).map(|(ch, buf, _)| (ch, (tx, ty), buf)).collect() + }) + .collect(); + Some(out.into_iter().flatten().collect()) +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_core::{ChannelBlend, Effect, Layer, Procedural, ProceduralKind, TextureSet}; + use texturecraft_geom::primitives; + + struct Fixture { + project: Project, + mesh: Mesh, + gbuf: UvGBuffer, + pixels: PixelStore, + baked: BakedMaps, + } + + fn fixture() -> Fixture { + let mesh = primitives::plane(2.0, 2); + let gbuf = UvGBuffer::new(&mesh, 0, 64, 64); + let mut project = Project::new("t", "builtin:plane"); + project.texture_sets.push(TextureSet::new("Plane", 0, 64)); + Fixture { project, mesh, gbuf, pixels: PixelStore::default(), baked: BakedMaps::default() } + } + + fn run(f: &Fixture, preview: Option<&StrokePreview>) -> Composite { + let images = Default::default(); + let inp = Inputs { project: &f.project, ts: 0, mesh: &f.mesh, gbuf: &f.gbuf, pixels: &f.pixels, baked: &f.baked, preview, images: &images, bounds: f.mesh.bounds() }; + let mut out = Composite::new(&f.project.texture_sets[0].channel_list(), 64); + composite_tiles(&inp, &mut out, &all_tiles(64)); + out + } + + fn fill_layer(p: &mut Project, color: [f32; 3], rough: f32) -> LayerId { + let id = p.alloc_id(); + let mut fill = Fill::default(); + fill.sources.insert(Channel::BaseColor, Source::Uniform(color)); + fill.sources.insert(Channel::Roughness, Source::Uniform([rough; 3])); + let l = Layer::new(id, "Fill", LayerKind::Fill(fill), &[Channel::BaseColor, Channel::Roughness]); + p.insert_layer(0, l, None, false).unwrap() + } + + fn close(a: [f32; 3], b: [f32; 3]) -> bool { + (0..3).all(|i| (a[i] - b[i]).abs() < 2e-4) + } + + #[test] + fn empty_stack_gives_channel_defaults() { + let f = fixture(); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 10, 10), [0.5; 3])); + assert!(close(out.value(Channel::Roughness, 10, 10), [0.5; 3])); + assert!(close(out.value(Channel::Normal, 10, 10), [0.5, 0.5, 1.0])); + } + + #[test] + fn fill_layers_blend_with_opacity_and_modes() { + let mut f = fixture(); + fill_layer(&mut f.project, [1.0, 0.0, 0.0], 0.2); + let top = fill_layer(&mut f.project, [0.0, 0.0, 1.0], 0.8); + f.project.layer_mut(top).unwrap().channels.insert(Channel::BaseColor, ChannelBlend { mode: BlendMode::Normal, opacity: 0.25 }); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 5, 5), [0.75, 0.0, 0.25])); + assert!(close(out.value(Channel::Roughness, 5, 5), [0.8; 3])); + f.project.layer_mut(top).unwrap().channels.insert(Channel::BaseColor, ChannelBlend { mode: BlendMode::Multiply, opacity: 1.0 }); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 5, 5), [0.0, 0.0, 0.0])); + } + + #[test] + fn paint_layers_unpremultiply_and_preview_and_masks() { + let mut f = fixture(); + let id = f.project.alloc_id(); + let l = Layer::new(id, "Paint", LayerKind::Paint, &[Channel::BaseColor]); + f.project.insert_layer(0, l, None, false).unwrap(); + // Half-covered red texel: premul (0.5, 0, 0), coverage 0.5. + let img = f.pixels.layer_mut(id, Channel::BaseColor, 64); + img.set(3, 3, &[to_u16(0.5), 0, 0, to_u16(0.5)]); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 3, 3), [0.75, 0.25, 0.25])); + assert!(close(out.value(Channel::BaseColor, 4, 3), [0.5; 3])); + + // A live stroke painting blue at full alpha on texel (4, 3). + let mut alpha = TileImage::new(64, 64, 1); + alpha.set(4, 3, &[to_u16(1.0)]); + let pv = StrokePreview { + target: PaintTarget::Layer(id), + alpha, + opacity: 1.0, + erase: false, + values: [(Channel::BaseColor, [0.0, 0.0, 1.0])].into_iter().collect(), + mask_value: 1.0, + stencil: None, + carried: BTreeMap::new(), + }; + let out = run(&f, Some(&pv)); + assert!(close(out.value(Channel::BaseColor, 4, 3), [0.0, 0.0, 1.0])); + + // A black mask hides the layer. + f.project.layer_mut(id).unwrap().mask = Some(Mask::new(MaskBackground::Black)); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 3, 3), [0.5; 3])); + } + + #[test] + fn mask_effects_and_procedural_fills_stay_in_range() { + let mut f = fixture(); + let id = fill_layer(&mut f.project, [1.0, 1.0, 1.0], 1.0); + let eid = f.project.alloc_id(); + let mut mask = Mask::new(MaskBackground::Black); + let pattern = Procedural::new(ProceduralKind::Checker); + mask.effects.push(Effect::new( + eid, + EffectKind::Fill { source: Source::Procedural { pattern, low: [0.0; 3], high: [1.0; 3] }, projection: Projection::default() }, + )); + f.project.layer_mut(id).unwrap().mask = Some(mask); + let out = run(&f, None); + let vals: Vec = (0..64).map(|x| out.value(Channel::BaseColor, x, 20)[0]).collect(); + assert!(vals.iter().any(|v| *v > 0.99) && vals.iter().any(|v| *v < 0.51), "{vals:?}"); + } + + #[test] + fn blur_filter_softens_mask_edges() { + let mut f = fixture(); + let id = fill_layer(&mut f.project, [1.0, 1.0, 1.0], 1.0); + let mut mask = Mask::new(MaskBackground::Black); + let pattern = Procedural::new(ProceduralKind::Checker); + let (e1, e2) = (f.project.alloc_id(), f.project.alloc_id()); + mask.effects.push(Effect::new(e1, EffectKind::Fill { source: Source::Procedural { pattern, low: [0.0; 3], high: [1.0; 3] }, projection: Projection::default() })); + f.project.layer_mut(id).unwrap().mask = Some(mask.clone()); + let hard: Vec = (0..64).map(|x| run(&f, None).value(Channel::BaseColor, x, 20)[0]).collect(); + mask.effects.push(Effect::new(e2, EffectKind::Filter(Filter::Blur { radius: 64.0 }))); + f.project.layer_mut(id).unwrap().mask = Some(mask); + let soft_img = run(&f, None); + let soft: Vec = (0..64).map(|x| soft_img.value(Channel::BaseColor, x, 20)[0]).collect(); + let mids = |v: &[f32]| v.iter().filter(|x| **x > 0.55 && **x < 0.95).count(); + assert!(mids(&soft) > mids(&hard) + 4, "hard {hard:?} +soft {soft:?}"); + } + + #[test] + fn groups_pass_through_with_opacity() { + let mut f = fixture(); + let gid = f.project.alloc_id(); + let g = Layer::new(gid, "G", LayerKind::Group { children: vec![], collapsed: false }, &[Channel::BaseColor]); + f.project.insert_layer(0, g, None, false).unwrap(); + f.project.layer_mut(gid).unwrap().channels.insert(Channel::BaseColor, ChannelBlend { mode: BlendMode::Passthrough, opacity: 0.5 }); + let cid = f.project.alloc_id(); + let mut fill = Fill::default(); + fill.sources.insert(Channel::BaseColor, Source::Uniform([1.0, 1.0, 1.0])); + let child = Layer::new(cid, "C", LayerKind::Fill(fill), &[Channel::BaseColor]); + f.project.insert_layer(0, child, Some(gid), true).unwrap(); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 1, 1), [0.75; 3])); + } + + #[test] + fn padding_copies_nearest_covered_value() { + let mut out = Composite::new(&[Channel::Roughness], 64); + out.channels.get_mut(&Channel::Roughness).unwrap().set(10, 10, &[to_u16(0.9)]); + let mut covered = vec![false; 64 * 64]; + covered[10 * 64 + 10] = true; + let dmap = DilationMap::new(&covered, 64, 64, Some(4)); + pad_tiles(&mut out, &dmap, &[(0, 0)]); + assert!((out.value(Channel::Roughness, 12, 12)[0] - 0.9).abs() < 1e-3); + assert!(out.value(Channel::Roughness, 30, 30)[0] < 0.1 || !out.channels[&Channel::Roughness].is_allocated(0, 0)); + } + + fn content_fx(f: &mut Fixture, id: LayerId, kind: EffectKind) -> LayerId { + let eid = f.project.alloc_id(); + f.project.layer_mut(id).unwrap().content_effects.push(Effect::new(eid, kind)); + eid + } + + #[test] + fn content_filters_hsl_and_opacity_change_layer_values() { + let mut f = fixture(); + let id = fill_layer(&mut f.project, [1.0, 0.0, 0.0], 0.2); + content_fx(&mut f, id, EffectKind::Filter(Filter::Hsl { hue: 1.0 / 3.0, saturation: 0.0, lightness: 0.0 })); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 5, 5), [0.0, 1.0, 0.0]), "{:?}", out.value(Channel::BaseColor, 5, 5)); + assert!(close(out.value(Channel::Roughness, 5, 5), [0.2; 3]), "a hue shift leaves scalars alone"); + content_fx(&mut f, id, EffectKind::Filter(Filter::Invert)); + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 5, 5), [1.0, 0.0, 1.0])); + assert!(close(out.value(Channel::Roughness, 5, 5), [0.8; 3])); + // Hidden effects are skipped and opacity fades an effect. + let fx = &mut f.project.layer_mut(id).unwrap().content_effects; + fx[0].visible = false; + fx[1].opacity = 0.5; + let out = run(&f, None); + assert!(close(out.value(Channel::BaseColor, 5, 5), [0.5; 3])); + assert!(close(out.value(Channel::Roughness, 5, 5), [0.5; 3])); + } + + #[test] + fn hsl_on_a_mask_changes_its_lightness() { + let mut f = fixture(); + let id = fill_layer(&mut f.project, [1.0; 3], 1.0); + let mut mask = Mask::new(MaskBackground::White); + mask.effects.push(Effect::new(f.project.alloc_id(), EffectKind::Filter(Filter::Hsl { hue: 0.3, saturation: 1.0, lightness: -0.5 }))); + f.project.layer_mut(id).unwrap().mask = Some(mask); + assert!(close(run(&f, None).value(Channel::BaseColor, 5, 5), [0.75; 3])); + } + + #[test] + fn content_blur_softens_fill_edges() { + let mut f = fixture(); + let id = f.project.alloc_id(); + let mut fill = Fill::default(); + fill.sources.insert(Channel::Roughness, Source::Procedural { pattern: Procedural::new(ProceduralKind::Checker), low: [0.0; 3], high: [1.0; 3] }); + f.project.insert_layer(0, Layer::new(id, "F", LayerKind::Fill(fill), &[Channel::Roughness]), None, false).unwrap(); + let row = |f: &Fixture| { + let out = run(f, None); + (0..64).map(|x| out.value(Channel::Roughness, x, 20)[0]).collect::>() + }; + let hard = row(&f); + content_fx(&mut f, id, EffectKind::Filter(Filter::Blur { radius: 64.0 })); + let soft = row(&f); + let mids = |v: &[f32]| v.iter().filter(|x| **x > 0.05 && **x < 0.95).count(); + assert!(mids(&soft) > mids(&hard) + 4, "hard {hard:?}\nsoft {soft:?}"); + assert!(soft.iter().all(|v| (0.0..=1.0).contains(v))); + } + + #[test] + fn content_paint_and_fill_effects_add_to_layers() { + let mut f = fixture(); + let id = f.project.alloc_id(); + f.project.insert_layer(0, Layer::new(id, "P", LayerKind::Paint, &[Channel::BaseColor, Channel::Roughness]), None, false).unwrap(); + let mut material = Fill::default(); + material.sources.insert(Channel::Roughness, Source::Uniform([0.2; 3])); + content_fx(&mut f, id, EffectKind::Material(material)); + let paint = content_fx(&mut f, id, EffectKind::Paint); + // Roughness 0.9 painted at half coverage (premultiplied). + f.pixels.layer_mut(paint, Channel::Roughness, 64).set(3, 3, &[to_u16(0.45), to_u16(0.5)]); + let out = run(&f, None); + assert!(close(out.value(Channel::Roughness, 10, 10), [0.2; 3]), "the fill effect covers the empty paint layer"); + assert!(close(out.value(Channel::Roughness, 3, 3), [0.55; 3]), "{:?}", out.value(Channel::Roughness, 3, 3)); + assert!(close(out.value(Channel::BaseColor, 3, 3), [0.5; 3]), "channels without a source stay untouched"); + // Flattening bakes the content effects in. + let images = Default::default(); + let inp = Inputs { project: &f.project, ts: 0, mesh: &f.mesh, gbuf: &f.gbuf, pixels: &f.pixels, baked: &f.baked, preview: None, images: &images, bounds: f.mesh.bounds() }; + let flat = flatten_layer(&inp, id, &all_tiles(64)).unwrap(); + assert!(flat.iter().all(|(c, _, _)| *c == Channel::Roughness)); + let (_, _, data) = flat.iter().find(|(_, t, _)| *t == (0, 0)).unwrap(); + let o = 3 * TILE as usize + 3; + assert!((from_u16(data[o * 2]) - 0.55).abs() < 1e-3 && (from_u16(data[o * 2 + 1]) - 1.0).abs() < 1e-3); + } + + #[test] + fn anchors_feed_masks_above_in_stack_order() { + let mut f = fixture(); + let low = f.project.alloc_id(); + let mut fill = Fill::default(); + fill.sources.insert(Channel::Height, Source::Uniform([0.4; 3])); + f.project.insert_layer(0, Layer::new(low, "Low", LayerKind::Fill(fill), &[Channel::Height]), None, false).unwrap(); + let anchor = content_fx(&mut f, low, EffectKind::Anchor); + let top = fill_layer(&mut f.project, [1.0; 3], 0.5); + let mut mask = Mask::new(MaskBackground::Black); + let source = Source::Anchor { anchor, channel: Channel::Height }; + mask.effects.push(Effect::new(f.project.alloc_id(), EffectKind::Fill { source, projection: Projection::default() })); + f.project.layer_mut(top).unwrap().mask = Some(mask.clone()); + assert!(close(run(&f, None).value(Channel::BaseColor, 5, 5), [0.7; 3])); + // Under a blur the anchor is read by the field pre-pass too: a flat height stays flat. + mask.effects.push(Effect::new(f.project.alloc_id(), EffectKind::Filter(Filter::Blur { radius: 32.0 }))); + f.project.layer_mut(top).unwrap().mask = Some(mask); + assert!(close(run(&f, None).value(Channel::BaseColor, 5, 5), [0.7; 3])); + // An anchor above its reader is not evaluated yet: it reads the channel default (0). + f.project.move_layer(low, 1).unwrap(); + assert!(close(run(&f, None).value(Channel::BaseColor, 5, 5), [0.5; 3])); + } + + #[test] + fn anchors_read_colors_as_gray_in_fill_layers() { + let mut f = fixture(); + let low = fill_layer(&mut f.project, [0.2, 0.4, 0.6], 0.5); + let anchor = content_fx(&mut f, low, EffectKind::Anchor); + let id = f.project.alloc_id(); + let mut fill = Fill::default(); + fill.sources.insert(Channel::Roughness, Source::Anchor { anchor, channel: Channel::BaseColor }); + f.project.insert_layer(0, Layer::new(id, "Top", LayerKind::Fill(fill), &[Channel::Roughness]), None, false).unwrap(); + let expect = texturecraft_core::lum([0.2, 0.4, 0.6]); + assert!(close(run(&f, None).value(Channel::Roughness, 9, 9), [expect; 3])); + } +} diff --git a/crates/compose/src/lib.rs b/crates/compose/src/lib.rs new file mode 100644 index 00000000..e10ddbc1 --- /dev/null +++ b/crates/compose/src/lib.rs @@ -0,0 +1,19 @@ +//! # texturecraft-compose +//! +//! The CPU layer-stack evaluator: [`eval::composite_tiles`] turns a texture set's layers, masks, +//! fills and painted pixels into one image per channel, tile by tile in parallel, including the +//! live preview of a stroke being drawn. [`display`] converts composited tiles into the texture +//! formats the viewport samples; [`pattern`] evaluates procedurals through projections. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod below; +pub mod display; +pub mod eval; +pub mod pattern; +pub mod store; + +pub use below::{BelowCache, StackKey}; +pub use display::{DisplayKind, tile_bytes}; +pub use eval::{Composite, Inputs, PaintTarget, Stencil, StrokePreview, all_tiles, composite_tiles, composite_tiles_cached, covered_tiles, flatten_layer, mask_image, pad_tiles}; +pub use store::{BakedMaps, ImageRes, ImageStore, PixelStore}; diff --git a/crates/compose/src/pattern.rs b/crates/compose/src/pattern.rs new file mode 100644 index 00000000..74f80102 --- /dev/null +++ b/crates/compose/src/pattern.rs @@ -0,0 +1,298 @@ +//! Procedural patterns and projections. + +use texturecraft_core::{Procedural, ProceduralKind, Projection}; +use texturecraft_geom::glam::{Vec2, Vec3}; +use texturecraft_texel::noise; + +/// Where a texel is, for pattern evaluation. +#[derive(Clone, Copy, Debug)] +pub struct Coords { + pub uv: Vec2, + /// World position divided by the scene radius (scale-independent). + pub pos: Vec3, + pub nrm: Vec3, +} + +/// Raw pattern value at a 3D point, 0..1. +fn raw(kind: ProceduralKind, p: Vec3, seed: u32) -> f32 { + let a = p.to_array(); + match kind { + ProceduralKind::Clouds => noise::fbm(a, 6, seed, noise::value), + ProceduralKind::Perlin => noise::fbm(a, 4, seed, noise::perlin), + ProceduralKind::Noise => noise::value((p * 16.0).to_array(), seed), + ProceduralKind::Cells => noise::worley(a, seed), + ProceduralKind::Grunge => { + let n = noise::fbm(a, 6, seed, noise::perlin) * 0.7 + noise::fbm((p * 3.7).to_array(), 3, seed ^ 0x55, noise::value) * 0.3; + ((n - 0.45) * 4.0 + 0.5).clamp(0.0, 1.0) + } + ProceduralKind::Scratches => { + // Long thin streaks: noise stretched along one axis, sharpened to lines. + let q = Vec3::new(p.x * 0.15, p.y * 6.0, p.z * 6.0); + let n = noise::perlin(q.to_array(), seed); + let line = 1.0 - ((n - 0.5).abs() * 40.0).min(1.0); + let gate = noise::value((p * 0.8).to_array(), seed ^ 0x99); + line * ((gate - 0.45) * 4.0).clamp(0.0, 1.0) + } + ProceduralKind::Checker => { + let c = p.floor(); + if (c.x + c.y + c.z).rem_euclid(2.0) < 1.0 { 1.0 } else { 0.0 } + } + ProceduralKind::Stripes => { + let t = p.x.rem_euclid(1.0); + if t < 0.5 { 1.0 } else { 0.0 } + } + ProceduralKind::Gradient => p.x.rem_euclid(1.0), + ProceduralKind::Wood => { + // Rings across Y (warped by low-frequency noise), latewood darkening sharply before + // each ring boundary; fine fibers stretched along X. + let warp = noise::fbm([p.x * 0.18, p.y * 0.6, p.z], 3, seed, noise::perlin); + let t = ((p.y + (warp - 0.5) * 0.9) * 5.0).rem_euclid(1.0); + let ring = 1.0 - smoothstep(0.45, 1.0, t); + let fiber = noise::value([p.x * 2.0, p.y * 40.0, p.z], seed ^ 0x3C); + let tone = noise::fbm([p.x * 0.6, p.y * 3.0, p.z], 2, seed ^ 0x71, noise::value); + (ring * 0.6 + fiber * 0.25 + tone * 0.15).clamp(0.0, 1.0) + } + ProceduralKind::Bricks => { + // Bricks 1 × 0.5 in running bond; per-brick tone in the top 15 % so low/high map to + // mortar/brick colors without washing the bricks out. + let row = (p.y * 2.0).floor(); + let x = p.x + if (row as i32).rem_euclid(2) == 1 { 0.5 } else { 0.0 }; + let (col, fx, fy) = (x.floor(), x.rem_euclid(1.0), (p.y * 2.0).rem_euclid(1.0)); + let d = fx.min(1.0 - fx).min(fy.min(1.0 - fy) * 0.5); + let tone = noise::cell_hash(col as i32, row as i32, 0, seed) * 0.6 + noise::value((p * 9.0).to_array(), seed) * 0.4; + smoothstep(0.02, 0.045, d) * (0.85 + 0.15 * tone) + } + ProceduralKind::Tiles => { + let (c, f) = (p.floor(), p - p.floor()); + let d = f.x.min(1.0 - f.x).min(f.y.min(1.0 - f.y)); + smoothstep(0.015, 0.035, d) * (0.9 + 0.1 * noise::cell_hash(c.x as i32, c.y as i32, 0, seed)) + } + ProceduralKind::Weave => { + // Plain weave: in each cell the thread on top alternates (warp along X, weft along Y); + // the top thread shows its round cross-section, bulging mid-span. + let c = (p * 2.0).floor(); + let f = p * 2.0 - c; + let pi = std::f32::consts::PI; + let warp_on_top = (c.x as i32 + c.y as i32).rem_euclid(2) == 0; + let (across, along) = if warp_on_top { (f.y, f.x) } else { (f.x, f.y) }; + let thread = (pi * across).sin().max(0.0).sqrt() * (0.8 + 0.2 * (pi * along).sin()); + let fiber = noise::value([p.x * 40.0, p.y * 40.0, p.z], seed); + (thread * (0.88 + 0.12 * fiber)).clamp(0.0, 1.0) + } + ProceduralKind::Leather => { + let w = noise::perlin((p * 0.7).to_array(), seed ^ 0x2D) - 0.5; + let (f1, f2, _) = noise::cellular([p.x + w * 0.4, p.y - w * 0.4, p.z], seed); + let crease = smoothstep(0.0, 0.16, f2 - f1); + let pebble = 1.0 - f1 * 0.5; + let fine = noise::value((p * 7.0).to_array(), seed ^ 0x13); + (crease * pebble * (0.85 + 0.15 * fine)).clamp(0.0, 1.0) + } + ProceduralKind::Hammered => { + let dent = |q: Vec3, s: u32| { + let (f1, _, _) = noise::cellular(q.to_array(), s); + (f1 * 1.25).min(1.0).powi(2) + }; + (dent(p, seed) * 0.75 + dent(p * 2.3 + Vec3::splat(5.1), seed ^ 0x5A) * 0.25).clamp(0.0, 1.0) + } + ProceduralKind::Brushed => { + let a = noise::value([p.x * 1.5, p.y * 60.0, p.z], seed); + let b = noise::value([p.x * 0.4, p.y * 18.0, p.z], seed ^ 0x77); + (a * 0.6 + b * 0.4).clamp(0.0, 1.0) + } + ProceduralKind::Marble => { + let turb = noise::fbm(a, 5, seed, noise::perlin); + let veins = ((p.x + p.y * 0.5) * 2.5 + turb * 9.0).sin().abs().powf(0.3); + let cloud = noise::fbm((p * 2.0).to_array(), 3, seed ^ 0x19, noise::value); + (veins * 0.85 + cloud * 0.15).clamp(0.0, 1.0) + } + ProceduralKind::Voronoi => noise::cellular(a, seed).2, + ProceduralKind::Streaks => { + // Drips: thin columns along Y, each segment starting at a random height and fading + // as it runs down (Y is up), over two offset column grids. + let drip = |x: f32, salt: u32| { + let cx = x * 6.0; + let col = cx.floor() as i32; + let h = |k: i32| noise::cell_hash(col, k, salt as i32, seed); + let width = 0.08 + 0.25 * h(0); + let across = 1.0 - smoothstep(width * 0.3, width, (cx - cx.floor() - 0.5 - (h(1) - 0.5) * 0.5).abs()); + let yy = p.y * (0.35 + 0.4 * h(2)) + h(3) * 7.0; + let t = yy - yy.floor(); + let on = if noise::cell_hash(col, yy.floor() as i32, 3 + salt as i32, seed) > 0.5 { 1.0 } else { 0.0 }; + across * on * t.powf(1.6) * (1.0 - smoothstep(0.9, 1.0, t)) + }; + let fine = noise::value([p.x * 37.0, p.y * 1.3, p.z], seed ^ 0x2B); + (drip(p.x, 0).max(drip(p.x + 0.37, 1) * 0.8) * (0.6 + 0.4 * fine)).clamp(0.0, 1.0) + } + ProceduralKind::Smudges => { + // Sparse elliptical prints with concentric ridges, over soft greasy smudges. + let w = noise::perlin((p * 1.3).to_array(), seed ^ 0x61) - 0.5; + let q = Vec3::new(p.x * 1.15 + w * 0.3, p.y * 0.85 + w * 0.3, p.z); + let (f1, _, id) = noise::cellular(q.to_array(), seed); + let print = (1.0 - smoothstep(0.18 + 0.1 * id, 0.3 + 0.12 * id, f1)) * if id > 0.4 { 1.0 } else { 0.0 }; + let ridges = 0.5 + 0.5 * (f1 * 190.0 + w * 12.0).sin(); + let smudge = ((noise::fbm((p * 1.7).to_array(), 4, seed ^ 0x33, noise::value) - 0.55) * 3.0).clamp(0.0, 1.0); + (print * ridges * 0.9 + smudge * 0.4).clamp(0.0, 1.0) + } + ProceduralKind::Pores => { + let (f1, _, _) = noise::cellular(a, seed); + let (g1, _, _) = noise::cellular((p * 2.7 + Vec3::splat(13.0)).to_array(), seed ^ 0x6B); + smoothstep(0.08, 0.16, f1).min(smoothstep(0.06, 0.12, g1)) + } + ProceduralKind::Chips => { + let (f1, _, _) = noise::cellular((p * 2.0).to_array(), seed ^ 0x45); + let n = noise::fbm(a, 5, seed, noise::perlin) + (f1 - 0.5) * 0.25; + smoothstep(0.55, 0.58, n) + } + } +} + +fn smoothstep(e0: f32, e1: f32, x: f32) -> f32 { + let t = ((x - e0) / (e1 - e0)).clamp(0.0, 1.0); + t * t * (3.0 - 2.0 * t) +} + +fn shape(pr: &Procedural, v: f32) -> f32 { + let v = ((v - 0.5) * pr.contrast.max(0.0) + 0.5 + pr.balance).clamp(0.0, 1.0); + if pr.invert { 1.0 - v } else { v } +} + +/// Evaluate a procedural through a projection. +pub fn procedural(pr: &Procedural, proj: &Projection, c: &Coords) -> f32 { + let s = pr.scale.max(1e-4); + let v = match proj { + Projection::Uv { scale, rotation, offset } => { + let (sn, cs) = rotation.to_radians().sin_cos(); + let uv = Vec2::new(c.uv.x * cs - c.uv.y * sn, c.uv.x * sn + c.uv.y * cs) * Vec2::from(*scale) + Vec2::from(*offset); + // 2D patterns sample a slice of the 3D pattern. + raw(pr.kind, (uv * s).extend(0.0), pr.seed) + } + Projection::Triplanar { scale, sharpness, offset } => { + let p = c.pos * *scale * s + Vec3::from(*offset); + let w = c.nrm.abs().powf(sharpness.max(1.0)); + let w = w / (w.x + w.y + w.z).max(1e-6); + raw(pr.kind, Vec3::new(p.z, p.y, 0.0), pr.seed) * w.x + + raw(pr.kind, Vec3::new(p.x, p.z, 0.0), pr.seed) * w.y + + raw(pr.kind, Vec3::new(p.x, p.y, 0.0), pr.seed) * w.z + } + Projection::Planar { scale, axis, offset } => { + let p = c.pos * *scale * s + Vec3::from(*offset); + let q = match axis { + 0 => Vec3::new(p.z, p.y, 0.0), + 1 => Vec3::new(p.x, p.z, 0.0), + _ => Vec3::new(p.x, p.y, 0.0), + }; + raw(pr.kind, q, pr.seed) + } + Projection::Spherical { scale } => { + let d = c.pos.try_normalize().unwrap_or(Vec3::Y); + let u = d.z.atan2(d.x) / std::f32::consts::TAU + 0.5; + let v = d.y.clamp(-1.0, 1.0).acos() / std::f32::consts::PI; + raw(pr.kind, Vec3::new(u * 4.0, v * 2.0, 0.0) * *scale * s, pr.seed) + } + Projection::Cylindrical { scale, axis } => { + let p = c.pos; + let (a, h, b) = match axis { + 0 => (p.y, p.x, p.z), + 2 => (p.x, p.z, p.y), + _ => (p.x, p.y, p.z), + }; + let u = b.atan2(a) / std::f32::consts::TAU + 0.5; + raw(pr.kind, Vec3::new(u * 4.0, h, 0.0) * *scale * s, pr.seed) + } + }; + shape(pr, v) +} + +/// Texture coordinates (and blend weights) at which an image is sampled for a projection +/// (unused slots weigh 0; no allocation per texel). +pub fn image_samples(proj: &Projection, c: &Coords) -> [(Vec2, f32); 3] { + let one = |uv: Vec2| [(uv, 1.0), (Vec2::ZERO, 0.0), (Vec2::ZERO, 0.0)]; + match proj { + Projection::Uv { scale, rotation, offset } => { + let (sn, cs) = rotation.to_radians().sin_cos(); + let uv = Vec2::new(c.uv.x * cs - c.uv.y * sn, c.uv.x * sn + c.uv.y * cs) * Vec2::from(*scale) + Vec2::from(*offset); + one(uv) + } + Projection::Triplanar { scale, sharpness, offset } => { + let p = c.pos * *scale + Vec3::from(*offset); + let w = c.nrm.abs().powf(sharpness.max(1.0)); + let w = w / (w.x + w.y + w.z).max(1e-6); + [(Vec2::new(p.z, -p.y), w.x), (Vec2::new(p.x, p.z), w.y), (Vec2::new(p.x, -p.y), w.z)] + } + Projection::Planar { scale, axis, offset } => { + let p = c.pos * *scale + Vec3::from(*offset); + let q = match axis { + 0 => Vec2::new(p.z, -p.y), + 1 => Vec2::new(p.x, p.z), + _ => Vec2::new(p.x, -p.y), + }; + one(q * 0.5 + Vec2::splat(0.5)) + } + Projection::Spherical { scale } => { + let d = c.pos.try_normalize().unwrap_or(Vec3::Y); + let u = d.z.atan2(d.x) / std::f32::consts::TAU + 0.5; + let v = d.y.clamp(-1.0, 1.0).acos() / std::f32::consts::PI; + one(Vec2::new(u, v) * *scale) + } + Projection::Cylindrical { scale, axis } => { + let p = c.pos; + let (a, h, b) = match axis { + 0 => (p.y, p.x, p.z), + 2 => (p.x, p.z, p.y), + _ => (p.x, p.y, p.z), + }; + let u = b.atan2(a) / std::f32::consts::TAU + 0.5; + one(Vec2::new(u, 0.5 - h * 0.5) * *scale) + } + } +} + +/// World-space noise used by generators (seamless across UV islands). +pub fn world_noise(pos: Vec3, scale: f32, seed: u32) -> f32 { + noise::fbm((pos * scale.max(1e-3)).to_array(), 4, seed, noise::perlin) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn every_pattern_and_projection_stays_in_range() { + let projs = [ + Projection::default(), + Projection::Triplanar { scale: 1.0, sharpness: 4.0, offset: [0.0; 3] }, + Projection::Planar { scale: 1.0, axis: 1, offset: [0.0; 3] }, + Projection::Spherical { scale: 1.0 }, + Projection::Cylindrical { scale: 1.0, axis: 1 }, + ]; + for k in ProceduralKind::ALL { + let pr = Procedural::new(k); + for proj in &projs { + for i in 0..50 { + let t = i as f32 * 0.13; + let c = Coords { + uv: Vec2::new(t.fract(), (t * 0.7).fract()), + pos: Vec3::new(t.sin(), t.cos(), t * 0.1), + nrm: Vec3::new(0.3, 0.9, 0.1).normalize(), + }; + let v = procedural(&pr, proj, &c); + assert!((0.0..=1.0).contains(&v), "{k:?} {proj:?} {v}"); + } + } + } + } + + #[test] + fn every_pattern_varies() { + for k in ProceduralKind::ALL { + let pr = Procedural::new(k); + let (mut lo, mut hi) = (f32::MAX, f32::MIN); + for i in 0..4096 { + let uv = Vec2::new((i % 64) as f32 / 64.0, (i / 64) as f32 / 64.0); + let v = procedural(&pr, &Projection::default(), &Coords { uv, pos: Vec3::ZERO, nrm: Vec3::Y }); + (lo, hi) = (lo.min(v), hi.max(v)); + } + assert!(hi - lo > 0.3, "{k:?} is flat: {lo}..{hi}"); + } + } +} diff --git a/crates/compose/src/store.rs b/crates/compose/src/store.rs new file mode 100644 index 00000000..2a9292eb --- /dev/null +++ b/crates/compose/src/store.rs @@ -0,0 +1,120 @@ +//! Pixel data owned by a document: painted layer channels, painted mask effects and baked mesh +//! maps. Everything is copy-on-write, so cloning the store for undo is cheap. + +use std::collections::{BTreeMap, HashMap}; + +use texturecraft_core::{BakedMap, Channel, ChannelKind, LayerId}; +use texturecraft_texel::{TileImage, from_u16, from_u16_signed}; + +/// Painted data of one paint layer channel: premultiplied value(s) plus coverage, u16 per +/// component (height stored signed). +#[derive(Clone, Debug, Default)] +pub struct PixelStore { + /// (paint layer or content paint effect, channel) → texels. + pub layers: HashMap<(LayerId, Channel), TileImage>, + /// Paint effect of a mask → (premultiplied value, coverage). + pub masks: HashMap, +} + +impl PixelStore { + pub fn layer(&self, id: LayerId, c: Channel) -> Option<&TileImage> { + self.layers.get(&(id, c)) + } + + /// The image for `(id, c)` at `res`, created empty if missing or of another size. + pub fn layer_mut(&mut self, id: LayerId, c: Channel, res: u32) -> &mut TileImage { + let img = self.layers.entry((id, c)).or_insert_with(|| TileImage::new(res, res, c.components() + 1)); + if img.width() != res { + *img = TileImage::new(res, res, c.components() + 1); + } + img + } + + pub fn mask_mut(&mut self, id: LayerId, res: u32) -> &mut TileImage { + let img = self.masks.entry(id).or_insert_with(|| TileImage::new(res, res, 2)); + if img.width() != res { + *img = TileImage::new(res, res, 2); + } + img + } + + /// Drop pixels of layers that no longer exist. + pub fn retain(&mut self, alive: impl Fn(LayerId) -> bool) { + self.layers.retain(|(id, _), _| alive(*id)); + self.masks.retain(|id, _| alive(*id)); + } + + pub fn bytes(&self) -> usize { + self.layers.values().chain(self.masks.values()).map(TileImage::bytes).sum() + } +} + +/// Decode a stored component of channel kind `kind` to its float value. +#[inline] +pub fn decode(kind: ChannelKind, v: u16) -> f32 { + if kind == ChannelKind::Signed { from_u16_signed(v) } else { from_u16(v) } +} + +/// Baked mesh maps of one texture set (dense, row-major, `components()` floats per texel). +#[derive(Clone, Debug, Default, PartialEq)] +pub struct BakedMaps { + pub resolution: u32, + pub maps: BTreeMap>>, +} + +impl BakedMaps { + /// Sample map `m` at texel (x, y) of an image `res` wide (nearest texel of the bake). + pub fn sample(&self, m: BakedMap, x: u32, y: u32, res: u32) -> Option<[f32; 3]> { + let data = self.maps.get(&m)?; + let r = self.resolution.max(1) as u64; + let (bx, by) = ((x as u64 * r / res.max(1) as u64).min(r - 1), (y as u64 * r / res.max(1) as u64).min(r - 1)); + let comps = m.components(); + let i = ((by * r + bx) as usize) * comps; + let s = data.get(i..i + comps)?; + Some(if comps == 3 { [s[0], s[1], s[2]] } else { [s[0]; 3] }) + } + + pub fn scalar(&self, m: BakedMap, x: u32, y: u32, res: u32) -> Option { + self.sample(m, x, y, res).map(|v| v[0]) + } +} + +/// A decoded image resource sampled by fills (values in the file's encoding; see `srgb`). +#[derive(Clone, Debug, PartialEq)] +pub struct ImageRes { + pub width: u32, + pub height: u32, + pub rgba: Vec<[f32; 4]>, + /// 8/16-bit images are sRGB-encoded; color channels linearize them. + pub srgb: bool, +} + +/// Image resources by name. +pub type ImageStore = HashMap>; + +impl ImageRes { + fn texel(&self, x: i64, y: i64) -> [f32; 4] { + let (w, h) = (self.width.max(1) as i64, self.height.max(1) as i64); + let i = (y.rem_euclid(h) * w + x.rem_euclid(w)) as usize; + self.rgba.get(i).copied().unwrap_or([0.0; 4]) + } + + /// Bilinear sample with wrap-around (texture coordinates, v down). + pub fn sample(&self, u: f32, v: f32) -> [f32; 4] { + if !u.is_finite() || !v.is_finite() { + return [0.0; 4]; + } + let fx = u * self.width as f32 - 0.5; + let fy = v * self.height as f32 - 0.5; + let (x0, y0) = (fx.floor() as i64, fy.floor() as i64); + let (tx, ty) = (fx - fx.floor(), fy - fy.floor()); + let (a, b, c, d) = (self.texel(x0, y0), self.texel(x0 + 1, y0), self.texel(x0, y0 + 1), self.texel(x0 + 1, y0 + 1)); + let mut out = [0.0; 4]; + for k in 0..4 { + let top = a[k] + (b[k] - a[k]) * tx; + let bot = c[k] + (d[k] - c[k]) * tx; + out[k] = top + (bot - top) * ty; + } + out + } +} diff --git a/crates/compose/tests/cache_and_instances.rs b/crates/compose/tests/cache_and_instances.rs new file mode 100644 index 00000000..709eed91 --- /dev/null +++ b/crates/compose/tests/cache_and_instances.rs @@ -0,0 +1,201 @@ +//! The below-stack cache and blocked compositing give exactly the unoptimized result; instance +//! layers draw their source; masks combine with height. + +use texturecraft_compose::{BelowCache, Composite, Inputs, PixelStore, all_tiles, composite_tiles, composite_tiles_cached}; +use texturecraft_core::{ + BlendMode, Channel, Effect, EffectKind, Fill, Filter, Generator, GeneratorKind, HeightMask, Layer, LayerId, LayerKind, Mask, MaskBackground, Procedural, + ProceduralKind, Project, Projection, Source, TextureSet, +}; +use texturecraft_geom::{Mesh, UvGBuffer, primitives}; +use texturecraft_texel::{TILE, to_u16}; + +const RES: u32 = 256; + +struct Fixture { + project: Project, + mesh: Mesh, + gbuf: UvGBuffer, + pixels: PixelStore, +} + +fn fixture() -> Fixture { + let mesh = primitives::sphere(1.0, 32, 16); + let gbuf = UvGBuffer::new(&mesh, 0, RES, RES); + let mut project = Project::new("t", "builtin:sphere"); + project.texture_sets.push(TextureSet::new("A", 0, RES)); + project.texture_sets.push(TextureSet::new("B", 0, RES)); + Fixture { project, mesh, gbuf, pixels: PixelStore::default() } +} + +fn procedural(kind: ProceduralKind, low: f32, high: f32) -> Source { + Source::Procedural { pattern: Procedural::new(kind), low: [low; 3], high: [high; 3] } +} + +fn add(f: &mut Fixture, ts: usize, kind: LayerKind, mask: Option) -> LayerId { + let id = f.project.alloc_id(); + let mut l = Layer::new(id, "l", kind, &Channel::DEFAULT_SET); + l.mask = mask; + f.project.insert_layer(ts, l, None, false).unwrap() +} + +fn fill(sources: &[(Channel, Source)]) -> LayerKind { + let mut f = Fill::default(); + f.sources = sources.iter().cloned().collect(); + LayerKind::Fill(f) +} + +fn effect(f: &mut Fixture, kind: EffectKind) -> Effect { + Effect::new(f.project.alloc_id(), kind) +} + +/// Procedural fills, a generator mask with a blur, a folder, painted pixels; returns the top +/// paint layer. +fn heavy_stack(f: &mut Fixture) -> LayerId { + add( + f, + 0, + fill(&[(Channel::BaseColor, procedural(ProceduralKind::Clouds, 0.1, 0.9)), (Channel::Height, procedural(ProceduralKind::Cells, -0.3, 0.3))]), + None, + ); + let mut mask = Mask::new(MaskBackground::Black); + mask.effects.push(effect(f, EffectKind::Generator(Generator::new(GeneratorKind::Position)))); + mask.effects.push(effect(f, EffectKind::Filter(Filter::Blur { radius: 40.0 }))); + add(f, 0, fill(&[(Channel::Roughness, procedural(ProceduralKind::Grunge, 0.0, 1.0))]), Some(mask)); + let group = add(f, 0, LayerKind::Group { children: vec![], collapsed: false }, None); + for b in f.project.layer_mut(group).unwrap().channels.values_mut() { + b.mode = BlendMode::Passthrough; + } + let inner = f.project.alloc_id(); + let l = Layer::new(inner, "inner", fill(&[(Channel::Metallic, procedural(ProceduralKind::Scratches, 0.0, 1.0))]), &Channel::DEFAULT_SET); + f.project.insert_layer(0, l, Some(group), true).unwrap(); + let mut blurred = Mask::new(MaskBackground::Black); + blurred.effects.push(effect(f, EffectKind::Fill { source: procedural(ProceduralKind::Checker, 0.0, 1.0), projection: Projection::default() })); + blurred.effects.push(effect(f, EffectKind::Filter(Filter::Blur { radius: 24.0 }))); + let top = add(f, 0, LayerKind::Paint, Some(blurred)); + let img = f.pixels.layer_mut(top, Channel::BaseColor, RES); + for y in 40..200 { + for x in 30..220 { + img.set(x, y, &[to_u16(0.4), to_u16(0.1), 0, to_u16(0.5)]); + } + } + top +} + +fn inputs<'a>(f: &'a Fixture, ts: usize, images: &'a texturecraft_compose::ImageStore, baked: &'a texturecraft_compose::BakedMaps) -> Inputs<'a> { + Inputs { project: &f.project, ts, mesh: &f.mesh, gbuf: &f.gbuf, pixels: &f.pixels, baked, preview: None, images, bounds: f.mesh.bounds() } +} + +fn run(f: &Fixture, ts: usize, tiles: &[(u32, u32)], below: Option<&mut BelowCache>) -> Composite { + let (images, baked) = (Default::default(), Default::default()); + let mut out = Composite::new(&f.project.texture_sets[ts].channel_list(), RES); + composite_tiles_cached(&inputs(f, ts, &images, &baked), &mut out, tiles, below); + out +} + +fn reference(f: &Fixture, ts: usize) -> Composite { + let (images, baked) = (Default::default(), Default::default()); + let mut out = Composite::new(&f.project.texture_sets[ts].channel_list(), RES); + composite_tiles(&inputs(f, ts, &images, &baked), &mut out, &all_tiles(RES)); + out +} + +#[test] +fn below_cache_and_blocks_match_the_full_composite_exactly() { + let mut f = fixture(); + let top = heavy_stack(&mut f); + let want = reference(&f, 0); + // Tile by tile (each its own block and neighbourhood region) gives the same bits. + let mut one_by_one = Composite::new(&f.project.texture_sets[0].channel_list(), RES); + let (images, baked) = (Default::default(), Default::default()); + for t in all_tiles(RES) { + composite_tiles(&inputs(&f, 0, &images, &baked), &mut one_by_one, &[t]); + } + assert!(one_by_one == want, "per-tile composites differ from one pass"); + + let mut cache = BelowCache::default(); + cache.set_hot(Some(top)); + let half: Vec<(u32, u32)> = all_tiles(RES).into_iter().filter(|t| (t.0 + t.1) % 2 == 0).collect(); + // Cold, half warm and fully warm caches. + let mut out = run(&f, 0, &half, Some(&mut cache)); + assert!(!cache.is_empty(), "the stack below the hot layer is cached"); + composite_tiles_cached(&inputs(&f, 0, &images, &baked), &mut out, &all_tiles(RES), Some(&mut cache)); + assert!(out == want, "a partly cached composite differs"); + let warm = run(&f, 0, &all_tiles(RES), Some(&mut cache)); + assert!(warm == want, "a cached composite differs"); + + // Painting the hot layer keeps the cache; editing below it empties it. + f.pixels.layer_mut(top, Channel::BaseColor, RES).set(5, 5, &[to_u16(1.0), 0, 0, to_u16(1.0)]); + let n = cache.len(); + assert!(run(&f, 0, &all_tiles(RES), Some(&mut cache)) == reference(&f, 0)); + assert_eq!(cache.len(), n); + let low = f.project.texture_sets[0].stack[0]; + if let LayerKind::Fill(fl) = &mut f.project.layer_mut(low).unwrap().kind { + fl.sources.insert(Channel::Roughness, Source::Uniform([0.9; 3])); + } + assert!(run(&f, 0, &all_tiles(RES), Some(&mut cache)) == reference(&f, 0), "a stale cache was used"); + // A hot layer inside a folder caches below the folder. + let group = f.project.texture_sets[0].stack[2]; + let inner = f.project.layer(group).unwrap().children()[0]; + cache.set_hot(Some(inner)); + run(&f, 0, &all_tiles(RES), Some(&mut cache)); + assert!(!cache.is_empty()); + assert!(run(&f, 0, &all_tiles(RES), Some(&mut cache)) == reference(&f, 0)); +} + +#[test] +fn instances_draw_their_source_across_texture_sets() { + let mut f = fixture(); + let top = heavy_stack(&mut f); + // Set B instances every top-level layer of set A: same composite. + for id in f.project.texture_sets[0].stack.clone() { + add(&mut f, 1, LayerKind::Instance { source: id }, None); + } + let a = reference(&f, 0); + assert!(reference(&f, 1).channels == a.channels, "instances draw like their sources"); + // An edit to the source shows in the instance. + f.pixels.layer_mut(top, Channel::BaseColor, RES).set(100, 100, &[to_u16(1.0), 0, 0, to_u16(1.0)]); + let (a, b) = (reference(&f, 0), reference(&f, 1)); + assert!(b.channels == a.channels); + // The instance's own mask overrides the source's. + let inst = *f.project.texture_sets[1].stack.last().unwrap(); + f.project.layer_mut(inst).unwrap().mask = Some(Mask::new(MaskBackground::Black)); + let b = reference(&f, 1); + let (x, y) = (100, 100); + assert!((a.value(Channel::BaseColor, x, y)[0] - b.value(Channel::BaseColor, x, y)[0]).abs() > 0.1); + // A hidden instance or a missing source draws nothing. + let mut g = fixture(); + let src = add(&mut g, 0, fill(&[(Channel::Roughness, Source::Uniform([0.9; 3]))]), None); + let inst = add(&mut g, 1, LayerKind::Instance { source: src }, None); + assert!((reference(&g, 1).value(Channel::Roughness, 128, 128)[0] - 0.9).abs() < 1e-3); + g.project.layer_mut(inst).unwrap().visible = false; + assert!((reference(&g, 1).value(Channel::Roughness, 128, 128)[0] - 0.5).abs() < 1e-3); + g.project.layer_mut(inst).unwrap().visible = true; + g.project.layers.remove(&src); + assert!((reference(&g, 1).value(Channel::Roughness, 128, 128)[0] - 0.5).abs() < 1e-3); +} + +#[test] +fn mask_with_height_follows_the_layer_height() { + let mut f = fixture(); + // A white layer over the default gray, half masked, its height falling from 0.25 (left) to + // -0.25 (right). + let mut ramp = Procedural::new(ProceduralKind::Gradient); + ramp.scale = 1.0; + let height = Source::Procedural { pattern: ramp, low: [0.25; 3], high: [-0.25; 3] }; + let id = add(&mut f, 0, fill(&[(Channel::BaseColor, Source::Uniform([1.0; 3])), (Channel::Height, height)]), None); + let mut mask = Mask::new(MaskBackground::Black); + mask.effects.push(effect(&mut f, EffectKind::Fill { source: Source::Uniform([0.5; 3]), projection: Projection::default() })); + f.project.layer_mut(id).unwrap().mask = Some(mask); + let plain = reference(&f, 0); + f.project.layer_mut(id).unwrap().height_mask = HeightMask { enabled: true, contrast: 1.0, offset: 0.0 }; + let hm = reference(&f, 0); + let row = TILE * 2; + let (left, right) = (16, RES - 16); + let v = |c: &Composite, x| c.value(Channel::BaseColor, x, row)[0]; + assert!((v(&plain, left) - 0.75).abs() < 0.01 && (v(&plain, right) - 0.75).abs() < 0.01, "plain mask: 50 % white over gray"); + assert!(v(&hm, left) > 0.84, "high parts show first: {}", v(&hm, left)); + assert!(v(&hm, right) < 0.66, "low parts later: {}", v(&hm, right)); + // Without a mask there is nothing to combine. + f.project.layer_mut(id).unwrap().mask.as_mut().unwrap().enabled = false; + assert!((v(&reference(&f, 0), left) - 1.0).abs() < 1e-3); +} diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml new file mode 100644 index 00000000..c4fa8e1d --- /dev/null +++ b/crates/core/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "texturecraft-core" +description = "TextureCraft document model: projects, texture sets, channels, layers, masks, effects and blend math" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } diff --git a/crates/core/src/blend.rs b/crates/core/src/blend.rs new file mode 100644 index 00000000..e43fd4b8 --- /dev/null +++ b/crates/core/src/blend.rs @@ -0,0 +1,441 @@ +//! Per-channel blend modes and their CPU reference math (straight values, linear space). +//! +//! `a` is the value below (the stack so far), `b` the layer's value. The compositor mixes the +//! result back over `a` by `coverage × opacity × mask`. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, Default)] +pub enum BlendMode { + #[default] + Normal, + Passthrough, + Disable, + Replace, + Multiply, + Divide, + InverseDivide, + Darken, + Lighten, + LinearDodge, + Subtract, + InverseSubtract, + Difference, + Exclusion, + SignedAddition, + Overlay, + Screen, + LinearBurn, + ColorBurn, + ColorDodge, + SoftLight, + HardLight, + VividLight, + LinearLight, + PinLight, + Tint, + Saturation, + Color, + Value, + NormalMapCombine, + NormalMapDetail, + NormalMapInverseDetail, +} + +impl BlendMode { + /// Every mode in menu order; `None` entries are the separators between menu groups. + pub const MENU: [Option; 39] = [ + Some(BlendMode::Normal), + Some(BlendMode::Passthrough), + Some(BlendMode::Disable), + Some(BlendMode::Replace), + None, + Some(BlendMode::Multiply), + Some(BlendMode::Divide), + Some(BlendMode::InverseDivide), + Some(BlendMode::Darken), + Some(BlendMode::Lighten), + None, + Some(BlendMode::LinearDodge), + Some(BlendMode::Subtract), + Some(BlendMode::InverseSubtract), + Some(BlendMode::Difference), + Some(BlendMode::Exclusion), + Some(BlendMode::SignedAddition), + None, + Some(BlendMode::Overlay), + Some(BlendMode::Screen), + Some(BlendMode::LinearBurn), + Some(BlendMode::ColorBurn), + Some(BlendMode::ColorDodge), + None, + Some(BlendMode::SoftLight), + Some(BlendMode::HardLight), + Some(BlendMode::VividLight), + Some(BlendMode::LinearLight), + Some(BlendMode::PinLight), + None, + Some(BlendMode::Tint), + Some(BlendMode::Saturation), + Some(BlendMode::Color), + Some(BlendMode::Value), + None, + Some(BlendMode::NormalMapCombine), + Some(BlendMode::NormalMapDetail), + Some(BlendMode::NormalMapInverseDetail), + None, + ]; + + pub fn all() -> impl Iterator { + BlendMode::MENU.into_iter().flatten() + } + + pub fn label(self) -> &'static str { + match self { + BlendMode::Normal => "Normal", + BlendMode::Passthrough => "Passthrough", + BlendMode::Disable => "Disable", + BlendMode::Replace => "Replace", + BlendMode::Multiply => "Multiply", + BlendMode::Divide => "Divide", + BlendMode::InverseDivide => "Inverse divide", + BlendMode::Darken => "Darken (Min)", + BlendMode::Lighten => "Lighten (Max)", + BlendMode::LinearDodge => "Linear dodge (Add)", + BlendMode::Subtract => "Subtract", + BlendMode::InverseSubtract => "Inverse Subtract", + BlendMode::Difference => "Difference", + BlendMode::Exclusion => "Exclusion", + BlendMode::SignedAddition => "Signed addition (AddSub)", + BlendMode::Overlay => "Overlay", + BlendMode::Screen => "Screen", + BlendMode::LinearBurn => "Linear burn", + BlendMode::ColorBurn => "Color burn", + BlendMode::ColorDodge => "Color dodge", + BlendMode::SoftLight => "Soft light", + BlendMode::HardLight => "Hard light", + BlendMode::VividLight => "Vivid light", + BlendMode::LinearLight => "Linear light", + BlendMode::PinLight => "Pin light", + BlendMode::Tint => "Tint", + BlendMode::Saturation => "Saturation", + BlendMode::Color => "Color", + BlendMode::Value => "Value", + BlendMode::NormalMapCombine => "Normal map combine", + BlendMode::NormalMapDetail => "Normal map detail", + BlendMode::NormalMapInverseDetail => "Normal map inverse detail", + } + } + + /// Four-letter abbreviation shown in the compact layer row ("Norm", "Mult", …). + pub fn short(self) -> &'static str { + match self { + BlendMode::Normal => "Norm", + BlendMode::Passthrough => "Pass", + BlendMode::Disable => "Dis", + BlendMode::Replace => "Repl", + BlendMode::Multiply => "Mult", + BlendMode::Divide => "Div", + BlendMode::InverseDivide => "IDiv", + BlendMode::Darken => "Dark", + BlendMode::Lighten => "Ligh", + BlendMode::LinearDodge => "Add", + BlendMode::Subtract => "Sub", + BlendMode::InverseSubtract => "ISub", + BlendMode::Difference => "Diff", + BlendMode::Exclusion => "Excl", + BlendMode::SignedAddition => "AdSb", + BlendMode::Overlay => "Over", + BlendMode::Screen => "Scrn", + BlendMode::LinearBurn => "LBrn", + BlendMode::ColorBurn => "CBrn", + BlendMode::ColorDodge => "CDdg", + BlendMode::SoftLight => "SftL", + BlendMode::HardLight => "HrdL", + BlendMode::VividLight => "VivL", + BlendMode::LinearLight => "LinL", + BlendMode::PinLight => "PinL", + BlendMode::Tint => "Tint", + BlendMode::Saturation => "Sat", + BlendMode::Color => "Colr", + BlendMode::Value => "Val", + BlendMode::NormalMapCombine => "NmCb", + BlendMode::NormalMapDetail => "NmDt", + BlendMode::NormalMapInverseDetail => "NmID", + } + } + + /// Parse a label, short label or variant name (case-insensitive; punctuation ignored). + pub fn parse(s: &str) -> Option { + let norm = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-', '(', ')'], ""); + let want = norm(s); + BlendMode::all().find(|m| norm(m.label()) == want || norm(m.short()) == want || norm(&format!("{m:?}")) == want) + } + + /// Modes that need all three components at once. + pub fn is_non_separable(self) -> bool { + matches!( + self, + BlendMode::Tint + | BlendMode::Saturation + | BlendMode::Color + | BlendMode::Value + | BlendMode::NormalMapCombine + | BlendMode::NormalMapDetail + | BlendMode::NormalMapInverseDetail + ) + } +} + +fn color_burn(a: f32, b: f32) -> f32 { + if a >= 1.0 { + 1.0 + } else if b <= 0.0 { + 0.0 + } else { + 1.0 - ((1.0 - a) / b).min(1.0) + } +} + +fn color_dodge(a: f32, b: f32) -> f32 { + if a <= 0.0 { + 0.0 + } else if b >= 1.0 { + 1.0 + } else { + (a / (1.0 - b)).min(1.0) + } +} + +fn soft_light(a: f32, b: f32) -> f32 { + let (a, b) = (a.clamp(0.0, 1.0), b.clamp(0.0, 1.0)); + if b <= 0.5 { + return a - (1.0 - 2.0 * b) * a * (1.0 - a); + } + let d = if a <= 0.25 { ((16.0 * a - 12.0) * a + 4.0) * a } else { a.sqrt() }; + a + (2.0 * b - 1.0) * (d - a) +} + +fn overlay(a: f32, b: f32) -> f32 { + if a < 0.5 { 2.0 * a * b } else { 1.0 - 2.0 * (1.0 - a) * (1.0 - b) } +} + +/// One component of a separable blend. Non-separable modes fall back to `Normal`. +pub fn blend1(mode: BlendMode, a: f32, b: f32) -> f32 { + match mode { + BlendMode::Normal | BlendMode::Passthrough | BlendMode::Replace => b, + BlendMode::Disable => a, + BlendMode::Multiply => a * b, + BlendMode::Divide => a / b.max(1e-6), + BlendMode::InverseDivide => b / a.max(1e-6), + BlendMode::Darken => a.min(b), + BlendMode::Lighten => a.max(b), + BlendMode::LinearDodge => a + b, + BlendMode::Subtract => a - b, + BlendMode::InverseSubtract => b - a, + BlendMode::Difference => (a - b).abs(), + BlendMode::Exclusion => a + b - 2.0 * a * b, + BlendMode::SignedAddition | BlendMode::LinearLight => a + 2.0 * b - 1.0, + BlendMode::Overlay => overlay(a, b), + BlendMode::Screen => 1.0 - (1.0 - a) * (1.0 - b), + BlendMode::LinearBurn => a + b - 1.0, + BlendMode::ColorBurn => color_burn(a, b), + BlendMode::ColorDodge => color_dodge(a, b), + BlendMode::SoftLight => soft_light(a, b), + BlendMode::HardLight => overlay(b, a), + BlendMode::VividLight => { + if b < 0.5 { + color_burn(a, 2.0 * b) + } else { + color_dodge(a, 2.0 * (b - 0.5)) + } + } + BlendMode::PinLight => { + if b < 0.5 { + a.min(2.0 * b) + } else { + a.max(2.0 * b - 1.0) + } + } + BlendMode::Tint + | BlendMode::Saturation + | BlendMode::Color + | BlendMode::Value + | BlendMode::NormalMapCombine + | BlendMode::NormalMapDetail + | BlendMode::NormalMapInverseDetail => b, + } +} + +/// Luminance of a color (the W3C non-separable blend weights). +pub fn lum(c: [f32; 3]) -> f32 { + 0.3 * c[0] + 0.59 * c[1] + 0.11 * c[2] +} + +fn clip_color(c: [f32; 3]) -> [f32; 3] { + let l = lum(c); + let n = c[0].min(c[1]).min(c[2]); + let x = c[0].max(c[1]).max(c[2]); + let mut out = c; + if n < 0.0 && l - n > 1e-6 { + out = out.map(|v| l + (v - l) * l / (l - n)); + } + if x > 1.0 && x - l > 1e-6 { + out = out.map(|v| l + (v - l) * (1.0 - l) / (x - l)); + } + out +} + +fn set_lum(c: [f32; 3], l: f32) -> [f32; 3] { + let d = l - lum(c); + clip_color(c.map(|v| v + d)) +} + +fn sat(c: [f32; 3]) -> f32 { + c[0].max(c[1]).max(c[2]) - c[0].min(c[1]).min(c[2]) +} + +fn set_sat(c: [f32; 3], s: f32) -> [f32; 3] { + let mx = c[0].max(c[1]).max(c[2]); + let mn = c[0].min(c[1]).min(c[2]); + if mx - mn <= 1e-6 { + return [0.0; 3]; + } + c.map(|v| (v - mn) * s / (mx - mn)) +} + +fn unpack(n: [f32; 3]) -> [f32; 3] { + n.map(|v| v * 2.0 - 1.0) +} + +fn pack(n: [f32; 3]) -> [f32; 3] { + let len = (n[0] * n[0] + n[1] * n[1] + n[2] * n[2]).sqrt().max(1e-6); + n.map(|v| v / len * 0.5 + 0.5) +} + +/// Reoriented normal mapping (Barré-Brisebois & Hill): `detail` re-oriented onto `base`. +fn rnm(base: [f32; 3], detail: [f32; 3]) -> [f32; 3] { + let t = unpack(base); + let t = [t[0], t[1], t[2] + 1.0]; + let u = unpack(detail); + let u = [-u[0], -u[1], u[2]]; + let d = t[0] * u[0] + t[1] * u[1] + t[2] * u[2]; + pack([t[0] * d - u[0] * t[2], t[1] * d - u[1] * t[2], t[2] * d - u[2] * t[2]]) +} + +/// A three-component blend, including the non-separable modes. +pub fn blend3(mode: BlendMode, a: [f32; 3], b: [f32; 3]) -> [f32; 3] { + match mode { + BlendMode::Color => set_lum(b, lum(a)), + BlendMode::Saturation => set_lum(set_sat(a, sat(b)), lum(a)), + BlendMode::Value => { + let va = a[0].max(a[1]).max(a[2]); + let vb = b[0].max(b[1]).max(b[2]); + if va <= 1e-6 { [vb; 3] } else { a.map(|v| v * vb / va) } + } + BlendMode::Tint => { + let l = lum(a); + b.map(|v| v * l) + } + BlendMode::NormalMapCombine => { + let (na, nb) = (unpack(a), unpack(b)); + pack([na[0] + nb[0], na[1] + nb[1], na[2] * nb[2]]) + } + BlendMode::NormalMapDetail => rnm(a, b), + BlendMode::NormalMapInverseDetail => rnm(b, a), + _ => [blend1(mode, a[0], b[0]), blend1(mode, a[1], b[1]), blend1(mode, a[2], b[2])], + } +} + +/// Mix `blended` over `a` by weight `w` (coverage × opacity × mask). +pub fn mix3(a: [f32; 3], blended: [f32; 3], w: f32) -> [f32; 3] { + [a[0] + (blended[0] - a[0]) * w, a[1] + (blended[1] - a[1]) * w, a[2] + (blended[2] - a[2]) * w] +} + +#[cfg(test)] +mod tests { + use super::*; + + const AS: [f32; 4] = [0.0, 0.25, 0.5, 1.0]; + const BS: [f32; 4] = [0.0, 0.3, 0.7, 1.0]; + + fn close(a: f32, b: f32) -> bool { + (a - b).abs() < 1e-5 + } + + #[test] + fn separable_modes_match_hand_computed_values() { + for a in AS { + for b in BS { + assert!(close(blend1(BlendMode::Normal, a, b), b)); + assert!(close(blend1(BlendMode::Disable, a, b), a)); + assert!(close(blend1(BlendMode::Multiply, a, b), a * b)); + assert!(close(blend1(BlendMode::Screen, a, b), 1.0 - (1.0 - a) * (1.0 - b))); + assert!(close(blend1(BlendMode::LinearDodge, a, b), a + b)); + assert!(close(blend1(BlendMode::Subtract, a, b), a - b)); + assert!(close(blend1(BlendMode::Darken, a, b), a.min(b))); + assert!(close(blend1(BlendMode::Lighten, a, b), a.max(b))); + assert!(close(blend1(BlendMode::Difference, a, b), (a - b).abs())); + assert!(close(blend1(BlendMode::Exclusion, a, b), a + b - 2.0 * a * b)); + } + } + assert!(close(blend1(BlendMode::Overlay, 0.25, 0.3), 2.0 * 0.25 * 0.3)); + assert!(close(blend1(BlendMode::Overlay, 0.5, 0.7), 1.0 - 2.0 * 0.5 * 0.3)); + assert!(close(blend1(BlendMode::HardLight, 0.7, 0.25), 2.0 * 0.25 * 0.7)); + } + + #[test] + fn soft_light_matches_w3c() { + assert!(close(blend1(BlendMode::SoftLight, 0.25, 0.3), 0.25 - 0.4 * 0.25 * 0.75)); + let d = ((16.0 * 0.25 - 12.0) * 0.25 + 4.0) * 0.25; + assert!(close(blend1(BlendMode::SoftLight, 0.25, 0.7), 0.25 + 0.4 * (d - 0.25))); + assert!(close(blend1(BlendMode::SoftLight, 0.5, 0.7), 0.5 + 0.4 * (0.5f32.sqrt() - 0.5))); + } + + #[test] + fn burns_and_dodges_handle_edges() { + assert!(close(blend1(BlendMode::ColorBurn, 1.0, 0.0), 1.0)); + assert!(close(blend1(BlendMode::ColorBurn, 0.5, 0.0), 0.0)); + assert!(close(blend1(BlendMode::ColorDodge, 0.0, 1.0), 0.0)); + assert!(close(blend1(BlendMode::ColorDodge, 0.5, 1.0), 1.0)); + assert!(close(blend1(BlendMode::ColorDodge, 0.25, 0.5), 0.5)); + for m in BlendMode::all() { + for a in AS { + for b in BS { + assert!(blend1(m, a, b).is_finite(), "{m:?} {a} {b}"); + assert!(blend3(m, [a; 3], [b; 3]).iter().all(|v| v.is_finite()), "{m:?}"); + } + } + } + } + + #[test] + fn color_keeps_lower_luminance() { + let a = [0.2, 0.4, 0.6]; + let out = blend3(BlendMode::Color, a, [1.0, 0.0, 0.0]); + assert!(close(lum(out), lum(a))); + } + + #[test] + fn flat_normal_detail_is_identity() { + let flat = [0.5, 0.5, 1.0]; + let n = pack([0.3, -0.2, 0.9]); + for m in [BlendMode::NormalMapDetail, BlendMode::NormalMapCombine] { + let out = blend3(m, n, flat); + for i in 0..3 { + assert!((out[i] - n[i]).abs() < 1e-4, "{m:?} {out:?} {n:?}"); + } + } + } + + #[test] + fn menu_lists_each_mode_once_and_parse_round_trips() { + let all: Vec<_> = BlendMode::all().collect(); + assert_eq!(all.len(), 32); + for m in &all { + assert_eq!(all.iter().filter(|x| *x == m).count(), 1); + assert_eq!(BlendMode::parse(m.label()), Some(*m)); + assert_eq!(BlendMode::parse(&format!("{m:?}")), Some(*m)); + } + } +} diff --git a/crates/core/src/channel.rs b/crates/core/src/channel.rs new file mode 100644 index 00000000..ed8a1392 --- /dev/null +++ b/crates/core/src/channel.rs @@ -0,0 +1,206 @@ +//! Material channels of a texture set. + +use serde::{Deserialize, Serialize}; + +/// A material channel. Order is the display order in the UI. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +pub enum Channel { + BaseColor, + Metallic, + Roughness, + Normal, + Height, + Emissive, + Opacity, + AmbientOcclusion, + SpecularLevel, + /// Specular/glossiness workflow: the F0 color. + Specular, + /// Specular/glossiness workflow: 1 − roughness. + Glossiness, +} + +/// How a channel's values are stored and interpreted. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ChannelKind { + /// Linear RGB color, displayed and exported sRGB-encoded. + Color, + /// Tangent-space normal packed into 0..1 (`n * 0.5 + 0.5`). + NormalMap, + /// A 0..1 scalar. + Scalar, + /// A signed scalar (height). + Signed, +} + +impl Channel { + pub const ALL: [Channel; 11] = [ + Channel::BaseColor, + Channel::Metallic, + Channel::Roughness, + Channel::Normal, + Channel::Height, + Channel::Emissive, + Channel::Opacity, + Channel::AmbientOcclusion, + Channel::SpecularLevel, + Channel::Specular, + Channel::Glossiness, + ]; + + /// The channels of the default "PBR - Metallic Roughness" template. + pub const DEFAULT_SET: [Channel; 5] = [Channel::BaseColor, Channel::Metallic, Channel::Roughness, Channel::Normal, Channel::Height]; + + pub fn kind(self) -> ChannelKind { + match self { + Channel::BaseColor | Channel::Emissive | Channel::Specular => ChannelKind::Color, + Channel::Normal => ChannelKind::NormalMap, + Channel::Height => ChannelKind::Signed, + _ => ChannelKind::Scalar, + } + } + + /// Value components (without coverage): 3 for colors and normals, 1 for scalars. + pub fn components(self) -> usize { + match self.kind() { + ChannelKind::Color | ChannelKind::NormalMap => 3, + ChannelKind::Scalar | ChannelKind::Signed => 1, + } + } + + /// The value a texel has when no layer covers it. + pub fn default_value(self) -> [f32; 3] { + match self { + Channel::BaseColor => [0.5, 0.5, 0.5], + Channel::Metallic | Channel::Height | Channel::Emissive => [0.0; 3], + Channel::Roughness => [0.5; 3], + Channel::Normal => [0.5, 0.5, 1.0], + Channel::Opacity | Channel::AmbientOcclusion => [1.0; 3], + Channel::SpecularLevel | Channel::Glossiness => [0.5; 3], + // F0 of a common dielectric (4 %). + Channel::Specular => [0.04; 3], + } + } + + pub fn label(self) -> &'static str { + match self { + Channel::BaseColor => "Base color", + Channel::Metallic => "Metallic", + Channel::Roughness => "Roughness", + Channel::Normal => "Normal", + Channel::Height => "Height", + Channel::Emissive => "Emissive", + Channel::Opacity => "Opacity", + Channel::AmbientOcclusion => "Ambient occlusion", + Channel::SpecularLevel => "Specular level", + Channel::Specular => "Specular", + Channel::Glossiness => "Glossiness", + } + } + + /// Short label used on material channel toggle buttons. + pub fn short(self) -> &'static str { + match self { + Channel::BaseColor => "color", + Channel::Metallic => "metal", + Channel::Roughness => "rough", + Channel::Normal => "nrm", + Channel::Height => "height", + Channel::Emissive => "emiss", + Channel::Opacity => "op", + Channel::AmbientOcclusion => "ao", + Channel::SpecularLevel => "spec", + Channel::Specular => "specular", + Channel::Glossiness => "gloss", + } + } + + /// Stable machine id (commands, export templates, file names). + pub fn id(self) -> &'static str { + match self { + Channel::BaseColor => "baseColor", + Channel::Metallic => "metallic", + Channel::Roughness => "roughness", + Channel::Normal => "normal", + Channel::Height => "height", + Channel::Emissive => "emissive", + Channel::Opacity => "opacity", + Channel::AmbientOcclusion => "ambientOcclusion", + Channel::SpecularLevel => "specularLevel", + Channel::Specular => "specular", + Channel::Glossiness => "glossiness", + } + } + + /// Parse an id, label or short label (case-insensitive, spaces/underscores ignored). + pub fn parse(s: &str) -> Option { + let norm = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-'], ""); + let want = norm(s); + Channel::ALL.into_iter().find(|c| norm(c.id()) == want || norm(c.label()) == want || norm(c.short()) == want || norm(&format!("{c:?}")) == want) + } + + pub fn index(self) -> usize { + Channel::ALL.iter().position(|c| *c == self).unwrap_or(0) + } +} + +/// Storage format of a channel in a texture set (what export and the UI report). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub enum ChannelFormat { + Srgb8, + L8, + Rgb8, + L16, + Rgb16, + L16F, + Rgb16F, + L32F, + Rgb32F, +} + +impl ChannelFormat { + pub fn default_for(c: Channel) -> ChannelFormat { + match c.kind() { + ChannelKind::Color => ChannelFormat::Srgb8, + ChannelKind::NormalMap => ChannelFormat::Rgb16F, + ChannelKind::Scalar => ChannelFormat::L8, + ChannelKind::Signed => ChannelFormat::L16F, + } + } + pub fn label(self) -> &'static str { + match self { + ChannelFormat::Srgb8 => "sRGB8", + ChannelFormat::L8 => "L8", + ChannelFormat::Rgb8 => "RGB8", + ChannelFormat::L16 => "L16", + ChannelFormat::Rgb16 => "RGB16", + ChannelFormat::L16F => "L16F", + ChannelFormat::Rgb16F => "RGB16F", + ChannelFormat::L32F => "L32F", + ChannelFormat::Rgb32F => "RGB32F", + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_accepts_ids_labels_and_shorts() { + for c in Channel::ALL { + assert_eq!(Channel::parse(c.id()), Some(c)); + assert_eq!(Channel::parse(c.label()), Some(c)); + assert_eq!(Channel::parse(c.short()), Some(c)); + } + assert_eq!(Channel::parse("base color"), Some(Channel::BaseColor)); + assert_eq!(Channel::parse("nope"), None); + } + + #[test] + fn index_matches_all_order() { + for (i, c) in Channel::ALL.iter().enumerate() { + assert_eq!(c.index(), i); + } + } +} diff --git a/crates/core/src/layer.rs b/crates/core/src/layer.rs new file mode 100644 index 00000000..916b7cd7 --- /dev/null +++ b/crates/core/src/layer.rs @@ -0,0 +1,716 @@ +//! Layers, masks, effects and fill sources. + +use std::collections::BTreeMap; + +use serde::{Deserialize, Serialize}; + +use crate::{BlendMode, Channel}; + +/// Id of a layer or effect (one id space per project). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +pub struct LayerId(pub u64); + +/// Blend mode and opacity of one channel of a layer. A channel missing from +/// [`Layer::channels`] is disabled for that layer. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChannelBlend { + pub mode: BlendMode, + pub opacity: f32, +} + +impl Default for ChannelBlend { + fn default() -> Self { + ChannelBlend { mode: BlendMode::Normal, opacity: 1.0 } + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Layer { + pub id: LayerId, + pub name: String, + pub visible: bool, + pub kind: LayerKind, + pub channels: BTreeMap, + #[serde(default)] + pub mask: Option, + /// Effects applied to the layer's content, bottom → top. + #[serde(default)] + pub content_effects: Vec, + /// Painter-style color tag (0..8), shown as a stripe on the layer row. + #[serde(default)] + pub color_tag: Option, + /// Combine the mask with the layer's height ("mask with height"). + #[serde(default)] + pub height_mask: HeightMask, +} + +/// Mask with height: partial mask values follow the layer's own height, so a transition +/// reveals the high parts first. With mask `m` and the layer's height `h` (−1..1): +/// `m' = saturate(m + contrast · 4m(1 − m) · (h + offset))`. Fully hidden (0) and fully shown +/// (1) texels are unchanged, as is everything where the layer has no height. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct HeightMask { + pub enabled: bool, + /// How strongly the height pushes the mask (0 = plain mask), 0..64. + pub contrast: f32, + /// Added to the height before it pushes the mask, −1..1. + pub offset: f32, +} + +impl Default for HeightMask { + fn default() -> Self { + HeightMask { enabled: false, contrast: 1.0, offset: 0.0 } + } +} + +impl HeightMask { + /// The mask `m` combined with height `h` (see [`HeightMask`]). + pub fn apply(&self, m: f32, h: f32) -> f32 { + if !self.enabled || !h.is_finite() { + return m; + } + (m + self.contrast * 4.0 * m * (1.0 - m) * (h + self.offset)).clamp(0.0, 1.0) + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum LayerKind { + /// Painted pixels, stored per channel by the engine under the layer id. + Paint, + /// A procedural or uniform material applied everywhere (shaped by the mask). + Fill(Fill), + /// A folder of layers, bottom → top. + Group { children: Vec, collapsed: bool }, + /// A linked instance of `source` (possibly in another texture set): renders the source's + /// content, content effects and channel blending, and its mask unless the instance has its + /// own. Edits to the source show in every instance. + Instance { source: LayerId }, +} + +impl LayerKind { + pub fn name(&self) -> &'static str { + match self { + LayerKind::Paint => "paint", + LayerKind::Fill(_) => "fill", + LayerKind::Group { .. } => "group", + LayerKind::Instance { .. } => "instance", + } + } +} + +impl Layer { + /// A layer with every channel of `channels` enabled at Normal/100%. + pub fn new(id: LayerId, name: impl Into, kind: LayerKind, channels: &[Channel]) -> Layer { + Layer { + id, + name: name.into(), + visible: true, + kind, + channels: channels.iter().map(|c| (*c, ChannelBlend::default())).collect(), + mask: None, + content_effects: Vec::new(), + color_tag: None, + height_mask: HeightMask::default(), + } + } + + pub fn is_group(&self) -> bool { + matches!(self.kind, LayerKind::Group { .. }) + } + + pub fn children(&self) -> &[LayerId] { + match &self.kind { + LayerKind::Group { children, .. } => children, + _ => &[], + } + } + + pub fn blend(&self, c: Channel) -> Option { + self.channels.get(&c).copied() + } + + /// The layer this one instances, if it is an instance. + pub fn instance_source(&self) -> Option { + match self.kind { + LayerKind::Instance { source } => Some(source), + _ => None, + } + } +} + +/// Where a texture or procedural is sampled from on the surface. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum Projection { + /// Texture coordinates of the mesh. + Uv { scale: [f32; 2], rotation: f32, offset: [f32; 2] }, + /// World-space box projection blended by the normal. + Triplanar { scale: f32, sharpness: f32, offset: [f32; 3] }, + /// World-space planar projection along an axis (0 = X, 1 = Y, 2 = Z). + Planar { scale: f32, axis: u8, offset: [f32; 3] }, + /// Spherical projection around the mesh center. + Spherical { scale: f32 }, + /// Cylindrical projection around an axis. + Cylindrical { scale: f32, axis: u8 }, +} + +impl Default for Projection { + fn default() -> Self { + Projection::Uv { scale: [1.0, 1.0], rotation: 0.0, offset: [0.0, 0.0] } + } +} + +impl Projection { + pub fn label(&self) -> &'static str { + match self { + Projection::Uv { .. } => "UV projection", + Projection::Triplanar { .. } => "Tri-planar projection", + Projection::Planar { .. } => "Planar projection", + Projection::Spherical { .. } => "Spherical projection", + Projection::Cylindrical { .. } => "Cylindrical projection", + } + } +} + +/// Procedural patterns available to fills, generators and masks. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum ProceduralKind { + /// Smooth fractal value noise. + Clouds, + /// Gradient (Perlin-style) noise. + Perlin, + /// Fine high-frequency noise. + Noise, + /// Worley / cellular noise. + Cells, + /// Blotchy grunge: thresholded multi-scale noise. + Grunge, + /// Thin random scratches. + Scratches, + /// Checkerboard. + Checker, + /// Stripes. + Stripes, + /// Linear gradient along U (or the projection axis). + Gradient, + /// Wood grain: growth rings with fibers along X. + Wood, + /// Running-bond bricks with mortar joints (0 = mortar). + Bricks, + /// Square tiles with grout joints (0 = grout). + Tiles, + /// Plain fabric weave. + Weave, + /// Leather grain: pebbled cells with creases. + Leather, + /// Hammered metal dimples. + Hammered, + /// Fine brushed-metal lines along X. + Brushed, + /// Marble veins. + Marble, + /// Flat random tone per Voronoi cell (crystals, spangle, stones). + Voronoi, + /// Vertical streaks and leaks (along the projection's up axis). + Streaks, + /// Fingerprints and smudges. + Smudges, + /// Small round pores and pits (0 = pore). + Pores, + /// Sharp-edged paint chips. + Chips, +} + +impl ProceduralKind { + pub const ALL: [ProceduralKind; 22] = [ + ProceduralKind::Clouds, + ProceduralKind::Perlin, + ProceduralKind::Noise, + ProceduralKind::Cells, + ProceduralKind::Grunge, + ProceduralKind::Scratches, + ProceduralKind::Checker, + ProceduralKind::Stripes, + ProceduralKind::Gradient, + ProceduralKind::Wood, + ProceduralKind::Bricks, + ProceduralKind::Tiles, + ProceduralKind::Weave, + ProceduralKind::Leather, + ProceduralKind::Hammered, + ProceduralKind::Brushed, + ProceduralKind::Marble, + ProceduralKind::Voronoi, + ProceduralKind::Streaks, + ProceduralKind::Smudges, + ProceduralKind::Pores, + ProceduralKind::Chips, + ]; + pub fn label(self) -> &'static str { + match self { + ProceduralKind::Clouds => "Clouds", + ProceduralKind::Perlin => "Perlin noise", + ProceduralKind::Noise => "Fine noise", + ProceduralKind::Cells => "Cells", + ProceduralKind::Grunge => "Grunge", + ProceduralKind::Scratches => "Scratches", + ProceduralKind::Checker => "Checker", + ProceduralKind::Stripes => "Stripes", + ProceduralKind::Gradient => "Gradient", + ProceduralKind::Wood => "Wood grain", + ProceduralKind::Bricks => "Bricks", + ProceduralKind::Tiles => "Tiles", + ProceduralKind::Weave => "Fabric weave", + ProceduralKind::Leather => "Leather grain", + ProceduralKind::Hammered => "Hammered", + ProceduralKind::Brushed => "Brushed lines", + ProceduralKind::Marble => "Marble veins", + ProceduralKind::Voronoi => "Voronoi", + ProceduralKind::Streaks => "Streaks", + ProceduralKind::Smudges => "Fingerprints", + ProceduralKind::Pores => "Pores", + ProceduralKind::Chips => "Paint chips", + } + } + pub fn parse(s: &str) -> Option { + let norm = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-'], ""); + ProceduralKind::ALL.into_iter().find(|k| norm(k.label()) == norm(s) || norm(&format!("{k:?}")) == norm(s)) + } +} + +/// A procedural grayscale pattern. Its output maps 0..1 between `low` and `high` values. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Procedural { + pub kind: ProceduralKind, + /// Pattern frequency (repeats per projection unit). + pub scale: f32, + pub seed: u32, + /// Contrast around 0.5 (1 = unchanged). + pub contrast: f32, + /// Shifts the pattern brighter (+) or darker (−). + pub balance: f32, + pub invert: bool, +} + +impl Procedural { + pub fn new(kind: ProceduralKind) -> Procedural { + Procedural { kind, scale: 4.0, seed: 1, contrast: 1.0, balance: 0.0, invert: false } + } +} + +/// What a fill writes into one channel. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum Source { + /// A constant value (linear RGB for colors; `[v, v, v]` for scalars). + Uniform([f32; 3]), + /// A procedural pattern mixing two values. + Procedural { pattern: Procedural, low: [f32; 3], high: [f32; 3] }, + /// An imported image resource, by name. + Image { name: String }, + /// The stack value recorded by an anchor point effect (`anchor` is the effect id) for + /// `channel`; colors read as gray where a scalar is needed. + Anchor { anchor: LayerId, channel: Channel }, +} + +impl Source { + pub fn uniform_of(c: Channel) -> Source { + Source::Uniform(c.default_value()) + } + + /// The anchor point this source reads, if any. + pub fn anchor(&self) -> Option { + match self { + Source::Anchor { anchor, .. } => Some(*anchor), + _ => None, + } + } +} + +/// A fill layer's material: one source per channel, plus how it is projected. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)] +pub struct Fill { + pub sources: BTreeMap, + pub projection: Projection, +} + +impl Fill { + /// Value used for `c` when the fill has no source for it: the channel default. + pub fn source(&self, c: Channel) -> Source { + self.sources.get(&c).cloned().unwrap_or_else(|| Source::uniform_of(c)) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum MaskBackground { + #[default] + White, + Black, +} + +/// A layer mask: a background color with a stack of effects on top. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Mask { + pub enabled: bool, + pub background: MaskBackground, + /// Effects bottom → top. Paint effects hold bitmap data keyed by their id. + pub effects: Vec, +} + +impl Mask { + pub fn new(background: MaskBackground) -> Mask { + Mask { enabled: true, background, effects: Vec::new() } + } +} + +/// Levels remap: input range, gamma, output range. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct Levels { + pub in_low: f32, + pub in_high: f32, + pub gamma: f32, + pub out_low: f32, + pub out_high: f32, +} + +impl Default for Levels { + fn default() -> Self { + Levels { in_low: 0.0, in_high: 1.0, gamma: 1.0, out_low: 0.0, out_high: 1.0 } + } +} + +impl Levels { + pub fn apply(&self, x: f32) -> f32 { + let t = ((x - self.in_low) / (self.in_high - self.in_low).max(1e-5)).clamp(0.0, 1.0); + let t = t.powf(1.0 / self.gamma.max(1e-3)); + self.out_low + (self.out_high - self.out_low) * t + } +} + +/// Mesh-map driven mask generators (the "smart mask" building blocks). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum GeneratorKind { + /// Convex edges from the curvature map. + EdgeWear, + /// Crevices from ambient occlusion. + Dirt, + /// Thin parts from the thickness map. + ThinAreas, + /// Raw curvature. + Curvature, + /// Raw ambient occlusion. + AmbientOcclusion, + /// Gradient along a world axis (bottom → top by default). + Position, + /// Surfaces facing a direction (e.g. up for dust). + Direction, +} + +impl GeneratorKind { + pub const ALL: [GeneratorKind; 7] = [ + GeneratorKind::EdgeWear, + GeneratorKind::Dirt, + GeneratorKind::ThinAreas, + GeneratorKind::Curvature, + GeneratorKind::AmbientOcclusion, + GeneratorKind::Position, + GeneratorKind::Direction, + ]; + pub fn label(self) -> &'static str { + match self { + GeneratorKind::EdgeWear => "Mask Editor: Edge wear", + GeneratorKind::Dirt => "Dirt", + GeneratorKind::ThinAreas => "Thin areas", + GeneratorKind::Curvature => "Curvature", + GeneratorKind::AmbientOcclusion => "Ambient occlusion", + GeneratorKind::Position => "Position gradient", + GeneratorKind::Direction => "Light / direction", + } + } + pub fn parse(s: &str) -> Option { + let norm = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-', ':'], ""); + GeneratorKind::ALL.into_iter().find(|k| norm(&format!("{k:?}")) == norm(s) || norm(k.label()) == norm(s)) + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Generator { + pub kind: GeneratorKind, + /// Where the mask starts (0..1, generator specific threshold). + pub level: f32, + /// Edge softness (0 = hard). + pub softness: f32, + /// Breaks the result up with world-space noise (0 = none). + pub noise_amount: f32, + pub noise_scale: f32, + pub seed: u32, + /// Direction for `Position` / `Direction` generators (world space). + pub direction: [f32; 3], + pub invert: bool, +} + +impl Generator { + pub fn new(kind: GeneratorKind) -> Generator { + let (level, softness, noise_amount) = match kind { + GeneratorKind::EdgeWear => (0.6, 0.12, 0.5), + GeneratorKind::Dirt => (0.55, 0.25, 0.35), + GeneratorKind::ThinAreas => (0.3, 0.2, 0.0), + _ => (0.5, 0.25, 0.0), + }; + Generator { kind, level, softness, noise_amount, noise_scale: 8.0, seed: 7, direction: [0.0, 1.0, 0.0], invert: false } + } +} + +/// Filters usable on masks and content. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum Filter { + Blur { + radius: f32, + }, + Sharpen { + amount: f32, + }, + Invert, + Threshold { + level: f32, + }, + /// Hue/saturation/lightness shift (color channels; lightness only on grays and masks). + /// `hue` is in turns, `saturation` and `lightness` in −1..1; all zero = unchanged. + Hsl { + hue: f32, + saturation: f32, + lightness: f32, + }, +} + +/// Push `x` (0..1) towards 1 (`amount` > 0) or 0 (`amount` < 0); `amount` in −1..1. +fn shift_unit(x: f32, amount: f32) -> f32 { + let a = amount.clamp(-1.0, 1.0); + if a >= 0.0 { x + (1.0 - x) * a } else { x * (1.0 + a) } +} + +fn hue_to_rgb(p: f32, q: f32, t: f32) -> f32 { + let t = t.rem_euclid(1.0); + if t < 1.0 / 6.0 { + p + (q - p) * 6.0 * t + } else if t < 0.5 { + q + } else if t < 2.0 / 3.0 { + p + (q - p) * (2.0 / 3.0 - t) * 6.0 + } else { + p + } +} + +/// HSL adjustment of a 0..1 color (see [`Filter::Hsl`]). A gray stays gray and only its +/// lightness changes. +pub fn hsl_adjust(rgb: [f32; 3], hue: f32, saturation: f32, lightness: f32) -> [f32; 3] { + let [r, g, b] = rgb.map(|v| if v.is_finite() { v.clamp(0.0, 1.0) } else { 0.0 }); + let (mx, mn) = (r.max(g).max(b), r.min(g).min(b)); + let (d, l) = (mx - mn, (mx + mn) * 0.5); + let (h, s) = if d <= 1e-6 { + (0.0, 0.0) + } else { + let s = if l > 0.5 { d / (2.0 - mx - mn) } else { d / (mx + mn) }; + let h = if mx == r { + ((g - b) / d).rem_euclid(6.0) + } else if mx == g { + (b - r) / d + 2.0 + } else { + (r - g) / d + 4.0 + }; + (h / 6.0, s) + }; + let h = h + if hue.is_finite() { hue } else { 0.0 }; + let (s, l) = (if d <= 1e-6 { 0.0 } else { shift_unit(s, saturation) }, shift_unit(l, lightness)); + if s <= 0.0 { + return [l; 3]; + } + let q = if l < 0.5 { l * (1.0 + s) } else { l + s - l * s }; + let p = 2.0 * l - q; + [hue_to_rgb(p, q, h + 1.0 / 3.0), hue_to_rgb(p, q, h), hue_to_rgb(p, q, h - 1.0 / 3.0)] +} + +impl Filter { + pub fn label(&self) -> &'static str { + match self { + Filter::Blur { .. } => "Blur", + Filter::Sharpen { .. } => "Sharpen", + Filter::Invert => "Invert", + Filter::Threshold { .. } => "Threshold", + Filter::Hsl { .. } => "HSL Perceptive", + } + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum EffectKind { + /// Painted grayscale (mask) or material (content) pixels keyed by the effect id. + Paint, + /// A uniform or procedural grayscale fill. + Fill { + source: Source, + projection: Projection, + }, + Generator(Generator), + Levels(Levels), + Filter(Filter), + /// Select ID-map colors within a tolerance. + ColorSelection { + colors: Vec<[f32; 3]>, + tolerance: f32, + }, + /// Compare the mask with a constant. + Compare { + op: CompareOp, + value: f32, + tolerance: f32, + }, + /// Content only: a material fill (one source per channel; channels without a source are + /// left as they are). + Material(Fill), + /// Content only: records the composited stack right after its layer (that layer and + /// everything below) so masks and fills above can read it ([`Source::Anchor`]). + Anchor, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub enum CompareOp { + LesserThan, + WithinTolerance, + GreaterThan, +} + +impl EffectKind { + pub fn name(&self) -> &'static str { + match self { + EffectKind::Paint => "Paint", + EffectKind::Fill { .. } => "Fill", + EffectKind::Generator(_) => "Generator", + EffectKind::Levels(_) => "Levels", + EffectKind::Filter(f) => f.label(), + EffectKind::ColorSelection { .. } => "Color selection", + EffectKind::Compare { .. } => "Compare mask", + EffectKind::Material(_) => "Fill", + EffectKind::Anchor => "Anchor point", + } + } + + /// Whether the effect belongs in a layer's content stack (`true`), its mask (`false`), or + /// both (`None`). + pub fn content_only(&self) -> Option { + match self { + EffectKind::Material(_) | EffectKind::Anchor => Some(true), + EffectKind::Fill { .. } | EffectKind::Generator(_) | EffectKind::ColorSelection { .. } | EffectKind::Compare { .. } => Some(false), + EffectKind::Paint | EffectKind::Levels(_) | EffectKind::Filter(_) => None, + } + } + + /// Anchor points read by this effect's sources. + fn reads_anchor(&self) -> bool { + match self { + EffectKind::Fill { source, .. } => source.anchor().is_some(), + EffectKind::Material(f) => f.sources.values().any(|s| s.anchor().is_some()), + _ => false, + } + } +} + +impl Layer { + /// Whether any source of the layer (fill, mask or content effects) reads an anchor point. + pub fn reads_anchor(&self) -> bool { + let fill = match &self.kind { + LayerKind::Fill(f) => f.sources.values().any(|s| s.anchor().is_some()), + _ => false, + }; + fill || self.mask.iter().flat_map(|m| m.effects.iter()).chain(self.content_effects.iter()).any(|e| e.kind.reads_anchor()) + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Effect { + pub id: LayerId, + pub name: String, + pub visible: bool, + pub kind: EffectKind, + pub blend: BlendMode, + pub opacity: f32, +} + +impl Effect { + pub fn new(id: LayerId, kind: EffectKind) -> Effect { + // Generators and fills that build a mask usually add on top of the background. + Effect { id, name: kind.name().to_string(), visible: true, kind, blend: BlendMode::Normal, opacity: 1.0 } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn levels_map_range_and_gamma() { + let l = Levels { in_low: 0.2, in_high: 0.6, gamma: 1.0, out_low: 0.0, out_high: 1.0 }; + assert!((l.apply(0.4) - 0.5).abs() < 1e-6); + assert_eq!(l.apply(0.0), 0.0); + assert_eq!(l.apply(1.0), 1.0); + let g = Levels { gamma: 2.0, ..Levels::default() }; + assert!((g.apply(0.25) - 0.5).abs() < 1e-6); + // Degenerate ranges never divide by zero. + let d = Levels { in_low: 0.5, in_high: 0.5, ..Levels::default() }; + assert!(d.apply(0.7).is_finite()); + } + + #[test] + fn hsl_adjust_shifts_hue_saturation_and_lightness() { + let close = |a: [f32; 3], b: [f32; 3]| (0..3).all(|i| (a[i] - b[i]).abs() < 1e-4); + let c = [0.8, 0.3, 0.1]; + assert!(close(hsl_adjust(c, 0.0, 0.0, 0.0), c), "identity"); + assert!(close(hsl_adjust([1.0, 0.0, 0.0], 1.0 / 3.0, 0.0, 0.0), [0.0, 1.0, 0.0]), "red → green"); + assert!(close(hsl_adjust([1.0, 0.0, 0.0], -1.0 / 3.0, 0.0, 0.0), [0.0, 0.0, 1.0]), "red → blue"); + let gray = hsl_adjust(c, 0.0, -1.0, 0.0); + assert!((gray[0] - gray[1]).abs() < 1e-6 && (gray[1] - gray[2]).abs() < 1e-6); + // Grays only change lightness, whatever the hue and saturation. + assert!(close(hsl_adjust([0.4; 3], 0.3, 1.0, 0.5), [0.7; 3])); + assert!(close(hsl_adjust([0.4; 3], 0.0, 0.0, -0.5), [0.2; 3])); + assert!(hsl_adjust([f32::NAN, 2.0, -1.0], f32::NAN, 5.0, -5.0).iter().all(|v| v.is_finite())); + } + + #[test] + fn effect_targets_and_anchor_reads() { + assert_eq!(EffectKind::Anchor.content_only(), Some(true)); + assert_eq!(EffectKind::Generator(Generator::new(GeneratorKind::Dirt)).content_only(), Some(false)); + assert_eq!(EffectKind::Filter(Filter::Invert).content_only(), None); + let mut l = Layer::new(LayerId(1), "l", LayerKind::Paint, &[Channel::BaseColor]); + assert!(!l.reads_anchor()); + let source = Source::Anchor { anchor: LayerId(9), channel: Channel::Height }; + l.mask = Some(Mask { effects: vec![Effect::new(LayerId(2), EffectKind::Fill { source, projection: Projection::default() })], ..Mask::new(MaskBackground::Black) }); + assert!(l.reads_anchor()); + } + + #[test] + fn height_mask_keeps_the_ends_and_follows_height() { + let off = HeightMask::default(); + assert_eq!(off.apply(0.3, 1.0), 0.3, "disabled"); + let hm = HeightMask { enabled: true, contrast: 1.0, offset: 0.0 }; + for h in [-1.0, 0.0, 1.0] { + assert_eq!(hm.apply(0.0, h), 0.0); + assert_eq!(hm.apply(1.0, h), 1.0); + } + assert_eq!(hm.apply(0.5, 0.0), 0.5, "no height, no change"); + assert_eq!(hm.apply(0.5, 0.5), 1.0); + assert_eq!(hm.apply(0.5, -0.5), 0.0); + assert!(hm.apply(0.5, 0.1) > 0.5 && hm.apply(0.5, -0.1) < 0.5); + assert!(HeightMask { offset: 0.5, ..hm }.apply(0.5, 0.0) > 0.5); + assert_eq!(hm.apply(0.5, f32::NAN), 0.5); + } + + #[test] + fn generator_kinds_parse() { + for k in GeneratorKind::ALL { + assert_eq!(GeneratorKind::parse(&format!("{k:?}")), Some(k)); + } + for k in ProceduralKind::ALL { + assert_eq!(ProceduralKind::parse(k.label()), Some(k)); + } + } +} diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs new file mode 100644 index 00000000..21a796cd --- /dev/null +++ b/crates/core/src/lib.rs @@ -0,0 +1,38 @@ +//! # texturecraft-core +//! +//! The TextureCraft document model: a [`Project`] holds texture sets (one per mesh material), +//! each with a stack of [`Layer`]s (paint, fill, group) whose channels blend with one of +//! Painter's [`BlendMode`]s. Pure data with serde; pixels live in `texturecraft-texel` images +//! owned by the engine. [`blend`] is the CPU reference for every blend mode. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod blend; +pub mod channel; +pub mod layer; +pub mod project; + +pub use blend::{BlendMode, blend1, blend3, lum, mix3}; +pub use channel::{Channel, ChannelFormat, ChannelKind}; +pub use layer::{ + ChannelBlend, CompareOp, Effect, EffectKind, Fill, Filter, Generator, GeneratorKind, HeightMask, Layer, LayerId, LayerKind, Levels, Mask, MaskBackground, Procedural, + ProceduralKind, Projection, Source, hsl_adjust, +}; +pub use project::{AoMixing, BakeMatch, BakeSettings, BakedMap, DisplaySettings, FORMAT_VERSION, NormalFormat, NormalMixing, Project, TextureSet, ToneMapping}; + +#[derive(Debug, thiserror::Error, Clone, PartialEq)] +pub enum CoreError { + #[error("no layer with id {}", .0.0)] + NoLayer(LayerId), + #[error("no texture set {0}")] + NoTextureSet(usize), + #[error("{0}")] + Invalid(String), +} + +pub type Result = std::result::Result; + +/// Product name for user-facing text. +pub const APP_NAME: &str = "TextureCraft"; +/// Native project file extension. +pub const PROJECT_EXT: &str = "tcraft"; diff --git a/crates/core/src/project.rs b/crates/core/src/project.rs new file mode 100644 index 00000000..493bc96b --- /dev/null +++ b/crates/core/src/project.rs @@ -0,0 +1,744 @@ +//! The project: texture sets, their layer stacks, and project-wide settings. + +use std::collections::{BTreeMap, BTreeSet}; + +use serde::{Deserialize, Serialize}; + +use crate::{Channel, ChannelFormat, CoreError, Effect, Layer, LayerId, LayerKind, Result}; + +pub const FORMAT_VERSION: u32 = 1; + +/// Maximum group nesting (also bounds recursion over hostile project files). +pub const MAX_DEPTH: usize = 16; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum NormalFormat { + #[default] + OpenGl, + DirectX, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +pub enum BakedMap { + Normal, + WorldNormal, + Id, + AmbientOcclusion, + Curvature, + Position, + Thickness, + Height, + /// World-space direction of least occlusion (packed like the world-space normal). + BentNormal, + /// 1 where the high poly covers the low poly (times the high poly's vertex alpha). + Opacity, + /// The high poly's vertex colors. + ColorMap, + /// Facing ratio towards [`BakeSettings::direction`] (0.5 = perpendicular). + WorldDirection, +} + +impl BakedMap { + pub const ALL: [BakedMap; 12] = [ + BakedMap::Normal, + BakedMap::WorldNormal, + BakedMap::Id, + BakedMap::AmbientOcclusion, + BakedMap::Curvature, + BakedMap::Position, + BakedMap::Thickness, + BakedMap::Height, + BakedMap::BentNormal, + BakedMap::Opacity, + BakedMap::ColorMap, + BakedMap::WorldDirection, + ]; + pub fn label(self) -> &'static str { + match self { + BakedMap::Normal => "Normal", + BakedMap::WorldNormal => "World space normal", + BakedMap::Id => "ID", + BakedMap::AmbientOcclusion => "Ambient occlusion", + BakedMap::Curvature => "Curvature", + BakedMap::Position => "Position", + BakedMap::Thickness => "Thickness", + BakedMap::Height => "Height", + BakedMap::BentNormal => "Bent normals", + BakedMap::Opacity => "Opacity", + BakedMap::ColorMap => "Color map", + BakedMap::WorldDirection => "World space direction", + } + } + pub fn id(self) -> &'static str { + match self { + BakedMap::Normal => "normal_base", + BakedMap::WorldNormal => "world_space_normals", + BakedMap::Id => "id", + BakedMap::AmbientOcclusion => "ambient_occlusion", + BakedMap::Curvature => "curvature", + BakedMap::Position => "position", + BakedMap::Thickness => "thickness", + BakedMap::Height => "height", + BakedMap::BentNormal => "bent_normals", + BakedMap::Opacity => "opacity", + BakedMap::ColorMap => "color_map", + BakedMap::WorldDirection => "world_space_direction", + } + } + /// Components stored (3 for vector maps, 1 for scalar maps). + pub fn components(self) -> usize { + match self { + BakedMap::Normal | BakedMap::WorldNormal | BakedMap::Id | BakedMap::Position | BakedMap::BentNormal | BakedMap::ColorMap => 3, + _ => 1, + } + } + /// Value where nothing was baked (uncovered texels, missing maps). + pub fn neutral(self) -> [f32; 3] { + match self { + BakedMap::Normal | BakedMap::WorldNormal | BakedMap::BentNormal => [0.5, 0.5, 1.0], + BakedMap::AmbientOcclusion | BakedMap::Thickness => [1.0; 3], + BakedMap::Curvature | BakedMap::Height | BakedMap::WorldDirection => [0.5; 3], + BakedMap::Id | BakedMap::Position | BakedMap::Opacity | BakedMap::ColorMap => [0.0; 3], + } + } + pub fn parse(s: &str) -> Option { + let norm = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-'], ""); + BakedMap::ALL.into_iter().find(|m| norm(m.label()) == norm(s) || norm(m.id()) == norm(s) || norm(&format!("{m:?}")) == norm(s)) + } +} + +/// How low-poly parts find their high-poly counterparts (Painter's "Match"). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum BakeMatch { + /// Every low-poly part sees every high-poly part. + #[default] + Always, + /// A low-poly part sees only high-poly parts of the same name once the suffixes are removed + /// (`wheel_low` ↔ `wheel_high`). + ByMeshName, +} + +/// Bake parameters (Painter's "Common parameters" plus the per-map parameters). Fields missing +/// from older projects take their defaults. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct BakeSettings { + /// Included by "Bake selected textures". + pub enabled: bool, + pub resolution: u32, + /// Supersampling per axis: 1 (none), 2, 4 or 8. + pub antialiasing: u32, + pub dilation: u32, + /// Rays per texel for AO, thickness and bent normals. + pub rays: u32, + /// Max occluder distance relative to the bounding-box diagonal. + pub max_distance: f32, + /// Curvature strength. + pub curvature_strength: f32, + /// Curvature from the baked normal map instead of the mesh. + pub curvature_from_normal: bool, + /// World-space direction of the "World space direction" map. + pub direction: [f32; 3], + pub maps: BTreeSet, + /// Bake from the low poly itself ("Use low poly mesh as high poly"). + pub use_low_as_high: bool, + /// Ray start distance in front of the low poly, relative to the bbox diagonal. + pub max_frontal: f32, + pub max_rear: f32, + /// Cast rays along normals averaged over hard edges (no gaps at split normals). + pub average_normals: bool, + pub matching: BakeMatch, + pub low_suffix: String, + pub high_suffix: String, +} + +impl Default for BakeSettings { + fn default() -> Self { + BakeSettings { + enabled: true, + resolution: 1024, + antialiasing: 1, + dilation: 16, + rays: 32, + max_distance: 0.25, + curvature_strength: 1.0, + curvature_from_normal: false, + direction: [0.0, 1.0, 0.0], + maps: [ + BakedMap::Normal, + BakedMap::WorldNormal, + BakedMap::Id, + BakedMap::AmbientOcclusion, + BakedMap::Curvature, + BakedMap::Position, + BakedMap::Thickness, + ] + .into_iter() + .collect(), + use_low_as_high: true, + max_frontal: 0.01, + max_rear: 0.01, + average_normals: true, + matching: BakeMatch::Always, + low_suffix: "_low".into(), + high_suffix: "_high".into(), + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum NormalMixing { + #[default] + Combine, + Replace, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum AoMixing { + #[default] + Multiply, + None, +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextureSet { + pub name: String, + #[serde(default)] + pub description: String, + /// Material index in the mesh this set paints. + pub material: usize, + /// Power of two, 128..=8192. + pub resolution: u32, + pub channels: Vec<(Channel, ChannelFormat)>, + /// Top-level layers, bottom → top. + pub stack: Vec, + #[serde(default)] + pub normal_mixing: NormalMixing, + #[serde(default)] + pub ao_mixing: AoMixing, + /// Height-to-normal strength. + #[serde(default = "one")] + pub height_strength: f32, + #[serde(default)] + pub bake: BakeSettings, + /// Mesh maps that have been baked (pixels live with the engine / project file). + #[serde(default)] + pub baked: BTreeSet, + #[serde(default = "yes")] + pub visible: bool, +} + +fn one() -> f32 { + 1.0 +} +fn yes() -> bool { + true +} + +impl TextureSet { + pub fn new(name: impl Into, material: usize, resolution: u32) -> TextureSet { + TextureSet { + name: name.into(), + description: String::new(), + material, + resolution, + channels: Channel::DEFAULT_SET.iter().map(|c| (*c, ChannelFormat::default_for(*c))).collect(), + stack: Vec::new(), + normal_mixing: NormalMixing::Combine, + ao_mixing: AoMixing::Multiply, + height_strength: 1.0, + bake: BakeSettings::default(), + baked: BTreeSet::new(), + visible: true, + } + } + + pub fn has_channel(&self, c: Channel) -> bool { + self.channels.iter().any(|(x, _)| *x == c) + } + + pub fn channel_list(&self) -> Vec { + self.channels.iter().map(|(c, _)| *c).collect() + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum ToneMapping { + #[default] + Linear, + AcesFilmic, +} + +/// Viewport display settings (saved with the project, as Painter does). Fields missing from +/// older projects take their defaults. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct DisplaySettings { + /// A built-in environment name, or `resource:` for an imported equirect image. + pub environment: String, + /// Background visibility 0..1. + pub env_opacity: f32, + pub env_exposure: f32, + pub env_blur: f32, + /// Degrees. + pub env_rotation: f32, + pub shadows: bool, + pub tone_mapping: ToneMapping, + pub fov: f32, + pub post_effects: bool, + pub bloom: f32, + pub vignette: f32, + pub sharpen: f32, + pub grain: f32, + pub ao_intensity: f32, + /// Accumulate jittered frames while the view is still (temporal anti-aliasing). + pub taa: bool, + /// Shader: PBR specular/glossiness (base color = diffuse, Specular = F0 color, Glossiness) + /// instead of metallic/roughness. + pub spec_gloss: bool, + /// Parallax occlusion mapping from the height channel (same depth as height-to-normal). + pub parallax: bool, +} + +/// Prefix of [`DisplaySettings::environment`] naming an image resource. +pub const ENV_RESOURCE_PREFIX: &str = "resource:"; + +impl DisplaySettings { + /// The image resource used as the environment, if any. + pub fn environment_resource(&self) -> Option<&str> { + self.environment.strip_prefix(ENV_RESOURCE_PREFIX) + } +} + +impl Default for DisplaySettings { + fn default() -> Self { + DisplaySettings { + environment: "Studio Soft".into(), + env_opacity: 0.0, + env_exposure: 0.0, + env_blur: 0.35, + env_rotation: 0.0, + shadows: false, + tone_mapping: ToneMapping::AcesFilmic, + fov: 40.0, + post_effects: false, + bloom: 0.0, + vignette: 0.0, + sharpen: 0.0, + grain: 0.0, + ao_intensity: 0.75, + taa: true, + spec_gloss: false, + parallax: false, + } + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Project { + pub format_version: u32, + pub name: String, + /// Path of the mesh inside the project file (or a built-in primitive id `builtin:`). + pub mesh: String, + pub normal_format: NormalFormat, + pub texture_sets: Vec, + pub layers: BTreeMap, + pub next_id: u64, + pub display: DisplaySettings, +} + +impl Project { + pub fn new(name: impl Into, mesh: impl Into) -> Project { + Project { + format_version: FORMAT_VERSION, + name: name.into(), + mesh: mesh.into(), + normal_format: NormalFormat::OpenGl, + texture_sets: Vec::new(), + layers: BTreeMap::new(), + next_id: 1, + display: DisplaySettings::default(), + } + } + + pub fn alloc_id(&mut self) -> LayerId { + let id = LayerId(self.next_id); + self.next_id = self.next_id.saturating_add(1); + id + } + + pub fn texture_set(&self, ts: usize) -> Result<&TextureSet> { + self.texture_sets.get(ts).ok_or(CoreError::NoTextureSet(ts)) + } + pub fn texture_set_mut(&mut self, ts: usize) -> Result<&mut TextureSet> { + self.texture_sets.get_mut(ts).ok_or(CoreError::NoTextureSet(ts)) + } + + pub fn layer(&self, id: LayerId) -> Result<&Layer> { + self.layers.get(&id).ok_or(CoreError::NoLayer(id)) + } + pub fn layer_mut(&mut self, id: LayerId) -> Result<&mut Layer> { + self.layers.get_mut(&id).ok_or(CoreError::NoLayer(id)) + } + + /// The texture set and parent group (None = top level) holding `id`, plus its index. + pub fn locate(&self, id: LayerId) -> Option<(usize, Option, usize)> { + for (ts, set) in self.texture_sets.iter().enumerate() { + if let Some(i) = set.stack.iter().position(|x| *x == id) { + return Some((ts, None, i)); + } + if let Some((parent, i)) = self.find_in(&set.stack, id, 0) { + return Some((ts, Some(parent), i)); + } + } + None + } + + fn find_in(&self, list: &[LayerId], id: LayerId, depth: usize) -> Option<(LayerId, usize)> { + if depth > MAX_DEPTH { + return None; + } + for g in list { + let Some(layer) = self.layers.get(g) else { continue }; + let kids = layer.children(); + if let Some(i) = kids.iter().position(|x| *x == id) { + return Some((*g, i)); + } + if let Some(found) = self.find_in(kids, id, depth + 1) { + return Some(found); + } + } + None + } + + /// The sibling list holding `id` (a texture set stack or a group's children). + fn siblings_mut(&mut self, ts: usize, parent: Option) -> Result<&mut Vec> { + match parent { + None => Ok(&mut self.texture_set_mut(ts)?.stack), + Some(p) => match &mut self.layer_mut(p)?.kind { + LayerKind::Group { children, .. } => Ok(children), + _ => Err(CoreError::Invalid(format!("layer {} is not a group", p.0))), + }, + } + } + + /// Insert `layer` into texture set `ts` above `above` (None = top of the stack). When + /// `above` is a group and `inside` is true, the layer goes to the top of the group. + pub fn insert_layer(&mut self, ts: usize, layer: Layer, above: Option, inside: bool) -> Result { + self.texture_set(ts)?; + let id = layer.id; + if self.layers.contains_key(&id) { + return Err(CoreError::Invalid(format!("layer id {} already exists", id.0))); + } + self.layers.insert(id, layer); + let placed = match above { + Some(target) if inside && self.layers.get(&target).is_some_and(Layer::is_group) => self.siblings_mut(ts, Some(target)).map(|kids| kids.push(id)), + Some(target) => match self.locate(target) { + Some((t, parent, i)) if t == ts => self.siblings_mut(ts, parent).map(|list| list.insert(i + 1, id)), + _ => self.texture_set_mut(ts).map(|s| s.stack.push(id)), + }, + None => self.texture_set_mut(ts).map(|s| s.stack.push(id)), + }; + if let Err(e) = placed { + self.layers.remove(&id); + return Err(e); + } + Ok(id) + } + + /// Remove a layer (and, for groups, everything inside). Returns the removed ids. + pub fn remove_layer(&mut self, id: LayerId) -> Result> { + let (ts, parent, i) = self.locate(id).ok_or(CoreError::NoLayer(id))?; + let list = self.siblings_mut(ts, parent)?; + if i < list.len() { + list.remove(i); + } + let mut removed = Vec::new(); + self.collect_subtree(id, 0, &mut removed); + for r in &removed { + self.layers.remove(r); + } + Ok(removed) + } + + fn collect_subtree(&self, id: LayerId, depth: usize, out: &mut Vec) { + if depth > MAX_DEPTH || out.contains(&id) { + return; + } + out.push(id); + if let Some(l) = self.layers.get(&id) { + for c in l.children() { + self.collect_subtree(*c, depth + 1, out); + } + } + } + + /// Move `id` within its sibling list to `index` (clamped). + pub fn move_layer(&mut self, id: LayerId, index: usize) -> Result<()> { + let (ts, parent, i) = self.locate(id).ok_or(CoreError::NoLayer(id))?; + let list = self.siblings_mut(ts, parent)?; + if i < list.len() { + list.remove(i); + let to = index.min(list.len()); + list.insert(to, id); + } + Ok(()) + } + + /// Move `id` above `target` anywhere in the same texture set (drag & drop). + pub fn move_above(&mut self, id: LayerId, target: Option, inside: bool) -> Result<()> { + if Some(id) == target { + return Ok(()); + } + let (ts, parent, i) = self.locate(id).ok_or(CoreError::NoLayer(id))?; + if let Some(t) = target { + let mut sub = Vec::new(); + self.collect_subtree(id, 0, &mut sub); + if sub.contains(&t) { + return Err(CoreError::Invalid("cannot move a group into itself".into())); + } + } + let list = self.siblings_mut(ts, parent)?; + if i < list.len() { + list.remove(i); + } + let layer = self.layers.remove(&id).ok_or(CoreError::NoLayer(id))?; + self.insert_layer(ts, layer, target, inside).map(|_| ()) + } + + /// Visible-order walk of a stack: every layer id, depth-first, bottom → top. + pub fn walk(&self, ts: usize) -> Vec<(LayerId, usize)> { + let mut out = Vec::new(); + if let Some(set) = self.texture_sets.get(ts) { + self.walk_list(&set.stack, 0, &mut out); + } + out + } + + fn walk_list(&self, list: &[LayerId], depth: usize, out: &mut Vec<(LayerId, usize)>) { + if depth > MAX_DEPTH { + return; + } + for id in list { + out.push((*id, depth)); + if let Some(l) = self.layers.get(id) { + self.walk_list(l.children(), depth + 1, out); + } + } + } + + /// Find an effect anywhere (mask or content stacks) by id: (owning layer, effect). + pub fn effect(&self, id: LayerId) -> Option<(LayerId, &Effect)> { + self.layers.values().find_map(|l| l.mask.iter().flat_map(|m| m.effects.iter()).chain(l.content_effects.iter()).find(|e| e.id == id).map(|e| (l.id, e))) + } + + pub fn effect_mut(&mut self, id: LayerId) -> Option<&mut Effect> { + self.layers.values_mut().find_map(|l| { + let in_mask = l.mask.as_mut().and_then(|m| m.effects.iter_mut().find(|e| e.id == id)); + match in_mask { + Some(e) => Some(e), + None => l.content_effects.iter_mut().find(|e| e.id == id), + } + }) + } + + /// A unique " " name among the layers of texture set `ts`. + pub fn next_layer_name(&self, ts: usize, base: &str) -> String { + let names: BTreeSet<&str> = self.walk(ts).iter().filter_map(|(id, _)| self.layers.get(id).map(|l| l.name.as_str())).collect(); + (1..).map(|n| format!("{base} {n}")).find(|n| !names.contains(n.as_str())).unwrap_or_else(|| base.to_string()) + } + + /// Check structural invariants (ids exist, no layer appears twice). Used after loading. + pub fn validate(&self) -> Result<()> { + if self.format_version > FORMAT_VERSION { + return Err(CoreError::Invalid(format!("project format {} is newer than this TextureCraft supports ({FORMAT_VERSION})", self.format_version))); + } + let mut seen = BTreeSet::new(); + for ts in 0..self.texture_sets.len() { + for (id, depth) in self.walk(ts) { + if depth > MAX_DEPTH { + return Err(CoreError::Invalid("layer groups nested too deeply".into())); + } + if !self.layers.contains_key(&id) { + return Err(CoreError::Invalid(format!("stack references missing layer {}", id.0))); + } + if !seen.insert(id) { + return Err(CoreError::Invalid(format!("layer {} appears twice", id.0))); + } + } + } + match self.instance_cycle() { + Some(id) => Err(CoreError::Invalid(format!("instance layer {} draws itself", id.0))), + None => Ok(()), + } + } + + /// Every layer drawn when `roots` are drawn: the roots, folder children and instance + /// sources, recursively, each once. + pub fn render_tree(&self, roots: &[LayerId]) -> BTreeSet { + let mut out = BTreeSet::new(); + let mut todo: Vec<(LayerId, usize)> = roots.iter().map(|id| (*id, 0)).collect(); + while let Some((id, depth)) = todo.pop() { + if depth > 2 * MAX_DEPTH || !out.insert(id) { + continue; + } + if let Some(l) = self.layers.get(&id) { + todo.extend(l.children().iter().chain(l.instance_source().as_ref()).map(|c| (*c, depth + 1))); + } + } + out + } + + /// An instance layer that draws itself (through folders and other instances), if any. + pub fn instance_cycle(&self) -> Option { + self.layers.values().filter_map(|l| Some((l.id, l.instance_source()?))).find(|(id, s)| self.render_tree(&[*s]).contains(id)).map(|(id, _)| id) + } + + /// The layer whose content `id` draws: itself, or an instance's source. + pub fn content_layer(&self, id: LayerId) -> Option<&Layer> { + let mut l = self.layers.get(&id)?; + for _ in 0..=MAX_DEPTH { + match l.instance_source() { + Some(s) => l = self.layers.get(&s)?, + None => return Some(l), + } + } + None + } + + /// The layer holding the mask `id` draws with: itself when it has a mask (an instance's + /// override), else the instance's source. + pub fn mask_owner(&self, id: LayerId) -> LayerId { + match self.layers.get(&id) { + Some(l) if l.mask.is_none() => self.content_layer(id).map_or(id, |c| c.id), + _ => id, + } + } + + /// Texture sets that draw layer `id`: the set holding it and every set with an instance of + /// it (or of a folder holding it). + pub fn sets_drawing(&self, id: LayerId) -> Vec { + (0..self.texture_sets.len()).filter(|ts| self.texture_sets.get(*ts).is_some_and(|set| self.render_tree(&set.stack).contains(&id))).collect() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn project() -> Project { + let mut p = Project::new("t", "builtin:sphere"); + p.texture_sets.push(TextureSet::new("Body", 0, 512)); + p + } + + fn paint(p: &mut Project, name: &str) -> Layer { + Layer::new(p.alloc_id(), name, LayerKind::Paint, &Channel::DEFAULT_SET) + } + + #[test] + fn insert_move_remove_keep_tree_consistent() { + let mut p = project(); + let a = paint(&mut p, "a"); + let a = p.insert_layer(0, a, None, false).unwrap(); + let b = paint(&mut p, "b"); + let b = p.insert_layer(0, b, None, false).unwrap(); + let gid = p.alloc_id(); + let g = Layer::new(gid, "g", LayerKind::Group { children: vec![], collapsed: false }, &Channel::DEFAULT_SET); + p.insert_layer(0, g, Some(a), false).unwrap(); + assert_eq!(p.texture_sets[0].stack, vec![a, gid, b]); + p.move_above(b, Some(gid), true).unwrap(); + assert_eq!(p.texture_sets[0].stack, vec![a, gid]); + assert_eq!(p.layer(gid).unwrap().children(), &[b]); + assert_eq!(p.locate(b), Some((0, Some(gid), 0))); + assert!(p.move_above(gid, Some(b), true).is_err(), "a group cannot go inside itself"); + p.validate().unwrap(); + let removed = p.remove_layer(gid).unwrap(); + assert_eq!(removed, vec![gid, b]); + assert_eq!(p.texture_sets[0].stack, vec![a]); + assert!(p.layer(b).is_err()); + p.validate().unwrap(); + } + + #[test] + fn names_are_unique() { + let mut p = project(); + let l = Layer::new(p.alloc_id(), "Layer 1", LayerKind::Paint, &[]); + p.insert_layer(0, l, None, false).unwrap(); + assert_eq!(p.next_layer_name(0, "Layer"), "Layer 2"); + } + + #[test] + fn serde_round_trip_is_stable() { + let mut p = project(); + let l = paint(&mut p, "x"); + p.insert_layer(0, l, None, false).unwrap(); + let json = serde_json::to_string(&p).unwrap(); + let back: Project = serde_json::from_str(&json).unwrap(); + assert_eq!(back, p); + assert_eq!(serde_json::to_string(&back).unwrap(), json); + } + + #[test] + fn content_effects_and_anchors_round_trip_and_old_projects_load() { + use crate::{Effect, EffectKind, Fill, Filter, Mask, MaskBackground, Projection, Source}; + let mut p = project(); + let mut l = paint(&mut p, "x"); + let (anchor, hsl, fill) = (p.alloc_id(), p.alloc_id(), p.alloc_id()); + let mut material = Fill::default(); + material.sources.insert(Channel::Roughness, Source::Uniform([0.2; 3])); + l.content_effects = vec![ + Effect::new(fill, EffectKind::Material(material)), + Effect::new(hsl, EffectKind::Filter(Filter::Hsl { hue: 0.25, saturation: -0.5, lightness: 0.1 })), + Effect::new(anchor, EffectKind::Anchor), + ]; + let id = p.insert_layer(0, l, None, false).unwrap(); + let mut top = paint(&mut p, "y"); + let source = Source::Anchor { anchor, channel: Channel::Height }; + top.mask = Some(Mask { effects: vec![Effect::new(p.alloc_id(), EffectKind::Fill { source, projection: Projection::default() })], ..Mask::new(MaskBackground::Black) }); + p.insert_layer(0, top, Some(id), false).unwrap(); + let json = serde_json::to_string(&p).unwrap(); + let back: Project = serde_json::from_str(&json).unwrap(); + assert_eq!(back, p); + assert_eq!(back.effect(anchor).map(|(owner, _)| owner), Some(id)); + // Projects saved before content effects existed load with empty stacks. + let mut v: serde_json::Value = serde_json::from_str(&json).unwrap(); + for l in v["layers"].as_object_mut().unwrap().values_mut() { + l.as_object_mut().unwrap().remove("content_effects"); + } + let old: Project = serde_json::from_value(v).unwrap(); + assert!(old.layers.values().all(|l| l.content_effects.is_empty())); + } + + #[test] + fn instances_resolve_draw_in_their_sets_and_cycles_are_found() { + let mut p = project(); + p.texture_sets.push(TextureSet::new("Head", 1, 512)); + let a = paint(&mut p, "a"); + let a = p.insert_layer(0, a, None, false).unwrap(); + let inst = Layer::new(p.alloc_id(), "a", LayerKind::Instance { source: a }, &[]); + let inst = p.insert_layer(1, inst, None, false).unwrap(); + assert_eq!(p.content_layer(inst).map(|l| l.id), Some(a)); + assert_eq!(p.sets_drawing(a), vec![0, 1]); + assert_eq!(p.sets_drawing(inst), vec![1]); + p.validate().unwrap(); + // A folder holding an instance of itself draws itself. + let gid = p.alloc_id(); + p.insert_layer(1, Layer::new(gid, "g", LayerKind::Group { children: vec![], collapsed: false }, &[]), None, false).unwrap(); + let loop_id = p.alloc_id(); + p.insert_layer(1, Layer::new(loop_id, "g", LayerKind::Instance { source: gid }, &[]), Some(gid), true).unwrap(); + assert_eq!(p.instance_cycle(), Some(loop_id)); + assert!(p.validate().is_err()); + assert!(p.content_layer(LayerId(999)).is_none()); + } + + #[test] + fn validate_rejects_newer_formats_and_dangling_ids() { + let mut p = project(); + p.texture_sets[0].stack.push(LayerId(99)); + assert!(p.validate().is_err()); + let mut q = project(); + q.format_version = FORMAT_VERSION + 1; + assert!(q.validate().is_err()); + } +} diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml new file mode 100644 index 00000000..9e769306 --- /dev/null +++ b/crates/engine/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "texturecraft-engine" +description = "TextureCraft session, command registry, painting, baking and inspection" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-texel = { workspace = true } +texturecraft-geom = { workspace = true } +texturecraft-compose = { workspace = true } +texturecraft-paint = { workspace = true } +texturecraft-bake = { workspace = true } +texturecraft-formats = { workspace = true } +rayon = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } + +[dev-dependencies] +image = { workspace = true } diff --git a/crates/engine/src/bake_cmds.rs b/crates/engine/src/bake_cmds.rs new file mode 100644 index 00000000..21c22acf --- /dev/null +++ b/crates/engine/src/bake_cmds.rs @@ -0,0 +1,390 @@ +//! Mesh-map baking commands (Painter's "Bake Mesh Maps" window): bake settings, the +//! high-definition mesh list, the cage, and running a bake. + +use std::collections::BTreeSet; +use std::sync::Arc; + +use serde_json::{Value, json}; +use texturecraft_bake::{BakeOutput, BakeRequest, HighPoly, MAX_RAYS, Progress, bake}; +use texturecraft_core::{BakeMatch, BakeSettings, BakedMap}; +use texturecraft_geom::{Bvh, Mesh}; + +use crate::commands::{CommandSpec, always, bad, boolp, f32p, strp, u64p}; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("bake.run", "Bake mesh maps", ["Mode"], None, "{ts?: index|[indices]|\"all\"|\"selected\", ...any bake.settings parameter}", always, bake_run), + cmd!( + "bake.settings", + "Bake settings", + [], + None, + "{ts?: index|[indices]|\"all\"|\"selected\" (default: the active set), resolution?, antialiasing?: 1|2|4|8, dilation?, rays?, maxDistance?, curvatureStrength?, curvatureFromNormal?, direction?: [x,y,z], maps?: [ids], enabled?, useLowAsHigh?, maxFrontal?, maxRear?, averageNormals?, matching?: always|byMeshName, lowSuffix?, highSuffix?}", + always, + settings + ), + cmd!("bake.highPoly.add", "Add high definition mesh", [], None, "{path} — a mesh file (glb, gltf, fbx, dae, obj, ply, stl)", always, high_add), + cmd!("bake.highPoly.remove", "Remove high definition mesh", [], None, "{index? | name? | all?: true}", always, high_remove), + cmd!("bake.highPoly.list", "List high definition meshes", [], None, "{}", always, |s, _| Ok(meshes_json(s))), + cmd!("bake.cage.set", "Load cage mesh", [], None, "{path} — a mesh with the low poly's triangles", always, cage_set), + cmd!("bake.cage.clear", "Remove cage mesh", [], None, "{}", always, |s, _| { + s.bake_meshes.cage = None; + s.modified = true; + Ok(meshes_json(s)) + }), + ] +} + +/// A mesh file as saved in a project: (file name, bytes). +type MeshFile = (String, Vec); + +/// A mesh file the baker reads (high poly or cage): its name, original bytes (saved in the +/// project) and parsed mesh. +#[derive(Clone, Debug)] +pub struct BakeMesh { + pub name: String, + pub bytes: Arc>, + pub mesh: Arc, +} + +/// The high-definition meshes and the cage. Like the low-poly mesh they are not part of the +/// undo history. +#[derive(Clone, Debug, Default)] +pub struct BakeMeshes { + pub high: Vec, + pub cage: Option, + /// Every high poly appended into one mesh, with its BVH (rebuilt when the list changes). + merged: Option<(Arc, Arc)>, +} + +impl BakeMeshes { + // shortcut: the merged copy doubles high-poly memory; build the BVH over the parts in place if + // multi-million-triangle sets run out of memory. + fn rebuild(&mut self) { + self.merged = (!self.high.is_empty()).then(|| { + let mut all = Mesh::default(); + for h in &self.high { + all.append(&h.mesh); + } + let bvh = Bvh::new(&all); + (Arc::new(all), Arc::new(bvh)) + }); + } +} + +/// A self-contained bake task that can run on another thread. +pub struct BakeTask { + pub ts: usize, + pub mesh: Arc, + pub bvh: Arc, + pub material: usize, + pub settings: BakeSettings, + /// The merged high polys, unless the set bakes from the low poly. + pub high: Option<(Arc, Arc)>, + pub cage: Option>, +} + +impl BakeTask { + pub fn run(&self, progress: &Progress) -> Result { + let high = self.high.as_ref().map(|(mesh, bvh)| HighPoly { mesh, bvh }); + let req = BakeRequest { mesh: &self.mesh, bvh: &self.bvh, material: self.material, settings: &self.settings, high, cage: self.cage.as_deref() }; + bake(&req, progress).map_err(|e| EngineError::Other(format!("bake failed: {e}"))) + } +} + +/// A mesh file name made unique among `taken` (and safe as a project file entry). +fn unique_name(file_name: &str, taken: &[&str]) -> String { + let leaf = std::path::Path::new(file_name).file_name().and_then(|n| n.to_str()).unwrap_or("mesh"); + let base = texturecraft_formats::sanitize_resource_name(leaf); + let mut name = base.clone(); + let mut n = 2; + while taken.contains(&name.as_str()) { + name = format!("{n}_{base}"); + n += 1; + } + name +} + +fn parse_mesh(file_name: &str, bytes: Vec) -> Result<(Arc>, Arc)> { + let mesh = texturecraft_formats::import_high_poly_bytes(file_name, &bytes).map_err(|e| EngineError::Other(format!("{file_name}: {e}")))?; + Ok((Arc::new(bytes), Arc::new(mesh))) +} + +impl Session { + pub fn bake_task(&self, ts: usize) -> Result { + let set = self.doc.project.texture_set(ts)?; + let high = if set.bake.use_low_as_high { None } else { self.bake_meshes.merged.clone() }; + let cage = high.as_ref().and(self.bake_meshes.cage.as_ref()).map(|c| c.mesh.clone()); + Ok(BakeTask { ts, mesh: self.mesh.clone(), bvh: self.bvh.clone(), material: set.material, settings: set.bake.clone(), high, cage }) + } + + /// Store a finished bake (one undo step). + pub fn apply_bake(&mut self, ts: usize, out: BakeOutput) -> Result<()> { + self.edit("Bake mesh maps", |s| { + let maps: BTreeSet = out.maps.keys().copied().collect(); + let entry = s.doc.baked.entry(ts).or_default(); + entry.resolution = out.resolution; + for (m, data) in out.maps { + entry.maps.insert(m, Arc::new(data)); + } + s.doc.project.texture_set_mut(ts)?.baked.extend(maps); + Ok(()) + }) + } + + /// Bake texture set `ts` now (blocking). + pub fn bake_now(&mut self, ts: usize) -> Result<()> { + let task = self.bake_task(ts)?; + let out = task.run(&Progress::new())?; + self.apply_bake(ts, out) + } + + /// Add a high-definition mesh from file bytes (the web picker, the desktop dialog and + /// `bake.highPoly.add`); every texture set then bakes from the high polys. Returns its name. + pub fn add_high_poly_bytes(&mut self, file_name: &str, bytes: Vec) -> Result { + let (bytes, mesh) = parse_mesh(file_name, bytes)?; + let taken: Vec<&str> = self.bake_meshes.high.iter().map(|h| h.name.as_str()).collect(); + let name = unique_name(file_name, &taken); + self.log.push(format!("High poly {name}: {} triangles", mesh.triangle_count())); + self.bake_meshes.high.push(BakeMesh { name: name.clone(), bytes, mesh }); + self.bake_meshes.rebuild(); + for set in &mut self.doc.project.texture_sets { + set.bake.use_low_as_high = false; + } + self.modified = true; + Ok(name) + } + + /// Remove high-definition mesh `index`. + pub fn remove_high_poly(&mut self, index: usize) -> Result { + if index >= self.bake_meshes.high.len() { + return Err(EngineError::Other(format!("no high poly mesh {index}"))); + } + let removed = self.bake_meshes.high.remove(index); + self.bake_meshes.rebuild(); + self.modified = true; + Ok(removed) + } + + /// Use a cage mesh (same triangles as the low poly) from file bytes. + pub fn set_cage_bytes(&mut self, file_name: &str, bytes: Vec) -> Result { + let (bytes, mesh) = parse_mesh(file_name, bytes)?; + if mesh.triangle_count() != self.mesh.triangle_count() { + return Err(EngineError::Other(format!( + "the cage has {} triangles but the low poly has {}; export the cage from the low poly", + mesh.triangle_count(), + self.mesh.triangle_count() + ))); + } + let name = unique_name(file_name, &[]); + self.bake_meshes.cage = Some(BakeMesh { name: name.clone(), bytes, mesh }); + self.modified = true; + Ok(name) + } + + /// Restore the bake meshes saved in a project file; unreadable ones are logged and skipped. + pub(crate) fn load_bake_meshes(&mut self, high: Vec, cage: Option) { + for (name, bytes) in high { + match parse_mesh(&name, bytes) { + Ok((bytes, mesh)) => self.bake_meshes.high.push(BakeMesh { name, bytes, mesh }), + Err(e) => self.log.push(format!("skipped high poly mesh: {e}")), + } + } + self.bake_meshes.rebuild(); + if let Some((name, bytes)) = cage + && let Err(e) = self.set_cage_bytes(&name, bytes) + { + self.log.push(format!("skipped cage mesh: {e}")); + } + } + + /// The bake meshes for a project file: (high polys, cage). + pub(crate) fn saved_bake_meshes(&self) -> (Vec, Option) { + let entry = |m: &BakeMesh| (m.name.clone(), m.bytes.as_ref().clone()); + (self.bake_meshes.high.iter().map(entry).collect(), self.bake_meshes.cage.as_ref().map(entry)) + } +} + +/// `bake.highPoly.list`: the high polys and the cage (also part of `project.inspect`). +pub fn meshes_json(s: &Session) -> Value { + let one = |m: &BakeMesh| json!({ "name": m.name, "triangles": m.mesh.triangle_count(), "parts": m.mesh.submeshes.iter().map(|p| p.name.as_str()).collect::>() }); + json!({ "highPoly": s.bake_meshes.high.iter().map(one).collect::>(), "cage": s.bake_meshes.cage.as_ref().map(one) }) +} + +#[cfg(not(target_arch = "wasm32"))] +fn read_mesh_file(cmd: &str, p: &Value) -> Result<(String, Vec)> { + let path = strp(p, "path").ok_or_else(|| bad(cmd, "`path` is required"))?; + let meta = std::fs::metadata(path).map_err(|e| bad(cmd, format!("cannot read {path}: {e}")))?; + if meta.len() > texturecraft_formats::mesh_import::MAX_MESH_FILE_BYTES { + return Err(bad(cmd, format!("{path} is too large"))); + } + let bytes = std::fs::read(path).map_err(|e| bad(cmd, format!("cannot read {path}: {e}")))?; + Ok((path.to_string(), bytes)) +} + +#[cfg(target_arch = "wasm32")] +fn read_mesh_file(_: &str, _: &Value) -> Result<(String, Vec)> { + Err(EngineError::Other("file paths are not available in the browser; use the bake panel's file picker".into())) +} + +fn high_add(s: &mut Session, p: &Value) -> Result { + let (path, bytes) = read_mesh_file("bake.highPoly.add", p)?; + let name = s.add_high_poly_bytes(&path, bytes)?; + Ok(json!({ "name": name, "meshes": meshes_json(s) })) +} + +fn high_remove(s: &mut Session, p: &Value) -> Result { + if boolp(p, "all") == Some(true) { + s.bake_meshes.high.clear(); + s.bake_meshes.rebuild(); + s.modified = true; + return Ok(meshes_json(s)); + } + let index = match (u64p(p, "index"), strp(p, "name")) { + (Some(i), _) => usize::try_from(i).unwrap_or(usize::MAX), + (None, Some(n)) => s.bake_meshes.high.iter().position(|h| h.name == n).ok_or_else(|| bad("bake.highPoly.remove", format!("no high poly `{n}`")))?, + (None, None) => return Err(bad("bake.highPoly.remove", "`index`, `name` or `all` is required")), + }; + s.remove_high_poly(index)?; + Ok(meshes_json(s)) +} + +fn cage_set(s: &mut Session, p: &Value) -> Result { + let (path, bytes) = read_mesh_file("bake.cage.set", p)?; + let name = s.set_cage_bytes(&path, bytes)?; + Ok(json!({ "name": name, "meshes": meshes_json(s) })) +} + +/// Texture sets named by `ts` (default: the active one). +fn sets_param(s: &Session, cmd: &str, p: &Value) -> Result> { + let n = s.set_count(); + let one = |v: &Value| v.as_u64().map(|t| t as usize).filter(|t| *t < n).ok_or_else(|| bad(cmd, format!("invalid texture set {v}"))); + match p.get("ts") { + Some(Value::String(a)) if a == "all" => Ok((0..n).collect()), + Some(Value::String(a)) if a == "selected" => Ok((0..n).filter(|t| s.doc.project.texture_sets.get(*t).is_some_and(|set| set.bake.enabled)).collect()), + Some(Value::Array(a)) => a.iter().map(one).collect(), + Some(v) => Ok(vec![one(v)?]), + None => Ok(vec![s.ts()]), + } +} + +/// `b` as `bake.settings` parameters (what the command returns and the UI sends back). +pub fn settings_params(b: &BakeSettings) -> Value { + json!({ + "resolution": b.resolution, + "antialiasing": b.antialiasing, + "dilation": b.dilation, + "rays": b.rays, + "maxDistance": b.max_distance, + "curvatureStrength": b.curvature_strength, + "curvatureFromNormal": b.curvature_from_normal, + "direction": b.direction, + "maps": b.maps.iter().map(|m| m.id()).collect::>(), + "enabled": b.enabled, + "useLowAsHigh": b.use_low_as_high, + "maxFrontal": b.max_frontal, + "maxRear": b.max_rear, + "averageNormals": b.average_normals, + "matching": match b.matching { BakeMatch::Always => "always", BakeMatch::ByMeshName => "byMeshName" }, + "lowSuffix": b.low_suffix, + "highSuffix": b.high_suffix, + }) +} + +/// Apply the `bake.settings` parameters present in `p` to `b`. +fn apply_settings(b: &mut BakeSettings, p: &Value, cmd: &str) -> Result<()> { + if let Some(r) = u64p(p, "resolution") { + b.resolution = crate::session::check_resolution(u32::try_from(r).unwrap_or(0))?; + } + if let Some(a) = u64p(p, "antialiasing") { + if ![1, 2, 4, 8].contains(&a) { + return Err(bad(cmd, "antialiasing must be 1, 2, 4 or 8")); + } + b.antialiasing = a as u32; + } + if let Some(d) = u64p(p, "dilation") { + b.dilation = d.min(256) as u32; + } + if let Some(r) = u64p(p, "rays") { + b.rays = r.clamp(1, u64::from(MAX_RAYS)) as u32; + } + for (k, slot, lo, hi) in [ + ("maxDistance", &mut b.max_distance, 0.001, 10.0), + ("curvatureStrength", &mut b.curvature_strength, 0.0, 16.0), + ("maxFrontal", &mut b.max_frontal, 0.0, 1.0), + ("maxRear", &mut b.max_rear, 0.0, 1.0), + ] { + if let Some(v) = f32p(p, k).filter(|v| v.is_finite()) { + *slot = v.clamp(lo, hi); + } + } + for (k, slot) in [ + ("curvatureFromNormal", &mut b.curvature_from_normal), + ("enabled", &mut b.enabled), + ("useLowAsHigh", &mut b.use_low_as_high), + ("averageNormals", &mut b.average_normals), + ] { + if let Some(v) = boolp(p, k) { + *slot = v; + } + } + if let Some(d) = p.get("direction") { + let v: Vec = d.as_array().into_iter().flatten().filter_map(Value::as_f64).map(|x| x as f32).collect(); + match v[..] { + [x, y, z] if [x, y, z].iter().all(|c| c.is_finite()) && [x, y, z] != [0.0; 3] => b.direction = [x, y, z], + _ => return Err(bad(cmd, "`direction` must be three finite numbers, not all zero")), + } + } + if let Some(a) = p.get("maps").and_then(Value::as_array) { + b.maps = a.iter().map(|v| v.as_str().and_then(BakedMap::parse).ok_or_else(|| bad(cmd, format!("unknown mesh map {v}")))).collect::>()?; + } + match strp(p, "matching") { + Some("always") => b.matching = BakeMatch::Always, + Some("byMeshName") | Some("byName") => b.matching = BakeMatch::ByMeshName, + Some(o) => return Err(bad(cmd, format!("unknown matching `{o}` (always|byMeshName)"))), + None => {} + } + for (k, slot) in [("lowSuffix", &mut b.low_suffix), ("highSuffix", &mut b.high_suffix)] { + if let Some(v) = strp(p, k) { + *slot = v.chars().take(64).collect(); + } + } + Ok(()) +} + +/// Validate and apply the settings parameters to every set first, so a bad parameter changes +/// nothing. +fn set_settings(s: &mut Session, p: &Value, cmd: &str) -> Result> { + let sets = sets_param(s, cmd, p)?; + let mut next = Vec::with_capacity(sets.len()); + for &ts in &sets { + let mut b = s.doc.project.texture_set(ts)?.bake.clone(); + apply_settings(&mut b, p, cmd)?; + next.push((ts, b)); + } + for (ts, b) in next { + let set = s.doc.project.texture_set_mut(ts)?; + if set.bake != b { + set.bake = b; + s.modified = true; + } + } + Ok(sets) +} + +fn settings(s: &mut Session, p: &Value) -> Result { + let sets = set_settings(s, p, "bake.settings")?; + let out: Vec = + sets.iter().filter_map(|t| s.doc.project.texture_sets.get(*t).map(|set| json!({ "ts": t, "settings": settings_params(&set.bake) }))).collect(); + Ok(json!(out)) +} + +fn bake_run(s: &mut Session, p: &Value) -> Result { + let sets = set_settings(s, p, "bake.run")?; + for &ts in &sets { + s.bake_now(ts)?; + } + s.update(); + Ok(json!({ "baked": sets })) +} diff --git a/crates/engine/src/commands.rs b/crates/engine/src/commands.rs new file mode 100644 index 00000000..191ad10e --- /dev/null +++ b/crates/engine/src/commands.rs @@ -0,0 +1,177 @@ +//! The command registry. Every user-visible action is a command with a stable id; the menus, +//! shortcuts, CLI, control channel and MCP server all dispatch them by id. Ids follow +//! Painter's menu structure (see `menu_catalog`). + +use serde_json::{Value, json}; +use texturecraft_core::{BlendMode, Channel}; + +use crate::{EngineError, Result, Session}; + +pub type Run = fn(&mut Session, &Value) -> Result; +pub type Enabled = fn(&Session) -> std::result::Result<(), String>; + +pub struct CommandSpec { + pub id: &'static str, + pub label: &'static str, + /// Menu placement, e.g. `["Edit"]`. Empty = not in menus. + pub menu: &'static [&'static str], + /// Default shortcut in egui notation (`Ctrl+Shift+E`), mapped per platform by the UI. + pub shortcut: Option<&'static str>, + /// Parameters, for humans and agents. + pub params: &'static str, + pub enabled: Enabled, + pub run: Run, +} + +pub(crate) fn always(_: &Session) -> std::result::Result<(), String> { + Ok(()) +} + +pub(crate) fn has_layer(s: &Session) -> std::result::Result<(), String> { + s.selected_layer().map(|_| ()).ok_or_else(|| "no layer selected".into()) +} + +pub(crate) fn can_undo(s: &Session) -> std::result::Result<(), String> { + if s.can_undo() { Ok(()) } else { Err("nothing to undo".into()) } +} + +pub(crate) fn can_redo(s: &Session) -> std::result::Result<(), String> { + if s.can_redo() { Ok(()) } else { Err("nothing to redo".into()) } +} + +#[macro_export] +#[doc(hidden)] +macro_rules! cmd { + ($id:literal, $label:literal, [$($m:literal),*], $sc:expr, $params:literal, $en:expr, $run:expr) => { + $crate::commands::CommandSpec { id: $id, label: $label, menu: &[$($m),*], shortcut: $sc, params: $params, enabled: $en, run: $run } + }; +} + +pub fn command_specs() -> &'static [CommandSpec] { + static SPECS: std::sync::OnceLock> = std::sync::OnceLock::new(); + SPECS.get_or_init(|| { + let mut v = Vec::new(); + v.extend(crate::view_cmds::edit_specs()); + v.extend(crate::layer_cmds::specs()); + v.extend(crate::layer_ops::specs()); + v.extend(crate::instance_cmds::specs()); + v.extend(crate::mask_cmds::specs()); + v.extend(crate::tool_cmds::specs()); + v.extend(crate::path_tool::specs()); + v.extend(crate::view_cmds::specs()); + v.extend(crate::quick_mask::specs()); + v.extend(crate::set_cmds::specs()); + v.extend(crate::project_cmds::specs()); + v.extend(crate::bake_cmds::specs()); + v.extend(crate::file_cmds::specs()); + v.extend(crate::resource_cmds::specs()); + v.extend(crate::material_lib::specs()); + v.extend(crate::smart_masks::specs()); + v + }) +} + +pub fn find(id: &str) -> Option<&'static CommandSpec> { + command_specs().iter().find(|c| c.id == id) +} + +/// Run a command by id with JSON params (empty params = defaults, never a dialog). +pub fn execute(s: &mut Session, id: &str, params: &Value) -> Result { + let spec = find(id).ok_or_else(|| EngineError::UnknownCommand(id.to_string()))?; + (spec.enabled)(s).map_err(|why| EngineError::Disabled { cmd: id.to_string(), why })?; + (spec.run)(s, params) +} + +/// Every command, as JSON (for `commands` listings and MCP). +pub fn list(s: &Session, filter: Option<&str>) -> Value { + let f = filter.map(str::to_ascii_lowercase); + let items: Vec = command_specs() + .iter() + .filter(|c| f.as_ref().is_none_or(|f| c.id.to_ascii_lowercase().contains(f) || c.label.to_ascii_lowercase().contains(f))) + .map(|c| { + json!({ + "id": c.id, + "label": c.label, + "menu": c.menu, + "shortcut": c.shortcut, + "params": c.params, + "enabled": (c.enabled)(s).is_ok(), + }) + }) + .collect(); + Value::Array(items) +} + +// ---------- param helpers ---------- + +pub(crate) fn bad(cmd: &str, msg: impl Into) -> EngineError { + EngineError::BadParams { cmd: cmd.into(), msg: msg.into() } +} + +pub(crate) fn f32p(p: &Value, key: &str) -> Option { + p.get(key).and_then(Value::as_f64).map(|v| v as f32).filter(|v| v.is_finite()) +} + +pub(crate) fn u64p(p: &Value, key: &str) -> Option { + p.get(key).and_then(|v| v.as_u64().or_else(|| v.as_f64().filter(|f| f.is_finite() && *f >= 0.0).map(|f| f.round() as u64))) +} + +pub(crate) fn boolp(p: &Value, key: &str) -> Option { + p.get(key).and_then(Value::as_bool) +} + +pub(crate) fn strp<'a>(p: &'a Value, key: &str) -> Option<&'a str> { + p.get(key).and_then(Value::as_str) +} + +/// A layer id param (`"layer"`), defaulting to the selected layer. +pub(crate) fn layer_param(s: &Session, cmd: &str, p: &Value) -> Result { + match u64p(p, "layer") { + Some(id) => { + let id = texturecraft_core::LayerId(id); + s.doc.project.layer(id).map_err(|_| bad(cmd, format!("no layer {}", id.0)))?; + Ok(id) + } + None => s.selected_layer().ok_or_else(|| bad(cmd, "no layer selected and no `layer` given")), + } +} + +/// [`layer_param`], following an instance to the layer whose content it draws. +pub(crate) fn content_param(s: &Session, cmd: &str, p: &Value) -> Result { + let id = layer_param(s, cmd, p)?; + Ok(s.doc.project.content_layer(id).map_or(id, |l| l.id)) +} + +pub(crate) fn channel_param(cmd: &str, p: &Value, key: &str) -> Result> { + match strp(p, key) { + None => Ok(None), + Some(s) => Channel::parse(s).map(Some).ok_or_else(|| bad(cmd, format!("unknown channel `{s}`"))), + } +} + +pub(crate) fn blend_param(cmd: &str, p: &Value, key: &str) -> Result> { + match strp(p, key) { + None => Ok(None), + Some(s) => BlendMode::parse(s).map(Some).ok_or_else(|| bad(cmd, format!("unknown blend mode `{s}`"))), + } +} + +/// A color: `[r, g, b]` (linear 0..1) or `"#rrggbb"` (sRGB hex, converted to linear). +pub(crate) fn color_param(p: &Value, key: &str) -> Option<[f32; 3]> { + match p.get(key)? { + Value::Array(a) if a.len() >= 3 => { + let v: Vec = a.iter().take(3).map(|x| x.as_f64().unwrap_or(0.0) as f32).collect(); + if v.iter().all(|x| x.is_finite()) { Some([v[0], v[1], v[2]]) } else { None } + } + Value::Number(n) => n.as_f64().map(|v| [v as f32; 3]).filter(|v| v[0].is_finite()), + Value::String(s) => { + let s = s.trim_start_matches('#'); + if s.len() != 6 { + return None; + } + let c = |i: usize| u8::from_str_radix(s.get(i..i + 2)?, 16).ok().map(|v| texturecraft_texel::srgb_to_linear(v as f32 / 255.0)); + Some([c(0)?, c(2)?, c(4)?]) + } + _ => None, + } +} diff --git a/crates/engine/src/file_cmds.rs b/crates/engine/src/file_cmds.rs new file mode 100644 index 00000000..a3924cf2 --- /dev/null +++ b/crates/engine/src/file_cmds.rs @@ -0,0 +1,432 @@ +//! Files: projects (`.tcraft`), mesh import, texture export. Byte-based functions work on the +//! web; path-based commands are native only. + +use serde_json::{Value, json}; +use texturecraft_core::NormalFormat; +#[cfg(not(target_arch = "wasm32"))] +use texturecraft_core::PROJECT_EXT; +use texturecraft_formats::{ExportInput, ExportOptions, ExportedFile, FileFormat, Padding, ProjectFile}; +use texturecraft_geom::{Mesh, primitives}; + +use crate::commands::{CommandSpec, always, bad, strp, u64p}; +use crate::session::{Document, Session}; +use crate::{EngineError, Result, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!( + "file.new", + "New project from a mesh file", + [], + None, + "{mesh: path to .glb/.gltf/.fbx/.dae/.obj/.ply/.stl, resolution?: 2048, name?}", + always, + new_from_mesh + ), + cmd!("file.open", "Open...", ["File"], Some("Ctrl+O"), "{path: .tcraft project or mesh file}", always, open), + cmd!("file.save", "Save", ["File"], Some("Ctrl+S"), "{path?: .tcraft (default: the project's own file)}", always, save), + cmd!("file.saveAs", "Save as...", ["File"], Some("Ctrl+Shift+S"), "{path}", always, save_as), + cmd!("file.saveCopy", "Save a copy...", ["File"], None, "{path}", always, save_copy), + cmd!("file.close", "Close", ["File"], Some("Ctrl+F4"), "{}", always, close), + cmd!("file.reimportMesh", "Reimport mesh", ["Edit"], Some("Ctrl+Shift+R"), "{path?}", always, reimport), + cmd!( + "file.exportTextures", + "Export textures", + ["File"], + None, + "{dir, preset?: name, ts?: index|\"all\", format?: png|jpg|tga|tif|exr|..., bitDepth?, padding?: none|dilation|dilationDefault|infinite, dilation?: px, size?: px, normalFormat?: openGl|directX}", + always, + export_textures + ), + cmd!( + "file.exportMesh", + "Export Mesh...", + ["File"], + None, + "{path: .obj or .glb file, format?: obj|glb (default: from the extension, else obj)}", + always, + export_mesh + ), + cmd!("export.presets", "Export presets", [], None, "{}", always, |_, _| Ok(json!( + texturecraft_formats::builtin_presets().iter().map(|p| json!({"name": p.name, "maps": p.maps.len()})).collect::>() + ))), + cmd!("export.plan", "List export outputs", [], None, "{preset?, ts?, format?}", always, plan), + ] +} + +fn fe(e: texturecraft_formats::FormatError) -> EngineError { + EngineError::Other(e.to_string()) +} + +fn ext_of(name: &str) -> String { + std::path::Path::new(name).extension().and_then(|e| e.to_str()).unwrap_or("").to_ascii_lowercase() +} + +fn stem_of(name: &str) -> String { + std::path::Path::new(name).file_stem().and_then(|e| e.to_str()).unwrap_or("Untitled").to_string() +} + +impl Session { + /// The working mesh as Wavefront OBJ. + pub fn mesh_obj_bytes(&self) -> Vec { + texturecraft_formats::obj_bytes(&self.mesh, &self.doc.project.name) + } + + /// The working mesh as binary glTF with each material's textures (from its texture set's + /// composite, through the texture export pipeline) embedded. + pub fn mesh_glb_bytes(&mut self) -> Result> { + let opts = texturecraft_formats::glb_export_options(); + let mut textures = Vec::with_capacity(self.mesh.materials.len()); + for m in 0..self.mesh.materials.len() { + let ts = self.doc.project.texture_sets.iter().position(|t| t.material == m); + let files = match ts { + Some(ts) => self.export_files(&[ts], &opts)?, + None => Vec::new(), + }; + textures.push(texturecraft_formats::GlbTextures::from_files(files)); + } + texturecraft_formats::glb_bytes(&self.mesh, &self.doc.project.name, &textures).map_err(fe) + } + + /// A new project from mesh file bytes (one texture set per material). + pub fn from_mesh_bytes(file_name: &str, bytes: &[u8], resolution: u32, name: &str) -> Result { + let imported = texturecraft_formats::import_mesh_bytes(file_name, bytes).map_err(fe)?; + let ext = ext_of(file_name); + let mut s = Session::new_project(name, imported.mesh, &format!("mesh.{ext}"), Some((ext, bytes.to_vec())), resolution)?; + s.log.extend(imported.report.warnings.iter().cloned()); + s.log.push(format!( + "Imported {} ({} triangles, {} materials{})", + file_name, + imported.report.triangles, + imported.report.materials, + if imported.report.uvs_generated { ", UVs generated" } else { "" } + )); + Ok(s) + } + + /// Open a `.tcraft` project from bytes. + pub fn from_project_bytes(bytes: &[u8]) -> Result { + let pf = texturecraft_formats::load_project_bytes(bytes).map_err(fe)?; + Session::from_project_file(pf) + } + + pub fn from_project_file(pf: ProjectFile) -> Result { + let mesh = match (&pf.mesh, pf.project.mesh.strip_prefix("builtin:")) { + (_, Some(id)) => primitives::builtin(id).ok_or_else(|| EngineError::Other(format!("unknown built-in mesh `{id}`")))?, + (Some((ext, bytes)), None) => texturecraft_formats::import_mesh_bytes(&format!("mesh.{ext}"), bytes).map_err(fe)?.mesh, + (None, None) => return Err(EngineError::Other("the project has no mesh".into())), + }; + check_materials(&pf.project, &mesh)?; + let source = pf.mesh.clone(); + let resources = pf.resources.into_iter().map(|(k, v)| (k, std::sync::Arc::new(v))).collect(); + let mut s = Session::new(Document { project: pf.project, pixels: pf.pixels, baked: pf.baked, resources }, mesh, source)?; + s.sync_images(); + s.load_bake_meshes(pf.high_poly, pf.cage); + Ok(s) + } + + /// The project as a `ProjectFile` (for saving). + pub fn project_file(&self) -> ProjectFile { + let mut pixels = self.doc.pixels.clone(); + // Drop pixel images whose size no longer matches their texture set (never unloadable). + let res_of = |id: texturecraft_core::LayerId| { + self.doc.project.locate(id).and_then(|(ts, _, _)| self.doc.project.texture_sets.get(ts)).map(|t| t.resolution).or_else(|| { + self.doc + .project + .effect(id) + .and_then(|(owner, _)| self.doc.project.locate(owner)) + .and_then(|(ts, _, _)| self.doc.project.texture_sets.get(ts)) + .map(|t| t.resolution) + }) + }; + pixels.layers.retain(|(id, _), img| res_of(*id) == Some(img.width())); + pixels.masks.retain(|id, img| res_of(*id) == Some(img.width())); + let (high_poly, cage) = self.saved_bake_meshes(); + ProjectFile { + project: self.doc.project.clone(), + pixels, + baked: self.doc.baked.clone(), + mesh: self.mesh_source.clone(), + high_poly, + cage, + thumbnail: None, + resources: self.doc.resources.iter().map(|(k, v)| (k.clone(), v.as_ref().clone())).collect(), + } + } + + pub fn to_project_bytes(&self) -> Result> { + texturecraft_formats::save_project_bytes(&self.project_file()).map_err(fe) + } + + /// Render every export file for texture sets `sets` (in memory; works on the web). + pub fn export_files(&mut self, sets: &[usize], opts: &ExportOptions) -> Result> { + self.update(); + let mesh_name = stem_of(self.doc.project.mesh.trim_start_matches("builtin:")); + let mut out = Vec::new(); + let empty = Default::default(); + for &ts in sets { + let cache = self.caches.get(ts).ok_or_else(|| EngineError::Other(format!("no texture set {ts}")))?; + let coverage = cache.gbuf.coverage_mask(); + let input = ExportInput { + project: &self.doc.project, + ts, + composite: &cache.composite, + baked: self.doc.baked.get(&ts).unwrap_or(&empty), + coverage: &coverage, + mesh_name: &mesh_name, + }; + out.extend(texturecraft_formats::render_maps(&input, opts).map_err(fe)?); + } + Ok(out) + } +} + +fn check_materials(p: &texturecraft_core::Project, mesh: &Mesh) -> Result<()> { + for t in &p.texture_sets { + if t.material >= mesh.materials.len().max(1) { + return Err(EngineError::Other(format!("texture set \"{}\" refers to a material the mesh doesn't have", t.name))); + } + } + Ok(()) +} + +/// Export options from command params. +pub fn export_options(p: &Value, cmd: &str) -> Result { + let name = strp(p, "preset").unwrap_or("Document channels + Normal + AO"); + let preset = texturecraft_formats::builtin_preset(name).ok_or_else(|| bad(cmd, format!("unknown export preset `{name}`")))?; + let mut o = ExportOptions::new(preset); + if let Some(f) = strp(p, "format") { + o.format_override = Some(FileFormat::from_extension(f).ok_or_else(|| bad(cmd, format!("unknown format `{f}`")))?); + } + if let Some(b) = u64p(p, "bitDepth") { + o.bit_depth_override = Some(b.min(32) as u8); + } + let px = u64p(p, "dilation").map(|v| v.min(256) as u32).unwrap_or(16); + if let Some(pad) = strp(p, "padding") { + o.padding = match pad { + "none" => Padding::None, + "dilation" => Padding::Dilation(px), + "dilationDefault" => Padding::DilationDefault(px), + "infinite" => Padding::Infinite, + other => return Err(bad(cmd, format!("unknown padding `{other}`"))), + }; + } + if let Some(sz) = u64p(p, "size") { + o.size = Some(crate::session::check_resolution(u32::try_from(sz).unwrap_or(0))?); + } + o.normal_format = match strp(p, "normalFormat") { + Some("openGl") | Some("opengl") => Some(NormalFormat::OpenGl), + Some("directX") | Some("directx") => Some(NormalFormat::DirectX), + Some(other) => return Err(bad(cmd, format!("unknown normal format `{other}`"))), + None => None, + }; + Ok(o) +} + +fn sets_param(s: &Session, p: &Value, cmd: &str) -> Result> { + match p.get("ts") { + None => Ok((0..s.set_count()).collect()), + Some(Value::String(a)) if a == "all" => Ok((0..s.set_count()).collect()), + Some(v) => Ok(vec![v.as_u64().map(|t| t as usize).filter(|t| *t < s.set_count()).ok_or_else(|| bad(cmd, "invalid `ts`"))?]), + } +} + +fn plan(s: &mut Session, p: &Value) -> Result { + let opts = export_options(p, "export.plan")?; + let mesh_name = stem_of(s.doc.project.mesh.trim_start_matches("builtin:")); + let mut names = Vec::new(); + for ts in sets_param(s, p, "export.plan")? { + for f in texturecraft_formats::list_outputs(&s.doc.project, ts, &mesh_name, &opts).map_err(fe)? { + names.push(json!({"ts": ts, "file": f.name, "format": f.format.extension(), "bitDepth": f.bit_depth, "warnings": f.warnings})); + } + } + Ok(json!(names)) +} + +#[cfg(not(target_arch = "wasm32"))] +mod native { + use super::*; + use std::path::Path; + + pub fn path_param<'a>(p: &'a Value, key: &str, cmd: &str) -> Result<&'a str> { + strp(p, key).filter(|s| !s.trim().is_empty()).ok_or_else(|| bad(cmd, format!("`{key}` is required"))) + } + + /// Open a project or a mesh file. + pub fn open_path(path: &str) -> Result { + let p = Path::new(path); + if ext_of(path) == PROJECT_EXT { + let pf = texturecraft_formats::load_project(p).map_err(fe)?; + let mut s = Session::from_project_file(pf)?; + s.path = Some(path.to_string()); + s.modified = false; + Ok(s) + } else { + let bytes = std::fs::read(p).map_err(|e| EngineError::Other(format!("cannot read {path}: {e}")))?; + Session::from_mesh_bytes(path, &bytes, 2048, &stem_of(path)) + } + } + + pub fn save_to(s: &mut Session, path: &str, adopt: bool) -> Result { + let path = if ext_of(path) == PROJECT_EXT { path.to_string() } else { format!("{path}.{PROJECT_EXT}") }; + texturecraft_formats::save_project(Path::new(&path), &s.project_file()).map_err(fe)?; + if adopt { + s.path = Some(path.clone()); + s.modified = false; + } + s.log.push(format!("Saved {path}")); + Ok(json!({ "path": path })) + } +} + +#[cfg(not(target_arch = "wasm32"))] +pub use native::open_path; + +#[cfg(not(target_arch = "wasm32"))] +fn new_from_mesh(s: &mut Session, p: &Value) -> Result { + let path = native::path_param(p, "mesh", "file.new")?; + let bytes = std::fs::read(path).map_err(|e| bad("file.new", format!("cannot read {path}: {e}")))?; + let res = u32::try_from(u64p(p, "resolution").unwrap_or(2048)).unwrap_or(0); + let name = strp(p, "name").map(str::to_string).unwrap_or_else(|| stem_of(path)); + let mut next = Session::from_mesh_bytes(path, &bytes, res, &name)?; + next.viewport = s.viewport; + *s = next; + Ok(crate::inspect::session(s)) +} + +#[cfg(not(target_arch = "wasm32"))] +fn open(s: &mut Session, p: &Value) -> Result { + let path = native::path_param(p, "path", "file.open")?; + let mut next = native::open_path(path)?; + next.viewport = s.viewport; + *s = next; + Ok(crate::inspect::session(s)) +} + +#[cfg(not(target_arch = "wasm32"))] +fn save(s: &mut Session, p: &Value) -> Result { + let path = match strp(p, "path") { + Some(x) => x.to_string(), + None => s.path.clone().ok_or_else(|| bad("file.save", "the project has no file yet: give `path` (Save as)"))?, + }; + native::save_to(s, &path, true) +} + +#[cfg(not(target_arch = "wasm32"))] +fn save_as(s: &mut Session, p: &Value) -> Result { + let path = native::path_param(p, "path", "file.saveAs")?.to_string(); + native::save_to(s, &path, true) +} + +#[cfg(not(target_arch = "wasm32"))] +fn save_copy(s: &mut Session, p: &Value) -> Result { + let path = native::path_param(p, "path", "file.saveCopy")?.to_string(); + native::save_to(s, &path, false) +} + +#[cfg(not(target_arch = "wasm32"))] +fn reimport(s: &mut Session, p: &Value) -> Result { + // Re-read the mesh and keep the project (texture sets map by material index). + let mesh = match strp(p, "path") { + Some(path) => { + let bytes = std::fs::read(path).map_err(|e| bad("file.reimportMesh", format!("cannot read {path}: {e}")))?; + let m = texturecraft_formats::import_mesh_bytes(path, &bytes).map_err(fe)?.mesh; + s.mesh_source = Some((ext_of(path), bytes)); + s.doc.project.mesh = format!("mesh.{}", ext_of(path)); + m + } + None => match &s.mesh_source { + Some((ext, bytes)) => texturecraft_formats::import_mesh_bytes(&format!("mesh.{ext}"), bytes).map_err(fe)?.mesh, + None => return Err(bad("file.reimportMesh", "built-in meshes can't be reimported; give `path`")), + }, + }; + check_materials(&s.doc.project, &mesh)?; + let doc = s.doc.clone(); + let source = s.mesh_source.clone(); + let mut next = Session::new(doc, mesh, source)?; + next.path = s.path.clone(); + next.viewport = s.viewport; + *s = next; + Ok(Value::Null) +} + +#[cfg(not(target_arch = "wasm32"))] +fn export_textures(s: &mut Session, p: &Value) -> Result { + let dir = native::path_param(p, "dir", "file.exportTextures")?.to_string(); + let opts = export_options(p, "file.exportTextures")?; + let sets = sets_param(s, p, "file.exportTextures")?; + std::fs::create_dir_all(&dir).map_err(|e| bad("file.exportTextures", format!("cannot create {dir}: {e}")))?; + let files = s.export_files(&sets, &opts)?; + let warnings: Vec = files.iter().flat_map(|f| f.warnings.iter().cloned()).collect(); + let written = texturecraft_formats::write_files(&files, std::path::Path::new(&dir)).map_err(fe)?; + s.log.push(format!("Exported {} textures to {dir}", written.len())); + Ok(json!({ "files": written.iter().map(|p| p.display().to_string()).collect::>(), "warnings": warnings })) +} + +#[cfg(not(target_arch = "wasm32"))] +fn export_mesh(s: &mut Session, p: &Value) -> Result { + let path = native::path_param(p, "path", "file.exportMesh")?; + let ext = match strp(p, "format") { + Some(f @ ("obj" | "glb")) => f.to_string(), + Some(other) => return Err(bad("file.exportMesh", format!("unknown mesh format `{other}` (obj or glb)"))), + None if ext_of(path) == "glb" => "glb".into(), + None => "obj".into(), + }; + let path = if ext_of(path) == ext { path.to_string() } else { format!("{path}.{ext}") }; + let bytes = if ext == "glb" { s.mesh_glb_bytes()? } else { s.mesh_obj_bytes() }; + std::fs::write(&path, bytes).map_err(|e| bad("file.exportMesh", format!("cannot write {path}: {e}")))?; + s.log.push(format!("Exported mesh to {path}")); + Ok(json!({ "path": path })) +} + +#[cfg(target_arch = "wasm32")] +fn unsupported(_: &mut Session, _: &Value) -> Result { + Err(EngineError::Other("file paths are not available in the browser; use the web file buttons".into())) +} +#[cfg(target_arch = "wasm32")] +use unsupported as new_from_mesh; +#[cfg(target_arch = "wasm32")] +use unsupported as open; +#[cfg(target_arch = "wasm32")] +use unsupported as save; +#[cfg(target_arch = "wasm32")] +use unsupported as save_as; +#[cfg(target_arch = "wasm32")] +use unsupported as save_copy; +#[cfg(target_arch = "wasm32")] +use unsupported as reimport; +#[cfg(target_arch = "wasm32")] +use unsupported as export_textures; +#[cfg(target_arch = "wasm32")] +use unsupported as export_mesh; + +fn close(s: &mut Session, _: &Value) -> Result { + let mut next = Session::new_project("Untitled", primitives::material_ball(), "builtin:material_ball", None, 2048)?; + next.viewport = s.viewport; + *s = next; + Ok(Value::Null) +} + +#[cfg(all(test, not(target_arch = "wasm32")))] +mod tests { + use super::*; + + #[test] + fn export_mesh_writes_obj_by_default_and_textured_glb() { + let mut s = Session::new_project("t", primitives::material_ball(), "builtin:material_ball", None, 128).unwrap(); + let dir = std::env::temp_dir().join(format!("tc_export_mesh_{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let base = dir.join("ball").display().to_string(); + let obj = crate::execute(&mut s, "file.exportMesh", &json!({ "path": base })).unwrap(); + assert!(obj["path"].as_str().unwrap().ends_with("ball.obj")); + let glb = crate::execute(&mut s, "file.exportMesh", &json!({ "path": base, "format": "glb" })).unwrap(); + let bytes = std::fs::read(glb["path"].as_str().unwrap()).unwrap(); + let back = texturecraft_formats::import_mesh_bytes("ball.glb", &bytes).unwrap(); + assert_eq!(back.mesh.triangle_count(), s.mesh.triangle_count()); + assert_eq!(back.mesh.materials, s.mesh.materials); + // Base color, ORM and normal per texture set. + assert_eq!(bytes.windows(9).filter(|w| *w == b"image/png").count(), 3 * s.mesh.materials.len()); + assert!(crate::execute(&mut s, "file.exportMesh", &json!({ "path": base, "format": "fbx" })).is_err()); + let _ = std::fs::remove_dir_all(&dir); + } +} diff --git a/crates/engine/src/inspect.rs b/crates/engine/src/inspect.rs new file mode 100644 index 00000000..192e181b --- /dev/null +++ b/crates/engine/src/inspect.rs @@ -0,0 +1,143 @@ +//! JSON views of the session for agents: everything an agent changed must be visible here +//! without a screenshot. + +use serde_json::{Value, json}; +use texturecraft_core::{Effect, EffectKind, Fill, Filter, Layer, LayerKind, Source}; + +use crate::Session; +use crate::session::StackTarget; + +fn source_json(s: &Source) -> Value { + match s { + Source::Uniform(v) => json!({ "uniform": v }), + Source::Procedural { pattern, low, high } => json!({ + "procedural": pattern.kind.label(), "scale": pattern.scale, "seed": pattern.seed, "contrast": pattern.contrast, "low": low, "high": high + }), + Source::Image { name } => json!({ "image": name }), + Source::Anchor { anchor, channel } => json!({ "anchor": anchor.0, "channel": channel.id() }), + } +} + +fn fill_json(f: &Fill) -> Value { + json!({ + "projection": f.projection.label(), + "sources": f.sources.iter().map(|(c, s)| (c.id().to_string(), source_json(s))).collect::>(), + }) +} + +/// A mask or content (`content`) effect. +fn effect_json(s: &Session, e: &Effect, content: bool) -> Value { + let mut ej = json!({ "id": e.id.0, "name": e.name, "kind": e.kind.name(), "visible": e.visible, "blend": e.blend.label(), "opacity": e.opacity }); + match &e.kind { + EffectKind::Generator(g) => ej["generator"] = json!({ "type": format!("{:?}", g.kind), "level": g.level, "softness": g.softness, "noise": g.noise_amount, "invert": g.invert }), + EffectKind::Levels(lv) => ej["levels"] = json!([lv.in_low, lv.in_high, lv.gamma, lv.out_low, lv.out_high]), + EffectKind::Paint if content => { + ej["tiles"] = json!(s.doc.pixels.layers.iter().filter(|((id, _), _)| *id == e.id).map(|(_, img)| img.allocated_count()).sum::()) + } + EffectKind::Paint => ej["tiles"] = json!(s.doc.pixels.masks.get(&e.id).map(|i| i.allocated_count()).unwrap_or(0)), + EffectKind::Fill { source, .. } => ej["source"] = source_json(source), + EffectKind::Material(f) => ej["fill"] = fill_json(f), + EffectKind::Filter(Filter::Hsl { hue, saturation, lightness }) => ej["hsl"] = json!([hue, saturation, lightness]), + EffectKind::Filter(Filter::Blur { radius }) => ej["radius"] = json!(radius), + _ => {} + } + ej +} + +fn layer_json(s: &Session, l: &Layer, depth: usize) -> Value { + let channels: serde_json::Map = + l.channels.iter().map(|(c, b)| (c.id().to_string(), json!({ "mode": b.mode.label(), "opacity": b.opacity }))).collect(); + let mut v = json!({ + "id": l.id.0, + "name": l.name, + "kind": l.kind.name(), + "visible": l.visible, + "channels": channels, + "colorTag": l.color_tag, + }); + if let LayerKind::Fill(f) = &l.kind { + v["fill"] = fill_json(f); + } + if let Some(src) = l.instance_source() { + let source = s.doc.project.layers.get(&src); + let set = s.doc.project.locate(src).map(|(ts, _, _)| ts); + v["instanceOf"] = json!({ "layer": src.0, "name": source.map(|x| x.name.as_str()), "textureSet": set }); + } + if l.height_mask.enabled { + v["heightMask"] = json!({ "contrast": l.height_mask.contrast, "offset": l.height_mask.offset }); + } + if matches!(l.kind, LayerKind::Paint) { + // Sorted: the store is a hash map, and inspect output must be stable. + let mut painted: Vec<(&str, usize)> = s.doc.pixels.layers.iter().filter(|((id, _), _)| *id == l.id).map(|((_, c), img)| (c.id(), img.allocated_count())).collect(); + painted.sort_unstable(); + v["painted"] = json!(painted.iter().map(|(c, n)| json!({ "channel": c, "tiles": n })).collect::>()); + } + if let Some(m) = &l.mask { + v["mask"] = json!({ + "enabled": m.enabled, + "background": format!("{:?}", m.background).to_lowercase(), + "effects": m.effects.iter().map(|e| effect_json(s, e, false)).collect::>(), + }); + } + if !l.content_effects.is_empty() { + v["contentEffects"] = json!(l.content_effects.iter().map(|e| effect_json(s, e, true)).collect::>()); + } + if depth < texturecraft_core::project::MAX_DEPTH { + let kids: Vec = l.children().iter().rev().filter_map(|c| s.doc.project.layers.get(c)).map(|c| layer_json(s, c, depth + 1)).collect(); + if l.is_group() { + v["children"] = json!(kids); + } + } + v +} + +/// The layer stack of texture set `ts`, top → bottom (as displayed). +pub fn stack(s: &Session, ts: usize) -> Value { + let Some(set) = s.doc.project.texture_sets.get(ts) else { return Value::Null }; + json!(set.stack.iter().rev().filter_map(|id| s.doc.project.layers.get(id)).map(|l| layer_json(s, l, 0)).collect::>()) +} + +pub fn texture_sets(s: &Session) -> Value { + json!( + s.doc + .project + .texture_sets + .iter() + .enumerate() + .map(|(i, t)| json!({ + "index": i, + "name": t.name, + "resolution": t.resolution, + "channels": t.channels.iter().map(|(c, f)| json!({ "channel": c.id(), "format": f.label() })).collect::>(), + "layers": s.doc.project.walk(i).len(), + "baked": crate::project_cmds::baked_json(s.doc.baked.get(&i)), + "visible": t.visible, + "active": i == s.ts(), + })) + .collect::>() + ) +} + +/// The whole session. +pub fn session(s: &Session) -> Value { + let ts = s.ts(); + json!({ + "project": s.doc.project.name, + "mesh": { "source": s.doc.project.mesh, "triangles": s.mesh.triangle_count(), "vertices": s.mesh.vertex_count(), "materials": s.mesh.materials }, + "path": s.path, + "modified": s.modified, + "textureSets": texture_sets(s), + "bakeMeshes": crate::bake_cmds::meshes_json(s), + "activeTextureSet": ts, + "selectedLayer": s.selected_layer().map(|l| l.0), + "target": match s.target { StackTarget::Content => json!("content"), StackTarget::Mask => json!("mask"), StackTarget::Effect(e) => json!(e.0) }, + "layers": stack(s, ts), + "tool": { "tool": s.tool.tool.id(), "brush": crate::tool_cmds::brush_json(s) }, + "view": s.view.label(), + "camera": crate::view_cmds::camera_json(s), + "display": s.doc.project.display, + "history": { "undo": s.undo_label(), "redo": s.redo_label(), "depth": s.history_labels().len() }, + "memoryBytes": s.memory().total(), + "pendingTiles": s.pending_tiles(), + }) +} diff --git a/crates/engine/src/instance_cmds.rs b/crates/engine/src/instance_cmds.rs new file mode 100644 index 00000000..eb0a6a4a --- /dev/null +++ b/crates/engine/src/instance_cmds.rs @@ -0,0 +1,163 @@ +//! Instance layers (linked copies that draw another layer, possibly in another texture set) and +//! per-layer properties set through `layer.set`. + +use serde_json::{Value, json}; +use texturecraft_core::{Layer, LayerId, LayerKind}; + +use crate::commands::{CommandSpec, bad, boolp, content_param, f32p, has_layer, layer_param, u64p}; +use crate::session::{Document, StackTarget}; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!( + "layer.instance", + "Create instance", + ["Layers"], + None, + "{layer?, ts?: texture set (default active)} — a linked instance above that set's selection; edits to the source show in every instance", + has_layer, + instance + ), + cmd!( + "layer.pasteInstance", + "Paste as instance", + ["Layers"], + None, + "{} — an instance of the copied layer above the selection", + can_paste_instance, + paste_instance + ), + cmd!( + "layer.set", + "Set layer properties", + [], + None, + "{layer?, heightMask?: {enabled?, contrast?: 0..64, offset?: -1..1} | bool} — mask with height: m' = saturate(m + contrast·4m(1−m)·(height + offset))", + has_layer, + set + ), + ] +} + +/// Insert an instance of `source` (an instance's own source) into texture set `ts` above that +/// set's selection, and select it. +pub(crate) fn make_instance(s: &mut Session, source: LayerId, ts: usize) -> Result { + let src = s.doc.project.content_layer(source).ok_or_else(|| EngineError::Other(format!("layer {} has no source to instance", source.0)))?; + let (src_id, name) = (src.id, src.name.clone()); + let id = s.doc.project.alloc_id(); + let sel = s.selected.get(&ts).copied().filter(|l| s.doc.project.locate(*l).is_some_and(|(t, _, _)| t == ts)); + let inside = sel.and_then(|l| s.doc.project.layer(l).ok()).is_some_and(Layer::is_group); + s.doc.project.insert_layer(ts, Layer::new(id, name, LayerKind::Instance { source: src_id }, &[]), sel, inside)?; + s.selected.insert(ts, id); + if ts == s.ts() { + s.target = StackTarget::Content; + } + Ok(id) +} + +fn instance(s: &mut Session, p: &Value) -> Result { + let source = layer_param(s, "layer.instance", p)?; + let ts = match u64p(p, "ts") { + Some(t) => usize::try_from(t).ok().filter(|t| *t < s.set_count()).ok_or_else(|| bad("layer.instance", format!("no texture set {t}")))?, + None => s.ts(), + }; + let id = s.edit("Create instance", |s| make_instance(s, source, ts))?; + Ok(json!({ "layer": id.0, "textureSet": ts })) +} + +fn can_paste_instance(s: &Session) -> std::result::Result<(), String> { + match &s.clipboard { + Some((_, id)) if s.doc.project.locate(*id).is_some() => Ok(()), + Some(_) => Err("the copied layer is no longer in the project (paste it instead)".into()), + None => Err("the layer clipboard is empty".into()), + } +} + +fn paste_instance(s: &mut Session, _: &Value) -> Result { + let id = s.clipboard.as_ref().map(|(_, id)| *id).ok_or_else(|| EngineError::Other("the layer clipboard is empty".into()))?; + let ts = s.ts(); + let new = s.edit("Paste as instance", |s| make_instance(s, id, ts))?; + Ok(json!({ "layer": new.0 })) +} + +/// Replace instance `inst` with an independent copy of its source taken from `src` (its name, +/// visibility, color tag and own mask are kept). Returns the copy. +pub(crate) fn detach(s: &mut Session, src: &Document, inst: LayerId) -> Result { + let layer = s.doc.project.layer(inst)?.clone(); + let source = layer.instance_source().ok_or_else(|| EngineError::Other(format!("\"{}\" is not an instance", layer.name)))?; + let (ts, _, _) = s.doc.project.locate(inst).ok_or_else(|| EngineError::Other("layer not in a stack".into()))?; + let copy = crate::layer_ops::copy_tree(src, source, &mut s.doc, ts, Some(inst), false, 0)?; + let l = s.doc.project.layer_mut(copy)?; + l.name = layer.name; + l.visible = layer.visible; + l.color_tag = layer.color_tag; + if layer.mask.is_some() { + l.mask = layer.mask; + } + s.doc.project.remove_layer(inst)?; + if s.selected.get(&ts) == Some(&inst) { + s.selected.insert(ts, copy); + } + Ok(copy) +} + +/// After layers were removed: instances of a removed layer become independent copies (taken +/// from `before`, the document before the removal), then pixels of removed layers are dropped. +pub(crate) fn detach_orphans(s: &mut Session, before: &Document) -> Result<()> { + // Copies can hold instances of removed layers in turn; the depth bounds the rounds. + for _ in 0..=texturecraft_core::project::MAX_DEPTH { + let orphans: Vec = s + .doc + .project + .layers + .values() + .filter(|l| l.instance_source().is_some_and(|src| !s.doc.project.layers.contains_key(&src) && before.project.layers.contains_key(&src))) + .map(|l| l.id) + .collect(); + if orphans.is_empty() { + break; + } + for inst in orphans { + detach(s, before, inst)?; + } + } + prune_pixels(&mut s.doc); + Ok(()) +} + +/// Drop pixels of layers and effects that no longer exist. +pub(crate) fn prune_pixels(doc: &mut Document) { + let p = &doc.project; + let alive: std::collections::BTreeSet = p + .layers + .values() + .flat_map(|l| std::iter::once(l.id).chain(l.mask.iter().flat_map(|m| m.effects.iter()).chain(l.content_effects.iter()).map(|e| e.id))) + .collect(); + doc.pixels.retain(|x| alive.contains(&x)); +} + +fn set(s: &mut Session, p: &Value) -> Result { + // Linked properties live on an instance's source. + let id = content_param(s, "layer.set", p)?; + let hm = match p.get("heightMask") { + Some(Value::Bool(on)) => json!({ "enabled": on }), + Some(v @ Value::Object(_)) => v.clone(), + Some(_) => return Err(bad("layer.set", "`heightMask` must be an object {enabled?, contrast?, offset?} or a bool")), + None => return Err(bad("layer.set", "give `heightMask`")), + }; + let out = s.edit("Layer properties", |s| { + let h = &mut s.doc.project.layer_mut(id)?.height_mask; + if let Some(on) = boolp(&hm, "enabled") { + h.enabled = on; + } + if let Some(c) = f32p(&hm, "contrast") { + h.contrast = c.clamp(0.0, 64.0); + } + if let Some(o) = f32p(&hm, "offset") { + h.offset = o.clamp(-1.0, 1.0); + } + Ok(json!({ "layer": id.0, "heightMask": { "enabled": h.enabled, "contrast": h.contrast, "offset": h.offset } })) + })?; + Ok(out) +} diff --git a/crates/engine/src/layer_cmds.rs b/crates/engine/src/layer_cmds.rs new file mode 100644 index 00000000..e7831f12 --- /dev/null +++ b/crates/engine/src/layer_cmds.rs @@ -0,0 +1,404 @@ +//! Layer stack commands: add, remove, duplicate, select, rename, visibility, reorder, group, +//! per-channel blending and fill sources. + +use serde_json::{Value, json}; +use texturecraft_core::{BlendMode, Channel, ChannelBlend, EffectKind, Fill, Layer, LayerId, LayerKind, Procedural, ProceduralKind, Projection, Source}; + +use crate::commands::{CommandSpec, always, bad, blend_param, boolp, channel_param, color_param, content_param, f32p, has_layer, layer_param, strp, u64p}; +use crate::{EngineError, Result, Session, cmd, session::StackTarget}; + +pub fn specs() -> Vec { + vec![ + cmd!("layer.add.paint", "Add paint layer", ["Layers"], None, "{name?}", always, add_paint), + cmd!("layer.add.fill", "Add fill layer", ["Layers"], None, "{name?, color?, roughness?, metallic?}", always, add_fill), + cmd!("layer.add.group", "Add folder", ["Layers"], None, "{name?}", always, add_group), + cmd!("layer.remove", "Remove layer(s)", ["Layers"], Some("Delete"), "{layer?}", has_layer, remove), + cmd!("layer.duplicate", "Duplicate layer(s)", ["Layers"], Some("Ctrl+D"), "{layer?}", has_layer, duplicate), + cmd!("layer.group", "Group layer(s)", ["Layers"], Some("Ctrl+G"), "{layer?}", has_layer, group), + cmd!("layer.select", "Select layer", [], None, "{layer, target?: content|mask|}", always, select), + cmd!("layer.rename", "Rename layer", [], None, "{layer?, name}", has_layer, rename), + cmd!("layer.visible", "Toggle layer visibility", [], None, "{layer?, visible?}", has_layer, visible), + cmd!("layer.move", "Move layer", [], None, "{layer?, index?} | {layer?, above?: id|null, inside?: bool} | {layer?, delta: ±n}", has_layer, move_layer), + cmd!("layer.blend", "Set channel blending", [], None, "{layer?, channel?: id|all, mode?, opacity?: 0..1, enabled?}", has_layer, blend), + cmd!( + "layer.fill.set", + "Set fill source", + [], + None, + "{layer? | effect?: content fill effect id, channel, color?|value?|procedural?: kind, scale?, seed?, contrast?, balance?, invert?, low?, high?|image?|anchor?: anchor effect id, anchorChannel?, enabled?}", + has_layer, + fill_set + ), + cmd!( + "layer.fill.projection", + "Set fill projection", + [], + None, + "{layer? | effect?: content fill effect id, projection: uv|triplanar|planar|spherical|cylindrical, scale?, rotation?, sharpness?, axis?}", + has_layer, + fill_projection + ), + cmd!("layer.colorTag", "Set layer color tag", [], None, "{layer?, tag?: 0..7 (absent clears)}", has_layer, color_tag), + cmd!("layer.list", "List layers", [], None, "{ts?}", always, list), + ] +} + +/// Insert a layer above the selection (inside it when it is a group) and select it. +pub(crate) fn insert_selected(s: &mut Session, layer: Layer) -> Result { + let ts = s.ts(); + let sel = s.selected_layer(); + let inside = sel.and_then(|id| s.doc.project.layer(id).ok()).is_some_and(|l| l.is_group()); + let id = s.doc.project.insert_layer(ts, layer, sel, inside)?; + s.selected.insert(ts, id); + s.target = StackTarget::Content; + Ok(id) +} + +fn channels_of(s: &Session) -> Vec { + s.doc.project.texture_set(s.ts()).map(|t| t.channel_list()).unwrap_or_default() +} + +fn add_paint(s: &mut Session, p: &Value) -> Result { + let ts = s.ts(); + let name = strp(p, "name").map(str::to_string).unwrap_or_else(|| s.doc.project.next_layer_name(ts, "Layer")); + let id = s.edit("Add paint layer", |s| { + let id = s.doc.project.alloc_id(); + insert_selected(s, Layer::new(id, name, LayerKind::Paint, &channels_of(s))) + })?; + Ok(json!({ "layer": id.0 })) +} + +/// A uniform fill from the `color`, `roughness`, `metallic`, `height` and `opacity` params. +pub(crate) fn fill_from(p: &Value) -> Fill { + let mut fill = Fill::default(); + if let Some(c) = color_param(p, "color") { + fill.sources.insert(Channel::BaseColor, Source::Uniform(c)); + } + for (key, ch) in [("roughness", Channel::Roughness), ("metallic", Channel::Metallic), ("height", Channel::Height), ("opacity", Channel::Opacity)] { + if let Some(v) = f32p(p, key) { + fill.sources.insert(ch, Source::Uniform([v; 3])); + } + } + fill +} + +fn add_fill(s: &mut Session, p: &Value) -> Result { + let ts = s.ts(); + let name = strp(p, "name").map(str::to_string).unwrap_or_else(|| s.doc.project.next_layer_name(ts, "Fill layer")); + let fill = fill_from(p); + let id = s.edit("Add fill layer", |s| { + let id = s.doc.project.alloc_id(); + insert_selected(s, Layer::new(id, name, LayerKind::Fill(fill), &channels_of(s))) + })?; + Ok(json!({ "layer": id.0 })) +} + +fn add_group(s: &mut Session, p: &Value) -> Result { + let ts = s.ts(); + let name = strp(p, "name").map(str::to_string).unwrap_or_else(|| s.doc.project.next_layer_name(ts, "Folder")); + let id = s.edit("Add folder", |s| { + let id = s.doc.project.alloc_id(); + let mut l = Layer::new(id, name, LayerKind::Group { children: Vec::new(), collapsed: false }, &channels_of(s)); + for b in l.channels.values_mut() { + b.mode = BlendMode::Passthrough; + } + insert_selected(s, l) + })?; + Ok(json!({ "layer": id.0 })) +} + +fn remove(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.remove", p)?; + let before = s.doc.clone(); + let removed = s.edit("Remove layer", |s| { + let (ts, parent, i) = s.doc.project.locate(id).ok_or(EngineError::Other("layer not in a stack".into()))?; + let removed = s.doc.project.remove_layer(id)?; + // Instances of what was removed keep their look as independent layers. + crate::instance_cmds::detach_orphans(s, &before)?; + // Select the layer below (or above) the removed one. + let list = match parent { + Some(g) => s.doc.project.layer(g).map(|l| l.children().to_vec()).unwrap_or_default(), + None => s.doc.project.texture_set(ts).map(|t| t.stack.clone()).unwrap_or_default(), + }; + let next = list.get(i.saturating_sub(1)).or(list.first()).copied().or(parent); + match next { + Some(n) => s.selected.insert(ts, n), + None => s.selected.remove(&ts), + }; + Ok(removed) + })?; + Ok(json!({ "removed": removed.iter().map(|l| l.0).collect::>() })) +} + +fn duplicate(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.duplicate", p)?; + let (ts, _, _) = s.doc.project.locate(id).ok_or(EngineError::Other("layer not in a stack".into()))?; + let src = s.doc.clone(); + let new = s.edit("Duplicate layer", |s| { + let new = crate::layer_ops::copy_tree(&src, id, &mut s.doc, ts, Some(id), false, 0)?; + let name = format!("{} copy", src.project.layer(id)?.name); + s.doc.project.layer_mut(new)?.name = name; + Ok(new) + })?; + s.selected.insert(ts, new); + Ok(json!({ "layer": new.0 })) +} + +fn group(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.group", p)?; + let g = s.edit("Group layers", |s| { + let (ts, _, _) = s.doc.project.locate(id).ok_or(EngineError::Other("layer not in a stack".into()))?; + let gid = s.doc.project.alloc_id(); + let name = s.doc.project.next_layer_name(ts, "Folder"); + let channels = s.doc.project.texture_set(ts)?.channel_list(); + let mut gl = Layer::new(gid, name, LayerKind::Group { children: Vec::new(), collapsed: false }, &channels); + for b in gl.channels.values_mut() { + b.mode = BlendMode::Passthrough; + } + s.doc.project.insert_layer(ts, gl, Some(id), false)?; + s.doc.project.move_above(id, Some(gid), true)?; + s.selected.insert(ts, gid); + Ok(gid) + })?; + Ok(json!({ "layer": g.0 })) +} + +fn select(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.select", p)?; + let (ts, _, _) = s.doc.project.locate(id).ok_or_else(|| bad("layer.select", "layer not in a stack"))?; + s.active_set = ts; + s.selected.insert(ts, id); + s.target = match p.get("target") { + Some(Value::String(t)) if t == "mask" => { + if s.doc.project.layer(s.doc.project.mask_owner(id))?.mask.is_none() { + return Err(bad("layer.select", "the layer has no mask")); + } + StackTarget::Mask + } + Some(Value::String(t)) if t == "content" => StackTarget::Content, + Some(v) => match v.as_u64() { + Some(e) if s.doc.project.effect(LayerId(e)).is_some_and(|(owner, _)| owner == id) => StackTarget::Effect(LayerId(e)), + _ => return Err(bad("layer.select", "target must be content, mask or an effect id of this layer")), + }, + None => StackTarget::Content, + }; + s.revision = s.revision.wrapping_add(1); + Ok(json!({ "layer": id.0, "textureSet": ts })) +} + +fn rename(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.rename", p)?; + let name = strp(p, "name").map(str::trim).filter(|n| !n.is_empty()).ok_or_else(|| bad("layer.rename", "`name` is required"))?.to_string(); + if name.chars().count() > 256 { + return Err(bad("layer.rename", "name is longer than 256 characters")); + } + s.edit("Rename layer", |s| { + s.doc.project.layer_mut(id)?.name = name; + Ok(()) + })?; + Ok(Value::Null) +} + +fn visible(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.visible", p)?; + let v = s.edit("Layer visibility", |s| { + let l = s.doc.project.layer_mut(id)?; + l.visible = boolp(p, "visible").unwrap_or(!l.visible); + Ok(l.visible) + })?; + Ok(json!({ "visible": v })) +} + +fn move_layer(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.move", p)?; + s.edit("Move layer", |s| { + if let Some(d) = p.get("delta").and_then(Value::as_i64) { + let (_, _, i) = s.doc.project.locate(id).ok_or(EngineError::Other("layer not in a stack".into()))?; + let to = (i as i64 + d).max(0) as usize; + s.doc.project.move_layer(id, to)?; + } else if let Some(i) = u64p(p, "index") { + s.doc.project.move_layer(id, usize::try_from(i).unwrap_or(usize::MAX))?; + } else if p.get("above").is_some() { + let above = u64p(p, "above").map(LayerId); + s.doc.project.move_above(id, above, boolp(p, "inside").unwrap_or(false))?; + } else { + return Err(bad("layer.move", "give `delta`, `index` or `above`")); + } + Ok(()) + })?; + Ok(Value::Null) +} + +fn blend(s: &mut Session, p: &Value) -> Result { + let id = content_param(s, "layer.blend", p)?; + let all = strp(p, "channel") == Some("all"); + let ch = if all { None } else { channel_param("layer.blend", p, "channel")? }; + let mode = blend_param("layer.blend", p, "mode")?; + let opacity = f32p(p, "opacity").map(|o| o.clamp(0.0, 1.0)); + let enabled = boolp(p, "enabled"); + let ts_channels = channels_of(s); + s.edit("Layer blending", |s| { + let l = s.doc.project.layer_mut(id)?; + let targets: Vec = match ch { + Some(c) => vec![c], + None => ts_channels.clone(), + }; + for c in targets { + match enabled { + Some(false) => { + l.channels.remove(&c); + continue; + } + Some(true) => { + let mode = if l.is_group() { BlendMode::Passthrough } else { BlendMode::Normal }; + l.channels.entry(c).or_insert(ChannelBlend { mode, opacity: 1.0 }); + } + None => {} + } + if let Some(b) = l.channels.get_mut(&c) { + if let Some(m) = mode { + b.mode = m; + } + if let Some(o) = opacity { + b.opacity = o; + } + } + } + Ok(()) + })?; + Ok(Value::Null) +} + +/// Which fill `layer.fill.*` edits: a fill layer's (`layer`) or a content fill effect's +/// (`effect`). +#[derive(Clone, Copy)] +enum FillTarget { + Layer(LayerId), + Effect(LayerId), +} + +fn fill_target(s: &Session, p: &Value, cmd: &str) -> Result { + match u64p(p, "effect").map(LayerId) { + Some(e) => match s.doc.project.effect(e) { + Some((_, x)) if matches!(x.kind, EffectKind::Material(_)) => Ok(FillTarget::Effect(e)), + _ => Err(bad(cmd, format!("{} is not a content fill effect", e.0))), + }, + None => Ok(FillTarget::Layer(content_param(s, cmd, p)?)), + } +} + +fn fill_mut(s: &mut Session, target: FillTarget) -> Result<&mut Fill> { + match target { + FillTarget::Layer(id) => match &mut s.doc.project.layer_mut(id)?.kind { + LayerKind::Fill(f) => Ok(f), + _ => Err(EngineError::Other("not a fill layer".into())), + }, + FillTarget::Effect(e) => match s.doc.project.effect_mut(e).map(|x| &mut x.kind) { + Some(EffectKind::Material(f)) => Ok(f), + _ => Err(EngineError::Other("not a content fill effect".into())), + }, + } +} + +fn fill_set(s: &mut Session, p: &Value) -> Result { + let target = fill_target(s, p, "layer.fill.set")?; + let ch = channel_param("layer.fill.set", p, "channel")?.ok_or_else(|| bad("layer.fill.set", "`channel` is required"))?; + let enabled = boolp(p, "enabled"); + let source = if let Some(kind) = strp(p, "procedural") { + let kind = ProceduralKind::parse(kind).ok_or_else(|| bad("layer.fill.set", format!("unknown procedural `{kind}`")))?; + let mut pr = Procedural::new(kind); + if let Some(v) = f32p(p, "scale") { + pr.scale = v.clamp(0.001, 1000.0); + } + if let Some(v) = u64p(p, "seed") { + pr.seed = v as u32; + } + if let Some(v) = f32p(p, "contrast") { + pr.contrast = v.clamp(0.0, 20.0); + } + if let Some(v) = f32p(p, "balance") { + pr.balance = v.clamp(-1.0, 1.0); + } + pr.invert = boolp(p, "invert").unwrap_or(false); + Some(Source::Procedural { pattern: pr, low: color_param(p, "low").unwrap_or([0.0; 3]), high: color_param(p, "high").unwrap_or([1.0; 3]) }) + } else if let Some(c) = color_param(p, "color").or_else(|| color_param(p, "value")) { + Some(Source::Uniform(c)) + } else if let Some(name) = strp(p, "image") { + Some(Source::Image { name: name.to_string() }) + } else if let Some(a) = u64p(p, "anchor") { + let reader = match target { + FillTarget::Layer(id) => Some(id), + FillTarget::Effect(e) => s.doc.project.effect(e).map(|(owner, _)| owner), + }; + let reader = reader.ok_or_else(|| bad("layer.fill.set", "the fill is not in a layer"))?; + let anchor_channel = channel_param("layer.fill.set", p, "anchorChannel")?.unwrap_or(ch); + Some(crate::mask_cmds::anchor_source(s, "layer.fill.set", reader, LayerId(a), anchor_channel)?) + } else if enabled.is_some() { + None + } else { + return Err(bad("layer.fill.set", "give `color`, `value`, `procedural`, `image`, `anchor` or `enabled`")); + }; + s.edit("Set fill", |s| { + let f = fill_mut(s, target)?; + match target { + // A fill effect's channel is on while it has a source. + FillTarget::Effect(_) if enabled == Some(false) => { + f.sources.remove(&ch); + } + FillTarget::Effect(_) => { + let src = source.unwrap_or_else(|| f.source(ch)); + f.sources.insert(ch, src); + } + FillTarget::Layer(id) => { + if let Some(src) = source { + f.sources.insert(ch, src); + } + let l = s.doc.project.layer_mut(id)?; + if enabled == Some(false) { + l.channels.remove(&ch); + } else { + l.channels.entry(ch).or_default(); + } + } + } + Ok(()) + })?; + Ok(Value::Null) +} + +pub(crate) fn projection_from(p: &Value, cmd: &str) -> Result { + let scale = f32p(p, "scale").unwrap_or(1.0).clamp(0.001, 1000.0); + Ok(match strp(p, "projection").unwrap_or("uv") { + "uv" => Projection::Uv { scale: [scale, scale], rotation: f32p(p, "rotation").unwrap_or(0.0), offset: [0.0, 0.0] }, + "triplanar" | "tri-planar" => Projection::Triplanar { scale, sharpness: f32p(p, "sharpness").unwrap_or(8.0).clamp(1.0, 64.0), offset: [0.0; 3] }, + "planar" => Projection::Planar { scale, axis: u64p(p, "axis").unwrap_or(2).min(2) as u8, offset: [0.0; 3] }, + "spherical" => Projection::Spherical { scale }, + "cylindrical" => Projection::Cylindrical { scale, axis: u64p(p, "axis").unwrap_or(1).min(2) as u8 }, + other => return Err(bad(cmd, format!("unknown projection `{other}`"))), + }) +} + +fn fill_projection(s: &mut Session, p: &Value) -> Result { + let target = fill_target(s, p, "layer.fill.projection")?; + let proj = projection_from(p, "layer.fill.projection")?; + s.edit("Fill projection", |s| { + fill_mut(s, target)?.projection = proj; + Ok(()) + })?; + Ok(Value::Null) +} + +fn color_tag(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.colorTag", p)?; + let tag = u64p(p, "tag").map(|t| t.min(7) as u8); + s.edit("Layer color tag", |s| { + s.doc.project.layer_mut(id)?.color_tag = tag; + Ok(()) + })?; + Ok(Value::Null) +} + +fn list(s: &mut Session, p: &Value) -> Result { + let ts = u64p(p, "ts").map(|t| t as usize).unwrap_or(s.ts()); + Ok(crate::inspect::stack(s, ts)) +} diff --git a/crates/engine/src/layer_ops.rs b/crates/engine/src/layer_ops.rs new file mode 100644 index 00000000..9891a437 --- /dev/null +++ b/crates/engine/src/layer_ops.rs @@ -0,0 +1,217 @@ +//! Layer clipboard (copy, cut, paste across texture sets), flatten, and resampling of painted +//! pixels when a texture set changes size. + +use serde_json::{Value, json}; +use texturecraft_core::{Channel, ChannelKind, LayerId, LayerKind}; +use texturecraft_texel::TileImage; + +use crate::commands::{CommandSpec, boolp, has_layer, layer_param}; +use crate::session::{Document, StackTarget}; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("layer.copy", "Copy layer(s)", ["Layers"], Some("Ctrl+C"), "{layer?}", has_layer, copy), + cmd!("layer.cut", "Cut layer(s)", ["Layers"], Some("Ctrl+X"), "{layer?}", has_layer, cut), + cmd!("layer.paste", "Paste layer(s)", ["Layers"], Some("Ctrl+V"), "{} — above the selection, in the active texture set", can_paste, paste), + cmd!("layer.flatten", "Flatten layer", ["Layers"], Some("Ctrl+M"), "{layer?} — a fill or masked paint layer becomes a plain paint layer", has_layer, flatten), + cmd!( + "layer.instantiateAll", + "Instantiate across texture sets", + ["Layers"], + Some("Ctrl+Shift+D"), + "{layer?, copy?: bool} — a linked instance of the layer on top of every other texture set (`copy`: independent copies)", + has_layer, + to_all_sets + ), + ] +} + +fn can_paste(s: &Session) -> std::result::Result<(), String> { + if s.clipboard.is_some() { Ok(()) } else { Err("the layer clipboard is empty".into()) } +} + +/// Encoded "nothing painted" texel for a channel image (value 0, coverage 0). +pub(crate) fn empty_texel(c: Channel) -> Vec { + let zero = if c.kind() == ChannelKind::Signed { texturecraft_texel::to_u16_signed(0.0) } else { 0 }; + let mut v = vec![zero; c.components()]; + v.push(0); + v +} + +fn fit(img: &TileImage, res: u32, empty: &[u16]) -> TileImage { + if img.width() == res { img.clone() } else { img.resampled(res, res, empty) } +} + +/// Copy layer `id` of document `src` (recursively, with pixels) into the session's texture set +/// `ts`, above `above` (or inside it when `inside`). Pixels are resampled to the target set's +/// resolution. Returns the new id. +pub(crate) fn copy_tree(src: &Document, id: LayerId, s: &mut Document, ts: usize, above: Option, inside: bool, depth: usize) -> Result { + if depth > texturecraft_core::project::MAX_DEPTH { + return Err(EngineError::Other("layer groups nested too deeply".into())); + } + let res = s.project.texture_set(ts)?.resolution; + let channels = s.project.texture_set(ts)?.channel_list(); + let layer = src.project.layer(id)?.clone(); + let new = s.project.alloc_id(); + let mut copy = layer.clone(); + copy.id = new; + // Channels the target set doesn't have are dropped; ones it has but the source didn't + // stay disabled. + copy.channels.retain(|c, _| channels.contains(c)); + for e in copy.mask.iter_mut().flat_map(|m| m.effects.iter_mut()).chain(copy.content_effects.iter_mut()) { + let old = e.id; + e.id = s.project.alloc_id(); + if let Some(img) = src.pixels.masks.get(&old) { + s.pixels.masks.insert(e.id, fit(img, res, &[0, 0])); + } + // Content paint effects keep per-channel pixels. + for c in channels.iter().copied() { + if let Some(img) = src.pixels.layer(old, c) { + s.pixels.layers.insert((e.id, c), fit(img, res, &empty_texel(c))); + } + } + } + let children = layer.children().to_vec(); + if let LayerKind::Group { children: c, .. } = &mut copy.kind { + c.clear(); + } + for c in Channel::ALL { + if let Some(img) = src.pixels.layer(id, c) + && channels.contains(&c) + { + s.pixels.layers.insert((new, c), fit(img, res, &empty_texel(c))); + } + } + s.project.insert_layer(ts, copy, above, inside)?; + let mut below = None; + for c in children { + // Children keep their bottom → top order inside the new group. + let placed = match below { + None => copy_tree(src, c, s, ts, Some(new), true, depth + 1)?, + Some(b) => copy_tree(src, c, s, ts, Some(b), false, depth + 1)?, + }; + below = Some(placed); + } + Ok(new) +} + +fn copy(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.copy", p)?; + s.clipboard = Some((s.doc.clone(), id)); + Ok(json!({ "copied": id.0 })) +} + +fn cut(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.cut", p)?; + s.clipboard = Some((s.doc.clone(), id)); + crate::execute(s, "layer.remove", &json!({ "layer": id.0 }))?; + Ok(json!({ "cut": id.0 })) +} + +fn paste(s: &mut Session, _: &Value) -> Result { + let (src, id) = s.clipboard.clone().ok_or_else(|| EngineError::Other("the layer clipboard is empty".into()))?; + let new = s.edit("Paste layer", |s| { + let ts = s.ts(); + let sel = s.selected_layer(); + let inside = sel.and_then(|l| s.doc.project.layer(l).ok()).is_some_and(|l| l.is_group()); + let new = copy_tree(&src, id, &mut s.doc, ts, sel, inside, 0)?; + s.selected.insert(ts, new); + s.target = StackTarget::Content; + Ok(new) + })?; + Ok(json!({ "layer": new.0 })) +} + +fn to_all_sets(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.instantiateAll", p)?; + let (from, _, _) = s.doc.project.locate(id).ok_or_else(|| EngineError::Other("layer not in a stack".into()))?; + let src = s.doc.clone(); + let copy = boolp(p, "copy").unwrap_or(false); + let label = if copy { "Copy layer to all texture sets" } else { "Instantiate across texture sets" }; + let made = s.edit(label, |s| { + let mut made = Vec::new(); + for ts in (0..s.set_count()).filter(|ts| *ts != from) { + let new = if copy { + copy_tree(&src, id, &mut s.doc, ts, None, false, 0)? + } else { + // On top of the set: clear its selection first. + s.selected.remove(&ts); + crate::instance_cmds::make_instance(s, id, ts)? + }; + made.push(new.0); + } + Ok(made) + })?; + Ok(json!({ "layers": made })) +} + +fn flatten(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "layer.flatten", p)?; + let (ts, _, _) = s.doc.project.locate(id).ok_or_else(|| EngineError::Other("layer not in a stack".into()))?; + let layer = s.doc.project.layer(id)?.clone(); + // An instance flattens what it draws into a plain layer of its own. + let content = s.doc.project.content_layer(id).cloned().ok_or_else(|| EngineError::Other("the instance's source is missing".into()))?; + if content.is_group() { + return Err(EngineError::Other("flattening a folder is not supported yet; flatten its layers".into())); + } + s.update(); + let cache = s.caches.get(ts).ok_or_else(|| EngineError::Other("texture set not ready".into()))?; + let res = cache.resolution; + let tiles: Vec<(u32, u32)> = cache.covered_tiles.iter().copied().collect(); + let empty = Default::default(); + let inputs = texturecraft_compose::Inputs { + project: &s.doc.project, + ts, + mesh: &s.mesh, + gbuf: &cache.gbuf, + pixels: &s.doc.pixels, + baked: s.doc.baked.get(&ts).unwrap_or(&empty), + preview: None, + images: &s.images, + bounds: s.mesh.bounds(), + }; + let flat = texturecraft_compose::flatten_layer(&inputs, id, &tiles).ok_or_else(|| EngineError::Other("nothing to flatten".into()))?; + s.edit("Flatten layer", |s| { + for c in Channel::ALL { + s.doc.pixels.layers.remove(&(id, c)); + } + let effects: Vec = layer.mask.iter().flat_map(|m| m.effects.iter()).chain(layer.content_effects.iter()).map(|e| e.id).collect(); + s.doc.pixels.masks.retain(|e, _| !effects.contains(e)); + s.doc.pixels.layers.retain(|(e, _), _| !effects.contains(e)); + for (c, (tx, ty), data) in flat { + let img = s.doc.pixels.layer_mut(id, c, res); + img.set_tile(tx, ty, Some(std::sync::Arc::new(data))); + } + let channels = s.doc.project.texture_set(ts)?.channel_list(); + let l = s.doc.project.layer_mut(id)?; + l.kind = LayerKind::Paint; + l.mask = None; + l.content_effects.clear(); + l.height_mask = Default::default(); + l.channels = content.channels.into_iter().filter(|(c, _)| channels.contains(c)).collect(); + s.target = StackTarget::Content; + Ok(()) + })?; + Ok(json!({ "layer": id.0 })) +} + +/// Resample every painted image of texture set `ts` to `res` (after a size change). +pub(crate) fn resample_set(s: &mut Session, ts: usize, res: u32) { + let ids: Vec = s.doc.project.walk(ts).into_iter().map(|(id, _)| id).collect(); + let effect_ids: Vec = ids + .iter() + .filter_map(|id| s.doc.project.layers.get(id)) + .flat_map(|l| l.mask.iter().flat_map(|m| m.effects.iter()).chain(l.content_effects.iter()).map(|e| e.id)) + .collect(); + for ((id, c), img) in s.doc.pixels.layers.iter_mut() { + if (ids.contains(id) || effect_ids.contains(id)) && img.width() != res { + *img = img.resampled(res, res, &empty_texel(*c)); + } + } + for (id, img) in s.doc.pixels.masks.iter_mut() { + if effect_ids.contains(id) && img.width() != res { + *img = img.resampled(res, res, &[0, 0]); + } + } +} diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs new file mode 100644 index 00000000..959350db --- /dev/null +++ b/crates/engine/src/lib.rs @@ -0,0 +1,64 @@ +//! # texturecraft-engine +//! +//! The TextureCraft session: a [`Session`] owns the document (project + copy-on-write pixels + +//! baked maps), the mesh with its BVH and per-texture-set caches (UV G-buffer, padding map, +//! composite), snapshot-based undo, the tool state and the active stroke. Every user-visible +//! action is a command in the [`commands`] registry, dispatched by id from the UI, the CLI, +//! the control channel and the MCP server alike. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod bake_cmds; +pub mod commands; +pub mod file_cmds; +pub mod inspect; +pub mod instance_cmds; +pub mod layer_cmds; +pub mod layer_ops; +pub mod mask_cmds; +pub mod material_lib; +pub mod materials; +pub mod painting; +pub mod path_tool; +pub mod preview; +pub mod project_cmds; +pub mod quick_mask; +pub mod resource_cmds; +pub mod session; +pub mod set_cmds; +pub mod smart_masks; +pub mod tool_cmds; +pub mod view_cmds; + +pub use bake_cmds::{BakeMesh, BakeMeshes, BakeTask}; +pub use commands::{CommandSpec, command_specs, execute, find}; +pub use path_tool::PathState; +pub use project_cmds::sample_session; +pub use session::{CloneSource, Document, FillMode, Session, SetCache, StackTarget, StencilState, Tool, ToolState, ViewMode}; + +pub use texturecraft_bake as bake; +pub use texturecraft_compose as compose; +pub use texturecraft_core as core; +pub use texturecraft_formats as formats; +pub use texturecraft_geom as geom; +pub use texturecraft_paint as paint; +pub use texturecraft_texel as texel; + +#[derive(Debug, thiserror::Error)] +pub enum EngineError { + #[error("unknown command `{0}`")] + UnknownCommand(String), + #[error("`{cmd}` is not available: {why}")] + Disabled { cmd: String, why: String }, + #[error("`{cmd}`: {msg}")] + BadParams { cmd: String, msg: String }, + #[error(transparent)] + Core(#[from] texturecraft_core::CoreError), + #[error("{0}")] + Other(String), +} + +pub type Result = std::result::Result; + +/// Version string shown in About, `--version` and window titles. +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/crates/engine/src/mask_cmds.rs b/crates/engine/src/mask_cmds.rs new file mode 100644 index 00000000..ea65c0ea --- /dev/null +++ b/crates/engine/src/mask_cmds.rs @@ -0,0 +1,485 @@ +//! Mask and effect commands (the layer context menu's mask section and "Add "). + +use serde_json::{Value, json}; +use texturecraft_core::{ + BlendMode, Channel, CompareOp, Effect, EffectKind, Filter, Generator, GeneratorKind, LayerId, Levels, Mask, MaskBackground, Procedural, ProceduralKind, + Source, +}; + +use crate::commands::{CommandSpec, bad, blend_param, boolp, channel_param, color_param, f32p, has_layer, layer_param, strp, u64p}; +use crate::layer_cmds::projection_from; +use crate::session::StackTarget; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("mask.add.white", "Add white mask", ["Layers", "Mask"], None, "{layer?}", has_layer, |s, p| add_mask(s, p, MaskBackground::White)), + cmd!("mask.add.black", "Add black mask", ["Layers", "Mask"], None, "{layer?}", has_layer, |s, p| add_mask(s, p, MaskBackground::Black)), + cmd!( + "mask.add.colorSelection", + "Add mask with color selection", + ["Layers", "Mask"], + None, + "{layer?, color?: [r,g,b] ID color, tolerance?}", + has_layer, + add_color_mask + ), + cmd!("mask.toggle", "Toggle mask", ["Layers", "Mask"], None, "{layer?, enabled?}", has_layer, toggle), + cmd!("mask.invertBackground", "Invert mask background", ["Layers", "Mask"], None, "{layer?}", has_layer, invert_background), + cmd!("mask.invert", "Invert mask", ["Layers", "Mask"], None, "{layer?}", has_layer, invert), + cmd!("mask.clear", "Clear mask", ["Layers", "Mask"], None, "{layer?}", has_layer, clear), + cmd!("mask.remove", "Remove mask", ["Layers", "Mask"], None, "{layer?}", has_layer, remove), + cmd!( + "effect.add.paint", + "Add paint", + ["Layers", "Effects"], + None, + "{layer?, target?: mask|content, name?}", + has_layer, + |s, p| push_effect(s, p, EffectKind::Paint, BlendMode::Normal) + ), + cmd!( + "effect.add.fill", + "Add fill", + ["Layers", "Effects"], + None, + "{layer?, target?: mask|content, name?, mask: value?: 0..1 | procedural?: kind, scale?, seed? | anchor?: anchor effect id, anchorChannel?: channel (height); content: color?, roughness?, metallic?, height?, opacity? (default: every layer channel); projection?}", + has_layer, + add_fill + ), + cmd!( + "effect.add.generator", + "Add generator", + ["Layers", "Effects"], + None, + "{layer?, name?, generator?: edgeWear|dirt|thinAreas|curvature|ambientOcclusion|position|direction, level?, softness?, noise?, invert?}", + has_layer, + add_generator + ), + cmd!( + "effect.add.levels", + "Add levels", + ["Layers", "Effects"], + None, + "{layer?, target?: mask|content, name?, inLow?, inHigh?, gamma?, outLow?, outHigh?}", + has_layer, + add_levels + ), + cmd!( + "effect.add.filter", + "Add filter", + ["Layers", "Effects"], + None, + "{layer?, target?: mask|content, name?, filter?: invert|threshold|blur|sharpen|hsl, level?, radius?, amount?, hue?: turns -1..1, saturation?: -1..1, lightness?: -1..1}", + has_layer, + add_filter + ), + cmd!( + "effect.add.compare", + "Add compare mask", + ["Layers", "Effects"], + None, + "{layer?, name?, op?: lesser|within|greater, value?, tolerance?}", + has_layer, + add_compare + ), + cmd!( + "effect.add.anchor", + "Add anchor point", + ["Layers", "Effects"], + None, + "{layer?, name?} (records the stack up to this layer for fills and masks above: effect.add.fill {anchor})", + has_layer, + |s, p| push_effect(s, p, EffectKind::Anchor, BlendMode::Normal) + ), + cmd!( + "effect.set", + "Edit effect", + [], + None, + "{effect, visible?, blend?, opacity?, name?, level?, softness?, noise?, noiseScale?, invert?, value?, anchor?, anchorChannel?, inLow?, inHigh?, gamma?, outLow?, outHigh?, radius?, amount?, hue?, saturation?, lightness?, tolerance?}", + has_layer, + set + ), + cmd!("effect.remove", "Remove effect", [], None, "{effect}", has_layer, remove_effect), + ] +} + +fn with_mask(s: &mut Session, p: &Value, cmd: &str, label: &str, f: impl FnOnce(&mut Session, LayerId) -> Result) -> Result { + let id = layer_param(s, cmd, p)?; + s.edit(label, |s| f(s, id)) +} + +fn add_mask(s: &mut Session, p: &Value, bg: MaskBackground) -> Result { + let label = if bg == MaskBackground::White { "Add white mask" } else { "Add black mask" }; + with_mask(s, p, "mask.add", label, |s, id| { + let l = s.doc.project.layer_mut(id)?; + if l.mask.is_some() { + return Err(EngineError::Other(format!("\"{}\" already has a mask", l.name))); + } + l.mask = Some(Mask::new(bg)); + s.target = StackTarget::Mask; + Ok(()) + })?; + Ok(Value::Null) +} + +fn add_color_mask(s: &mut Session, p: &Value) -> Result { + let color = color_param(p, "color").unwrap_or([1.0, 0.0, 0.0]); + let tolerance = f32p(p, "tolerance").unwrap_or(0.1).clamp(0.0, 1.0); + with_mask(s, p, "mask.add.colorSelection", "Add mask with color selection", |s, id| { + let eid = s.doc.project.alloc_id(); + let l = s.doc.project.layer_mut(s.doc.project.mask_owner(id))?; + let m = l.mask.get_or_insert_with(|| Mask::new(MaskBackground::Black)); + m.effects.push(Effect::new(eid, EffectKind::ColorSelection { colors: vec![color], tolerance })); + Ok(()) + })?; + Ok(Value::Null) +} + +/// The mask layer `id` draws with (an instance's source's unless it has its own). +fn mask_of(s: &mut Session, id: LayerId) -> Result<&mut Mask> { + let l = s.doc.project.layer_mut(s.doc.project.mask_owner(id))?; + let name = l.name.clone(); + l.mask.as_mut().ok_or_else(|| EngineError::Other(format!("\"{name}\" has no mask"))) +} + +fn toggle(s: &mut Session, p: &Value) -> Result { + let on = with_mask(s, p, "mask.toggle", "Toggle mask", |s, id| { + let m = mask_of(s, id)?; + m.enabled = boolp(p, "enabled").unwrap_or(!m.enabled); + Ok(m.enabled) + })?; + Ok(json!({ "enabled": on })) +} + +fn invert_background(s: &mut Session, p: &Value) -> Result { + with_mask(s, p, "mask.invertBackground", "Invert mask background", |s, id| { + let m = mask_of(s, id)?; + m.background = if m.background == MaskBackground::White { MaskBackground::Black } else { MaskBackground::White }; + Ok(()) + })?; + Ok(Value::Null) +} + +fn invert(s: &mut Session, p: &Value) -> Result { + with_mask(s, p, "mask.invert", "Invert mask", |s, id| { + let eid = s.doc.project.alloc_id(); + let m = mask_of(s, id)?; + // Inverting twice cancels out. + if m.effects.last().is_some_and(|e| matches!(e.kind, EffectKind::Filter(Filter::Invert))) { + m.effects.pop(); + } else { + m.effects.push(Effect::new(eid, EffectKind::Filter(Filter::Invert))); + } + Ok(()) + })?; + Ok(Value::Null) +} + +fn clear(s: &mut Session, p: &Value) -> Result { + with_mask(s, p, "mask.clear", "Clear mask", |s, id| { + let m = mask_of(s, id)?; + let ids: Vec = m.effects.drain(..).map(|e| e.id).collect(); + for e in ids { + s.doc.pixels.masks.remove(&e); + } + Ok(()) + })?; + Ok(Value::Null) +} + +fn remove(s: &mut Session, p: &Value) -> Result { + with_mask(s, p, "mask.remove", "Remove mask", |s, id| { + let m = s.doc.project.layer_mut(s.doc.project.mask_owner(id))?.mask.take().ok_or_else(|| EngineError::Other("the layer has no mask".into()))?; + for e in m.effects { + s.doc.pixels.masks.remove(&e.id); + } + s.target = StackTarget::Content; + Ok(()) + })?; + Ok(Value::Null) +} + +/// Whether `effect.add.*` targets the layer content (`target: "content"`) or its mask (the +/// default). +fn content_target(p: &Value, cmd: &str) -> Result { + match strp(p, "target") { + None | Some("mask") => Ok(false), + Some("content") => Ok(true), + Some(other) => Err(bad(cmd, format!("unknown target `{other}`: use content or mask"))), + } +} + +/// A valid `name` param. +fn name_param(p: &Value) -> Option<&str> { + strp(p, "name").filter(|n| !n.trim().is_empty() && n.chars().count() <= 256) +} + +/// Add an effect to the selected layer's mask (creating a mask if there is none) or, with +/// `target: "content"` or a content-only effect, to its content stack. +fn push_effect(s: &mut Session, p: &Value, kind: EffectKind, blend: BlendMode) -> Result { + let content = kind.content_only() == Some(true) || content_target(p, "effect.add")?; + if kind.content_only().is_some_and(|c| c != content) { + return Err(bad("effect.add", format!("{} effects go on masks, not on layer content", kind.name()))); + } + let label = format!("Add {}", kind.name().to_ascii_lowercase()); + let eid = with_mask(s, p, "effect.add", &label, |s, id| { + let eid = s.doc.project.alloc_id(); + // An instance's content and (unless it has its own) mask belong to its source. + let id = if content { s.doc.project.content_layer(id).map_or(id, |l| l.id) } else { s.doc.project.mask_owner(id) }; + let l = s.doc.project.layer_mut(id)?; + let bg = if matches!(kind, EffectKind::Generator(_) | EffectKind::Fill { .. }) { MaskBackground::Black } else { MaskBackground::White }; + let mut e = Effect::new(eid, kind); + e.blend = blend; + if let Some(n) = name_param(p) { + e.name = n.to_string(); + } + if !content { + l.mask.get_or_insert_with(|| Mask::new(bg)).effects.push(e); + } else if l.is_group() { + return Err(EngineError::Other(format!("\"{}\" is a folder: content effects go on paint and fill layers", l.name))); + } else { + l.content_effects.push(e); + } + s.target = StackTarget::Effect(eid); + Ok(eid) + })?; + Ok(json!({ "effect": eid.0 })) +} + +/// A source reading anchor point `anchor` for layer `reader`: the anchor must sit on a layer +/// below the reader in the same texture set (the compositor walks bottom → top). +pub(crate) fn anchor_source(s: &Session, cmd: &str, reader: LayerId, anchor: LayerId, channel: Channel) -> Result { + let owner = match s.doc.project.effect(anchor) { + Some((owner, e)) if matches!(e.kind, EffectKind::Anchor) => owner, + _ => return Err(bad(cmd, format!("{} is not an anchor point", anchor.0))), + }; + let (ts, _, _) = s.doc.project.locate(reader).ok_or_else(|| bad(cmd, "layer not in a stack"))?; + let order: Vec = s.doc.project.walk(ts).into_iter().map(|(id, _)| id).collect(); + let pos = |id: LayerId| order.iter().position(|x| *x == id); + match (pos(owner), pos(reader)) { + (Some(o), Some(r)) if o < r => Ok(Source::Anchor { anchor, channel }), + _ => Err(bad(cmd, "the anchor point must be on a layer below this one in the same texture set")), + } +} + +fn add_fill(s: &mut Session, p: &Value) -> Result { + let projection = projection_from(p, "effect.add.fill")?; + let blend = blend_param("effect.add.fill", p, "blend")?.unwrap_or(BlendMode::Normal); + let id = layer_param(s, "effect.add.fill", p)?; + if content_target(p, "effect.add.fill")? { + let mut fill = crate::layer_cmds::fill_from(p); + if fill.sources.is_empty() { + fill.sources = s.doc.project.layer(id)?.channels.keys().map(|c| (*c, Source::uniform_of(*c))).collect(); + } + fill.projection = projection; + return push_effect(s, p, EffectKind::Material(fill), blend); + } + if let Some(a) = u64p(p, "anchor") { + let channel = channel_param("effect.add.fill", p, "anchorChannel")?.unwrap_or(Channel::Height); + let source = anchor_source(s, "effect.add.fill", id, LayerId(a), channel)?; + return push_effect(s, p, EffectKind::Fill { source, projection }, blend); + } + let source = match strp(p, "procedural") { + Some(k) => { + let kind = ProceduralKind::parse(k).ok_or_else(|| bad("effect.add.fill", format!("unknown procedural `{k}`")))?; + let mut pr = Procedural::new(kind); + if let Some(v) = f32p(p, "scale") { + pr.scale = v.clamp(0.001, 1000.0); + } + if let Some(v) = u64p(p, "seed") { + pr.seed = v as u32; + } + Source::Procedural { pattern: pr, low: [0.0; 3], high: [1.0; 3] } + } + None => Source::Uniform([f32p(p, "value").unwrap_or(1.0).clamp(0.0, 1.0); 3]), + }; + push_effect(s, p, EffectKind::Fill { source, projection }, blend) +} + +fn generator_from(p: &Value, g: &mut Generator) { + if let Some(v) = f32p(p, "level") { + g.level = v.clamp(0.0, 1.0); + } + if let Some(v) = f32p(p, "softness") { + g.softness = v.clamp(0.0, 1.0); + } + if let Some(v) = f32p(p, "noise") { + g.noise_amount = v.clamp(0.0, 2.0); + } + if let Some(v) = f32p(p, "noiseScale") { + g.noise_scale = v.clamp(0.01, 1000.0); + } + if let Some(v) = u64p(p, "seed") { + g.seed = v as u32; + } + if let Some(v) = boolp(p, "invert") { + g.invert = v; + } + if let Some(d) = color_param(p, "direction") { + g.direction = d; + } +} + +fn add_generator(s: &mut Session, p: &Value) -> Result { + let kind = match strp(p, "generator") { + Some(k) => GeneratorKind::parse(k).ok_or_else(|| bad("effect.add.generator", format!("unknown generator `{k}`")))?, + None => GeneratorKind::EdgeWear, + }; + let mut g = Generator::new(kind); + generator_from(p, &mut g); + let blend = blend_param("effect.add.generator", p, "blend")?.unwrap_or(BlendMode::Normal); + push_effect(s, p, EffectKind::Generator(g), blend) +} + +fn levels_from(p: &Value, l: &mut Levels) { + for (k, slot) in [("inLow", &mut l.in_low), ("inHigh", &mut l.in_high), ("gamma", &mut l.gamma), ("outLow", &mut l.out_low), ("outHigh", &mut l.out_high)] { + if let Some(v) = f32p(p, k) { + *slot = if k == "gamma" { v.clamp(0.01, 10.0) } else { v.clamp(0.0, 1.0) }; + } + } +} + +fn add_levels(s: &mut Session, p: &Value) -> Result { + let mut l = Levels::default(); + levels_from(p, &mut l); + push_effect(s, p, EffectKind::Levels(l), BlendMode::Normal) +} + +fn add_filter(s: &mut Session, p: &Value) -> Result { + let f = match strp(p, "filter").unwrap_or("invert") { + "invert" => Filter::Invert, + "threshold" => Filter::Threshold { level: f32p(p, "level").unwrap_or(0.5).clamp(0.0, 1.0) }, + "blur" => Filter::Blur { radius: f32p(p, "radius").unwrap_or(2.0).clamp(0.0, 64.0) }, + "sharpen" => Filter::Sharpen { amount: f32p(p, "amount").unwrap_or(1.0).clamp(0.0, 10.0) }, + "hsl" => { + let mut f = Filter::Hsl { hue: 0.0, saturation: 0.0, lightness: 0.0 }; + hsl_from(p, &mut f); + f + } + other => return Err(bad("effect.add.filter", format!("unknown filter `{other}`"))), + }; + push_effect(s, p, EffectKind::Filter(f), BlendMode::Normal) +} + +fn hsl_from(p: &Value, f: &mut Filter) { + if let Filter::Hsl { hue, saturation, lightness } = f { + for (k, slot) in [("hue", hue), ("saturation", saturation), ("lightness", lightness)] { + if let Some(v) = f32p(p, k) { + *slot = v.clamp(-1.0, 1.0); + } + } + } +} + +fn add_compare(s: &mut Session, p: &Value) -> Result { + let op = match strp(p, "op").unwrap_or("greater") { + "lesser" | "less" => CompareOp::LesserThan, + "within" => CompareOp::WithinTolerance, + "greater" => CompareOp::GreaterThan, + other => return Err(bad("effect.add.compare", format!("unknown op `{other}`"))), + }; + let kind = + EffectKind::Compare { op, value: f32p(p, "value").unwrap_or(0.5).clamp(0.0, 1.0), tolerance: f32p(p, "tolerance").unwrap_or(0.1).clamp(0.0, 1.0) }; + push_effect(s, p, kind, BlendMode::Normal) +} + +fn effect_id(p: &Value, cmd: &str) -> Result { + u64p(p, "effect").map(LayerId).ok_or_else(|| bad(cmd, "`effect` id is required")) +} + +fn set(s: &mut Session, p: &Value) -> Result { + let eid = effect_id(p, "effect.set")?; + let blend = blend_param("effect.set", p, "blend")?; + // A fill reading an anchor: `anchor` picks the anchor point, `anchorChannel` alone + // re-targets the current one. + let anchor = match s.doc.project.effect(eid) { + Some((owner, Effect { kind: EffectKind::Fill { source, .. }, .. })) => { + let (current, channel) = match source { + Source::Anchor { anchor, channel } => (Some(*anchor), *channel), + _ => (None, Channel::Height), + }; + let channel_param = channel_param("effect.set", p, "anchorChannel")?; + match u64p(p, "anchor").map(LayerId).or(current.filter(|_| channel_param.is_some())) { + Some(a) => Some(anchor_source(s, "effect.set", owner, a, channel_param.unwrap_or(channel))?), + None => None, + } + } + _ => None, + }; + s.edit("Edit effect", |s| { + let e = s.doc.project.effect_mut(eid).ok_or_else(|| bad("effect.set", format!("no effect {}", eid.0)))?; + if let Some(v) = boolp(p, "visible") { + e.visible = v; + } + if let Some(b) = blend { + e.blend = b; + } + if let Some(o) = f32p(p, "opacity") { + e.opacity = o.clamp(0.0, 1.0); + } + if let Some(n) = name_param(p) { + e.name = n.to_string(); + } + match &mut e.kind { + EffectKind::Generator(g) => generator_from(p, g), + EffectKind::Levels(l) => levels_from(p, l), + EffectKind::Filter(f @ Filter::Hsl { .. }) => hsl_from(p, f), + EffectKind::Fill { source, .. } => { + if let Some(a) = anchor { + *source = a; + } else if let Some(x) = f32p(p, "value") + && matches!(source, Source::Uniform(_) | Source::Anchor { .. }) + { + *source = Source::Uniform([x.clamp(0.0, 1.0); 3]); + } + } + EffectKind::Filter(Filter::Threshold { level }) => { + if let Some(x) = f32p(p, "level") { + *level = x.clamp(0.0, 1.0); + } + } + EffectKind::Filter(Filter::Blur { radius }) => { + if let Some(x) = f32p(p, "radius") { + *radius = x.clamp(0.0, 256.0); + } + } + EffectKind::Filter(Filter::Sharpen { amount }) => { + if let Some(x) = f32p(p, "amount") { + *amount = x.clamp(0.0, 10.0); + } + } + EffectKind::ColorSelection { tolerance, .. } | EffectKind::Compare { tolerance, .. } => { + if let Some(x) = f32p(p, "tolerance") { + *tolerance = x.clamp(0.0, 1.0); + } + } + _ => {} + } + Ok(()) + })?; + Ok(Value::Null) +} + +fn remove_effect(s: &mut Session, p: &Value) -> Result { + let eid = effect_id(p, "effect.remove")?; + s.edit("Remove effect", |s| { + let content = match s.doc.project.effect(eid) { + Some((owner, _)) => s.doc.project.layer(owner)?.content_effects.iter().any(|e| e.id == eid), + None => return Err(bad("effect.remove", format!("no effect {}", eid.0))), + }; + for l in s.doc.project.layers.values_mut() { + for list in l.mask.iter_mut().map(|m| &mut m.effects).chain(std::iter::once(&mut l.content_effects)) { + list.retain(|e| e.id != eid); + } + } + s.doc.pixels.masks.remove(&eid); + s.doc.pixels.layers.retain(|(id, _), _| *id != eid); + if s.target == StackTarget::Effect(eid) { + s.target = if content { StackTarget::Content } else { StackTarget::Mask }; + } + Ok(()) + })?; + Ok(Value::Null) +} diff --git a/crates/engine/src/material_lib.rs b/crates/engine/src/material_lib.rs new file mode 100644 index 00000000..f3d4b3bd --- /dev/null +++ b/crates/engine/src/material_lib.rs @@ -0,0 +1,142 @@ +//! User smart materials: a layer (or folder) saved with its pixels and images as a `.tcmat` file +//! (the `.tcraft` container holding a one-texture-set project), and added back above the +//! selection in any project. + +use std::collections::BTreeMap; +use std::sync::Arc; + +use serde_json::Value; +use texturecraft_compose::PixelStore; +use texturecraft_core::{EffectKind, LayerId, LayerKind, Project, Source, TextureSet}; + +use crate::commands::{CommandSpec, always, has_layer}; +use crate::session::{Document, StackTarget}; +use crate::{EngineError, Result, Session, cmd}; + +/// Smart material file extension. +pub const SMART_MATERIAL_EXT: &str = "tcmat"; + +pub fn specs() -> Vec { + vec![ + cmd!("material.save", "Create smart material", ["Layers"], None, "{layer?, path: .tcmat file, name?}", has_layer, save), + cmd!("material.load", "Add smart material from file", [], None, "{path: .tcmat file}", always, load), + ] +} + +fn fe(e: texturecraft_formats::FormatError) -> EngineError { + EngineError::Other(e.to_string()) +} + +/// Image resources a layer subtree uses (fill sources and fill effects). +pub(crate) fn images_used(p: &Project, id: LayerId, out: &mut Vec, depth: usize) { + if depth > texturecraft_core::project::MAX_DEPTH { + return; + } + let Some(l) = p.layers.get(&id) else { return }; + if let LayerKind::Fill(f) = &l.kind { + for s in f.sources.values() { + if let Source::Image { name } = s { + out.push(name.clone()); + } + } + } + for e in l.mask.iter().flat_map(|m| m.effects.iter()) { + if let EffectKind::Fill { source: Source::Image { name }, .. } = &e.kind { + out.push(name.clone()); + } + } + for c in l.children() { + images_used(p, *c, out, depth + 1); + } +} + +impl Session { + /// Serialize layer `id` (with children, pixels and images) as a smart material file. + pub fn smart_material_bytes(&self, id: LayerId, name: &str) -> Result> { + let (ts, _, _) = self.doc.project.locate(id).ok_or_else(|| EngineError::Other("layer not in a stack".into()))?; + let src_set = self.doc.project.texture_set(ts)?; + let mut project = Project::new(name, "builtin:none"); + let mut set = TextureSet::new(name, 0, src_set.resolution); + set.channels = src_set.channels.clone(); + project.texture_sets.push(set); + let mut mini = Document { project, pixels: PixelStore::default(), baked: BTreeMap::new(), resources: BTreeMap::new() }; + let new = crate::layer_ops::copy_tree(&self.doc, id, &mut mini, 0, None, false, 0)?; + if let Ok(l) = mini.project.layer_mut(new) { + l.name = name.to_string(); + } + let mut used = Vec::new(); + images_used(&mini.project, new, &mut used, 0); + let resources = used.iter().filter_map(|n| self.doc.resources.get(n).map(|b| (n.clone(), b.as_ref().clone()))).collect(); + let pf = texturecraft_formats::ProjectFile { + project: mini.project, + pixels: mini.pixels, + baked: BTreeMap::new(), + mesh: None, + high_poly: Vec::new(), + cage: None, + thumbnail: None, + resources, + }; + texturecraft_formats::save_project_bytes(&pf).map_err(fe) + } + + /// Add a smart material file above the selection (one undo step). Returns the new layer. + pub fn add_smart_material_bytes(&mut self, bytes: &[u8]) -> Result { + let pf = texturecraft_formats::load_project_bytes(bytes).map_err(fe)?; + let root = pf.project.texture_sets.first().and_then(|t| t.stack.last().copied()).ok_or_else(|| EngineError::Other("the smart material file has no layer".into()))?; + let resources: BTreeMap>> = pf.resources.into_iter().map(|(k, v)| (k, Arc::new(v))).collect(); + let src = Document { project: pf.project, pixels: pf.pixels, baked: BTreeMap::new(), resources: resources.clone() }; + let id = self.edit("Add smart material", |s| { + for (k, v) in &resources { + s.doc.resources.entry(k.clone()).or_insert_with(|| v.clone()); + } + let ts = s.ts(); + let sel = s.selected_layer(); + let inside = sel.and_then(|l| s.doc.project.layer(l).ok()).is_some_and(|l| l.is_group()); + let id = crate::layer_ops::copy_tree(&src, root, &mut s.doc, ts, sel, inside, 0)?; + s.selected.insert(ts, id); + s.target = StackTarget::Content; + Ok(id) + })?; + self.sync_images(); + Ok(id) + } +} + +#[cfg(not(target_arch = "wasm32"))] +use crate::commands::{bad, layer_param, strp}; +#[cfg(not(target_arch = "wasm32"))] +use serde_json::json; + +#[cfg(not(target_arch = "wasm32"))] +fn save(s: &mut Session, p: &Value) -> Result { + let id = layer_param(s, "material.save", p)?; + let path = strp(p, "path").ok_or_else(|| bad("material.save", "`path` is required"))?; + let name = strp(p, "name").map(str::to_string).unwrap_or_else(|| s.doc.project.layer(id).map(|l| l.name.clone()).unwrap_or_default()); + let bytes = s.smart_material_bytes(id, &name)?; + let path = if path.ends_with(&format!(".{SMART_MATERIAL_EXT}")) { path.to_string() } else { format!("{path}.{SMART_MATERIAL_EXT}") }; + if let Some(dir) = std::path::Path::new(&path).parent().filter(|d| !d.as_os_str().is_empty()) { + std::fs::create_dir_all(dir).map_err(|e| bad("material.save", format!("cannot create {}: {e}", dir.display())))?; + } + let tmp = format!("{path}.tmp"); + std::fs::write(&tmp, bytes).and_then(|_| std::fs::rename(&tmp, &path)).map_err(|e| bad("material.save", format!("cannot write {path}: {e}")))?; + Ok(json!({ "path": path })) +} + +#[cfg(not(target_arch = "wasm32"))] +fn load(s: &mut Session, p: &Value) -> Result { + let path = strp(p, "path").ok_or_else(|| bad("material.load", "`path` is required"))?; + let bytes = std::fs::read(path).map_err(|e| bad("material.load", format!("cannot read {path}: {e}")))?; + let id = s.add_smart_material_bytes(&bytes)?; + Ok(json!({ "layer": id.0 })) +} + +#[cfg(target_arch = "wasm32")] +fn save(_: &mut Session, _: &Value) -> Result { + Err(EngineError::Other("file paths are not available in the browser".into())) +} + +#[cfg(target_arch = "wasm32")] +fn load(_: &mut Session, _: &Value) -> Result { + Err(EngineError::Other("file paths are not available in the browser".into())) +} diff --git a/crates/engine/src/materials.rs b/crates/engine/src/materials.rs new file mode 100644 index 00000000..2a1997b7 --- /dev/null +++ b/crates/engine/src/materials.rs @@ -0,0 +1,579 @@ +//! Built-in materials and smart materials: fill layers (and folders of fill layers with +//! mesh-map-driven masks), all procedural (no bitmap assets), so they are original to +//! TextureCraft and work at any resolution. +//! +//! Values follow physically based conventions: metals are metallic 1 with base colors from +//! published measured reflectance (F0) tables; dielectrics are metallic 0 with linear albedo +//! between about 0.02 (charcoal, rubber) and 0.9 (fresh snow). + +use texturecraft_core::{ + BlendMode, Channel, ChannelBlend, EffectKind, Fill, GeneratorKind, Layer, LayerId, LayerKind, MaskBackground, Procedural, ProceduralKind, Project, + Projection, Source, +}; + +use crate::smart_masks::{build_mask, directional, generator, pattern}; +use crate::{EngineError, Result, Session}; + +/// One material in the shelf: id, label, category, and a representative color/metal/roughness. +pub struct SmartMaterial { + pub id: &'static str, + pub label: &'static str, + /// Shelf group ("Metal", "Wood", …). + pub category: &'static str, + pub base: [f32; 3], + pub metallic: f32, + pub roughness: f32, + /// True for multi-layer "smart" materials (worn, dirty…), false for simple materials. + pub smart: bool, +} + +const fn m(id: &'static str, label: &'static str, category: &'static str, base: [f32; 3], metallic: f32, roughness: f32) -> SmartMaterial { + SmartMaterial { id, label, category, base, metallic, roughness, smart: false } +} + +const fn sm(id: &'static str, label: &'static str, category: &'static str, base: [f32; 3], metallic: f32, roughness: f32) -> SmartMaterial { + SmartMaterial { id, label, category, base, metallic, roughness, smart: true } +} + +const METAL: &str = "Metal"; +const WOOD: &str = "Wood"; +const STONE: &str = "Stone & Masonry"; +const PLASTIC: &str = "Plastic & Rubber"; +const FABRIC: &str = "Fabric & Leather"; +const GLASS: &str = "Ceramic & Glass"; + +pub const MATERIALS: &[SmartMaterial] = &[ + // Metals (base color = measured F0, linear). + m("steel", "Steel", METAL, [0.56, 0.57, 0.58], 1.0, 0.34), + m("steel_stainless", "Steel Stainless", METAL, [0.65, 0.64, 0.62], 1.0, 0.24), + m("steel_dark", "Steel Dark", METAL, [0.48, 0.48, 0.5], 1.0, 0.3), + m("iron", "Iron Raw", METAL, [0.53, 0.53, 0.54], 1.0, 0.5), + m("cast_iron", "Cast Iron", METAL, [0.48, 0.48, 0.48], 1.0, 0.65), + m("copper", "Copper", METAL, [0.955, 0.638, 0.538], 1.0, 0.26), + m("copper_hammered", "Copper Hammered", METAL, [0.92, 0.6, 0.5], 1.0, 0.3), + m("brass", "Brass", METAL, [0.91, 0.778, 0.423], 1.0, 0.27), + m("bronze", "Bronze", METAL, [0.8, 0.56, 0.32], 1.0, 0.36), + m("gold_polished", "Gold Polished", METAL, [1.0, 0.766, 0.336], 1.0, 0.17), + m("silver", "Silver", METAL, [0.972, 0.96, 0.915], 1.0, 0.22), + m("aluminium", "Aluminium Raw", METAL, [0.913, 0.922, 0.924], 1.0, 0.42), + m("aluminium_brushed", "Aluminium Brushed", METAL, [0.913, 0.922, 0.924], 1.0, 0.32), + m("chrome", "Chrome", METAL, [0.55, 0.556, 0.554], 1.0, 0.05), + m("titanium", "Titanium", METAL, [0.542, 0.497, 0.449], 1.0, 0.32), + m("nickel", "Nickel", METAL, [0.66, 0.609, 0.526], 1.0, 0.25), + m("galvanized", "Steel Galvanized", METAL, [0.69, 0.71, 0.72], 1.0, 0.4), + // Woods. + m("wood", "Wood Varnished", WOOD, [0.29, 0.15, 0.06], 0.0, 0.26), + m("wood_oak", "Oak", WOOD, [0.33, 0.2, 0.09], 0.0, 0.62), + m("wood_walnut", "Walnut", WOOD, [0.12, 0.06, 0.03], 0.0, 0.5), + m("wood_pine", "Pine", WOOD, [0.52, 0.33, 0.16], 0.0, 0.65), + m("plywood", "Plywood", WOOD, [0.55, 0.38, 0.21], 0.0, 0.75), + m("wood_painted", "Wood Painted", WOOD, [0.61, 0.59, 0.54], 0.0, 0.48), + // Stone, masonry and earth. + m("concrete", "Concrete", STONE, [0.27, 0.26, 0.25], 0.0, 0.9), + m("brick", "Brick Red", STONE, [0.3, 0.075, 0.04], 0.0, 0.85), + m("tiles_ceramic", "Tiles Ceramic", STONE, [0.8, 0.8, 0.78], 0.0, 0.1), + m("marble", "Marble", STONE, [0.78, 0.78, 0.76], 0.0, 0.14), + m("marble_black", "Marble Black", STONE, [0.03, 0.03, 0.032], 0.0, 0.1), + m("granite", "Granite", STONE, [0.3, 0.27, 0.25], 0.0, 0.3), + m("asphalt", "Asphalt", STONE, [0.06, 0.06, 0.058], 0.0, 0.9), + m("clay", "Clay Earthenware", STONE, [0.45, 0.18, 0.09], 0.0, 0.8), + // Plastics, rubber, composites. + m("plastic_glossy", "Plastic Glossy", PLASTIC, [0.8, 0.12, 0.08], 0.0, 0.16), + m("plastic_matte", "Plastic Matte", PLASTIC, [0.18, 0.18, 0.19], 0.0, 0.6), + m("plastic_textured", "Plastic Textured", PLASTIC, [0.035, 0.035, 0.04], 0.0, 0.55), + m("rubber", "Rubber", PLASTIC, [0.03, 0.03, 0.03], 0.0, 0.88), + m("carbon_fiber", "Carbon Fiber", PLASTIC, [0.035, 0.035, 0.04], 0.0, 0.15), + // Fabric and leather. + m("fabric", "Fabric Cotton", FABRIC, [0.45, 0.47, 0.54], 0.0, 0.95), + m("denim", "Denim", FABRIC, [0.06, 0.09, 0.19], 0.0, 0.92), + m("leather", "Leather", FABRIC, [0.17, 0.08, 0.04], 0.0, 0.52), + m("leather_black", "Leather Black", FABRIC, [0.025, 0.025, 0.028], 0.0, 0.42), + // Ceramic and glass. + m("ceramic", "Ceramic White", GLASS, [0.8, 0.8, 0.78], 0.0, 0.08), + m("glass", "Glass Clear", GLASS, [0.02, 0.022, 0.022], 0.0, 0.03), + m("glass_frosted", "Glass Frosted", GLASS, [0.6, 0.64, 0.64], 0.0, 0.45), + // Smart materials. + sm("steel_painted_worn", "Steel Painted Worn", METAL, [0.42, 0.06, 0.04], 0.2, 0.45), + sm("steel_painted_rust", "Steel Painted Rust Leaks", METAL, [0.62, 0.62, 0.6], 0.1, 0.5), + sm("military_paint", "Military Paint", METAL, [0.07, 0.08, 0.035], 0.1, 0.6), + sm("iron_rusted", "Iron Rusted", METAL, [0.38, 0.14, 0.05], 0.3, 0.8), + sm("aluminium_scratched", "Aluminium Scratched", METAL, [0.913, 0.922, 0.924], 1.0, 0.3), + sm("copper_patina", "Copper Oxidized", METAL, [0.6, 0.45, 0.35], 0.6, 0.5), + sm("bronze_statue", "Bronze Statue", METAL, [0.35, 0.4, 0.3], 0.5, 0.6), + sm("brass_tarnished", "Brass Tarnished", METAL, [0.7, 0.58, 0.3], 0.8, 0.4), + sm("gold_dirty", "Gold Dirty", METAL, [0.9, 0.68, 0.3], 0.9, 0.3), + sm("chrome_smudged", "Chrome Smudged", METAL, [0.55, 0.556, 0.554], 1.0, 0.12), + sm("wood_weathered", "Wood Weathered", WOOD, [0.33, 0.3, 0.27], 0.0, 0.8), + sm("wood_chipped_paint", "Wood Chipped Paint", WOOD, [0.04, 0.22, 0.22], 0.0, 0.55), + sm("concrete_dirty", "Concrete Dirty", STONE, [0.28, 0.26, 0.23], 0.0, 0.92), + sm("brick_mossy", "Brick Mossy", STONE, [0.22, 0.12, 0.05], 0.0, 0.9), + sm("plastic_dusty", "Plastic Dusty", PLASTIC, [0.05, 0.2, 0.45], 0.0, 0.4), + sm("plastic_scuffed", "Plastic Scuffed", PLASTIC, [0.06, 0.06, 0.065], 0.0, 0.5), + sm("leather_worn", "Leather Worn", FABRIC, [0.22, 0.12, 0.07], 0.0, 0.5), +]; + +fn norm(x: &str) -> String { + x.to_ascii_lowercase().replace([' ', '_', '-'], "") +} + +pub fn find(id: &str) -> Option<&'static SmartMaterial> { + MATERIALS.iter().find(|m| norm(m.id) == norm(id) || norm(m.label) == norm(id)) +} + +fn u(v: f32) -> Source { + Source::Uniform([v; 3]) +} + +fn rgb(c: [f32; 3]) -> Source { + Source::Uniform(c) +} + +fn pat(kind: ProceduralKind, scale: f32, seed: u32, contrast: f32, low: [f32; 3], high: [f32; 3]) -> Source { + Source::Procedural { pattern: Procedural { kind, scale, seed, contrast, balance: 0.0, invert: false }, low, high } +} + +/// A scalar pattern between `lo` and `hi`. +fn gray(kind: ProceduralKind, scale: f32, seed: u32, lo: f32, hi: f32) -> Source { + pat(kind, scale, seed, 1.0, [lo; 3], [hi; 3]) +} + +type Sources = Vec<(Channel, Source)>; + +fn surface(base: Source, metallic: f32, rough: Source) -> Sources { + vec![(Channel::BaseColor, base), (Channel::Metallic, u(metallic)), (Channel::Roughness, rough)] +} + +fn metal(base: Source, rough: Source) -> Sources { + surface(base, 1.0, rough) +} + +fn dielectric(base: Source, rough: Source) -> Sources { + surface(base, 0.0, rough) +} + +/// `sources` plus `extra` channels (height, opacity…). +fn plus(mut sources: Sources, extra: impl IntoIterator) -> Sources { + sources.extend(extra); + sources +} + +fn height(s: Source) -> [(Channel, Source); 1] { + [(Channel::Height, s)] +} + +pub(crate) struct Builder<'a> { + pub p: &'a mut Project, + /// Channels of the target texture set; layers only enable these. + pub channels: Vec, +} + +impl Builder<'_> { + fn fill(&mut self, name: &str, sources: Sources) -> Layer { + let id = self.p.alloc_id(); + let enabled: Vec = sources.iter().map(|(c, _)| *c).filter(|c| self.channels.contains(c)).collect(); + let projection = Projection::Triplanar { scale: 1.0, sharpness: 8.0, offset: [0.0; 3] }; + Layer::new(id, name, LayerKind::Fill(Fill { sources: sources.into_iter().collect(), projection }), &enabled) + } + + /// A fill masked by smart mask preset `mask` (inverted: present where the preset is not). + fn preset(&mut self, name: &str, sources: Sources, mask: &str, invert: bool) -> Result { + let mut l = self.fill(name, sources); + l.mask = Some(crate::smart_masks::mask(self.p, mask, invert)?); + Ok(l) + } + + /// A fill with a custom black-background mask. + fn masked(&mut self, name: &str, sources: Sources, effects: Vec<(EffectKind, BlendMode)>) -> Layer { + let mut l = self.fill(name, sources); + l.mask = Some(build_mask(self.p, MaskBackground::Black, effects)); + l + } + + /// The common grime layer: dark dirt settled in cavities. + fn dirt(&mut self, color: [f32; 3]) -> Result { + self.preset("Dirt", dielectric(rgb(color), u(0.9)), "dirt_cavities", false) + } +} + +/// Layers (bottom → top) making up material `id`. +pub(crate) fn build(b: &mut Builder, id: &str) -> Result> { + use BlendMode::{Lighten, Multiply, Normal}; + use Channel::*; + use GeneratorKind as G; + use ProceduralKind as P; + let m = find(id).ok_or_else(|| EngineError::Other(format!("unknown material `{id}`")))?; + let one = |b: &mut Builder, s: Sources| -> Result> { Ok(vec![b.fill(m.label, s)]) }; + // A simple metal: subtle cloudy tone and roughness variation around the table values. + let plain_metal = |b: &mut Builder, rough: Source| { + let lo = m.base.map(|v| v * 0.94); + one(b, metal(pat(P::Clouds, 3.0, 5, 1.0, lo, m.base), rough)) + }; + let r = m.roughness; + let clouds_rough = |seed: u32| gray(P::Clouds, 6.0, seed, r * 0.85, (r * 1.2).min(1.0)); + match m.id { + // ---- Metals ------------------------------------------------------------------------- + "steel" | "steel_dark" | "iron" | "copper" | "brass" | "bronze" | "gold_polished" | "silver" | "aluminium" | "chrome" | "nickel" => { + plain_metal(b, clouds_rough(7)) + } + "steel_stainless" | "aluminium_brushed" | "titanium" => plain_metal(b, gray(P::Brushed, 3.0, 3, r * 0.75, r * 1.25)), + "cast_iron" => one( + b, + plus(metal(pat(P::Noise, 1.0, 4, 1.0, [0.44; 3], [0.52; 3]), gray(P::Grunge, 3.0, 9, 0.55, 0.75)), height(gray(P::Pores, 14.0, 3, -0.02, 0.0))), + ), + "copper_hammered" => one( + b, + plus( + metal(pat(P::Hammered, 6.0, 1, 1.0, [0.86, 0.55, 0.45], [0.955, 0.638, 0.538]), gray(P::Hammered, 6.0, 1, 0.38, 0.24)), + height(gray(P::Hammered, 6.0, 1, -0.04, 0.0)), + ), + ), + "galvanized" => one(b, metal(pat(P::Voronoi, 10.0, 4, 1.0, [0.6, 0.62, 0.63], [0.78, 0.8, 0.81]), gray(P::Voronoi, 10.0, 4, 0.5, 0.28))), + // ---- Woods (grain along X, rings across Y) --------------------------------------------- + "wood" => one( + b, + plus(dielectric(pat(P::Wood, 2.0, 7, 1.0, [0.12, 0.05, 0.018], [0.42, 0.22, 0.09]), clouds_rough(3)), height(gray(P::Wood, 2.0, 7, -0.004, 0.0))), + ), + "wood_oak" => one( + b, + plus( + dielectric(pat(P::Wood, 2.0, 7, 1.0, [0.2, 0.11, 0.045], [0.46, 0.29, 0.14]), gray(P::Wood, 2.0, 7, 0.74, 0.56)), + height(gray(P::Wood, 2.0, 7, -0.012, 0.0)), + ), + ), + "wood_walnut" => one( + b, + plus( + dielectric(pat(P::Wood, 2.5, 21, 1.0, [0.05, 0.025, 0.012], [0.2, 0.1, 0.05]), gray(P::Wood, 2.5, 21, 0.56, 0.46)), + height(gray(P::Wood, 2.5, 21, -0.008, 0.0)), + ), + ), + "wood_pine" => one( + b, + plus( + dielectric(pat(P::Wood, 1.5, 4, 1.0, [0.33, 0.17, 0.065], [0.7, 0.48, 0.25]), gray(P::Wood, 1.5, 4, 0.72, 0.62)), + height(gray(P::Wood, 1.5, 4, -0.012, 0.0)), + ), + ), + "plywood" => one(b, dielectric(pat(P::Wood, 1.2, 15, 0.6, [0.42, 0.27, 0.13], [0.66, 0.47, 0.27]), gray(P::Wood, 1.2, 15, 0.8, 0.7))), + "wood_painted" => one( + b, + plus( + dielectric(pat(P::Clouds, 3.0, 4, 1.0, [0.57, 0.55, 0.5], [0.64, 0.62, 0.57]), gray(P::Wood, 2.0, 7, 0.56, 0.42)), + height(gray(P::Wood, 2.0, 7, -0.015, 0.0)), + ), + ), + // ---- Stone, masonry, earth ---------------------------------------------------------- + "concrete" => one( + b, + plus( + dielectric(pat(P::Clouds, 6.0, 4, 1.3, [0.2, 0.19, 0.18], [0.35, 0.34, 0.32]), gray(P::Noise, 1.0, 6, 0.85, 0.95)), + height(gray(P::Pores, 14.0, 6, -0.03, 0.0)), + ), + ), + "brick" => one( + b, + plus( + dielectric(pat(P::Bricks, 3.0, 4, 1.0, [0.27, 0.26, 0.24], [0.3, 0.075, 0.04]), gray(P::Bricks, 3.0, 4, 0.95, 0.82)), + height(gray(P::Bricks, 3.0, 4, -0.04, 0.0)), + ), + ), + "tiles_ceramic" => one( + b, + plus( + dielectric(pat(P::Tiles, 4.0, 2, 1.0, [0.33, 0.32, 0.3], [0.82, 0.82, 0.8]), gray(P::Tiles, 4.0, 2, 0.85, 0.08)), + height(gray(P::Tiles, 4.0, 2, -0.03, 0.0)), + ), + ), + "marble" => one(b, dielectric(pat(P::Marble, 2.0, 12, 1.0, [0.38, 0.38, 0.37], [0.86, 0.86, 0.84]), clouds_rough(12))), + "marble_black" => one(b, dielectric(pat(P::Marble, 2.0, 5, 1.0, [0.55, 0.55, 0.53], [0.015, 0.015, 0.017]), clouds_rough(5))), + "granite" => one(b, dielectric(pat(P::Voronoi, 70.0, 8, 1.0, [0.1, 0.095, 0.09], [0.5, 0.47, 0.45]), gray(P::Voronoi, 70.0, 8, 0.25, 0.35))), + "asphalt" => one( + b, + plus( + dielectric(pat(P::Voronoi, 90.0, 3, 1.0, [0.025; 3], [0.11, 0.105, 0.1]), gray(P::Voronoi, 90.0, 3, 0.95, 0.75)), + height(gray(P::Pores, 10.0, 5, -0.02, 0.0)), + ), + ), + "clay" => one( + b, + plus(dielectric(pat(P::Clouds, 5.0, 2, 1.0, [0.4, 0.15, 0.07], [0.5, 0.21, 0.11]), clouds_rough(2)), height(gray(P::Noise, 0.8, 3, -0.005, 0.005))), + ), + // ---- Plastics, rubber, composites --------------------------------------------------- + "plastic_glossy" | "plastic_matte" | "ceramic" => one(b, dielectric(rgb(m.base), clouds_rough(9))), + "plastic_textured" => one(b, plus(dielectric(rgb(m.base), gray(P::Leather, 40.0, 5, 0.66, 0.5)), height(gray(P::Leather, 40.0, 5, -0.01, 0.0)))), + "rubber" => one(b, dielectric(pat(P::Noise, 0.5, 3, 1.0, [0.025; 3], [0.035; 3]), gray(P::Noise, 0.5, 3, 0.84, 0.94))), + "carbon_fiber" => { + one(b, plus(dielectric(pat(P::Weave, 24.0, 1, 1.0, [0.01, 0.01, 0.012], [0.06, 0.06, 0.065]), u(r)), height(gray(P::Weave, 24.0, 1, 0.0, 0.006)))) + } + // ---- Fabric and leather ------------------------------------------------------------- + "fabric" => { + one(b, plus(dielectric(pat(P::Weave, 18.0, 2, 1.0, [0.27, 0.29, 0.34], [0.6, 0.62, 0.7]), u(r)), height(gray(P::Weave, 18.0, 2, -0.01, 0.0)))) + } + "denim" => { + one(b, plus(dielectric(pat(P::Weave, 22.0, 5, 1.0, [0.02, 0.03, 0.08], [0.12, 0.16, 0.3]), u(r)), height(gray(P::Weave, 22.0, 5, -0.01, 0.0)))) + } + "leather" => one( + b, + plus( + dielectric(pat(P::Leather, 42.0, 2, 1.0, [0.07, 0.03, 0.013], [0.25, 0.12, 0.06]), gray(P::Leather, 42.0, 2, 0.62, 0.46)), + height(gray(P::Leather, 42.0, 2, -0.02, 0.0)), + ), + ), + "leather_black" => one( + b, + plus( + dielectric(pat(P::Leather, 42.0, 6, 1.0, [0.01; 3], [0.04, 0.04, 0.045]), gray(P::Leather, 42.0, 6, 0.52, 0.36)), + height(gray(P::Leather, 42.0, 6, -0.02, 0.0)), + ), + ), + // ---- Glass (opaque approximation; uses Opacity when the texture set has it) ------------ + "glass" => one(b, plus(dielectric(rgb(m.base), u(r)), [(Opacity, u(0.2))])), + "glass_frosted" => one(b, plus(dielectric(rgb(m.base), gray(P::Noise, 1.0, 2, 0.4, 0.5)), [(Opacity, u(0.6))])), + // ---- Smart materials ---------------------------------------------------------------- + "steel_painted_worn" => { + let mut v = build(b, "steel")?; + v.push(b.preset("Paint", plus(dielectric(rgb(m.base), gray(P::Clouds, 3.0, 9, 0.38, 0.55)), height(u(0.004))), "edge_chipped", true)?); + v.push(b.dirt([0.12, 0.09, 0.06])?); + Ok(v) + } + "steel_painted_rust" => { + let mut v = build(b, "steel")?; + v.push(b.preset( + "Paint", + plus(dielectric(pat(P::Clouds, 4.0, 3, 1.0, [0.58, 0.58, 0.56], [0.66, 0.66, 0.64]), u(0.45)), height(u(0.004))), + "edge_wear", + true, + )?); + v.push(b.preset("Rust leaks", dielectric(pat(P::Grunge, 4.0, 2, 1.0, [0.1, 0.03, 0.01], [0.24, 0.08, 0.025]), u(0.85)), "rust_leaks", false)?); + Ok(v) + } + "military_paint" => { + let mut v = build(b, "steel_dark")?; + v.push(b.preset( + "Olive drab", + plus(dielectric(pat(P::Clouds, 3.0, 6, 1.0, [0.06, 0.07, 0.03], [0.085, 0.095, 0.042]), u(0.62)), height(u(0.004))), + "edge_chipped", + true, + )?); + v.push(b.dirt([0.06, 0.05, 0.035])?); + v.push(b.preset("Dust", dielectric(rgb([0.36, 0.31, 0.23]), u(0.95)), "dust_top", false)?); + Ok(v) + } + "iron_rusted" => { + let mut v = build(b, "cast_iron")?; + let rust = + plus(dielectric(pat(P::Grunge, 5.0, 3, 0.8, [0.045, 0.018, 0.008], [0.14, 0.05, 0.018]), u(0.88)), height(gray(P::Noise, 1.0, 1, 0.0, 0.04))); + v.push(b.masked("Rust", rust, vec![(pattern(P::Grunge, 2.0, 8, 1.2), Normal), (generator(G::Dirt, 0.5, 0.25, 0.3), Lighten)])); + v.push(b.preset("Rust leaks", dielectric(rgb([0.11, 0.04, 0.014]), u(0.8)), "rust_leaks", false)?); + Ok(v) + } + "aluminium_scratched" => { + let mut v = build(b, "aluminium_brushed")?; + v.push(b.preset("Polished edges", metal(rgb([0.95, 0.95, 0.95]), u(0.14)), "edge_wear", false)?); + v.push(b.preset("Scratches", plus(metal(rgb([0.95, 0.95, 0.95]), u(0.12)), height(u(-0.006))), "scratches", false)?); + Ok(v) + } + "copper_patina" => { + let mut v = build(b, "copper")?; + v.push(b.preset("Tarnish", dielectric(pat(P::Clouds, 4.0, 2, 1.0, [0.18, 0.07, 0.04], [0.3, 0.13, 0.07]), u(0.6)), "grunge", false)?); + let patina = plus(dielectric(pat(P::Clouds, 4.0, 11, 1.4, [0.15, 0.38, 0.32], [0.33, 0.6, 0.5]), u(0.85)), height(u(0.02))); + v.push(b.masked("Patina", patina, vec![(generator(G::Dirt, 0.65, 0.25, 0.6), Normal), (pattern(P::Streaks, 3.0, 9, 1.0), Lighten)])); + Ok(v) + } + "bronze_statue" => { + let mut v = build(b, "bronze")?; + v.push(b.preset("Dark oxide", dielectric(pat(P::Clouds, 4.0, 5, 1.0, [0.05, 0.035, 0.02], [0.12, 0.08, 0.04]), u(0.6)), "grunge", false)?); + v.push(b.preset( + "Verdigris", + plus(dielectric(pat(P::Clouds, 5.0, 8, 1.3, [0.1, 0.3, 0.24], [0.25, 0.5, 0.42]), u(0.88)), height(u(0.015))), + "rust_leaks", + false, + )?); + Ok(v) + } + "brass_tarnished" => { + let mut v = build(b, "brass")?; + v.push(b.masked( + "Tarnish", + dielectric(pat(P::Clouds, 4.0, 4, 1.0, [0.08, 0.06, 0.025], [0.16, 0.12, 0.05]), u(0.7)), + vec![(generator(G::Dirt, 0.6, 0.25, 0.5), Normal), (pattern(P::Grunge, 2.5, 3, 0.9), Lighten)], + )); + v.push(b.preset("Fingerprints", metal(rgb([0.8, 0.68, 0.37]), u(0.45)), "fingerprints", false)?); + Ok(v) + } + "gold_dirty" => { + let mut v = build(b, "gold_polished")?; + v.push(b.preset("Smudges", metal(rgb([0.85, 0.64, 0.28]), u(0.4)), "fingerprints", false)?); + v.push(b.dirt([0.06, 0.045, 0.03])?); + Ok(v) + } + "chrome_smudged" => { + let mut v = build(b, "chrome")?; + v.push(b.preset("Smudges", metal(rgb([0.5, 0.505, 0.5]), u(0.3)), "fingerprints", false)?); + v.push(b.preset("Dust", dielectric(rgb([0.5, 0.48, 0.45]), u(0.9)), "dust_top", false)?); + Ok(v) + } + "wood_weathered" => { + let mut v = build(b, "wood_pine")?; + let gray_wood = + plus(dielectric(pat(P::Wood, 1.5, 4, 1.0, [0.17, 0.16, 0.14], [0.42, 0.4, 0.37]), u(0.85)), height(gray(P::Wood, 1.5, 4, -0.03, 0.0))); + v.push(b.masked( + "Weathered", + gray_wood, + vec![(pattern(P::Grunge, 2.0, 15, 0.8), Normal), (directional(G::Direction, [0.0, 1.0, 0.0], 0.45, 0.2, 0.4, false), Lighten)], + )); + v.push(b.dirt([0.05, 0.04, 0.03])?); + Ok(v) + } + "wood_chipped_paint" => { + let mut v = build(b, "wood_oak")?; + v.push(b.preset( + "Paint", + plus(dielectric(pat(P::Clouds, 3.0, 2, 1.0, [0.035, 0.19, 0.19], [0.05, 0.25, 0.25]), u(0.55)), height(u(0.01))), + "paint_chips", + true, + )?); + v.push(b.dirt([0.05, 0.04, 0.03])?); + Ok(v) + } + "concrete_dirty" => { + let mut v = build(b, "concrete")?; + v.push(b.preset("Water stains", dielectric(rgb([0.13, 0.13, 0.12]), u(0.9)), "rust_leaks", false)?); + v.push(b.dirt([0.08, 0.065, 0.05])?); + v.push(b.preset("Ground mud", dielectric(rgb([0.12, 0.09, 0.06]), u(0.95)), "ground_dirt", false)?); + Ok(v) + } + "brick_mossy" => { + let mut v = build(b, "brick")?; + v.push(b.preset("Grime", dielectric(rgb([0.07, 0.06, 0.05]), u(0.95)), "ground_dirt", false)?); + let moss = plus(dielectric(pat(P::Noise, 1.0, 7, 1.0, [0.02, 0.035, 0.008], [0.05, 0.075, 0.015]), u(0.95)), height(u(0.02))); + v.push(b.masked( + "Moss", + moss, + vec![ + (directional(G::Direction, [0.0, 1.0, 0.0], 0.45, 0.15, 0.3, false), Normal), + (pattern(P::Grunge, 2.0, 5, 1.0), Multiply), + (generator(G::Dirt, 0.4, 0.2, 0.5), Lighten), + ], + )); + Ok(v) + } + "plastic_dusty" => { + let mut v = one(b, dielectric(rgb(m.base), u(0.35)))?; + v.push(b.preset("Dust", dielectric(rgb([0.5, 0.46, 0.4]), u(0.95)), "dust_top", false)?); + v.push(b.dirt([0.1, 0.09, 0.08])?); + Ok(v) + } + "plastic_scuffed" => { + let mut v = one(b, dielectric(rgb(m.base), gray(P::Leather, 40.0, 5, 0.45, 0.35)))?; + v.push(b.preset("Scuffed edges", dielectric(rgb([0.2, 0.2, 0.21]), u(0.7)), "edge_wear", false)?); + v.push(b.preset("Scratches", dielectric(rgb([0.14, 0.14, 0.15]), u(0.6)), "scratches", false)?); + Ok(v) + } + "leather_worn" => { + let mut v = build(b, "leather")?; + v.push(b.preset("Worn", dielectric(rgb([0.3, 0.18, 0.1]), u(0.36)), "edge_wear", false)?); + v.push(b.dirt([0.035, 0.022, 0.014])?); + Ok(v) + } + other => Err(EngineError::Other(format!("material `{other}` has no definition"))), + } +} + +/// Add material `id` above the selection: a single fill layer, or a folder for multi-layer +/// materials. Returns the new top-level layer id. +pub fn apply(s: &mut Session, id: &str) -> Result { + let m = find(id).ok_or_else(|| EngineError::Other(format!("unknown material `{id}`")))?; + let label = format!("Add {}", m.label); + s.edit(&label, |s| { + let channels = s.doc.project.texture_set(s.ts())?.channel_list(); + let layers = build(&mut Builder { p: &mut s.doc.project, channels: channels.clone() }, m.id)?; + if layers.len() == 1 { + let l = layers.into_iter().next().ok_or_else(|| EngineError::Other("empty material".into()))?; + return crate::layer_cmds::insert_selected(s, l); + } + let gid = s.doc.project.alloc_id(); + let mut group = Layer::new(gid, m.label, LayerKind::Group { children: Vec::new(), collapsed: false }, &channels); + for c in group.channels.values_mut() { + *c = ChannelBlend { mode: BlendMode::Passthrough, opacity: 1.0 }; + } + let gid = crate::layer_cmds::insert_selected(s, group)?; + let ts = s.ts(); + for l in layers { + s.doc.project.insert_layer(ts, l, Some(gid), true)?; + } + s.selected.insert(ts, gid); + Ok(gid) + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ids_and_labels_are_unique_and_values_physical() { + let (mut ids, mut labels) = (std::collections::BTreeSet::new(), std::collections::BTreeSet::new()); + for m in MATERIALS { + assert!(ids.insert(norm(m.id)), "duplicate id {}", m.id); + assert!(labels.insert(norm(m.label)), "duplicate label {}", m.label); + assert_eq!(find(m.label).map(|f| f.id), Some(m.id)); + if !m.smart { + // Metals: measured F0 is at least ~0.45 in some channel; dielectrics: 0.01..0.9. + let hi = m.base.iter().copied().fold(0.0, f32::max); + if m.metallic == 1.0 { + assert!(hi >= 0.45, "{} too dark for a metal", m.id); + } else { + assert_eq!(m.metallic, 0.0, "{} must be metal or dielectric", m.id); + assert!(m.base.iter().all(|v| (0.01..=0.9).contains(v)), "{} albedo out of range", m.id); + } + } + } + assert!(MATERIALS.iter().filter(|m| !m.smart).count() >= 40); + assert!(MATERIALS.iter().filter(|m| m.smart).count() >= 15); + assert!(find("Gold Polished").is_some()); + assert!(find("nope").is_none()); + } + + /// Base color, roughness and metallic at a grid of texels of texture set `ts`. + fn snapshot(s: &Session, ts: usize) -> Vec<[f32; 3]> { + let c = &s.caches[ts].composite; + let n = c.resolution; + (0..n) + .step_by(3) + .flat_map(|y| (0..n).step_by(3).map(move |x| (x, y))) + .flat_map(|(x, y)| [Channel::BaseColor, Channel::Roughness, Channel::Metallic].map(|ch| c.value(ch, x, y))) + .collect() + } + + #[test] + fn every_material_and_smart_mask_applies_on_the_sample() { + let mut s = crate::sample_session(256, 256).unwrap(); + // A baseline no material matches, so every material must visibly change the composite. + crate::execute(&mut s, "layer.add.fill", &serde_json::json!({"color": [1.0, 0.0, 1.0], "roughness": 0.123})).unwrap(); + s.update(); + let before = snapshot(&s, 0); + for m in MATERIALS { + apply(&mut s, m.id).unwrap_or_else(|e| panic!("{}: {e}", m.id)); + s.doc.project.validate().unwrap(); + s.update(); + let after = snapshot(&s, 0); + assert!(after.iter().flatten().all(|v| v.is_finite() && (-1.0..=1.0).contains(v)), "{} produced invalid values", m.id); + assert_ne!(after, before, "{} changed nothing", m.id); + s.undo().unwrap(); + } + assert!(apply(&mut s, "nope").is_err()); + // Smart masks on the pedestal: it has edges and cavities (the ball is a plain sphere). + s.active_set = 1; + apply(&mut s, "gold_polished").unwrap(); + let layer = s.selected_layer().unwrap(); + for sm in crate::smart_masks::SMART_MASKS { + crate::smart_masks::apply(&mut s, layer, sm.id).unwrap(); + s.update(); + let view = s.mask_view_rgba(layer, 64).unwrap(); + assert!(view.chunks(4).any(|px| px[0] > 0), "{} is empty", sm.id); + assert!(snapshot(&s, 1).iter().flatten().all(|v| v.is_finite()), "{}", sm.id); + } + assert!(crate::smart_masks::apply(&mut s, layer, "nope").is_err()); + } +} diff --git a/crates/engine/src/painting.rs b/crates/engine/src/painting.rs new file mode 100644 index 00000000..75e3b63e --- /dev/null +++ b/crates/engine/src/painting.rs @@ -0,0 +1,511 @@ +//! Interactive painting on the session: strokes (begin / continue / end / cancel), polygon fill +//! and the color picker. The UI, CLI and agents all go through these. + +use std::collections::{BTreeMap, BTreeSet}; + +use texturecraft_compose::PaintTarget; +use texturecraft_core::{Channel, Effect, EffectKind, LayerId, LayerKind, Mask, MaskBackground}; +use texturecraft_geom::glam::Vec2; +use texturecraft_paint::{ + CommitSource, EyeDepth, PickCtx, Pickup, PickupMode, RasterCtx, Shape, Stroke, StrokeCanvas, SurfaceHit, commit_layer, commit_mask, fill_triangles, pick, + rasterize, +}; + +use crate::session::{ActiveStroke, FillMode, Session, StackTarget, Tool}; +use crate::{EngineError, Result}; + +impl Session { + pub fn pick(&self, screen: Vec2, viewport: Vec2) -> Option { + let ctx = PickCtx { mesh: &self.mesh, bvh: &self.bvh, camera: &self.camera, viewport }; + pick(&ctx, screen) + } + + /// Resolve what a stroke on the selected layer paints into, creating the mask paint effect + /// when painting a mask. Must run inside the stroke's history snapshot. + fn paint_target(&mut self) -> Result { + let id = self.selected_layer().ok_or_else(|| EngineError::Other("select a layer to paint on".into()))?; + // Painting an instance paints its source (its own mask when it overrides the mask). + let p = &self.doc.project; + let id = if self.target == StackTarget::Mask { p.mask_owner(id) } else { p.content_layer(id).map_or(id, |l| l.id) }; + match self.target { + StackTarget::Content => { + let l = self.doc.project.layer(id)?; + if matches!(l.kind, LayerKind::Paint) { + Ok(PaintTarget::Layer(id)) + } else { + Err(EngineError::Other(format!("\"{}\" is a {} layer: paint on a paint layer or on its mask", l.name, l.kind.name()))) + } + } + StackTarget::Effect(e) => match self.doc.project.effect(e) { + // Content paint effects hold channel pixels like a paint layer. + Some((owner, eff)) if matches!(eff.kind, EffectKind::Paint) => { + let content = self.doc.project.layer(owner)?.content_effects.iter().any(|x| x.id == e); + Ok(if content { PaintTarget::Layer(e) } else { PaintTarget::Mask(e) }) + } + _ => Err(EngineError::Other("the selected effect is not a paint effect".into())), + }, + StackTarget::Mask => { + let eid = self.doc.project.alloc_id(); + let layer = self.doc.project.layer_mut(id)?; + let mask = layer.mask.get_or_insert_with(|| Mask::new(MaskBackground::Black)); + if let Some(top) = mask.effects.last().filter(|e| matches!(e.kind, EffectKind::Paint)) { + return Ok(PaintTarget::Mask(top.id)); + } + mask.effects.push(Effect::new(eid, EffectKind::Paint)); + Ok(PaintTarget::Mask(eid)) + } + } + } + + fn stroke_values(&self, target: PaintTarget) -> BTreeMap { + let ts = self.ts(); + let Ok(set) = self.doc.project.texture_set(ts) else { return BTreeMap::new() }; + let layer_channels = match target { + // A content paint effect paints its owner layer's channels. + PaintTarget::Layer(id) => { + let owner = self.doc.project.effect(id).map(|(owner, _)| owner).unwrap_or(id); + self.doc.project.layer(owner).map(|l| l.channels.keys().copied().collect::>()).unwrap_or_default() + } + PaintTarget::Mask(_) => BTreeSet::new(), + }; + self.tool + .values + .iter() + .filter(|(c, _)| self.tool.enabled.contains(c) && set.has_channel(**c) && layer_channels.contains(c)) + .map(|(c, v)| (*c, *v)) + .collect() + } + + /// Common setup of 3D and 2D strokes. `first_uv` is where the stroke starts on the mesh + /// (the Clone tool's destination anchor). + fn start_stroke(&mut self, viewport: Vec2, uv_mode: bool, first_uv: Option) -> Result<()> { + let tool = self.tool.tool; + let erase = tool == Tool::Eraser; + let quick_mask = self.quick_mask.editing; + let ts = self.ts(); + let res = self.caches.get(ts).map(|c| c.resolution).unwrap_or(1024); + let pickup = if quick_mask { None } else { self.pickup_mode(first_uv)? }; + if pickup.is_some() { + // Clone and smudge read the composite: bring it up to date first. + self.update(); + } + let before = self.doc.clone(); + let target = if quick_mask { + None + } else { + match self.paint_target() { + Ok(t) => Some(t), + Err(e) => { + self.doc = before; + return Err(e); + } + } + }; + let values = target.map(|t| self.stroke_values(t)).unwrap_or_default(); + let stencil = if tool == Tool::Projection && !quick_mask { self.capture_stencil(viewport) } else { None }; + let problem = if !erase && values.is_empty() && matches!(target, Some(PaintTarget::Layer(_))) { + Some("no channel enabled to paint: enable channels in the tool's material") + } else if pickup.is_some() && matches!(target, Some(PaintTarget::Mask(_))) { + Some("the Clone and Smudge tools paint layer content: select the layer instead of its mask") + } else if tool == Tool::Projection && !quick_mask && stencil.is_none() && !uv_mode { + Some("the Projection tool needs a stencil: pick an image in the tool properties (tool.stencil)") + } else { + None + }; + if let Some(msg) = problem { + self.doc = before; + return Err(EngineError::Other(msg.into())); + } + let depth = (!uv_mode).then(|| EyeDepth::render(&self.mesh, &self.camera, (viewport.x / 2.0).max(64.0) as u32, (viewport.y / 2.0).max(64.0) as u32)); + let mut brush = self.tool.brush.clone(); + if tool == Tool::Smudge { + // shortcut: smudge drags one stamp trail; mirrored trails would need one pickup each. + brush.symmetry = Default::default(); + } + let stroke = Stroke::new(&brush, &self.mesh); + let mut canvas = StrokeCanvas::new(res); + if !quick_mask { + canvas.limit = self.stroke_limit(ts, res); + } + if let Some((mode, offset)) = pickup + && let Some(cache) = self.caches.get(ts) + { + let r = res as f32; + let mode = match mode { + PickupMode::Clone { .. } => PickupMode::Clone { offset: [(offset[0] * r).round() as i64, (offset[1] * r).round() as i64] }, + m => m, + }; + canvas.pickup = Some(Pickup::new(mode, cache.composite.clone(), cache.gbuf.clone(), values.keys().copied())); + if tool == Tool::Clone + && let Some(src) = self.tool.clone_source.as_mut() + { + src.offset.get_or_insert(offset); + } + } + let label = if quick_mask { + "Quick mask stroke" + } else if erase { + "Eraser stroke" + } else if matches!(target, Some(PaintTarget::Mask(_))) { + "Mask stroke" + } else { + "Paint stroke" + }; + self.stroke = Some(ActiveStroke { + ts, + target, + stroke, + canvas, + depth, + uv: uv_mode.then_some((None, 0.0)), + camera: self.camera, + viewport, + values, + erase, + stencil, + before, + label: label.to_string(), + }); + Ok(()) + } + + /// Clone / smudge pickup for the current tool, with the clone offset (source minus + /// destination) in texture coordinates. + fn pickup_mode(&self, first_uv: Option) -> Result> { + match self.tool.tool { + Tool::Smudge => Ok(Some((PickupMode::Smudge { strength: self.tool.smudge_strength }, [0.0; 2]))), + Tool::Clone => { + let src = + self.tool.clone_source.ok_or_else(|| EngineError::Other("set a clone source first: V + click on the mesh (tool.cloneSource)".into()))?; + let offset = match (src.offset, first_uv) { + (Some(o), _) => o, + (None, Some(p)) => [src.uv[0] - p.x, src.uv[1] - p.y], + (None, None) => return Err(EngineError::Other("start the clone stroke on the mesh".into())), + }; + Ok(Some((PickupMode::Clone { offset: [0; 2] }, offset))) + } + _ => Ok(None), + } + } + + /// The brush shape: the alpha image when one is set and loaded, else the procedural alpha. + fn shape<'a>(images: &'a texturecraft_compose::ImageStore, b: &texturecraft_paint::BrushSettings) -> Shape<'a> { + Shape { alpha: b.alpha, image: b.alpha_image.as_ref().and_then(|n| images.get(n)).map(|i| &**i) } + } + + /// The stencil placed for the current camera and viewport. + fn capture_stencil(&self, viewport: Vec2) -> Option { + let st = self.tool.stencil.as_ref()?; + let image = self.images.get(&st.image)?.clone(); + let aspect = viewport.x.max(1.0) / viewport.y.max(1.0); + let (center, half, rotation) = st.placement(image.width as f32 / image.height.max(1) as f32, aspect); + Some(texturecraft_compose::Stencil { image, view_proj: self.camera.view_proj(aspect), center, half, rotation, tile: st.tile }) + } + + /// Start a stroke at `screen` (viewport pixels). Returns false when the cursor misses the + /// mesh (the stroke starts anyway and resumes when the cursor enters the mesh). + pub fn begin_stroke(&mut self, screen: Vec2, viewport: Vec2, pressure: f32) -> Result { + self.cancel_stroke(); + match self.tool.tool { + Tool::PolygonFill => return self.polygon_fill(screen, viewport).map(|_| true), + Tool::ColorPicker => return self.color_pick(screen, viewport).map(|_| true), + _ => {} + } + let first_uv = if self.tool.tool == Tool::Clone { self.pick(screen, viewport).map(|h| h.uv) } else { None }; + self.start_stroke(viewport, false, first_uv)?; + Ok(self.continue_stroke(screen, pressure)) + } + + /// Start a stroke in the 2D view at texture coordinate `uv`. + pub fn begin_stroke_uv(&mut self, uv: Vec2, pressure: f32) -> Result<()> { + self.cancel_stroke(); + if matches!(self.tool.tool, Tool::PolygonFill | Tool::ColorPicker) { + return Err(EngineError::Other("use this tool in the 3D view".into())); + } + self.start_stroke(self.viewport, true, Some(uv))?; + self.continue_stroke_uv(uv, pressure); + Ok(()) + } + + /// Add a 2D view sample (texture coordinates). Brush size is relative to the UV square. + pub fn continue_stroke_uv(&mut self, uv: Vec2, pressure: f32) { + let Some(st) = self.stroke.as_mut() else { return }; + let Some((last, carry)) = st.uv.as_mut() else { return }; + let Some(cache) = self.caches.get_mut(st.ts) else { return }; + let b = &st.stroke.settings; + let p = pressure.clamp(0.0, 1.0); + let radius = b.size * 2.0 * if p < 1.0 { b.min_size + (1.0 - b.min_size) * p } else { 1.0 }; + let step = (b.spacing * 2.0 * radius).max(1e-5); + let mut points = Vec::new(); + match *last { + None => points.push(uv), + Some(prev) => { + let seg = uv - prev; + let len = seg.length(); + let mut t = step - *carry; + while t <= len && points.len() < 4096 { + points.push(prev + seg * (t / len.max(1e-9))); + t += step; + } + *carry = len - (t - step); + } + } + // Follow path: turn the stamp with the stroke direction (y up on screen, v grows down). + let angle = match *last { + Some(prev) if b.follow_path && uv != prev => b.angle + (prev.y - uv.y).atan2(uv.x - prev.x).to_degrees() - 90.0, + _ => b.angle, + }; + *last = Some(uv); + let n0 = st.stroke.stamps.len() as u32; + let stamps: Vec = points + .iter() + .enumerate() + .map(|(i, c)| texturecraft_paint::UvStamp { center: *c, radius, angle, flow: b.flow, hardness: b.hardness, seed: n0 + i as u32 }) + .collect(); + texturecraft_paint::rasterize_uv(&mut st.canvas, &cache.gbuf, Self::shape(&self.images, b), &stamps); + let recent = std::mem::take(&mut st.canvas.recent); + let (ts, target) = (st.ts, st.target); + if target.is_some() { + self.mark_painted(ts, target, recent); + } else { + self.quick_mask.revision = self.quick_mask.revision.wrapping_add(1); + } + } + + /// Add a pointer sample to the active stroke. Returns whether it hit the mesh. + pub fn continue_stroke(&mut self, screen: Vec2, pressure: f32) -> bool { + let Some(st) = self.stroke.as_mut() else { return false }; + let Some(cache) = self.caches.get_mut(st.ts) else { return false }; + let material = self.doc.project.texture_sets.get(st.ts).map(|t| t.material).unwrap_or(0); + let ctx = PickCtx { mesh: &self.mesh, bvh: &self.bvh, camera: &st.camera, viewport: st.viewport }; + let stamps = st.stroke.add(&ctx, screen, pressure); + let hit = st.stroke.last_hit().is_some(); + if stamps.is_empty() { + return hit; + } + let rctx = RasterCtx { + mesh: &self.mesh, + bvh: &self.bvh, + gbuf: &cache.gbuf, + material, + depth: st.depth.as_ref(), + eye: st.camera.eye(), + backface_culling: st.stroke.settings.backface_culling, + angle_fade: st.stroke.settings.angle_fade, + shape: Self::shape(&self.images, &st.stroke.settings), + }; + rasterize(&mut st.canvas, &rctx, &stamps); + let recent = std::mem::take(&mut st.canvas.recent); + let (ts, target) = (st.ts, st.target); + if target.is_some() { + self.mark_painted(ts, target, recent); + } else { + self.quick_mask.revision = self.quick_mask.revision.wrapping_add(1); + } + hit + } + + pub fn stroke_active(&self) -> bool { + self.stroke.is_some() + } + + /// Commit the active stroke (one undo step). + pub fn end_stroke(&mut self) -> Result<()> { + let Some(st) = self.stroke.take() else { return Ok(()) }; + let res = self.caches.get(st.ts).map(|c| c.resolution).unwrap_or(1024); + if st.canvas.dirty.is_empty() { + // Nothing painted: drop any mask effect the stroke created. + self.doc = st.before; + return Ok(()); + } + let gbuf = self.caches.get(st.ts).map(|c| c.gbuf.clone()); + let mesh = self.mesh.clone(); + let stencil_fn = |x: u32, y: u32| -> Option<([f32; 3], f32)> { + let g = gbuf.as_ref()?; + let p = g.surface(&mesh, (y * g.width + x) as usize)?.pos; + st.stencil.as_ref()?.sample_world(p) + }; + let per_texel: Option = if st.stencil.is_some() { Some(&stencil_fn) } else { None }; + let carried = st.canvas.pickup.as_ref().map(|p| &p.values); + let src = CommitSource { alpha: &st.canvas.alpha, tiles: &st.canvas.dirty, opacity: st.stroke.settings.opacity, erase: st.erase, per_texel, carried }; + match st.target { + Some(PaintTarget::Layer(id)) => commit_layer(&mut self.doc.pixels, id, res, &st.values, src), + Some(PaintTarget::Mask(eid)) => commit_mask(&mut self.doc.pixels, eid, res, self.tool.mask_value, src), + None => { + self.commit_quick_mask(st.ts, res, src); + return Ok(()); + } + } + self.undo.push((st.label.clone(), st.before)); + if self.undo.len() > crate::session::MAX_HISTORY { + self.undo.remove(0); + } + self.redo.clear(); + self.modified = true; + self.revision = self.revision.wrapping_add(1); + self.mark_painted(st.ts, st.target, st.canvas.dirty.iter().copied()); + Ok(()) + } + + /// Abandon the active stroke (Esc). + pub fn cancel_stroke(&mut self) { + if let Some(st) = self.stroke.take() { + self.mark_painted(st.ts, st.target, st.canvas.dirty.iter().copied()); + if st.target.is_none() { + self.quick_mask.revision = self.quick_mask.revision.wrapping_add(1); + } + self.doc = st.before; + } + } + + /// Paint a whole stroke through viewport points (scripted strokes from CLI/MCP). + pub fn stroke_points(&mut self, points: &[Vec2], viewport: Vec2) -> Result { + let Some(first) = points.first() else { return Err(EngineError::Other("a stroke needs at least one point".into())) }; + self.begin_stroke(*first, viewport, 1.0)?; + let mut hits = 0; + for p in points.iter().skip(1) { + if self.continue_stroke(*p, 1.0) { + hits += 1; + } + } + let stamps = self.stroke.as_ref().map(|s| s.stroke.stamps.len()).unwrap_or(0); + self.end_stroke()?; + let _ = hits; + Ok(stamps) + } + + /// Paint a whole 2D view stroke through texture coordinates. Returns the touched tiles. + pub fn stroke_uv_points(&mut self, points: &[Vec2]) -> Result { + let Some(first) = points.first() else { return Err(EngineError::Other("a stroke needs at least one point".into())) }; + self.begin_stroke_uv(*first, 1.0)?; + for q in points.iter().skip(1) { + self.continue_stroke_uv(*q, 1.0); + } + let tiles = self.stroke_tiles(); + self.end_stroke()?; + Ok(tiles) + } + + /// Polygon fill: fill the triangle / UV island / whole mesh under `screen`. + pub fn polygon_fill(&mut self, screen: Vec2, viewport: Vec2) -> Result { + let hit = self.pick(screen, viewport).ok_or_else(|| EngineError::Other("nothing under the cursor".into()))?; + let ts = self.ts(); + let material = self.doc.project.texture_set(ts)?.material; + if hit.material != material { + return Err(EngineError::Other("that surface belongs to another texture set".into())); + } + let tris = self.fill_set(hit.tri, material); + let (gbuf, mut canvas) = self.fill_canvas(ts)?; + fill_triangles(&mut canvas, &gbuf, &tris); + self.commit_fill("Polygon fill", ts, &canvas)?; + Ok(tris.len()) + } + + /// The G-buffer of texture set `ts` and an empty canvas for a one-shot fill, limited by the + /// quick mask unless the fill edits it. + pub(crate) fn fill_canvas(&self, ts: usize) -> Result<(std::sync::Arc, StrokeCanvas)> { + let gbuf = self.caches.get(ts).map(|c| c.gbuf.clone()).ok_or_else(|| EngineError::Other("texture set not ready".into()))?; + let mut canvas = StrokeCanvas::new(gbuf.width); + if !self.quick_mask.editing { + canvas.limit = self.stroke_limit(ts, gbuf.width); + } + Ok((gbuf, canvas)) + } + + /// Commit a one-shot fill with the tool's material (one undo step), or into the quick mask. + pub(crate) fn commit_fill(&mut self, label: &str, ts: usize, canvas: &StrokeCanvas) -> Result<()> { + let res = canvas.alpha.width(); + let src = |opacity| CommitSource { alpha: &canvas.alpha, tiles: &canvas.dirty, opacity, erase: false, per_texel: None, carried: None }; + if self.quick_mask.editing { + self.commit_quick_mask(ts, res, src(self.tool.brush.opacity)); + return Ok(()); + } + self.edit(label, |s| { + let target = s.paint_target()?; + let values = s.stroke_values(target); + match target { + PaintTarget::Layer(id) => commit_layer(&mut s.doc.pixels, id, res, &values, src(s.tool.brush.opacity)), + PaintTarget::Mask(eid) => commit_mask(&mut s.doc.pixels, eid, res, s.tool.mask_value, src(s.tool.brush.opacity)), + } + Ok(()) + }) + } + + /// Triangles filled by the current fill mode starting from `tri`. + fn fill_set(&self, tri: u32, material: usize) -> BTreeSet { + let m = &self.mesh; + match self.tool.fill_mode { + FillMode::Triangle => [tri].into_iter().collect(), + FillMode::Mesh => m.triangles_of(material).map(|t| t as u32).collect(), + FillMode::UvIsland => { + // Triangles sharing vertex indices form a UV island (seams split vertices). + let mut by_vertex: BTreeMap> = BTreeMap::new(); + for t in m.triangles_of(material) { + if let Some(v) = m.tri(t) { + for i in v { + by_vertex.entry(i).or_default().push(t as u32); + } + } + } + let mut seen = BTreeSet::new(); + let mut stack = vec![tri]; + while let Some(t) = stack.pop() { + if !seen.insert(t) { + continue; + } + if let Some(v) = m.tri(t as usize) { + for i in v { + for n in by_vertex.get(&i).map(Vec::as_slice).unwrap_or(&[]) { + if !seen.contains(n) { + stack.push(*n); + } + } + } + } + } + seen + } + } + } + + /// Color picker: copy the material under the cursor into the tool's paint values. + pub fn color_pick(&mut self, screen: Vec2, viewport: Vec2) -> Result> { + let hit = self.pick(screen, viewport).ok_or_else(|| EngineError::Other("nothing under the cursor".into()))?; + let ts = self.doc.project.texture_sets.iter().position(|t| t.material == hit.material).unwrap_or(self.ts()); + let cache = self.caches.get(ts).ok_or_else(|| EngineError::Other("texture set not ready".into()))?; + let res = cache.resolution as f32; + let (x, y) = ((hit.uv.x * res).clamp(0.0, res - 1.0) as u32, (hit.uv.y * res).clamp(0.0, res - 1.0) as u32); + let mut out = BTreeMap::new(); + for c in cache.composite.channels.keys() { + let v = cache.composite.value(*c, x, y); + self.tool.values.insert(*c, v); + out.insert(*c, v); + } + Ok(out) + } + + /// The stroke canvas alpha of the active stroke (for overlays and tests). + pub fn stroke_tiles(&self) -> usize { + self.stroke.as_ref().map(|s| s.canvas.dirty.len()).unwrap_or(0) + } + + /// Where the Clone tool reads for destination `at` (texture coordinates) as a surface + /// point: the source itself until the first stroke fixes the offset, or when `at` is None. + pub fn clone_source_point(&self, at: Option) -> Option { + let src = self.tool.clone_source?; + let uv = match (src.offset, at) { + (Some(o), Some(p)) => Vec2::new(p.x + o[0], p.y + o[1]), + _ => Vec2::from(src.uv), + }; + if !((0.0..1.0).contains(&uv.x) && (0.0..1.0).contains(&uv.y)) { + return None; + } + let g = &self.caches.get(self.ts())?.gbuf; + let (x, y) = ((uv.x * g.width as f32) as usize, (uv.y * g.height as f32) as usize); + Some(g.surface(&self.mesh, y * g.width as usize + x)?.pos) + } + + pub fn selected_layer_id(&self) -> Option { + self.selected_layer() + } +} diff --git a/crates/engine/src/path_tool.rs b/crates/engine/src/path_tool.rs new file mode 100644 index 00000000..0f282e1c --- /dev/null +++ b/crates/engine/src/path_tool.rs @@ -0,0 +1,184 @@ +//! The Path tool: control points placed on the surface (3D view) or in texture space (2D view) +//! and a smooth curve through them, committed as one brush stroke, or, when closed and filled, +//! as an antialiased lasso fill of the visible surface (3D) or of the UV region (2D). + +use serde::{Deserialize, Serialize}; +use serde_json::{Value, json}; +use texturecraft_geom::glam::{Vec2, Vec3}; +use texturecraft_paint::{Lasso, fill_coverage, spline}; + +use crate::commands::{CommandSpec, always, bad, boolp}; +use crate::session::Tool; +use crate::tool_cmds::{points_param, set_tool, viewport_of}; +use crate::{EngineError, Result, Session, cmd}; + +/// Control points kept at most. +pub const MAX_PATH_POINTS: usize = 4096; +/// Curve sampling step in viewport pixels (3D view) and texture units (2D view). +const STEP_PX: f32 = 2.0; +const STEP_UV: f32 = 0.001; + +/// The curve being edited with the Path tool. +#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +pub struct PathState { + /// Control points: surface positions (3D view) or texture coordinates with z = 0 (2D view). + pub points: Vec, + /// The points are texture coordinates (placed in the 2D view). + pub uv: bool, + /// The curve loops back to its first point. + pub closed: bool, + /// A closed path fills its interior instead of stroking the curve. + pub fill: bool, +} + +impl PathState { + /// Append a control point; a point placed in the other view starts a new path. + pub fn push(&mut self, p: Vec3, uv: bool) { + if uv != self.uv { + self.points.clear(); + self.uv = uv; + } + if self.points.len() < MAX_PATH_POINTS { + self.points.push(p); + } + } +} + +pub fn specs() -> Vec { + vec![cmd!( + "tool.path", + "Path", + ["Tools"], + Some("7"), + "{points?: [[x,y],...] viewport pixels on the mesh | uvPoints?: [[u,v],...], viewport?: [w,h], closed?, fill?, commit?: bool, clear?: bool} — selects the Path tool and edits its curve; commit paints the curve with the current brush, or fills a closed, filled path", + always, + path + )] +} + +fn path(s: &mut Session, p: &Value) -> Result { + const CMD: &str = "tool.path"; + if s.tool.tool != Tool::Path { + set_tool(s, Tool::Path)?; + } + let vp = viewport_of(s, p); + if boolp(p, "clear") == Some(true) { + s.tool.path.points.clear(); + } + let placed = match (points_param(CMD, p, "points")?, points_param(CMD, p, "uvPoints")?) { + (Some(pts), _) => Some(( + pts.iter() + .enumerate() + .map(|(i, q)| s.pick(*q, vp).map(|h| h.pos).ok_or_else(|| bad(CMD, format!("point {i} misses the mesh")))) + .collect::>>()?, + false, + )), + (None, Some(pts)) => Some((pts.iter().map(|q| q.clamp(Vec2::ZERO, Vec2::ONE).extend(0.0)).collect(), true)), + (None, None) => None, + }; + if let Some((points, uv)) = placed { + if points.len() > MAX_PATH_POINTS { + return Err(bad(CMD, format!("at most {MAX_PATH_POINTS} control points"))); + } + s.tool.path.points = points; + s.tool.path.uv = uv; + } + if let Some(v) = boolp(p, "closed") { + s.tool.path.closed = v; + } + if let Some(v) = boolp(p, "fill") { + s.tool.path.fill = v; + } + s.revision = s.revision.wrapping_add(1); + let committed = if boolp(p, "commit") == Some(true) { + let r = s.commit_path(vp)?; + s.update(); + r + } else { + Value::Null + }; + let st = &s.tool.path; + Ok(json!({ "points": st.points.len(), "uv": st.uv, "closed": st.closed, "fill": st.fill, "committed": committed })) +} + +/// NDC (y up) to viewport pixels (origin top-left). +fn to_pixels(ndc: Vec2, viewport: Vec2) -> Vec2 { + Vec2::new((ndc.x * 0.5 + 0.5) * viewport.x, (0.5 - ndc.y * 0.5) * viewport.y) +} + +impl Session { + /// The path's control points in view space: viewport pixels for a 3D path (None behind the + /// camera), texture coordinates for a 2D one. + pub fn path_view_points(&self, viewport: Vec2) -> Vec> { + let path = &self.tool.path; + if path.uv { + return path.points.iter().map(|p| Some(p.truncate())).collect(); + } + let aspect = viewport.x.max(1.0) / viewport.y.max(1.0); + path.points.iter().map(|p| self.camera.project(*p, aspect).map(|n| to_pixels(n.truncate(), viewport))).collect() + } + + /// Paint the path with the current brush (or fill it when closed and filled), then clear it. + pub fn commit_path(&mut self, viewport: Vec2) -> Result { + let (uv, closed) = (self.tool.path.uv, self.tool.path.closed); + let fill = closed && self.tool.path.fill; + let pts: Vec = self.path_view_points(viewport).into_iter().flatten().collect(); + if pts.is_empty() { + return Err(EngineError::Other("the path has no points: click the surface to add some".into())); + } + if fill && pts.len() < 3 { + return Err(EngineError::Other("a filled path needs at least three points".into())); + } + let curve = spline(&pts, closed, if uv { STEP_UV } else { STEP_PX }); + let out = if fill { + json!({ "filledTiles": self.lasso_fill(curve, uv, viewport)? }) + } else if uv { + json!({ "tiles": self.stroke_uv_points(&curve)? }) + } else { + json!({ "stamps": self.stroke_points(&curve, viewport)? }) + }; + self.tool.path.points.clear(); + Ok(out) + } + + /// Fill the inside of `poly`: viewport pixels over the visible surface, or texture + /// coordinates. Returns the touched tiles. + fn lasso_fill(&mut self, poly: Vec, uv: bool, viewport: Vec2) -> Result { + let ts = self.ts(); + let (gbuf, mut canvas) = self.fill_canvas(ts)?; + let w = gbuf.width.max(1); + if uv { + let lasso = Lasso::new(poly.iter().map(|p| *p * w as f32).collect()); + fill_coverage(&mut canvas, &gbuf, |i, _| lasso.coverage(Vec2::new((i as u32 % w) as f32 + 0.5, (i as u32 / w) as f32 + 0.5))); + } else { + let lasso = Lasso::new(poly); + let view_proj = self.camera.view_proj(viewport.x.max(1.0) / viewport.y.max(1.0)); + let inv = view_proj.inverse(); + let (cull, mesh, bvh) = (self.tool.brush.backface_culling, &self.mesh, &self.bvh); + fill_coverage(&mut canvas, &gbuf, |i, _| { + let Some(s) = gbuf.surface(mesh, i) else { return 0.0 }; + let c = view_proj * s.pos.extend(1.0); + if c.w <= 1e-6 { + return 0.0; + } + let ndc = Vec2::new(c.x, c.y) / c.w; + let a = lasso.coverage(to_pixels(ndc, viewport)); + if a <= 0.0 { + return 0.0; + } + // Exact visibility (a depth buffer flickers on grazing surfaces): nothing between + // the near plane and the texel. + let o = inv * ndc.extend(0.0).extend(1.0); + let origin = o.truncate() / o.w; + let to = s.pos - origin; + let d = to.length(); + let dir = to / d.max(1e-9); + let hidden = (cull && s.nrm.dot(dir) >= 0.0) || bvh.closest(origin, dir, d * 0.999).is_some(); + if hidden { 0.0 } else { a } + }); + } + let tiles = canvas.dirty.len(); + self.commit_fill("Path fill", ts, &canvas)?; + Ok(tiles) + } +} diff --git a/crates/engine/src/preview.rs b/crates/engine/src/preview.rs new file mode 100644 index 00000000..f1ab3300 --- /dev/null +++ b/crates/engine/src/preview.rs @@ -0,0 +1,143 @@ +//! Shelf previews: built-in materials and smart masks evaluated on a unit sphere seen from +Z, +//! without a mesh or baked maps (generators that need mesh maps are approximated with world-space +//! noise). Cheap enough for lazily rendered thumbnails. + +use texturecraft_compose::pattern::{Coords, procedural, world_noise}; +use texturecraft_core::{Channel, EffectKind, Filter, Generator, GeneratorKind, LayerKind, Mask, MaskBackground, Project, Projection, Source, blend1}; +use texturecraft_geom::glam::{Vec2, Vec3}; + +use crate::materials::{Builder, build}; + +/// Linear material values of one preview pixel. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Sample { + pub base: [f32; 3], + pub metallic: f32, + pub roughness: f32, + pub height: f32, +} + +/// The view-space normal (= position on the unit sphere) of each pixel of a `size²` image, +/// row-major, None outside the sphere. +pub fn sphere_normals(size: usize) -> impl Iterator> { + let r = (size as f32 * 0.5 - 1.0).max(0.5); + (0..size * size).map(move |i| { + let (x, y) = ((i % size) as f32 + 0.5 - size as f32 * 0.5, size as f32 * 0.5 - (i / size) as f32 - 0.5); + let (dx, dy) = (x / r, y / r); + let d2 = dx * dx + dy * dy; + (d2 <= 1.0).then(|| Vec3::new(dx, dy, (1.0 - d2).max(0.0).sqrt())) + }) +} + +fn coords(n: Vec3) -> Coords { + let uv = Vec2::new(n.z.atan2(n.x) / std::f32::consts::TAU + 0.5, n.y.clamp(-1.0, 1.0).acos() / std::f32::consts::PI); + Coords { uv, pos: n, nrm: n } +} + +fn source(s: &Source, proj: &Projection, c: &Coords) -> Option<[f32; 3]> { + match s { + Source::Uniform(v) => Some(*v), + Source::Procedural { pattern, low, high } => { + let t = procedural(pattern, proj, c); + Some([0, 1, 2].map(|k| low[k] + (high[k] - low[k]) * t)) + } + _ => None, + } +} + +/// Approximate generator: mesh-map signals become world noise (a sphere has no edges or cavities). +fn generator(g: &Generator, c: &Coords) -> f32 { + let dir = Vec3::from(g.direction).try_normalize().unwrap_or(Vec3::Y); + let wear = (world_noise(c.pos, 3.0, 91) - 0.5) * 2.2; + let cavity = (world_noise(c.pos, 3.0, 57) - 0.3).clamp(0.0, 1.0) + (1.0 - c.nrm.y) * 0.1; + let s = match g.kind { + GeneratorKind::Position => c.pos.dot(dir) * 0.5 + 0.5, + GeneratorKind::Direction => c.nrm.dot(dir) * 0.5 + 0.5, + GeneratorKind::EdgeWear => wear, + GeneratorKind::Curvature => 0.5 + wear * 0.5, + GeneratorKind::AmbientOcclusion => 1.0 - cavity, + _ => cavity, + }; + // Same thresholding as the compositor. + let s = if g.noise_amount > 0.0 { s + (world_noise(c.pos, g.noise_scale, g.seed) - 0.5) * g.noise_amount } else { s }; + let soft = g.softness.max(1e-3); + let t = ((s - (1.0 - g.level.clamp(0.0, 1.0) - soft)) / (2.0 * soft)).clamp(0.0, 1.0); + let v = t * t * (3.0 - 2.0 * t); + if g.invert { 1.0 - v } else { v } +} + +fn mask(m: &Mask, c: &Coords) -> f32 { + if !m.enabled { + return 1.0; + } + let mut v = if m.background == MaskBackground::White { 1.0 } else { 0.0 }; + for e in m.effects.iter().filter(|e| e.visible) { + let val = match &e.kind { + EffectKind::Fill { source: s, projection } => source(s, projection, c).map(|x| x[0]), + EffectKind::Generator(g) => Some(generator(g, c)), + EffectKind::Levels(l) => Some(l.apply(v)), + EffectKind::Filter(Filter::Invert) => Some(1.0 - v), + _ => None, + }; + if let Some(val) = val { + let blended = if matches!(e.kind, EffectKind::Levels(_) | EffectKind::Filter(_)) { val } else { blend1(e.blend, v, val) }; + v += (blended - v) * e.opacity.clamp(0.0, 1.0); + } + } + v.clamp(0.0, 1.0) +} + +const CHANNELS: [Channel; 4] = [Channel::BaseColor, Channel::Metallic, Channel::Roughness, Channel::Height]; + +/// Preview of built-in material `id` (None for an unknown id). +pub fn material(id: &str, size: usize) -> Option>> { + let mut p = Project::new("preview", ""); + let layers = build(&mut Builder { p: &mut p, channels: CHANNELS.to_vec() }, id).ok()?; + Some( + sphere_normals(size) + .map(|n| { + let c = coords(n?); + let mut acc = CHANNELS.map(Channel::default_value); + for l in layers.iter().filter(|l| l.visible) { + let LayerKind::Fill(f) = &l.kind else { continue }; + let w = l.mask.as_ref().map_or(1.0, |m| mask(m, &c)); + for (a, ch) in acc.iter_mut().zip(CHANNELS) { + if let (Some(b), Some(v)) = (l.blend(ch), f.sources.get(&ch).and_then(|s| source(s, &f.projection, &c))) { + let t = w * b.opacity.clamp(0.0, 1.0); + *a = [0, 1, 2].map(|k| a[k] + (v[k] - a[k]) * t); + } + } + } + let [base, metal, rough, height] = acc; + Some(Sample { base, metallic: metal[0], roughness: rough[0], height: height[0] }) + }) + .collect(), + ) +} + +/// Preview of smart mask `id`: the mask value per pixel (None for an unknown id). +pub fn smart_mask(id: &str, size: usize) -> Option>> { + let (bg, fx) = crate::smart_masks::preset(id)?; + let m = crate::smart_masks::build_mask(&mut Project::new("preview", ""), bg, fx); + Some(sphere_normals(size).map(|n| n.map(|n| mask(&m, &coords(n)))).collect()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn previews_cover_the_sphere_with_finite_values() { + for m in crate::materials::MATERIALS { + let px = material(m.id, 16).unwrap_or_else(|| panic!("{}", m.id)); + let center = px[8 * 16 + 8].unwrap_or_else(|| panic!("{}", m.id)); + assert!(center.base.iter().chain([¢er.metallic, ¢er.roughness, ¢er.height]).all(|v| v.is_finite()), "{}", m.id); + assert!(px[0].is_none(), "corners are outside the sphere"); + } + for sm in crate::smart_masks::SMART_MASKS { + let px = smart_mask(sm.id, 16).unwrap_or_else(|| panic!("{}", sm.id)); + assert!(px.iter().flatten().all(|v| (0.0..=1.0).contains(v)), "{}", sm.id); + } + assert!(material("nope", 8).is_none() && smart_mask("nope", 8).is_none()); + } +} diff --git a/crates/engine/src/project_cmds.rs b/crates/engine/src/project_cmds.rs new file mode 100644 index 00000000..ebb9c58a --- /dev/null +++ b/crates/engine/src/project_cmds.rs @@ -0,0 +1,77 @@ +//! Project-level commands: new project, sample project, smart materials, inspection. + +use serde_json::{Value, json}; +use texturecraft_compose::BakedMaps; +use texturecraft_geom::primitives; + +use crate::commands::{CommandSpec, always, bad, strp, u64p}; +use crate::{Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!( + "project.new", + "New project from a built-in mesh", + [], + None, + "{mesh?: material_ball|sphere|cube|rounded_cube|cylinder|torus|plane|crate, resolution?: 1024, name?}", + always, + new + ), + cmd!("project.sample", "Open sample project", ["File"], None, "{}", always, sample), + cmd!("project.inspect", "Inspect project", [], None, "{}", always, |s, _| Ok(crate::inspect::session(s))), + cmd!("material.apply", "Add smart material", [], None, "{material: id or label}", always, material), + cmd!("material.list", "List materials", [], None, "{}", always, |_, _| Ok(json!( + crate::materials::MATERIALS.iter().map(|m| json!({"id": m.id, "label": m.label, "smart": m.smart})).collect::>() + ))), + ] +} + +fn new(s: &mut Session, p: &Value) -> Result { + let mesh_id = strp(p, "mesh").unwrap_or("material_ball"); + let mesh = primitives::builtin(mesh_id).ok_or_else(|| bad("project.new", format!("unknown built-in mesh `{mesh_id}`")))?; + let res = u64p(p, "resolution").unwrap_or(1024); + let name = strp(p, "name").unwrap_or("Untitled"); + let mut next = Session::new_project(name, mesh, &format!("builtin:{mesh_id}"), None, u32::try_from(res).unwrap_or(0))?; + next.viewport = s.viewport; + *s = next; + Ok(crate::inspect::session(s)) +} + +fn material(s: &mut Session, p: &Value) -> Result { + let id = strp(p, "material").ok_or_else(|| bad("material.apply", "`material` is required"))?; + let l = crate::materials::apply(s, id)?; + Ok(json!({ "layer": l.0 })) +} + +/// The sample project: the material ball, baked, with smart materials on both texture sets. +pub fn sample_session(resolution: u32, bake_resolution: u32) -> Result { + let mut s = Session::new_project("Material Ball", primitives::material_ball(), "builtin:material_ball", None, resolution)?; + for ts in 0..s.set_count() { + let set = s.doc.project.texture_set_mut(ts)?; + set.bake.resolution = bake_resolution; + set.bake.rays = 24; + s.bake_now(ts)?; + } + s.active_set = 1; + crate::materials::apply(&mut s, "iron_rusted")?; + s.active_set = 0; + crate::materials::apply(&mut s, "steel_painted_worn")?; + s.undo.clear(); + s.modified = false; + Ok(s) +} + +fn sample(s: &mut Session, _: &Value) -> Result { + let mut next = sample_session(2048, 1024)?; + next.viewport = s.viewport; + *s = next; + Ok(crate::inspect::session(s)) +} + +pub(crate) fn baked_json(b: Option<&BakedMaps>) -> Value { + match b { + Some(b) => json!({ "resolution": b.resolution, "maps": b.maps.keys().map(|m| m.id()).collect::>() }), + None => Value::Null, + } +} diff --git a/crates/engine/src/quick_mask.rs b/crates/engine/src/quick_mask.rs new file mode 100644 index 00000000..a063b3b8 --- /dev/null +++ b/crates/engine/src/quick_mask.rs @@ -0,0 +1,137 @@ +//! Quick mask (Painter: Y enables, U edits, Ctrl+Shift+I inverts): a temporary texel mask per +//! texture set, painted with the normal brush while editing, that limits every paint stroke +//! while enabled. Session state only: not saved and not in the undo history. + +use std::collections::BTreeMap; + +use rayon::prelude::*; +use serde_json::{Value, json}; +use texturecraft_core::Channel; +use texturecraft_paint::{CommitSource, commit_coverage}; +use texturecraft_texel::{TileImage, from_u16, srgb_lut}; + +use crate::commands::{CommandSpec, always, boolp}; +use crate::{Result, Session, cmd}; + +#[derive(Clone, Debug, Default)] +pub struct QuickMask { + /// Strokes are limited to the mask. + pub enabled: bool, + /// Strokes paint the mask instead of the layer stack. + pub editing: bool, + /// Strokes are limited to where the mask is not painted. + pub inverted: bool, + /// Painted coverage per texture set (1 component). + pub masks: BTreeMap, + /// Bumps on every change (overlay refresh). + pub revision: u64, +} + +pub fn specs() -> Vec { + vec![ + cmd!("viewport.quickMask", "Enable quick mask", ["Viewport"], Some("Y"), "{enabled?: bool} — toggles when omitted", always, enable), + cmd!( + "viewport.quickMask.edit", + "Edit quick mask", + ["Viewport"], + Some("U"), + "{editing?: bool} — toggles when omitted; editing enables the mask", + always, + edit + ), + cmd!("viewport.quickMask.invert", "Invert quick mask", ["Viewport"], Some("Ctrl+Shift+I"), "{}", always, invert), + ] +} + +fn state(s: &Session) -> Value { + let q = &s.quick_mask; + json!({ + "enabled": q.enabled, "editing": q.editing, "inverted": q.inverted, + "paintedTiles": q.masks.get(&s.ts()).map(TileImage::allocated_count).unwrap_or(0), + }) +} + +fn changed(s: &mut Session) -> Result { + s.quick_mask.revision = s.quick_mask.revision.wrapping_add(1); + s.revision = s.revision.wrapping_add(1); + Ok(state(s)) +} + +fn enable(s: &mut Session, p: &Value) -> Result { + s.quick_mask.enabled = boolp(p, "enabled").unwrap_or(!s.quick_mask.enabled); + changed(s) +} + +fn edit(s: &mut Session, p: &Value) -> Result { + s.cancel_stroke(); + let q = &mut s.quick_mask; + q.editing = boolp(p, "editing").unwrap_or(!q.editing); + q.enabled |= q.editing; + changed(s) +} + +fn invert(s: &mut Session, _: &Value) -> Result { + s.quick_mask.inverted = !s.quick_mask.inverted; + changed(s) +} + +impl Session { + /// The quick mask of texture set `ts` at resolution `res` (empty when never painted). + fn quick_mask_image(&self, ts: usize, res: u32) -> TileImage { + match self.quick_mask.masks.get(&ts) { + Some(m) if m.width() == res => m.clone(), + Some(m) => m.resampled(res, res, &[0]), + None => TileImage::new(res, res, 1), + } + } + + /// What limits a paint stroke on `ts`: the mask and whether it is inverted (None when the + /// quick mask is off or being edited). + pub(crate) fn stroke_limit(&self, ts: usize, res: u32) -> Option<(TileImage, bool)> { + let q = &self.quick_mask; + (q.enabled && !q.editing).then(|| (self.quick_mask_image(ts, res), q.inverted)) + } + + /// Commit a stroke into the quick mask of `ts`. + pub(crate) fn commit_quick_mask(&mut self, ts: usize, res: u32, src: CommitSource) { + let mut mask = self.quick_mask_image(ts, res); + commit_coverage(&mut mask, src); + self.quick_mask.masks.insert(ts, mask); + self.quick_mask.revision = self.quick_mask.revision.wrapping_add(1); + } + + /// RGBA8 overlay of texture set `ts` while editing the quick mask (`size²`, display-encoded): + /// the base color, tinted red where painting is blocked. Includes the stroke in progress. + pub fn quick_mask_rgba(&self, ts: usize, size: u32) -> Option> { + let cache = self.caches.get(ts)?; + let res = cache.resolution; + let size = size.clamp(1, res); + let mask = self.quick_mask_image(ts, res); + let live = self.stroke.as_ref().filter(|s| s.ts == ts && s.target.is_none()).map(|s| (&s.canvas.alpha, s.stroke.settings.opacity, s.erase)); + let base = cache.composite.channels.get(&Channel::BaseColor); + let lut = srgb_lut(); + let inverted = self.quick_mask.inverted; + let mut out = vec![255u8; size as usize * size as usize * 4]; + out.par_chunks_mut(size as usize * 4).enumerate().for_each(|(y, row)| { + let ty = (y as u64 * u64::from(res) / u64::from(size)) as u32; + for (x, px) in row.chunks_exact_mut(4).enumerate() { + let tx = (x as u64 * u64::from(res) / u64::from(size)) as u32; + let mut m = from_u16(mask.get(tx, ty)[0]); + if let Some((alpha, opacity, erase)) = live { + let a = from_u16(alpha.get(tx, ty)[0]) * opacity; + m = if erase { m * (1.0 - a) } else { a + m * (1.0 - a) }; + } + let blocked = if inverted { m } else { 1.0 - m }; + let raw = base.map(|b| b.get(tx, ty)).unwrap_or([32768; 4]); + let t = 0.55 * blocked; + for (k, tint) in [0.9, 0.1, 0.15].into_iter().enumerate() { + let c = f32::from(lut.get(usize::from(raw[k] >> 4)).copied().unwrap_or(0)) / 255.0; + if let Some(slot) = px.get_mut(k) { + *slot = ((c + (tint - c) * t).clamp(0.0, 1.0) * 255.0 + 0.5) as u8; + } + } + } + }); + Some(out) + } +} diff --git a/crates/engine/src/resource_cmds.rs b/crates/engine/src/resource_cmds.rs new file mode 100644 index 00000000..c7b156a7 --- /dev/null +++ b/crates/engine/src/resource_cmds.rs @@ -0,0 +1,152 @@ +//! Image resources: import (PNG, JPEG, TGA, TIFF, BMP, WEBP, EXR, HDR), list, remove, and use as +//! fill sources. + +use std::sync::Arc; + +use serde_json::{Value, json}; +use texturecraft_compose::ImageRes; +use texturecraft_core::{Channel, Fill, Layer, LayerKind, Projection, Source}; + +use crate::commands::{CommandSpec, always, bad, channel_param, strp}; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("resource.import", "Import resources", ["File"], None, "{path} — an image file (png, jpg, tga, tif, bmp, webp, exr, hdr)", always, import), + cmd!("resource.list", "List resources", [], None, "{}", always, |s, _| Ok(list(s))), + cmd!("resource.remove", "Remove resource", [], None, "{name}", always, remove), + cmd!("file.removeUnused", "Remove unused resources...", ["File"], None, "{}", always, remove_unused), + cmd!("layer.add.image", "Add fill layer from image", [], None, "{name, channel?: baseColor, projection?: uv|triplanar|planar, scale?}", always, add_image_fill), + ] +} + +/// Largest accepted resource file. +const MAX_BYTES: usize = 512 << 20; + +fn decoded(d: texturecraft_formats::DecodedImage) -> Arc { + Arc::new(ImageRes { width: d.width, height: d.height, rgba: d.rgba, srgb: d.srgb }) +} + +impl Session { + /// Add an image resource from bytes (one undo step); returns its unique, sanitized name. + pub fn import_resource_bytes(&mut self, file_name: &str, bytes: Vec) -> Result { + if bytes.len() > MAX_BYTES { + return Err(EngineError::Other(format!("{file_name} is larger than {} MB", MAX_BYTES >> 20))); + } + let image = texturecraft_formats::decode_image(&bytes).map_err(|e| EngineError::Other(format!("{file_name}: {e}")))?; + let leaf = std::path::Path::new(file_name).file_name().and_then(|n| n.to_str()).unwrap_or("image"); + let base = texturecraft_formats::sanitize_resource_name(leaf); + let mut name = base.clone(); + let mut n = 2; + while self.doc.resources.contains_key(&name) { + name = format!("{n}_{base}"); + n += 1; + } + let key = name.clone(); + self.edit("Import resource", |s| { + s.doc.resources.insert(key, Arc::new(bytes)); + Ok(()) + })?; + self.images.insert(name.clone(), decoded(image)); + Ok(name) + } + + /// Decode resources that are not decoded yet and forget removed ones (after undo, redo, load). + pub fn sync_images(&mut self) { + let keep: Vec = self.doc.resources.keys().cloned().collect(); + self.images.retain(|k, _| keep.contains(k)); + let missing: Vec<(String, Arc>)> = self.doc.resources.iter().filter(|(k, _)| !self.images.contains_key(*k)).map(|(k, v)| (k.clone(), v.clone())).collect(); + for (k, bytes) in missing { + match texturecraft_formats::decode_image(&bytes) { + Ok(d) => { + self.images.insert(k, decoded(d)); + } + Err(e) => self.log.push(format!("resource {k}: {e}")), + } + } + } +} + +fn list(s: &Session) -> Value { + json!( + s.doc + .resources + .iter() + .map(|(k, v)| { + let (w, h) = s.images.get(k).map(|i| (i.width, i.height)).unwrap_or((0, 0)); + json!({"name": k, "bytes": v.len(), "width": w, "height": h}) + }) + .collect::>() + ) +} + +#[cfg(not(target_arch = "wasm32"))] +fn import(s: &mut Session, p: &Value) -> Result { + let path = strp(p, "path").ok_or_else(|| bad("resource.import", "`path` is required"))?; + let meta = std::fs::metadata(path).map_err(|e| bad("resource.import", format!("cannot read {path}: {e}")))?; + if meta.len() > MAX_BYTES as u64 { + return Err(bad("resource.import", format!("{path} is too large"))); + } + let bytes = std::fs::read(path).map_err(|e| bad("resource.import", format!("cannot read {path}: {e}")))?; + let name = s.import_resource_bytes(path, bytes)?; + Ok(json!({ "name": name })) +} + +#[cfg(target_arch = "wasm32")] +fn import(_: &mut Session, _: &Value) -> Result { + Err(EngineError::Other("file paths are not available in the browser; use File > Import resources".into())) +} + +fn remove(s: &mut Session, p: &Value) -> Result { + let name = strp(p, "name").ok_or_else(|| bad("resource.remove", "`name` is required"))?.to_string(); + if !s.doc.resources.contains_key(&name) { + return Err(bad("resource.remove", format!("no resource `{name}`"))); + } + s.edit("Remove resource", |s| { + s.doc.resources.remove(&name); + Ok(()) + })?; + s.sync_images(); + Ok(Value::Null) +} + +/// Drop resources no layer, mask effect, the projection stencil or the environment uses (one undo +/// step). +fn remove_unused(s: &mut Session, _: &Value) -> Result { + let mut used = Vec::new(); + for set in &s.doc.project.texture_sets { + for root in &set.stack { + crate::material_lib::images_used(&s.doc.project, *root, &mut used, 0); + } + } + used.extend(s.tool.stencil.as_ref().map(|st| st.image.clone())); + used.extend(s.doc.project.display.environment_resource().map(str::to_string)); + let unused: Vec = s.doc.resources.keys().filter(|k| !used.contains(k)).cloned().collect(); + if !unused.is_empty() { + s.edit("Remove unused resources", |s| { + s.doc.resources.retain(|k, _| !unused.contains(k)); + Ok(()) + })?; + s.sync_images(); + } + Ok(json!({ "removed": unused })) +} + +fn add_image_fill(s: &mut Session, p: &Value) -> Result { + let name = strp(p, "name").ok_or_else(|| bad("layer.add.image", "`name` is required"))?.to_string(); + if !s.doc.resources.contains_key(&name) { + return Err(bad("layer.add.image", format!("no resource `{name}`"))); + } + let ch = channel_param("layer.add.image", p, "channel")?.unwrap_or(Channel::BaseColor); + let projection = if p.get("projection").is_some() { crate::layer_cmds::projection_from(p, "layer.add.image")? } else { Projection::default() }; + let ts = s.ts(); + let label = std::path::Path::new(&name).file_stem().and_then(|n| n.to_str()).unwrap_or("Image").to_string(); + let layer_name = s.doc.project.next_layer_name(ts, &label); + let id = s.edit("Add image fill", |s| { + let id = s.doc.project.alloc_id(); + let mut fill = Fill { projection, ..Fill::default() }; + fill.sources.insert(ch, Source::Image { name: name.clone() }); + crate::layer_cmds::insert_selected(s, Layer::new(id, layer_name, LayerKind::Fill(fill), &[ch])) + })?; + Ok(json!({ "layer": id.0 })) +} diff --git a/crates/engine/src/session.rs b/crates/engine/src/session.rs new file mode 100644 index 00000000..5f7ca4f8 --- /dev/null +++ b/crates/engine/src/session.rs @@ -0,0 +1,698 @@ +//! The editing session: document, mesh, per-texture-set caches, history, tool state. + +use std::collections::{BTreeMap, BTreeSet}; +use std::sync::Arc; + +use serde::{Deserialize, Serialize}; +use texturecraft_compose::{BakedMaps, BelowCache, Composite, PaintTarget, PixelStore, StackKey, StrokePreview, covered_tiles, pad_tiles}; +use texturecraft_core::{Channel, Layer, LayerId, LayerKind, Project, TextureSet}; +use texturecraft_geom::glam::Vec2; +use texturecraft_geom::{Bvh, Mesh, OrbitCamera, UvGBuffer}; +use texturecraft_paint::{BrushSettings, EyeDepth, Stroke, StrokeCanvas}; +use texturecraft_texel::DilationMap; + +use crate::{EngineError, Result}; + +/// Padding (texels) applied to composites for display. +pub const DISPLAY_PADDING: u32 = 8; +/// Undo steps kept. +pub const MAX_HISTORY: usize = 200; + +/// Everything that undo/redo restores. Pixel data is copy-on-write, so snapshots are cheap. +#[derive(Clone, Debug)] +pub struct Document { + pub project: Project, + pub pixels: PixelStore, + pub baked: BTreeMap, + /// Imported image resources by name: original file bytes. + pub resources: BTreeMap>>, +} + +/// Derived per-texture-set data (rebuilt when the mesh or resolution changes). +pub struct SetCache { + pub resolution: u32, + pub gbuf: Arc, + pub dilation: Arc, + pub covered_tiles: Arc>, + pub composite: Composite, + /// Tiles to recomposite. + pub dirty: BTreeSet<(u32, u32)>, + /// Tiles whose display textures must be re-uploaded. + pub upload: BTreeSet<(u32, u32)>, + /// Bumps on every composite change (thumbnails, exports, caches). + pub revision: u64, + /// The stack below the layer being edited, per tile (repaints skip it). + pub below: BelowCache, +} + +impl SetCache { + fn new(mesh: &Mesh, ts: &TextureSet) -> SetCache { + let res = ts.resolution; + let gbuf = UvGBuffer::new(mesh, ts.material, res, res); + let dilation = DilationMap::new(&gbuf.coverage_mask(), res, res, Some(DISPLAY_PADDING)); + let covered = covered_tiles(&gbuf); + let all: BTreeSet<(u32, u32)> = texturecraft_compose::all_tiles(res).into_iter().collect(); + SetCache { + resolution: res, + gbuf: Arc::new(gbuf), + dilation: Arc::new(dilation), + covered_tiles: Arc::new(covered), + composite: Composite::new(&ts.channel_list(), res), + dirty: all.clone(), + upload: all, + revision: 0, + below: BelowCache::default(), + } + } + + pub fn invalidate_all(&mut self) { + self.dirty.extend(self.covered_tiles.iter().copied()); + } +} + +/// Active tool. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum Tool { + #[default] + Paint, + Eraser, + Projection, + PolygonFill, + Smudge, + Clone, + ColorPicker, + /// Paint along an editable curve (or fill a closed one). + Path, +} + +impl Tool { + pub const ALL: [Tool; 8] = [Tool::Paint, Tool::Eraser, Tool::Projection, Tool::PolygonFill, Tool::Smudge, Tool::Clone, Tool::ColorPicker, Tool::Path]; + pub fn label(self) -> &'static str { + match self { + Tool::Paint => "Paint", + Tool::Eraser => "Eraser", + Tool::Projection => "Projection", + Tool::PolygonFill => "Polygon fill", + Tool::Smudge => "Smudge", + Tool::Clone => "Clone", + Tool::ColorPicker => "Color picker", + Tool::Path => "Path", + } + } + pub fn id(self) -> &'static str { + match self { + Tool::Paint => "paint", + Tool::Eraser => "eraser", + Tool::Projection => "projection", + Tool::PolygonFill => "polygonFill", + Tool::Smudge => "smudge", + Tool::Clone => "clone", + Tool::ColorPicker => "colorPicker", + Tool::Path => "path", + } + } + pub fn parse(s: &str) -> Option { + let n = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-'], ""); + Tool::ALL.into_iter().find(|t| n(t.id()) == n(s) || n(t.label()) == n(s)) + } +} + +/// What the viewport displays. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum ViewMode { + /// The lit material. + #[default] + Material, + /// One channel, unlit. + Channel(Channel), + /// A baked mesh map. + MeshMap(texturecraft_core::BakedMap), + /// UV checker (texel density and seams). + UvChecker, + /// One layer's mask, in grayscale (Painter: Alt+click a mask). + Mask(LayerId), +} + +impl ViewMode { + pub fn label(&self) -> String { + match self { + ViewMode::Material => "Material".into(), + ViewMode::Channel(c) => c.label().into(), + ViewMode::MeshMap(m) => m.label().into(), + ViewMode::UvChecker => "UV checker".into(), + ViewMode::Mask(_) => "Layer mask".into(), + } + } +} + +/// Polygon fill granularity. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum FillMode { + #[default] + Triangle, + UvIsland, + Mesh, +} + +/// A screen-pinned image for the Projection tool (Painter's stencil). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct StencilState { + /// Image resource name. + pub image: String, + /// Center in normalized device coordinates (-1..1, y up). + pub center: [f32; 2], + /// Height of the image as a fraction of the viewport height (1 = full height). + pub scale: f32, + /// Rotation in degrees. + pub rotation: f32, + /// Repeat the image across the screen. + pub tile: bool, + /// Overlay opacity in the viewport (display only). + pub opacity: f32, +} + +impl StencilState { + pub fn new(image: &str) -> StencilState { + StencilState { image: image.to_string(), center: [0.0, 0.0], scale: 0.8, rotation: 0.0, tile: false, opacity: 0.5 } + } + + /// Placement for a viewport aspect (width / height): center, half extents in NDC, radians. + pub fn placement(&self, image_aspect: f32, viewport_aspect: f32) -> ([f32; 2], [f32; 2], f32) { + let hy = self.scale.max(0.01); + let hx = hy * image_aspect / viewport_aspect.max(1e-3); + (self.center, [hx, hy], self.rotation.to_radians()) + } +} + +/// Tool settings shared by the UI, CLI and agents. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToolState { + pub tool: Tool, + pub brush: BrushSettings, + /// Material painted per channel (linear values) and whether each channel is painted. + pub values: BTreeMap, + pub enabled: BTreeSet, + /// Gray painted into masks. + pub mask_value: f32, + pub fill_mode: FillMode, + /// Stencil used by the Projection tool. + #[serde(default)] + pub stencil: Option, + /// Smudge tool: how much of the picked-up values each stamp deposits (0..1). + #[serde(default = "default_smudge_strength")] + pub smudge_strength: f32, + /// Clone tool source (Painter: V + click). + #[serde(default)] + pub clone_source: Option, + /// The Path tool's curve being edited. + #[serde(default)] + pub path: crate::path_tool::PathState, +} + +fn default_smudge_strength() -> f32 { + 0.5 +} + +/// Where the Clone tool copies from, in texture coordinates. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloneSource { + pub uv: [f32; 2], + /// Source minus destination, fixed by the first stroke after the source was set and kept + /// for the following strokes (aligned cloning). + pub offset: Option<[f32; 2]>, +} + +impl Default for ToolState { + fn default() -> Self { + let values = Channel::ALL.iter().map(|c| (*c, c.default_value())).collect(); + let mut t = ToolState { + tool: Tool::Paint, + brush: BrushSettings::default(), + values, + enabled: [Channel::BaseColor, Channel::Metallic, Channel::Roughness, Channel::Height, Channel::Normal].into_iter().collect(), + mask_value: 1.0, + fill_mode: FillMode::Triangle, + stencil: None, + smudge_strength: default_smudge_strength(), + clone_source: None, + path: Default::default(), + }; + t.values.insert(Channel::BaseColor, [0.8, 0.8, 0.8]); + t.values.insert(Channel::Roughness, [0.3; 3]); + t + } +} + +/// What is selected in the layer stack. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum StackTarget { + #[default] + Content, + /// The layer's mask (painting adds/uses a paint effect). + Mask, + /// A specific effect. + Effect(LayerId), +} + +pub(crate) struct ActiveStroke { + pub ts: usize, + /// None: the stroke edits the quick mask. + pub target: Option, + pub stroke: Stroke, + pub canvas: StrokeCanvas, + /// Camera visibility for 3D strokes (None for strokes in the 2D view). + pub depth: Option, + /// 2D view strokes: last UV point and the distance carried to the next stamp. + pub uv: Option<(Option, f32)>, + pub camera: OrbitCamera, + pub viewport: Vec2, + pub values: BTreeMap, + pub erase: bool, + /// Projection tool: the stencil captured with the stroke's camera. + pub stencil: Option, + /// History snapshot taken when the stroke began. + pub before: Document, + pub label: String, +} + +pub struct Session { + pub doc: Document, + pub mesh: Arc, + /// Unique per loaded mesh (GPU caches compare it). + pub mesh_id: u64, + pub bvh: Arc, + /// Original mesh file (saved inside the project); None for built-in meshes. + pub mesh_source: Option<(String, Vec)>, + /// High-definition meshes and cage for baking (saved inside the project). + pub bake_meshes: crate::BakeMeshes, + pub caches: Vec, + pub(crate) undo: Vec<(String, Document)>, + pub(crate) redo: Vec<(String, Document)>, + pub tool: ToolState, + pub active_set: usize, + /// Selected layer per texture set. + pub selected: BTreeMap, + pub target: StackTarget, + pub camera: OrbitCamera, + pub view: ViewMode, + /// Viewport size (pixels) used by scripted strokes. + pub viewport: Vec2, + pub(crate) stroke: Option, + /// Layer clipboard: a document snapshot and the copied layer. + pub clipboard: Option<(Document, LayerId)>, + /// Decoded image resources (rebuilt from `doc.resources` by `Session::sync_images`). + pub images: texturecraft_compose::ImageStore, + /// Temporary texel mask limiting paint strokes (not saved, not in the history). + pub quick_mask: crate::quick_mask::QuickMask, + pub path: Option, + pub modified: bool, + /// Bumps on every document change. + pub revision: u64, + /// Messages for the UI (status bar / toasts). + pub log: Vec, +} + +impl Session { + /// A session for `project` on `mesh` (texture sets must reference mesh materials). + pub fn new(doc: Document, mesh: Mesh, mesh_source: Option<(String, Vec)>) -> Result { + mesh.validate().map_err(|e| EngineError::Other(e.to_string()))?; + let bvh = Bvh::new(&mesh); + let mut camera = OrbitCamera { yaw: 0.6, pitch: 0.25, ..OrbitCamera::default() }; + let (lo, hi) = mesh.bounds(); + camera.frame(lo, hi); + let caches = doc.project.texture_sets.iter().map(|ts| SetCache::new(&mesh, ts)).collect(); + let selected = doc.project.texture_sets.iter().enumerate().filter_map(|(i, ts)| ts.stack.last().map(|id| (i, *id))).collect(); + static NEXT_MESH: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1); + Ok(Session { + doc, + mesh_id: NEXT_MESH.fetch_add(1, std::sync::atomic::Ordering::Relaxed), + mesh: Arc::new(mesh), + bvh: Arc::new(bvh), + mesh_source, + bake_meshes: Default::default(), + caches, + undo: Vec::new(), + redo: Vec::new(), + tool: ToolState::default(), + active_set: 0, + selected, + target: StackTarget::Content, + camera, + view: ViewMode::Material, + viewport: Vec2::new(1280.0, 800.0), + stroke: None, + clipboard: None, + images: Default::default(), + quick_mask: Default::default(), + path: None, + modified: false, + revision: 1, + log: Vec::new(), + }) + } + + /// A new project: one texture set per mesh material, each with an empty paint layer. + pub fn new_project(name: &str, mesh: Mesh, mesh_ref: &str, mesh_source: Option<(String, Vec)>, resolution: u32) -> Result { + let res = check_resolution(resolution)?; + let mut project = Project::new(name, mesh_ref); + let mats = if mesh.materials.is_empty() { vec!["Default".to_string()] } else { mesh.materials.clone() }; + for (i, m) in mats.iter().enumerate() { + let mut ts = TextureSet::new(m.clone(), i, res); + let id = project.alloc_id(); + let layer = Layer::new(id, "Layer 1", LayerKind::Paint, &ts.channel_list()); + project.layers.insert(id, layer); + ts.stack.push(id); + project.texture_sets.push(ts); + } + Session::new(Document { project, pixels: PixelStore::default(), baked: BTreeMap::new(), resources: BTreeMap::new() }, mesh, mesh_source) + } + + pub fn project(&self) -> &Project { + &self.doc.project + } + + pub fn set_count(&self) -> usize { + self.doc.project.texture_sets.len() + } + + /// The active texture set index, clamped. + pub fn ts(&self) -> usize { + self.active_set.min(self.set_count().saturating_sub(1)) + } + + pub fn selected_layer(&self) -> Option { + let ts = self.ts(); + self.selected.get(&ts).copied().filter(|id| self.doc.project.locate(*id).is_some_and(|(t, _, _)| t == ts)) + } + + // ----------------------------------------------------------------------------------------- + // History + + /// Run an undoable edit. On error the document is left untouched. + pub fn edit(&mut self, label: &str, f: impl FnOnce(&mut Session) -> Result) -> Result { + let before = self.doc.clone(); + let result = f(self).and_then(|v| match self.doc.project.instance_cycle() { + Some(id) => Err(EngineError::Other(format!("instance layer {} would draw itself", id.0))), + None => Ok(v), + }); + match result { + Ok(v) => { + self.push_history(label, before); + Ok(v) + } + Err(e) => { + self.doc = before; + Err(e) + } + } + } + + pub(crate) fn push_history(&mut self, label: &str, before: Document) { + self.modified = true; + self.revision = self.revision.wrapping_add(1); + self.invalidate_changed(&before); + self.undo.push((label.to_string(), before)); + if self.undo.len() > MAX_HISTORY { + self.undo.remove(0); + } + self.redo.clear(); + } + + /// Mark dirty every texture set whose composite differs between `other` and the current + /// document (after an edit, undo or redo). + fn invalidate_changed(&mut self, other: &Document) { + self.sync_caches(); + let resources = |d: &Document| d.resources.iter().map(|(n, b)| (n.clone(), Arc::as_ptr(b))).collect::>(); + let all = resources(other) != resources(&self.doc); + let (empty, images) = (BakedMaps::default(), Default::default()); + let key = |d: &Document, ts: usize| { + let stack = d.project.texture_sets.get(ts).map(|s| s.stack.as_slice()).unwrap_or_default(); + StackKey::new(&d.project, &d.pixels, d.baked.get(&ts).unwrap_or(&empty), &images, ts, stack) + }; + for ts in 0..self.caches.len() { + if (all || key(other, ts) != key(&self.doc, ts)) + && let Some(c) = self.caches.get_mut(ts) + { + c.invalidate_all(); + } + } + } + + /// Mark the document changed and every texture set dirty. + pub fn touched(&mut self) { + self.modified = true; + self.revision = self.revision.wrapping_add(1); + self.sync_caches(); + for c in &mut self.caches { + c.invalidate_all(); + } + } + + /// Make caches agree with the project's texture sets (resolution or channel changes). + pub fn sync_caches(&mut self) { + let sets = self.doc.project.texture_sets.clone(); + self.caches.truncate(sets.len()); + for (i, ts) in sets.iter().enumerate() { + match self.caches.get_mut(i) { + Some(c) if c.resolution == ts.resolution => { + let want = ts.channel_list(); + if c.composite.channels.keys().copied().collect::>() != want { + c.composite = Composite::new(&want, ts.resolution); + c.upload.extend(texturecraft_compose::all_tiles(ts.resolution)); + c.invalidate_all(); + } + } + _ => { + let cache = SetCache::new(&self.mesh, ts); + if i < self.caches.len() { + self.caches[i] = cache; + } else { + self.caches.push(cache); + } + } + } + } + } + + pub fn can_undo(&self) -> bool { + !self.undo.is_empty() + } + pub fn can_redo(&self) -> bool { + !self.redo.is_empty() + } + pub fn undo_label(&self) -> Option<&str> { + self.undo.last().map(|(l, _)| l.as_str()) + } + pub fn redo_label(&self) -> Option<&str> { + self.redo.last().map(|(l, _)| l.as_str()) + } + pub fn history_labels(&self) -> Vec { + self.undo.iter().map(|(l, _)| l.clone()).collect() + } + + pub fn undo(&mut self) -> Result { + self.cancel_stroke(); + let (label, doc) = self.undo.pop().ok_or_else(|| EngineError::Other("nothing to undo".into()))?; + let now = std::mem::replace(&mut self.doc, doc); + self.after_history(&now); + self.redo.push((label.clone(), now)); + self.sync_images(); + Ok(label) + } + + pub fn redo(&mut self) -> Result { + self.cancel_stroke(); + let (label, doc) = self.redo.pop().ok_or_else(|| EngineError::Other("nothing to redo".into()))?; + let now = std::mem::replace(&mut self.doc, doc); + self.after_history(&now); + self.undo.push((label.clone(), now)); + self.sync_images(); + Ok(label) + } + + fn after_history(&mut self, other: &Document) { + self.modified = true; + self.revision = self.revision.wrapping_add(1); + self.invalidate_changed(other); + } + + // ----------------------------------------------------------------------------------------- + // Compositing + + /// Recomposite dirty tiles of every texture set (with the live stroke preview). Returns + /// whether anything changed. + pub fn update(&mut self) -> bool { + self.update_for(f64::INFINITY, || 0.0) + } + + /// [`Session::update`] within about `budget_ms` of `clock` (milliseconds): tiles go in + /// chunks sized from the time the previous chunk took, and what is left stays dirty for the + /// next call (at least one chunk runs). The UI calls this every frame so a full recomposite + /// of a large texture set spreads over frames instead of freezing. The active texture set + /// goes first. + pub fn update_for(&mut self, budget_ms: f64, clock: impl Fn() -> f64) -> bool { + let start = clock(); + let mut chunk = if budget_ms.is_finite() { rayon::current_num_threads().clamp(1, CHUNK) } else { CHUNK }; + // The layer being edited: the stack below it is cached per tile. + let hot = self.stroke.as_ref().and_then(|s| s.target).map(|t| self.paint_owner(t)).or_else(|| self.selected_layer()); + let stroke_res = self.stroke.as_ref().and_then(|s| self.caches.get(s.ts)).map(|c| c.resolution); + let preview = self.stroke.as_ref().and_then(|s| { + Some(StrokePreview { + target: s.target?, + alpha: s.canvas.alpha.clone(), + opacity: s.stroke.settings.opacity, + erase: s.erase, + values: s.values.clone(), + mask_value: self.tool.mask_value, + stencil: s.stencil.clone(), + carried: s.canvas.pickup.as_ref().map(|p| p.values.clone()).unwrap_or_default(), + }) + }); + let active = self.ts(); + let order = std::iter::once(active).chain((0..self.caches.len()).filter(|ts| *ts != active)); + let mut changed = false; + for ts in order { + let Some(cache) = self.caches.get_mut(ts) else { continue }; + cache.below.set_hot(hot); + cache.below.pass = cache.dirty.len(); + // Instances in sets of the stroke's size show the live stroke too. + let preview = preview.as_ref().filter(|_| Some(cache.resolution) == stroke_res); + while !cache.dirty.is_empty() { + let t0 = clock(); + let tiles = next_chunk(&mut cache.dirty, chunk); + let empty = BakedMaps::default(); + let inputs = texturecraft_compose::Inputs { + project: &self.doc.project, + ts, + mesh: &self.mesh, + gbuf: &cache.gbuf, + pixels: &self.doc.pixels, + baked: self.doc.baked.get(&ts).unwrap_or(&empty), + preview, + images: &self.images, + bounds: self.mesh.bounds(), + }; + texturecraft_compose::composite_tiles_cached(&inputs, &mut cache.composite, &tiles, Some(&mut cache.below)); + // The composited tiles and the neighbours their padding reached change. + let padded = pad_tiles(&mut cache.composite, &cache.dilation, &tiles); + cache.upload.extend(tiles.iter().copied().chain(padded)); + cache.revision = cache.revision.wrapping_add(1); + changed = true; + let now = clock(); + let left = budget_ms - (now - start); + if left <= 0.0 { + return changed; + } + // As many tiles as fit in what is left, at the pace of this chunk. + let per_tile = (now - t0) / tiles.len().max(1) as f64; + let fit = if per_tile > 0.0 { (left / per_tile) as usize } else { CHUNK }; + if fit == 0 { + return changed; + } + chunk = fit.min(CHUNK); + } + } + changed + } + + /// Tiles still waiting to be composited, over every texture set. + pub fn pending_tiles(&self) -> usize { + self.caches.iter().map(|c| c.dirty.len()).sum() + } + + /// The layer a stroke target belongs to (an effect's owner). + pub(crate) fn paint_owner(&self, t: PaintTarget) -> LayerId { + let (PaintTarget::Layer(id) | PaintTarget::Mask(id)) = t; + self.doc.project.effect(id).map_or(id, |(owner, _)| owner) + } + + /// Mark `tiles` of texture set `ts` dirty after painting `target`, and the same tiles of + /// other sets of that size drawing it through an instance. + pub(crate) fn mark_painted(&mut self, ts: usize, target: Option, tiles: impl IntoIterator) { + let res = self.caches.get(ts).map(|c| c.resolution); + let sets = target.map(|t| self.doc.project.sets_drawing(self.paint_owner(t))).unwrap_or_default(); + let tiles: Vec<(u32, u32)> = tiles.into_iter().collect(); + for (i, c) in self.caches.iter_mut().enumerate() { + if i == ts || (sets.contains(&i) && Some(c.resolution) == res) { + c.dirty.extend(tiles.iter().copied()); + } + } + } + + /// Drain tiles needing upload for texture set `ts`. + pub fn take_uploads(&mut self, ts: usize) -> Vec<(u32, u32)> { + self.caches.get_mut(ts).map(|c| std::mem::take(&mut c.upload).into_iter().collect()).unwrap_or_default() + } + + /// Grayscale RGBA8 of layer `id`'s mask at `size²` for the mask view (None without a mask). + pub fn mask_view_rgba(&self, id: LayerId, size: u32) -> Option> { + let (ts, _, _) = self.doc.project.locate(id)?; + let cache = self.caches.get(ts)?; + let empty = BakedMaps::default(); + let inputs = texturecraft_compose::Inputs { + project: &self.doc.project, + ts, + mesh: &self.mesh, + gbuf: &cache.gbuf, + pixels: &self.doc.pixels, + baked: self.doc.baked.get(&ts).unwrap_or(&empty), + preview: None, + images: &self.images, + bounds: self.mesh.bounds(), + }; + let gray = texturecraft_compose::mask_image(&inputs, id, size)?; + Some(gray.iter().flat_map(|g| [*g, *g, *g, 255]).collect()) + } + + pub fn baked(&self, ts: usize) -> Option<&BakedMaps> { + self.doc.baked.get(&ts) + } + + /// Bytes held by painted layer pixels, the composites of every texture set and their + /// below-stack caches. + pub fn memory(&self) -> Memory { + let composites = self.caches.iter().flat_map(|c| c.composite.channels.values()).map(texturecraft_texel::TileImage::bytes).sum(); + Memory { pixels: self.doc.pixels.bytes(), composites, cache: self.caches.iter().map(|c| c.below.bytes()).sum() } + } +} + +/// Memory use reported by [`Session::memory`]. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub struct Memory { + pub pixels: usize, + pub composites: usize, + pub cache: usize, +} + +impl Memory { + pub fn total(self) -> usize { + self.pixels + self.composites + self.cache + } +} + +/// Most tiles per composite chunk (a 1024² region). +const CHUNK: usize = 256; + +/// Take up to `n` dirty tiles, block by block (16 × 16 tiles) so neighbourhood filters +/// evaluate compact regions. +fn next_chunk(dirty: &mut BTreeSet<(u32, u32)>, n: usize) -> Vec<(u32, u32)> { + if dirty.len() <= n { + return std::mem::take(dirty).into_iter().collect(); + } + let mut tiles: Vec<(u32, u32)> = dirty.iter().copied().collect(); + tiles.sort_by_key(|&(x, y)| (y / 16, x / 16, y, x)); + tiles.truncate(n); + for t in &tiles { + dirty.remove(t); + } + tiles +} + +/// Valid texture set resolutions: powers of two from 128 to 8192. +pub fn check_resolution(r: u32) -> Result { + if (128..=8192).contains(&r) && r.is_power_of_two() { + Ok(r) + } else { + Err(EngineError::Other(format!("resolution {r} must be a power of two between 128 and 8192"))) + } +} diff --git a/crates/engine/src/set_cmds.rs b/crates/engine/src/set_cmds.rs new file mode 100644 index 00000000..0e9a31c6 --- /dev/null +++ b/crates/engine/src/set_cmds.rs @@ -0,0 +1,127 @@ +//! Texture set commands (Texture Set List / Texture Set Settings). + +use serde_json::{Value, json}; +use texturecraft_core::{Channel, ChannelBlend, ChannelFormat, NormalFormat}; + +use crate::commands::{CommandSpec, always, bad, boolp, channel_param, f32p, strp, u64p}; +use crate::session::{StackTarget, check_resolution}; +use crate::{Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("textureSet.select", "Select texture set", [], None, "{ts}", always, select), + cmd!("textureSet.list", "List texture sets", [], None, "{}", always, |s, _| Ok(crate::inspect::texture_sets(s))), + cmd!("textureSet.resolution", "Texture set size", [], None, "{ts?, resolution: 128..8192 (power of two)}", always, resolution), + cmd!("textureSet.channel.add", "Add channel", [], None, "{ts?, channel}", always, |s, p| channel(s, p, true)), + cmd!("textureSet.channel.remove", "Remove channel", [], None, "{ts?, channel}", always, |s, p| channel(s, p, false)), + cmd!("textureSet.visible", "Toggle texture set visibility", [], None, "{ts?, visible?}", always, visible), + cmd!("textureSet.rename", "Rename texture set", [], None, "{ts?, name}", always, rename), + cmd!("textureSet.settings", "Texture set settings", [], None, "{ts?, description?, heightStrength?, normalFormat?: openGl|directX}", always, settings), + ] +} + +fn ts_param(s: &Session, p: &Value, cmd: &str) -> Result { + match u64p(p, "ts") { + Some(t) if (t as usize) < s.set_count() => Ok(t as usize), + Some(t) => Err(bad(cmd, format!("no texture set {t}"))), + None => Ok(s.ts()), + } +} + +fn select(s: &mut Session, p: &Value) -> Result { + let ts = u64p(p, "ts").map(|t| t as usize).filter(|t| *t < s.set_count()).ok_or_else(|| bad("textureSet.select", "valid `ts` index required"))?; + s.cancel_stroke(); + s.active_set = ts; + s.target = StackTarget::Content; + s.revision = s.revision.wrapping_add(1); + Ok(json!({ "ts": ts })) +} + +fn resolution(s: &mut Session, p: &Value) -> Result { + let ts = ts_param(s, p, "textureSet.resolution")?; + let r = u64p(p, "resolution").ok_or_else(|| bad("textureSet.resolution", "`resolution` is required"))?; + let r = check_resolution(u32::try_from(r).unwrap_or(0))?; + s.edit("Texture set size", |s| { + s.doc.project.texture_set_mut(ts)?.resolution = r; + // Painted pixels are resampled (bilinear); strokes are not replayed. + crate::layer_ops::resample_set(s, ts, r); + Ok(()) + })?; + Ok(json!({ "ts": ts, "resolution": r })) +} + +fn channel(s: &mut Session, p: &Value, add: bool) -> Result { + let ts = ts_param(s, p, "textureSet.channel")?; + let c = channel_param("textureSet.channel", p, "channel")?.ok_or_else(|| bad("textureSet.channel", "`channel` is required"))?; + s.edit(if add { "Add channel" } else { "Remove channel" }, |s| { + let set = s.doc.project.texture_set_mut(ts)?; + if add { + if !set.has_channel(c) { + set.channels.push((c, ChannelFormat::default_for(c))); + set.channels.sort_by_key(|(c, _)| c.index()); + } + // Existing layers get the new channel enabled. + let ids: Vec<_> = s.doc.project.walk(ts).into_iter().map(|(id, _)| id).collect(); + for id in ids { + if let Ok(l) = s.doc.project.layer_mut(id) { + let mode = if l.is_group() { texturecraft_core::BlendMode::Passthrough } else { texturecraft_core::BlendMode::Normal }; + l.channels.entry(c).or_insert(ChannelBlend { mode, opacity: 1.0 }); + } + } + } else { + if c == Channel::BaseColor { + return Err(bad("textureSet.channel.remove", "base color can't be removed")); + } + set.channels.retain(|(x, _)| *x != c); + } + Ok(()) + })?; + Ok(Value::Null) +} + +fn visible(s: &mut Session, p: &Value) -> Result { + let ts = ts_param(s, p, "textureSet.visible")?; + let set = s.doc.project.texture_set_mut(ts)?; + set.visible = boolp(p, "visible").unwrap_or(!set.visible); + let v = set.visible; + s.revision = s.revision.wrapping_add(1); + Ok(json!({ "visible": v })) +} + +fn rename(s: &mut Session, p: &Value) -> Result { + let ts = ts_param(s, p, "textureSet.rename")?; + let name = strp(p, "name") + .map(str::trim) + .filter(|n| !n.is_empty() && n.chars().count() <= 128) + .ok_or_else(|| bad("textureSet.rename", "`name` is required"))? + .to_string(); + s.edit("Rename texture set", |s| { + s.doc.project.texture_set_mut(ts)?.name = name; + Ok(()) + })?; + Ok(Value::Null) +} + +fn settings(s: &mut Session, p: &Value) -> Result { + let ts = ts_param(s, p, "textureSet.settings")?; + let nf = match strp(p, "normalFormat") { + Some("openGl") | Some("opengl") => Some(NormalFormat::OpenGl), + Some("directX") | Some("directx") => Some(NormalFormat::DirectX), + Some(o) => return Err(bad("textureSet.settings", format!("unknown normal format `{o}`"))), + None => None, + }; + s.edit("Texture set settings", |s| { + if let Some(n) = nf { + s.doc.project.normal_format = n; + } + let set = s.doc.project.texture_set_mut(ts)?; + if let Some(d) = strp(p, "description") { + set.description = d.chars().take(4096).collect(); + } + if let Some(h) = f32p(p, "heightStrength") { + set.height_strength = h.clamp(0.0, 100.0); + } + Ok(()) + })?; + Ok(Value::Null) +} diff --git a/crates/engine/src/smart_masks.rs b/crates/engine/src/smart_masks.rs new file mode 100644 index 00000000..346ec944 --- /dev/null +++ b/crates/engine/src/smart_masks.rs @@ -0,0 +1,152 @@ +//! Smart masks: procedural mask presets (generators and patterns driven by the baked mesh maps) +//! that replace a layer's mask in one step. Smart materials build their masks from the same +//! presets. + +use serde_json::{Value, json}; +use texturecraft_core::{ + BlendMode, Effect, EffectKind, Filter, Generator, GeneratorKind, LayerId, Mask, MaskBackground, Procedural, ProceduralKind, Project, Projection, Source, +}; + +use crate::commands::{CommandSpec, always, bad, has_layer, layer_param, strp}; +use crate::session::StackTarget; +use crate::{EngineError, Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("mask.smart.apply", "Apply smart mask", [], None, "{name: smart mask id or label, layer?}", has_layer, apply_cmd), + cmd!("mask.smart.list", "List smart masks", [], None, "{}", always, |_, _| Ok(json!( + SMART_MASKS.iter().map(|m| json!({"id": m.id, "label": m.label})).collect::>() + ))), + ] +} + +pub struct SmartMask { + pub id: &'static str, + pub label: &'static str, +} + +pub const SMART_MASKS: &[SmartMask] = &[ + SmartMask { id: "edge_wear", label: "Edges Worn" }, + SmartMask { id: "edge_chipped", label: "Edges Chipped" }, + SmartMask { id: "dirt_cavities", label: "Dirt in Cavities" }, + SmartMask { id: "dust_top", label: "Dust from Top" }, + SmartMask { id: "ground_dirt", label: "Ground Dirt" }, + SmartMask { id: "rust_leaks", label: "Rust Leaks" }, + SmartMask { id: "scratches", label: "Scratches" }, + SmartMask { id: "grunge", label: "Grunge Blotches" }, + SmartMask { id: "paint_chips", label: "Paint Chips" }, + SmartMask { id: "fingerprints", label: "Fingerprints" }, +]; + +fn norm(x: &str) -> String { + x.to_ascii_lowercase().replace([' ', '_', '-'], "") +} + +pub fn find(name: &str) -> Option<&'static SmartMask> { + SMART_MASKS.iter().find(|m| norm(m.id) == norm(name) || norm(m.label) == norm(name)) +} + +const UP: [f32; 3] = [0.0, 1.0, 0.0]; + +/// A mesh-map generator with explicit threshold, softness and noise breakup. +pub(crate) fn generator(kind: GeneratorKind, level: f32, softness: f32, noise: f32) -> EffectKind { + EffectKind::Generator(Generator { level, softness, noise_amount: noise, ..Generator::new(kind) }) +} + +/// A direction or position generator (`invert` flips the result). +pub(crate) fn directional(kind: GeneratorKind, direction: [f32; 3], level: f32, softness: f32, noise: f32, invert: bool) -> EffectKind { + EffectKind::Generator(Generator { level, softness, noise_amount: noise, direction, invert, ..Generator::new(kind) }) +} + +/// A triplanar grayscale pattern fill. +pub(crate) fn pattern(kind: ProceduralKind, scale: f32, seed: u32, contrast: f32) -> EffectKind { + EffectKind::Fill { + source: Source::Procedural { pattern: Procedural { kind, scale, seed, contrast, balance: 0.0, invert: false }, low: [0.0; 3], high: [1.0; 3] }, + projection: Projection::Triplanar { scale: 1.0, sharpness: 8.0, offset: [0.0; 3] }, + } +} + +/// Background and effects (bottom → top) of preset `id`. +pub(crate) fn preset(id: &str) -> Option<(MaskBackground, Vec<(EffectKind, BlendMode)>)> { + use BlendMode::*; + use GeneratorKind as G; + use ProceduralKind as P; + let fx = match find(id)?.id { + "edge_wear" => vec![(generator(G::EdgeWear, 0.55, 0.12, 0.5), Normal)], + // Wide edge band cut by chips, plus a thin solid line right on the edge. + "edge_chipped" => vec![ + (generator(G::EdgeWear, 0.8, 0.2, 0.3), Normal), + (pattern(P::Chips, 3.0, 5, 1.0), Multiply), + (generator(G::EdgeWear, 0.45, 0.06, 0.6), Lighten), + ], + "dirt_cavities" => vec![(generator(G::Dirt, 0.55, 0.25, 0.4), Normal)], + "dust_top" => vec![(directional(G::Direction, UP, 0.3, 0.15, 0.3, false), Normal), (pattern(P::Clouds, 3.0, 9, 1.4), Multiply)], + "ground_dirt" => vec![(directional(G::Position, [0.0, -1.0, 0.0], 0.35, 0.25, 0.5, false), Normal), (pattern(P::Grunge, 2.0, 12, 0.8), Multiply)], + // Streaks on surfaces that don't face up, fed by the crevices they run out of. + "rust_leaks" => vec![ + (pattern(P::Streaks, 3.0, 4, 1.2), Normal), + (directional(G::Direction, UP, 0.2, 0.1, 0.0, true), Multiply), + (generator(G::Dirt, 0.45, 0.2, 0.5), Lighten), + ], + "scratches" => vec![(pattern(P::Scratches, 3.0, 6, 1.0), Normal)], + "grunge" => vec![(pattern(P::Grunge, 2.0, 8, 1.0), Normal)], + "paint_chips" => vec![(pattern(P::Chips, 5.0, 2, 1.0), Normal), (generator(G::EdgeWear, 0.6, 0.12, 0.5), Lighten)], + "fingerprints" => vec![(pattern(P::Smudges, 4.0, 3, 1.0), Normal)], + _ => return None, + }; + Some((MaskBackground::Black, fx)) +} + +/// Build a mask from a background and effects, allocating effect ids in `p`. +pub(crate) fn build_mask(p: &mut Project, bg: MaskBackground, effects: Vec<(EffectKind, BlendMode)>) -> Mask { + let mut m = Mask::new(bg); + for (k, blend) in effects { + m.effects.push(Effect { blend, ..Effect::new(p.alloc_id(), k) }); + } + m +} + +/// Preset `id` as a mask, optionally inverted (e.g. paint that survives where wear is not). +pub(crate) fn mask(p: &mut Project, id: &str, invert: bool) -> Result { + let (bg, mut fx) = preset(id).ok_or_else(|| EngineError::Other(format!("unknown smart mask `{id}`")))?; + if invert { + fx.push((EffectKind::Filter(Filter::Invert), BlendMode::Normal)); + } + Ok(build_mask(p, bg, fx)) +} + +/// Replace layer `layer`'s mask with smart mask `name` (one undo step). +pub fn apply(s: &mut Session, layer: LayerId, name: &str) -> Result<()> { + let sm = find(name).ok_or_else(|| EngineError::Other(format!("unknown smart mask `{name}`")))?; + s.edit(&format!("Apply smart mask {}", sm.label), |s| { + let m = mask(&mut s.doc.project, sm.id, false)?; + let old = s.doc.project.layer_mut(layer)?.mask.replace(m); + for e in old.map(|m| m.effects).unwrap_or_default() { + s.doc.pixels.masks.remove(&e.id); + } + s.target = StackTarget::Mask; + Ok(()) + }) +} + +fn apply_cmd(s: &mut Session, p: &Value) -> Result { + let name = strp(p, "name").ok_or_else(|| bad("mask.smart.apply", "`name` is required"))?; + let layer = layer_param(s, "mask.smart.apply", p)?; + apply(s, layer, name)?; + Ok(json!({ "layer": layer.0 })) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn every_preset_resolves_and_ids_are_unique() { + let (mut ids, mut labels) = (std::collections::BTreeSet::new(), std::collections::BTreeSet::new()); + for m in SMART_MASKS { + assert!(preset(m.id).is_some(), "{}", m.id); + assert!(ids.insert(norm(m.id)) && labels.insert(norm(m.label)), "duplicate {}", m.id); + assert_eq!(find(m.label).map(|f| f.id), Some(m.id)); + } + } +} diff --git a/crates/engine/src/tool_cmds.rs b/crates/engine/src/tool_cmds.rs new file mode 100644 index 00000000..783f269d --- /dev/null +++ b/crates/engine/src/tool_cmds.rs @@ -0,0 +1,322 @@ +//! Tool commands: pick a tool, set brush and material values, and paint scripted strokes (the +//! way agents and the CLI paint). + +use serde_json::{Value, json}; +use texturecraft_core::Channel; +use texturecraft_geom::glam::Vec2; +use texturecraft_paint::{Alignment, BrushAlpha}; + +use crate::commands::{CommandSpec, always, bad, boolp, channel_param, color_param, f32p, strp}; +use crate::session::{CloneSource, FillMode, Tool}; +use crate::{Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("tool.paint", "Paint", ["Tools"], Some("1"), "{}", always, |s, _| set_tool(s, Tool::Paint)), + cmd!("tool.eraser", "Eraser", ["Tools"], Some("2"), "{}", always, |s, _| set_tool(s, Tool::Eraser)), + cmd!("tool.projection", "Projection", ["Tools"], Some("3"), "{}", always, |s, _| set_tool(s, Tool::Projection)), + cmd!("tool.polygonFill", "Polygon fill", ["Tools"], Some("4"), "{}", always, |s, _| set_tool(s, Tool::PolygonFill)), + cmd!("tool.smudge", "Smudge", ["Tools"], Some("5"), "{}", always, |s, _| set_tool(s, Tool::Smudge)), + cmd!("tool.clone", "Clone", ["Tools"], Some("6"), "{}", always, |s, _| set_tool(s, Tool::Clone)), + cmd!("tool.colorPicker", "Color picker", ["Tools"], Some("P"), "{}", always, |s, _| set_tool(s, Tool::ColorPicker)), + cmd!("tool.select", "Select tool", [], None, "{tool: paint|eraser|projection|polygonFill|smudge|clone|colorPicker|path}", always, select), + cmd!( + "tool.brush", + "Brush settings", + [], + None, + "{size?: 0..100, flow?: 0..100, opacity?: 0..100, spacing?: 1..1000, hardness?: 0..100, angle?, followPath?, alignment?: tangent|camera, lazy?, jitterSize?, jitterAngle?, jitterFlow?, jitterPosition?, alpha?: name | {image: resource name}, backfaceCulling?, symmetryX?, symmetryY?, symmetryZ?, minSize?, smudgeStrength?: 0..100, particles?: {enabled?, count?: 1..16, lifetime?: 1..128 steps, gravity?: 0..2}}", + always, + brush + ), + cmd!("tool.material", "Tool material", [], None, "{channel, color?|value?, enabled?} or {maskValue?: 0..1}", always, material), + cmd!("tool.stencil", "Projection stencil", [], None, "{image?: resource name, center?: [x,y] NDC, scale?: 0.01..10, rotation?: degrees, tile?, opacity?, clear?: bool}", always, stencil), + cmd!( + "tool.cloneSource", + "Set clone source", + [], + None, + "{x, y, viewport?: [w,h]} a point on the mesh, or {uv: [u,v]}, or {clear: true} — the Clone tool copies from here (V + click)", + always, + clone_source + ), + cmd!("tool.fillMode", "Polygon fill mode", [], None, "{mode: triangle|uvIsland|mesh}", always, fill_mode), + cmd!("tool.stroke", "Paint stroke", [], None, "{points: [[x,y],...] viewport pixels, viewport?: [w,h]} — paints with the current tool", always, stroke), + cmd!("tool.strokeUv", "Paint stroke in the 2D view", [], None, "{points: [[u,v],...] texture coordinates 0..1} — paints in UV space like the 2D view", always, stroke_uv), + cmd!("tool.click", "Tool click", [], None, "{x, y, viewport?: [w,h]} — polygon fill / color picker / single dab", always, click), + cmd!("tool.state", "Tool state", [], None, "{}", always, |s, _| Ok(serde_json::to_value(&s.tool).unwrap_or(Value::Null))), + ] +} + +pub(crate) fn set_tool(s: &mut Session, t: Tool) -> Result { + s.cancel_stroke(); + s.tool.tool = t; + s.revision = s.revision.wrapping_add(1); + Ok(json!({ "tool": t.id() })) +} + +fn select(s: &mut Session, p: &Value) -> Result { + let name = strp(p, "tool").ok_or_else(|| bad("tool.select", "`tool` is required"))?; + let t = Tool::parse(name).ok_or_else(|| bad("tool.select", format!("unknown tool `{name}`")))?; + set_tool(s, t) +} + +/// Brush values use the UI's 0–100 scales, so agents and the sliders speak the same numbers. +fn brush(s: &mut Session, p: &Value) -> Result { + let b = &mut s.tool.brush; + let pct = |k: &str| f32p(p, k).map(|v| v / 100.0); + if let Some(v) = pct("size") { + b.size = v * 0.25; + } + if let Some(v) = pct("minSize") { + b.min_size = v; + } + if let Some(v) = pct("flow") { + b.flow = v; + } + if let Some(v) = pct("opacity") { + b.opacity = v; + } + if let Some(v) = pct("spacing") { + b.spacing = v; + } + if let Some(v) = pct("hardness") { + b.hardness = v; + } + if let Some(v) = f32p(p, "angle") { + b.angle = v; + } + if let Some(v) = boolp(p, "followPath") { + b.follow_path = v; + } + if let Some(a) = strp(p, "alignment") { + b.alignment = match a { + "camera" => Alignment::Camera, + "tangent" | "uv" => Alignment::Tangent, + other => return Err(bad("tool.brush", format!("unknown alignment `{other}`"))), + }; + } + if let Some(v) = f32p(p, "lazy") { + b.lazy = v; + } + for (k, slot) in [("jitterSize", &mut b.jitter_size), ("jitterAngle", &mut b.jitter_angle), ("jitterFlow", &mut b.jitter_flow)] { + if let Some(v) = f32p(p, k) { + *slot = v / 100.0; + } + } + if let Some(v) = f32p(p, "jitterPosition") { + b.jitter_position = v / 100.0; + } + if let Some(a) = strp(p, "alpha") { + b.alpha = BrushAlpha::parse(a).ok_or_else(|| bad("tool.brush", format!("unknown alpha `{a}`")))?; + b.alpha_image = None; + } else if let Some(name) = p.get("alpha").and_then(|a| a.get("image")).and_then(Value::as_str) { + if !s.images.contains_key(name) { + return Err(bad("tool.brush", format!("no image resource `{name}` (import it first)"))); + } + b.alpha_image = Some(name.to_string()); + } + if let Some(v) = boolp(p, "backfaceCulling") { + b.backface_culling = v; + } + for (k, slot) in [("symmetryX", &mut b.symmetry.x), ("symmetryY", &mut b.symmetry.y), ("symmetryZ", &mut b.symmetry.z)] { + if let Some(v) = boolp(p, k) { + *slot = v; + } + } + if let Some(v) = boolp(p, "screenSpace") { + b.screen_space = v; + } + if let Some(q) = p.get("particles") { + let pt = &mut b.particles; + pt.enabled = boolp(q, "enabled").unwrap_or(pt.enabled); + pt.count = f32p(q, "count").map_or(pt.count, |v| v as u32); + pt.lifetime = f32p(q, "lifetime").map_or(pt.lifetime, |v| v as u32); + pt.gravity = f32p(q, "gravity").unwrap_or(pt.gravity); + } + *b = b.sanitized(); + if let Some(v) = f32p(p, "smudgeStrength") { + s.tool.smudge_strength = (v / 100.0).clamp(0.0, 1.0); + } + s.revision = s.revision.wrapping_add(1); + Ok(brush_json(s)) +} + +pub(crate) fn brush_json(s: &Session) -> Value { + let b = &s.tool.brush; + json!({ + "size": b.size / 0.25 * 100.0, "minSize": b.min_size * 100.0, "flow": b.flow * 100.0, "opacity": b.opacity * 100.0, + "spacing": b.spacing * 100.0, "hardness": b.hardness * 100.0, "angle": b.angle, "followPath": b.follow_path, + "alignment": format!("{:?}", b.alignment).to_lowercase(), "lazy": b.lazy, + "alpha": match &b.alpha_image { Some(name) => json!({ "image": name }), None => json!(b.alpha.label()) }, + "backfaceCulling": b.backface_culling, "symmetry": [b.symmetry.x, b.symmetry.y, b.symmetry.z], + "smudgeStrength": s.tool.smudge_strength * 100.0, "particles": b.particles, + }) +} + +fn material(s: &mut Session, p: &Value) -> Result { + if let Some(v) = f32p(p, "maskValue") { + s.tool.mask_value = v.clamp(0.0, 1.0); + } + if let Some(c) = channel_param("tool.material", p, "channel")? { + if let Some(v) = color_param(p, "color").or_else(|| color_param(p, "value")) { + let v = if c == Channel::Height { v.map(|x| x.clamp(-1.0, 1.0)) } else { v.map(|x| x.clamp(0.0, 1.0)) }; + s.tool.values.insert(c, v); + s.tool.enabled.insert(c); + } + match boolp(p, "enabled") { + Some(true) => { + s.tool.enabled.insert(c); + } + Some(false) => { + s.tool.enabled.remove(&c); + } + None => {} + } + } + s.revision = s.revision.wrapping_add(1); + Ok(json!({ + "values": s.tool.values.iter().map(|(c, v)| (c.id().to_string(), json!(v))).collect::>(), + "enabled": s.tool.enabled.iter().map(|c| c.id()).collect::>(), + "maskValue": s.tool.mask_value, + })) +} + +fn stencil(s: &mut Session, p: &Value) -> Result { + if boolp(p, "clear") == Some(true) { + s.tool.stencil = None; + return Ok(Value::Null); + } + if let Some(name) = strp(p, "image") { + if !s.doc.resources.contains_key(name) { + return Err(bad("tool.stencil", format!("no resource `{name}` (import it first)"))); + } + let keep = s.tool.stencil.take(); + let mut st = crate::session::StencilState::new(name); + if let Some(k) = keep { + st = crate::session::StencilState { image: name.to_string(), ..k }; + } + s.tool.stencil = Some(st); + } + let st = s.tool.stencil.as_mut().ok_or_else(|| bad("tool.stencil", "no stencil: give `image`"))?; + if let Some(c) = color_param(p, "center").map(|c| [c[0], c[1]]).or_else(|| pair(p, "center")) { + st.center = c.map(|v| v.clamp(-4.0, 4.0)); + } + if let Some(v) = f32p(p, "scale") { + st.scale = v.clamp(0.01, 10.0); + } + if let Some(v) = f32p(p, "rotation") { + st.rotation = v.rem_euclid(360.0); + } + if let Some(v) = boolp(p, "tile") { + st.tile = v; + } + if let Some(v) = f32p(p, "opacity") { + st.opacity = v.clamp(0.0, 1.0); + } + s.revision = s.revision.wrapping_add(1); + Ok(serde_json::to_value(&s.tool.stencil).unwrap_or(Value::Null)) +} + +/// A `[a, b]` param of two finite numbers. +fn pair(p: &Value, key: &str) -> Option<[f32; 2]> { + let a = p.get(key)?.as_array()?; + let v: Vec = a.iter().filter_map(Value::as_f64).map(|x| x as f32).filter(|x| x.is_finite()).collect(); + match v.as_slice() { + [x, y] => Some([*x, *y]), + _ => None, + } +} + +fn clone_source(s: &mut Session, p: &Value) -> Result { + if boolp(p, "clear") == Some(true) { + s.tool.clone_source = None; + return Ok(Value::Null); + } + let uv = match (pair(p, "uv"), f32p(p, "x"), f32p(p, "y")) { + (Some(uv), _, _) => uv.map(|v| v.clamp(0.0, 1.0)), + (None, Some(x), Some(y)) => { + let hit = s.pick(Vec2::new(x, y), viewport_of(s, p)).ok_or_else(|| bad("tool.cloneSource", "nothing under that point"))?; + if s.doc.project.texture_set(s.ts()).ok().map(|t| t.material) != Some(hit.material) { + return Err(bad("tool.cloneSource", "that surface belongs to another texture set")); + } + [hit.uv.x, hit.uv.y] + } + _ => return Err(bad("tool.cloneSource", "give `uv: [u, v]` or `x` and `y`")), + }; + s.tool.clone_source = Some(CloneSource { uv, offset: None }); + s.revision = s.revision.wrapping_add(1); + Ok(serde_json::to_value(s.tool.clone_source).unwrap_or(Value::Null)) +} + +fn fill_mode(s: &mut Session, p: &Value) -> Result { + s.tool.fill_mode = match strp(p, "mode").unwrap_or("triangle") { + "triangle" => FillMode::Triangle, + "uvIsland" | "island" => FillMode::UvIsland, + "mesh" => FillMode::Mesh, + other => return Err(bad("tool.fillMode", format!("unknown fill mode `{other}`"))), + }; + Ok(Value::Null) +} + +pub(crate) fn viewport_of(s: &Session, p: &Value) -> Vec2 { + match p.get("viewport").and_then(Value::as_array) { + Some(a) if a.len() == 2 => { + let w = a[0].as_f64().unwrap_or(0.0) as f32; + let h = a[1].as_f64().unwrap_or(0.0) as f32; + if w.is_finite() && h.is_finite() && w >= 16.0 && h >= 16.0 { Vec2::new(w.min(16384.0), h.min(16384.0)) } else { s.viewport } + } + _ => s.viewport, + } +} + +/// A `[[x, y], ...]` param of at most 100000 finite points, None when the key is absent. +pub(crate) fn points_param(cmd: &str, p: &Value, key: &str) -> Result>> { + let Some(v) = p.get(key) else { return Ok(None) }; + let pts = v.as_array().ok_or_else(|| bad(cmd, format!("`{key}` must be an array of [x, y]")))?; + if pts.len() > 100_000 { + return Err(bad(cmd, "at most 100000 points")); + } + let points: Vec = pts + .iter() + .filter_map(|v| { + let a = v.as_array()?; + let (x, y) = (a.first()?.as_f64()? as f32, a.get(1)?.as_f64()? as f32); + (x.is_finite() && y.is_finite()).then_some(Vec2::new(x, y)) + }) + .collect(); + if points.is_empty() { + return Err(bad(cmd, "no valid points")); + } + Ok(Some(points)) +} + +fn stroke(s: &mut Session, p: &Value) -> Result { + let points = points_param("tool.stroke", p, "points")?.ok_or_else(|| bad("tool.stroke", "`points` must be an array of [x, y]"))?; + let vp = viewport_of(s, p); + let stamps = s.stroke_points(&points, vp)?; + s.update(); + Ok(json!({ "stamps": stamps })) +} + +fn click(s: &mut Session, p: &Value) -> Result { + let (Some(x), Some(y)) = (f32p(p, "x"), f32p(p, "y")) else { return Err(bad("tool.click", "`x` and `y` are required")) }; + let vp = viewport_of(s, p); + let out = match s.tool.tool { + Tool::PolygonFill => json!({ "triangles": s.polygon_fill(Vec2::new(x, y), vp)? }), + Tool::ColorPicker => { + let v = s.color_pick(Vec2::new(x, y), vp)?; + json!(v.iter().map(|(c, v)| (c.id().to_string(), json!(v))).collect::>()) + } + _ => json!({ "stamps": s.stroke_points(&[Vec2::new(x, y)], vp)? }), + }; + s.update(); + Ok(out) +} + +fn stroke_uv(s: &mut Session, p: &Value) -> Result { + let points = points_param("tool.strokeUv", p, "points")?.ok_or_else(|| bad("tool.strokeUv", "`points` must be an array of [u, v]"))?; + let tiles = s.stroke_uv_points(&points)?; + s.update(); + Ok(json!({ "tiles": tiles })) +} diff --git a/crates/engine/src/view_cmds.rs b/crates/engine/src/view_cmds.rs new file mode 100644 index 00000000..994e8ac1 --- /dev/null +++ b/crates/engine/src/view_cmds.rs @@ -0,0 +1,227 @@ +//! Edit, viewport and display commands. + +use serde_json::{Value, json}; +use texturecraft_core::{BakedMap, Channel, ToneMapping}; +use texturecraft_geom::glam::Vec3; + +use crate::commands::{CommandSpec, always, bad, boolp, can_redo, can_undo, f32p, strp}; +use crate::session::ViewMode; +use crate::{Result, Session, cmd}; + +pub fn specs() -> Vec { + vec![ + cmd!("viewport.frame", "Show entire mesh", ["Viewport"], Some("F"), "{}", always, frame), + cmd!("viewport.displayMaterial", "Display material", ["Viewport"], Some("M"), "{}", always, |s, _| set_view(s, ViewMode::Material)), + cmd!("viewport.nextChannel", "Display next channel", ["Viewport"], Some("C"), "{}", always, |s, _| cycle_channel(s, 1)), + cmd!("viewport.previousChannel", "Display previous channel", ["Viewport"], Some("Shift+C"), "{}", always, |s, _| cycle_channel(s, -1)), + cmd!("viewport.nextMeshMap", "Display next mesh map", ["Viewport"], Some("B"), "{}", always, |s, _| cycle_map(s, 1)), + cmd!("viewport.previousMeshMap", "Display previous mesh map", ["Viewport"], Some("Shift+B"), "{}", always, |s, _| cycle_map(s, -1)), + cmd!("viewport.view", "Set view mode", [], None, "{mode: material|uvChecker|mask||map:, layer? (for mask)}", always, view), + cmd!("camera.set", "Set camera", [], None, "{yaw?, pitch? (degrees), distance?, fov?, target?: [x,y,z], ortho?}", always, camera_set), + cmd!("camera.get", "Get camera", [], None, "{}", always, |s, _| Ok(camera_json(s))), + cmd!("camera.orbit", "Orbit camera", [], None, "{dx?, dy? (degrees)}", always, orbit), + cmd!( + "display.set", + "Display settings", + [], + None, + "{environment?: |resource:, exposure?, blur?, rotation?, opacity?, toneMapping?: linear|aces, fov?, shadows?, aoIntensity?, bloom?, vignette?, sharpen?, grain?, postEffects?, taa?, specGloss?, parallax?}", + always, + display + ), + ] +} + +pub(crate) fn edit_specs() -> Vec { + vec![ + cmd!("edit.undo", "Undo", ["Edit"], Some("Ctrl+Z"), "{}", can_undo, |s, _| Ok(json!({ "undone": s.undo()? }))), + cmd!("edit.redo", "Redo", ["Edit"], Some("Ctrl+Y"), "{}", can_redo, |s, _| Ok(json!({ "redone": s.redo()? }))), + cmd!("edit.history", "History", [], None, "{}", always, |s, _| Ok( + json!({ "undo": s.history_labels(), "redo": s.redo.iter().rev().map(|(l, _)| l.clone()).collect::>() }) + )), + ] +} + +fn frame(s: &mut Session, _: &Value) -> Result { + let (lo, hi) = s.mesh.bounds(); + s.camera.frame(lo, hi); + s.revision = s.revision.wrapping_add(1); + Ok(camera_json(s)) +} + +fn set_view(s: &mut Session, v: ViewMode) -> Result { + s.view = v; + s.revision = s.revision.wrapping_add(1); + Ok(json!({ "view": v.label() })) +} + +fn cycle_channel(s: &mut Session, d: i64) -> Result { + let chans = s.doc.project.texture_set(s.ts()).map(|t| t.channel_list()).unwrap_or_default(); + if chans.is_empty() { + return set_view(s, ViewMode::Material); + } + let n = chans.len() as i64; + let i = match s.view { + ViewMode::Channel(c) => chans.iter().position(|x| *x == c).map(|i| (i as i64 + d).rem_euclid(n)).unwrap_or(0), + _ => { + if d > 0 { + 0 + } else { + n - 1 + } + } + }; + set_view(s, ViewMode::Channel(chans[i as usize])) +} + +fn cycle_map(s: &mut Session, d: i64) -> Result { + let maps = BakedMap::ALL; + let n = maps.len() as i64; + let i = match s.view { + ViewMode::MeshMap(m) => maps.iter().position(|x| *x == m).map(|i| (i as i64 + d).rem_euclid(n)).unwrap_or(0), + _ => { + if d > 0 { + 0 + } else { + n - 1 + } + } + }; + set_view(s, ViewMode::MeshMap(maps[i as usize])) +} + +fn view(s: &mut Session, p: &Value) -> Result { + let m = strp(p, "mode").ok_or_else(|| bad("viewport.view", "`mode` is required"))?; + let v = match m { + "material" => ViewMode::Material, + "uvChecker" | "uv" | "checker" => ViewMode::UvChecker, + "mask" => { + let id = crate::commands::layer_param(s, "viewport.view", p)?; + if s.doc.project.layer(id)?.mask.is_none() { + return Err(bad("viewport.view", "the layer has no mask")); + } + ViewMode::Mask(id) + } + _ => match m.strip_prefix("map:") { + Some(id) => ViewMode::MeshMap(BakedMap::parse(id).ok_or_else(|| bad("viewport.view", format!("unknown mesh map `{id}`")))?), + None => ViewMode::Channel(Channel::parse(m).ok_or_else(|| bad("viewport.view", format!("unknown view mode `{m}`")))?), + }, + }; + set_view(s, v) +} + +pub(crate) fn camera_json(s: &Session) -> Value { + let c = &s.camera; + json!({ + "yaw": c.yaw.to_degrees(), "pitch": c.pitch.to_degrees(), "distance": c.distance, "fov": c.fov, + "target": c.target.to_array(), "eye": c.eye().to_array(), "ortho": c.ortho, + }) +} + +fn camera_set(s: &mut Session, p: &Value) -> Result { + let c = &mut s.camera; + if let Some(v) = f32p(p, "yaw") { + c.yaw = v.to_radians(); + } + if let Some(v) = f32p(p, "pitch") { + c.pitch = v.clamp(-89.0, 89.0).to_radians(); + } + if let Some(v) = f32p(p, "distance") { + c.distance = v.clamp(c.scene_radius * 0.05, c.scene_radius * 200.0); + } + if let Some(v) = f32p(p, "fov") { + c.fov = v.clamp(5.0, 150.0); + } + if let Some(t) = p.get("target").and_then(Value::as_array) { + let v: Vec = t.iter().filter_map(Value::as_f64).map(|x| x as f32).collect(); + if v.len() == 3 && v.iter().all(|x| x.is_finite()) { + c.target = Vec3::new(v[0], v[1], v[2]); + } + } + if let Some(o) = boolp(p, "ortho") { + c.ortho = o; + } + s.revision = s.revision.wrapping_add(1); + Ok(camera_json(s)) +} + +fn orbit(s: &mut Session, p: &Value) -> Result { + s.camera.orbit(f32p(p, "dx").unwrap_or(0.0).to_radians(), f32p(p, "dy").unwrap_or(0.0).to_radians()); + s.revision = s.revision.wrapping_add(1); + Ok(camera_json(s)) +} + +fn display(s: &mut Session, p: &Value) -> Result { + let tm = match strp(p, "toneMapping") { + Some("linear") => Some(ToneMapping::Linear), + Some("aces") | Some("acesFilmic") => Some(ToneMapping::AcesFilmic), + Some(o) => return Err(bad("display.set", format!("unknown tone mapping `{o}`"))), + None => None, + }; + let env = strp(p, "environment").map(str::to_string); + if let Some(name) = env.as_deref().and_then(|e| e.strip_prefix(texturecraft_core::project::ENV_RESOURCE_PREFIX)) + && !s.images.contains_key(name) + { + return Err(bad("display.set", format!("no image resource `{name}` (import it with resource.import)"))); + } + let d = &mut s.doc.project.display; + if let Some(e) = env { + d.environment = e; + } + for (k, slot, lo, hi) in [ + ("exposure", &mut d.env_exposure, -10.0, 10.0), + ("blur", &mut d.env_blur, 0.0, 1.0), + ("rotation", &mut d.env_rotation, -360.0, 360.0), + ("opacity", &mut d.env_opacity, 0.0, 1.0), + ("fov", &mut d.fov, 5.0, 150.0), + ("aoIntensity", &mut d.ao_intensity, 0.0, 1.0), + ("bloom", &mut d.bloom, 0.0, 1.0), + ("vignette", &mut d.vignette, 0.0, 1.0), + ("sharpen", &mut d.sharpen, 0.0, 1.0), + ("grain", &mut d.grain, 0.0, 1.0), + ] { + if let Some(v) = f32p(p, k) { + *slot = v.clamp(lo, hi); + } + } + if let Some(t) = tm { + d.tone_mapping = t; + } + if let Some(b) = boolp(p, "shadows") { + d.shadows = b; + } + for (k, slot) in [("postEffects", &mut d.post_effects), ("taa", &mut d.taa), ("specGloss", &mut d.spec_gloss), ("parallax", &mut d.parallax)] { + if let Some(b) = boolp(p, k) { + *slot = b; + } + } + s.camera.fov = s.doc.project.display.fov; + s.revision = s.revision.wrapping_add(1); + Ok(serde_json::to_value(&s.doc.project.display).unwrap_or(Value::Null)) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::execute; + + #[test] + fn hdr_resources_become_the_environment() { + let mut s = Session::new_project("t", texturecraft_geom::primitives::sphere(1.0, 16, 8), "builtin:sphere", None, 128).unwrap(); + assert!(execute(&mut s, "display.set", &json!({"environment": "resource:sky.hdr"})).is_err(), "unknown resources are rejected"); + let img = image::Rgb32FImage::from_fn(64, 32, |_, y| image::Rgb([if y < 8 { 40.0 } else { 0.5 }; 3])); + let mut hdr = Vec::new(); + image::DynamicImage::ImageRgb32F(img).write_to(&mut std::io::Cursor::new(&mut hdr), image::ImageFormat::Hdr).unwrap(); + let name = s.import_resource_bytes("sky.hdr", hdr).unwrap(); + let res = &s.images[&name]; + assert!(!res.srgb && res.rgba[0][0] > 30.0, "HDR keeps values above 1"); + let env = format!("resource:{name}"); + let r = execute(&mut s, "display.set", &json!({"environment": env, "specGloss": true, "parallax": true, "taa": false})).unwrap(); + assert_eq!(r["environment"], json!(env)); + let d = &s.doc.project.display; + assert!(d.spec_gloss && d.parallax && !d.taa); + assert_eq!(d.environment_resource(), Some(name.as_str())); + execute(&mut s, "file.removeUnused", &Value::Null).unwrap(); + assert!(s.doc.resources.contains_key(&name), "the environment's image counts as used"); + } +} diff --git a/crates/engine/tests/bake.rs b/crates/engine/tests/bake.rs new file mode 100644 index 00000000..5ac53339 --- /dev/null +++ b/crates/engine/tests/bake.rs @@ -0,0 +1,129 @@ +//! Bake commands: settings, high-definition meshes, cage, and project round trips. + +use serde_json::{Value, json}; +use texturecraft_engine::core::{BakeMatch, BakedMap}; +use texturecraft_engine::geom::{Mesh, primitives}; +use texturecraft_engine::{Session, execute}; + +fn plane_session() -> Session { + let mesh = primitives::builtin("plane").unwrap(); + Session::new_project("t", mesh, "builtin:plane", None, 256).unwrap() +} + +/// `mesh` as OBJ text, lifted by `dy`, keeping only vertices with x ≤ `max_x` (triangles that +/// lose a vertex are dropped), every vertex colored `rgb`. +fn obj(mesh: &Mesh, dy: f32, max_x: f32, rgb: [f32; 3]) -> String { + let mut s = String::from("o Part_high\n"); + for p in &mesh.positions { + s += &format!("v {} {} {} {} {} {}\n", p.x.min(max_x), p.y + dy, p.z, rgb[0], rgb[1], rgb[2]); + } + for t in mesh.indices.chunks_exact(3) { + s += &format!("f {} {} {}\n", t[0] + 1, t[1] + 1, t[2] + 1); + } + s +} + +fn temp_file(name: &str, text: &str) -> String { + let dir = std::env::temp_dir().join(format!("texturecraft-bake-test-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let path = dir.join(name); + std::fs::write(&path, text).unwrap(); + path.display().to_string() +} + +#[test] +fn high_poly_meshes_drive_the_bake_and_round_trip() { + let mut s = plane_session(); + let low = s.mesh.as_ref().clone(); + let (lo, hi) = low.bounds(); + let mid = (lo.x + hi.x) * 0.5; + // A red high poly over the left half of the plane, just above it. + let high = temp_file("hp_high.obj", &obj(&low, 0.002, mid, [1.0, 0.0, 0.0])); + let r = execute(&mut s, "bake.highPoly.add", &json!({ "path": high })).unwrap(); + assert_eq!(r["name"], "hp_high.obj"); + assert!(s.doc.project.texture_sets.iter().all(|t| !t.bake.use_low_as_high), "adding a high poly bakes from it"); + let list = execute(&mut s, "bake.highPoly.list", &Value::Null).unwrap(); + assert_eq!(list["highPoly"][0]["parts"][0], "Part_high"); + assert!(execute(&mut s, "project.inspect", &Value::Null).unwrap()["bakeMeshes"]["highPoly"].as_array().is_some_and(|a| a.len() == 1)); + + execute(&mut s, "bake.run", &json!({ "resolution": 128, "maps": ["opacity", "color_map"], "dilation": 0 })).unwrap(); + let baked = &s.doc.baked[&0]; + let opacity = &baked.maps[&BakedMap::Opacity]; + let covered = opacity.iter().filter(|v| **v > 0.99).count() as f32 / opacity.len() as f32; + assert!((covered - 0.5).abs() < 0.08, "the high poly covers half the plane: {covered}"); + let color = &baked.maps[&BakedMap::ColorMap]; + assert!(opacity.iter().zip(color.chunks(3)).filter(|(o, _)| **o > 0.99).all(|(_, c)| c == [1.0, 0.0, 0.0]), "red where covered"); + + // A cage must have the low poly's triangles. + let tri = temp_file("tri.obj", "v 0 0 0\nv 1 0 0\nv 0 1 0\nf 1 2 3\n"); + assert!(execute(&mut s, "bake.cage.set", &json!({ "path": tri })).is_err()); + let cage = temp_file("cage.obj", &obj(&low, 0.05, f32::MAX, [1.0; 3])); + execute(&mut s, "bake.cage.set", &json!({ "path": cage })).unwrap(); + execute(&mut s, "bake.settings", &json!({ "matching": "byMeshName", "maxFrontal": 0.05 })).unwrap(); + + // Save and reopen: meshes, cage and settings come back. + let back = Session::from_project_bytes(&s.to_project_bytes().unwrap()).unwrap(); + let names = |s: &Session| s.bake_meshes.high.iter().map(|h| (h.name.clone(), h.mesh.triangle_count())).collect::>(); + assert_eq!(names(&back), names(&s)); + assert_eq!(back.bake_meshes.cage.as_ref().map(|c| c.name.as_str()), Some("cage.obj")); + assert_eq!(back.doc.project.texture_sets[0].bake, s.doc.project.texture_sets[0].bake); + assert_eq!(back.doc.project.texture_sets[0].bake.matching, BakeMatch::ByMeshName); + + execute(&mut s, "bake.highPoly.remove", &json!({ "name": "hp_high.obj" })).unwrap(); + assert!(s.bake_meshes.high.is_empty()); + execute(&mut s, "bake.cage.clear", &Value::Null).unwrap(); + assert!(s.bake_meshes.cage.is_none()); + // Without high polys the bake falls back to the low poly. + execute(&mut s, "bake.run", &json!({ "resolution": 128, "maps": ["opacity"] })).unwrap(); + assert!(s.doc.baked[&0].maps[&BakedMap::Opacity].iter().all(|v| *v == 1.0)); + let _ = std::fs::remove_dir_all(std::path::Path::new(&high).parent().unwrap()); +} + +#[test] +fn malformed_high_poly_input_errors_cleanly() { + let mut s = plane_session(); + assert!(s.add_high_poly_bytes("bad.obj", b"this is not a mesh".to_vec()).is_err()); + assert!(s.add_high_poly_bytes("bad.glb", b"glTF\x02\0\0\0\xff\xff\xff\xff".to_vec()).is_err()); + assert!(s.add_high_poly_bytes("bad.xyz", vec![1, 2, 3]).is_err()); + assert!(s.set_cage_bytes("bad.stl", vec![0; 10]).is_err()); + assert!(execute(&mut s, "bake.highPoly.add", &json!({ "path": "/definitely/missing.obj" })).is_err()); + assert!(execute(&mut s, "bake.highPoly.remove", &json!({ "index": 3 })).is_err()); + assert!(execute(&mut s, "bake.highPoly.remove", &Value::Null).is_err()); + assert!(s.bake_meshes.high.is_empty() && s.bake_meshes.cage.is_none()); + assert!(s.doc.project.texture_sets.iter().all(|t| t.bake.use_low_as_high), "failed adds change nothing"); +} + +#[test] +fn bake_settings_apply_atomically() { + let mut s = Session::new_project("t", primitives::material_ball(), "builtin:material_ball", None, 256).unwrap(); + let r = + execute(&mut s, "bake.settings", &json!({ "ts": "all", "antialiasing": 4, "direction": [1, 0, 0], "maps": ["bent_normals", "World space direction"] })) + .unwrap(); + assert_eq!(r.as_array().map(Vec::len), Some(2)); + for t in &s.doc.project.texture_sets { + assert_eq!((t.bake.antialiasing, t.bake.direction), (4, [1.0, 0.0, 0.0])); + assert_eq!(t.bake.maps.iter().copied().collect::>(), [BakedMap::BentNormal, BakedMap::WorldDirection]); + } + let before = s.doc.project.texture_sets[0].bake.clone(); + for bad in [ + json!({ "rays": 4, "antialiasing": 3 }), + json!({ "maps": ["nope"] }), + json!({ "direction": [0, 0, 0] }), + json!({ "matching": "?" }), + json!({ "ts": [0, 9] }), + ] { + assert!(execute(&mut s, "bake.settings", &bad).is_err(), "{bad}"); + assert_eq!(s.doc.project.texture_sets[0].bake, before, "{bad} changed nothing"); + } + // "selected" = the sets checked for baking. + execute(&mut s, "bake.settings", &json!({ "ts": 1, "enabled": false })).unwrap(); + let r = execute(&mut s, "bake.settings", &json!({ "ts": "selected", "rays": 8 })).unwrap(); + assert_eq!(r[0]["ts"], 0); + assert_eq!(r.as_array().map(Vec::len), Some(1)); + // The returned parameters set the same settings again (what the UI sends back). + let mut copy = r[0]["settings"].clone(); + copy["ts"] = 1.into(); + execute(&mut s, "bake.settings", ©).unwrap(); + let (a, b) = (&s.doc.project.texture_sets[0].bake, &s.doc.project.texture_sets[1].bake); + assert_eq!(a, b); +} diff --git a/crates/engine/tests/content_effects.rs b/crates/engine/tests/content_effects.rs new file mode 100644 index 00000000..74011e9e --- /dev/null +++ b/crates/engine/tests/content_effects.rs @@ -0,0 +1,113 @@ +//! Content effects, HSL and anchor points through engine commands. + +use serde_json::{Value, json}; +use texturecraft_engine::core::{Channel, LayerId}; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, StackTarget, execute}; + +fn session() -> Session { + let mut s = Session::new_project("t", primitives::sphere(1.0, 48, 24), "builtin:sphere", None, 256).unwrap(); + s.viewport = texturecraft_engine::geom::glam::Vec2::new(400.0, 400.0); + s.camera.yaw = 0.0; + s.camera.pitch = 0.0; + s.update(); + s +} + +/// Composited value of `c` under the viewport center. +fn center(s: &mut Session, c: Channel) -> [f32; 3] { + s.update(); + let hit = s.pick(texturecraft_engine::geom::glam::Vec2::new(200.0, 200.0), s.viewport).unwrap(); + s.caches[0].composite.value(c, (hit.uv.x * 256.0) as u32, (hit.uv.y * 256.0) as u32) +} + +fn close(a: [f32; 3], b: [f32; 3]) -> bool { + (0..3).all(|i| (a[i] - b[i]).abs() < 2e-3) +} + +fn id(v: Value, key: &str) -> u64 { + v[key].as_u64().unwrap() +} + +#[test] +fn content_effects_commands_inspect_and_round_trip() { + let mut s = session(); + let layer = id(execute(&mut s, "layer.add.fill", &json!({"color": [1.0, 0.0, 0.0], "roughness": 0.2})).unwrap(), "layer"); + let hsl = id(execute(&mut s, "effect.add.filter", &json!({"target": "content", "filter": "hsl", "hue": 1.0 / 3.0})).unwrap(), "effect"); + assert!(close(center(&mut s, Channel::BaseColor), [0.0, 1.0, 0.0]), "{:?}", center(&mut s, Channel::BaseColor)); + assert!(s.doc.project.layer(LayerId(layer)).unwrap().mask.is_none(), "content effects don't create a mask"); + assert_eq!(s.target, StackTarget::Effect(LayerId(hsl))); + // Mask-only effects refuse the content, unknown targets are errors. + assert!(execute(&mut s, "effect.add.generator", &json!({"target": "content"})).is_err()); + assert!(execute(&mut s, "effect.add.filter", &json!({"target": "nope"})).is_err()); + execute(&mut s, "effect.set", &json!({"effect": hsl, "hue": 0.0, "lightness": -1.0})).unwrap(); + assert!(close(center(&mut s, Channel::BaseColor), [0.0; 3])); + execute(&mut s, "effect.set", &json!({"effect": hsl, "visible": false})).unwrap(); + + // A content fill effect, edited through layer.fill.set. + let fill = id(execute(&mut s, "effect.add.fill", &json!({"target": "content", "roughness": 0.7})).unwrap(), "effect"); + assert!(close(center(&mut s, Channel::Roughness), [0.7; 3])); + assert!(close(center(&mut s, Channel::BaseColor), [1.0, 0.0, 0.0]), "channels without a source stay"); + execute(&mut s, "layer.fill.set", &json!({"effect": fill, "channel": "roughness", "value": 0.9})).unwrap(); + assert!(close(center(&mut s, Channel::Roughness), [0.9; 3])); + execute(&mut s, "layer.fill.set", &json!({"effect": fill, "channel": "roughness", "enabled": false})).unwrap(); + assert!(close(center(&mut s, Channel::Roughness), [0.2; 3])); + assert!(execute(&mut s, "layer.fill.set", &json!({"effect": hsl, "channel": "roughness", "value": 0.5})).is_err(), "not a fill effect"); + + // Inspect shows the content stack; the project survives a save/load round trip. + let inspect = execute(&mut s, "project.inspect", &Value::Null).unwrap(); + let row = inspect["layers"].as_array().unwrap().iter().find(|l| l["id"] == layer).unwrap().clone(); + let kinds: Vec<&str> = row["contentEffects"].as_array().unwrap().iter().map(|e| e["kind"].as_str().unwrap()).collect(); + assert_eq!(kinds, ["HSL Perceptive", "Fill"], "{row}"); + let back = Session::from_project_bytes(&s.to_project_bytes().unwrap()).unwrap(); + assert_eq!(back.doc.project, s.doc.project); + + execute(&mut s, "layer.select", &json!({"layer": layer, "target": fill})).unwrap(); + execute(&mut s, "effect.remove", &json!({"effect": fill})).unwrap(); + assert_eq!(s.target, StackTarget::Content); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + assert_eq!(s.doc.project.layer(LayerId(layer)).unwrap().content_effects.len(), 2); +} + +#[test] +fn anchor_points_feed_masks_above() { + let mut s = session(); + let low = id(execute(&mut s, "layer.add.fill", &json!({"height": 0.5})).unwrap(), "layer"); + let anchor = id(execute(&mut s, "effect.add.anchor", &json!({"name": "Height"})).unwrap(), "effect"); + assert_eq!(s.doc.project.effect(LayerId(anchor)).unwrap().1.name, "Height"); + execute(&mut s, "layer.add.fill", &json!({"color": [1.0, 1.0, 1.0]})).unwrap(); + // A layer cannot read an anchor on itself or above it. + assert!(execute(&mut s, "effect.add.fill", &json!({"layer": low, "anchor": anchor})).is_err()); + assert!(execute(&mut s, "effect.add.fill", &json!({"anchor": low})).is_err(), "not an anchor point"); + execute(&mut s, "mask.add.black", &Value::Null).unwrap(); + let reader = id(execute(&mut s, "effect.add.fill", &json!({"anchor": anchor, "anchorChannel": "height"})).unwrap(), "effect"); + // Base color: the low fill's default gray, then white through a 0.5 mask. + assert!(close(center(&mut s, Channel::BaseColor), [0.75; 3]), "{:?}", center(&mut s, Channel::BaseColor)); + // Reading the anchor's base color as gray instead. + execute(&mut s, "effect.set", &json!({"effect": reader, "anchorChannel": "baseColor"})).unwrap(); + assert!(close(center(&mut s, Channel::BaseColor), [0.75; 3])); + execute(&mut s, "effect.set", &json!({"effect": reader, "value": 1.0})).unwrap(); + assert!(close(center(&mut s, Channel::BaseColor), [1.0; 3]), "back to a uniform fill"); + // A blurred mask still reads the anchor (a flat height stays flat). + execute(&mut s, "effect.set", &json!({"effect": reader, "anchor": anchor})).unwrap(); + execute(&mut s, "effect.add.filter", &json!({"filter": "blur", "radius": 8})).unwrap(); + assert!(close(center(&mut s, Channel::BaseColor), [0.75; 3])); + let inspect = execute(&mut s, "project.inspect", &Value::Null).unwrap(); + assert!(inspect.to_string().contains(&format!("\"anchor\":{anchor}")), "{inspect}"); +} + +#[test] +fn painting_into_a_content_paint_effect() { + let mut s = session(); + execute(&mut s, "layer.add.fill", &json!({"roughness": 0.3})).unwrap(); + let e = id(execute(&mut s, "effect.add.paint", &json!({"target": "content"})).unwrap(), "effect"); + execute(&mut s, "tool.material", &json!({"channel": "roughness", "value": 0.9})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 20, "hardness": 90})).unwrap(); + execute(&mut s, "tool.stroke", &json!({"points": [[180, 200], [220, 200]]})).unwrap(); + assert!(s.doc.pixels.layer(LayerId(e), Channel::Roughness).is_some()); + assert!(center(&mut s, Channel::Roughness)[0] > 0.85, "{:?}", center(&mut s, Channel::Roughness)); + // Flattening bakes the effect into a paint layer and drops its pixels. + execute(&mut s, "layer.flatten", &Value::Null).unwrap(); + assert!(s.doc.pixels.layer(LayerId(e), Channel::Roughness).is_none()); + assert!(center(&mut s, Channel::Roughness)[0] > 0.85); +} diff --git a/crates/engine/tests/instances.rs b/crates/engine/tests/instances.rs new file mode 100644 index 00000000..b9f14bcd --- /dev/null +++ b/crates/engine/tests/instances.rs @@ -0,0 +1,232 @@ +//! Instance layers across texture sets, mask with height, change-driven invalidation and the +//! frame-budgeted compositor, through engine commands. + +use serde_json::{Value, json}; +use texturecraft_engine::core::{Channel, LayerId, LayerKind}; +use texturecraft_engine::geom::glam::Vec2; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, execute}; + +/// Two texture sets (ball and base) at 256². +fn session() -> Session { + let mut s = Session::new_project("t", primitives::material_ball(), "builtin:material_ball", None, 256).unwrap(); + s.viewport = Vec2::new(400.0, 400.0); + s.update(); + s +} + +fn id(v: Value, key: &str) -> LayerId { + LayerId(v[key].as_u64().unwrap()) +} + +/// A texel covered by texture set `ts`. +fn covered(s: &Session, ts: usize) -> (u32, u32) { + let g = &s.caches[ts].gbuf; + let i = g.tri.iter().position(|t| *t != texturecraft_engine::geom::NO_TRI).unwrap(); + (i as u32 % g.width, i as u32 / g.width) +} + +fn rough(s: &mut Session, ts: usize) -> f32 { + s.update(); + let (x, y) = covered(s, ts); + s.caches[ts].composite.value(Channel::Roughness, x, y)[0] +} + +/// Texels of set `ts` whose base color is red. +fn reds(s: &Session, ts: usize) -> usize { + let c = &s.caches[ts].composite; + (0..256) + .flat_map(|y| (0..256).map(move |x| (x, y))) + .filter(|&(x, y)| s.caches[ts].gbuf.tri[(y * 256 + x) as usize] != u32::MAX) + .filter(|&(x, y)| { + let v = c.value(Channel::BaseColor, x, y); + v[0] > 0.8 && v[1] < 0.2 + }) + .count() +} + +#[test] +fn instances_follow_their_source_across_texture_sets() { + let mut s = session(); + let src = id(execute(&mut s, "layer.add.fill", &json!({"roughness": 0.8})).unwrap(), "layer"); + let inst = id(execute(&mut s, "layer.instance", &json!({"layer": src.0, "ts": 1})).unwrap(), "layer"); + assert!(matches!(s.doc.project.layer(inst).unwrap().kind, LayerKind::Instance { source } if source == src)); + assert_eq!(s.doc.project.locate(inst).map(|l| l.0), Some(1)); + assert!((rough(&mut s, 1) - 0.8).abs() < 1e-3); + // Editing the source (directly or through the instance) updates the instance's set. + execute(&mut s, "layer.fill.set", &json!({"layer": src.0, "channel": "roughness", "value": 0.3})).unwrap(); + assert!(!s.caches[1].dirty.is_empty(), "the instance's set is invalidated"); + assert!((rough(&mut s, 1) - 0.3).abs() < 1e-3); + execute(&mut s, "layer.fill.set", &json!({"layer": inst.0, "channel": "roughness", "value": 0.6})).unwrap(); + assert!((rough(&mut s, 0) - 0.6).abs() < 1e-3 && (rough(&mut s, 1) - 0.6).abs() < 1e-3); + execute(&mut s, "layer.blend", &json!({"layer": inst.0, "channel": "roughness", "opacity": 0.5})).unwrap(); + assert_eq!(s.doc.project.layer(src).unwrap().blend(Channel::Roughness).unwrap().opacity, 0.5, "blending is linked"); + // Inspect shows the link; an instance of an instance links to the source. + let stack = execute(&mut s, "layer.list", &json!({"ts": 1})).unwrap(); + assert_eq!(stack[0]["instanceOf"]["layer"], src.0, "{stack}"); + let again = id(execute(&mut s, "layer.instance", &json!({"layer": inst.0, "ts": 1})).unwrap(), "layer"); + assert_eq!(s.doc.project.layer(again).unwrap().instance_source(), Some(src)); + // Save/load keeps instances; undo removes them. + let back = Session::from_project_bytes(&s.to_project_bytes().unwrap()).unwrap(); + assert_eq!(back.doc.project, s.doc.project); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + assert!(s.doc.project.layer(again).is_err()); +} + +#[test] +fn painting_a_source_paints_its_instances() { + let mut s = session(); + let paint = s.selected_layer().unwrap(); + execute(&mut s, "layer.instance", &json!({"layer": paint.0, "ts": 1})).unwrap(); + execute(&mut s, "textureSet.select", &json!({"ts": 0})).unwrap(); + execute(&mut s, "layer.select", &json!({"layer": paint.0})).unwrap(); + execute(&mut s, "tool.material", &json!({"channel": "baseColor", "color": [1.0, 0.0, 0.0]})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 30, "hardness": 90})).unwrap(); + assert_eq!(reds(&s, 1), 0); + // The live stroke shows in the instance before it is committed. + s.begin_stroke(Vec2::new(200.0, 170.0), s.viewport, 1.0).unwrap(); + s.continue_stroke(Vec2::new(230.0, 170.0), 1.0); + s.update(); + let live = reds(&s, 1); + assert!(live > 0, "the instance shows the live stroke"); + s.end_stroke().unwrap(); + s.update(); + assert!(reds(&s, 1) >= live); + // Painting through the instance paints the source. + let inst = s.doc.project.texture_sets[1].stack.last().copied().unwrap(); + execute(&mut s, "layer.select", &json!({"layer": inst.0})).unwrap(); + let before = s.doc.pixels.layer(paint, Channel::BaseColor).map(|i| i.allocated_count()).unwrap_or(0); + execute(&mut s, "tool.stroke", &json!({"points": [[150, 330], [250, 330]]})).unwrap(); + assert!(s.doc.pixels.layer(paint, Channel::BaseColor).unwrap().allocated_count() >= before); + assert!(s.doc.pixels.layers.keys().all(|(l, _)| *l != inst), "instances hold no pixels"); +} + +#[test] +fn cycles_are_refused_and_removed_sources_detach() { + let mut s = session(); + let g = id(execute(&mut s, "layer.add.group", &Value::Null).unwrap(), "layer"); + let fill = id(execute(&mut s, "layer.add.fill", &json!({"roughness": 0.9})).unwrap(), "layer"); + assert_eq!(s.doc.project.locate(fill).unwrap().1, Some(g)); + // The folder selected: the instance would land inside it and draw itself. + execute(&mut s, "layer.select", &json!({"layer": g.0})).unwrap(); + let doc = s.doc.project.clone(); + assert!(execute(&mut s, "layer.instance", &json!({"layer": g.0})).is_err()); + assert_eq!(s.doc.project, doc, "a refused edit leaves the document as it was"); + // Moving an instance of the folder into it is refused too. + execute(&mut s, "layer.select", &json!({"layer": fill.0})).unwrap(); + execute(&mut s, "layer.move", &json!({"layer": fill.0, "above": Value::Null})).unwrap(); + execute(&mut s, "layer.select", &json!({"layer": fill.0})).unwrap(); + let inst = id(execute(&mut s, "layer.instance", &json!({"layer": g.0})).unwrap(), "layer"); + assert!(execute(&mut s, "layer.move", &json!({"layer": inst.0, "above": Value::Null, "inside": false})).is_ok()); + assert!(execute(&mut s, "layer.move", &json!({"layer": inst.0, "above": g.0, "inside": true})).is_err()); + + // Removing a source turns its instances into copies that look the same. + let src = id(execute(&mut s, "layer.add.fill", &json!({"roughness": 0.15})).unwrap(), "layer"); + execute(&mut s, "layer.instantiateAll", &json!({"layer": src.0})).unwrap(); + let inst = s.doc.project.texture_sets[1].stack.last().copied().unwrap(); + assert!(s.doc.project.layer(inst).unwrap().instance_source() == Some(src)); + let look = rough(&mut s, 1); + assert!((look - 0.15).abs() < 1e-3); + execute(&mut s, "layer.remove", &json!({"layer": src.0})).unwrap(); + assert!(s.doc.project.layer(inst).is_err()); + let copy = s.doc.project.texture_sets[1].stack.last().copied().unwrap(); + assert!(matches!(s.doc.project.layer(copy).unwrap().kind, LayerKind::Fill(_))); + assert!((rough(&mut s, 1) - look).abs() < 1e-4); + s.doc.project.validate().unwrap(); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + assert_eq!(s.doc.project.layer(inst).unwrap().instance_source(), Some(src)); +} + +#[test] +fn paste_as_instance_and_instantiate_or_copy_across_sets() { + let mut s = session(); + let src = id(execute(&mut s, "layer.add.fill", &json!({"roughness": 0.7})).unwrap(), "layer"); + assert!(execute(&mut s, "layer.pasteInstance", &Value::Null).is_err(), "empty clipboard"); + execute(&mut s, "layer.copy", &json!({"layer": src.0})).unwrap(); + execute(&mut s, "textureSet.select", &json!({"ts": 1})).unwrap(); + let pasted = id(execute(&mut s, "layer.pasteInstance", &Value::Null).unwrap(), "layer"); + assert_eq!(s.doc.project.layer(pasted).unwrap().instance_source(), Some(src)); + assert_eq!(s.selected_layer(), Some(pasted)); + // A cut layer is gone: paste it, not an instance of it. + execute(&mut s, "layer.cut", &json!({"layer": pasted.0})).unwrap(); + assert!(execute(&mut s, "layer.pasteInstance", &Value::Null).is_err()); + + let made = execute(&mut s, "layer.instantiateAll", &json!({"layer": src.0})).unwrap(); + let inst = LayerId(made["layers"][0].as_u64().unwrap()); + assert_eq!(s.doc.project.layer(inst).unwrap().instance_source(), Some(src)); + let made = execute(&mut s, "layer.instantiateAll", &json!({"layer": src.0, "copy": true})).unwrap(); + let copy = LayerId(made["layers"][0].as_u64().unwrap()); + assert!(matches!(s.doc.project.layer(copy).unwrap().kind, LayerKind::Fill(_))); + // Flattening an instance makes it an independent paint layer with the same look. + let look = rough(&mut s, 1); + execute(&mut s, "layer.remove", &json!({"layer": copy.0})).unwrap(); + execute(&mut s, "layer.flatten", &json!({"layer": inst.0})).unwrap(); + let l = s.doc.project.layer(inst).unwrap(); + assert!(matches!(l.kind, LayerKind::Paint) && l.blend(Channel::Roughness).is_some()); + assert!((rough(&mut s, 1) - look).abs() < 2e-3); +} + +#[test] +fn mask_with_height_through_layer_set() { + let mut s = session(); + let l = id(execute(&mut s, "layer.add.fill", &json!({"color": [1.0, 1.0, 1.0], "height": 0.5})).unwrap(), "layer"); + execute(&mut s, "mask.add.black", &Value::Null).unwrap(); + execute(&mut s, "effect.add.fill", &json!({"value": 0.5})).unwrap(); + let (x, y) = covered(&s, 0); + s.update(); + let plain = s.caches[0].composite.value(Channel::BaseColor, x, y)[0]; + let r = execute(&mut s, "layer.set", &json!({"layer": l.0, "heightMask": {"enabled": true, "contrast": 1.0, "offset": 0.0}})).unwrap(); + assert_eq!(r["heightMask"]["enabled"], true); + s.update(); + let with = s.caches[0].composite.value(Channel::BaseColor, x, y)[0]; + assert!((plain - 0.75).abs() < 0.01 && (with - 1.0).abs() < 0.01, "{plain} {with}"); + let inspect = execute(&mut s, "layer.list", &Value::Null).unwrap(); + assert_eq!(inspect[0]["heightMask"]["contrast"], 1.0); + execute(&mut s, "layer.set", &json!({"layer": l.0, "heightMask": false})).unwrap(); + assert!(!s.doc.project.layer(l).unwrap().height_mask.enabled); + assert!(execute(&mut s, "layer.set", &json!({"layer": l.0})).is_err()); + assert!(execute(&mut s, "layer.set", &json!({"layer": l.0, "heightMask": 3})).is_err()); + let hostile = execute(&mut s, "layer.set", &json!({"layer": l.0, "heightMask": {"contrast": 1e30, "offset": -1e30}})).unwrap(); + assert_eq!(hostile["heightMask"]["contrast"], 64.0); + assert_eq!(hostile["heightMask"]["offset"], -1.0); +} + +#[test] +fn edits_invalidate_only_the_sets_they_change() { + let mut s = session(); + let l = id(execute(&mut s, "layer.add.fill", &json!({"roughness": 0.4})).unwrap(), "layer"); + s.update(); + execute(&mut s, "layer.rename", &json!({"layer": l.0, "name": "Renamed"})).unwrap(); + assert_eq!(s.pending_tiles(), 0, "a rename changes no pixels"); + execute(&mut s, "layer.fill.set", &json!({"layer": l.0, "channel": "roughness", "value": 0.2})).unwrap(); + assert!(!s.caches[0].dirty.is_empty() && s.caches[1].dirty.is_empty(), "only the edited set"); + s.update(); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + assert!(!s.caches[0].dirty.is_empty() && s.caches[1].dirty.is_empty()); + assert!((rough(&mut s, 0) - 0.4).abs() < 1e-3); +} + +#[test] +fn budgeted_updates_spread_work_and_end_identical() { + let mut s = session(); + execute(&mut s, "textureSet.resolution", &json!({"ts": 0, "resolution": 1024})).unwrap(); + execute(&mut s, "layer.add.fill", &Value::Null).unwrap(); + execute(&mut s, "layer.fill.set", &json!({"channel": "baseColor", "procedural": "grunge"})).unwrap(); + execute(&mut s, "mask.add.black", &Value::Null).unwrap(); + execute(&mut s, "effect.add.generator", &json!({"generator": "position"})).unwrap(); + execute(&mut s, "effect.add.filter", &json!({"filter": "blur", "radius": 30})).unwrap(); + s.update(); + let full = s.caches[0].composite.clone(); + s.caches[0].invalidate_all(); + // A clock that is always over budget: one chunk per call. + let mut calls = 0; + while s.pending_tiles() > 0 { + let before = s.pending_tiles(); + s.update_for(0.0, || 1.0); + assert!(s.pending_tiles() < before); + calls += 1; + } + assert!(calls > 1, "the work was spread over calls"); + assert!(s.caches[0].composite == full, "chunked compositing gives the same pixels"); + assert!(s.memory().composites > 0); +} diff --git a/crates/engine/tests/path_tool.rs b/crates/engine/tests/path_tool.rs new file mode 100644 index 00000000..72f485df --- /dev/null +++ b/crates/engine/tests/path_tool.rs @@ -0,0 +1,131 @@ +//! The Path tool (stroked and filled paths, 3D and 2D) and the particle brush, driven through +//! engine commands the way agents paint. + +use serde_json::{Value, json}; +use texturecraft_engine::core::Channel; +use texturecraft_engine::geom::glam::{Vec2, Vec3, Vec4}; +use texturecraft_engine::geom::{Mesh, primitives}; +use texturecraft_engine::{Session, execute}; + +const RES: f32 = 256.0; + +fn session(mesh: Mesh) -> Session { + let mut s = Session::new_project("t", mesh, "builtin:test", None, 256).unwrap(); + s.viewport = Vec2::new(400.0, 400.0); + s.camera.yaw = 0.0; + s.camera.pitch = 0.0; + s.update(); + execute(&mut s, "tool.material", &json!({"channel": "baseColor", "color": [1.0, 0.0, 0.0]})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 6, "hardness": 90})).unwrap(); + s +} + +fn red_uv(s: &Session, u: f32, v: f32) -> bool { + let c = s.caches[0].composite.value(Channel::BaseColor, (u * RES) as u32, (v * RES) as u32); + c[0] > 0.85 && c[1] < 0.15 +} + +/// Is the surface under a viewport point painted red? +fn red_at(s: &Session, x: f32, y: f32) -> bool { + let hit = s.pick(Vec2::new(x, y), s.viewport).unwrap(); + red_uv(s, hit.uv.x, hit.uv.y) +} + +#[test] +fn path_stroke_paints_along_the_curve() { + let mut s = session(primitives::sphere(1.0, 48, 24)); + let r = execute(&mut s, "tool.path", &json!({"points": [[140, 210], [200, 180], [260, 210]]})).unwrap(); + assert_eq!(r["points"], 3); + assert_eq!(s.tool.tool, texturecraft_engine::Tool::Path); + assert!(!red_at(&s, 200.0, 180.0), "nothing painted before commit"); + let r = execute(&mut s, "tool.path", &json!({"commit": true})).unwrap(); + assert!(r["committed"]["stamps"].as_u64().unwrap() > 10, "{r}"); + assert_eq!(r["points"], 0, "commit clears the path"); + for (x, y) in [(140.0, 210.0), (200.0, 180.0), (260.0, 210.0), (170.0, 191.0)] { + assert!(red_at(&s, x, y), "on the curve at {x},{y}"); + } + assert!(!red_at(&s, 200.0, 240.0), "below the curve"); + assert!(!red_at(&s, 200.0, 130.0), "above the curve"); + // One undo step. + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + s.update(); + assert!(!red_at(&s, 200.0, 180.0)); + // Errors: no points, points off the mesh. + assert!(execute(&mut s, "tool.path", &json!({"commit": true})).is_err()); + assert!(execute(&mut s, "tool.path", &json!({"points": [[2, 2]]})).is_err()); +} + +#[test] +fn uv_path_strokes_in_texture_space() { + let mut s = session(primitives::sphere(1.0, 48, 24)); + execute(&mut s, "tool.path", &json!({"uvPoints": [[0.2, 0.5], [0.5, 0.45], [0.8, 0.5]], "commit": true})).unwrap(); + assert!(red_uv(&s, 0.5, 0.45) && red_uv(&s, 0.2, 0.5) && red_uv(&s, 0.8, 0.5)); + assert!(!red_uv(&s, 0.5, 0.6)); +} + +#[test] +fn closed_filled_path_fills_the_inside_only() { + let mut s = session(primitives::sphere(1.0, 48, 24)); + let square = json!([[160, 160], [240, 160], [240, 240], [160, 240]]); + execute(&mut s, "tool.path", &json!({"points": square, "closed": true, "fill": true, "commit": true})).unwrap(); + for (x, y) in [(200.0, 200.0), (170.0, 170.0), (230.0, 230.0)] { + assert!(red_at(&s, x, y), "inside at {x},{y}"); + } + for (x, y) in [(200.0, 125.0), (275.0, 200.0), (125.0, 200.0), (200.0, 275.0)] { + assert!(!red_at(&s, x, y), "outside at {x},{y}"); + } + // The far side of the sphere, hidden from the camera, stays clean. + s.camera.yaw = std::f32::consts::PI; + assert!(!red_at(&s, 200.0, 200.0), "hidden back side"); + + // A 2D lasso fills the UV region. + let mut s = session(primitives::sphere(1.0, 48, 24)); + execute(&mut s, "tool.path", &json!({"uvPoints": [[0.3, 0.3], [0.7, 0.3], [0.7, 0.7], [0.3, 0.7]], "closed": true, "fill": true, "commit": true})).unwrap(); + assert!(red_uv(&s, 0.5, 0.5) && red_uv(&s, 0.35, 0.65)); + assert!(!red_uv(&s, 0.2, 0.5) && !red_uv(&s, 0.5, 0.85)); + // Options persist between paths; a filled path needs three points. + assert!(execute(&mut s, "tool.path", &json!({"uvPoints": [[0.1, 0.1], [0.2, 0.2]], "closed": false, "commit": true})).is_ok()); + assert!(execute(&mut s, "tool.path", &json!({"uvPoints": [[0.1, 0.1], [0.2, 0.2]], "closed": true, "fill": true, "commit": true})).is_err()); +} + +/// A 2×2 wall facing the camera (+Z): v grows downward (world −Y). +fn wall() -> Mesh { + let mut m = primitives::plane(2.0, 8); + for p in &mut m.positions { + *p = Vec3::new(p.x, -p.z, 0.0); + } + m.normals.iter_mut().for_each(|n| *n = Vec3::Z); + m.tangents.iter_mut().for_each(|t| *t = Vec4::new(1.0, 0.0, 0.0, 1.0)); + m +} + +/// Painted texel rows (v) after one particle dab at the wall's center. +fn particle_rows() -> Vec { + let mut s = session(wall()); + execute(&mut s, "tool.brush", &json!({"size": 10, "particles": {"enabled": true, "count": 6, "lifetime": 40, "gravity": 1.5}})).unwrap(); + let hit = s.pick(Vec2::new(200.0, 200.0), s.viewport).unwrap(); + assert!((hit.uv.y - 0.5).abs() < 0.02, "{hit:?}"); + execute(&mut s, "tool.stroke", &json!({"points": [[200, 200]]})).unwrap(); + let mut rows = Vec::new(); + for y in 0..RES as u32 { + for x in 0..RES as u32 { + let c = s.caches[0].composite.value(Channel::BaseColor, x, y); + if c[0] > 0.85 && c[1] < 0.5 { + rows.push(y); + } + } + } + rows +} + +#[test] +fn particle_brush_paints_below_the_start_and_is_deterministic() { + let rows = particle_rows(); + assert!(!rows.is_empty()); + let start = (0.5 * RES) as u32; + let lowest = rows.iter().max().copied().unwrap(); + let highest = rows.iter().min().copied().unwrap(); + assert!(lowest > start + 40, "trails run down the wall: {lowest}"); + assert!(highest + 20 > start, "nothing well above the start: {highest}"); + assert_eq!(rows, particle_rows()); +} diff --git a/crates/engine/tests/perf.rs b/crates/engine/tests/perf.rs new file mode 100644 index 00000000..19f50247 --- /dev/null +++ b/crates/engine/tests/perf.rs @@ -0,0 +1,137 @@ +//! Compositing benchmarks at 4K and 8K (run with `--ignored --nocapture` in release). + +use std::time::{Duration, Instant}; + +use rayon::prelude::*; +use serde_json::{Value, json}; +use texturecraft_engine::compose::{DisplayKind, tile_bytes}; +use texturecraft_engine::geom::glam::Vec2; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, execute}; + +/// A ~10 layer stack: procedural fills, generators, a blurred mask, a folder and painted layers. +fn stack(res: u32) -> Session { + let mut s = Session::new_project("perf", primitives::sphere(1.0, 64, 32), "builtin:sphere", None, res).unwrap(); + s.viewport = Vec2::new(800.0, 800.0); + let run = |s: &mut Session, id: &str, p: Value| execute(s, id, &p).unwrap(); + run(&mut s, "layer.add.fill", json!({"color": [0.6, 0.5, 0.4], "roughness": 0.6})); + run(&mut s, "layer.fill.set", json!({"channel": "baseColor", "procedural": "clouds", "low": [0.2, 0.2, 0.2], "high": [0.8, 0.7, 0.6]})); + run(&mut s, "layer.fill.set", json!({"channel": "height", "procedural": "cells", "low": [-0.2, -0.2, -0.2], "high": [0.2, 0.2, 0.2]})); + run(&mut s, "layer.add.fill", json!({"color": [0.1, 0.3, 0.6]})); + run(&mut s, "layer.fill.set", json!({"channel": "roughness", "procedural": "grunge"})); + run(&mut s, "mask.add.black", Value::Null); + run(&mut s, "effect.add.generator", json!({"generator": "position", "level": 0.5})); + run(&mut s, "effect.add.filter", json!({"filter": "blur", "radius": 8})); + run(&mut s, "layer.add.fill", json!({"roughness": 0.3})); + run(&mut s, "layer.fill.set", json!({"channel": "baseColor", "procedural": "wood"})); + run(&mut s, "layer.fill.projection", json!({"projection": "triplanar", "scale": 2})); + run(&mut s, "mask.add.black", Value::Null); + run(&mut s, "effect.add.fill", json!({"procedural": "scratches", "scale": 6})); + run(&mut s, "layer.add.fill", json!({"color": [0.2, 0.2, 0.2], "metallic": 1.0})); + run(&mut s, "mask.add.black", Value::Null); + run(&mut s, "effect.add.generator", json!({"generator": "dirt"})); + run(&mut s, "layer.add.fill", json!({"roughness": 0.8})); + run(&mut s, "layer.fill.set", json!({"channel": "roughness", "procedural": "marble"})); + run(&mut s, "layer.add.group", Value::Null); + run(&mut s, "layer.add.fill", json!({"color": [0.9, 0.9, 0.2]})); + run(&mut s, "mask.add.black", Value::Null); + run(&mut s, "effect.add.generator", json!({"generator": "direction"})); + run(&mut s, "effect.add.levels", json!({"inLow": 0.3, "inHigh": 0.7})); + let top = s.doc.project.texture_sets[0].stack.last().copied().unwrap(); + run(&mut s, "layer.select", json!({"layer": top.0})); + run(&mut s, "layer.add.paint", Value::Null); + run(&mut s, "tool.brush", json!({"size": 6, "hardness": 80})); + run(&mut s, "tool.stroke", json!({"points": [[200, 300], [600, 500]]})); + run(&mut s, "layer.add.paint", Value::Null); + s.update(); + s +} + +fn upload_bytes(s: &mut Session) -> usize { + let tiles = s.take_uploads(0); + let baked = s.baked(0).cloned().unwrap_or_default(); + let comp = &s.caches[0].composite; + // As the UI does it (in parallel). + tiles.par_iter().flat_map_iter(|&(tx, ty)| DisplayKind::ALL.map(|k| tile_bytes(comp, &baked, k, tx, ty).len())).sum() +} + +fn mb(b: usize) -> f64 { + b as f64 / (1024.0 * 1024.0) +} + +fn bench(res: u32) { + let t = Instant::now(); + let mut s = stack(res); + println!("[{res}²] setup {:.2?} ({} layers, {} covered tiles)", t.elapsed(), s.doc.project.walk(0).len(), s.caches[0].covered_tiles.len()); + s.caches[0].invalidate_all(); + let t = Instant::now(); + s.update(); + println!("[{res}²] full recomposite (Session::update) {:.2?}", t.elapsed()); + let t = Instant::now(); + let up = upload_bytes(&mut s); + println!("[{res}²] full display tile conversion {:.2?} ({:.0} MB)", t.elapsed(), mb(up)); + + // The UI's budgeted update: a full recomposite spread over frames. + s.caches[0].invalidate_all(); + let clock = Instant::now(); + let ms = || clock.elapsed().as_secs_f64() * 1000.0; + let (mut frames, mut worst) = (0, Duration::ZERO); + while s.pending_tiles() > 0 { + let t = Instant::now(); + s.update_for(30.0, ms); + worst = worst.max(t.elapsed()); + frames += 1; + } + println!("[{res}²] budgeted full recomposite: {frames} frames, worst frame {worst:.2?}, total {:.2?}", clock.elapsed()); + + // Strokes on the top paint layer, twice over the same path: per-frame dirty-tile composite + // + display conversion, then the commit. Brush sizes are relative to the mesh: the largest + // one covers a third of the texture per stamp. + for (size, brush) in [(0.5, "largest brush"), (0.02, "default brush")] { + s.tool.brush.size = size; + for pass in ["1st stroke", "2nd stroke"] { + let (mut comp, mut conv, mut worst, mut tiles) = (Duration::ZERO, Duration::ZERO, Duration::ZERO, 0usize); + s.begin_stroke(Vec2::new(250.0, 400.0), s.viewport, 1.0).unwrap(); + let frames = 40; + for i in 0..frames { + let p = Vec2::new(250.0 + i as f32 * 8.0, 400.0 + (i as f32 * 0.3).sin() * 40.0); + s.continue_stroke(p, 1.0); + tiles += s.caches[0].dirty.len(); + let t = Instant::now(); + s.update(); + let c = t.elapsed(); + let t = Instant::now(); + upload_bytes(&mut s); + let u = t.elapsed(); + comp += c; + conv += u; + worst = worst.max(c + u); + } + s.end_stroke().unwrap(); + let t = Instant::now(); + s.update(); + let commit = t.elapsed(); + let f = frames as u32; + println!( + "[{res}²] {brush}, {pass}: frame composite {:.2?} + display {:.2?} avg, worst {worst:.2?} ({:.0} dirty tiles/frame); commit {commit:.2?}", + comp / f, + conv / f, + tiles as f64 / frames as f64 + ); + } + } + let m = s.memory(); + println!("[{res}²] memory: layer pixels {:.1} MB, composites {:.1} MB, below-stack cache {:.1} MB", mb(m.pixels), mb(m.composites), mb(m.cache)); +} + +#[test] +#[ignore] +fn bench_4k() { + bench(4096); +} + +#[test] +#[ignore] +fn bench_8k() { + bench(8192); +} diff --git a/crates/engine/tests/session.rs b/crates/engine/tests/session.rs new file mode 100644 index 00000000..612b8cd0 --- /dev/null +++ b/crates/engine/tests/session.rs @@ -0,0 +1,193 @@ +use serde_json::{Value, json}; +use texturecraft_engine::core::Channel; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, command_specs, execute}; + +fn session() -> Session { + let mut s = Session::new_project("t", primitives::sphere(1.0, 48, 24), "builtin:sphere", None, 256).unwrap(); + s.viewport = texturecraft_engine::geom::glam::Vec2::new(400.0, 400.0); + s.camera.yaw = 0.0; + s.camera.pitch = 0.0; + s.update(); + s +} + +#[test] +fn scripted_stroke_paints_and_undo_restores() { + let mut s = session(); + execute(&mut s, "tool.material", &json!({"channel": "baseColor", "color": [1.0, 0.0, 0.0]})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 20, "hardness": 90})).unwrap(); + let r = execute(&mut s, "tool.stroke", &json!({"points": [[180, 200], [220, 200]]})).unwrap(); + assert!(r["stamps"].as_u64().unwrap() > 1); + // The texel under the screen center is now red. + let hit = s.pick(texturecraft_engine::geom::glam::Vec2::new(200.0, 200.0), s.viewport).unwrap(); + let res = 256.0; + let (x, y) = ((hit.uv.x * res) as u32, (hit.uv.y * res) as u32); + let v = s.caches[0].composite.value(Channel::BaseColor, x, y); + assert!(v[0] > 0.9 && v[1] < 0.1, "{v:?}"); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + s.update(); + let v = s.caches[0].composite.value(Channel::BaseColor, x, y); + assert!((v[0] - 0.5).abs() < 0.01, "{v:?}"); + execute(&mut s, "edit.redo", &Value::Null).unwrap(); + s.update(); + assert!(s.caches[0].composite.value(Channel::BaseColor, x, y)[0] > 0.9); +} + +#[test] +fn layers_masks_materials_and_bake() { + let mut s = session(); + execute(&mut s, "layer.add.fill", &json!({"color": "#336699", "roughness": 0.2})).unwrap(); + execute(&mut s, "mask.add.black", &Value::Null).unwrap(); + execute(&mut s, "effect.add.generator", &json!({"generator": "position", "level": 0.5})).unwrap(); + execute(&mut s, "bake.run", &json!({"resolution": 128, "rays": 8})).unwrap(); + execute(&mut s, "material.apply", &json!({"material": "steel_painted_worn"})).unwrap(); + execute(&mut s, "layer.group", &Value::Null).unwrap(); + execute(&mut s, "layer.duplicate", &Value::Null).unwrap(); + let inspect = execute(&mut s, "project.inspect", &Value::Null).unwrap(); + assert!(inspect["layers"].as_array().unwrap().len() >= 3, "{inspect}"); + s.doc.project.validate().unwrap(); + s.update(); + for _ in 0..7 { + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + } + assert_eq!(s.doc.project.walk(0).len(), 1, "back to the initial paint layer"); +} + +#[test] +fn polygon_fill_and_color_picker() { + let mut s = session(); + execute(&mut s, "tool.material", &json!({"channel": "roughness", "value": 0.9})).unwrap(); + execute(&mut s, "tool.polygonFill", &Value::Null).unwrap(); + execute(&mut s, "tool.fillMode", &json!({"mode": "mesh"})).unwrap(); + execute(&mut s, "tool.click", &json!({"x": 200, "y": 200})).unwrap(); + execute(&mut s, "tool.colorPicker", &Value::Null).unwrap(); + let r = execute(&mut s, "tool.click", &json!({"x": 200, "y": 200})).unwrap(); + assert!((r["roughness"][0].as_f64().unwrap() - 0.9).abs() < 0.01, "{r}"); +} + +/// Every command must return Ok or Err — never panic — for hostile params. +#[test] +fn panic_hunt() { + let hostile = [ + Value::Null, + json!({}), + json!({"layer": u64::MAX, "ts": 99, "channel": "nope", "mode": "???", "opacity": f64::MAX}), + json!({"layer": 1, "index": -5, "delta": i64::MIN, "above": "x", "points": [[f64::MAX, -1e300]], "size": -1e30}), + json!({"resolution": 0, "maps": ["x"], "rays": u64::MAX, "antialiasing": 3, "color": [1], "value": "nan"}), + json!({"effect": 0, "x": 1e30, "y": -1e30, "viewport": [0, 0], "mesh": "../../etc", "material": ""}), + ]; + for spec in command_specs() { + if spec.id == "project.sample" { + continue; // slow (bakes); covered elsewhere + } + for p in &hostile { + let mut s = session(); + let _ = execute(&mut s, spec.id, p); + s.update(); + } + } +} + +#[test] +fn copy_paste_flatten_and_resize_keep_the_look() { + let mut s = Session::new_project("t", primitives::material_ball(), "builtin:material_ball", None, 256).unwrap(); + s.viewport = texturecraft_engine::geom::glam::Vec2::new(400.0, 400.0); + execute(&mut s, "layer.add.fill", &json!({"color": [0.9, 0.1, 0.1], "roughness": 0.3})).unwrap(); + execute(&mut s, "mask.add.black", &Value::Null).unwrap(); + execute(&mut s, "effect.add.fill", &json!({"procedural": "checker", "scale": 4})).unwrap(); + s.update(); + let before: Vec<[f32; 3]> = (0..256).step_by(9).map(|x| s.caches[0].composite.value(Channel::BaseColor, x, 100)).collect(); + // Flatten keeps the composite identical (within 8-bit-ish tolerance) and makes a paint layer. + let id = s.selected_layer().unwrap(); + execute(&mut s, "layer.flatten", &json!({"layer": id.0})).unwrap(); + s.update(); + let after: Vec<[f32; 3]> = (0..256).step_by(9).map(|x| s.caches[0].composite.value(Channel::BaseColor, x, 100)).collect(); + for (a, b) in before.iter().zip(&after) { + for k in 0..3 { + assert!((a[k] - b[k]).abs() < 2e-3, "{a:?} {b:?}"); + } + } + assert!(matches!(s.doc.project.layer(id).unwrap().kind, texturecraft_engine::core::LayerKind::Paint)); + // Copy into the other texture set (different resolution). + execute(&mut s, "textureSet.resolution", &json!({"ts": 1, "resolution": 128})).unwrap(); + execute(&mut s, "layer.copy", &Value::Null).unwrap(); + execute(&mut s, "textureSet.select", &json!({"ts": 1})).unwrap(); + let r = execute(&mut s, "layer.paste", &Value::Null).unwrap(); + let pasted = texturecraft_engine::core::LayerId(r["layer"].as_u64().unwrap()); + assert_eq!(s.doc.pixels.layer(pasted, Channel::BaseColor).unwrap().width(), 128); + // Resizing resamples instead of clearing. + execute(&mut s, "textureSet.resolution", &json!({"ts": 0, "resolution": 512})).unwrap(); + assert_eq!(s.doc.pixels.layer(id, Channel::BaseColor).unwrap().width(), 512); + s.update(); + let big = s.caches[0].composite.value(Channel::BaseColor, 2 * 9 * 5, 200); + let small = before[5]; + assert!((big[0] - small[0]).abs() < 0.2, "{big:?} {small:?}"); + execute(&mut s, "layer.instantiateAll", &json!({"layer": id.0})).unwrap(); + s.doc.project.validate().unwrap(); +} + +#[test] +fn image_resources_fill_layers_and_round_trip() { + let mut s = session(); + let mut png = Vec::new(); + let img = image::RgbaImage::from_fn(8, 8, |_, _| image::Rgba([255, 0, 0, 255])); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + let name = s.import_resource_bytes("C:/x/red bricks.png", png).unwrap(); + assert_eq!(name, "red_bricks.png"); + let r = execute(&mut s, "layer.add.image", &json!({"name": name})).unwrap(); + assert!(r["layer"].as_u64().is_some()); + s.update(); + let v = s.caches[0].composite.value(Channel::BaseColor, 128, 128); + assert!(v[0] > 0.95 && v[1] < 0.05, "{v:?}"); + let bytes = s.to_project_bytes().unwrap(); + let back = Session::from_project_bytes(&bytes).unwrap(); + assert_eq!(back.doc.resources.len(), 1); + assert_eq!(back.images.len(), 1); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + assert!(s.images.is_empty(), "undoing the import forgets the decoded image"); + assert!(s.import_resource_bytes("bad.png", vec![1, 2, 3]).is_err()); +} + +#[test] +fn projection_tool_paints_the_stencil_colors() { + let mut s = session(); + let mut png = Vec::new(); + let img = image::RgbaImage::from_fn(16, 16, |x, _| if x < 8 { image::Rgba([255, 0, 0, 255]) } else { image::Rgba([0, 255, 0, 255]) }); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + let name = s.import_resource_bytes("split.png", png).unwrap(); + execute(&mut s, "tool.projection", &Value::Null).unwrap(); + // Without a stencil the tool explains what's missing. + assert!(execute(&mut s, "tool.stroke", &json!({"points": [[150, 200]]})).is_err()); + execute(&mut s, "tool.stencil", &json!({"image": name, "scale": 1.0, "tile": true})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 6, "hardness": 90})).unwrap(); + for x in [150.0f32, 250.0] { + execute(&mut s, "tool.stroke", &json!({"points": [[x, 200.0]]})).unwrap(); + } + let vp = s.viewport; + let at = |s: &Session, x: f32| { + let hit = s.pick(texturecraft_engine::geom::glam::Vec2::new(x, 200.0), vp).unwrap(); + s.caches[0].composite.value(Channel::BaseColor, (hit.uv.x * 256.0) as u32, (hit.uv.y * 256.0) as u32) + }; + let left = at(&s, 150.0); + let right = at(&s, 250.0); + assert!(left[0] > 0.8 && left[1] < 0.2, "left {left:?}"); + assert!(right[1] > 0.8 && right[0] < 0.2, "right {right:?}"); +} + +#[test] +fn smart_materials_save_and_load_with_pixels() { + let mut s = Session::new_project("t", primitives::material_ball(), "builtin:material_ball", None, 256).unwrap(); + s.viewport = texturecraft_engine::geom::glam::Vec2::new(400.0, 400.0); + let group = texturecraft_engine::materials::apply(&mut s, "steel_painted_worn").unwrap(); + let before = s.doc.project.walk(0).len(); + let bytes = s.smart_material_bytes(group, "My Steel").unwrap(); + execute(&mut s, "textureSet.select", &json!({"ts": 1})).unwrap(); + let id = s.add_smart_material_bytes(&bytes).unwrap(); + assert_eq!(s.doc.project.layer(id).unwrap().name, "My Steel"); + let walked = s.doc.project.walk(1).len(); + assert_eq!(walked, 1 + (before - 1), "the folder and its children arrive"); + assert!(s.add_smart_material_bytes(b"junk").is_err()); + s.doc.project.validate().unwrap(); +} diff --git a/crates/engine/tests/tools.rs b/crates/engine/tests/tools.rs new file mode 100644 index 00000000..d56d67a8 --- /dev/null +++ b/crates/engine/tests/tools.rs @@ -0,0 +1,130 @@ +//! Clone, smudge, image alphas and the quick mask, driven through engine commands the way +//! agents paint. + +use serde_json::{Value, json}; +use texturecraft_engine::core::Channel; +use texturecraft_engine::geom::glam::Vec2; +use texturecraft_engine::geom::primitives; +use texturecraft_engine::{Session, execute}; + +const RES: f32 = 256.0; + +fn session() -> Session { + let mut s = Session::new_project("t", primitives::sphere(1.0, 48, 24), "builtin:sphere", None, 256).unwrap(); + s.viewport = Vec2::new(400.0, 400.0); + s.camera.yaw = 0.0; + s.camera.pitch = 0.0; + s.update(); + s +} + +/// Base color of the composite under a viewport point. +fn color_at(s: &Session, x: f32, y: f32) -> [f32; 3] { + let hit = s.pick(Vec2::new(x, y), s.viewport).unwrap(); + s.caches[0].composite.value(Channel::BaseColor, (hit.uv.x * RES) as u32, (hit.uv.y * RES) as u32) +} + +fn red(v: [f32; 3]) -> bool { + v[0] > 0.85 && v[1] < 0.15 +} + +fn dab(s: &mut Session, x: f32, y: f32) { + execute(s, "tool.stroke", &json!({"points": [[x, y]]})).unwrap(); +} + +fn paint_red(s: &mut Session, size: f32) { + execute(s, "tool.paint", &Value::Null).unwrap(); + execute(s, "tool.material", &json!({"channel": "baseColor", "color": [1.0, 0.0, 0.0]})).unwrap(); + execute(s, "tool.brush", &json!({"size": size, "hardness": 90})).unwrap(); +} + +#[test] +fn clone_copies_values_from_the_source_offset() { + let mut s = session(); + paint_red(&mut s, 20.0); + dab(&mut s, 160.0, 200.0); + assert!(red(color_at(&s, 160.0, 200.0))); + assert!(!red(color_at(&s, 240.0, 200.0))); + + execute(&mut s, "tool.clone", &Value::Null).unwrap(); + assert!(execute(&mut s, "tool.stroke", &json!({"points": [[240, 200]]})).is_err(), "no source yet"); + execute(&mut s, "tool.cloneSource", &json!({"x": 160, "y": 200})).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 6})).unwrap(); + dab(&mut s, 240.0, 200.0); + let v = color_at(&s, 240.0, 200.0); + assert!(red(v), "cloned red: {v:?}"); + // The offset stays for the next strokes: the source moved along with the destination. + let off = s.tool.clone_source.unwrap().offset.unwrap(); + assert!(off[0].abs() > 0.01, "{off:?}"); + // One undo step per clone stroke. + execute(&mut s, "edit.undo", &Value::Null).unwrap(); + s.update(); + assert!(!red(color_at(&s, 240.0, 200.0))); +} + +#[test] +fn smudge_drags_color_along_the_stroke() { + let mut s = session(); + paint_red(&mut s, 12.0); + dab(&mut s, 170.0, 200.0); + let before = color_at(&s, 205.0, 200.0); + assert!(!red(before), "{before:?}"); + execute(&mut s, "tool.smudge", &Value::Null).unwrap(); + execute(&mut s, "tool.brush", &json!({"size": 10, "smudgeStrength": 100, "spacing": 5})).unwrap(); + let pts: Vec<[f32; 2]> = (0..=40).map(|i| [170.0 + i as f32, 200.0]).collect(); + execute(&mut s, "tool.stroke", &json!({"points": pts})).unwrap(); + let after = color_at(&s, 205.0, 200.0); + assert!(after[0] - before[0] > 0.2 && after[1] < before[1], "red dragged right: {before:?} -> {after:?}"); +} + +#[test] +fn image_alpha_shapes_the_stamp() { + let mut s = session(); + let mut png = Vec::new(); + // Top half white, bottom half black. + let img = image::RgbaImage::from_fn(16, 16, |_, y| if y < 8 { image::Rgba([255; 4]) } else { image::Rgba([0, 0, 0, 255]) }); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + let name = s.import_resource_bytes("half.png", png).unwrap(); + paint_red(&mut s, 20.0); + assert!(execute(&mut s, "tool.brush", &json!({"alpha": {"image": "missing.png"}})).is_err()); + let r = execute(&mut s, "tool.brush", &json!({"alpha": {"image": name}})).unwrap(); + assert_eq!(r["alpha"]["image"], json!(name)); + execute(&mut s, "tool.strokeUv", &json!({"points": [[0.5, 0.5]]})).unwrap(); + // In the 2D view +v points down: the image's top half lands above the center. + let at = |s: &Session, dy: i32| s.caches[0].composite.value(Channel::BaseColor, 128, (128 + dy) as u32); + assert!(red(at(&s, -12)), "{:?}", at(&s, -12)); + assert!(!red(at(&s, 12)), "{:?}", at(&s, 12)); + // A procedural alpha clears the image. + let r = execute(&mut s, "tool.brush", &json!({"alpha": "round"})).unwrap(); + assert_eq!(r["alpha"], json!("Round")); +} + +#[test] +fn quick_mask_limits_painting() { + let mut s = session(); + paint_red(&mut s, 20.0); + let r = execute(&mut s, "viewport.quickMask.edit", &Value::Null).unwrap(); + assert_eq!(r["editing"], json!(true)); + assert_eq!(r["enabled"], json!(true), "editing enables the mask"); + let undo = s.history_labels().len(); + dab(&mut s, 150.0, 200.0); + assert!(!red(color_at(&s, 150.0, 200.0)), "mask strokes do not paint the layer"); + assert_eq!(s.history_labels().len(), undo, "mask strokes stay out of the history"); + assert!(s.quick_mask_rgba(0, 64).is_some_and(|v| v.len() == 64 * 64 * 4)); + execute(&mut s, "viewport.quickMask.edit", &Value::Null).unwrap(); + + execute(&mut s, "tool.brush", &json!({"size": 6})).unwrap(); + dab(&mut s, 150.0, 200.0); + dab(&mut s, 250.0, 200.0); + assert!(red(color_at(&s, 150.0, 200.0)), "inside the mask"); + assert!(!red(color_at(&s, 250.0, 200.0)), "outside the mask"); + + execute(&mut s, "viewport.quickMask.invert", &Value::Null).unwrap(); + dab(&mut s, 250.0, 200.0); + assert!(red(color_at(&s, 250.0, 200.0)), "inverted: outside is open"); + + execute(&mut s, "viewport.quickMask", &json!({"enabled": false})).unwrap(); + execute(&mut s, "tool.material", &json!({"channel": "baseColor", "color": [0.0, 1.0, 0.0]})).unwrap(); + dab(&mut s, 150.0, 200.0); + assert!(color_at(&s, 150.0, 200.0)[1] > 0.85, "disabled: everything is open"); +} diff --git a/crates/formats/Cargo.toml b/crates/formats/Cargo.toml new file mode 100644 index 00000000..726d26b9 --- /dev/null +++ b/crates/formats/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "texturecraft-formats" +description = "TextureCraft file formats: mesh import (glTF, FBX, COLLADA, OBJ, PLY, STL), glTF/OBJ mesh export, texture export presets, the .tcraft project file" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-texel = { workspace = true } +texturecraft-geom = { workspace = true } +texturecraft-compose = { workspace = true } +image = { workspace = true } +gltf = { workspace = true } +tobj = { workspace = true } +flate2 = { workspace = true } +quick-xml = { workspace = true } +zip = { workspace = true } +exr = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +rayon = { workspace = true } diff --git a/crates/formats/README.md b/crates/formats/README.md new file mode 100644 index 00000000..c588341a --- /dev/null +++ b/crates/formats/README.md @@ -0,0 +1,131 @@ +# texturecraft-formats + +File formats for TextureCraft: mesh import and export, texture export with presets, and the +`.tcraft` project file. Every reader takes untrusted bytes and returns `Result`; nothing panics on bad +input. Byte-based functions work on every target (the web build loads and saves through bytes); +path-based functions are native only (`#[cfg(not(target_arch = "wasm32"))]`). + +## Public API + +### Mesh import (`mesh_import`) + +```rust +pub fn import_mesh_bytes(file_name: &str, bytes: &[u8]) -> Result; +pub fn import_mesh(path: &Path) -> Result; // native +pub struct ImportedMesh { pub mesh: Mesh, pub report: MeshReport } +pub struct MeshReport { + pub triangles: usize, pub vertices: usize, pub materials: usize, + pub uvs_generated: bool, pub uv_out_of_range: usize, pub overlap_ratio: f32, + pub zero_area_uv_triangles: usize, pub warnings: Vec, +} +``` + +| Format | Notes | +|---|---| +| `.glb` / `.gltf` | Default scene's node tree flattened to world space; normals by inverse transpose; winding flipped under mirroring transforms; one submesh per material (`Default` for none, `Material_` when unnamed); missing normals are flat (glTF rule). Bytes: GLB or data-URI buffers; from a path, external `.bin` files too. Triangle primitives only; sparse accessors are refused. | +| `.fbx` | FBX 7.x (2011 and newer), binary (32- and 64-bit node records, zlib arrays) and ASCII. Every `Mesh` geometry connected to a Model, with the Model hierarchy's transforms (`Lcl Translation/Rotation/Scaling`, `RotationOrder`, `Pre/PostRotation`, pivots and offsets, geometric transform); normals and UV set 0 from the layer elements (`ByPolygonVertex`, `ByControlPoint`, `ByPolygon`, `AllSame`; `Direct` / `IndexToDirect`); per-polygon materials named by the Materials connected to the Model. Units (`UnitScaleFactor`, cm by default) become meters and the axis system becomes Y up. FBX 6 and older are refused; decoded data is capped at 2 GiB. | +| `.dae` | COLLADA: `triangles`, `polylist`, `polygons` (holes ignored) with `VERTEX` / `NORMAL` / `TEXCOORD` inputs at any offset (lowest `set`); materials by `bind_material` symbol; the visual scene's node tree (`matrix`, `translate`, `rotate`, `scale`, `instance_node`, skinned `instance_controller` with its bind shape); `unit` to meters, `Z_UP` / `X_UP` to Y up. Lines and strips are skipped with a warning. | +| `.obj` | Triangulated, one vertex per unique `v/vt/vn`, **v flipped** (OBJ is bottom-left). Material names come from `usemtl` (MTL files are never read; they only carry shading data). | +| `.ply` | ascii, binary little/big endian; `x y z`, `nx ny nz`, `s t` / `u v` / `texture_u texture_v`; n-gons fan-triangulated. | +| `.stl` | ascii and binary (size-checked, so binary files whose header says `solid` work); flat normals; no UVs. | + +FBX and COLLADA polygons are fan-triangulated with one vertex per unique corner. Missing +normals (OBJ/PLY/FBX/COLLADA) are smooth over welded positions. Missing UVs run +`texturecraft_geom::unwrap::auto_unwrap` (charts within 60° of their seed normal, principal-axis +rotation, shelf packing per material with one texel density). Tangents are MikkTSpace. Limits: +2 GiB files, `MAX_TRIANGLES` triangles, 3 × that many vertices; meshes whose triangles are all +degenerate are refused (MikkTSpace crashes on them). + +### Mesh export (`mesh_export`) + +```rust +pub fn obj_bytes(mesh: &Mesh, name: &str) -> Vec; +pub fn glb_bytes(mesh: &Mesh, name: &str, textures: &[GlbTextures]) -> Result>; +pub fn glb_export_options() -> ExportOptions; // render GlbTextures with these +pub struct GlbTextures { pub base_color, pub orm, pub normal, pub emissive: Option> } // PNG +``` + +GLB: one primitive per submesh, one metallic-roughness material per mesh material with its +textures embedded in the binary chunk (base color sRGB, `alphaMode: BLEND` when it has alpha; +ORM as occlusion + metallic-roughness; OpenGL normal; emissive only when not black). + +### Texture export (`export`, `presets`) + +```rust +pub fn list_outputs(project: &Project, ts: usize, mesh_name: &str, opts: &ExportOptions) -> Result>; +pub fn render_maps(input: &ExportInput, opts: &ExportOptions) -> Result>; +pub fn write_files(files: &[ExportedFile], dir: &Path) -> Result>; // native, atomic +pub fn builtin_presets() -> Vec; +pub fn builtin_preset(name: &str) -> Option; +pub fn preset_from_json(json: &str) -> Result; +pub fn preset_to_json(preset: &ExportPreset) -> Result; +``` + +- `ExportPreset { name, maps: Vec }`, `MapSpec { file, format, bit_depth, channels: Vec<(Dest, SourceRef)> }` + (serde JSON, so presets can be user files). +- `Dest`: `R G B A` or `L` (gray; `L` + `A` = gray + alpha). +- `SourceRef`: `Channel { channel, component }` (`Normal` = the **final** normal in the export + normal format), `Virtual { map, component }` (`NormalOpenGl`, `NormalDirectX`, `Glossiness` = + 1 − roughness, `AoMixed` = baked AO × AO channel, `F0` = 0.08 × specular level), + `Baked { map, component }`, `Constant(f32)`. +- `ExportOptions { preset, format_override, bit_depth_override, padding, size, normal_format }`; + `Padding::{None, Dilation(n), DilationDefault(n), Infinite}`; `size` must be a power of two + (box filter down, bilinear up). +- File templates: `$project`, `$mesh`, `$textureSet`, `$channel`, `$colorSpace`; names are + sanitized to `[A-Za-z0-9_.-]` (reserved device names get a `_` prefix); case-insensitive + collisions get `_2`, `_3`, … plus a warning. +- A map is written only when one of its sources has data in the texture set (channel present, + map baked, …); alpha from a missing channel is dropped. +- Formats: PNG 8/16, JPEG 8 (q 95), TGA 8, TIFF 8/16, BMP 8, WebP 8 (lossless), EXR 16f/32f + (`Y`, `YA`, `RGB`, `RGBA`, ZIP), HDR 32f. Color maps are sRGB in 8/16-bit and linear in float + formats; data maps are linear; height is stored as `h · 0.5 + 0.5`. +- Final normal: Sobel normal from the height channel (strength = `height_strength`; with 1, a + height change of 1 over 1/16 of the texture width tilts 45°; `+Y` up the image), combined with + the normal channel, then with the baked normal map, by Reoriented Normal Mapping. DirectX + flips green. + +Built-in presets: + +| Preset | Files (`$mesh_$textureSet_…`) | +|---|---| +| Document channels + Normal + AO | one per document channel (`$channel`), plus `normal` and `ambientOcclusion` (mixed) | +| glTF PBR Metal Roughness | `BaseColor` (sRGB, A = opacity), `OcclusionRoughnessMetallic`, `Normal` (OpenGL), `Emissive` (if present) | +| Unreal Engine (Packed) | `BaseColor`, `OcclusionRoughnessMetallic`, `Normal` (DirectX) | +| Unity HDRP (Mask Map) | `BaseMap`, `MaskMap` (R metal, G AO, B detail = 0, A smoothness), `Normal` (OpenGL) | +| Unity Standard (Metallic Smoothness) | `Albedo`, `MetallicSmoothness` (R metal, A smoothness), `Normal` (OpenGL), `Occlusion` | +| Blender (Principled BSDF) | `BaseColor`, `Metallic`, `Roughness`, `Normal` (OpenGL), `Height` (16-bit), `Emission`, `Specular` | +| Separate maps | one file per channel, gray where scalar, height 16-bit | +| Mesh maps | every baked map (`$channel` = map id), 16-bit | + +### Project file (`project_file`) + +```rust +pub struct ProjectFile { + pub project: Project, pub pixels: PixelStore, pub baked: BTreeMap, + pub mesh: Option<(String /* ext */, Vec)>, pub thumbnail: Option>, +} +pub fn save_project_bytes(pf: &ProjectFile) -> Result>; +pub fn load_project_bytes(bytes: &[u8]) -> Result; +pub fn save_project(path: &Path, pf: &ProjectFile) -> Result<()>; // native, atomic +pub fn load_project(path: &Path) -> Result; // native +``` + +`.tcraft` layout (zip, deflate): + +| Entry | Content | +|---|---| +| `project.json` | serde JSON of `Project` | +| `mesh.` | the original mesh file bytes (absent for `builtin:` meshes) | +| `pixels/layer__.bin` | painted layer (or content paint effect) channel | +| `pixels/mask_.bin` | painted mask effect | +| `baked/_.bin` | baked mesh map of texture set `` | +| `thumbnail.png` | optional, stored | + +`.bin`: header `TCTX`, version, width, height, components, tile count (u32 LE each), then per +allocated 64×64 tile `tx`, `ty` (u32 LE) and the raw `u16` LE components (sparse, lossless). +Baked maps: the same header with 0 tiles, then `width × height × components` f32 LE. + +Loading runs `Project::validate`, refuses a newer `format_version` (`FormatError::NewerVersion`), +checks every tile against its texture set's resolution and component count, rejects repeated or +out-of-range tiles and trailing data, drops pixels of layers that are in no stack, and caps the +total decompressed size at 8 GiB. diff --git a/crates/formats/src/export/mod.rs b/crates/formats/src/export/mod.rs new file mode 100644 index 00000000..1879ea74 --- /dev/null +++ b/crates/formats/src/export/mod.rs @@ -0,0 +1,698 @@ +//! Texture export: render the maps of an [`ExportPreset`] from a texture set's composite, baked +//! mesh maps and UV coverage, entirely in memory (so the web build can export too). +//! +//! Each [`MapSpec`] packs sources into the R, G, B, A (or L) channels of one file. Sources are +//! composite channels, virtual maps (final normal in OpenGL or DirectX convention, glossiness, +//! mixed AO, F0), baked mesh maps and constants. The final normal is the baked normal, the +//! composited normal channel and the normal derived from height combined with Reoriented Normal +//! Mapping. Color maps are sRGB-encoded in 8/16-bit formats and linear in float formats; data +//! maps are always linear. Height is stored with 0.5 = zero (`h * 0.5 + 0.5`) in every format. + +use std::collections::BTreeSet; +use std::io::Cursor; + +use rayon::prelude::*; +use serde::{Deserialize, Serialize}; +use texturecraft_compose::{BakedMaps, Composite}; +use texturecraft_core::{AoMixing, BakedMap, Channel, ChannelKind, NormalFormat, NormalMixing, Project, TextureSet}; +use texturecraft_geom::glam::Vec3; +use texturecraft_texel::{DilationMap, linear_to_srgb}; + +use crate::{FormatError, MAX_IMAGE_SIZE, Result}; + +/// Height-to-normal slope: with strength 1, a height change of 1 across 1/16 of the texture +/// width tilts the normal 45°, at any resolution. +const HEIGHT_SPAN: f32 = 16.0; +const JPEG_QUALITY: u8 = 95; +/// Preset limits (user presets are untrusted JSON). +const MAX_MAPS: usize = 64; +const MAX_TEMPLATE: usize = 256; +const MAX_STEM: usize = 200; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum FileFormat { + Png, + Jpeg, + Tga, + Tiff, + Bmp, + Webp, + Exr, + Hdr, +} + +impl FileFormat { + pub const ALL: [FileFormat; 8] = + [FileFormat::Png, FileFormat::Jpeg, FileFormat::Tga, FileFormat::Tiff, FileFormat::Bmp, FileFormat::Webp, FileFormat::Exr, FileFormat::Hdr]; + + pub fn extension(self) -> &'static str { + match self { + FileFormat::Png => "png", + FileFormat::Jpeg => "jpg", + FileFormat::Tga => "tga", + FileFormat::Tiff => "tif", + FileFormat::Bmp => "bmp", + FileFormat::Webp => "webp", + FileFormat::Exr => "exr", + FileFormat::Hdr => "hdr", + } + } + + pub fn from_extension(ext: &str) -> Option { + let ext = ext.trim_start_matches('.').to_ascii_lowercase(); + match ext.as_str() { + "jpeg" => Some(FileFormat::Jpeg), + "tiff" => Some(FileFormat::Tiff), + _ => FileFormat::ALL.into_iter().find(|f| f.extension() == ext), + } + } + + /// Bit depths this format is written with (16 and 32 are half and full float for EXR). + pub fn bit_depths(self) -> &'static [u8] { + match self { + FileFormat::Png | FileFormat::Tiff => &[8, 16], + FileFormat::Exr => &[16, 32], + FileFormat::Hdr => &[32], + _ => &[8], + } + } + + /// Floating-point formats hold linear values. + pub fn is_float(self) -> bool { + matches!(self, FileFormat::Exr | FileFormat::Hdr) + } + + /// The supported depth closest to `want` (ties go to the deeper one). + pub fn depth(self, want: u8) -> u8 { + self.bit_depths().iter().copied().min_by_key(|d| (d.abs_diff(want), std::cmp::Reverse(*d))).unwrap_or(8) + } +} + +/// Destination channel of an output file. `L` alone writes grayscale; `L` + `A` gray + alpha. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +pub enum Dest { + R, + G, + B, + A, + L, +} + +/// Maps computed at export time from several channels. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum VirtualMap { + /// Final tangent-space normal, +Y up the image. + NormalOpenGl, + /// Final tangent-space normal, green flipped. + NormalDirectX, + /// 1 − roughness. + Glossiness, + /// Baked AO × AO channel (per the texture set's AO mixing). + AoMixed, + /// Dielectric reflectance at normal incidence: 0.08 × specular level. + F0, +} + +impl VirtualMap { + pub fn id(self) -> &'static str { + match self { + VirtualMap::NormalOpenGl | VirtualMap::NormalDirectX => "normal", + VirtualMap::Glossiness => "glossiness", + VirtualMap::AoMixed => "ambientOcclusion", + VirtualMap::F0 => "f0", + } + } +} + +/// Where one output component comes from. `component` picks r/g/b of 3-component sources. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum SourceRef { + /// A composited channel. `Normal` means the final normal in the export normal format. + Channel { + channel: Channel, + #[serde(default)] + component: u8, + }, + Virtual { + map: VirtualMap, + #[serde(default)] + component: u8, + }, + Baked { + map: BakedMap, + #[serde(default)] + component: u8, + }, + /// A constant (0 = black, 0.5 = gray, 1 = white). + Constant(f32), +} + +impl SourceRef { + fn component(&self) -> usize { + match self { + SourceRef::Channel { component, .. } | SourceRef::Virtual { component, .. } | SourceRef::Baked { component, .. } => (*component).min(2) as usize, + SourceRef::Constant(_) => 0, + } + } +} + +/// One exported file. `file` is a name template without extension (see [`list_outputs`]). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MapSpec { + pub file: String, + pub format: FileFormat, + pub bit_depth: u8, + pub channels: Vec<(Dest, SourceRef)>, +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExportPreset { + pub name: String, + pub maps: Vec, +} + +impl ExportPreset { + /// Structural checks for (untrusted) presets. + pub fn validate(&self) -> Result<()> { + let bad = |m: String| Err(FormatError::Invalid(format!("export preset \"{}\": {m}", self.name))); + if self.maps.len() > MAX_MAPS { + return bad(format!("more than {MAX_MAPS} maps")); + } + for m in &self.maps { + if m.file.trim().is_empty() || m.file.len() > MAX_TEMPLATE { + return bad(format!("file template \"{}\" is empty or too long", m.file)); + } + let dests: BTreeSet = m.channels.iter().map(|(d, _)| *d).collect(); + if dests.len() != m.channels.len() || m.channels.is_empty() { + return bad(format!("map \"{}\" needs distinct destination channels", m.file)); + } + if dests.contains(&Dest::L) && dests.iter().any(|d| matches!(d, Dest::R | Dest::G | Dest::B)) { + return bad(format!("map \"{}\" mixes L with R/G/B", m.file)); + } + if m.channels.iter().any(|(_, s)| matches!(s, SourceRef::Constant(v) if !v.is_finite())) { + return bad(format!("map \"{}\" has a non-finite constant", m.file)); + } + } + Ok(()) + } +} + +/// UV padding of exported maps (texels outside the UV islands). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub enum Padding { + /// Uncovered texels are zero (transparent where there is alpha). + None, + /// Islands are dilated this many texels; beyond, texels are zero. + Dilation(u32), + /// Islands are dilated this many texels; beyond, texels hold the channel default. + DilationDefault(u32), + /// Every texel takes its nearest island's value. + Infinite, +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExportOptions { + pub preset: ExportPreset, + /// Write every map in this format instead of the preset's. + pub format_override: Option, + pub bit_depth_override: Option, + pub padding: Padding, + /// Output size (power of two); None keeps the texture set resolution. + pub size: Option, + /// Normal convention for every normal output instead of the project's / preset's. + pub normal_format: Option, +} + +impl ExportOptions { + pub fn new(preset: ExportPreset) -> ExportOptions { + ExportOptions { preset, format_override: None, bit_depth_override: None, padding: Padding::Infinite, size: None, normal_format: None } + } +} + +/// What is exported: one texture set's composite with its baked maps and UV coverage +/// (`resolution²` flags, row-major). +#[derive(Clone, Copy)] +pub struct ExportInput<'a> { + pub project: &'a Project, + pub ts: usize, + pub composite: &'a Composite, + pub baked: &'a BakedMaps, + pub coverage: &'a [bool], + pub mesh_name: &'a str, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct ExportedFile { + pub name: String, + pub bytes: Vec, + pub width: u32, + pub height: u32, + pub warnings: Vec, +} + +/// A file a preset produces for a texture set (see [`list_outputs`]). +#[derive(Clone, Debug, PartialEq)] +pub struct PlannedFile { + pub name: String, + /// Index into the preset's maps. + pub map: usize, + pub format: FileFormat, + pub bit_depth: u8, + pub warnings: Vec, +} + +// --------------------------------------------------------------------------------------------- +// Planning: which maps exist for a texture set and what their files are called. + +fn normal_present(set: &TextureSet) -> bool { + set.has_channel(Channel::Normal) || set.has_channel(Channel::Height) || set.baked.contains(&BakedMap::Normal) +} + +/// A source with real data in this texture set (constants never count). +fn source_present(set: &TextureSet, s: &SourceRef) -> bool { + match s { + SourceRef::Channel { channel: Channel::Normal, .. } => normal_present(set), + SourceRef::Channel { channel, .. } => set.has_channel(*channel), + SourceRef::Virtual { map: VirtualMap::NormalOpenGl | VirtualMap::NormalDirectX, .. } => normal_present(set), + SourceRef::Virtual { map: VirtualMap::Glossiness, .. } => set.has_channel(Channel::Roughness), + SourceRef::Virtual { map: VirtualMap::AoMixed, .. } => set.has_channel(Channel::AmbientOcclusion) || set.baked.contains(&BakedMap::AmbientOcclusion), + SourceRef::Virtual { map: VirtualMap::F0, .. } => set.has_channel(Channel::SpecularLevel), + SourceRef::Baked { map, .. } => set.baked.contains(map), + SourceRef::Constant(_) => false, + } +} + +/// The written components in order: L | L A | R G B | R G B A. Alpha from a channel the set +/// does not have is dropped. +fn layout<'m>(set: &TextureSet, map: &'m MapSpec) -> Vec<(Dest, &'m SourceRef)> { + let get = |d: Dest| map.channels.iter().find(|(x, _)| *x == d).map(|(_, s)| s); + let alpha = get(Dest::A).filter(|s| !matches!(s, SourceRef::Channel { channel, .. } if !set.has_channel(*channel))); + let black = &SourceRef::Constant(0.0); + let mut out = match get(Dest::L) { + Some(l) => vec![(Dest::L, l)], + None => [Dest::R, Dest::G, Dest::B].into_iter().map(|d| (d, get(d).unwrap_or(black))).collect(), + }; + if let Some(a) = alpha { + out.push((Dest::A, a)); + } + out +} + +fn is_color(map: &MapSpec) -> bool { + map.channels.iter().any(|(d, s)| *d != Dest::A && matches!(s, SourceRef::Channel { channel, .. } if channel.kind() == ChannelKind::Color)) +} + +fn channel_label(map: &MapSpec) -> &'static str { + map.channels + .iter() + .find_map(|(_, s)| match s { + SourceRef::Channel { channel, .. } => Some(channel.id()), + SourceRef::Virtual { map, .. } => Some(map.id()), + SourceRef::Baked { map, .. } => Some(map.id()), + SourceRef::Constant(_) => None, + }) + .unwrap_or("constant") +} + +/// Keep `[A-Za-z0-9_.-]`, replace everything else with `_`; never empty or a reserved device name. +pub fn sanitize_file_stem(s: &str) -> String { + let mut out: String = s.chars().take(MAX_STEM).map(|c| if c.is_ascii_alphanumeric() || matches!(c, '_' | '.' | '-') { c } else { '_' }).collect(); + if out.trim_matches('.').is_empty() { + out = "texture".into(); + } + let device = out.split('.').next().unwrap_or_default().to_ascii_uppercase(); + let reserved = matches!(device.as_str(), "CON" | "PRN" | "AUX" | "NUL") + || (device.len() == 4 && (device.starts_with("COM") || device.starts_with("LPT")) && device.ends_with(|c: char| c.is_ascii_digit())); + if reserved { + out.insert(0, '_'); + } + out +} + +/// The files `opts` produces for texture set `ts`, without rendering (for the export dialog). +/// Template variables: `$project`, `$mesh`, `$textureSet`, `$channel`, `$colorSpace`. +pub fn list_outputs(project: &Project, ts: usize, mesh_name: &str, opts: &ExportOptions) -> Result> { + opts.preset.validate()?; + let set = project.texture_set(ts)?; + if let Some(s) = opts.size + && (!s.is_power_of_two() || s > MAX_IMAGE_SIZE) + { + return Err(FormatError::Invalid(format!("export size {s} must be a power of two up to {MAX_IMAGE_SIZE}"))); + } + let mut used = BTreeSet::new(); + let mut out = Vec::new(); + for (i, map) in opts.preset.maps.iter().enumerate() { + if !map.channels.iter().any(|(_, s)| source_present(set, s)) { + continue; + } + let format = opts.format_override.unwrap_or(map.format); + let bit_depth = format.depth(opts.bit_depth_override.unwrap_or(map.bit_depth)); + let color_space = if is_color(map) && !format.is_float() { "sRGB" } else { "linear" }; + let stem = map + .file + .replace("$project", &project.name) + .replace("$mesh", mesh_name) + .replace("$textureSet", &set.name) + .replace("$channel", channel_label(map)) + .replace("$colorSpace", color_space); + let stem = sanitize_file_stem(&stem); + let ext = format.extension(); + let mut name = format!("{stem}.{ext}"); + let mut warnings = Vec::new(); + // Case-insensitive: Windows and macOS file systems are. + let mut k = 2; + while used.contains(&name.to_ascii_lowercase()) { + name = format!("{stem}_{k}.{ext}"); + k += 1; + } + if k > 2 { + warnings.push(format!("\"{stem}.{ext}\" is produced by more than one map; this one was renamed to \"{name}\"")); + } + used.insert(name.to_ascii_lowercase()); + out.push(PlannedFile { name, map: i, format, bit_depth, warnings }); + } + Ok(out) +} + +// --------------------------------------------------------------------------------------------- +// Sampling. + +/// Which texel a value is taken from. +#[derive(Clone, Copy, PartialEq)] +enum At { + Texel(u32, u32), + /// The channel default (padding beyond the dilation distance). + Default, +} + +struct Sampler<'a> { + set: &'a TextureSet, + comp: &'a Composite, + baked: &'a BakedMaps, + coverage: &'a [bool], + res: u32, + /// Normal convention overriding every normal output. + normal_override: Option, + project_normal: NormalFormat, +} + +fn unpack(v: [f32; 3]) -> Vec3 { + (Vec3::from(v) * 2.0 - Vec3::ONE).try_normalize().unwrap_or(Vec3::Z) +} + +/// Reoriented Normal Mapping: `detail` re-expressed around `base` (unit tangent-space vectors). +pub fn rnm(base: Vec3, detail: Vec3) -> Vec3 { + let t = base + Vec3::Z; + let u = detail * Vec3::new(-1.0, -1.0, 1.0); + (t * t.dot(u) / t.z.max(1e-4) - u).try_normalize().unwrap_or(base) +} + +impl Sampler<'_> { + fn channel(&self, c: Channel, at: At) -> [f32; 3] { + match at { + At::Texel(x, y) if self.set.has_channel(c) => self.comp.value(c, x, y), + _ => c.default_value(), + } + } + + fn baked(&self, m: BakedMap, at: At) -> [f32; 3] { + match at { + At::Texel(x, y) if self.set.baked.contains(&m) => self.baked.sample(m, x, y, self.res).unwrap_or(m.neutral()), + _ => m.neutral(), + } + } + + fn covered(&self, x: u32, y: u32) -> bool { + self.coverage.get((y as usize) * self.res as usize + x as usize).copied().unwrap_or(false) + } + + /// Normal from the height channel (3×3 Sobel; uncovered neighbours repeat the centre). + fn height_normal(&self, x: u32, y: u32) -> Vec3 { + let center = self.channel(Channel::Height, At::Texel(x, y))[0]; + let last = self.res.saturating_sub(1) as i64; + let h = |dx: i64, dy: i64| { + let (sx, sy) = ((x as i64 + dx).clamp(0, last) as u32, (y as i64 + dy).clamp(0, last) as u32); + if self.covered(sx, sy) { self.channel(Channel::Height, At::Texel(sx, sy))[0] } else { center } + }; + let gx = (h(1, -1) + 2.0 * h(1, 0) + h(1, 1) - h(-1, -1) - 2.0 * h(-1, 0) - h(-1, 1)) / 8.0; + let gy = (h(-1, 1) + 2.0 * h(0, 1) + h(1, 1) - h(-1, -1) - 2.0 * h(0, -1) - h(1, -1)) / 8.0; + let s = self.set.height_strength * self.res as f32 / HEIGHT_SPAN; + // Image y points down; OpenGL normals have +Y up the image. + Vec3::new(-gx * s, gy * s, 1.0).try_normalize().unwrap_or(Vec3::Z) + } + + /// The final tangent-space normal (OpenGL): baked normal ⊕ (height ⊕ normal channel). + fn final_normal(&self, at: At) -> Vec3 { + let At::Texel(x, y) = at else { return Vec3::Z }; + let base = if self.set.baked.contains(&BakedMap::Normal) { unpack(self.baked(BakedMap::Normal, at)) } else { Vec3::Z }; + let mut detail = if self.set.has_channel(Channel::Normal) { unpack(self.channel(Channel::Normal, at)) } else { Vec3::Z }; + if self.set.normal_mixing == NormalMixing::Combine && self.set.has_channel(Channel::Height) && self.set.height_strength != 0.0 { + detail = rnm(self.height_normal(x, y), detail); + } + rnm(base, detail) + } + + fn normal(&self, at: At, format: NormalFormat, cache: &mut Option) -> [f32; 3] { + let n = *cache.get_or_insert_with(|| self.final_normal(at)); + let y = if self.normal_override.unwrap_or(format) == NormalFormat::DirectX { -n.y } else { n.y }; + [n.x * 0.5 + 0.5, y * 0.5 + 0.5, n.z * 0.5 + 0.5] + } + + fn sample(&self, src: &SourceRef, at: At, cache: &mut Option) -> f32 { + let k = src.component(); + let v = match src { + SourceRef::Constant(v) => return *v, + SourceRef::Channel { channel: Channel::Normal, .. } => self.normal(at, self.project_normal, cache), + SourceRef::Channel { channel, .. } => { + let v = self.channel(*channel, at); + if channel.kind() == ChannelKind::Signed { v.map(|h| h * 0.5 + 0.5) } else { v } + } + SourceRef::Virtual { map, .. } => match map { + VirtualMap::NormalOpenGl => self.normal(at, NormalFormat::OpenGl, cache), + VirtualMap::NormalDirectX => self.normal(at, NormalFormat::DirectX, cache), + VirtualMap::Glossiness => [1.0 - self.channel(Channel::Roughness, at)[0]; 3], + VirtualMap::F0 => [0.08 * self.channel(Channel::SpecularLevel, at)[0]; 3], + VirtualMap::AoMixed => { + let ch = self.channel(Channel::AmbientOcclusion, at)[0]; + let baked = self.baked(BakedMap::AmbientOcclusion, at)[0]; + [if self.set.ao_mixing == AoMixing::Multiply { ch * baked } else { ch }; 3] + } + }, + SourceRef::Baked { map, .. } => self.baked(*map, at), + }; + v.get(k).copied().unwrap_or(0.0) + } +} + +// --------------------------------------------------------------------------------------------- +// Rendering. + +/// Render every file of `opts` for `input`'s texture set. +pub fn render_maps(input: &ExportInput, opts: &ExportOptions) -> Result> { + let planned = list_outputs(input.project, input.ts, input.mesh_name, opts)?; + let set = input.project.texture_set(input.ts)?; + let res = input.composite.resolution; + if res == 0 || res > MAX_IMAGE_SIZE { + return Err(FormatError::Invalid(format!("composite resolution {res} is out of range"))); + } + if input.coverage.len() != res as usize * res as usize { + return Err(FormatError::Invalid(format!("coverage has {} texels, expected {res}²", input.coverage.len()))); + } + let dmap = match opts.padding { + Padding::None => None, + Padding::Dilation(d) | Padding::DilationDefault(d) => Some(DilationMap::new(input.coverage, res, res, Some(d))), + Padding::Infinite => Some(DilationMap::new(input.coverage, res, res, None)), + }; + let beyond_default = matches!(opts.padding, Padding::DilationDefault(_) | Padding::Infinite); + let sampler = Sampler { + set, + comp: input.composite, + baked: input.baked, + coverage: input.coverage, + res, + normal_override: opts.normal_format, + project_normal: input.project.normal_format, + }; + planned + .into_iter() + .map(|p| { + let map = opts.preset.maps.get(p.map).ok_or_else(|| FormatError::Invalid("planned map out of range".into()))?; + let lay = layout(set, map); + let n = lay.len(); + let mut data = vec![0.0f32; res as usize * res as usize * n]; + data.par_chunks_mut(res as usize * n).enumerate().for_each(|(y, row)| { + let y = y as u32; + for x in 0..res { + let at = if sampler.covered(x, y) { + Some(At::Texel(x, y)) + } else { + match dmap.as_ref().and_then(|d| d.source(x, y)) { + Some((sx, sy)) => Some(At::Texel(sx, sy)), + None => beyond_default.then_some(At::Default), + } + }; + let Some(at) = at else { continue }; + let mut cache = None; + for (k, (_, src)) in lay.iter().enumerate() { + if let Some(v) = row.get_mut(x as usize * n + k) { + *v = sampler.sample(src, at, &mut cache); + } + } + } + }); + let size = opts.size.unwrap_or(res); + let data = resize(data, res, n, size); + let srgb: Vec = lay.iter().map(|(d, _)| *d != Dest::A && is_color(map) && !p.format.is_float()).collect(); + let mut warnings = p.warnings; + let bytes = encode(p.format, p.bit_depth, size, n, &data, &srgb, &mut warnings)?; + Ok(ExportedFile { name: p.name, bytes, width: size, height: size, warnings }) + }) + .collect() +} + +/// Resample a square `res²×n` image to `to²`: box filter when shrinking by an integer factor, +/// bilinear otherwise. +fn resize(data: Vec, res: u32, n: usize, to: u32) -> Vec { + if to == res || res == 0 || to == 0 { + return data; + } + let (r, t) = (res as usize, to as usize); + let mut out = vec![0.0f32; t * t * n]; + let px = |x: usize, y: usize, k: usize| data.get((y * r + x) * n + k).copied().unwrap_or(0.0); + out.par_chunks_mut(t * n).enumerate().for_each(|(y, row)| { + for x in 0..t { + for k in 0..n { + let v = if r > t && r % t == 0 { + let f = r / t; + let sum: f32 = (0..f).flat_map(|dy| (0..f).map(move |dx| (dx, dy))).map(|(dx, dy)| px(x * f + dx, y * f + dy, k)).sum(); + sum / (f * f) as f32 + } else { + let s = r as f32 / t as f32; + let (fx, fy) = (((x as f32 + 0.5) * s - 0.5).max(0.0), ((y as f32 + 0.5) * s - 0.5).max(0.0)); + let (x0, y0) = ((fx as usize).min(r - 1), (fy as usize).min(r - 1)); + let (x1, y1) = ((x0 + 1).min(r - 1), (y0 + 1).min(r - 1)); + let (ax, ay) = (fx - x0 as f32, fy - y0 as f32); + let top = px(x0, y0, k) * (1.0 - ax) + px(x1, y0, k) * ax; + let bottom = px(x0, y1, k) * (1.0 - ax) + px(x1, y1, k) * ax; + top * (1.0 - ay) + bottom * ay + }; + if let Some(o) = row.get_mut(x * n + k) { + *o = v; + } + } + } + }); + out +} + +/// Encode a square `size²×n` image (n = 1 L, 2 LA, 3 RGB, 4 RGBA; linear values). +fn encode(format: FileFormat, depth: u8, size: u32, n: usize, data: &[f32], srgb: &[bool], warnings: &mut Vec) -> Result> { + let failed = |e: &dyn std::fmt::Display| FormatError::Invalid(format!("{} encoding failed: {e}", format.extension())); + match format { + FileFormat::Exr => return write_exr(size, n, data, depth == 16).map_err(|e| failed(&e)), + FileFormat::Hdr => { + if n == 2 || n == 4 { + warnings.push("HDR has no alpha channel; alpha was dropped".into()); + } + let rgb = remap(data, n, if n <= 2 { &[0, 0, 0] } else { &[0, 1, 2] }); + let bytes: Vec = rgb.iter().flat_map(|v| v.to_ne_bytes()).collect(); + return write_image(format, &bytes, size, image::ExtendedColorType::Rgb32F).map_err(|e| failed(&e)); + } + _ => {} + } + // Integer formats: transfer function and quantization first, then fit the channel layout. + let encoded: Vec = + data.iter().enumerate().map(|(i, v)| if srgb.get(i % n).copied().unwrap_or(false) { linear_to_srgb(*v) } else { v.clamp(0.0, 1.0) }).collect(); + let (encoded, n) = match (format, n) { + (FileFormat::Jpeg, 2 | 4) => { + warnings.push("JPEG has no alpha channel; alpha was dropped".into()); + (remap(&encoded, n, if n == 2 { &[0] } else { &[0, 1, 2] }), n - 1) + } + (FileFormat::Tiff, 2) => (remap(&encoded, 2, &[0, 0, 0, 1]), 4), + _ => (encoded, n), + }; + use image::ExtendedColorType as C; + let (bytes, color) = if depth == 16 { + let b: Vec = encoded.iter().flat_map(|v| ((v * 65535.0 + 0.5) as u16).to_ne_bytes()).collect(); + (b, [C::L16, C::La16, C::Rgb16, C::Rgba16].get(n.wrapping_sub(1)).copied().unwrap_or(C::Rgba16)) + } else { + let b: Vec = encoded.iter().map(|v| (v * 255.0 + 0.5) as u8).collect(); + (b, [C::L8, C::La8, C::Rgb8, C::Rgba8].get(n.wrapping_sub(1)).copied().unwrap_or(C::Rgba8)) + }; + write_image(format, &bytes, size, color).map_err(|e| failed(&e)) +} + +/// Pick components `pick` from every texel of an `n`-component image. +fn remap(data: &[f32], n: usize, pick: &[usize]) -> Vec { + data.chunks_exact(n.max(1)).flat_map(|px| pick.iter().map(|k| px.get(*k).copied().unwrap_or(0.0))).collect() +} + +fn write_image(format: FileFormat, bytes: &[u8], size: u32, color: image::ExtendedColorType) -> image::ImageResult> { + let mut out = Cursor::new(Vec::new()); + let fmt = match format { + FileFormat::Jpeg => { + use image::ImageEncoder; + image::codecs::jpeg::JpegEncoder::new_with_quality(&mut out, JPEG_QUALITY).write_image(bytes, size, size, color)?; + return Ok(out.into_inner()); + } + FileFormat::Png => image::ImageFormat::Png, + FileFormat::Tga => image::ImageFormat::Tga, + FileFormat::Tiff => image::ImageFormat::Tiff, + FileFormat::Bmp => image::ImageFormat::Bmp, + FileFormat::Webp => image::ImageFormat::WebP, + FileFormat::Hdr => image::ImageFormat::Hdr, + FileFormat::Exr => image::ImageFormat::OpenExr, + }; + image::write_buffer_with_format(&mut out, bytes, size, size, color, fmt)?; + Ok(out.into_inner()) +} + +/// OpenEXR with Y / YA / RGB / RGBA channels, half or full float, ZIP compression. +fn write_exr(size: u32, n: usize, data: &[f32], half: bool) -> exr::error::Result> { + use exr::prelude::*; + let names: &[&str] = match n { + 1 => &["Y"], + 2 => &["Y", "A"], + 3 => &["R", "G", "B"], + _ => &["R", "G", "B", "A"], + }; + let channels: SmallVec<[AnyChannel; 4]> = names + .iter() + .enumerate() + .map(|(k, name)| { + let plane = data.iter().skip(k).step_by(n.max(1)); + let samples = if half { FlatSamples::F16(plane.map(|v| f16::from_f32(*v)).collect()) } else { FlatSamples::F32(plane.copied().collect()) }; + AnyChannel::new(*name, samples) + }) + .collect(); + let layer = Layer::new((size as usize, size as usize), LayerAttributes::default(), Encoding::SMALL_LOSSLESS, AnyChannels::sort(channels)); + let mut out = Cursor::new(Vec::new()); + let image = Image::from_layer(layer); + let writer = image.write(); + // No worker threads on the web. + #[cfg(target_arch = "wasm32")] + let writer = writer.non_parallel(); + writer.to_buffered(&mut out)?; + Ok(out.into_inner()) +} + +/// Write exported files into `dir` (created if missing), each atomically (`name.tmp`, then +/// rename). Names must be plain file names. +#[cfg(not(target_arch = "wasm32"))] +pub fn write_files(files: &[ExportedFile], dir: &std::path::Path) -> Result> { + std::fs::create_dir_all(dir)?; + files + .iter() + .map(|f| { + if f.name.is_empty() || f.name != sanitize_file_stem(&f.name) || f.name.trim_matches('.').is_empty() { + return Err(FormatError::Invalid(format!("\"{}\" is not a plain file name", f.name))); + } + let path = dir.join(&f.name); + crate::write_atomic(&path, &f.bytes)?; + Ok(path) + }) + .collect() +} + +#[cfg(test)] +mod tests; diff --git a/crates/formats/src/export/tests.rs b/crates/formats/src/export/tests.rs new file mode 100644 index 00000000..c52410bf --- /dev/null +++ b/crates/formats/src/export/tests.rs @@ -0,0 +1,355 @@ +use image::{DynamicImage, GenericImageView, ImageFormat}; +use texturecraft_core::{ChannelFormat, Project, TextureSet}; +use texturecraft_texel::{to_u16, to_u16_signed}; + +use super::*; +use crate::presets::{builtin_preset, builtin_presets, preset_from_json, preset_to_json}; + +const RES: u32 = 64; + +struct Fx { + project: Project, + comp: Composite, + baked: BakedMaps, + coverage: Vec, +} + +impl Fx { + fn new(channels: &[Channel]) -> Fx { + let mut project = Project::new("My Project", "builtin:sphere"); + let mut ts = TextureSet::new("Body Set", 0, RES); + ts.channels = channels.iter().map(|c| (*c, ChannelFormat::default_for(*c))).collect(); + project.texture_sets.push(ts); + let mut fx = Fx { project, comp: Composite::new(channels, RES), baked: BakedMaps::default(), coverage: vec![true; (RES * RES) as usize] }; + for y in 0..RES { + for x in 0..RES { + fx.set(Channel::BaseColor, x, y, [x as f32 / 63.0, y as f32 / 63.0, 0.2]); + fx.set(Channel::Roughness, x, y, [0.25; 3]); + fx.set(Channel::Metallic, x, y, [0.75; 3]); + fx.set(Channel::Normal, x, y, [0.5, 0.5, 1.0]); + fx.set(Channel::Height, x, y, [0.0; 3]); + } + } + fx + } + + fn set(&mut self, c: Channel, x: u32, y: u32, v: [f32; 3]) { + let Some(img) = self.comp.channels.get_mut(&c) else { return }; + let vals: Vec = v.iter().take(c.components()).map(|v| if c.kind() == ChannelKind::Signed { to_u16_signed(*v) } else { to_u16(*v) }).collect(); + img.set(x, y, &vals); + } + + fn set_all(&mut self, c: Channel, f: impl Fn(u32, u32) -> [f32; 3]) { + for y in 0..RES { + for x in 0..RES { + self.set(c, x, y, f(x, y)); + } + } + } + + fn input(&self) -> ExportInput<'_> { + ExportInput { project: &self.project, ts: 0, composite: &self.comp, baked: &self.baked, coverage: &self.coverage, mesh_name: "sphere" } + } + + fn render(&self, opts: &ExportOptions) -> Vec { + render_maps(&self.input(), opts).unwrap() + } + + fn render_preset(&self, name: &str) -> Vec { + self.render(&ExportOptions::new(builtin_preset(name).unwrap())) + } +} + +fn find<'a>(files: &'a [ExportedFile], suffix: &str) -> &'a ExportedFile { + files.iter().find(|f| f.name.contains(suffix)).unwrap_or_else(|| panic!("no {suffix} in {:?}", files.iter().map(|f| &f.name).collect::>())) +} + +fn decode(f: &ExportedFile) -> DynamicImage { + let ext = f.name.rsplit('.').next().unwrap(); + image::load_from_memory_with_format(&f.bytes, ImageFormat::from_extension(ext).unwrap()).unwrap() +} + +fn default_channels() -> Vec { + Channel::DEFAULT_SET.to_vec() +} + +#[test] +fn gltf_png_matches_the_composite() { + let fx = Fx::new(&default_channels()); + let files = fx.render_preset("glTF PBR Metal Roughness"); + let names: Vec<&str> = files.iter().map(|f| f.name.as_str()).collect(); + assert_eq!(names, ["sphere_Body_Set_BaseColor.png", "sphere_Body_Set_OcclusionRoughnessMetallic.png", "sphere_Body_Set_Normal.png"]); + let base = decode(&files[0]); + assert_eq!(base.color(), image::ColorType::Rgb8, "no opacity channel → no alpha"); + for (x, y) in [(0, 0), (10, 40), (63, 63), (32, 7)] { + let v = fx.comp.value(Channel::BaseColor, x, y); + let px = base.get_pixel(x, y); + for k in 0..3 { + let want = linear_to_srgb(v[k]) * 255.0; + assert!((px[k] as f32 - want).abs() <= 1.0, "base ({x},{y})[{k}] {} vs {want}", px[k]); + } + } + let orm = decode(&files[1]).get_pixel(5, 5); + assert_eq!(orm[0], 255, "no AO anywhere → white"); + assert!((orm[1] as i32 - 64).abs() <= 1 && (orm[2] as i32 - 191).abs() <= 1, "{orm:?}"); + let n = decode(&files[2]).get_pixel(5, 5); + assert!((n[0] as i32 - 128).abs() <= 1 && (n[1] as i32 - 128).abs() <= 1 && n[2] == 255, "{n:?}"); + // Emissive appears only when the set has the channel. + let mut channels = default_channels(); + channels.push(Channel::Emissive); + let fx = Fx::new(&channels); + assert!(fx.render_preset("glTF PBR Metal Roughness").iter().any(|f| f.name.ends_with("_Emissive.png"))); +} + +#[test] +fn exr_values_are_linear() { + let fx = Fx::new(&default_channels()); + for (depth, tol) in [(32u8, 1e-4f32), (16, 2e-3)] { + let mut opts = ExportOptions::new(builtin_preset("glTF PBR Metal Roughness").unwrap()); + opts.format_override = Some(FileFormat::Exr); + opts.bit_depth_override = Some(depth); + let files = fx.render(&opts); + let base = find(&files, "_BaseColor.exr"); + let img = decode(base).to_rgb32f(); + for (x, y) in [(0, 0), (10, 40), (63, 63)] { + let v = fx.comp.value(Channel::BaseColor, x, y); + let px = img.get_pixel(x, y); + for k in 0..3 { + assert!((px[k] - v[k]).abs() <= tol.max(v[k] * tol), "depth {depth} ({x},{y})[{k}]: {} vs {}", px[k], v[k]); + } + } + } + // A single-channel map is written as a luminance (Y) EXR. + let mut opts = ExportOptions::new(builtin_preset("Separate maps").unwrap()); + opts.format_override = Some(FileFormat::Exr); + let files = fx.render(&opts); + let rough = find(&files, "_roughness.exr"); + use exr::prelude::{ReadChannels, ReadLayers}; + let img = exr::prelude::read() + .no_deep_data() + .largest_resolution_level() + .all_channels() + .first_valid_layer() + .all_attributes() + .from_buffered(std::io::Cursor::new(&rough.bytes)) + .unwrap(); + let ch = &img.layer_data.channel_data.list; + assert_eq!(ch.len(), 1); + assert_eq!(ch[0].name.to_string(), "Y"); + assert!((ch[0].sample_data.value_by_flat_index(100).to_f32() - 0.25).abs() < 1e-3); +} + +#[test] +fn directx_flips_green() { + let mut fx = Fx::new(&default_channels()); + let n = Vec3::new(0.3, 0.4, 0.0); + let n = Vec3::new(n.x, n.y, (1.0 - n.length_squared()).sqrt()); + fx.set_all(Channel::Normal, |_, _| (n * 0.5 + Vec3::splat(0.5)).to_array()); + let gl = decode(find(&fx.render_preset("glTF PBR Metal Roughness"), "_Normal.png")).to_rgb8(); + let dx = decode(find(&fx.render_preset("Unreal Engine (Packed)"), "_Normal.png")).to_rgb8(); + let (a, b) = (gl.get_pixel(9, 9), dx.get_pixel(9, 9)); + assert!((a[0] as i32 - ((n.x * 0.5 + 0.5) * 255.0).round() as i32).abs() <= 1); + assert!((a[1] as i32 - ((n.y * 0.5 + 0.5) * 255.0).round() as i32).abs() <= 1, "{a:?}"); + assert_eq!(a[0], b[0]); + assert!((a[1] as i32 + b[1] as i32 - 255).abs() <= 1, "{a:?} vs {b:?}"); + assert_eq!(a[2], b[2]); + // The normal-format override applies to every normal output. + let mut opts = ExportOptions::new(builtin_preset("glTF PBR Metal Roughness").unwrap()); + opts.normal_format = Some(NormalFormat::DirectX); + assert_eq!(decode(find(&fx.render(&opts), "_Normal.png")).to_rgb8(), dx); +} + +#[test] +fn height_becomes_normal_detail() { + let mut fx = Fx::new(&[Channel::BaseColor, Channel::Height]); + // Height rises to the right and down the image. + fx.set_all(Channel::Height, |x, y| [(x as f32 + y as f32) / 160.0; 3]); + fx.project.texture_sets[0].height_strength = 8.0; + let files = fx.render_preset("Separate maps"); + let n = decode(find(&files, "_normal.png")).to_rgb8(); + let p = n.get_pixel(30, 30); + assert!(p[0] < 120, "slope up to the right tilts the normal left: {p:?}"); + assert!(p[1] > 136, "slope up toward the image bottom tilts an OpenGL normal up: {p:?}"); + let h = decode(find(&files, "_height.png")); + assert_eq!(h.color(), image::ColorType::L16); + let v = h.to_luma16().get_pixel(30, 30)[0] as f32 / 65535.0; + assert!((v - (60.0 / 160.0 * 0.5 + 0.5)).abs() < 1e-3, "height is stored as h·0.5+0.5: {v}"); + fx.project.texture_sets[0].height_strength = 0.0; + let flat = decode(find(&fx.render_preset("Separate maps"), "_normal.png")).to_rgb8(); + assert_eq!(flat.get_pixel(30, 30).0, [128, 128, 255]); +} + +#[test] +fn reoriented_normal_mapping_identities() { + let d = Vec3::new(0.2, -0.3, 0.9).normalize(); + assert!((rnm(Vec3::Z, d) - d).length() < 1e-5); + assert!((rnm(d, Vec3::Z) - d).length() < 1e-5); + assert!(rnm(Vec3::new(0.0, 0.0, -1.0), d).is_finite()); +} + +#[test] +fn ao_mixes_baked_and_channel() { + let mut channels = default_channels(); + channels.push(Channel::AmbientOcclusion); + let mut fx = Fx::new(&channels); + fx.set_all(Channel::AmbientOcclusion, |_, _| [0.5; 3]); + fx.baked = BakedMaps { resolution: RES, maps: [(BakedMap::AmbientOcclusion, std::sync::Arc::new(vec![0.5; (RES * RES) as usize]))].into() }; + fx.project.texture_sets[0].baked.insert(BakedMap::AmbientOcclusion); + let orm = decode(find(&fx.render_preset("glTF PBR Metal Roughness"), "Metallic.png")).to_rgb8(); + assert!((orm.get_pixel(3, 3)[0] as i32 - 64).abs() <= 1); + let mesh_maps = fx.render_preset("Mesh maps"); + assert_eq!(mesh_maps.len(), 1, "only baked maps are exported"); + let ao = decode(&mesh_maps[0]); + assert_eq!(mesh_maps[0].name, "sphere_Body_Set_ambient_occlusion.png"); + assert_eq!(ao.color(), image::ColorType::L16); +} + +#[test] +fn templates_are_sanitized_and_collisions_suffixed() { + let fx = Fx::new(&default_channels()); + let rough = |file: &str| MapSpec { + file: file.into(), + format: FileFormat::Png, + bit_depth: 8, + channels: vec![(Dest::L, SourceRef::Channel { channel: Channel::Roughness, component: 0 })], + }; + let preset = ExportPreset { + name: "t".into(), + maps: vec![ + rough("$project/..\\$textureSet:$channel ($colorSpace)"), + rough("$project/..\\$textureSet:$channel ($colorSpace)"), + rough("con"), + rough("A"), + rough("a"), + rough("..."), + ], + }; + let opts = ExportOptions::new(preset); + let planned = list_outputs(&fx.project, 0, "sphere", &opts).unwrap(); + let names: Vec<&str> = planned.iter().map(|p| p.name.as_str()).collect(); + assert_eq!( + names, + ["My_Project_.._Body_Set_roughness__linear_.png", "My_Project_.._Body_Set_roughness__linear__2.png", "_con.png", "A.png", "a_2.png", "texture.png"] + ); + assert!(planned[0].warnings.is_empty()); + assert_eq!(planned[1].warnings.len(), 1); + assert_eq!(planned[4].warnings.len(), 1); + let rendered: Vec = fx.render(&opts).into_iter().map(|f| f.name).collect(); + assert_eq!(rendered, names); +} + +#[test] +fn padding_modes() { + let mut fx = Fx::new(&default_channels()); + fx.coverage = (0..RES * RES).map(|i| i % RES < 32).collect(); + let rough_at = |fx: &Fx, padding: Padding, x: u32| { + let mut opts = ExportOptions::new(builtin_preset("Separate maps").unwrap()); + opts.padding = padding; + decode(find(&fx.render(&opts), "_roughness.png")).to_luma8().get_pixel(x, 10)[0] + }; + assert_eq!(rough_at(&fx, Padding::None, 10), 64); + assert_eq!(rough_at(&fx, Padding::None, 40), 0); + assert_eq!(rough_at(&fx, Padding::Infinite, 63), 64); + assert_eq!(rough_at(&fx, Padding::Dilation(2), 33), 64); + assert_eq!(rough_at(&fx, Padding::Dilation(2), 40), 0); + assert_eq!(rough_at(&fx, Padding::DilationDefault(2), 33), 64); + assert_eq!(rough_at(&fx, Padding::DilationDefault(2), 40), 128, "roughness default is 0.5"); + let bad = Fx { coverage: vec![true; 10], ..Fx::new(&default_channels()) }; + assert!(render_maps(&bad.input(), &ExportOptions::new(builtin_preset("Separate maps").unwrap())).is_err()); +} + +#[test] +fn output_size_override() { + let fx = Fx::new(&default_channels()); + for size in [32u32, 128] { + let mut opts = ExportOptions::new(builtin_preset("Separate maps").unwrap()); + opts.size = Some(size); + let files = fx.render(&opts); + let r = find(&files, "_roughness.png"); + assert_eq!((r.width, r.height), (size, size)); + let img = decode(r).to_luma8(); + assert_eq!(img.dimensions(), (size, size)); + assert_eq!(img.get_pixel(size / 2, size / 3)[0], 64); + } + let mut opts = ExportOptions::new(builtin_preset("Separate maps").unwrap()); + opts.size = Some(48); + assert!(render_maps(&fx.input(), &opts).is_err()); +} + +#[test] +fn every_format_encodes_and_decodes() { + let mut channels = default_channels(); + channels.push(Channel::Opacity); + let fx = Fx::new(&channels); + let gray_alpha = MapSpec { + file: "la".into(), + format: FileFormat::Png, + bit_depth: 8, + channels: vec![(Dest::L, SourceRef::Channel { channel: Channel::Roughness, component: 0 }), (Dest::A, SourceRef::Constant(0.5))], + }; + let mut preset = builtin_preset("glTF PBR Metal Roughness").unwrap(); + preset.maps.push(gray_alpha); + for format in FileFormat::ALL { + for &depth in format.bit_depths() { + let mut opts = ExportOptions::new(preset.clone()); + opts.format_override = Some(format); + opts.bit_depth_override = Some(depth); + let files = fx.render(&opts); + assert_eq!(files.len(), 4, "{format:?}"); + for f in &files { + assert!(f.name.ends_with(format.extension())); + if format == FileFormat::Exr && f.name.starts_with("la") { + continue; // Y/A EXR: covered by `exr_values_are_linear`. + } + assert_eq!(decode(f).dimensions(), (RES, RES), "{}", f.name); + } + // Roughness 0.25 everywhere survives every format (JPEG within its loss). + let px = decode(find(&files, "OcclusionRoughnessMetallic.")).to_rgba32f().get_pixel(1, 1)[1]; + assert!((px - 0.25).abs() < 0.01, "{format:?}/{depth}: {px}"); + let base = find(&files, "_BaseColor."); + match format { + FileFormat::Jpeg | FileFormat::Hdr => assert!(base.warnings.iter().any(|w| w.contains("alpha")), "{format:?}"), + _ => assert!(decode(base).color().has_alpha(), "{format:?} keeps opacity"), + } + } + } +} + +#[test] +fn list_outputs_matches_render_and_presets_round_trip() { + let fx = Fx::new(&default_channels()); + for preset in builtin_presets() { + preset.validate().unwrap(); + assert_eq!(preset_from_json(&preset_to_json(&preset).unwrap()).unwrap(), preset); + let opts = ExportOptions::new(preset.clone()); + let planned: Vec = list_outputs(&fx.project, 0, "sphere", &opts).unwrap().into_iter().map(|p| p.name).collect(); + let rendered: Vec = fx.render(&opts).into_iter().map(|f| f.name).collect(); + assert_eq!(planned, rendered, "{}", preset.name); + } + assert!(builtin_preset("unity hdrp (mask map)").is_some()); + assert!(preset_from_json("{").is_err()); + let dup = r#"{"name":"x","maps":[{"file":"a","format":"Png","bit_depth":8,"channels":[["R",{"Constant":1.0}],["R",{"Constant":0.0}]]}]}"#; + assert!(preset_from_json(dup).is_err()); + let mixed = r#"{"name":"x","maps":[{"file":"a","format":"Png","bit_depth":8,"channels":[["L",{"Constant":1.0}],["G",{"Constant":0.0}]]}]}"#; + assert!(preset_from_json(mixed).is_err()); + let ok = r#"{"name":"x","maps":[{"file":"a","format":"Tga","bit_depth":8,"channels":[["L",{"Channel":{"channel":"Metallic"}}]]}]}"#; + assert!(preset_from_json(ok).is_ok()); + assert!(list_outputs(&fx.project, 5, "m", &ExportOptions::new(builtin_presets().remove(0))).is_err()); +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn write_files_is_atomic_and_refuses_paths() { + let fx = Fx::new(&default_channels()); + let files = fx.render_preset("Unreal Engine (Packed)"); + let dir = std::env::temp_dir().join(format!("tc-formats-export-{}", std::process::id())); + let paths = write_files(&files, &dir).unwrap(); + assert_eq!(paths.len(), 3); + for (p, f) in paths.iter().zip(&files) { + assert_eq!(std::fs::read(p).unwrap(), f.bytes); + } + assert!(std::fs::read_dir(&dir).unwrap().all(|e| !e.unwrap().file_name().to_string_lossy().ends_with(".tmp"))); + let evil = ExportedFile { name: "../evil.png".into(), ..files[0].clone() }; + assert!(write_files(&[evil], &dir).is_err()); + std::fs::remove_dir_all(&dir).unwrap(); +} diff --git a/crates/formats/src/image_res.rs b/crates/formats/src/image_res.rs new file mode 100644 index 00000000..a2bc2ebb --- /dev/null +++ b/crates/formats/src/image_res.rs @@ -0,0 +1,49 @@ +//! Decoding imported image resources (fills, alphas, stencils). + +use crate::{FormatError, MAX_IMAGE_SIZE, Result}; + +/// A decoded image: RGBA as 0..1 floats in the file's own encoding (8/16-bit files stay +/// sRGB-encoded; `srgb` says so), row-major, top row first. +#[derive(Clone, Debug, PartialEq)] +pub struct DecodedImage { + pub width: u32, + pub height: u32, + pub rgba: Vec<[f32; 4]>, + /// True for 8/16-bit images (sRGB-encoded); false for float images (linear). + pub srgb: bool, +} + +/// Decode PNG, JPEG, TGA, TIFF, BMP, WEBP, EXR or HDR bytes. +pub fn decode_image(bytes: &[u8]) -> Result { + let reader = image::ImageReader::new(std::io::Cursor::new(bytes)).with_guessed_format().map_err(|e| FormatError::Malformed { kind: "image", msg: e.to_string() })?; + let (w, h) = reader.into_dimensions().map_err(|e| FormatError::Malformed { kind: "image", msg: e.to_string() })?; + if w == 0 || h == 0 || w > MAX_IMAGE_SIZE || h > MAX_IMAGE_SIZE { + return Err(FormatError::TooLarge(format!("image is {w}x{h} (limit {MAX_IMAGE_SIZE})"))); + } + let img = crate::guard("image", || { + image::load_from_memory(bytes).map_err(|e| FormatError::Malformed { kind: "image", msg: e.to_string() }) + })?; + let srgb = !matches!(img, image::DynamicImage::ImageRgb32F(_) | image::DynamicImage::ImageRgba32F(_)); + let f = img.into_rgba32f(); + let (width, height) = f.dimensions(); + let rgba = f.pixels().map(|p| p.0).collect(); + Ok(DecodedImage { width, height, rgba, srgb }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn decodes_png_and_rejects_garbage() { + let mut png = Vec::new(); + let img = image::RgbaImage::from_fn(4, 2, |x, _| image::Rgba([x as u8 * 60, 0, 0, 255])); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + let d = decode_image(&png).unwrap(); + assert_eq!((d.width, d.height), (4, 2)); + assert!(d.srgb); + assert!((d.rgba[1][0] - 60.0 / 255.0).abs() < 1e-3); + assert!(decode_image(b"not an image").is_err()); + assert!(decode_image(&png[..png.len() / 2]).is_err()); + } +} diff --git a/crates/formats/src/lib.rs b/crates/formats/src/lib.rs new file mode 100644 index 00000000..3ce17b3f --- /dev/null +++ b/crates/formats/src/lib.rs @@ -0,0 +1,103 @@ +//! # texturecraft-formats +//! +//! Everything TextureCraft reads from or writes to disk: +//! +//! - [`mesh_import`]: glTF/GLB, FBX (7.x binary and ASCII), COLLADA, OBJ, PLY and STL into a +//! [`texturecraft_geom::Mesh`] (world space in meters, Y up, glTF UV convention, one submesh +//! per material), with an automatic unwrap ([`texturecraft_geom::unwrap::auto_unwrap`]) when +//! the file has no UVs and a [`MeshReport`]. +//! - [`mesh_export`]: the working mesh as OBJ, or as GLB with its textures embedded. +//! - [`export`]: texture export from a texture set's composite through [`ExportPreset`]s (file +//! name templates, channel packing, virtual maps such as the final normal, padding, resizing) +//! to PNG, JPEG, TGA, TIFF, BMP, WebP, EXR and HDR bytes. +//! - [`presets`]: the built-in export presets and JSON (de)serialization of user presets. +//! - [`project_file`]: the `.tcraft` project zip (project JSON, sparse lossless pixel tiles, +//! baked maps, the original mesh and a thumbnail). +//! +//! Every reader takes untrusted bytes and returns an error, never panics. Byte-based functions +//! work everywhere (including the web build); path-based ones are native only. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod export; +pub mod image_res; +pub mod mesh_export; +pub mod mesh_import; +pub mod presets; +pub mod project_file; + +pub use export::{ + Dest, ExportInput, ExportOptions, ExportPreset, ExportedFile, FileFormat, MapSpec, Padding, PlannedFile, SourceRef, VirtualMap, list_outputs, render_maps, +}; +pub use image_res::{DecodedImage, decode_image}; +pub use mesh_export::{GlbTextures, glb_bytes, glb_export_options, obj_bytes}; +pub use mesh_import::{ImportedMesh, MeshReport, import_high_poly_bytes, import_mesh_bytes}; +pub use presets::{builtin_preset, builtin_presets, preset_from_json, preset_to_json}; +pub use project_file::{ProjectFile, load_project_bytes, sanitize_resource_name, save_project_bytes}; + +#[cfg(not(target_arch = "wasm32"))] +pub use export::write_files; +#[cfg(not(target_arch = "wasm32"))] +pub use mesh_import::import_mesh; +#[cfg(not(target_arch = "wasm32"))] +pub use project_file::{load_project, save_project}; + +#[derive(Debug, thiserror::Error)] +pub enum FormatError { + #[error("unsupported: {0}")] + Unsupported(String), + #[error("malformed {kind}: {msg}")] + Malformed { kind: &'static str, msg: String }, + #[error("too large: {0}")] + TooLarge(String), + #[error("invalid: {0}")] + Invalid(String), + #[error("this file was saved by a newer TextureCraft (format {found}; this version reads up to {supported})")] + NewerVersion { found: u32, supported: u32 }, + #[error("I/O error: {0}")] + Io(#[from] std::io::Error), + #[error(transparent)] + Geom(#[from] texturecraft_geom::GeomError), + #[error(transparent)] + Core(#[from] texturecraft_core::CoreError), +} + +pub type Result = std::result::Result; + +pub(crate) fn malformed(kind: &'static str, msg: impl std::fmt::Display) -> FormatError { + FormatError::Malformed { kind, msg: msg.to_string() } +} + +/// Last-resort guard around third-party parsers: a panic inside them becomes an error. +pub(crate) fn guard(kind: &'static str, f: impl FnOnce() -> Result) -> Result { + std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)).unwrap_or_else(|_| Err(malformed(kind, "the parser failed on this file"))) +} + +/// Largest image edge accepted or produced anywhere in this crate. +pub const MAX_IMAGE_SIZE: u32 = 16_384; + +/// Read a whole file, refusing files over `cap` bytes. +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn read_capped(path: &std::path::Path, cap: u64) -> Result> { + let meta = std::fs::metadata(path)?; + if !meta.is_file() { + return Err(FormatError::Invalid(format!("{} is not a regular file", path.display()))); + } + if meta.len() > cap { + return Err(FormatError::TooLarge(format!("{} is {} bytes (limit {cap})", path.display(), meta.len()))); + } + Ok(std::fs::read(path)?) +} + +/// Write `bytes` to `path` atomically: `.tmp` first, then rename over the target. +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn write_atomic(path: &std::path::Path, bytes: &[u8]) -> Result<()> { + let mut tmp = path.as_os_str().to_owned(); + tmp.push(".tmp"); + let tmp = std::path::PathBuf::from(tmp); + let res = std::fs::write(&tmp, bytes).and_then(|_| std::fs::rename(&tmp, path)); + if res.is_err() { + let _ = std::fs::remove_file(&tmp); + } + Ok(res?) +} diff --git a/crates/formats/src/mesh_export.rs b/crates/formats/src/mesh_export.rs new file mode 100644 index 00000000..9922f9f4 --- /dev/null +++ b/crates/formats/src/mesh_export.rs @@ -0,0 +1,284 @@ +//! Mesh export of the working mesh: Wavefront OBJ (positions, UVs, normals, one group per +//! submesh) and binary glTF (one primitive per submesh, a metallic-roughness material per +//! material with its textures embedded). + +use std::fmt::Write as _; + +use serde_json::{Map, Value, json}; +use texturecraft_core::NormalFormat; +use texturecraft_geom::glam::Vec3; +use texturecraft_geom::{Mesh, SubMesh}; + +use crate::presets::{GLTF_BASE_COLOR, GLTF_EMISSIVE, GLTF_NORMAL, GLTF_ORM, gltf_pbr_maps}; +use crate::{ExportOptions, ExportPreset, ExportedFile, FileFormat, FormatError, Result}; + +/// The mesh as OBJ text (UV v flipped back to OBJ's bottom-up convention). +pub fn obj_bytes(mesh: &Mesh, name: &str) -> Vec { + let mut s = String::with_capacity(mesh.positions.len() * 96 + mesh.indices.len() * 12); + let _ = writeln!(s, "# {name}, exported by TextureCraft\no {}", token(name)); + for p in &mesh.positions { + let _ = writeln!(s, "v {} {} {}", p.x, p.y, p.z); + } + let uvs = mesh.uvs.len() == mesh.positions.len(); + let normals = mesh.normals.len() == mesh.positions.len(); + if uvs { + for t in &mesh.uvs { + let _ = writeln!(s, "vt {} {}", t.x, 1.0 - t.y); + } + } + if normals { + for n in &mesh.normals { + let _ = writeln!(s, "vn {} {} {}", n.x, n.y, n.z); + } + } + for sm in &parts(mesh, name) { + let material = mesh.materials.get(sm.material).map_or("default", String::as_str); + let _ = writeln!(s, "g {}\nusemtl {}", token(&sm.name), token(material)); + let (a, b) = (sm.start as usize, sm.start as usize + sm.count as usize); + for tri in mesh.indices.get(a..b).unwrap_or_default().chunks_exact(3) { + s.push('f'); + for i in tri { + let i = i + 1; + let _ = match (uvs, normals) { + (true, true) => write!(s, " {i}/{i}/{i}"), + (true, false) => write!(s, " {i}/{i}"), + (false, true) => write!(s, " {i}//{i}"), + (false, false) => write!(s, " {i}"), + }; + } + s.push('\n'); + } + } + s.into_bytes() +} + +/// The submeshes, or one covering the whole mesh when it has none. +fn parts(mesh: &Mesh, name: &str) -> Vec { + if mesh.submeshes.is_empty() { + vec![SubMesh { name: name.into(), material: 0, start: 0, count: mesh.indices.len() as u32 }] + } else { + mesh.submeshes.clone() + } +} + +/// Textures of one glTF material (PNG bytes), from the files of [`glb_export_options`]. +#[derive(Clone, Debug, Default, PartialEq)] +pub struct GlbTextures { + pub base_color: Option>, + /// Occlusion (R), roughness (G), metallic (B). + pub orm: Option>, + /// OpenGL convention (+Y up the image), as glTF expects. + pub normal: Option>, + pub emissive: Option>, +} + +impl GlbTextures { + /// Sort rendered files into slots; an all-black emissive map is dropped. + pub fn from_files(files: Vec) -> GlbTextures { + let mut t = GlbTextures::default(); + for f in files { + let slot = match f.name.strip_suffix(".png").unwrap_or_default() { + GLTF_BASE_COLOR => &mut t.base_color, + GLTF_ORM => &mut t.orm, + GLTF_NORMAL => &mut t.normal, + GLTF_EMISSIVE if !is_black(&f.bytes) => &mut t.emissive, + _ => continue, + }; + *slot = Some(f.bytes); + } + t + } +} + +/// Texture export options for [`GlbTextures`]: the glTF maps as 8-bit PNG named by slot. +pub fn glb_export_options() -> ExportOptions { + let mut o = ExportOptions::new(ExportPreset { name: "glTF binary".into(), maps: gltf_pbr_maps(str::to_string) }); + o.format_override = Some(FileFormat::Png); + o.bit_depth_override = Some(8); + o.normal_format = Some(NormalFormat::OpenGl); + o +} + +fn is_black(png: &[u8]) -> bool { + image::load_from_memory_with_format(png, image::ImageFormat::Png).map_or(true, |img| img.to_rgb8().iter().all(|v| *v == 0)) +} + +/// PNG color type 4 (gray + alpha) or 6 (RGBA), from the IHDR chunk. +fn png_has_alpha(png: &[u8]) -> bool { + matches!(png.get(25), Some(4 | 6)) +} + +/// The binary chunk and the JSON arrays that index into it. +#[derive(Default)] +struct GlbBuilder { + bin: Vec, + views: Vec, + accessors: Vec, + images: Vec, + textures: Vec, +} + +impl GlbBuilder { + fn view(&mut self, bytes: &[u8], target: Option) -> usize { + while !self.bin.len().is_multiple_of(4) { + self.bin.push(0); + } + let mut v = json!({ "buffer": 0, "byteOffset": self.bin.len(), "byteLength": bytes.len() }); + if let Some(t) = target { + v["target"] = t.into(); + } + self.bin.extend_from_slice(bytes); + self.views.push(v); + self.views.len() - 1 + } + + fn accessor(&mut self, values: impl Iterator, target: u32, component: u32, kind: &str, count: usize) -> Value { + let bytes: Vec = values.flatten().collect(); + let view = self.view(&bytes, Some(target)); + self.accessors.push(json!({ "bufferView": view, "componentType": component, "count": count, "type": kind })); + Value::from(self.accessors.len() - 1) + } + + /// A float vertex attribute of `kind` (VEC2 / VEC3) over `n` vertices. + fn attribute(&mut self, values: impl Iterator, kind: &str, n: usize) -> Value { + self.accessor(values.map(f32::to_le_bytes), 34962, 5126, kind, n) + } + + /// `{"index": n}` of a new texture holding `png`. + fn texture(&mut self, png: &[u8]) -> Value { + let view = self.view(png, None); + self.images.push(json!({ "bufferView": view, "mimeType": "image/png" })); + self.textures.push(json!({ "source": self.images.len() - 1, "sampler": 0 })); + json!({ "index": self.textures.len() - 1 }) + } + + fn material(&mut self, name: &str, t: &GlbTextures) -> Value { + let (mut m, mut pbr) = (Map::new(), Map::new()); + m.insert("name".into(), name.into()); + if let Some(png) = &t.base_color { + pbr.insert("baseColorTexture".into(), self.texture(png)); + if png_has_alpha(png) { + m.insert("alphaMode".into(), "BLEND".into()); + } + } + match &t.orm { + Some(png) => { + let tex = self.texture(png); + pbr.insert("metallicRoughnessTexture".into(), tex.clone()); + m.insert("occlusionTexture".into(), tex); + } + None => { + pbr.insert("metallicFactor".into(), 0.0.into()); + } + } + if let Some(png) = &t.normal { + m.insert("normalTexture".into(), self.texture(png)); + } + if let Some(png) = &t.emissive { + m.insert("emissiveTexture".into(), self.texture(png)); + m.insert("emissiveFactor".into(), json!([1.0, 1.0, 1.0])); + } + m.insert("pbrMetallicRoughness".into(), pbr.into()); + m.into() + } +} + +/// The mesh as binary glTF (GLB) named `name`, with `textures[i]` on material `i` (materials +/// without an entry get a plain one). Vertex data is written as is: the mesh already follows +/// glTF's conventions. +pub fn glb_bytes(mesh: &Mesh, name: &str, textures: &[GlbTextures]) -> Result> { + let n = mesh.positions.len(); + if n == 0 || mesh.indices.len() < 3 { + return Err(FormatError::Invalid("the mesh is empty".into())); + } + let mut g = GlbBuilder::default(); + let vec3s = |v: &[Vec3]| v.iter().flat_map(|p| p.to_array()).collect::>(); + let mut attributes = Map::new(); + let position = g.attribute(vec3s(&mesh.positions).into_iter(), "VEC3", n); + let (lo, hi) = mesh.bounds(); + if let Some(a) = g.accessors.last_mut() { + a["min"] = json!(lo.to_array()); + a["max"] = json!(hi.to_array()); + } + attributes.insert("POSITION".into(), position); + if mesh.normals.len() == n { + attributes.insert("NORMAL".into(), g.attribute(vec3s(&mesh.normals).into_iter(), "VEC3", n)); + } + if mesh.uvs.len() == n { + attributes.insert("TEXCOORD_0".into(), g.attribute(mesh.uvs.iter().flat_map(|t| t.to_array()), "VEC2", n)); + } + let mut primitives = Vec::new(); + for sm in parts(mesh, name) { + let tris = mesh.indices.get(sm.start as usize..(sm.start as usize).saturating_add(sm.count as usize)).unwrap_or_default(); + let tris = tris.get(..tris.len() / 3 * 3).unwrap_or_default(); + if tris.is_empty() { + continue; + } + let indices = g.accessor(tris.iter().map(|i| i.to_le_bytes()), 34963, 5125, "SCALAR", tris.len()); + let mut p = json!({ "attributes": attributes, "indices": indices }); + if sm.material < mesh.materials.len() { + p["material"] = sm.material.into(); + } + primitives.push(p); + } + let none = GlbTextures::default(); + let materials: Vec = mesh.materials.iter().enumerate().map(|(i, m)| g.material(m, textures.get(i).unwrap_or(&none))).collect(); + let mut doc = json!({ + "asset": { "version": "2.0", "generator": "TextureCraft" }, + "scene": 0, + "scenes": [{ "nodes": [0] }], + "nodes": [{ "mesh": 0, "name": name }], + "meshes": [{ "name": name, "primitives": primitives }], + "buffers": [{ "byteLength": g.bin.len() }], + "bufferViews": g.views, + "accessors": g.accessors, + }); + if !g.textures.is_empty() { + doc["samplers"] = json!([{ "magFilter": 9729, "minFilter": 9987, "wrapS": 10497, "wrapT": 10497 }]); + } + // glTF forbids empty arrays. + for (key, list) in [("materials", materials), ("images", g.images), ("textures", g.textures)] { + if !list.is_empty() { + doc[key] = list.into(); + } + } + let mut js = serde_json::to_vec(&doc).map_err(|e| FormatError::Invalid(format!("glTF JSON: {e}")))?; + while !js.len().is_multiple_of(4) { + js.push(b' '); + } + let mut bin = g.bin; + while !bin.len().is_multiple_of(4) { + bin.push(0); + } + let total = 12 + 8 + js.len() + 8 + bin.len(); + let len32 = |v: usize| u32::try_from(v).map(u32::to_le_bytes).map_err(|_| FormatError::TooLarge(format!("the GLB would be {total} bytes (limit 4 GiB)"))); + let mut out = Vec::with_capacity(total); + for chunk in [&b"glTF"[..], &2u32.to_le_bytes(), &len32(total)?, &len32(js.len())?, b"JSON", &js, &len32(bin.len())?, b"BIN\0", &bin] { + out.extend_from_slice(chunk); + } + Ok(out) +} + +/// OBJ names end at whitespace. +fn token(name: &str) -> String { + let t: String = name.trim().chars().map(|c| if c.is_whitespace() { '_' } else { c }).collect(); + if t.is_empty() { "unnamed".into() } else { t } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn obj_round_trips_through_the_importer() { + let mesh = texturecraft_geom::primitives::rounded_box(texturecraft_geom::glam::Vec3::splat(1.0), 0.1); + let bytes = obj_bytes(&mesh, "My box"); + let back = crate::import_mesh_bytes("box.obj", &bytes).unwrap().mesh; + assert_eq!(back.triangle_count(), mesh.triangle_count()); + let (a, b) = (mesh.bounds(), back.bounds()); + assert!((a.0 - b.0).length() < 1e-4 && (a.1 - b.1).length() < 1e-4); + let uv_sum = |m: &Mesh| m.indices.iter().map(|&i| m.uvs[i as usize].y as f64).sum::(); + assert!((uv_sum(&mesh) - uv_sum(&back)).abs() < 1e-3 * mesh.indices.len() as f64); + assert!(String::from_utf8(bytes).unwrap().contains("o My_box")); + } +} diff --git a/crates/formats/src/mesh_import/dae.rs b/crates/formats/src/mesh_import/dae.rs new file mode 100644 index 00000000..31af1865 --- /dev/null +++ b/crates/formats/src/mesh_import/dae.rs @@ -0,0 +1,344 @@ +//! COLLADA (.dae): `triangles`, `polylist` and `polygons` with VERTEX / NORMAL / TEXCOORD inputs, +//! materials bound through `instance_geometry` (and skinned `instance_controller`), the visual +//! scene's node transforms (matrix, translate, rotate, scale), and the asset's unit and up axis +//! (converted to meters, Y up, like glTF). + +use std::collections::HashMap; +use std::rc::Rc; + +use quick_xml::events::{BytesStart, Event}; +use texturecraft_geom::glam::{Mat3, Mat4, Vec2, Vec3, Vec4}; + +use super::{Corner, PolygonSink, RawMesh, check_vertices}; +use crate::{FormatError, Result, malformed}; + +const KIND: &str = "COLLADA"; +/// Deepest element nesting and node hierarchy followed. +const MAX_DEPTH: usize = 256; +/// Elements read from a document. +const MAX_ELEMENTS: usize = 2_000_000; +/// Node instances visited (bounds exponential instancing through `instance_node`). +const MAX_NODE_VISITS: usize = 1_000_000; + +#[derive(Default)] +struct El { + name: String, + attrs: Vec<(String, String)>, + text: String, + children: Vec, +} + +impl El { + fn attr(&self, key: &str) -> Option<&str> { + self.attrs.iter().find(|(k, _)| k == key).map(|(_, v)| v.as_str()) + } + + fn child(&self, name: &str) -> Option<&El> { + self.children.iter().find(|c| c.name == name) + } + + fn all<'a>(&'a self, name: &'a str) -> impl Iterator { + self.children.iter().filter(move |c| c.name == name) + } + + fn floats(&self) -> Result> { + self.text.split_whitespace().map(|w| w.parse::().map_err(|_| malformed(KIND, format!("bad number \"{w}\" in <{}>", self.name)))).collect() + } + + fn indices(&self) -> Result> { + self.text.split_whitespace().map(|w| w.parse::().map_err(|_| malformed(KIND, format!("bad index \"{w}\" in <{}>", self.name)))).collect() + } +} + +fn element(e: &BytesStart) -> El { + let text = |b: &[u8]| String::from_utf8_lossy(b).into_owned(); + let attrs = e.attributes().with_checks(false).flatten().map(|a| (text(a.key.local_name().as_ref()), text(&a.value))).collect(); + El { name: text(e.local_name().as_ref()), attrs, ..El::default() } +} + +/// The document as an element tree (the root is an unnamed element holding the top level). +fn parse_xml(bytes: &[u8]) -> Result { + let mut reader = quick_xml::Reader::from_reader(bytes); + let mut stack = vec![El::default()]; + let mut count = 0usize; + loop { + let event = reader.read_event().map_err(|e| malformed(KIND, e))?; + if matches!(event, Event::Start(_) | Event::Empty(_)) { + count += 1; + if count > MAX_ELEMENTS || stack.len() > MAX_DEPTH { + return Err(FormatError::TooLarge(format!("the COLLADA document has more than {MAX_ELEMENTS} elements or is nested too deeply"))); + } + } + match event { + Event::Start(e) => stack.push(element(&e)), + Event::Empty(e) => { + if let Some(parent) = stack.last_mut() { + parent.children.push(element(&e)); + } + } + Event::End(_) => { + let el = stack.pop().filter(|_| !stack.is_empty()).ok_or_else(|| malformed(KIND, "unbalanced end tag"))?; + if let Some(parent) = stack.last_mut() { + parent.children.push(el); + } + } + Event::Text(t) => push_text(&mut stack, &t), + Event::CData(t) => push_text(&mut stack, &t), + Event::Eof => break, + _ => {} + } + } + match (stack.pop(), stack.is_empty()) { + (Some(root), true) => Ok(root), + _ => Err(malformed(KIND, "unclosed elements at the end of the document")), + } +} + +fn push_text(stack: &mut [El], t: &[u8]) { + if let Some(el) = stack.last_mut() { + el.text.push_str(&String::from_utf8_lossy(t)); + // Whitespace keeps numbers split across text events apart. + el.text.push(' '); + } +} + +/// A ``'s float array read through its accessor. +struct Source { + data: Vec, + stride: usize, + offset: usize, +} + +impl Source { + fn get(&self, i: u32) -> Option<[f32; W]> { + let start = (i as usize).checked_mul(self.stride)?.checked_add(self.offset)?; + self.data.get(start..start.checked_add(W)?)?.try_into().ok() + } +} + +struct Doc<'a> { + ids: HashMap<&'a str, &'a El>, + sources: HashMap<&'a str, Rc>, +} + +impl<'a> Doc<'a> { + /// The element a local URL (`#id`) points at. + fn get(&self, url: Option<&str>) -> Option<&'a El> { + url.and_then(|u| u.strip_prefix('#')).and_then(|id| self.ids.get(id)).copied() + } + + fn source(&mut self, url: Option<&str>) -> Result> { + let el = self.get(url).ok_or_else(|| malformed(KIND, format!("missing source {}", url.unwrap_or("(none)"))))?; + let id = el.attr("id").unwrap_or_default(); + if let Some(s) = self.sources.get(id) { + return Ok(s.clone()); + } + let acc = el.child("technique_common").and_then(|t| t.child("accessor")); + let array = acc.and_then(|a| self.get(a.attr("source"))).or_else(|| el.child("float_array")); + let array = array.ok_or_else(|| malformed(KIND, format!("source \"{id}\" has no float_array")))?; + let num = |k: &str, default: usize| acc.and_then(|a| a.attr(k)).and_then(|v| v.parse().ok()).unwrap_or(default); + let data = array.floats()?; + check_vertices(data.len() / 3)?; + let s = Rc::new(Source { data, stride: num("stride", 1).max(1), offset: num("offset", 0) }); + self.sources.insert(id, s.clone()); + Ok(s) + } +} + +pub(crate) fn read(bytes: &[u8]) -> Result { + crate::guard(KIND, || read_inner(bytes)) +} + +fn read_inner(bytes: &[u8]) -> Result { + let doc = parse_xml(bytes)?; + let root = doc.child("COLLADA").ok_or_else(|| malformed(KIND, "not a COLLADA document"))?; + let mut ids = HashMap::new(); + let mut stack = vec![root]; + while let Some(el) = stack.pop() { + if let Some(id) = el.attr("id") { + ids.entry(id).or_insert(el); + } + stack.extend(&el.children); + } + let mut d = Doc { ids, sources: HashMap::new() }; + let asset = root.child("asset"); + let meter = asset.and_then(|a| a.child("unit")).and_then(|u| u.attr("meter")).and_then(|m| m.trim().parse::().ok()); + let meter = meter.filter(|m| m.is_finite() && *m > 0.0).unwrap_or(1.0); + let up = match asset.and_then(|a| a.child("up_axis")).map(|u| u.text.trim()) { + Some("Z_UP") => Mat4::from_cols(Vec4::X, -Vec4::Z, Vec4::Y, Vec4::W), + Some("X_UP") => Mat4::from_cols(Vec4::Y, -Vec4::X, Vec4::Z, Vec4::W), + _ => Mat4::IDENTITY, + }; + let global = up * Mat4::from_scale(Vec3::splat(meter)); + let mut sink = PolygonSink::default(); + let scene = root.child("scene").and_then(|s| s.child("instance_visual_scene")).and_then(|i| d.get(i.attr("url"))); + let scene = scene.or_else(|| root.child("library_visual_scenes").and_then(|l| l.child("visual_scene"))); + let Some(scene) = scene else { + // No scene: every geometry as stored. + for g in root.all("library_geometries").flat_map(|l| l.all("geometry")) { + add_geometry(&mut d, &mut sink, g, global, &HashMap::new())?; + } + return Ok(sink.finish()); + }; + let mut stack: Vec<(&El, Mat4, usize)> = scene.all("node").map(|n| (n, global, 0)).collect(); + stack.reverse(); + let mut visits = 0usize; + while let Some((node, parent, depth)) = stack.pop() { + visits += 1; + if visits > MAX_NODE_VISITS || depth > MAX_DEPTH { + return Err(FormatError::TooLarge("the COLLADA node hierarchy is too large, too deep or cyclic".into())); + } + let m = parent * node_transform(node)?; + sink.part = node.attr("name").or_else(|| node.attr("id")).unwrap_or_default().to_string(); + for inst in &node.children { + let (geom, bind_shape) = match inst.name.as_str() { + "instance_geometry" => (d.get(inst.attr("url")), Mat4::IDENTITY), + "instance_controller" => { + let skin = d.get(inst.attr("url")).and_then(|c| c.child("skin")); + let bind = skin.and_then(|s| s.child("bind_shape_matrix")).map(El::floats).transpose()?.and_then(|v| matrix(&v)); + (skin.and_then(|s| d.get(s.attr("source"))), bind.unwrap_or(Mat4::IDENTITY)) + } + _ => continue, + }; + let Some(geom) = geom else { + sink.warn("an instanced geometry is missing from the file".into()); + continue; + }; + let bind = bindings(&d, inst); + add_geometry(&mut d, &mut sink, geom, m * bind_shape, &bind)?; + } + let children = node.all("node").chain(node.all("instance_node").filter_map(|i| d.get(i.attr("url")))); + let children: Vec<&El> = children.collect(); + stack.extend(children.into_iter().rev().map(|c| (c, m, depth + 1))); + } + Ok(sink.finish()) +} + +/// Row-major 4×4 floats to a matrix. +fn matrix(v: &[f32]) -> Option { + let a: [f32; 16] = v.get(..16)?.try_into().ok()?; + Some(Mat4::from_cols_array(&a).transpose()) +} + +/// A node's transform elements, applied in document order. +fn node_transform(node: &El) -> Result { + let mut m = Mat4::IDENTITY; + for t in &node.children { + let v = match t.name.as_str() { + "matrix" | "translate" | "rotate" | "scale" => t.floats()?, + _ => continue, + }; + let step = match (t.name.as_str(), v.as_slice()) { + ("matrix", _) => matrix(&v), + ("translate", [x, y, z, ..]) => Some(Mat4::from_translation(Vec3::new(*x, *y, *z))), + ("scale", [x, y, z, ..]) => Some(Mat4::from_scale(Vec3::new(*x, *y, *z))), + ("rotate", [x, y, z, deg, ..]) => Vec3::new(*x, *y, *z).try_normalize().map(|axis| Mat4::from_axis_angle(axis, deg.to_radians())), + _ => None, + }; + m *= step.unwrap_or(Mat4::IDENTITY); + } + Ok(m) +} + +/// Material symbol → material name, from an instance's `bind_material`. +fn bindings(d: &Doc, inst: &El) -> HashMap { + let list = inst.child("bind_material").and_then(|b| b.child("technique_common")); + list.into_iter() + .flat_map(|t| t.all("instance_material")) + .filter_map(|im| { + let symbol = im.attr("symbol")?; + let mat = d.get(im.attr("target")); + let name = mat.and_then(|m| m.attr("name").or_else(|| m.attr("id"))).unwrap_or(symbol); + Some((symbol.to_string(), name.to_string())) + }) + .collect() +} + +/// An input's index offset and source. +struct Input { + offset: usize, + source: Rc, +} + +fn add_geometry(d: &mut Doc, sink: &mut PolygonSink, geom: &El, m: Mat4, bind: &HashMap) -> Result<()> { + let Some(mesh) = geom.child("mesh") else { return Ok(()) }; + let nm = Mat3::from_mat4(m).inverse().transpose(); + let flip = m.determinant() < 0.0; + for prim in &mesh.children { + if !matches!(prim.name.as_str(), "triangles" | "polylist" | "polygons") { + if matches!(prim.name.as_str(), "lines" | "linestrips" | "trifans" | "tristrips") { + sink.warn(format!("skipped COLLADA <{}> (only triangles and polygons are supported)", prim.name)); + } + continue; + } + let (mut position, mut normal, mut uv): (Option, Option, Option<(u32, Input)>) = (None, None, None); + let mut stride = 1usize; + for input in prim.all("input") { + let offset: usize = input.attr("offset").and_then(|o| o.parse().ok()).unwrap_or(0); + stride = stride.max(offset.saturating_add(1)); + // VERTEX names a , whose own inputs share the VERTEX index. + let nested = match input.attr("semantic") { + Some("VERTEX") => d.get(input.attr("source")).map(|v| v.all("input").collect()).unwrap_or_default(), + _ => vec![input], + }; + for i in nested { + let set: u32 = input.attr("set").or_else(|| i.attr("set")).and_then(|s| s.parse().ok()).unwrap_or(0); + match i.attr("semantic") { + Some("POSITION") => position = Some(Input { offset, source: d.source(i.attr("source"))? }), + Some("NORMAL") if normal.is_none() => normal = Some(Input { offset, source: d.source(i.attr("source"))? }), + Some("TEXCOORD") if uv.as_ref().is_none_or(|(s, _)| set < *s) => uv = Some((set, Input { offset, source: d.source(i.attr("source"))? })), + _ => {} + } + } + } + let Some(position) = position else { + sink.warn("skipped COLLADA primitives without positions".into()); + continue; + }; + let material = prim.attr("material").map(|s| bind.get(s).map_or(s, String::as_str)).unwrap_or("Default"); + // Each

with the corner count of every polygon in it. + let lists: Vec<(Vec, Vec)> = match prim.name.as_str() { + "polygons" => prim + .all("p") + .map(|p| { + let p = p.indices()?; + let n = p.len() / stride; + Ok((p, vec![n])) + }) + .collect::>()?, + _ => { + let p = prim.child("p").map(El::indices).transpose()?.unwrap_or_default(); + let sizes = match prim.child("vcount") { + Some(v) if prim.name == "polylist" => v.indices()?.into_iter().map(|c| c as usize).collect(), + _ => vec![3; p.len() / stride / 3], + }; + vec![(p, sizes)] + } + }; + let mut corners = Vec::new(); + for (p, sizes) in &lists { + let mut next = 0usize; + for &size in sizes { + corners.clear(); + for c in next..next.saturating_add(size) { + let idx = |input: &Input| c.checked_mul(stride).and_then(|b| b.checked_add(input.offset)).and_then(|k| p.get(k)).copied(); + let at = idx(&position).and_then(|i| position.source.get::<3>(i)); + let pos = at.ok_or_else(|| malformed(KIND, "polygon index out of range"))?; + let n = normal.as_ref().and_then(|n| idx(n).and_then(|i| n.source.get::<3>(i))); + let t = uv.as_ref().and_then(|(_, t)| idx(t).and_then(|i| t.source.get::<2>(i))); + corners.push(Corner { + p: m.transform_point3(Vec3::from(pos)), + n: n.map(|n| nm * Vec3::from(n)), + uv: t.map(|[u, v]| Vec2::new(u, 1.0 - v)), + }); + } + next = next.saturating_add(size); + if flip { + corners.reverse(); + } + sink.polygon(material, &corners)?; + } + } + } + Ok(()) +} diff --git a/crates/formats/src/mesh_import/fbx.rs b/crates/formats/src/mesh_import/fbx.rs new file mode 100644 index 00000000..dd0d63cc --- /dev/null +++ b/crates/formats/src/mesh_import/fbx.rs @@ -0,0 +1,613 @@ +//! Autodesk FBX 7.x, binary (32- and 64-bit node records, zlib-compressed arrays) and ASCII: +//! mesh geometry with normals, UVs and per-polygon materials from the layer elements, every +//! Model's transform and parent hierarchy, and the file's unit and axis system (converted to +//! meters, Y up, like glTF). + +use std::borrow::Cow; +use std::collections::{HashMap, HashSet}; +use std::io::Read as _; + +use texturecraft_geom::glam::{Mat3, Mat4, Vec2, Vec3}; + +use super::{Corner, PolygonSink, RawMesh, check_vertices}; +use crate::{FormatError, Result, malformed}; + +const KIND: &str = "FBX"; +const MAGIC: &[u8] = b"Kaydara FBX Binary \0"; +/// First FBX version with the object/connection layout read here. +const MIN_VERSION: i64 = 7000; +/// Deepest node nesting (and Model parent chain) followed. +const MAX_DEPTH: usize = 64; +/// Memory budget for parsed nodes and properties (arrays are held as f64). +const MAX_DECODED_BYTES: usize = 1 << 31; +/// Approximate memory charged per node and per scalar property. +const NODE_COST: usize = 96; +const PROP_COST: usize = 32; + +enum Prop { + I(i64), + F(f64), + S(String), + Arr(Vec), +} + +impl Prop { + fn num(&self) -> Option { + match self { + Prop::I(v) => Some(*v as f64), + Prop::F(v) => Some(*v), + _ => None, + } + } +} + +struct Node { + name: String, + props: Vec, + children: Vec, +} + +impl Node { + fn child(&self, name: &str) -> Option<&Node> { + self.children.iter().find(|c| c.name == name) + } + + fn all<'a>(&'a self, name: &'a str) -> impl Iterator { + self.children.iter().filter(move |c| c.name == name) + } + + fn int_at(&self, i: usize) -> Option { + match self.props.get(i) { + Some(Prop::I(v)) => Some(*v), + _ => None, + } + } + + fn str_at(&self, i: usize) -> &str { + match self.props.get(i) { + Some(Prop::S(s)) => s, + _ => "", + } + } + + fn child_str(&self, name: &str) -> &str { + self.child(name).map_or("", |c| c.str_at(0)) + } + + /// Array payload: a binary array, an ASCII `*N { a: ... }` block or a bare value list. + fn arr(&self) -> Cow<'_, [f64]> { + if let Some(Prop::Arr(a)) = self.props.first() { + return Cow::Borrowed(a); + } + if let Some(a) = self.child("a") { + return a.arr(); + } + Cow::Owned(self.props.iter().filter_map(Prop::num).collect()) + } + + /// The numbers of entry `name` in Properties70 (`P: name, type, subtype, flags, values`). + fn property(&self, name: &str) -> Option> { + let list = self.child("Properties70")?; + list.children.iter().find(|p| p.str_at(0) == name).map(|p| p.props.iter().filter_map(Prop::num).collect()) + } + + fn vec3(&self, name: &str, default: Vec3) -> Vec3 { + match self.property(name).as_deref() { + Some([x, y, z, ..]) => Vec3::new(*x as f32, *y as f32, *z as f32), + _ => default, + } + } + + fn number(&self, name: &str) -> Option { + self.property(name)?.first().copied() + } +} + +/// Charges parsed data against [`MAX_DECODED_BYTES`]. +struct Budget(usize); + +impl Budget { + fn charge(&mut self, bytes: usize) -> Result<()> { + self.0 = self.0.checked_sub(bytes).ok_or_else(|| FormatError::TooLarge(format!("the FBX file decodes to more than {MAX_DECODED_BYTES} bytes")))?; + Ok(()) + } +} + +// --------------------------------------------------------------------------------------------- +// Binary. + +struct Binary<'a> { + b: &'a [u8], + pos: usize, + /// 64-bit node records (version 7500 and later). + wide: bool, + budget: Budget, +} + +impl<'a> Binary<'a> { + fn take(&mut self, n: usize) -> Result<&'a [u8]> { + let s = self.pos.checked_add(n).and_then(|end| self.b.get(self.pos..end)).ok_or_else(|| malformed(KIND, "unexpected end of file"))?; + self.pos += n; + Ok(s) + } + + fn bytes(&mut self) -> Result<[u8; N]> { + let mut a = [0u8; N]; + a.copy_from_slice(self.take(N)?); + Ok(a) + } + + fn u32(&mut self) -> Result { + Ok(u32::from_le_bytes(self.bytes()?) as usize) + } + + fn uint(&mut self) -> Result { + Ok(if self.wide { u64::from_le_bytes(self.bytes()?) } else { u32::from_le_bytes(self.bytes()?) as u64 }) + } + + /// The next node ending at or before `limit`, or None at a null record / the end. + fn node(&mut self, limit: usize, depth: usize) -> Result> { + let header = if self.wide { 25 } else { 13 }; + if limit.saturating_sub(self.pos) < header { + return Ok(None); + } + let (end, nprops, plen) = (self.uint()?, self.uint()?, self.uint()?); + let [name_len] = self.bytes()?; + if end == 0 { + return Ok(None); + } + if depth > MAX_DEPTH { + return Err(malformed(KIND, "nodes are nested too deeply")); + } + let end = usize::try_from(end).ok().filter(|e| *e > self.pos && *e <= limit).ok_or_else(|| malformed(KIND, "node end offset out of range"))?; + self.budget.charge(NODE_COST)?; + let name = String::from_utf8_lossy(self.take(name_len as usize)?).into_owned(); + let props_end = usize::try_from(plen).ok().and_then(|p| self.pos.checked_add(p)).filter(|e| *e <= end); + let props_end = props_end.ok_or_else(|| malformed(KIND, format!("properties of \"{name}\" overrun the node")))?; + let mut props = Vec::new(); + for _ in 0..nprops { + if self.pos >= props_end { + return Err(malformed(KIND, format!("\"{name}\" claims more properties than it holds"))); + } + props.push(self.prop()?); + } + if self.pos > props_end { + return Err(malformed(KIND, format!("properties of \"{name}\" overrun their list"))); + } + self.pos = props_end; + let mut children = Vec::new(); + while let Some(c) = self.node(end, depth + 1)? { + children.push(c); + } + self.pos = end; + Ok(Some(Node { name, props, children })) + } + + fn prop(&mut self) -> Result { + self.budget.charge(PROP_COST)?; + let [ty] = self.bytes()?; + Ok(match ty { + b'Y' => Prop::I(i16::from_le_bytes(self.bytes()?) as i64), + b'C' | b'B' => Prop::I(self.bytes::<1>()?[0] as i64), + b'I' => Prop::I(i32::from_le_bytes(self.bytes()?) as i64), + b'L' => Prop::I(i64::from_le_bytes(self.bytes()?)), + b'F' => Prop::F(f32::from_le_bytes(self.bytes()?) as f64), + b'D' => Prop::F(f64::from_le_bytes(self.bytes()?)), + b'S' | b'R' => { + let n = self.u32()?; + Prop::S(String::from_utf8_lossy(self.take(n)?).into_owned()) + } + b'f' | b'd' | b'l' | b'i' | b'b' => Prop::Arr(self.array(ty)?), + other => return Err(malformed(KIND, format!("unknown property type 0x{other:02x}"))), + }) + } + + fn array(&mut self, ty: u8) -> Result> { + let (count, encoding, stored) = (self.u32()?, self.u32()?, self.u32()?); + let size = match ty { + b'd' | b'l' => 8, + b'f' | b'i' => 4, + _ => 1, + }; + let len = count.checked_mul(size).ok_or_else(|| malformed(KIND, "array too large"))?; + self.budget.charge(count.saturating_mul(8))?; + let data = self.take(stored)?; + let raw: Cow<[u8]> = match encoding { + 0 if stored == len => Cow::Borrowed(data), + 1 => { + let mut out = Vec::new(); + flate2::read::ZlibDecoder::new(data) + .take(len as u64 + 1) + .read_to_end(&mut out) + .map_err(|e| malformed(KIND, format!("bad compressed array: {e}")))?; + if out.len() != len { + return Err(malformed(KIND, "compressed array has the wrong length")); + } + Cow::Owned(out) + } + _ => return Err(malformed(KIND, format!("array encoding {encoding} with {stored} bytes for {count} items"))), + }; + fn le(c: &[u8]) -> [u8; N] { + <[u8; N]>::try_from(c).unwrap_or([0; N]) + } + Ok(match ty { + b'd' => raw.chunks_exact(8).map(|c| f64::from_le_bytes(le(c))).collect(), + b'l' => raw.chunks_exact(8).map(|c| i64::from_le_bytes(le(c)) as f64).collect(), + b'f' => raw.chunks_exact(4).map(|c| f32::from_le_bytes(le(c)) as f64).collect(), + b'i' => raw.chunks_exact(4).map(|c| i32::from_le_bytes(le(c)) as f64).collect(), + _ => raw.iter().map(|b| *b as f64).collect(), + }) + } +} + +fn parse_binary(b: &[u8]) -> Result<(Vec, i64)> { + let mut r = Binary { b, pos: MAGIC.len(), wide: false, budget: Budget(MAX_DECODED_BYTES) }; + let _reserved: [u8; 2] = r.bytes()?; + let version = u32::from_le_bytes(r.bytes()?); + r.wide = version >= 7500; + let mut nodes = Vec::new(); + while let Some(n) = r.node(b.len(), 0)? { + nodes.push(n); + } + Ok((nodes, version as i64)) +} + +// --------------------------------------------------------------------------------------------- +// ASCII. + +#[derive(Clone, Copy)] +enum Tok<'a> { + /// `name:` + Key(&'a str), + Str(&'a [u8]), + Word(&'a str), + Comma, + Open, + Close, +} + +struct Ascii<'a> { + s: &'a [u8], + pos: usize, + budget: Budget, +} + +impl<'a> Ascii<'a> { + /// The next token and the position after it (the position is not advanced). + fn lex(&self) -> Result, usize)>> { + let mut i = self.pos; + loop { + match self.s.get(i) { + None => return Ok(None), + Some(c) if c.is_ascii_whitespace() => i += 1, + Some(b';') => i += self.s.get(i..).unwrap_or_default().iter().position(|c| *c == b'\n').unwrap_or(self.s.len() - i), + Some(_) => break, + } + } + let rest = self.s.get(i..).unwrap_or_default(); + Ok(Some(match rest.first() { + Some(b',') => (Tok::Comma, i + 1), + Some(b'{') => (Tok::Open, i + 1), + Some(b'}') => (Tok::Close, i + 1), + Some(b'"') => { + let len = rest.get(1..).unwrap_or_default().iter().position(|c| *c == b'"').ok_or_else(|| malformed(KIND, "unterminated string"))?; + (Tok::Str(rest.get(1..1 + len).unwrap_or_default()), i + len + 2) + } + _ => { + let len = rest.iter().position(|c| c.is_ascii_whitespace() || b",{}\":;".contains(c)).unwrap_or(rest.len()); + if len == 0 { + return Err(malformed(KIND, format!("unexpected character at byte {i}"))); + } + let word = std::str::from_utf8(rest.get(..len).unwrap_or_default()).map_err(|_| malformed(KIND, "text is not UTF-8"))?; + if rest.get(len) == Some(&b':') { (Tok::Key(word), i + len + 1) } else { (Tok::Word(word), i + len) } + } + })) + } + + /// Nodes until `}` (left for the caller) or the end. + fn nodes(&mut self, depth: usize) -> Result> { + if depth > MAX_DEPTH { + return Err(malformed(KIND, "nodes are nested too deeply")); + } + let mut out = Vec::new(); + while let Some((tok, after)) = self.lex()? { + match tok { + Tok::Close => break, + Tok::Key(name) => { + self.pos = after; + out.push(self.node(name, depth)?); + } + _ => return Err(malformed(KIND, format!("expected a property name at byte {}", self.pos))), + } + } + Ok(out) + } + + fn node(&mut self, name: &str, depth: usize) -> Result { + self.budget.charge(NODE_COST)?; + let mut props = Vec::new(); + while let Some((tok, after)) = self.lex()? { + let prop = match tok { + Tok::Str(s) => Some(Prop::S(String::from_utf8_lossy(s).into_owned())), + // `*N` announces an array's length. + Tok::Word(w) if w.starts_with('*') => None, + Tok::Word(w) => Some(w.parse::().map(Prop::I).or_else(|_| w.parse::().map(Prop::F)).unwrap_or_else(|_| Prop::S(w.to_string()))), + _ => break, + }; + self.pos = after; + if let Some(p) = prop { + self.budget.charge(PROP_COST)?; + props.push(p); + } + match self.lex()? { + Some((Tok::Comma, after)) => self.pos = after, + _ => break, + } + } + let mut children = Vec::new(); + if let Some((Tok::Open, after)) = self.lex()? { + self.pos = after; + children = self.nodes(depth + 1)?; + match self.lex()? { + Some((Tok::Close, after)) => self.pos = after, + _ => return Err(malformed(KIND, format!("\"{name}\" is missing its closing brace"))), + } + } + // Long value lists (arrays) are stored compactly. + if props.len() > 1 && props.iter().all(|p| p.num().is_some()) { + props = vec![Prop::Arr(props.iter().filter_map(Prop::num).collect())]; + } + Ok(Node { name: name.to_string(), props, children }) + } +} + +fn parse_ascii(s: &[u8]) -> Result<(Vec, i64)> { + let mut a = Ascii { s, pos: 0, budget: Budget(MAX_DECODED_BYTES) }; + let nodes = a.nodes(0)?; + if a.lex()?.is_some() { + return Err(malformed(KIND, "unbalanced closing brace")); + } + let version = nodes.iter().find(|n| n.name == "FBXHeaderExtension").and_then(|h| h.child("FBXVersion")).and_then(|v| v.int_at(0)); + let version = version.ok_or_else(|| malformed(KIND, "not an FBX file (no FBXHeaderExtension / FBXVersion)"))?; + Ok((nodes, version)) +} + +// --------------------------------------------------------------------------------------------- +// Scene. + +pub(crate) fn read(bytes: &[u8]) -> Result { + crate::guard(KIND, || read_inner(bytes)) +} + +fn read_inner(bytes: &[u8]) -> Result { + let (nodes, version) = if bytes.starts_with(MAGIC) { parse_binary(bytes)? } else { parse_ascii(bytes)? }; + if version < MIN_VERSION { + return Err(FormatError::Unsupported(format!("FBX version {version} (re-export as FBX 2011 / 7.x or newer)"))); + } + let root = |name: &str| nodes.iter().find(|n| n.name == name); + let objects = root("Objects").ok_or_else(|| malformed(KIND, "the file has no Objects"))?; + let (mut geometries, mut models, mut materials) = (HashMap::new(), HashMap::new(), HashMap::new()); + for o in &objects.children { + let Some(id) = o.int_at(0) else { continue }; + match o.name.as_str() { + "Geometry" if o.child("Vertices").is_some() => geometries.insert(id, o), + "Model" => models.insert(id, o), + "Material" => materials.insert(id, o), + _ => None, + }; + } + // (geometry, model) instances, Model parents, and each Model's materials in slot order. + let mut instances: Vec<(i64, Option)> = Vec::new(); + let mut parents: HashMap = HashMap::new(); + let mut slots: HashMap> = HashMap::new(); + for c in root("Connections").into_iter().flat_map(|c| c.all("C")) { + let (Some(child), Some(parent)) = (c.int_at(1), c.int_at(2)) else { continue }; + if c.str_at(0) != "OO" || !models.contains_key(&parent) { + continue; + } + if geometries.contains_key(&child) { + instances.push((child, Some(parent))); + } else if let Some(m) = materials.get(&child) { + let name = clean_name(m.str_at(1)); + slots.entry(parent).or_default().push(if name.is_empty() { format!("Material_{child}") } else { name.to_string() }); + } else if models.contains_key(&child) { + parents.insert(child, parent); + } + } + let placed: HashSet = instances.iter().map(|(g, _)| *g).collect(); + let mut unplaced: Vec = geometries.keys().filter(|g| !placed.contains(g)).copied().collect(); + unplaced.sort_unstable(); + instances.extend(unplaced.into_iter().map(|g| (g, None))); + + let global = global_transform(root("GlobalSettings")); + let mut sink = PolygonSink::default(); + let no_slots = Vec::new(); + for (geom, model) in instances { + let Some(g) = geometries.get(&geom) else { continue }; + let m = match model.and_then(|m| models.get(&m).map(|n| (m, n))) { + Some((id, node)) => { + sink.part = clean_name(node.str_at(1)).to_string(); + world(&models, &parents, id)? * geometric(node) + } + None => { + sink.part.clear(); + Mat4::IDENTITY + } + }; + let names = model.and_then(|m| slots.get(&m)).unwrap_or(&no_slots); + add_geometry(&mut sink, g, global * m, names)?; + } + Ok(sink.finish()) +} + +/// `Name\0\1Class` (binary) or `Class::Name` (ASCII) to `Name`. +fn clean_name(s: &str) -> &str { + match s.split_once("\u{0}\u{1}") { + Some((name, _)) => name, + None => s.split_once("::").map_or(s, |(_, name)| name), + } +} + +/// Unit scale to meters and the file's axis system to Y up (+Z front, +X right). +fn global_transform(settings: Option<&Node>) -> Mat4 { + let get = |name: &str, default: f64| settings.and_then(|s| s.number(name)).filter(|v| v.is_finite()).unwrap_or(default); + let unit = get("UnitScaleFactor", 1.0); + let unit = if unit > 0.0 { unit / 100.0 } else { 0.01 }; + let axis = |a: &str, s: &str, default: f64| (get(a, default) as i64, if get(s, 1.0) < 0.0 { -1.0 } else { 1.0 }); + let [(right, rs), (up, us), (front, fs)] = + [axis("CoordAxis", "CoordAxisSign", 0.0), axis("UpAxis", "UpAxisSign", 1.0), axis("FrontAxis", "FrontAxisSign", 2.0)]; + let basis = |a: i64| [Vec3::X, Vec3::Y, Vec3::Z].get(a as usize).copied().filter(|_| a >= 0); + let rows = match (basis(right), basis(up), basis(front)) { + (Some(r), Some(u), Some(f)) if r.cross(u).dot(f).abs() > 0.5 => Mat3::from_cols(r * rs, u * us, f * fs).transpose(), + _ => Mat3::IDENTITY, + }; + Mat4::from_mat3(rows) * Mat4::from_scale(Vec3::splat(unit as f32)) +} + +/// Euler rotation in degrees, `order` as FBX RotationOrder (0 = XYZ: X applied first). +fn euler(deg: Vec3, order: i64) -> Mat4 { + use Vec3 as V; + let axes = match order { + 1 => [V::X, V::Z, V::Y], + 2 => [V::Y, V::Z, V::X], + 3 => [V::Y, V::X, V::Z], + 4 => [V::Z, V::X, V::Y], + 5 => [V::Z, V::Y, V::X], + _ => [V::X, V::Y, V::Z], + }; + axes.iter().fold(Mat4::IDENTITY, |m, a| Mat4::from_axis_angle(*a, deg.dot(*a).to_radians()) * m) +} + +/// A Model's local transform: T · Roff · Rp · Rpre · R · Rpost⁻¹ · Rp⁻¹ · Soff · Sp · S · Sp⁻¹. +fn local(m: &Node) -> Mat4 { + let t = |name: &str| Mat4::from_translation(m.vec3(name, Vec3::ZERO)); + let order = m.number("RotationOrder").unwrap_or(0.0) as i64; + let (rp, sp) = (m.vec3("RotationPivot", Vec3::ZERO), m.vec3("ScalingPivot", Vec3::ZERO)); + t("Lcl Translation") + * t("RotationOffset") + * Mat4::from_translation(rp) + * euler(m.vec3("PreRotation", Vec3::ZERO), 0) + * euler(m.vec3("Lcl Rotation", Vec3::ZERO), order) + * euler(m.vec3("PostRotation", Vec3::ZERO), 0).inverse() + * Mat4::from_translation(-rp) + * t("ScalingOffset") + * Mat4::from_translation(sp) + * Mat4::from_scale(m.vec3("Lcl Scaling", Vec3::ONE)) + * Mat4::from_translation(-sp) +} + +/// The geometry offset of a Model (not inherited by its children). +fn geometric(m: &Node) -> Mat4 { + Mat4::from_translation(m.vec3("GeometricTranslation", Vec3::ZERO)) + * euler(m.vec3("GeometricRotation", Vec3::ZERO), 0) + * Mat4::from_scale(m.vec3("GeometricScaling", Vec3::ONE)) +} + +fn world(models: &HashMap, parents: &HashMap, id: i64) -> Result { + let mut m = Mat4::IDENTITY; + let mut cur = Some(id); + for _ in 0..=MAX_DEPTH { + let Some(node) = cur.and_then(|c| models.get(&c)) else { return Ok(m) }; + m = local(node) * m; + cur = cur.and_then(|c| parents.get(&c)).copied(); + } + Err(malformed(KIND, "the Model hierarchy is nested too deeply (or cyclic)")) +} + +#[derive(Clone, Copy)] +enum Mapping { + PolygonVertex, + ControlPoint, + Polygon, + AllSame, +} + +/// One LayerElement's items, optionally through an index array. +struct Layer<'a> { + mapping: Mapping, + data: Cow<'a, [f64]>, + index: Option>, +} + +impl Layer<'_> { + /// Element `index` names the index array (empty: the data is never indexed). + fn read<'a>(geom: &'a Node, element: &str, data: &str, index: &str) -> Option> { + let el = geom.children.iter().filter(|c| c.name == element).min_by_key(|e| e.int_at(0) != Some(0))?; + let mapping = match el.child_str("MappingInformationType") { + "ByPolygonVertex" => Mapping::PolygonVertex, + "ByVertice" | "ByVertex" | "ByControlPoint" => Mapping::ControlPoint, + "ByPolygon" => Mapping::Polygon, + "AllSame" => Mapping::AllSame, + _ => return None, + }; + let indexed = !index.is_empty() && matches!(el.child_str("ReferenceInformationType"), "IndexToDirect" | "Index"); + let index = if indexed { Some(el.child(index)?.arr()) } else { None }; + Some(Layer { mapping, data: el.child(data)?.arr(), index }) + } + + /// The `W` numbers of polygon vertex `k` (control point `cp`, polygon `poly`). + fn get(&self, k: usize, cp: usize, poly: usize) -> Option<[f64; W]> { + let i = match self.mapping { + Mapping::PolygonVertex => k, + Mapping::ControlPoint => cp, + Mapping::Polygon => poly, + Mapping::AllSame => 0, + }; + let i = match &self.index { + Some(ix) => Some(*ix.get(i)?).filter(|v| *v >= 0.0)? as usize, + None => i, + }; + let start = i.checked_mul(W)?; + self.data.get(start..start.checked_add(W)?)?.try_into().ok() + } +} + +fn add_geometry(sink: &mut PolygonSink, g: &Node, m: Mat4, slots: &[String]) -> Result<()> { + let verts = g.child("Vertices").map(Node::arr).unwrap_or_default(); + check_vertices(verts.len() / 3)?; + let points: Vec = verts.chunks_exact(3).map(|c| m.transform_point3(Vec3::new(c[0] as f32, c[1] as f32, c[2] as f32))).collect(); + let pvi = g.child("PolygonVertexIndex").map(Node::arr).unwrap_or_default(); + let normals = Layer::read(g, "LayerElementNormal", "Normals", "NormalsIndex"); + let uvs = Layer::read(g, "LayerElementUV", "UV", "UVIndex"); + let mats = Layer::read(g, "LayerElementMaterial", "Materials", ""); + let nm = Mat3::from_mat4(m).inverse().transpose(); + let flip = m.determinant() < 0.0; + let (mut corners, mut poly, mut bad_normals, mut bad_uvs) = (Vec::new(), 0usize, 0usize, 0usize); + for (k, &v) in pvi.iter().enumerate() { + // The last corner of each polygon is stored as -(index + 1). + let (cp, last) = if v < 0.0 { (-v - 1.0, true) } else { (v, false) }; + let p = points.get(cp as usize).filter(|_| cp.fract() == 0.0).ok_or_else(|| malformed(KIND, format!("polygon vertex index {v} out of range")))?; + let cp = cp as usize; + let n = normals.as_ref().and_then(|l| { + let n = l.get(k, cp, poly).map(|[x, y, z]| nm * Vec3::new(x as f32, y as f32, z as f32)); + bad_normals += usize::from(n.is_none()); + n + }); + // A UV layer with holes keeps its layout: missing items read as 0, 0. + let uv = uvs.as_ref().map(|l| match l.get(k, cp, poly) { + Some([u, v]) => Vec2::new(u as f32, 1.0 - v as f32), + None => { + bad_uvs += 1; + Vec2::ZERO + } + }); + corners.push(Corner { p: *p, n, uv }); + if last || k + 1 == pvi.len() { + if flip { + corners.reverse(); + } + let slot = mats.as_ref().and_then(|l| l.get(poly, poly, poly)).map_or(0.0, |[s]| s); + let name = slots.get(slot as usize).filter(|_| slot >= 0.0).map_or("Default", String::as_str); + sink.polygon(name, &corners)?; + corners.clear(); + poly += 1; + } + } + if bad_normals > 0 { + sink.warn(format!("{bad_normals} polygon corners have no normal in the FBX normal layer; normals were recomputed")); + } + if bad_uvs > 0 { + sink.warn(format!("{bad_uvs} polygon corners have no UV in the FBX UV layer (set to 0, 0)")); + } + Ok(()) +} diff --git a/crates/formats/src/mesh_import/gltf.rs b/crates/formats/src/mesh_import/gltf.rs new file mode 100644 index 00000000..8e39097b --- /dev/null +++ b/crates/formats/src/mesh_import/gltf.rs @@ -0,0 +1,250 @@ +//! glTF 2.0 / GLB: the default scene's node tree, flattened to world space. + +use std::path::Path; + +use gltf::accessor::{Accessor, DataType, Dimensions}; +use gltf::mesh::Mode; +use gltf::{Node, Semantic}; +use texturecraft_geom::glam::{Mat3, Mat4, Vec2, Vec3, Vec4}; + +use super::{RawMesh, check_triangles, check_vertices}; +use crate::{FormatError, Result, malformed}; + +const KIND: &str = "glTF"; +/// Deepest node hierarchy followed (also stops cyclic node graphs). +const MAX_DEPTH: usize = 64; +/// Node instances visited (bounds exponential instancing in shared node graphs). +const MAX_NODE_VISITS: usize = 1_000_000; + +pub(crate) fn read(bytes: &[u8], base: Option<&Path>) -> Result { + crate::guard(KIND, || read_inner(bytes, base)) +} + +fn read_inner(bytes: &[u8], base: Option<&Path>) -> Result { + let gltf::Gltf { document, blob } = gltf::Gltf::from_slice(bytes).map_err(|e| malformed(KIND, e))?; + check_buffer_uris(&document, base)?; + let buffers = gltf::import_buffers(&document, base, blob).map_err(|e| match e { + gltf::Error::ExternalReferenceInSliceImport => FormatError::Unsupported("this glTF references external files; open it from disk or use a .glb".into()), + e => malformed(KIND, e), + })?; + + let roots: Vec = match document.default_scene().or_else(|| document.scenes().next()) { + Some(scene) => scene.nodes().collect(), + None => { + // No scene: every node that is nobody's child. + let mut is_child = vec![false; document.nodes().len()]; + for n in document.nodes() { + for c in n.children() { + if let Some(f) = is_child.get_mut(c.index()) { + *f = true; + } + } + } + document.nodes().filter(|n| !is_child.get(n.index()).copied().unwrap_or(true)).collect() + } + }; + let mut raw = RawMesh { normals: Some(Vec::new()), ..RawMesh::default() }; + let mut attrs = Attrs::default(); + let mut stack: Vec<(Node, Mat4, usize)> = roots.into_iter().rev().map(|n| (n, Mat4::IDENTITY, 0)).collect(); + let mut visits = 0usize; + while let Some((node, parent, depth)) = stack.pop() { + visits += 1; + if visits > MAX_NODE_VISITS { + return Err(FormatError::TooLarge(format!("the glTF scene has more than {MAX_NODE_VISITS} node instances"))); + } + let m = parent * Mat4::from_cols_array_2d(&node.transform().matrix()); + if let Some(mesh) = node.mesh() { + let part = node.name().or_else(|| mesh.name()).unwrap_or_default(); + for prim in mesh.primitives() { + add_primitive(&mut raw, &mut attrs, &prim, m, &buffers, part)?; + } + } + if depth >= MAX_DEPTH { + return Err(malformed(KIND, "the node hierarchy is nested too deeply (or cyclic)")); + } + stack.extend(node.children().collect::>().into_iter().rev().map(|c| (c, m, depth + 1))); + } + match attrs.uv_seen { + (_, false) => raw.uvs = Some(attrs.uvs), + (true, true) => raw.warnings.push("some primitives have no UVs; the whole mesh was unwrapped automatically".into()), + (false, true) => {} + } + raw.colors = attrs.color_seen.then_some(attrs.colors); + Ok(raw) +} + +/// Per-vertex attributes gathered across primitives. +#[derive(Default)] +struct Attrs { + uvs: Vec, + /// (some primitive had UVs, some primitive had none) + uv_seen: (bool, bool), + /// White where a primitive has no COLOR_0. + colors: Vec, + color_seen: bool, +} + +fn add_primitive(raw: &mut RawMesh, attrs: &mut Attrs, prim: &gltf::Primitive, m: Mat4, buffers: &[gltf::buffer::Data], part: &str) -> Result<()> { + if prim.mode() != Mode::Triangles { + raw.warnings.push(format!("skipped a primitive drawn as {:?} (only triangles are supported)", prim.mode())); + return Ok(()); + } + let Some(pacc) = prim.get(&Semantic::Positions) else { + raw.warnings.push("skipped a primitive without positions".into()); + return Ok(()); + }; + check_accessor(&pacc, buffers, Dimensions::Vec3, &[DataType::F32], "position")?; + let nacc = prim.get(&Semantic::Normals); + if let Some(a) = &nacc { + check_accessor(a, buffers, Dimensions::Vec3, &[DataType::F32], "normal")?; + } + let tacc = prim.get(&Semantic::TexCoords(0)); + if let Some(a) = &tacc { + check_accessor(a, buffers, Dimensions::Vec2, &[DataType::F32, DataType::U8, DataType::U16], "texcoord")?; + } + let cacc = prim.get(&Semantic::Colors(0)); + if let Some(a) = &cacc { + let dims = if a.dimensions() == Dimensions::Vec3 { Dimensions::Vec3 } else { Dimensions::Vec4 }; + check_accessor(a, buffers, dims, &[DataType::F32, DataType::U8, DataType::U16], "color")?; + } + if let Some(a) = prim.indices() { + check_accessor(&a, buffers, Dimensions::Scalar, &[DataType::U8, DataType::U16, DataType::U32], "index")?; + } + let reader = prim.reader(|b| buffers.get(b.index()).map(|d| &d.0[..])); + let positions: Vec = reader.read_positions().ok_or_else(|| malformed(KIND, "unreadable positions"))?.map(Vec3::from).collect(); + let n = positions.len(); + check_vertices(raw.positions.len().saturating_add(n))?; + let mut indices: Vec = match reader.read_indices() { + Some(i) => i.into_u32().collect(), + None => (0..n as u32).collect(), + }; + indices.truncate(indices.len() / 3 * 3); + if let Some(bad) = indices.iter().find(|i| **i as usize >= n) { + return Err(malformed(KIND, format!("index {bad} out of range ({n} vertices)"))); + } + check_triangles(raw.triangle_count(), indices.len() / 3)?; + let normals: Option> = nacc.and_then(|_| reader.read_normals()).map(|it| it.map(Vec3::from).collect()); + let texcoords: Option> = tacc.and_then(|_| reader.read_tex_coords(0)).map(|t| t.into_f32().map(Vec2::from).collect()); + let colors: Option> = + cacc.and_then(|_| reader.read_colors(0)).map(|c| c.into_rgba_f32().map(Vec4::from).collect()).filter(|c: &Vec| c.len() == n); + attrs.color_seen |= colors.is_some(); + let color_of = |i: usize| colors.as_ref().and_then(|c| c.get(i)).copied().unwrap_or(Vec4::ONE); + + let m3 = Mat3::from_mat4(m); + let nm = m3.inverse().transpose(); + let flip = m3.determinant() < 0.0; + let world: Vec = positions.iter().map(|p| m.transform_point3(*p)).collect(); + let name = match prim.material().index() { + None => "Default".to_string(), + Some(i) => prim.material().name().map(str::to_string).unwrap_or_else(|| format!("Material_{i}")), + }; + let base = raw.positions.len() as u32; + let tex_ok = texcoords.as_ref().is_some_and(|t| t.len() == n); + if tex_ok { + attrs.uv_seen.0 = true + } else { + attrs.uv_seen.1 = true + } + let uv_of = |i: usize| texcoords.as_ref().and_then(|t| t.get(i)).copied().unwrap_or_default(); + let raw_normals = raw.normals.get_or_insert_with(Vec::new); + match normals.filter(|v| v.len() == n) { + Some(nrm) => { + raw.positions.extend_from_slice(&world); + raw_normals.extend(nrm.iter().map(|v| (nm * *v).try_normalize().unwrap_or(Vec3::Y))); + attrs.uvs.extend((0..n).map(uv_of)); + attrs.colors.extend((0..n).map(color_of)); + let group = raw.group(&name, part); + for t in indices.chunks_exact(3) { + let (a, b, c) = (t[0] + base, t[1] + base, t[2] + base); + group.extend_from_slice(&if flip { [a, c, b] } else { [a, b, c] }); + } + } + None => { + // glTF: flat normals when none are given, so every triangle gets its own corners. + let mut tris = Vec::with_capacity(indices.len()); + for t in indices.chunks_exact(3) { + let order = if flip { [t[0], t[2], t[1]] } else { [t[0], t[1], t[2]] }; + let p = order.map(|i| world.get(i as usize).copied().unwrap_or_default()); + let face = (p[1] - p[0]).cross(p[2] - p[0]).try_normalize().unwrap_or(Vec3::Y); + for (k, i) in order.iter().enumerate() { + tris.push(raw.positions.len() as u32); + raw.positions.push(p[k]); + raw_normals.push(face); + attrs.uvs.push(uv_of(*i as usize)); + attrs.colors.push(color_of(*i as usize)); + } + } + raw.group(&name, part).extend_from_slice(&tris); + } + } + Ok(()) +} + +/// Reject accessors the `gltf` reader would panic on or read out of bounds. +fn check_accessor(acc: &Accessor, buffers: &[gltf::buffer::Data], dims: Dimensions, types: &[DataType], what: &str) -> Result<()> { + let bad = |msg: &str| malformed(KIND, format!("{what} accessor {}: {msg}", acc.index())); + if acc.sparse().is_some() { + return Err(FormatError::Unsupported(format!("sparse glTF accessors ({what})"))); + } + if acc.dimensions() != dims || !types.contains(&acc.data_type()) { + return Err(bad("unexpected element type")); + } + let view = acc.view().ok_or_else(|| bad("has no buffer view"))?; + let data_len = buffers.get(view.buffer().index()).map(|d| d.0.len()).ok_or_else(|| bad("buffer is missing"))?; + if view.offset().checked_add(view.length()).is_none_or(|end| end > data_len) { + return Err(bad("buffer view exceeds its buffer")); + } + let size = acc.size(); + let stride = view.stride().unwrap_or(size); + let end = acc.count().checked_sub(1).and_then(|k| k.checked_mul(stride)).and_then(|x| x.checked_add(acc.offset())).and_then(|x| x.checked_add(size)); + if stride < size || end.is_none_or(|e| e > view.length()) { + return Err(bad("data exceeds its buffer view")); + } + Ok(()) +} + +/// Check buffer URIs before `gltf` resolves them: percent-decoding must give UTF-8 (`gltf` +/// panics otherwise), and files read from disk must be regular files of sane size. +fn check_buffer_uris(doc: &gltf::Document, base: Option<&Path>) -> Result<()> { + for buf in doc.buffers() { + let gltf::buffer::Source::Uri(uri) = buf.source() else { continue }; + if uri.starts_with("data:") { + continue; + } + let path = if let Some(rest) = uri.strip_prefix("file://").or_else(|| uri.strip_prefix("file:")) { + Some(std::path::PathBuf::from(rest)) + } else if uri.contains(':') { + None + } else { + let decoded = percent_decode(uri).ok_or_else(|| malformed(KIND, format!("buffer URI \"{uri}\" is not valid UTF-8")))?; + base.map(|b| b.join(decoded)) + }; + if let (Some(path), Some(_)) = (path, base) { + let meta = std::fs::metadata(&path).map_err(|e| malformed(KIND, format!("buffer {}: {e}", path.display())))?; + if !meta.is_file() || meta.len() > super::MAX_MESH_FILE_BYTES { + return Err(malformed(KIND, format!("buffer {} is not a regular file of acceptable size", path.display()))); + } + } + } + Ok(()) +} + +fn percent_decode(s: &str) -> Option { + let b = s.as_bytes(); + let mut out = Vec::with_capacity(b.len()); + let mut i = 0; + while let Some(&c) = b.get(i) { + let hex = |k: usize| b.get(k).and_then(|h| (*h as char).to_digit(16)); + match (c, hex(i + 1), hex(i + 2)) { + (b'%', Some(h), Some(l)) => { + out.push((h * 16 + l) as u8); + i += 3; + } + _ => { + out.push(c); + i += 1; + } + } + } + String::from_utf8(out).ok() +} diff --git a/crates/formats/src/mesh_import/mod.rs b/crates/formats/src/mesh_import/mod.rs new file mode 100644 index 00000000..810dd953 --- /dev/null +++ b/crates/formats/src/mesh_import/mod.rs @@ -0,0 +1,359 @@ +//! Mesh import: glTF/GLB, FBX, COLLADA, OBJ, PLY and STL into a world-space [`Mesh`] with one +//! submesh per material and part (glTF node, OBJ object, FBX model, COLLADA node; unnamed parts +//! take the file stem), materials contiguous, glTF UV convention (origin top-left, v down), +//! normals (computed when missing), vertex colors (glTF, OBJ, PLY), UVs (auto-unwrapped when +//! missing) and MikkTSpace tangents. + +mod dae; +mod fbx; +mod gltf; +mod obj; +mod ply; +#[cfg(test)] +mod scene_tests; +mod stl; +#[cfg(test)] +mod tests; + +use std::collections::HashMap; +use std::collections::hash_map::Entry; + +use texturecraft_geom::glam::{Vec2, Vec3, Vec4}; +use texturecraft_geom::unwrap::{all_triangles_degenerate, auto_unwrap, weld_ids}; +use texturecraft_geom::{MAX_TRIANGLES, Mesh, SubMesh, UvGBuffer}; + +use crate::{FormatError, Result}; + +/// Mesh files larger than this are refused before reading. +pub const MAX_MESH_FILE_BYTES: u64 = 2 << 30; +/// Vertices accepted from a file. +pub const MAX_VERTICES: usize = 3 * MAX_TRIANGLES; +/// Layout parameters of the automatic unwrap (padding in texels at this resolution). +const UNWRAP_RESOLUTION: u32 = 1024; +const UNWRAP_PADDING: f32 = 4.0; +/// Resolution of the overlap check in the report. +const REPORT_RESOLUTION: u32 = 512; + +/// File extensions [`import_mesh_bytes`] understands. +pub const MESH_EXTENSIONS: [&str; 7] = ["gltf", "glb", "fbx", "dae", "obj", "ply", "stl"]; + +#[derive(Clone, Debug, PartialEq)] +pub struct ImportedMesh { + pub mesh: Mesh, + pub report: MeshReport, +} + +/// What the importer found and fixed, for the import dialog. +#[derive(Clone, Debug, Default, PartialEq)] +pub struct MeshReport { + pub triangles: usize, + pub vertices: usize, + pub materials: usize, + /// The file had no UVs; they were generated by the automatic unwrap. + pub uvs_generated: bool, + /// Triangles with a UV outside 0..1. + pub uv_out_of_range: usize, + /// Overlapping texels / covered texels (512² per material). + pub overlap_ratio: f32, + pub zero_area_uv_triangles: usize, + pub warnings: Vec, +} + +/// Geometry as read from a file, before normals, UVs and tangents are completed. +#[derive(Default)] +pub(crate) struct RawMesh { + pub positions: Vec, + /// Per-vertex normals for every vertex, or None to compute smooth (welded) normals. + pub normals: Option>, + /// Per-vertex UVs (glTF convention) for every vertex, or None to auto-unwrap. + pub uvs: Option>, + /// Per-vertex linear RGBA colors for every vertex, or None. + pub colors: Option>, + /// Triangles (vertex indices) per (material, part name); an empty part is unnamed. + pub groups: Vec<(String, String, Vec)>, + pub warnings: Vec, +} + +impl RawMesh { + /// Triangle list of `material` in `part`, created on first use. + pub fn group(&mut self, material: &str, part: &str) -> &mut Vec { + let i = match self.groups.iter().position(|(m, p, _)| m == material && p == part) { + Some(i) => i, + None => { + self.groups.push((material.to_string(), part.to_string(), Vec::new())); + self.groups.len() - 1 + } + }; + &mut self.groups[i].2 + } + + pub fn triangle_count(&self) -> usize { + self.groups.iter().map(|(_, _, g)| g.len() / 3).sum() + } +} + +/// One polygon corner of a scene format (FBX, COLLADA), already in world space. +#[derive(Clone, Copy)] +pub(crate) struct Corner { + pub p: Vec3, + pub n: Option, + pub uv: Option, +} + +/// Collects polygons into a [`RawMesh`]: fan triangulation, one vertex per unique corner, and +/// normals / UVs kept only when every corner has them (else computed / unwrapped). +#[derive(Default)] +pub(crate) struct PolygonSink { + /// Part name of the polygons that follow. + pub part: String, + raw: RawMesh, + normals: Vec, + uvs: Vec, + missing_normals: bool, + missing_uvs: bool, + some_uvs: bool, + ids: HashMap<[u32; 8], u32>, + polygon: Vec, + triangles: usize, +} + +impl PolygonSink { + pub fn polygon(&mut self, material: &str, corners: &[Corner]) -> Result<()> { + if corners.len() < 3 { + return Ok(()); + } + check_triangles(self.triangles, corners.len() - 2)?; + self.triangles += corners.len() - 2; + self.polygon.clear(); + for c in corners { + self.missing_normals |= c.n.is_none(); + self.missing_uvs |= c.uv.is_none(); + self.some_uvs |= c.uv.is_some(); + let (n, uv) = (c.n.unwrap_or_default(), c.uv.unwrap_or_default()); + let key = [c.p.x, c.p.y, c.p.z, n.x, n.y, n.z, uv.x, uv.y].map(f32::to_bits); + let id = match self.ids.entry(key) { + Entry::Occupied(e) => *e.get(), + Entry::Vacant(e) => { + let id = self.raw.positions.len(); + check_vertices(id + 1)?; + self.raw.positions.push(c.p); + self.normals.push(n); + self.uvs.push(uv); + *e.insert(id as u32) + } + }; + self.polygon.push(id); + } + let group = self.raw.group(material, &self.part); + let (first, rest) = self.polygon.split_first().unwrap_or((&0, &[])); + for w in rest.windows(2) { + group.extend_from_slice(&[*first, w[0], w[1]]); + } + Ok(()) + } + + pub fn warn(&mut self, msg: String) { + if !self.raw.warnings.contains(&msg) { + self.raw.warnings.push(msg); + } + } + + pub fn finish(mut self) -> RawMesh { + if self.missing_uvs && self.some_uvs { + self.warn("some polygons have no UVs; the whole mesh was unwrapped automatically".into()); + } + self.raw.normals = (!self.missing_normals).then_some(self.normals); + self.raw.uvs = (!self.missing_uvs).then_some(self.uvs); + self.raw + } +} + +/// Error unless `n` more triangles keep the total within [`MAX_TRIANGLES`]. +pub(crate) fn check_triangles(have: usize, more: usize) -> Result<()> { + if have.saturating_add(more) > MAX_TRIANGLES { + return Err(FormatError::TooLarge(format!("mesh has more than {MAX_TRIANGLES} triangles"))); + } + Ok(()) +} + +pub(crate) fn check_vertices(n: usize) -> Result<()> { + if n > MAX_VERTICES { + return Err(FormatError::TooLarge(format!("mesh has more than {MAX_VERTICES} vertices"))); + } + Ok(()) +} + +fn extension(file_name: &str) -> String { + std::path::Path::new(file_name).extension().and_then(|e| e.to_str()).unwrap_or_default().to_ascii_lowercase() +} + +/// Import a mesh from bytes; the format comes from `file_name`'s extension. glTF must be GLB or +/// self-contained (data-URI buffers); OBJ material libraries are not read (usemtl names are). +pub fn import_mesh_bytes(file_name: &str, bytes: &[u8]) -> Result { + finish(read(file_name, bytes, None)?) +} + +/// Import a mesh file. A `.gltf` may reference external `.bin` buffers next to it. +#[cfg(not(target_arch = "wasm32"))] +pub fn import_mesh(path: &std::path::Path) -> Result { + let bytes = crate::read_capped(path, MAX_MESH_FILE_BYTES)?; + let name = path.file_name().and_then(|n| n.to_str()).unwrap_or_default(); + finish(read(name, &bytes, path.parent())?) +} + +/// Import a high-poly (or cage) mesh for baking: like [`import_mesh_bytes`], but missing UVs stay +/// at 0 and no tangents are generated (bakers read positions, normals, colors and part names), so +/// million-triangle meshes import quickly. +pub fn import_high_poly_bytes(file_name: &str, bytes: &[u8]) -> Result { + let (mut mesh, _, uvs) = geometry(read(file_name, bytes, None)?)?; + let n = mesh.positions.len(); + mesh.uvs = uvs.filter(|uv| uv.len() == n && uv.iter().all(|v| v.is_finite())).unwrap_or_else(|| vec![Vec2::ZERO; n]); + mesh.tangents = vec![Vec4::new(1.0, 0.0, 0.0, 1.0); n]; + mesh.validate()?; + Ok(mesh) +} + +fn read(file_name: &str, bytes: &[u8], base: Option<&std::path::Path>) -> Result { + let mut raw = match extension(file_name).as_str() { + "gltf" | "glb" => gltf::read(bytes, base)?, + "fbx" => fbx::read(bytes)?, + "dae" => dae::read(bytes)?, + "obj" => obj::read(bytes)?, + "ply" => ply::read(bytes)?, + "stl" => stl::read(bytes)?, + other => return Err(FormatError::Unsupported(format!("mesh format \".{other}\" (supported: {})", MESH_EXTENSIONS.join(", ")))), + }; + let stem = std::path::Path::new(file_name).file_stem().and_then(|s| s.to_str()).unwrap_or_default(); + for (material, part, _) in &mut raw.groups { + if part.is_empty() { + *part = if stem.is_empty() { material.clone() } else { stem.to_string() }; + } + } + Ok(raw) +} + +/// Positions, submeshes (materials contiguous), normals and colors of a raw mesh, validated; +/// plus its warnings and UVs (the mesh's UVs and tangents are left empty). +fn geometry(raw: RawMesh) -> Result<(Mesh, Vec, Option>)> { + let RawMesh { positions, normals, uvs, colors, groups, warnings } = raw; + check_vertices(positions.len())?; + check_triangles(0, groups.iter().map(|(_, _, g)| g.len() / 3).sum())?; + let mut mesh = Mesh { positions, ..Mesh::default() }; + let mut groups: Vec<(usize, String, Vec)> = groups + .into_iter() + .filter(|(_, _, g)| g.len() >= 3) + .map(|(material, part, tris)| { + let m = mesh.materials.iter().position(|x| *x == material).unwrap_or(mesh.materials.len()); + if m == mesh.materials.len() { + mesh.materials.push(material); + } + (m, part, tris) + }) + .collect(); + groups.sort_by_key(|g| g.0); + for (material, name, tris) in groups { + let start = u32::try_from(mesh.indices.len()).map_err(|_| FormatError::TooLarge("index count".into()))?; + let count = (tris.len() / 3 * 3) as u32; + mesh.indices.extend_from_slice(tris.get(..count as usize).unwrap_or_default()); + mesh.submeshes.push(SubMesh { name, material, start, count }); + } + if mesh.indices.is_empty() { + return Err(FormatError::Invalid("the file contains no triangles".into())); + } + if let Some(bad) = mesh.indices.iter().find(|i| **i as usize >= mesh.positions.len()) { + return Err(FormatError::Invalid(format!("vertex index {bad} out of range ({} vertices)", mesh.positions.len()))); + } + if mesh.positions.iter().any(|p| !p.is_finite()) { + return Err(FormatError::Invalid("the mesh has non-finite vertex positions".into())); + } + if all_triangles_degenerate(&mesh) { + return Err(FormatError::Invalid("every triangle of the mesh is degenerate (zero area)".into())); + } + mesh.normals = match normals { + Some(n) if n.len() == mesh.positions.len() => n.into_iter().map(|v| v.try_normalize().unwrap_or(Vec3::Y)).collect(), + _ => smooth_normals(&mesh), + }; + if let Some(c) = colors.filter(|c| c.len() == mesh.positions.len()) { + mesh.colors = c.into_iter().map(|v| if v.is_finite() { v.clamp(Vec4::ZERO, Vec4::ONE) } else { Vec4::ONE }).collect(); + } + Ok((mesh, warnings, uvs)) +} + +/// Complete a raw mesh: submeshes, normals, UVs, tangents, validation and the report. +pub(crate) fn finish(raw: RawMesh) -> Result { + let (mut mesh, mut warnings, uvs) = geometry(raw)?; + let uvs_generated = match uvs { + Some(uv) if uv.len() == mesh.positions.len() => { + if uv.iter().any(|v| !v.is_finite()) { + warnings.push("non-finite UVs were replaced with 0".into()); + } + mesh.uvs = uv.into_iter().map(|v| if v.is_finite() { v } else { Vec2::ZERO }).collect(); + mesh.compute_tangents(); + false + } + _ => { + let charts = auto_unwrap(&mut mesh, UNWRAP_PADDING, UNWRAP_RESOLUTION)?; + warnings.push(format!("the mesh has no UVs; generated an automatic unwrap with {charts} charts")); + true + } + }; + mesh.validate()?; + let report = report(&mesh, uvs_generated, warnings); + Ok(ImportedMesh { mesh, report }) +} + +/// Area-weighted smooth normals over welded positions (UV seams do not split shading). +fn smooth_normals(mesh: &Mesh) -> Vec { + let weld = weld_ids(&mesh.positions); + let mut acc = vec![Vec3::ZERO; mesh.positions.len()]; + for t in mesh.indices.chunks_exact(3) { + let p = |i: u32| mesh.positions.get(i as usize).copied().unwrap_or_default(); + let face = (p(t[1]) - p(t[0])).cross(p(t[2]) - p(t[0])); + for v in t { + if let Some(a) = weld.get(*v as usize).and_then(|w| acc.get_mut(*w as usize)) { + *a += face; + } + } + } + weld.iter().map(|w| acc.get(*w as usize).and_then(|n| n.try_normalize()).unwrap_or(Vec3::Y)).collect() +} + +fn report(mesh: &Mesh, uvs_generated: bool, mut warnings: Vec) -> MeshReport { + let (mut out_of_range, mut zero_area) = (0, 0); + for t in 0..mesh.triangle_count() { + let Some(vs) = mesh.tri(t) else { continue }; + let uv = vs.map(|v| mesh.uvs.get(v).copied().unwrap_or_default()); + if uv.iter().any(|u| u.min_element() < -1e-4 || u.max_element() > 1.0 + 1e-4) { + out_of_range += 1; + } + if (uv[1] - uv[0]).perp_dot(uv[2] - uv[0]).abs() < 1e-12 { + zero_area += 1; + } + } + let (mut overlaps, mut covered) = (0u64, 0u64); + for m in 0..mesh.materials.len() { + let g = UvGBuffer::new(mesh, m, REPORT_RESOLUTION, REPORT_RESOLUTION); + overlaps += g.overlaps as u64; + covered += g.covered_count() as u64; + } + let overlap_ratio = if covered == 0 { 0.0 } else { overlaps as f32 / covered as f32 }; + if out_of_range > 0 { + warnings.push(format!("{out_of_range} triangles have UVs outside 0..1 (UDIM tiles are not supported; those parts will not be painted)")); + } + if overlap_ratio > 0.01 { + warnings.push(format!("{:.1}% of the UV layout overlaps; painting there affects several places at once", overlap_ratio * 100.0)); + } + if zero_area > 0 { + warnings.push(format!("{zero_area} triangles have zero UV area and cannot be painted")); + } + MeshReport { + triangles: mesh.triangle_count(), + vertices: mesh.vertex_count(), + materials: mesh.materials.len(), + uvs_generated, + uv_out_of_range: out_of_range, + overlap_ratio, + zero_area_uv_triangles: zero_area, + warnings, + } +} diff --git a/crates/formats/src/mesh_import/obj.rs b/crates/formats/src/mesh_import/obj.rs new file mode 100644 index 00000000..ce259a5a --- /dev/null +++ b/crates/formats/src/mesh_import/obj.rs @@ -0,0 +1,85 @@ +//! Wavefront OBJ (via `tobj`): polygons fan-triangulated, one vertex per unique v/vt/vn. + +use texturecraft_geom::glam::{Vec2, Vec3, Vec4}; + +use super::{RawMesh, check_triangles, check_vertices}; +use crate::{Result, malformed}; + +const KIND: &str = "OBJ"; + +pub(crate) fn read(bytes: &[u8]) -> Result { + crate::guard(KIND, || read_inner(bytes)) +} + +fn read_inner(bytes: &[u8]) -> Result { + let text = String::from_utf8_lossy(bytes); + // Material names come from `usemtl` (MTL files are never read): tobj only assigns a face's + // material when a library defines it, so every library request gets a synthetic one. + let mut names: Vec<&str> = Vec::new(); + for line in text.lines().map(str::trim) { + if line.split_whitespace().next() == Some("usemtl") + && let Some((_, name)) = line.split_once(' ') + && !name.trim().is_empty() + && !names.contains(&name.trim()) + { + names.push(name.trim()); + } + } + let library: String = names.iter().map(|n| format!("newmtl {n}\n")).collect(); + let source = format!("mtllib texturecraft-usemtl.mtl\n{text}"); + let opts = tobj::LoadOptions { single_index: true, triangulate: true, ignore_points: true, ignore_lines: true }; + let (models, materials) = + tobj::load_obj_buf(&mut source.as_bytes(), &opts, |_| tobj::load_mtl_buf(&mut library.as_bytes())).map_err(|e| malformed(KIND, e))?; + let materials = materials.unwrap_or_default(); + + let mut raw = RawMesh::default(); + let (mut normals, mut uvs, mut colors) = (Some(Vec::new()), Some(Vec::new()), Vec::new()); + let mut partial_uvs = false; + for model in &models { + let m = &model.mesh; + let n = m.positions.len() / 3; + check_vertices(raw.positions.len().saturating_add(n))?; + check_triangles(raw.triangle_count(), m.indices.len() / 3)?; + let base = raw.positions.len() as u32; + raw.positions.extend(m.positions.chunks_exact(3).map(|p| Vec3::new(p[0], p[1], p[2]))); + if m.normals.len() == n * 3 { + if let Some(v) = &mut normals { + v.extend(m.normals.chunks_exact(3).map(|p| Vec3::new(p[0], p[1], p[2]))); + } + } else { + normals = None; + } + if m.texcoords.len() == n * 2 { + if let Some(v) = &mut uvs { + // OBJ UVs have their origin bottom-left. + v.extend(m.texcoords.chunks_exact(2).map(|t| Vec2::new(t[0], 1.0 - t[1]))); + } + } else { + partial_uvs |= n > 0 && !m.indices.is_empty(); + uvs = None; + } + // `v x y z r g b`: objects without colors are white. + match m.vertex_color.len() == n * 3 { + true => colors.extend(m.vertex_color.chunks_exact(3).map(|c| Vec4::new(c[0], c[1], c[2], 1.0))), + false => colors.extend(std::iter::repeat_n(Vec4::ONE, n)), + } + let name = match m.material_id { + Some(id) => materials.get(id).map(|mat| mat.name.clone()).filter(|s| !s.is_empty()).unwrap_or_else(|| format!("Material_{id}")), + None => "Default".to_string(), + }; + let group = raw.group(&name, &model.name); + for &i in m.indices.get(..m.indices.len() / 3 * 3).unwrap_or_default() { + if i as usize >= n { + return Err(malformed(KIND, format!("face index {i} out of range"))); + } + group.push(base + i); + } + } + if partial_uvs && models.iter().any(|m| !m.mesh.texcoords.is_empty()) { + raw.warnings.push("some objects have no UVs; the whole mesh was unwrapped automatically".into()); + } + raw.normals = normals; + raw.uvs = uvs; + raw.colors = models.iter().any(|m| !m.mesh.vertex_color.is_empty()).then_some(colors); + Ok(raw) +} diff --git a/crates/formats/src/mesh_import/ply.rs b/crates/formats/src/mesh_import/ply.rs new file mode 100644 index 00000000..1452aa41 --- /dev/null +++ b/crates/formats/src/mesh_import/ply.rs @@ -0,0 +1,262 @@ +//! Stanford PLY (ascii, binary little and big endian): vertex positions, normals, UVs and colors, +//! and faces of any size (fan-triangulated). Other elements and properties are skipped. + +use texturecraft_geom::glam::{Vec2, Vec3, Vec4}; + +use super::{RawMesh, check_triangles, check_vertices}; +use crate::{Result, malformed}; + +const KIND: &str = "PLY"; +/// Longest polygon accepted (a list count above this is treated as corruption). +const MAX_FACE_VERTICES: usize = 4096; + +#[derive(Clone, Copy, PartialEq)] +enum Ty { + I8, + U8, + I16, + U16, + I32, + U32, + F32, + F64, +} + +impl Ty { + fn parse(s: &str) -> Option { + Some(match s { + "char" | "int8" => Ty::I8, + "uchar" | "uint8" => Ty::U8, + "short" | "int16" => Ty::I16, + "ushort" | "uint16" => Ty::U16, + "int" | "int32" => Ty::I32, + "uint" | "uint32" => Ty::U32, + "float" | "float32" => Ty::F32, + "double" | "float64" => Ty::F64, + _ => return None, + }) + } + fn size(self) -> usize { + match self { + Ty::I8 | Ty::U8 => 1, + Ty::I16 | Ty::U16 => 2, + Ty::I32 | Ty::U32 | Ty::F32 => 4, + Ty::F64 => 8, + } + } +} + +struct Property { + name: String, + ty: Ty, + /// Count type of a list property. + list: Option, +} + +struct Element { + name: String, + count: usize, + props: Vec, +} + +#[derive(Clone, Copy, PartialEq)] +enum Encoding { + Ascii, + Le, + Be, +} + +/// Reads scalars from the body in either encoding. +struct Body<'a> { + data: &'a [u8], + pos: usize, + enc: Encoding, +} + +impl Body<'_> { + fn next_token(&mut self) -> Option<&str> { + let rest = self.data.get(self.pos..)?; + let start = rest.iter().position(|b| !b.is_ascii_whitespace())?; + let len = rest.get(start..)?.iter().position(|b| b.is_ascii_whitespace()).unwrap_or(rest.len() - start); + self.pos += start + len; + std::str::from_utf8(rest.get(start..start + len)?).ok() + } + + fn read(&mut self, ty: Ty) -> Result { + if self.enc == Encoding::Ascii { + let tok = self.next_token().ok_or_else(|| malformed(KIND, "unexpected end of data"))?; + return tok.parse::().map_err(|_| malformed(KIND, format!("bad number \"{tok}\""))); + } + let n = ty.size(); + let bytes = self.data.get(self.pos..self.pos + n).ok_or_else(|| malformed(KIND, "unexpected end of data"))?; + self.pos += n; + let mut b = [0u8; 8]; + b.get_mut(..n).unwrap_or_default().copy_from_slice(bytes); + if self.enc == Encoding::Be { + b.get_mut(..n).unwrap_or_default().reverse(); + } + Ok(match ty { + Ty::I8 => b[0] as i8 as f64, + Ty::U8 => b[0] as f64, + Ty::I16 => i16::from_le_bytes([b[0], b[1]]) as f64, + Ty::U16 => u16::from_le_bytes([b[0], b[1]]) as f64, + Ty::I32 => i32::from_le_bytes([b[0], b[1], b[2], b[3]]) as f64, + Ty::U32 => u32::from_le_bytes([b[0], b[1], b[2], b[3]]) as f64, + Ty::F32 => f32::from_le_bytes([b[0], b[1], b[2], b[3]]) as f64, + Ty::F64 => f64::from_le_bytes(b), + }) + } + + fn remaining(&self) -> usize { + self.data.len().saturating_sub(self.pos) + } +} + +pub(crate) fn read(bytes: &[u8]) -> Result { + let (elements, enc, body_start) = header(bytes)?; + let mut body = Body { data: bytes.get(body_start..).unwrap_or_default(), pos: 0, enc }; + let mut raw = RawMesh::default(); + let (mut normals, mut uvs, mut colors) = (Vec::new(), Vec::new(), Vec::new()); + let mut faces: Vec = Vec::new(); + let mut nverts = 0usize; + for el in &elements { + // Every item takes at least one byte, so the count can never exceed what is left. + if el.count > body.remaining() { + return Err(malformed(KIND, format!("element \"{}\" claims {} items but the file is too short", el.name, el.count))); + } + let find = |names: &[&str]| el.props.iter().position(|p| p.list.is_none() && names.contains(&p.name.as_str())); + let (px, py, pz) = (find(&["x"]), find(&["y"]), find(&["z"])); + let (nx, ny, nz) = (find(&["nx"]), find(&["ny"]), find(&["nz"])); + let (tu, tv) = (find(&["s", "u", "texture_u"]), find(&["t", "v", "texture_v"])); + let (cr, cg, cb, ca) = (find(&["red", "r"]), find(&["green", "g"]), find(&["blue", "b"]), find(&["alpha", "a"])); + let has_color = cr.is_some() && cg.is_some() && cb.is_some(); + let vertex = el.name == "vertex"; + let has_n = nx.is_some() && ny.is_some() && nz.is_some(); + let has_uv = tu.is_some() && tv.is_some(); + if vertex { + if px.is_none() || py.is_none() || pz.is_none() { + return Err(malformed(KIND, "vertices have no x, y, z")); + } + check_vertices(el.count)?; + nverts = el.count; + raw.positions.reserve(el.count); + } + let face_list = + (el.name == "face").then(|| el.props.iter().position(|p| p.list.is_some() && (p.name == "vertex_indices" || p.name == "vertex_index"))).flatten(); + let mut vals = vec![0.0f64; el.props.len()]; + let mut poly: Vec = Vec::new(); + for _ in 0..el.count { + for (k, p) in el.props.iter().enumerate() { + match p.list { + None => { + if let Some(v) = vals.get_mut(k) { + *v = body.read(p.ty)?; + } + } + Some(ct) => { + let len = body.read(ct)?; + if !(0.0..=MAX_FACE_VERTICES as f64).contains(&len) { + return Err(malformed(KIND, format!("bad list length {len}"))); + } + poly.clear(); + for _ in 0..len as usize { + let v = body.read(p.ty)?; + if face_list == Some(k) { + if !(0.0..nverts as f64).contains(&v) { + return Err(malformed(KIND, format!("face index {v} out of range"))); + } + poly.push(v as u32); + } + } + if face_list == Some(k) && poly.len() >= 3 { + check_triangles(faces.len() / 3, poly.len() - 2)?; + for i in 1..poly.len() - 1 { + faces.extend_from_slice(&[poly[0], poly[i], poly[i + 1]]); + } + } + } + } + } + if vertex { + let g = |i: Option| i.and_then(|i| vals.get(i)).copied().unwrap_or(0.0) as f32; + raw.positions.push(Vec3::new(g(px), g(py), g(pz))); + if has_n { + normals.push(Vec3::new(g(nx), g(ny), g(nz))); + } + if has_uv { + // PLY texture coordinates follow OpenGL (origin bottom-left). + uvs.push(Vec2::new(g(tu), 1.0 - g(tv))); + } + if has_color { + // Integer channels are normalized by their type's maximum; floats are 0..1. + let c = |i: Option, default: f32| match i.and_then(|i| el.props.get(i)) { + Some(p) => g(i) / color_scale(p.ty), + None => default, + }; + colors.push(Vec4::new(c(cr, 1.0), c(cg, 1.0), c(cb, 1.0), c(ca, 1.0))); + } + } + } + } + let n = raw.positions.len(); + raw.normals = (normals.len() == n).then_some(normals); + raw.uvs = (uvs.len() == n).then_some(uvs); + raw.colors = (colors.len() == n).then_some(colors); + raw.groups.push(("Default".into(), String::new(), faces)); + Ok(raw) +} + +fn color_scale(ty: Ty) -> f32 { + match ty { + Ty::U8 | Ty::I8 => 255.0, + Ty::U16 | Ty::I16 => 65535.0, + Ty::U32 | Ty::I32 => u32::MAX as f32, + Ty::F32 | Ty::F64 => 1.0, + } +} + +fn header(bytes: &[u8]) -> Result<(Vec, Encoding, usize)> { + if !bytes.starts_with(b"ply") { + return Err(malformed(KIND, "missing \"ply\" signature")); + } + let mut pos = 0usize; + let mut enc = None; + let mut elements: Vec = Vec::new(); + loop { + let rest = bytes.get(pos..).unwrap_or_default(); + let Some(nl) = rest.iter().position(|b| *b == b'\n') else { return Err(malformed(KIND, "header has no end_header")) }; + let line = std::str::from_utf8(rest.get(..nl).unwrap_or_default()).map_err(|_| malformed(KIND, "header is not text"))?.trim(); + pos += nl + 1; + let words: Vec<&str> = line.split_whitespace().collect(); + match words.as_slice() { + ["end_header"] => break, + ["format", f, ..] => { + enc = Some(match *f { + "ascii" => Encoding::Ascii, + "binary_little_endian" => Encoding::Le, + "binary_big_endian" => Encoding::Be, + other => return Err(malformed(KIND, format!("unknown format {other}"))), + }) + } + ["element", name, count] => { + let count = count.parse::().map_err(|_| malformed(KIND, format!("bad element count {count}")))?; + elements.push(Element { name: name.to_string(), count, props: Vec::new() }); + } + ["property", "list", ct, ty, name] => { + let el = elements.last_mut().ok_or_else(|| malformed(KIND, "property before element"))?; + let (ct, ty) = (Ty::parse(ct), Ty::parse(ty)); + let (Some(ct), Some(ty)) = (ct, ty) else { return Err(malformed(KIND, format!("bad list types in \"{line}\""))) }; + el.props.push(Property { name: name.to_string(), ty, list: Some(ct) }); + } + ["property", ty, name] => { + let el = elements.last_mut().ok_or_else(|| malformed(KIND, "property before element"))?; + let ty = Ty::parse(ty).ok_or_else(|| malformed(KIND, format!("bad property type {ty}")))?; + el.props.push(Property { name: name.to_string(), ty, list: None }); + } + ["ply"] | [] | ["comment", ..] | ["obj_info", ..] => {} + _ => return Err(malformed(KIND, format!("unexpected header line \"{line}\""))), + } + } + let enc = enc.ok_or_else(|| malformed(KIND, "header has no format line"))?; + Ok((elements, enc, pos)) +} diff --git a/crates/formats/src/mesh_import/scene_tests.rs b/crates/formats/src/mesh_import/scene_tests.rs new file mode 100644 index 00000000..593926d2 --- /dev/null +++ b/crates/formats/src/mesh_import/scene_tests.rs @@ -0,0 +1,455 @@ +//! FBX and COLLADA import, built from tiny files written here (binary FBX through a minimal +//! node writer, ASCII FBX from the same tree, COLLADA as text). + +use std::io::Write as _; + +use texturecraft_geom::glam::{Vec2, Vec3}; + +use super::tests::hammer; +use super::*; + +enum P { + I(i32), + L(i64), + D(f64), + S(&'static str), + Doubles(Vec), + Ints(Vec), +} + +struct N { + name: &'static str, + props: Vec

, + children: Vec, +} + +fn n(name: &'static str, props: Vec

, children: Vec) -> N { + N { name, props, children } +} + +/// `P: name, type, subtype, flags, values...` in a Properties70 block. +fn prop(name: &'static str, values: &[f64]) -> N { + let mut props = vec![P::S(name), P::S(name), P::S(""), P::S("A")]; + props.extend(values.iter().map(|v| P::D(*v))); + n("P", props, vec![]) +} + +fn props70(entries: Vec) -> N { + n("Properties70", vec![], entries) +} + +fn layer(name: &'static str, mapping: &'static str, reference: &'static str, data: Vec) -> N { + let mut children = vec![n("MappingInformationType", vec![P::S(mapping)], vec![]), n("ReferenceInformationType", vec![P::S(reference)], vec![])]; + children.extend(data); + n(name, vec![P::I(0)], children) +} + +/// A quad (material slot 0) and a triangle (slot 1) under a parented Model, two materials. +fn scene(z_up: bool) -> Vec { + // The Z-up variant also turns the parent with PreRotation instead of Lcl Rotation. + let rotation = if z_up { "PreRotation" } else { "Lcl Rotation" }; + // (UpAxis, FrontAxis, FrontAxisSign) + let (up, front, front_sign) = if z_up { (2.0, 1.0, -1.0) } else { (1.0, 2.0, 1.0) }; + let verts = vec![0.0, 0.0, 0.0, 100.0, 0.0, 0.0, 100.0, 100.0, 0.0, 0.0, 100.0, 0.0, 200.0, 0.0, 0.0, 300.0, 0.0, 0.0, 200.0, 100.0, 0.0]; + let geometry = n( + "Geometry", + vec![P::L(10), P::S("Quad\u{0}\u{1}Geometry"), P::S("Mesh")], + vec![ + n("Vertices", vec![P::Doubles(verts)], vec![]), + n("PolygonVertexIndex", vec![P::Ints(vec![0, 1, 2, -4, 4, 5, -7])], vec![]), + layer("LayerElementNormal", "ByPolygonVertex", "Direct", vec![n("Normals", vec![P::Doubles([0.0, 0.0, 1.0].repeat(7))], vec![])]), + layer( + "LayerElementUV", + "ByPolygonVertex", + "IndexToDirect", + vec![ + n("UV", vec![P::Doubles(vec![0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0])], vec![]), + n("UVIndex", vec![P::Ints(vec![0, 1, 2, 3, 0, 1, 3])], vec![]), + ], + ), + layer("LayerElementMaterial", "ByPolygon", "IndexToDirect", vec![n("Materials", vec![P::Ints(vec![0, 1])], vec![])]), + ], + ); + let model = |id: i64, name: &'static str, entries: Vec| n("Model", vec![P::L(id), P::S(name), P::S("Mesh")], vec![props70(entries)]); + let material = |id: i64, name: &'static str| n("Material", vec![P::L(id), P::S(name), P::S("")], vec![]); + let c = |child: i64, parent: i64| n("C", vec![P::S("OO"), P::L(child), P::L(parent)], vec![]); + vec![ + n("FBXHeaderExtension", vec![], vec![n("FBXVersion", vec![P::I(7400)], vec![])]), + n( + "GlobalSettings", + vec![], + vec![props70(vec![ + prop("UpAxis", &[up]), + prop("FrontAxis", &[front]), + prop("FrontAxisSign", &[front_sign]), + prop("CoordAxis", &[0.0]), + prop("UnitScaleFactor", &[1.0]), + ])], + ), + n( + "Objects", + vec![], + vec![ + geometry, + model(20, "Parent\u{0}\u{1}Model", vec![prop("Lcl Translation", &[0.0, 0.0, 100.0]), prop(rotation, &[0.0, 0.0, 90.0])]), + model(21, "Child\u{0}\u{1}Model", vec![prop("Lcl Translation", &[100.0, 0.0, 0.0])]), + material(30, "Red\u{0}\u{1}Material"), + material(31, "Blue\u{0}\u{1}Material"), + ], + ), + n("Connections", vec![], vec![c(10, 21), c(21, 20), c(20, 0), c(30, 21), c(31, 21)]), + ] +} + +/// Minimal binary FBX writer: 64-bit node records from version 7500, optional zlib arrays. +struct FbxWriter { + wide: bool, + compress: bool, +} + +impl FbxWriter { + fn uint(&self, out: &mut Vec, v: usize) { + if self.wide { out.extend((v as u64).to_le_bytes()) } else { out.extend((v as u32).to_le_bytes()) } + } + + fn null_record(&self, out: &mut Vec) { + out.extend(vec![0u8; if self.wide { 25 } else { 13 }]); + } + + fn array(&self, out: &mut Vec, ty: u8, count: usize, raw: Vec) { + out.push(ty); + out.extend((count as u32).to_le_bytes()); + let data = if self.compress { + let mut z = flate2::write::ZlibEncoder::new(Vec::new(), flate2::Compression::default()); + z.write_all(&raw).unwrap(); + z.finish().unwrap() + } else { + raw + }; + out.extend((self.compress as u32).to_le_bytes()); + out.extend((data.len() as u32).to_le_bytes()); + out.extend(data); + } + + fn node(&self, out: &mut Vec, node: &N) { + let mut props = Vec::new(); + for p in &node.props { + match p { + P::I(v) => { + props.push(b'I'); + props.extend(v.to_le_bytes()); + } + P::L(v) => { + props.push(b'L'); + props.extend(v.to_le_bytes()); + } + P::D(v) => { + props.push(b'D'); + props.extend(v.to_le_bytes()); + } + P::S(s) => { + props.push(b'S'); + props.extend((s.len() as u32).to_le_bytes()); + props.extend(s.as_bytes()); + } + P::Doubles(v) => self.array(&mut props, b'd', v.len(), v.iter().flat_map(|x| x.to_le_bytes()).collect()), + P::Ints(v) => self.array(&mut props, b'i', v.len(), v.iter().flat_map(|x| x.to_le_bytes()).collect()), + } + } + let start = out.len(); + self.uint(out, 0); + self.uint(out, node.props.len()); + self.uint(out, props.len()); + out.push(node.name.len() as u8); + out.extend(node.name.as_bytes()); + out.extend(props); + if !node.children.is_empty() { + for c in &node.children { + self.node(out, c); + } + self.null_record(out); + } + let mut end = Vec::new(); + self.uint(&mut end, out.len()); + out[start..start + end.len()].copy_from_slice(&end); + } +} + +fn binary_fbx(nodes: &[N], version: u32, compress: bool) -> Vec { + let w = FbxWriter { wide: version >= 7500, compress }; + let mut out = b"Kaydara FBX Binary \0\x1a\0".to_vec(); + out.extend(version.to_le_bytes()); + for node in nodes { + w.node(&mut out, node); + } + w.null_record(&mut out); + out.extend(b"footer padding"); + out +} + +fn ascii_fbx(nodes: &[N]) -> String { + fn write(s: &mut String, node: &N, indent: usize) { + let num = |v: f64| format!("{v}"); + let values: Vec = node + .props + .iter() + .map(|p| match p { + P::I(v) => v.to_string(), + P::L(v) => v.to_string(), + P::D(v) => num(*v), + P::S(t) => format!("\"{}\"", t.split_once("\u{0}\u{1}").map_or(t.to_string(), |(name, class)| format!("{class}::{name}"))), + P::Doubles(v) => format!("*{} {{\n a: {}\n}}", v.len(), v.iter().map(|x| num(*x)).collect::>().join(",")), + P::Ints(v) => format!("*{} {{\n a: {}\n}}", v.len(), v.iter().map(|x| x.to_string()).collect::>().join(",")), + }) + .collect(); + s.push_str(&format!("{}{}: {}", " ".repeat(indent), node.name, values.join(", "))); + if !node.children.is_empty() { + s.push_str(" {\n"); + for c in &node.children { + write(s, c, indent + 1); + } + s.push_str(&format!("{}}}", " ".repeat(indent))); + } + s.push('\n'); + } + let mut s = "; FBX 7.4.0 project file\n; ----------------------------------------------------\n\n".to_string(); + for node in nodes { + write(&mut s, node, 0); + } + s +} + +/// Bounds of the vertices material `name` uses. +fn material_bounds(m: &Mesh, name: &str) -> (Vec3, Vec3) { + let sm = m.submeshes.iter().find(|s| m.materials[s.material] == name).unwrap(); + let ids = &m.indices[sm.start as usize..(sm.start + sm.count) as usize]; + ids.iter().fold((Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)), |(lo, hi), i| (lo.min(m.positions[*i as usize]), hi.max(m.positions[*i as usize]))) +} + +fn close(a: Vec3, b: Vec3) -> bool { + (a - b).length() < 1e-4 +} + +fn check_fbx_scene(m: &Mesh, z_up: bool) { + assert_eq!(m.materials, vec!["Red".to_string(), "Blue".to_string()]); + assert_eq!(m.triangle_count(), 3); + assert_eq!(m.vertex_count(), 7); + assert!(m.submeshes.iter().all(|s| s.name == "Child"), "parts are named after their model"); + // cm to m, child (1, 0, 0) under a parent rotated 90° about Z and lifted 1 m. + let (lo, hi) = m.bounds(); + let (want_lo, want_hi) = if z_up { (Vec3::new(-1.0, 1.0, -4.0), Vec3::new(0.0, 1.0, -1.0)) } else { (Vec3::new(-1.0, 1.0, 1.0), Vec3::new(0.0, 4.0, 1.0)) }; + assert!(close(lo, want_lo) && close(hi, want_hi), "bounds {lo} {hi}"); + let up = if z_up { Vec3::Y } else { Vec3::Z }; + assert!(m.normals.iter().all(|nrm| close(*nrm, up)), "normals {:?}", m.normals); + let (red_lo, red_hi) = material_bounds(m, "Red"); + assert!(close(red_hi - red_lo, if z_up { Vec3::new(1.0, 0.0, 1.0) } else { Vec3::new(1.0, 1.0, 0.0) })); + // UVs through UVIndex, v flipped to glTF's convention: every corner of the quad is used. + let mut uvs: Vec = m.uvs.clone(); + uvs.sort_by(|a, b| a.x.total_cmp(&b.x).then(a.y.total_cmp(&b.y))); + uvs.dedup(); + assert_eq!(uvs, vec![Vec2::new(0.0, 0.0), Vec2::new(0.0, 1.0), Vec2::new(1.0, 0.0), Vec2::new(1.0, 1.0)]); + // Winding stays outward (front faces toward the normals). + for t in m.indices.chunks(3) { + let p = |i: u32| m.positions[i as usize]; + let face = (p(t[1]) - p(t[0])).cross(p(t[2]) - p(t[0])); + assert!(face.dot(m.normals[t[0] as usize]) > 0.0); + } +} + +#[test] +fn fbx_binary_32_and_64_bit_compressed_or_not() { + let nodes = scene(false); + for (version, compress) in [(7400, false), (7400, true), (7500, false), (7500, true)] { + let bytes = binary_fbx(&nodes, version, compress); + let m = import_mesh_bytes("scene.fbx", &bytes).unwrap_or_else(|e| panic!("{version} {compress}: {e}")).mesh; + check_fbx_scene(&m, false); + } +} + +#[test] +fn fbx_ascii_and_z_up() { + let text = ascii_fbx(&scene(false)); + check_fbx_scene(&import_mesh_bytes("scene.FBX", text.as_bytes()).unwrap().mesh, false); + check_fbx_scene(&import_mesh_bytes("z.fbx", ascii_fbx(&scene(true)).as_bytes()).unwrap().mesh, true); + check_fbx_scene(&import_mesh_bytes("z.fbx", &binary_fbx(&scene(true), 7700, true)).unwrap().mesh, true); +} + +#[test] +fn fbx_old_versions_and_garbage_are_errors() { + let mut old = binary_fbx(&scene(false), 7400, false); + old[23..27].copy_from_slice(&6100u32.to_le_bytes()); + assert!(matches!(import_mesh_bytes("old.fbx", &old), Err(FormatError::Unsupported(_)))); + assert!(import_mesh_bytes("a.fbx", b"; FBX 6.1.0 project file\nObjects: {\n}\n").is_err()); + // An array claiming 2^32-1 doubles never allocates its claim. + let mut huge = binary_fbx(&[n("Objects", vec![P::Doubles(vec![1.0])], vec![])], 7400, false); + let at = huge.windows(5).position(|w| w == [b'd', 1, 0, 0, 0]).unwrap() + 1; + huge[at..at + 4].copy_from_slice(&u32::MAX.to_le_bytes()); + assert!(import_mesh_bytes("h.fbx", &huge).is_err()); +} + +#[test] +fn malformed_fbx_and_dae_never_panic() { + hammer("x.fbx", &binary_fbx(&scene(false), 7400, false)); + hammer("x.fbx", &binary_fbx(&scene(true), 7500, true)); + hammer("x.fbx", ascii_fbx(&scene(false)).as_bytes()); + hammer("x.dae", DAE.as_bytes()); + // Random multi-byte corruptions (a fixed LCG keeps failures reproducible). + let mut seed = 0x2545_f491_4f6c_dd1du64; + let mut next = move || { + seed = seed.wrapping_mul(6364136223846793005).wrapping_add(1442695040888963407); + (seed >> 33) as usize + }; + for good in [binary_fbx(&scene(false), 7500, true), ascii_fbx(&scene(true)).into_bytes(), DAE.as_bytes().to_vec()] { + let name = if good.starts_with(b" + + Z_UP + + + + + + + + + 0 0 0 2 0 0 2 2 0 0 2 0 + + + + 0 0 1 + + + + 0 0 1 0 1 1 0 1 + + + + + + + + 4 +

0 0 0 1 0 1 2 0 2 3 0 3

+ +
+ + + + + 4 0 0 6 0 0 4 2 0 8 0 0 10 0 0 10 2 0 8 2 0 + + + + 0 0 1 0 0 1 0 0 1 0 1 1 0 1 + + + + + + +

0 1 2

+

3 4 5 6

+

0 1

+
+
+ + + + + 0 0 2 + 0 0 1 90 + + 2 2 2 + + + + + + + + + + + + + + +"##; + +#[test] +fn dae_polylist_z_up_units_and_node_transforms() { + let r = import_mesh_bytes("scene.dae", DAE.as_bytes()).unwrap(); + let m = &r.mesh; + assert_eq!(m.materials, vec!["Red".to_string(), "Blue".to_string()]); + assert_eq!(m.triangle_count(), 2 + 1 + 2); + assert!(!r.report.uvs_generated); + assert!(r.report.warnings.iter().any(|w| w.contains("lines"))); + // Quad: ×2 scale, 90° about Z, lifted 2 (Z up), half-meter units, then Z up → Y up. + let (lo, hi) = material_bounds(m, "Red"); + assert!(close(lo, Vec3::new(-2.0, 1.0, -2.0)) && close(hi, Vec3::new(0.0, 1.0, 0.0)), "{lo} {hi}"); + let (lo, hi) = material_bounds(m, "Blue"); + assert!(close(lo, Vec3::new(2.0, 0.0, -1.0)) && close(hi, Vec3::new(5.0, 0.0, 0.0)), "{lo} {hi}"); + for t in m.indices.chunks(3) { + for i in t { + assert!(close(m.normals[*i as usize], Vec3::Y), "normal {}", m.normals[*i as usize]); + } + } + assert!(m.uvs.iter().all(|uv| uv.x >= 0.0 && uv.x <= 1.0 && uv.y >= 0.0 && uv.y <= 1.0)); + // Parts are named after their nodes (ids when unnamed). + let parts: Vec<&str> = m.submeshes.iter().map(|s| s.name.as_str()).collect(); + assert!(parts.contains(&"child") && parts.contains(&"other"), "{parts:?}"); +} + +#[test] +fn glb_export_round_trips_with_textures() { + let mesh = texturecraft_geom::primitives::material_ball(); + let png = |color: image::ColorType| { + let mut out = std::io::Cursor::new(Vec::new()); + let channels = color.channel_count() as usize; + image::write_buffer_with_format(&mut out, &vec![200u8; 4 * channels], 2, 2, color, image::ImageFormat::Png).unwrap(); + out.into_inner() + }; + let black = { + let mut out = std::io::Cursor::new(Vec::new()); + image::write_buffer_with_format(&mut out, &[0u8; 12], 2, 2, image::ColorType::Rgb8, image::ImageFormat::Png).unwrap(); + out.into_inner() + }; + let file = |name: &str, bytes: Vec| crate::ExportedFile { name: name.into(), bytes, width: 2, height: 2, warnings: vec![] }; + let files = vec![ + file("BaseColor.png", png(image::ColorType::Rgba8)), + file("OcclusionRoughnessMetallic.png", png(image::ColorType::Rgb8)), + file("Normal.png", png(image::ColorType::Rgb8)), + file("Emissive.png", black), + ]; + let first = crate::GlbTextures::from_files(files); + assert!(first.emissive.is_none(), "black emissive maps are dropped"); + let bytes = crate::glb_bytes(&mesh, "Ball", &[first]).unwrap(); + let back = import_mesh_bytes("ball.glb", &bytes).unwrap().mesh; + assert_eq!(back.triangle_count(), mesh.triangle_count()); + assert_eq!(back.materials, mesh.materials); + let doc = ::gltf::Gltf::from_slice(&bytes).unwrap(); + assert_eq!(doc.images().count(), 3); + let mat = doc.materials().next().unwrap(); + assert!(mat.pbr_metallic_roughness().base_color_texture().is_some() && mat.normal_texture().is_some() && mat.occlusion_texture().is_some()); + assert_eq!(mat.alpha_mode(), ::gltf::material::AlphaMode::Blend); + // The second material has no textures and is not metallic. + let plain = doc.materials().nth(1).unwrap(); + assert!(plain.pbr_metallic_roughness().base_color_texture().is_none()); + assert_eq!(plain.pbr_metallic_roughness().metallic_factor(), 0.0); + for img in doc.images() { + assert!(matches!(img.source(), ::gltf::image::Source::View { mime_type: "image/png", .. })); + } +} diff --git a/crates/formats/src/mesh_import/stl.rs b/crates/formats/src/mesh_import/stl.rs new file mode 100644 index 00000000..9b39bf2c --- /dev/null +++ b/crates/formats/src/mesh_import/stl.rs @@ -0,0 +1,78 @@ +//! STL (binary and ascii). Facets keep their own corners, so shading is flat; there are no UVs. + +use texturecraft_geom::glam::Vec3; + +use super::{RawMesh, check_triangles}; +use crate::{Result, malformed}; + +const KIND: &str = "STL"; + +pub(crate) fn read(bytes: &[u8]) -> Result { + let count = bytes.get(80..84).map(|b| u32::from_le_bytes([b[0], b[1], b[2], b[3]]) as usize); + let binary_len = count.and_then(|c| c.checked_mul(50)).and_then(|n| n.checked_add(84)); + let looks_ascii = bytes.iter().position(|b| !b.is_ascii_whitespace()).and_then(|i| bytes.get(i..i + 5)) == Some(b"solid".as_slice()); + let tris = match (count, binary_len) { + // Exact size wins: many binary files also start with "solid". + (Some(c), Some(len)) if len == bytes.len() => binary(bytes, c)?, + _ if looks_ascii => ascii(bytes)?, + (Some(c), Some(len)) if len < bytes.len() => binary(bytes, c)?, + _ => return Err(malformed(KIND, "neither a complete binary STL nor an ascii STL")), + }; + let mut raw = RawMesh::default(); + check_triangles(0, tris.len())?; + let mut normals = Vec::with_capacity(tris.len() * 3); + for t in &tris { + let n = (t[1] - t[0]).cross(t[2] - t[0]).try_normalize().unwrap_or(Vec3::Y); + raw.positions.extend_from_slice(t); + normals.extend_from_slice(&[n; 3]); + } + raw.normals = Some(normals); + raw.groups.push(("Default".into(), String::new(), (0..raw.positions.len() as u32).collect())); + Ok(raw) +} + +fn binary(bytes: &[u8], count: usize) -> Result> { + check_triangles(0, count)?; + let mut out = Vec::with_capacity(count); + for i in 0..count { + let f = |k: usize| -> Result { + let o = 84 + i * 50 + 12 + k * 4; + let b = bytes.get(o..o + 4).ok_or_else(|| malformed(KIND, "truncated facet"))?; + Ok(f32::from_le_bytes([b[0], b[1], b[2], b[3]])) + }; + let v = |c: usize| -> Result { Ok(Vec3::new(f(c * 3)?, f(c * 3 + 1)?, f(c * 3 + 2)?)) }; + out.push([v(0)?, v(1)?, v(2)?]); + } + Ok(out) +} + +fn ascii(bytes: &[u8]) -> Result> { + let text = std::str::from_utf8(bytes).map_err(|_| malformed(KIND, "ascii STL is not text"))?; + let mut out = Vec::new(); + let mut facet: Vec = Vec::new(); + let mut words = text.split_whitespace(); + while let Some(w) = words.next() { + match w { + "vertex" => { + let mut c = [0.0f32; 3]; + for v in &mut c { + let tok = words.next().ok_or_else(|| malformed(KIND, "truncated vertex"))?; + *v = tok.parse().map_err(|_| malformed(KIND, format!("bad number \"{tok}\"")))?; + } + facet.push(Vec3::from(c)); + } + "endfacet" => { + for i in 1..facet.len().saturating_sub(1) { + check_triangles(out.len(), 1)?; + out.push([facet[0], facet[i], facet[i + 1]]); + } + facet.clear(); + } + _ => {} + } + } + if out.is_empty() { + return Err(malformed(KIND, "no facets")); + } + Ok(out) +} diff --git a/crates/formats/src/mesh_import/tests.rs b/crates/formats/src/mesh_import/tests.rs new file mode 100644 index 00000000..62cd3f86 --- /dev/null +++ b/crates/formats/src/mesh_import/tests.rs @@ -0,0 +1,415 @@ +use texturecraft_geom::glam::{Vec2, Vec3, Vec4}; + +use super::*; + +/// A GLB with one mesh of two primitives (materials "Red" and an unnamed one), placed under a +/// mirrored parent node (negative determinant) and a translated child. +fn glb(with_normals: bool, with_uvs: bool) -> Vec { + let mut bin = Vec::new(); + for p in [[0.0f32, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]] { + bin.extend(p.iter().flat_map(|v| v.to_le_bytes())); + } + for _ in 0..3 { + bin.extend([0.0f32, 0.0, 1.0].iter().flat_map(|v| v.to_le_bytes())); + } + for uv in [[0.0f32, 1.0], [1.0, 1.0], [0.0, 0.0]] { + bin.extend(uv.iter().flat_map(|v| v.to_le_bytes())); + } + for i in [0u16, 1, 2, 0] { + bin.extend(i.to_le_bytes()); + } + let mut attrs = serde_json::json!({ "POSITION": 0 }); + if with_normals { + attrs["NORMAL"] = 1.into(); + } + if with_uvs { + attrs["TEXCOORD_0"] = 2.into(); + } + let json = serde_json::json!({ + "asset": { "version": "2.0" }, + "scene": 0, + "scenes": [{ "nodes": [0] }], + "nodes": [{ "scale": [-1.0, 1.0, 1.0], "children": [1] }, { "translation": [1.0, 0.0, 0.0], "mesh": 0 }], + "meshes": [{ "primitives": [ + { "attributes": attrs, "indices": 3, "material": 0 }, + { "attributes": attrs, "indices": 3, "material": 1 } + ] }], + "materials": [{ "name": "Red" }, {}], + "buffers": [{ "byteLength": bin.len() }], + "bufferViews": [ + { "buffer": 0, "byteOffset": 0, "byteLength": 36 }, + { "buffer": 0, "byteOffset": 36, "byteLength": 36 }, + { "buffer": 0, "byteOffset": 72, "byteLength": 24 }, + { "buffer": 0, "byteOffset": 96, "byteLength": 6 } + ], + "accessors": [ + { "bufferView": 0, "componentType": 5126, "count": 3, "type": "VEC3", "min": [0.0, 0.0, 0.0], "max": [1.0, 1.0, 0.0] }, + { "bufferView": 1, "componentType": 5126, "count": 3, "type": "VEC3" }, + { "bufferView": 2, "componentType": 5126, "count": 3, "type": "VEC2" }, + { "bufferView": 3, "componentType": 5123, "count": 3, "type": "SCALAR" } + ] + }); + let mut js = serde_json::to_vec(&json).unwrap(); + while !js.len().is_multiple_of(4) { + js.push(b' '); + } + let total = 12 + 8 + js.len() + 8 + bin.len(); + let mut out = Vec::new(); + out.extend(b"glTF"); + out.extend(2u32.to_le_bytes()); + out.extend((total as u32).to_le_bytes()); + out.extend((js.len() as u32).to_le_bytes()); + out.extend(b"JSON"); + out.extend(&js); + out.extend((bin.len() as u32).to_le_bytes()); + out.extend(b"BIN\0"); + out.extend(&bin); + out +} + +fn base64(data: &[u8]) -> String { + const T: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + let mut s = String::new(); + for c in data.chunks(3) { + let b = [c[0], *c.get(1).unwrap_or(&0), *c.get(2).unwrap_or(&0)]; + let n = (b[0] as u32) << 16 | (b[1] as u32) << 8 | b[2] as u32; + for k in 0..4 { + s.push(if k <= c.len() { T[(n >> (18 - 6 * k) & 63) as usize] as char } else { '=' }); + } + } + s +} + +/// The same scene as an embedded .gltf (data-URI buffer). +fn embedded_gltf() -> Vec { + let g = glb(true, true); + let jlen = u32::from_le_bytes(g[12..16].try_into().unwrap()) as usize; + let mut json: serde_json::Value = serde_json::from_slice(&g[20..20 + jlen]).unwrap(); + let bin = &g[20 + jlen + 8..]; + json["buffers"][0]["uri"] = format!("data:application/octet-stream;base64,{}", base64(bin)).into(); + serde_json::to_vec(&json).unwrap() +} + +fn assert_outward(m: &Mesh) { + for t in 0..m.triangle_count() { + let [a, b, c] = m.tri(t).unwrap(); + let face = (m.positions[b] - m.positions[a]).cross(m.positions[c] - m.positions[a]); + assert!(face.dot(m.normals[a]) > 0.0, "triangle {t} winding disagrees with its normal"); + } +} + +#[test] +fn glb_two_materials_mirrored_node() { + let im = import_mesh_bytes("scene.glb", &glb(true, true)).unwrap(); + let m = &im.mesh; + assert_eq!(m.materials, vec!["Red".to_string(), "Material_1".to_string()]); + assert_eq!(m.submeshes.len(), 2); + assert_eq!((m.submeshes[1].start, m.submeshes[1].count), (3, 3)); + assert_eq!(im.report.triangles, 2); + assert!(!im.report.uvs_generated); + // Translation, then mirror in x. + assert!(m.positions.contains(&Vec3::new(-1.0, 0.0, 0.0))); + assert!(m.positions.contains(&Vec3::new(-2.0, 0.0, 0.0))); + for n in &m.normals { + assert!((*n - Vec3::Z).length() < 1e-5, "{n}"); + } + assert_outward(m); + assert!(m.uvs.contains(&Vec2::new(0.0, 1.0))); + m.validate().unwrap(); +} + +#[test] +fn gltf_embedded_buffers_and_missing_attributes() { + let im = import_mesh_bytes("scene.gltf", &embedded_gltf()).unwrap(); + assert_eq!(im.mesh.triangle_count(), 2); + // No normals: flat normals with consistent winding; no UVs: automatic unwrap. + let im = import_mesh_bytes("x.glb", &glb(false, false)).unwrap(); + assert!(im.report.uvs_generated); + assert_outward(&im.mesh); + assert!(im.mesh.uvs.iter().all(|uv| (0.0..=1.0).contains(&uv.x) && (0.0..=1.0).contains(&uv.y))); + assert_eq!(im.report.uv_out_of_range, 0); +} + +#[test] +fn gltf_external_buffer_needs_a_path() { + let mut json: serde_json::Value = serde_json::from_slice(&embedded_gltf()).unwrap(); + json["buffers"][0]["uri"] = "scene.bin".into(); + let err = import_mesh_bytes("scene.gltf", &serde_json::to_vec(&json).unwrap()).unwrap_err(); + assert!(matches!(err, FormatError::Unsupported(_)), "{err}"); +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn gltf_external_buffer_from_disk() { + let g = glb(true, true); + let jlen = u32::from_le_bytes(g[12..16].try_into().unwrap()) as usize; + let dir = std::env::temp_dir().join(format!("tc-formats-gltf-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + std::fs::write(dir.join("my scene.bin"), &g[20 + jlen + 8..]).unwrap(); + let mut json: serde_json::Value = serde_json::from_slice(&g[20..20 + jlen]).unwrap(); + json["buffers"][0]["uri"] = "my%20scene.bin".into(); + std::fs::write(dir.join("scene.gltf"), serde_json::to_vec(&json).unwrap()).unwrap(); + let im = import_mesh(&dir.join("scene.gltf")).unwrap(); + assert_eq!(im.mesh.triangle_count(), 2); + // A buffer that is a directory is refused before reading. + json["buffers"][0]["uri"] = ".".into(); + std::fs::write(dir.join("bad.gltf"), serde_json::to_vec(&json).unwrap()).unwrap(); + assert!(import_mesh(&dir.join("bad.gltf")).is_err()); + std::fs::remove_dir_all(&dir).unwrap(); +} + +const OBJ: &str = "mtllib missing.mtl +o quad +v 0 0 0 +v 1 0 0 +v 1 1 0 +v 0 1 0 +v 2 0 0 +vt 0 0 +vt 1 0 +vt 1 1 +vt 0 1 +vn 0 0 1 +usemtl Wood +f 1/1/1 2/2/1 3/3/1 +usemtl Metal +f 1/1/1 3/3/1 4/4/1 +usemtl Wood +f 2/2/1 5/2/1 3/3/1 4/4/1 +"; + +#[test] +fn obj_flips_v_and_keeps_usemtl_materials() { + let im = import_mesh_bytes("a.obj", OBJ.as_bytes()).unwrap(); + let m = &im.mesh; + assert_eq!(m.materials, vec!["Wood".to_string(), "Metal".to_string()]); + // Wood: one triangle + a fan-triangulated quad; Metal: one triangle. + assert_eq!(m.submeshes.iter().map(|s| s.count / 3).collect::>(), vec![3, 1]); + for (p, uv) in m.positions.iter().zip(&m.uvs) { + if *p == Vec3::ZERO { + assert_eq!(*uv, Vec2::new(0.0, 1.0), "OBJ v must be flipped"); + } + if *p == Vec3::new(1.0, 1.0, 0.0) { + assert_eq!(*uv, Vec2::new(1.0, 0.0)); + } + } + assert_outward(m); + m.validate().unwrap(); +} + +#[test] +fn obj_without_uvs_or_normals_is_completed() { + let im = import_mesh_bytes("b.OBJ", b"v 0 0 0\nv 1 0 0\nv 0 1 0\nv 0 0 1\nf 1 3 2\nf 1 2 4\nf 1 4 3\nf 2 3 4\n").unwrap(); + assert!(im.report.uvs_generated); + assert_eq!(im.mesh.materials, vec!["Default".to_string()]); + im.mesh.validate().unwrap(); + // Smooth normals over welded positions: every copy of a corner shares one normal. + let n0: Vec = im.mesh.positions.iter().zip(&im.mesh.normals).filter(|(p, _)| **p == Vec3::ZERO).map(|(_, n)| *n).collect(); + assert!(n0.len() > 1 && n0.iter().all(|n| (*n - n0[0]).length() < 1e-5)); +} + +fn ply_ascii() -> String { + "ply\nformat ascii 1.0\ncomment test\nelement vertex 4\nproperty float x\nproperty float y\nproperty float z\nproperty float s\nproperty float t\n\ + element face 1\nproperty list uchar int vertex_indices\nend_header\n\ + 0 0 0 0 0\n1 0 0 1 0\n1 1 0 1 1\n0 1 0 0 1\n4 0 1 2 3\n" + .to_string() +} + +fn ply_binary(big_endian: bool) -> Vec { + let enc = if big_endian { "binary_big_endian" } else { "binary_little_endian" }; + let mut b = format!( + "ply\r\nformat {enc} 1.0\r\nelement vertex 4\r\nproperty double x\r\nproperty double y\r\nproperty double z\r\nproperty float nx\r\nproperty float ny\r\nproperty float nz\r\n\ + property uchar red\r\nelement face 1\r\nproperty list uchar uint vertex_indices\r\nend_header\r\n" + ) + .into_bytes(); + let f64b = |v: f64| if big_endian { v.to_be_bytes().to_vec() } else { v.to_le_bytes().to_vec() }; + let f32b = |v: f32| if big_endian { v.to_be_bytes().to_vec() } else { v.to_le_bytes().to_vec() }; + let u32b = |v: u32| if big_endian { v.to_be_bytes().to_vec() } else { v.to_le_bytes().to_vec() }; + for p in [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 1.0, 0.0]] { + for v in p { + b.extend(f64b(v)); + } + for v in [0.0, 0.0, 1.0] { + b.extend(f32b(v)); + } + b.push(200); + } + b.push(4); + for i in [0, 1, 2, 3] { + b.extend(u32b(i)); + } + b +} + +#[test] +fn ply_ascii_and_binary() { + let a = import_mesh_bytes("a.ply", ply_ascii().as_bytes()).unwrap(); + assert_eq!(a.mesh.triangle_count(), 2); + assert!(!a.report.uvs_generated); + // PLY t is bottom-up like OBJ. + assert_eq!(a.mesh.uvs[0], Vec2::new(0.0, 1.0)); + for be in [false, true] { + let b = import_mesh_bytes("b.ply", &ply_binary(be)).unwrap(); + assert_eq!(b.mesh.triangle_count(), 2); + assert!(b.report.uvs_generated); + assert!(b.mesh.positions.contains(&Vec3::new(1.0, 1.0, 0.0))); + assert_outward(&b.mesh); + } +} + +fn stl_binary() -> Vec { + let mut b = vec![0u8; 80]; + b.extend(2u32.to_le_bytes()); + for tri in [[[0.0f32, 0.0, 0.0], [1.0, 0.0, 0.0], [1.0, 1.0, 0.0]], [[0.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 1.0, 0.0]]] { + b.extend([0.0f32; 3].iter().flat_map(|v| v.to_le_bytes())); + for v in tri { + b.extend(v.iter().flat_map(|x| x.to_le_bytes())); + } + b.extend([0u8, 0]); + } + b +} + +const STL_ASCII: &str = "solid test +facet normal 0 0 1 + outer loop + vertex 0 0 0 + vertex 1 0 0 + vertex 1 1 0 + endloop +endfacet +facet normal 0 0 1 + outer loop + vertex 0 0 0 + vertex 1 1 0 + vertex 0 1 0 + endloop +endfacet +endsolid test +"; + +#[test] +fn stl_ascii_and_binary() { + for (name, bytes) in [("a.stl", STL_ASCII.as_bytes().to_vec()), ("b.STL", stl_binary())] { + let im = import_mesh_bytes(name, &bytes).unwrap(); + assert_eq!(im.mesh.triangle_count(), 2, "{name}"); + assert!(im.report.uvs_generated); + assert_outward(&im.mesh); + } + // A binary file whose header starts with "solid" is still binary. + let mut b = stl_binary(); + b[..5].copy_from_slice(b"solid"); + assert_eq!(import_mesh_bytes("c.stl", &b).unwrap().mesh.triangle_count(), 2); +} + +/// Every prefix and some corruptions of a valid file: errors, never panics (and never an +/// error from the panic guard, which would mean a parser panicked). +pub(super) fn hammer(name: &str, good: &[u8]) { + let check = |bytes: &[u8]| { + if std::env::var("TC_TRACE").is_ok() { + std::fs::write(std::env::temp_dir().join("tc_last_case.bin"), bytes).unwrap(); + eprintln!("{name} {}", bytes.len()); + } + if let Err(e) = import_mesh_bytes(name, bytes) { + assert!(!e.to_string().contains("parser failed"), "{name}: a parser panicked on {} bytes", bytes.len()); + } + }; + for len in 0..good.len() { + check(&good[..len]); + } + for i in 0..good.len() { + let mut b = good.to_vec(); + b[i] ^= 0xA5; + check(&b); + b[i] = 0xFF; + check(&b); + } + assert!(import_mesh_bytes(name, &[]).is_err()); + assert!(import_mesh_bytes(name, b"\x00\x01garbage\xff\xfe").is_err()); +} + +#[test] +fn malformed_meshes_are_errors() { + hammer("x.glb", &glb(true, true)); + hammer("x.gltf", &embedded_gltf()); + hammer("x.obj", OBJ.as_bytes()); + hammer("x.ply", ply_ascii().as_bytes()); + hammer("x.ply", &ply_binary(false)); + hammer("x.ply", &ply_binary(true)); + hammer("x.stl", STL_ASCII.as_bytes()); + hammer("x.stl", &stl_binary()); + assert!(matches!(import_mesh_bytes("x.blend", b"whatever"), Err(FormatError::Unsupported(_)))); + // Hostile counts never allocate their claim. + let huge = "ply\nformat binary_little_endian 1.0\nelement vertex 4000000000\nproperty float x\nproperty float y\nproperty float z\nend_header\n"; + assert!(import_mesh_bytes("h.ply", huge.as_bytes()).is_err()); + let mut stl = vec![0u8; 80]; + stl.extend(u32::MAX.to_le_bytes()); + assert!(import_mesh_bytes("h.stl", &stl).is_err()); + // Meshes of only degenerate triangles are refused instead of crashing tangent generation. + assert!(import_mesh_bytes("p.obj", b"v 1 1 1\nv 1 1 1\nv 1 1 1\nf 1 2 3\n").is_err()); + assert!(import_mesh_bytes("q.obj", b"v 0 0 0\nv 0 0 0\nv 0 1 0\nf 1 2 3\nf 2 1 3\n").is_err()); +} + +#[test] +fn report_counts_uv_problems() { + let obj = "v 0 0 0\nv 1 0 0\nv 0 1 0\nv 1 1 0\nvt 0 0\nvt 2 0\nvt 0 1\nvt 0 0\nf 1/1 2/2 3/3\nf 2/4 4/4 3/4\n"; + let r = import_mesh_bytes("r.obj", obj.as_bytes()).unwrap().report; + assert_eq!(r.uv_out_of_range, 1); + assert_eq!(r.zero_area_uv_triangles, 1); + assert!(!r.warnings.is_empty()); +} + +#[test] +fn gltf_vertex_colors_and_node_names() { + // The embedded scene plus a COLOR_0 (RGBA float) on the first primitive and a named node. + let mut json: serde_json::Value = serde_json::from_slice(&embedded_gltf()).unwrap(); + let colors: Vec = [[1.0f32, 0.0, 0.0, 0.5]; 3].iter().flatten().flat_map(|v| v.to_le_bytes()).collect(); + json["buffers"] + .as_array_mut() + .unwrap() + .push(serde_json::json!({ "byteLength": 48, "uri": format!("data:application/octet-stream;base64,{}", base64(&colors)) })); + json["bufferViews"].as_array_mut().unwrap().push(serde_json::json!({ "buffer": 1, "byteOffset": 0, "byteLength": 48 })); + json["accessors"].as_array_mut().unwrap().push(serde_json::json!({ "bufferView": 4, "componentType": 5126, "count": 3, "type": "VEC4" })); + json["meshes"][0]["primitives"][0]["attributes"]["COLOR_0"] = 4.into(); + json["nodes"][1]["name"] = "Body_low".into(); + let m = import_mesh_bytes("scene.gltf", &serde_json::to_vec(&json).unwrap()).unwrap().mesh; + assert_eq!(m.colors.len(), m.vertex_count()); + let red = Vec4::new(1.0, 0.0, 0.0, 0.5); + // The colored primitive's vertices are red, the other primitive's white. + let first = &m.indices[m.submeshes[0].start as usize..][..3]; + assert!(first.iter().all(|i| m.colors[*i as usize] == red), "{:?}", m.colors); + assert!(m.colors.contains(&Vec4::ONE)); + assert!(m.submeshes.iter().all(|s| s.name == "Body_low")); + // Unnamed parts take the file stem; a mesh without COLOR_0 has no colors. + let plain = import_mesh_bytes("scene.glb", &glb(true, true)).unwrap().mesh; + assert!(plain.submeshes.iter().all(|s| s.name == "scene") && plain.colors.is_empty()); +} + +#[test] +fn obj_and_ply_vertex_colors_and_objects() { + let obj = "o Wheel_low\nv 0 0 0 1 0 0\nv 1 0 0 1 0 0\nv 0 1 0 1 0 0\nf 1 2 3\no Body_low\nv 0 0 1 0 1 0\nv 1 0 1 0 1 0\nv 0 1 1 0 1 0\nf 4 5 6\n"; + let m = import_mesh_bytes("car.obj", obj.as_bytes()).unwrap().mesh; + assert_eq!(m.submeshes.iter().map(|s| s.name.as_str()).collect::>(), ["Wheel_low", "Body_low"]); + assert_eq!(m.materials.len(), 1, "one material, two parts"); + assert_eq!(m.colors.len(), m.vertex_count()); + for (p, c) in m.positions.iter().zip(&m.colors) { + assert_eq!(*c, if p.z == 0.0 { Vec4::new(1.0, 0.0, 0.0, 1.0) } else { Vec4::new(0.0, 1.0, 0.0, 1.0) }); + } + let ply = "ply\nformat ascii 1.0\nelement vertex 3\nproperty float x\nproperty float y\nproperty float z\nproperty uchar red\nproperty uchar green\nproperty uchar blue\n\ + element face 1\nproperty list uchar int vertex_indices\nend_header\n0 0 0 255 0 51\n1 0 0 255 0 51\n0 1 0 255 0 51\n3 0 1 2\n"; + let m = import_mesh_bytes("rock_high.ply", ply.as_bytes()).unwrap().mesh; + assert!(m.colors.iter().all(|c| (*c - Vec4::new(1.0, 0.0, 0.2, 1.0)).length() < 1e-6), "{:?}", m.colors); + assert_eq!(m.submeshes[0].name, "rock_high"); +} + +#[test] +fn high_poly_import_skips_unwrap_and_rejects_garbage() { + let m = import_high_poly_bytes("x.glb", &glb(false, false)).unwrap(); + m.validate().unwrap(); + assert!(m.uvs.iter().all(|uv| *uv == Vec2::ZERO), "no automatic unwrap"); + assert_eq!(m.tangents.len(), m.vertex_count()); + assert!(import_high_poly_bytes("x.glb", b"glTF\x02\0\0\0garbage").is_err()); + assert!(import_high_poly_bytes("x.obj", b"v 0 0 0\nv nan 1 0\nv 0 1 0\nf 1 2 3\n").is_err()); + assert!(import_high_poly_bytes("x.ply", b"ply\nformat ascii 1.0\nelement vertex 99999999\n").is_err()); + assert!(import_high_poly_bytes("x.txt", b"").is_err()); +} diff --git a/crates/formats/src/presets.rs b/crates/formats/src/presets.rs new file mode 100644 index 00000000..dfaba47d --- /dev/null +++ b/crates/formats/src/presets.rs @@ -0,0 +1,170 @@ +//! Built-in export presets and user preset JSON. Preset names are ours; their contents follow +//! each engine's public material conventions. + +use texturecraft_core::{BakedMap, Channel, ChannelKind}; + +use crate::export::{Dest, ExportPreset, FileFormat, MapSpec, SourceRef, VirtualMap}; +use crate::{FormatError, Result}; + +/// Largest preset JSON accepted. +const MAX_PRESET_JSON: usize = 1 << 20; + +fn ch(channel: Channel, component: u8) -> SourceRef { + SourceRef::Channel { channel, component } +} + +fn virt(map: VirtualMap, component: u8) -> SourceRef { + SourceRef::Virtual { map, component } +} + +/// `$mesh_$textureSet_` PNG. +fn map(suffix: &str, bit_depth: u8, channels: Vec<(Dest, SourceRef)>) -> MapSpec { + MapSpec { file: format!("$mesh_$textureSet_{suffix}"), format: FileFormat::Png, bit_depth, channels } +} + +fn rgb(f: impl Fn(u8) -> SourceRef) -> Vec<(Dest, SourceRef)> { + vec![(Dest::R, f(0)), (Dest::G, f(1)), (Dest::B, f(2))] +} + +fn gray(s: SourceRef) -> Vec<(Dest, SourceRef)> { + vec![(Dest::L, s)] +} + +/// Base color RGB with opacity in alpha (alpha is dropped when the set has no opacity). +fn base_with_alpha() -> Vec<(Dest, SourceRef)> { + let mut c = rgb(|k| ch(Channel::BaseColor, k)); + c.push((Dest::A, ch(Channel::Opacity, 0))); + c +} + +fn normal(map_kind: VirtualMap) -> Vec<(Dest, SourceRef)> { + rgb(|k| virt(map_kind, k)) +} + +/// One file per channel: RGB for colors and normals, grayscale (16-bit for height) otherwise. +fn channel_map(c: Channel) -> MapSpec { + let (channels, depth) = match c.kind() { + ChannelKind::Color | ChannelKind::NormalMap => (rgb(|k| ch(c, k)), 8), + ChannelKind::Signed => (gray(ch(c, 0)), 16), + ChannelKind::Scalar => (gray(ch(c, 0)), 8), + }; + map("$channel", depth, channels) +} + +fn orm() -> Vec<(Dest, SourceRef)> { + vec![(Dest::R, virt(VirtualMap::AoMixed, 0)), (Dest::G, ch(Channel::Roughness, 0)), (Dest::B, ch(Channel::Metallic, 0))] +} + +/// File stems of the glTF metallic-roughness maps (also the GLB export's texture slots). +pub(crate) const GLTF_BASE_COLOR: &str = "BaseColor"; +pub(crate) const GLTF_ORM: &str = "OcclusionRoughnessMetallic"; +pub(crate) const GLTF_NORMAL: &str = "Normal"; +pub(crate) const GLTF_EMISSIVE: &str = "Emissive"; + +/// glTF metallic-roughness maps (8-bit PNG); `file` turns a stem above into a file template. +pub(crate) fn gltf_pbr_maps(file: impl Fn(&str) -> String) -> Vec { + let spec = |stem: &str, channels| MapSpec { file: file(stem), format: FileFormat::Png, bit_depth: 8, channels }; + vec![ + spec(GLTF_BASE_COLOR, base_with_alpha()), + spec(GLTF_ORM, orm()), + spec(GLTF_NORMAL, normal(VirtualMap::NormalOpenGl)), + spec(GLTF_EMISSIVE, rgb(|k| ch(Channel::Emissive, k))), + ] +} + +/// Every built-in preset, in menu order. +pub fn builtin_presets() -> Vec { + let preset = |name: &str, maps: Vec| ExportPreset { name: name.into(), maps }; + vec![ + preset("Document channels + Normal + AO", { + let mut maps: Vec = + Channel::ALL.into_iter().filter(|c| !matches!(c, Channel::Normal | Channel::AmbientOcclusion)).map(channel_map).collect(); + maps.push(map("normal", 8, rgb(|k| ch(Channel::Normal, k)))); + maps.push(map("ambientOcclusion", 8, gray(virt(VirtualMap::AoMixed, 0)))); + maps + }), + preset("glTF PBR Metal Roughness", gltf_pbr_maps(|s| format!("$mesh_$textureSet_{s}"))), + preset( + "Unreal Engine (Packed)", + vec![map("BaseColor", 8, base_with_alpha()), map("OcclusionRoughnessMetallic", 8, orm()), map("Normal", 8, normal(VirtualMap::NormalDirectX))], + ), + preset( + "Unity HDRP (Mask Map)", + vec![ + map("BaseMap", 8, base_with_alpha()), + map( + "MaskMap", + 8, + vec![ + (Dest::R, ch(Channel::Metallic, 0)), + (Dest::G, virt(VirtualMap::AoMixed, 0)), + // Detail mask: none. + (Dest::B, SourceRef::Constant(0.0)), + (Dest::A, virt(VirtualMap::Glossiness, 0)), + ], + ), + map("Normal", 8, normal(VirtualMap::NormalOpenGl)), + ], + ), + preset( + "Unity Standard (Metallic Smoothness)", + vec![ + map("Albedo", 8, base_with_alpha()), + map( + "MetallicSmoothness", + 8, + vec![ + (Dest::R, ch(Channel::Metallic, 0)), + (Dest::G, SourceRef::Constant(0.0)), + (Dest::B, SourceRef::Constant(0.0)), + (Dest::A, virt(VirtualMap::Glossiness, 0)), + ], + ), + map("Normal", 8, normal(VirtualMap::NormalOpenGl)), + map("Occlusion", 8, gray(virt(VirtualMap::AoMixed, 0))), + ], + ), + preset( + "Blender (Principled BSDF)", + vec![ + map("BaseColor", 8, base_with_alpha()), + map("Metallic", 8, gray(ch(Channel::Metallic, 0))), + map("Roughness", 8, gray(ch(Channel::Roughness, 0))), + map("Normal", 8, normal(VirtualMap::NormalOpenGl)), + map("Height", 16, gray(ch(Channel::Height, 0))), + map("Emission", 8, rgb(|k| ch(Channel::Emissive, k))), + map("Specular", 8, gray(ch(Channel::SpecularLevel, 0))), + ], + ), + preset("Separate maps", Channel::ALL.into_iter().map(channel_map).collect()), + preset( + "Mesh maps", + BakedMap::ALL + .into_iter() + .map(|m| { + let src = |component| SourceRef::Baked { map: m, component }; + map("$channel", 16, if m.components() == 3 { rgb(src) } else { gray(src(0)) }) + }) + .collect(), + ), + ] +} + +/// A built-in preset by name (case-insensitive). +pub fn builtin_preset(name: &str) -> Option { + builtin_presets().into_iter().find(|p| p.name.eq_ignore_ascii_case(name.trim())) +} + +/// Parse and validate a user preset. +pub fn preset_from_json(json: &str) -> Result { + if json.len() > MAX_PRESET_JSON { + return Err(FormatError::TooLarge("export preset JSON over 1 MiB".into())); + } + let p: ExportPreset = serde_json::from_str(json).map_err(|e| crate::malformed("export preset", e))?; + p.validate()?; + Ok(p) +} + +pub fn preset_to_json(preset: &ExportPreset) -> Result { + serde_json::to_string_pretty(preset).map_err(|e| FormatError::Invalid(e.to_string())) +} diff --git a/crates/formats/src/project_file/mod.rs b/crates/formats/src/project_file/mod.rs new file mode 100644 index 00000000..f05e07d4 --- /dev/null +++ b/crates/formats/src/project_file/mod.rs @@ -0,0 +1,387 @@ +//! The `.tcraft` project file: a deflate zip holding +//! +//! | entry | content | +//! |---|---| +//! | `project.json` | serde JSON of [`Project`] | +//! | `mesh.` | the original imported mesh file (absent for built-in meshes, `Project.mesh = "builtin:"`) | +//! | `highpoly/` | a high-definition mesh file for baking, in list order | +//! | `cage/` | the baking cage mesh file | +//! | `pixels/layer__.bin` | painted pixels of a paint layer (or content paint effect) channel | +//! | `pixels/mask_.bin` | painted pixels of a mask paint effect | +//! | `baked/_.bin` | a baked mesh map of texture set `` | +//! | `thumbnail.png` | optional preview supplied by the caller | +//! +//! Pixel `.bin` files are sparse and lossless: a header (magic `TCTX`, version, width, height, +//! components, tile count; u32 LE each) followed, for every allocated 64×64 tile, by `tx`, `ty` +//! (u32 LE) and the tile's raw `u16` LE components. Baked maps use the same header with a tile +//! count of 0, followed by `width × height × components` f32 LE. + +use std::collections::BTreeMap; +use std::io::{Cursor, Read, Seek, Write}; +use std::sync::Arc; + +use texturecraft_compose::{BakedMaps, PixelStore}; +use texturecraft_core::{BakedMap, Channel, FORMAT_VERSION, LayerId, Project}; +use texturecraft_texel::{TILE_AREA, TileImage}; +use zip::write::SimpleFileOptions; +use zip::{CompressionMethod, ZipArchive, ZipWriter}; + +use crate::{FormatError, MAX_IMAGE_SIZE, Result, malformed}; + +const KIND: &str = "project file"; +const MAGIC: &[u8; 4] = b"TCTX"; +/// Version of the `.bin` layout. +const BIN_VERSION: u32 = 1; +const MAX_JSON: u64 = 256 << 20; +const MAX_THUMBNAIL: u64 = 64 << 20; +const MAX_RESOURCE: u64 = 512 << 20; +const MAX_ENTRIES: usize = 100_000; +/// Total decompressed bytes accepted from one project file (zip-bomb guard). +const MAX_TOTAL: u64 = 8 << 30; + +/// Everything a project file holds. +#[derive(Clone, Debug)] +pub struct ProjectFile { + pub project: Project, + pub pixels: PixelStore, + /// Baked mesh maps per texture set index. + pub baked: BTreeMap, + /// Original mesh file: (extension, bytes). + pub mesh: Option<(String, Vec)>, + /// High-definition mesh files for baking: (file name, bytes). Names are + /// [`sanitize_resource_name`]d on save. + pub high_poly: Vec<(String, Vec)>, + /// Baking cage mesh file: (file name, bytes). + pub cage: Option<(String, Vec)>, + pub thumbnail: Option>, + /// Imported resources (images used by fills, alphas, stencils), by name: original bytes. + pub resources: BTreeMap>, +} + +/// A resource name safe as a zip entry and a file name: `[A-Za-z0-9_.-]`, at most 120 chars. +pub fn sanitize_resource_name(name: &str) -> String { + let s: String = name.chars().map(|c| if c.is_ascii_alphanumeric() || matches!(c, '_' | '.' | '-') { c } else { '_' }).take(120).collect(); + let s = s.trim_start_matches('.').to_string(); + if s.is_empty() { "resource".into() } else { s } +} + +// --------------------------------------------------------------------------------------------- +// Save. + +pub fn save_project_bytes(pf: &ProjectFile) -> Result> { + let mut out = Cursor::new(Vec::new()); + write_project(&mut out, pf)?; + Ok(out.into_inner()) +} + +/// Save atomically: `.tmp` first, then rename over `path`. +#[cfg(not(target_arch = "wasm32"))] +pub fn save_project(path: &std::path::Path, pf: &ProjectFile) -> Result<()> { + let mut tmp = path.as_os_str().to_owned(); + tmp.push(".tmp"); + let tmp = std::path::PathBuf::from(tmp); + let res = (|| -> Result<()> { + let mut file = std::io::BufWriter::new(std::fs::File::create(&tmp)?); + write_project(&mut file, pf)?; + file.into_inner().map_err(|e| e.into_error())?.sync_all()?; + std::fs::rename(&tmp, path)?; + Ok(()) + })(); + if res.is_err() { + let _ = std::fs::remove_file(&tmp); + } + res +} + +fn zip_err(e: zip::result::ZipError) -> FormatError { + match e { + zip::result::ZipError::Io(e) => FormatError::Io(e), + e => malformed(KIND, e), + } +} + +fn header(w: u32, h: u32, comps: usize, count: usize) -> Vec { + let mut b = MAGIC.to_vec(); + for v in [BIN_VERSION, w, h, comps as u32, count as u32] { + b.extend_from_slice(&v.to_le_bytes()); + } + b +} + +fn write_tiles(w: &mut impl Write, img: &TileImage) -> std::io::Result<()> { + w.write_all(&header(img.width(), img.height(), img.comps(), img.allocated_count()))?; + let mut buf = Vec::with_capacity(TILE_AREA * img.comps() * 2 + 8); + for (tx, ty) in img.allocated() { + buf.clear(); + buf.extend_from_slice(&tx.to_le_bytes()); + buf.extend_from_slice(&ty.to_le_bytes()); + for v in img.tile(tx, ty).unwrap_or_default() { + buf.extend_from_slice(&v.to_le_bytes()); + } + w.write_all(&buf)?; + } + Ok(()) +} + +/// Keep `[a-z0-9]`, at most 8 characters (the mesh entry's extension). +fn sanitize_ext(ext: &str) -> String { + let e: String = ext.trim_start_matches('.').chars().filter(char::is_ascii_alphanumeric).take(8).collect::().to_ascii_lowercase(); + if e.is_empty() { "bin".into() } else { e } +} + +fn write_project(out: W, pf: &ProjectFile) -> Result<()> { + let mut zip = ZipWriter::new(out); + let deflate = SimpleFileOptions::default().compression_method(CompressionMethod::Deflated).large_file(true); + let stored = SimpleFileOptions::default().compression_method(CompressionMethod::Stored); + let json = serde_json::to_vec_pretty(&pf.project).map_err(|e| FormatError::Invalid(e.to_string()))?; + zip.start_file("project.json", deflate).map_err(zip_err)?; + zip.write_all(&json)?; + if let Some((ext, bytes)) = &pf.mesh { + zip.start_file(format!("mesh.{}", sanitize_ext(ext)), deflate).map_err(zip_err)?; + zip.write_all(bytes)?; + } + for (dir, (name, bytes)) in pf.high_poly.iter().map(|m| ("highpoly", m)).chain(pf.cage.iter().map(|m| ("cage", m))) { + zip.start_file(format!("{dir}/{}", sanitize_resource_name(name)), deflate).map_err(zip_err)?; + zip.write_all(bytes)?; + } + let mut layers: Vec<_> = pf.pixels.layers.iter().collect(); + layers.sort_by_key(|(k, _)| **k); + for ((id, c), img) in layers { + zip.start_file(format!("pixels/layer_{}_{}.bin", id.0, c.id()), deflate).map_err(zip_err)?; + write_tiles(&mut zip, img)?; + } + let mut masks: Vec<_> = pf.pixels.masks.iter().collect(); + masks.sort_by_key(|(k, _)| **k); + for (id, img) in masks { + zip.start_file(format!("pixels/mask_{}.bin", id.0), deflate).map_err(zip_err)?; + write_tiles(&mut zip, img)?; + } + for (ts, maps) in &pf.baked { + let r = maps.resolution; + for (m, data) in &maps.maps { + // A map whose size disagrees with its resolution cannot be loaded; it can be re-baked. + if data.len() != (r as usize) * (r as usize) * m.components() { + continue; + } + zip.start_file(format!("baked/{ts}_{}.bin", m.id()), deflate).map_err(zip_err)?; + zip.write_all(&header(r, r, m.components(), 0))?; + let bytes: Vec = data.iter().flat_map(|v| v.to_le_bytes()).collect(); + zip.write_all(&bytes)?; + } + } + if let Some(png) = &pf.thumbnail { + zip.start_file("thumbnail.png", stored).map_err(zip_err)?; + zip.write_all(png)?; + } + for (name, bytes) in &pf.resources { + zip.start_file(format!("resources/{}", sanitize_resource_name(name)), stored).map_err(zip_err)?; + zip.write_all(bytes)?; + } + zip.finish().map_err(zip_err)?; + Ok(()) +} + +// --------------------------------------------------------------------------------------------- +// Load. + +pub fn load_project_bytes(bytes: &[u8]) -> Result { + crate::guard(KIND, || load(Cursor::new(bytes))) +} + +#[cfg(not(target_arch = "wasm32"))] +pub fn load_project(path: &std::path::Path) -> Result { + let file = std::fs::File::open(path)?; + crate::guard(KIND, || load(std::io::BufReader::new(file))) +} + +/// Counts decompressed bytes against [`MAX_TOTAL`]. +struct Budget(u64); + +impl Budget { + fn take(&mut self, n: u64) -> Result<()> { + self.0 = self.0.saturating_add(n); + if self.0 > MAX_TOTAL { + return Err(FormatError::TooLarge(format!("project file decompresses to more than {MAX_TOTAL} bytes"))); + } + Ok(()) + } +} + +fn read_all(r: &mut impl Read, cap: u64, budget: &mut Budget, what: &str) -> Result> { + let mut out = Vec::new(); + r.take(cap.saturating_add(1)).read_to_end(&mut out).map_err(|e| malformed(KIND, format!("{what}: {e}")))?; + if out.len() as u64 > cap { + return Err(FormatError::TooLarge(format!("{what} is larger than {cap} bytes"))); + } + budget.take(out.len() as u64)?; + Ok(out) +} + +fn read_exact(r: &mut impl Read, buf: &mut [u8], what: &str) -> Result<()> { + r.read_exact(buf).map_err(|e| malformed(KIND, format!("{what}: {e}"))) +} + +fn u32_at(b: &[u8], i: usize) -> u32 { + b.get(i * 4..i * 4 + 4).map(|s| u32::from_le_bytes([s[0], s[1], s[2], s[3]])).unwrap_or(0) +} + +/// Read and check a `.bin` header: returns (width, height, comps, count). +fn read_header(r: &mut impl Read, what: &str) -> Result<(u32, u32, usize, usize)> { + let mut h = [0u8; 24]; + read_exact(r, &mut h, what)?; + if h.get(..4) != Some(MAGIC.as_slice()) { + return Err(malformed(KIND, format!("{what}: bad magic"))); + } + let v = u32_at(&h, 1); + if v > BIN_VERSION { + return Err(FormatError::NewerVersion { found: v, supported: BIN_VERSION }); + } + Ok((u32_at(&h, 2), u32_at(&h, 3), u32_at(&h, 4) as usize, u32_at(&h, 5) as usize)) +} + +/// Error unless the entry has no bytes left (also makes the zip reader verify the CRC). +fn expect_end(r: &mut impl Read, what: &str) -> Result<()> { + let mut b = [0u8; 1]; + match r.read(&mut b) { + Ok(0) => Ok(()), + Ok(_) => Err(malformed(KIND, format!("{what}: trailing data"))), + Err(e) => Err(malformed(KIND, format!("{what}: {e}"))), + } +} + +fn read_tiles(r: &mut impl Read, res: u32, comps: usize, budget: &mut Budget, what: &str) -> Result { + let (w, h, c, count) = read_header(r, what)?; + if w != res || h != res || c != comps { + return Err(malformed(KIND, format!("{what}: {w}×{h}×{c} does not match the texture set ({res}×{res}×{comps})"))); + } + let mut img = TileImage::new(res, res, comps); + if count > (img.tiles_x() as usize) * (img.tiles_y() as usize) { + return Err(malformed(KIND, format!("{what}: {count} tiles is more than the image holds"))); + } + let mut buf = vec![0u8; TILE_AREA * comps * 2]; + let mut pos = [0u8; 8]; + for _ in 0..count { + read_exact(r, &mut pos, what)?; + let (tx, ty) = (u32_at(&pos, 0), u32_at(&pos, 1)); + if tx >= img.tiles_x() || ty >= img.tiles_y() || img.is_allocated(tx, ty) { + return Err(malformed(KIND, format!("{what}: bad or repeated tile ({tx}, {ty})"))); + } + read_exact(r, &mut buf, what)?; + budget.take(buf.len() as u64)?; + let data: Vec = buf.chunks_exact(2).map(|b| u16::from_le_bytes([b[0], b[1]])).collect(); + img.set_tile(tx, ty, Some(Arc::new(data))); + } + expect_end(r, what)?; + Ok(img) +} + +fn read_baked(r: &mut impl Read, comps: usize, budget: &mut Budget, what: &str) -> Result<(u32, Vec)> { + let (w, h, c, _) = read_header(r, what)?; + if w != h || w == 0 || w > MAX_IMAGE_SIZE || c != comps { + return Err(malformed(KIND, format!("{what}: bad size {w}×{h}×{c}"))); + } + let len = (w as usize) * (h as usize) * comps; + budget.take(len as u64 * 4)?; + let mut bytes = vec![0u8; len * 4]; + read_exact(r, &mut bytes, what)?; + expect_end(r, what)?; + Ok((w, bytes.chunks_exact(4).map(|b| f32::from_le_bytes([b[0], b[1], b[2], b[3]])).collect())) +} + +/// Texture set holding a paint layer, a content effect or a mask effect id. +fn texture_set_of(project: &Project, id: LayerId) -> Option { + let owner = if project.layers.contains_key(&id) { id } else { project.effect(id)?.0 }; + project.locate(owner).map(|(ts, _, _)| ts) +} + +fn load(reader: R) -> Result { + let mut zip = ZipArchive::new(reader).map_err(zip_err)?; + if zip.len() > MAX_ENTRIES { + return Err(FormatError::TooLarge(format!("project file has more than {MAX_ENTRIES} entries"))); + } + let mut budget = Budget(0); + let json = read_all(&mut zip.by_name("project.json").map_err(zip_err)?, MAX_JSON, &mut budget, "project.json")?; + #[derive(serde::Deserialize)] + struct Version { + format_version: u32, + } + let v: Version = serde_json::from_slice(&json).map_err(|e| malformed(KIND, format!("project.json: {e}")))?; + if v.format_version > FORMAT_VERSION { + return Err(FormatError::NewerVersion { found: v.format_version, supported: FORMAT_VERSION }); + } + let project: Project = serde_json::from_slice(&json).map_err(|e| malformed(KIND, format!("project.json: {e}")))?; + project.validate()?; + if let Some(ts) = project.texture_sets.iter().find(|t| t.resolution == 0 || t.resolution > MAX_IMAGE_SIZE) { + return Err(malformed(KIND, format!("texture set \"{}\" has resolution {}", ts.name, ts.resolution))); + } + + let mut pf = ProjectFile { + pixels: PixelStore::default(), + baked: BTreeMap::new(), + mesh: None, + high_poly: Vec::new(), + cage: None, + thumbnail: None, + resources: BTreeMap::new(), + project, + }; + for i in 0..zip.len() { + let mut f = zip.by_index(i).map_err(zip_err)?; + let name = f.name().to_string(); + let res_of = |id: LayerId| texture_set_of(&pf.project, id).and_then(|ts| pf.project.texture_sets.get(ts)).map(|t| t.resolution); + if name == "thumbnail.png" { + pf.thumbnail = Some(read_all(&mut f, MAX_THUMBNAIL, &mut budget, &name)?); + } else if let Some(res_name) = name.strip_prefix("resources/") { + if res_name.is_empty() || sanitize_resource_name(res_name) != res_name { + return Err(malformed(KIND, format!("bad resource name {name}"))); + } + let bytes = read_all(&mut f, MAX_RESOURCE, &mut budget, &name)?; + pf.resources.insert(res_name.to_string(), bytes); + } else if let Some((dir, file)) = name.split_once('/').filter(|(d, _)| *d == "highpoly" || *d == "cage") { + if file.is_empty() || sanitize_resource_name(file) != file { + return Err(malformed(KIND, format!("bad mesh name {name}"))); + } + let entry = (file.to_string(), read_all(&mut f, crate::mesh_import::MAX_MESH_FILE_BYTES, &mut budget, &name)?); + match dir { + "cage" => pf.cage = Some(entry), + _ => pf.high_poly.push(entry), + } + } else if let Some(ext) = name.strip_prefix("mesh.").filter(|e| !e.contains('/')) { + let bytes = read_all(&mut f, crate::mesh_import::MAX_MESH_FILE_BYTES, &mut budget, &name)?; + pf.mesh = Some((ext.to_string(), bytes)); + } else if let Some(rest) = name.strip_prefix("pixels/layer_").and_then(|r| r.strip_suffix(".bin")) { + let (id, chan) = rest.split_once('_').ok_or_else(|| malformed(KIND, format!("bad entry name {name}")))?; + let id = LayerId(id.parse().map_err(|_| malformed(KIND, format!("bad entry name {name}")))?); + let c = Channel::ALL.into_iter().find(|c| c.id() == chan).ok_or_else(|| malformed(KIND, format!("unknown channel in {name}")))?; + // Pixels of layers that are no longer in any stack are dropped. + let Some(res) = res_of(id) else { continue }; + let img = read_tiles(&mut f, res, c.components() + 1, &mut budget, &name)?; + pf.pixels.layers.insert((id, c), img); + } else if let Some(rest) = name.strip_prefix("pixels/mask_").and_then(|r| r.strip_suffix(".bin")) { + let id = LayerId(rest.parse().map_err(|_| malformed(KIND, format!("bad entry name {name}")))?); + let Some(res) = res_of(id) else { continue }; + let img = read_tiles(&mut f, res, 2, &mut budget, &name)?; + pf.pixels.masks.insert(id, img); + } else if let Some(rest) = name.strip_prefix("baked/").and_then(|r| r.strip_suffix(".bin")) { + let (ts, map) = rest.split_once('_').ok_or_else(|| malformed(KIND, format!("bad entry name {name}")))?; + let ts: usize = ts.parse().map_err(|_| malformed(KIND, format!("bad entry name {name}")))?; + let m = BakedMap::ALL.into_iter().find(|m| m.id() == map).ok_or_else(|| malformed(KIND, format!("unknown baked map in {name}")))?; + if ts >= pf.project.texture_sets.len() { + continue; + } + let (res, data) = read_baked(&mut f, m.components(), &mut budget, &name)?; + let maps = pf.baked.entry(ts).or_default(); + if maps.maps.is_empty() { + maps.resolution = res; + } else if maps.resolution != res { + return Err(malformed(KIND, format!("{name}: baked maps of one texture set differ in size"))); + } + maps.maps.insert(m, Arc::new(data)); + } + // Other entries (from newer minor revisions) are ignored. + } + Ok(pf) +} + +#[cfg(test)] +mod tests; diff --git a/crates/formats/src/project_file/tests.rs b/crates/formats/src/project_file/tests.rs new file mode 100644 index 00000000..aa76eea8 --- /dev/null +++ b/crates/formats/src/project_file/tests.rs @@ -0,0 +1,168 @@ +use std::sync::Arc; + +use texturecraft_core::{Effect, EffectKind, Fill, Layer, LayerKind, Mask, MaskBackground, TextureSet}; + +use super::*; + +struct Sample { + pf: ProjectFile, + paint: LayerId, +} + +fn sample() -> Sample { + let mut p = Project::new("Demo", "mesh.glb"); + p.texture_sets.push(TextureSet::new("A", 0, 128)); + p.texture_sets.push(TextureSet::new("B", 1, 64)); + let layer = Layer::new(p.alloc_id(), "Paint", LayerKind::Paint, &Channel::DEFAULT_SET); + let paint = p.insert_layer(0, layer, None, false).unwrap(); + let mut masked = Layer::new(p.alloc_id(), "Masked", LayerKind::Fill(Fill::default()), &Channel::DEFAULT_SET); + let effect = p.alloc_id(); + masked.mask = Some(Mask { effects: vec![Effect::new(effect, EffectKind::Paint)], ..Mask::new(MaskBackground::Black) }); + p.insert_layer(1, masked, None, false).unwrap(); + let mut pixels = PixelStore::default(); + let img = pixels.layer_mut(paint, Channel::BaseColor, 128); + img.set(0, 0, &[1, 2, 3, 4]); + img.set(127, 127, &[65535, 0, 9, 65535]); + pixels.layer_mut(paint, Channel::Height, 128).set(70, 3, &[40000, 65535]); + pixels.mask_mut(effect, 64).set(10, 60, &[30000, 65535]); + let ao: Vec = (0..256).map(|i| i as f32 / 255.0).collect(); + let baked = BakedMaps { resolution: 16, maps: [(BakedMap::AmbientOcclusion, Arc::new(ao)), (BakedMap::Normal, Arc::new(vec![0.5; 16 * 16 * 3]))].into() }; + let pf = ProjectFile { + project: p, + pixels, + baked: [(0, baked)].into(), + mesh: Some(("glb".into(), vec![1, 2, 3, 4, 5])), + high_poly: vec![("b_high.obj".into(), vec![7; 9]), ("a_high.ply".into(), vec![6])], + cage: Some(("cage.obj".into(), vec![5, 5])), + thumbnail: Some(vec![137, 80, 78, 71]), + resources: [("bricks.png".to_string(), vec![9, 8, 7])].into(), + }; + Sample { pf, paint } +} + +fn assert_same(a: &ProjectFile, b: &ProjectFile) { + assert_eq!(a.project, b.project); + assert_eq!(a.pixels.layers.len(), b.pixels.layers.len()); + for (k, img) in &a.pixels.layers { + assert_eq!(Some(img), b.pixels.layers.get(k), "{k:?}"); + } + assert_eq!(a.pixels.masks.len(), b.pixels.masks.len()); + for (k, img) in &a.pixels.masks { + assert_eq!(Some(img), b.pixels.masks.get(k), "{k:?}"); + } + assert_eq!(a.baked, b.baked); + assert_eq!(a.mesh, b.mesh); + assert_eq!((&a.high_poly, &a.cage), (&b.high_poly, &b.cage), "bake meshes keep their order"); + assert_eq!(a.thumbnail, b.thumbnail); + assert_eq!(a.resources, b.resources); +} + +fn is_guard_error(e: &FormatError) -> bool { + e.to_string().contains("parser failed") +} + +#[test] +fn round_trip_is_identical_and_deterministic() { + let s = sample(); + let bytes = save_project_bytes(&s.pf).unwrap(); + let back = load_project_bytes(&bytes).unwrap(); + assert_same(&s.pf, &back); + assert_eq!(back.pixels.layer(s.paint, Channel::BaseColor).unwrap().get(127, 127), [65535, 0, 9, 65535]); + assert_eq!(save_project_bytes(&back).unwrap(), bytes); + // Built-in mesh projects carry no mesh entry. + let mut builtin = s.pf.clone(); + builtin.mesh = None; + builtin.thumbnail = None; + builtin.project.mesh = "builtin:sphere".into(); + assert_same(&builtin, &load_project_bytes(&save_project_bytes(&builtin).unwrap()).unwrap()); +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn save_and_load_through_files() { + let s = sample(); + let dir = std::env::temp_dir().join(format!("tc-formats-project-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let path = dir.join("demo.tcraft"); + save_project(&path, &s.pf).unwrap(); + save_project(&path, &s.pf).unwrap(); // overwrite in place + assert!(!dir.join("demo.tcraft.tmp").exists()); + assert_same(&s.pf, &load_project(&path).unwrap()); + std::fs::remove_dir_all(&dir).unwrap(); +} + +#[test] +fn newer_format_is_refused() { + let mut s = sample(); + s.pf.project.format_version = FORMAT_VERSION + 1; + let err = load_project_bytes(&save_project_bytes(&s.pf).unwrap()).unwrap_err(); + assert!(matches!(err, FormatError::NewerVersion { found, .. } if found == FORMAT_VERSION + 1), "{err}"); + assert!(err.to_string().contains("newer")); +} + +#[test] +fn malformed_project_files_are_errors() { + let bytes = save_project_bytes(&sample().pf).unwrap(); + for len in 0..bytes.len() { + let e = load_project_bytes(&bytes[..len]).unwrap_err(); + assert!(!is_guard_error(&e), "prefix {len}: {e}"); + } + for i in (0..bytes.len()).step_by(3) { + let mut b = bytes.clone(); + b[i] ^= 0x5A; + if let Err(e) = load_project_bytes(&b) { + assert!(!is_guard_error(&e), "flip at {i}: {e}"); + } + } + assert!(load_project_bytes(b"PK\x03\x04 definitely not a zip").is_err()); +} + +/// A project zip with `project.json` from `sample()` plus raw extra entries. +fn zip_with(entries: &[(&str, Vec)]) -> Vec { + let s = sample(); + let mut zip = ZipWriter::new(Cursor::new(Vec::new())); + zip.start_file("project.json", SimpleFileOptions::default()).unwrap(); + zip.write_all(&serde_json::to_vec(&s.pf.project).unwrap()).unwrap(); + for (name, data) in entries { + zip.start_file(*name, SimpleFileOptions::default()).unwrap(); + zip.write_all(data).unwrap(); + } + zip.finish().unwrap().into_inner() +} + +fn tile_bin(res: u32, comps: usize, tiles: &[(u32, u32)]) -> Vec { + let mut b = header(res, res, comps, tiles.len()); + for (tx, ty) in tiles { + b.extend(tx.to_le_bytes()); + b.extend(ty.to_le_bytes()); + b.extend(vec![7u8; TILE_AREA * comps * 2]); + } + b +} + +#[test] +fn tiles_are_validated_against_the_texture_set() { + let paint = sample().paint; + let name = format!("pixels/layer_{}_baseColor.bin", paint.0); + let ok = load_project_bytes(&zip_with(&[(&name, tile_bin(128, 4, &[(1, 1)]))])).unwrap(); + assert_eq!(ok.pixels.layer(paint, Channel::BaseColor).unwrap().get(64, 64), [0x0707; 4]); + for (what, bin) in [ + ("tile out of range", tile_bin(128, 4, &[(2, 0)])), + ("repeated tile", tile_bin(128, 4, &[(0, 0), (0, 0)])), + ("wrong resolution", tile_bin(64, 4, &[(0, 0)])), + ("wrong components", tile_bin(128, 3, &[(0, 0)])), + ("truncated", tile_bin(128, 4, &[(0, 0)])[..100].to_vec()), + ("trailing data", [tile_bin(128, 4, &[]), vec![1]].concat()), + ] { + assert!(load_project_bytes(&zip_with(&[(&name, bin)])).is_err(), "{what}"); + } + let mut newer = tile_bin(128, 4, &[]); + newer[4] = 9; + assert!(matches!(load_project_bytes(&zip_with(&[(&name, newer)])), Err(FormatError::NewerVersion { .. }))); + // Pixels of a layer that is in no stack are dropped, not an error. + let orphan = load_project_bytes(&zip_with(&[("pixels/layer_999_baseColor.bin", tile_bin(128, 4, &[(0, 0)]))])).unwrap(); + assert!(orphan.pixels.layers.is_empty()); + assert!(load_project_bytes(&zip_with(&[("pixels/layer_x_baseColor.bin", vec![])])).is_err()); + assert!(load_project_bytes(&zip_with(&[("baked/0_ambient_occlusion.bin", header(16, 16, 1, 0))])).is_err()); + assert!(load_project_bytes(&zip_with(&[("baked/0_ambient_occlusion.bin", header(100_000, 100_000, 1, 0))])).is_err()); +} diff --git a/crates/geom/Cargo.toml b/crates/geom/Cargo.toml new file mode 100644 index 00000000..d5524df1 --- /dev/null +++ b/crates/geom/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "texturecraft-geom" +description = "TextureCraft geometry: meshes, primitives, tangents, BVH ray casts, UV G-buffer, camera" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +glam = { workspace = true } +rayon = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +mikktspace = { workspace = true } diff --git a/crates/geom/src/bvh.rs b/crates/geom/src/bvh.rs new file mode 100644 index 00000000..33e8188a --- /dev/null +++ b/crates/geom/src/bvh.rs @@ -0,0 +1,379 @@ +//! Bounding volume hierarchy over a mesh's triangles: closest-hit and any-hit ray casts, and +//! box queries (used by picking, baking and brush stamps). + +use glam::{Vec3, Vec3A}; + +use crate::Mesh; + +#[derive(Clone, Copy, Debug)] +struct Node { + lo: Vec3A, + hi: Vec3A, + /// Leaf: first triangle in `order`; inner: index of the left child (right = left + 1). + first: u32, + /// Triangles in a leaf; 0 for inner nodes. + count: u32, +} + +/// A ray hit: distance, triangle and barycentrics (weights of vertices 1 and 2). +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Hit { + pub t: f32, + pub tri: u32, + pub u: f32, + pub v: f32, +} + +#[derive(Clone, Debug)] +pub struct Bvh { + nodes: Vec, + /// Triangle vertices in BVH order. + tris: Vec<[Vec3; 3]>, + /// Original triangle index of each entry in `tris`. + order: Vec, +} + +const LEAF: usize = 4; + +/// Traversal stack of (node, entry distance): inline for typical depths (no allocation per +/// ray), spilling to the heap for degenerate trees. +struct Stack { + inline: [(u32, f32); 64], + len: usize, + spill: Vec<(u32, f32)>, +} + +impl Default for Stack { + fn default() -> Self { + Stack { inline: [(0, 0.0); 64], len: 0, spill: Vec::new() } + } +} + +impl Stack { + fn push(&mut self, v: (u32, f32)) { + match self.inline.get_mut(self.len) { + Some(slot) if self.spill.is_empty() => { + *slot = v; + self.len += 1; + } + _ => self.spill.push(v), + } + } + + fn pop(&mut self) -> Option<(u32, f32)> { + self.spill.pop().or_else(|| { + self.len = self.len.checked_sub(1)?; + self.inline.get(self.len).copied() + }) + } +} +const BINS: usize = 12; + +fn grow(lo: &mut Vec3, hi: &mut Vec3, p: Vec3) { + *lo = lo.min(p); + *hi = hi.max(p); +} + +fn area(lo: Vec3, hi: Vec3) -> f32 { + let d = (hi - lo).max(Vec3::ZERO); + d.x * d.y + d.y * d.z + d.z * d.x +} + +impl Bvh { + pub fn new(mesh: &Mesh) -> Bvh { + let n = mesh.triangle_count(); + let mut tris = Vec::with_capacity(n); + for t in 0..n { + let Some([a, b, c]) = mesh.tri(t) else { continue }; + let p = |i: usize| mesh.positions.get(i).copied().unwrap_or(Vec3::ZERO); + tris.push([p(a), p(b), p(c)]); + } + let mut order: Vec = (0..tris.len() as u32).collect(); + let cent: Vec = tris.iter().map(|t| (t[0] + t[1] + t[2]) / 3.0).collect(); + let mut nodes = vec![Node { lo: Vec3A::ZERO, hi: Vec3A::ZERO, first: 0, count: tris.len() as u32 }]; + let mut stack = vec![0usize]; + while let Some(ni) = stack.pop() { + let Node { first, count, .. } = nodes[ni]; + let (f, c) = (first as usize, count as usize); + let (mut lo, mut hi) = (Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)); + let (mut clo, mut chi) = (Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)); + for &t in &order[f..f + c] { + for p in tris[t as usize] { + grow(&mut lo, &mut hi, p); + } + grow(&mut clo, &mut chi, cent[t as usize]); + } + nodes[ni].lo = lo.into(); + nodes[ni].hi = hi.into(); + if c <= LEAF { + continue; + } + // Binned SAH along the widest centroid axis. + let ext = chi - clo; + let axis = if ext.x >= ext.y && ext.x >= ext.z { + 0 + } else if ext.y >= ext.z { + 1 + } else { + 2 + }; + if ext[axis] <= 1e-12 { + continue; + } + let mut bins = [(0u32, Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)); BINS]; + let bin_of = |p: Vec3| (((p[axis] - clo[axis]) / ext[axis] * BINS as f32) as usize).min(BINS - 1); + for &t in &order[f..f + c] { + let b = &mut bins[bin_of(cent[t as usize])]; + b.0 += 1; + for p in tris[t as usize] { + grow(&mut b.1, &mut b.2, p); + } + } + let (mut best, mut best_cost) = (0usize, f32::MAX); + for split in 1..BINS { + let side = |r: std::ops::Range| { + r.fold((0u32, Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)), |(n, l, h), i| (n + bins[i].0, l.min(bins[i].1), h.max(bins[i].2))) + }; + let (nl, ll, lh) = side(0..split); + let (nr, rl, rh) = side(split..BINS); + if nl == 0 || nr == 0 { + continue; + } + let cost = nl as f32 * area(ll, lh) + nr as f32 * area(rl, rh); + if cost < best_cost { + best_cost = cost; + best = split; + } + } + if best == 0 || best_cost >= c as f32 * area(lo, hi) { + continue; + } + let slice = &mut order[f..f + c]; + let mut i = 0; + for j in 0..slice.len() { + if bin_of(cent[slice[j] as usize]) < best { + slice.swap(i, j); + i += 1; + } + } + if i == 0 || i == c { + continue; + } + let left = nodes.len(); + nodes.push(Node { lo: Vec3A::ZERO, hi: Vec3A::ZERO, first, count: i as u32 }); + nodes.push(Node { lo: Vec3A::ZERO, hi: Vec3A::ZERO, first: first + i as u32, count: (c - i) as u32 }); + nodes[ni].first = left as u32; + nodes[ni].count = 0; + stack.push(left); + stack.push(left + 1); + } + let tris = order.iter().map(|t| tris[*t as usize]).collect(); + Bvh { nodes, tris, order } + } + + pub fn is_empty(&self) -> bool { + self.tris.is_empty() + } + + fn slab(lo: Vec3A, hi: Vec3A, o: Vec3A, inv: Vec3A, tmax: f32) -> Option { + let t0 = (lo - o) * inv; + let t1 = (hi - o) * inv; + // A ray lying in a slab plane gives 0·∞ = NaN: it is inside that slab, so the axis does + // not bound the hit. + let open = t0.is_nan_mask() | t1.is_nan_mask(); + let tn = Vec3A::select(open, Vec3A::NEG_INFINITY, t0.min(t1)).max_element().max(0.0); + let tf = Vec3A::select(open, Vec3A::INFINITY, t0.max(t1)).min_element().min(tmax); + (tn <= tf).then_some(tn) + } + + /// Möller–Trumbore, double sided. + fn hit_tri(t: &[Vec3; 3], o: Vec3, d: Vec3) -> Option<(f32, f32, f32)> { + let e1 = t[1] - t[0]; + let e2 = t[2] - t[0]; + let p = d.cross(e2); + let det = e1.dot(p); + if det.abs() < 1e-12 { + return None; + } + let inv = 1.0 / det; + let s = o - t[0]; + // A little slack on the edges: rays through a shared edge must not slip between its + // two triangles to a surface behind. + const EDGE: f32 = 1e-5; + let u = s.dot(p) * inv; + if !(-EDGE..=1.0 + EDGE).contains(&u) { + return None; + } + let q = s.cross(e1); + let v = d.dot(q) * inv; + if v < -EDGE || u + v > 1.0 + EDGE { + return None; + } + let tt = e2.dot(q) * inv; + (tt > 0.0).then_some((tt, u, v)) + } + + fn traverse(&self, o: Vec3, d: Vec3, mut tmax: f32, any: bool, filter: &dyn Fn(u32) -> bool) -> Option { + let root = self.nodes.first().filter(|_| !self.tris.is_empty())?; + let (oa, inv) = (Vec3A::from(o), Vec3A::ONE / Vec3A::from(d)); + let mut best = None; + let mut stack = Stack::default(); + stack.push((0, Self::slab(root.lo, root.hi, oa, inv, tmax)?)); + // Entries carry their entry distance: nodes behind a closer hit are skipped unopened. + while let Some((ni, tn)) = stack.pop() { + let Some(n) = self.nodes.get(ni as usize).filter(|_| tn <= tmax) else { continue }; + if n.count > 0 { + let (f, c) = (n.first as usize, n.count as usize); + for i in f..(f + c).min(self.tris.len()) { + let (Some(tri), Some(&orig)) = (self.tris.get(i), self.order.get(i)) else { continue }; + if let Some((t, u, v)) = Self::hit_tri(tri, o, d) + && t < tmax + && filter(orig) + { + tmax = t; + best = Some(Hit { t, tri: orig, u, v }); + if any { + return best; + } + } + } + } else { + // Visit the nearer child first. + let (l, r) = (n.first, n.first + 1); + let dl = self.nodes.get(l as usize).and_then(|c| Self::slab(c.lo, c.hi, oa, inv, tmax)); + let dr = self.nodes.get(r as usize).and_then(|c| Self::slab(c.lo, c.hi, oa, inv, tmax)); + match (dl, dr) { + (Some(a), Some(b)) if a <= b => { + stack.push((r, b)); + stack.push((l, a)); + } + (Some(a), Some(b)) => { + stack.push((l, a)); + stack.push((r, b)); + } + (Some(a), None) => stack.push((l, a)), + (None, Some(b)) => stack.push((r, b)), + (None, None) => {} + } + } + } + best + } + + /// Closest hit along `o + t·d` for `t` in (0, tmax). + pub fn closest(&self, o: Vec3, d: Vec3, tmax: f32) -> Option { + self.traverse(o, d, tmax, false, &|_| true) + } + + /// Closest hit on triangles accepted by `filter` (original triangle index). + pub fn closest_filtered(&self, o: Vec3, d: Vec3, tmax: f32, filter: &dyn Fn(u32) -> bool) -> Option { + self.traverse(o, d, tmax, false, filter) + } + + /// Whether anything is hit before `tmax` (occlusion rays). + pub fn occluded(&self, o: Vec3, d: Vec3, tmax: f32) -> bool { + self.traverse(o, d, tmax, true, &|_| true).is_some() + } + + /// Call `f` with every triangle (original index) whose bounds overlap the box. + pub fn query_box(&self, lo: Vec3, hi: Vec3, mut f: impl FnMut(u32)) { + let mut stack = vec![0u32]; + while let Some(i) = stack.pop() { + let Some(n) = self.nodes.get(i as usize) else { continue }; + if self.tris.is_empty() || n.hi.cmplt(lo.into()).any() || n.lo.cmpgt(hi.into()).any() { + continue; + } + if n.count > 0 { + for k in n.first as usize..(n.first + n.count) as usize { + let (Some(t), Some(o)) = (self.tris.get(k), self.order.get(k)) else { continue }; + let tlo = t[0].min(t[1]).min(t[2]); + let thi = t[0].max(t[1]).max(t[2]); + if !(thi.cmplt(lo).any() || tlo.cmpgt(hi).any()) { + f(*o); + } + } + } else { + stack.push(n.first); + stack.push(n.first + 1); + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::primitives; + + #[test] + fn traversal_stack_spills_in_lifo_order() { + let mut st = Stack::default(); + for v in 0..200 { + st.push((v, v as f32)); + } + assert!((0..200).rev().all(|v| st.pop() == Some((v, v as f32)))); + assert_eq!(st.pop(), None); + } + + #[test] + fn ray_hits_sphere_at_expected_distance() { + let m = primitives::sphere(1.0, 64, 32); + let bvh = Bvh::new(&m); + let h = bvh.closest(Vec3::new(0.0, 0.0, 5.0), Vec3::NEG_Z, 100.0).unwrap(); + assert!((h.t - 4.0).abs() < 0.01, "{}", h.t); + assert!(bvh.closest(Vec3::new(0.0, 3.0, 5.0), Vec3::NEG_Z, 100.0).is_none()); + // Rays lying exactly in a node's bounding plane (y = 0 is the equator) hit the front. + // Axis-aligned rays lying in a node's bounding plane (y = 0) still find the front. + for x in [-0.5f32, -0.4, 0.3] { + let h = bvh.closest(Vec3::new(x, 0.0, 5.0), Vec3::NEG_Z, 100.0).unwrap(); + assert!(h.t < 5.0, "x {x}: hit the back at t {}", h.t); + } + // Rays through shared edges (the equator) hit the front, never slip through to the back. + let m = primitives::sphere(1.0, 48, 24); + let bvh = Bvh::new(&m); + for i in 0..200 { + let x = i as f32 / 100.0 - 1.0; + let o = Vec3::new(0.0, 0.0, 5.0); + let d = (Vec3::new(x * 0.9, 0.0, 0.0) - o).normalize(); + let h = bvh.closest(o, d, 100.0).unwrap(); + assert!(h.t < 5.0, "x {x}: hit the back at t {}", h.t); + } + assert!(bvh.occluded(Vec3::new(0.0, 0.0, 5.0), Vec3::NEG_Z, 10.0)); + assert!(!bvh.occluded(Vec3::new(0.0, 0.0, 5.0), Vec3::NEG_Z, 3.0)); + } + + #[test] + fn matches_brute_force() { + let m = primitives::material_ball(); + let bvh = Bvh::new(&m); + for i in 0..200 { + let a = i as f32 * 0.731; + let o = Vec3::new(a.cos() * 6.0, (i as f32 * 0.37).sin() * 3.0 + 1.0, a.sin() * 6.0); + let d = (Vec3::new(0.0, 1.0, 0.0) + Vec3::new((a * 3.1).sin(), (a * 1.7).cos(), (a * 2.3).sin()) * 0.6 - o).normalize(); + let fast = bvh.closest(o, d, 1e9).map(|h| h.t); + let mut slow: Option = None; + for t in 0..m.triangle_count() { + let [x, y, z] = m.tri(t).unwrap(); + if let Some((tt, _, _)) = Bvh::hit_tri(&[m.positions[x], m.positions[y], m.positions[z]], o, d) { + slow = Some(slow.map_or(tt, |s: f32| s.min(tt))); + } + } + match (fast, slow) { + (Some(a), Some(b)) => assert!((a - b).abs() < 1e-4, "{a} {b}"), + (None, None) => {} + other => panic!("mismatch {other:?}"), + } + } + } + + #[test] + fn box_query_finds_overlapping_triangles() { + let m = primitives::plane(2.0, 4); + let bvh = Bvh::new(&m); + let mut found = Vec::new(); + bvh.query_box(Vec3::new(-0.1, -0.1, -0.1), Vec3::new(0.1, 0.1, 0.1), |t| found.push(t)); + assert!(!found.is_empty() && found.len() <= 8, "{found:?}"); + let empty = Bvh::new(&Mesh::default()); + assert!(empty.closest(Vec3::ZERO, Vec3::X, 1.0).is_none()); + } +} diff --git a/crates/geom/src/camera.rs b/crates/geom/src/camera.rs new file mode 100644 index 00000000..93f27e27 --- /dev/null +++ b/crates/geom/src/camera.rs @@ -0,0 +1,140 @@ +//! Orbit camera (Painter-style navigation) and picking rays. + +use glam::{Mat4, Vec2, Vec3, Vec4}; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrbitCamera { + pub target: Vec3, + /// Radians around Y. + pub yaw: f32, + /// Radians above the horizon, clamped to ±89°. + pub pitch: f32, + pub distance: f32, + /// Vertical field of view, degrees. + pub fov: f32, + /// Scene radius (sets the clip planes). + pub scene_radius: f32, + /// Orthographic projection instead of perspective. + #[serde(default)] + pub ortho: bool, +} + +impl Default for OrbitCamera { + fn default() -> Self { + OrbitCamera { target: Vec3::ZERO, yaw: 0.0, pitch: 0.12, distance: 5.0, fov: 40.0, scene_radius: 1.0, ortho: false } + } +} + +/// A ray in world space. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Ray { + pub origin: Vec3, + pub dir: Vec3, +} + +impl OrbitCamera { + pub fn eye(&self) -> Vec3 { + let (sy, cy) = self.yaw.sin_cos(); + let (sp, cp) = self.pitch.sin_cos(); + self.target + Vec3::new(cp * sy, sp, cp * cy) * self.distance + } + + pub fn forward(&self) -> Vec3 { + (self.target - self.eye()).try_normalize().unwrap_or(Vec3::NEG_Z) + } + + pub fn view(&self) -> Mat4 { + Mat4::look_at_rh(self.eye(), self.target, Vec3::Y) + } + + pub fn proj(&self, aspect: f32) -> Mat4 { + let r = self.scene_radius.max(1e-3); + let near = (self.distance - r * 4.0).max(r * 0.01).max(1e-4); + let far = self.distance + r * 50.0; + let aspect = if aspect.is_finite() && aspect > 1e-4 { aspect } else { 1.0 }; + if self.ortho { + let h = self.distance * (self.fov.to_radians() * 0.5).tan(); + Mat4::orthographic_rh(-h * aspect, h * aspect, -h, h, near.min(0.01), far) + } else { + Mat4::perspective_rh(self.fov.clamp(5.0, 150.0).to_radians(), aspect, near, far) + } + } + + pub fn view_proj(&self, aspect: f32) -> Mat4 { + self.proj(aspect) * self.view() + } + + /// Frame a bounding box, keeping the current angles. + pub fn frame(&mut self, lo: Vec3, hi: Vec3) { + self.target = (lo + hi) * 0.5; + let r = ((hi - lo).length() * 0.5).max(1e-3); + self.scene_radius = r; + self.distance = r / (self.fov.clamp(5.0, 150.0).to_radians() * 0.5).sin() * 1.1; + } + + pub fn orbit(&mut self, dx: f32, dy: f32) { + self.yaw -= dx; + self.pitch = (self.pitch + dy).clamp(-89f32.to_radians(), 89f32.to_radians()); + } + + /// Pan by a screen fraction (dx, dy in viewport heights). + pub fn pan(&mut self, dx: f32, dy: f32) { + let f = self.forward(); + let right = f.cross(Vec3::Y).try_normalize().unwrap_or(Vec3::X); + let up = right.cross(f); + let scale = self.distance * (self.fov.to_radians() * 0.5).tan() * 2.0; + self.target += (-right * dx + up * dy) * scale; + } + + /// Dolly by a factor exponent (positive zooms in). + pub fn zoom(&mut self, amount: f32) { + let r = self.scene_radius.max(1e-3); + self.distance = (self.distance * (-amount).exp()).clamp(r * 0.05, r * 200.0); + } + + /// Ray through a viewport point given in normalized device coordinates (-1..1, y up). + pub fn ray(&self, ndc: Vec2, aspect: f32) -> Ray { + let inv = self.view_proj(aspect).inverse(); + let a = inv * Vec4::new(ndc.x, ndc.y, 0.0, 1.0); + let b = inv * Vec4::new(ndc.x, ndc.y, 1.0, 1.0); + let (a, b) = (a.truncate() / a.w, b.truncate() / b.w); + Ray { origin: a, dir: (b - a).try_normalize().unwrap_or(self.forward()) } + } + + /// Project a world point to NDC (x, y in -1..1, y up; z depth). None behind the camera. + pub fn project(&self, p: Vec3, aspect: f32) -> Option { + let c = self.view_proj(aspect) * p.extend(1.0); + (c.w > 1e-6).then(|| c.truncate() / c.w) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn center_ray_points_at_target_and_projection_inverts() { + let mut c = OrbitCamera::default(); + c.frame(Vec3::splat(-1.0), Vec3::splat(1.0)); + let r = c.ray(Vec2::ZERO, 1.5); + assert!((r.dir - c.forward()).length() < 1e-4); + let p = Vec3::new(0.3, -0.2, 0.1); + let ndc = c.project(p, 1.5).unwrap(); + let r = c.ray(ndc.truncate(), 1.5); + let to_p = (p - r.origin).normalize(); + assert!(to_p.dot(r.dir) > 0.9999); + } + + #[test] + fn pitch_is_clamped_and_zoom_bounded() { + let mut c = OrbitCamera::default(); + c.orbit(0.0, 10.0); + assert!(c.pitch <= 89f32.to_radians() + 1e-6); + for _ in 0..1000 { + c.zoom(1.0); + } + assert!(c.distance > 0.0 && c.distance.is_finite()); + let _ = c.proj(f32::NAN); + } +} diff --git a/crates/geom/src/gbuffer.rs b/crates/geom/src/gbuffer.rs new file mode 100644 index 00000000..e26b923f --- /dev/null +++ b/crates/geom/src/gbuffer.rs @@ -0,0 +1,195 @@ +//! The UV-space G-buffer: which triangle (and where on it) each texel of a texture set maps +//! to. Painting, compositing, baking and padding all work from this one buffer, so they agree +//! on which texel is which surface point. + +use glam::{Vec2, Vec3, Vec4}; +use rayon::prelude::*; + +use crate::Mesh; + +/// Texel not covered by any triangle. +pub const NO_TRI: u32 = u32::MAX; + +const BAND: u32 = 32; + +#[derive(Clone, Debug, PartialEq)] +pub struct UvGBuffer { + pub width: u32, + pub height: u32, + /// Triangle under each texel center, [`NO_TRI`] when uncovered. + pub tri: Vec, + /// Barycentric weights of the triangle's second and third vertices. + pub bary: Vec<[f32; 2]>, + /// Texels written by more than one triangle (overlapping UVs). + pub overlaps: u32, +} + +/// Interpolated surface attributes at a texel. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Surface { + pub pos: Vec3, + /// Interpolated shading normal (normalized). + pub nrm: Vec3, + /// Flat triangle normal (for ray offsets). + pub geo_nrm: Vec3, + pub tangent: Vec4, + pub uv: Vec2, + pub tri: u32, +} + +fn edge(a: Vec2, b: Vec2, p: Vec2) -> f32 { + (b.x - a.x) * (p.y - a.y) - (b.y - a.y) * (p.x - a.x) +} + +impl UvGBuffer { + /// Rasterize the triangles of material `material` at `width × height`. + pub fn new(mesh: &Mesh, material: usize, width: u32, height: u32) -> UvGBuffer { + let (w, h) = (width.max(1), height.max(1)); + let size = Vec2::new(w as f32, h as f32); + let bands = h.div_ceil(BAND) as usize; + let mut bins: Vec> = vec![Vec::new(); bands]; + for t in mesh.triangles_of(material) { + let Some([a, b, c]) = mesh.tri(t) else { continue }; + let (Some(ua), Some(ub), Some(uc)) = (mesh.uvs.get(a), mesh.uvs.get(b), mesh.uvs.get(c)) else { continue }; + let y0 = (ua.y.min(ub.y).min(uc.y) * size.y).floor().max(0.0) as i64; + let y1 = (ua.y.max(ub.y).max(uc.y) * size.y).ceil().min(size.y) as i64; + if y1 <= y0 || !ua.is_finite() || !ub.is_finite() || !uc.is_finite() { + continue; + } + let (b0, b1) = ((y0 / BAND as i64) as usize, ((y1 - 1).max(0) / BAND as i64) as usize); + for bin in bins.iter_mut().take(b1 + 1).skip(b0) { + bin.push(t as u32); + } + } + let n = w as usize * h as usize; + let mut tri = vec![NO_TRI; n]; + let mut bary = vec![[0.0f32; 2]; n]; + let band_len = (BAND * w) as usize; + let overlaps: u32 = tri + .par_chunks_mut(band_len) + .zip(bary.par_chunks_mut(band_len)) + .enumerate() + .map(|(bi, (tri, bary))| { + let mut overlaps = 0u32; + let row0 = bi as u32 * BAND; + let rows = (tri.len() as u32) / w; + for &t in bins.get(bi).map(Vec::as_slice).unwrap_or(&[]) { + let Some([a, b, c]) = mesh.tri(t as usize) else { continue }; + let (Some(&ua), Some(&ub), Some(&uc)) = (mesh.uvs.get(a), mesh.uvs.get(b), mesh.uvs.get(c)) else { continue }; + let (pa, pb, pc) = (ua * size, ub * size, uc * size); + let area = edge(pa, pb, pc); + if area.abs() < 1e-12 { + continue; + } + let eps = -1e-6 * area.abs(); + let x0 = pa.x.min(pb.x).min(pc.x).floor().max(0.0) as u32; + let x1 = (pa.x.max(pb.x).max(pc.x).ceil().min(w as f32) as u32).min(w); + let y0 = (pa.y.min(pb.y).min(pc.y).floor().max(row0 as f32) as u32).max(row0); + let y1 = (pa.y.max(pb.y).max(pc.y).ceil() as u32).min(row0 + rows); + for y in y0..y1 { + for x in x0..x1 { + let p = Vec2::new(x as f32 + 0.5, y as f32 + 0.5); + let (w0, w1, w2) = (edge(pb, pc, p) * area.signum(), edge(pc, pa, p) * area.signum(), edge(pa, pb, p) * area.signum()); + if w0 < eps || w1 < eps || w2 < eps { + continue; + } + let i = ((y - row0) * w + x) as usize; + if let (Some(slot), Some(bw)) = (tri.get_mut(i), bary.get_mut(i)) { + if *slot != NO_TRI { + overlaps += 1; + } + *slot = t; + let inv = 1.0 / area.abs(); + *bw = [w1 * inv, w2 * inv]; + } + } + } + } + overlaps + }) + .sum(); + UvGBuffer { width: w, height: h, tri, bary, overlaps } + } + + pub fn covered(&self, i: usize) -> bool { + self.tri.get(i).is_some_and(|t| *t != NO_TRI) + } + + pub fn coverage_mask(&self) -> Vec { + self.tri.iter().map(|t| *t != NO_TRI).collect() + } + + pub fn covered_count(&self) -> usize { + self.tri.iter().filter(|t| **t != NO_TRI).count() + } + + /// Surface attributes at texel index `i` (None when uncovered). + pub fn surface(&self, mesh: &Mesh, i: usize) -> Option { + let t = *self.tri.get(i)?; + if t == NO_TRI { + return None; + } + let [b1, b2] = *self.bary.get(i)?; + surface_at(mesh, t, b1, b2) + } +} + +/// Interpolate triangle `t` at barycentrics (weights of vertices 1 and 2). +pub fn surface_at(mesh: &Mesh, t: u32, b1: f32, b2: f32) -> Option { + let [a, b, c] = mesh.tri(t as usize)?; + let b0 = 1.0 - b1 - b2; + let p = |v: &[Vec3]| -> Option { Some(*v.get(a)? * b0 + *v.get(b)? * b1 + *v.get(c)? * b2) }; + let pos = p(&mesh.positions)?; + let nrm = p(&mesh.normals)?.try_normalize().unwrap_or(Vec3::Y); + let (pa, pb, pc) = (*mesh.positions.get(a)?, *mesh.positions.get(b)?, *mesh.positions.get(c)?); + let geo_nrm = (pb - pa).cross(pc - pa).try_normalize().unwrap_or(nrm); + let tan = *mesh.tangents.get(a)? * b0 + *mesh.tangents.get(b)? * b1 + *mesh.tangents.get(c)? * b2; + let uv = *mesh.uvs.get(a)? * b0 + *mesh.uvs.get(b)? * b1 + *mesh.uvs.get(c)? * b2; + let tdir = tan.truncate().try_normalize().unwrap_or_else(|| nrm.any_orthonormal_vector()); + let w = mesh.tangents.get(a).map(|t| if t.w < 0.0 { -1.0 } else { 1.0 }).unwrap_or(1.0); + Some(Surface { pos, nrm, geo_nrm, tangent: tdir.extend(w), uv, tri: t }) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::primitives; + + #[test] + fn half_triangle_covers_texels_with_centers_inside() { + // One triangle covering the lower-left half of UV space (v down: y = v·H). + let m = + Mesh::from_parts(vec![Vec3::ZERO, Vec3::X, Vec3::Y], None, vec![Vec2::new(0.0, 0.0), Vec2::new(0.0, 1.0), Vec2::new(1.0, 1.0)], vec![0, 1, 2], "m") + .unwrap(); + let g = UvGBuffer::new(&m, 0, 8, 8); + for y in 0..8u32 { + for x in 0..8u32 { + let inside = (x as f32 + 0.5) <= (y as f32 + 0.5); + assert_eq!(g.covered((y * 8 + x) as usize), inside, "({x},{y})"); + } + } + assert_eq!(g.overlaps, 0); + } + + #[test] + fn overlapping_and_degenerate_triangles() { + let uv = vec![Vec2::new(0.0, 0.0), Vec2::new(1.0, 0.0), Vec2::new(0.0, 1.0), Vec2::new(0.5, 0.5)]; + let m = Mesh::from_parts(vec![Vec3::ZERO, Vec3::X, Vec3::Y, Vec3::Z], None, uv, vec![0, 1, 2, 0, 1, 2, 0, 3, 3], "m").unwrap(); + let g = UvGBuffer::new(&m, 0, 16, 16); + assert!(g.overlaps > 0); + assert!(g.covered_count() > 0); + } + + #[test] + fn sphere_surface_lies_on_the_sphere() { + let m = primitives::sphere(2.0, 64, 32); + let g = UvGBuffer::new(&m, 0, 128, 128); + assert!(g.covered_count() > 128 * 128 * 9 / 10, "{}", g.covered_count()); + for i in (0..g.tri.len()).step_by(97) { + if let Some(s) = g.surface(&m, i) { + assert!((s.pos.length() - 2.0).abs() < 0.02); + assert!(s.nrm.dot(s.pos.normalize()) > 0.99); + } + } + } +} diff --git a/crates/geom/src/lib.rs b/crates/geom/src/lib.rs new file mode 100644 index 00000000..08ed2624 --- /dev/null +++ b/crates/geom/src/lib.rs @@ -0,0 +1,28 @@ +//! # texturecraft-geom +//! +//! Geometry for TextureCraft: the [`Mesh`] type with normals and MikkTSpace tangents, built-in +//! [`primitives`] (material ball, sphere, cube, …), a [`Bvh`] for ray casts and box queries, +//! the UV-space [`UvGBuffer`] that maps texels to surface points, and the [`OrbitCamera`]. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod bvh; +pub mod camera; +pub mod gbuffer; +pub mod mesh; +pub mod primitives; +pub mod unwrap; + +pub use bvh::{Bvh, Hit}; +pub use camera::{OrbitCamera, Ray}; +pub use gbuffer::{NO_TRI, Surface, UvGBuffer, surface_at}; +pub use glam; +pub use mesh::{MAX_TRIANGLES, Mesh, SubMesh}; + +#[derive(Debug, thiserror::Error, Clone, PartialEq)] +pub enum GeomError { + #[error("invalid mesh: {0}")] + Invalid(String), +} + +pub type Result = std::result::Result; diff --git a/crates/geom/src/mesh.rs b/crates/geom/src/mesh.rs new file mode 100644 index 00000000..c30c51bd --- /dev/null +++ b/crates/geom/src/mesh.rs @@ -0,0 +1,325 @@ +//! The internal triangle mesh. + +use glam::{Vec2, Vec3, Vec4}; + +use crate::{GeomError, Result}; + +/// A contiguous index range drawn with one material. +#[derive(Clone, Debug, PartialEq)] +pub struct SubMesh { + pub name: String, + pub material: usize, + /// First index (into [`Mesh::indices`]) and index count. + pub start: u32, + pub count: u32, +} + +/// Triangle mesh in world space. UVs use the glTF convention (origin top-left, v down). +#[derive(Clone, Debug, Default, PartialEq)] +pub struct Mesh { + pub positions: Vec, + pub normals: Vec, + /// xyz tangent, w bitangent sign. + pub tangents: Vec, + pub uvs: Vec, + /// RGBA vertex colors in 0..1 (glTF: linear; OBJ, PLY: as stored): one per vertex, or empty. + pub colors: Vec, + pub indices: Vec, + /// Index ranges per material and part (node / object); `name` is the part name. + pub submeshes: Vec, + pub materials: Vec, +} + +/// Hard cap on mesh size accepted from files (triangles). +pub const MAX_TRIANGLES: usize = 20_000_000; + +impl Mesh { + pub fn triangle_count(&self) -> usize { + self.indices.len() / 3 + } + + pub fn vertex_count(&self) -> usize { + self.positions.len() + } + + /// Axis-aligned bounds (zero box for an empty mesh). + pub fn bounds(&self) -> (Vec3, Vec3) { + if self.positions.is_empty() { + return (Vec3::ZERO, Vec3::ZERO); + } + self.positions.iter().fold((Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)), |(lo, hi), p| (lo.min(*p), hi.max(*p))) + } + + /// Bounding-sphere radius around the bounds center (at least a small epsilon). + pub fn radius(&self) -> f32 { + let (lo, hi) = self.bounds(); + ((hi - lo).length() * 0.5).max(1e-4) + } + + /// Vertex indices of triangle `t`. + pub fn tri(&self, t: usize) -> Option<[usize; 3]> { + let i = self.indices.get(t * 3..t * 3 + 3)?; + Some([i[0] as usize, i[1] as usize, i[2] as usize]) + } + + /// Material of triangle `t`. + pub fn material_of(&self, t: usize) -> Option { + let idx = (t * 3) as u32; + self.submeshes.iter().find(|s| idx >= s.start && idx < s.start.saturating_add(s.count)).map(|s| s.material) + } + + /// Triangle index range belonging to material `m` (all submeshes of that material). + pub fn triangles_of(&self, m: usize) -> impl Iterator + '_ { + self.submeshes.iter().filter(move |s| s.material == m).flat_map(|s| (s.start / 3) as usize..((s.start + s.count) / 3) as usize) + } + + /// Check that attribute arrays agree and every index is in range. + pub fn validate(&self) -> Result<()> { + let n = self.positions.len(); + if self.normals.len() != n || self.uvs.len() != n || self.tangents.len() != n { + return Err(GeomError::Invalid(format!( + "attribute counts differ: {} positions, {} normals, {} uvs, {} tangents", + n, + self.normals.len(), + self.uvs.len(), + self.tangents.len() + ))); + } + if !self.colors.is_empty() && self.colors.len() != n { + return Err(GeomError::Invalid(format!("{} vertex colors for {n} vertices", self.colors.len()))); + } + if !self.indices.len().is_multiple_of(3) { + return Err(GeomError::Invalid("index count is not a multiple of 3".into())); + } + if self.triangle_count() > MAX_TRIANGLES { + return Err(GeomError::Invalid(format!("mesh has more than {MAX_TRIANGLES} triangles"))); + } + if let Some(bad) = self.indices.iter().find(|i| **i as usize >= n) { + return Err(GeomError::Invalid(format!("index {bad} out of range ({n} vertices)"))); + } + if self.positions.iter().any(|p| !p.is_finite()) { + return Err(GeomError::Invalid("mesh has non-finite positions".into())); + } + for s in &self.submeshes { + if s.start as usize + s.count as usize > self.indices.len() || s.material >= self.materials.len().max(1) { + return Err(GeomError::Invalid(format!("submesh {} is out of range", s.name))); + } + } + Ok(()) + } + + /// Area-weighted smooth normals over the index buffer. + pub fn compute_normals(&mut self) { + let mut n = vec![Vec3::ZERO; self.positions.len()]; + for t in self.indices.chunks_exact(3) { + let (a, b, c) = (t[0] as usize, t[1] as usize, t[2] as usize); + let (Some(pa), Some(pb), Some(pc)) = (self.positions.get(a), self.positions.get(b), self.positions.get(c)) else { continue }; + let face = (*pb - *pa).cross(*pc - *pa); + for v in [a, b, c] { + if let Some(x) = n.get_mut(v) { + *x += face; + } + } + } + self.normals = n.into_iter().map(|v| v.try_normalize().unwrap_or(Vec3::Y)).collect(); + } + + /// MikkTSpace tangents (falls back to per-triangle tangents if generation fails). + pub fn compute_tangents(&mut self) { + self.tangents = vec![Vec4::new(1.0, 0.0, 0.0, 1.0); self.positions.len()]; + if self.normals.len() != self.positions.len() { + self.compute_normals(); + } + if self.uvs.len() != self.positions.len() { + self.uvs = vec![Vec2::ZERO; self.positions.len()]; + } + // mikktspace crashes (out-of-bounds) when every triangle is degenerate; skip it then. + let usable = !crate::unwrap::all_triangles_degenerate(self); + let mut g = Mikk { mesh: self }; + if !usable || !mikktspace::generate_tangents(&mut g) { + self.simple_tangents(); + } + for (t, n) in self.tangents.iter_mut().zip(&self.normals) { + // Orthonormalize against the normal; repair degenerate results. + let v = t.truncate(); + let o = (v - *n * n.dot(v)).try_normalize().unwrap_or_else(|| n.any_orthonormal_vector()); + *t = o.extend(if t.w < 0.0 { -1.0 } else { 1.0 }); + } + } + + fn simple_tangents(&mut self) { + let mut acc = vec![Vec3::ZERO; self.positions.len()]; + for t in self.indices.chunks_exact(3) { + let (a, b, c) = (t[0] as usize, t[1] as usize, t[2] as usize); + let (Some(pa), Some(pb), Some(pc)) = (self.positions.get(a), self.positions.get(b), self.positions.get(c)) else { continue }; + let (Some(ua), Some(ub), Some(uc)) = (self.uvs.get(a), self.uvs.get(b), self.uvs.get(c)) else { continue }; + let (e1, e2) = (*pb - *pa, *pc - *pa); + let (d1, d2) = (*ub - *ua, *uc - *ua); + let r = d1.x * d2.y - d2.x * d1.y; + if r.abs() < 1e-12 { + continue; + } + let tan = (e1 * d2.y - e2 * d1.y) / r; + for v in [a, b, c] { + if let Some(x) = acc.get_mut(v) { + *x += tan; + } + } + } + self.tangents = acc.into_iter().map(|t| t.try_normalize().unwrap_or(Vec3::X).extend(1.0)).collect(); + } + + /// Append `other`, offsetting indices; its submeshes keep their material indices shifted by + /// this mesh's material count. + pub fn append(&mut self, other: &Mesh) { + let base = self.positions.len() as u32; + let ibase = self.indices.len() as u32; + let mbase = self.materials.len(); + self.positions.extend_from_slice(&other.positions); + self.normals.extend_from_slice(&other.normals); + self.tangents.extend_from_slice(&other.tangents); + self.uvs.extend_from_slice(&other.uvs); + if !(self.colors.is_empty() && other.colors.is_empty()) { + // Vertices of the side without colors become white. + self.colors.resize(base as usize, Vec4::ONE); + self.colors.extend(other.colors.iter().copied().chain(std::iter::repeat(Vec4::ONE)).take(other.positions.len())); + } + self.indices.extend(other.indices.iter().map(|i| i + base)); + self.materials.extend(other.materials.iter().cloned()); + self.submeshes.extend(other.submeshes.iter().map(|s| SubMesh { + name: s.name.clone(), + material: s.material + mbase, + start: s.start + ibase, + count: s.count, + })); + } + + /// Uniformly scale and translate so the mesh is centered with the given bounding radius. + pub fn normalize_to(&mut self, radius: f32) { + let (lo, hi) = self.bounds(); + let c = (lo + hi) * 0.5; + let s = radius / self.radius(); + for p in &mut self.positions { + *p = (*p - c) * s; + } + } + + /// A single-material mesh from raw attributes; computes missing normals and tangents. + pub fn from_parts(positions: Vec, normals: Option>, uvs: Vec, indices: Vec, material: &str) -> Result { + let count = indices.len() as u32; + let mut m = Mesh { + normals: normals.unwrap_or_default(), + uvs, + positions, + indices, + tangents: Vec::new(), + colors: Vec::new(), + submeshes: vec![SubMesh { name: material.into(), material: 0, start: 0, count }], + materials: vec![material.into()], + }; + if m.normals.len() != m.positions.len() { + m.compute_normals(); + } + m.compute_tangents(); + m.validate()?; + Ok(m) + } +} + +struct Mikk<'a> { + mesh: &'a mut Mesh, +} + +impl Mikk<'_> { + fn vi(&self, face: usize, vert: usize) -> usize { + self.mesh.indices.get(face * 3 + vert).copied().unwrap_or(0) as usize + } +} + +impl mikktspace::Geometry for Mikk<'_> { + fn num_faces(&self) -> usize { + self.mesh.indices.len() / 3 + } + fn num_vertices_of_face(&self, _face: usize) -> usize { + 3 + } + fn position(&self, face: usize, vert: usize) -> [f32; 3] { + self.mesh.positions.get(self.vi(face, vert)).copied().unwrap_or_default().to_array() + } + fn normal(&self, face: usize, vert: usize) -> [f32; 3] { + self.mesh.normals.get(self.vi(face, vert)).copied().unwrap_or(Vec3::Y).to_array() + } + fn tex_coord(&self, face: usize, vert: usize) -> [f32; 2] { + // MikkTSpace expects OpenGL texture coordinates (v up); our UVs are glTF (v down). With + // v flipped, the bitangent `cross(N, T) * w` points up the image, as glTF requires. + let uv = self.mesh.uvs.get(self.vi(face, vert)).copied().unwrap_or_default(); + [uv.x, 1.0 - uv.y] + } + fn set_tangent_encoded(&mut self, tangent: [f32; 4], face: usize, vert: usize) { + let i = self.vi(face, vert); + if let Some(t) = self.mesh.tangents.get_mut(i) { + *t = Vec4::from_array(tangent); + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn quad() -> Mesh { + Mesh::from_parts( + vec![Vec3::new(0.0, 0.0, 0.0), Vec3::new(1.0, 0.0, 0.0), Vec3::new(1.0, 1.0, 0.0), Vec3::new(0.0, 1.0, 0.0)], + None, + vec![Vec2::new(0.0, 1.0), Vec2::new(1.0, 1.0), Vec2::new(1.0, 0.0), Vec2::new(0.0, 0.0)], + vec![0, 1, 2, 0, 2, 3], + "Default", + ) + .unwrap() + } + + #[test] + fn normals_and_tangents_of_a_quad() { + let m = quad(); + for n in &m.normals { + assert!((*n - Vec3::Z).length() < 1e-5); + } + for t in &m.tangents { + assert!((t.truncate() - Vec3::X).length() < 1e-4, "{t:?}"); + } + assert_eq!(m.material_of(1), Some(0)); + assert_eq!(m.triangles_of(0).collect::>(), vec![0, 1]); + } + + #[test] + fn validate_catches_bad_indices() { + let mut m = quad(); + m.indices[0] = 99; + assert!(m.validate().is_err()); + let mut m = quad(); + m.uvs.pop(); + assert!(m.validate().is_err()); + } + + #[test] + fn append_offsets_indices_and_materials() { + let mut a = quad(); + let b = quad(); + a.append(&b); + assert_eq!(a.indices[6], 4); + assert_eq!(a.submeshes[1].material, 1); + assert_eq!(a.submeshes[1].start, 6); + a.validate().unwrap(); + // Colors on one side only: the other side's vertices become white. + let mut red = quad(); + red.colors = vec![Vec4::new(1.0, 0.0, 0.0, 1.0); 4]; + a.append(&red); + assert_eq!(a.colors.len(), 12); + assert_eq!((a.colors[0], a.colors[8]), (Vec4::ONE, Vec4::new(1.0, 0.0, 0.0, 1.0))); + a.append(&quad()); + assert_eq!(a.colors[15], Vec4::ONE); + a.validate().unwrap(); + a.colors.pop(); + assert!(a.validate().is_err()); + } +} diff --git a/crates/geom/src/primitives.rs b/crates/geom/src/primitives.rs new file mode 100644 index 00000000..39e52a4d --- /dev/null +++ b/crates/geom/src/primitives.rs @@ -0,0 +1,373 @@ +//! Built-in meshes with clean, non-overlapping UVs: material ball, sphere, (rounded) cube, +//! cylinder, torus and plane. Y is up; triangles are counter-clockwise seen from outside. + +use std::f32::consts::{PI, TAU}; + +use glam::{Vec2, Vec3}; + +use crate::mesh::{Mesh, SubMesh}; + +/// A UV-space rectangle: origin and size. +#[derive(Clone, Copy, Debug)] +struct UvRect { + o: Vec2, + s: Vec2, +} + +impl UvRect { + const FULL: UvRect = UvRect { o: Vec2::ZERO, s: Vec2::ONE }; + fn map(&self, u: f32, v: f32) -> Vec2 { + self.o + self.s * Vec2::new(u, v) + } + fn inset(&self, m: f32) -> UvRect { + UvRect { o: self.o + Vec2::splat(m), s: self.s - Vec2::splat(2.0 * m) } + } +} + +#[derive(Default)] +struct Builder { + p: Vec, + n: Vec, + uv: Vec, + idx: Vec, +} + +impl Builder { + fn vert(&mut self, p: Vec3, n: Vec3, uv: Vec2) -> u32 { + self.p.push(p); + self.n.push(n.try_normalize().unwrap_or(Vec3::Y)); + self.uv.push(uv); + (self.p.len() - 1) as u32 + } + + /// A grid of (rows+1)×(cols+1) vertices from `f(row, col)`, rows going "down" the texture. + fn grid(&mut self, rows: usize, cols: usize, mut f: impl FnMut(usize, usize) -> (Vec3, Vec3, Vec2)) { + let base = self.p.len() as u32; + for i in 0..=rows { + for j in 0..=cols { + let (p, n, uv) = f(i, j); + self.vert(p, n, uv); + } + } + let w = (cols + 1) as u32; + for i in 0..rows as u32 { + for j in 0..cols as u32 { + let a = base + i * w + j; + let (b, c, d) = (a + 1, a + w, a + w + 1); + self.idx.extend_from_slice(&[a, c, d, a, d, b]); + } + } + } + + fn finish(self, material: &str) -> Mesh { + let count = self.idx.len() as u32; + let mut m = Mesh { + positions: self.p, + normals: self.n, + uvs: self.uv, + indices: self.idx, + tangents: Vec::new(), + colors: Vec::new(), + submeshes: vec![SubMesh { name: material.into(), material: 0, start: 0, count }], + materials: vec![material.into()], + }; + m.compute_tangents(); + m + } +} + +/// UV sphere of `radius` centred at `center`. +pub fn sphere(radius: f32, segments: usize, rings: usize) -> Mesh { + let mut b = Builder::default(); + sphere_into(&mut b, Vec3::ZERO, radius, segments.max(3), rings.max(2), UvRect::FULL); + b.finish("Sphere") +} + +fn sphere_into(b: &mut Builder, center: Vec3, radius: f32, segs: usize, rings: usize, r: UvRect) { + b.grid(rings, segs, |i, j| { + let (u, v) = (j as f32 / segs as f32, i as f32 / rings as f32); + let (theta, phi) = (v * PI, u * TAU + PI * 1.5); + let n = Vec3::new(theta.sin() * phi.cos(), theta.cos(), -theta.sin() * phi.sin()); + (center + n * radius, n, r.map(u, v)) + }); +} + +/// A box with rounded edges (`bevel` = edge radius; 0 gives a plain cube). Faces are laid out +/// in a 3×2 UV atlas. +pub fn rounded_box(half: Vec3, bevel: f32) -> Mesh { + let mut b = Builder::default(); + rounded_box_into(&mut b, Vec3::ZERO, half, bevel, UvRect::FULL); + b.finish("Box") +} + +/// The cube primitive (sharp edges). +pub fn cube(size: f32) -> Mesh { + let mut m = rounded_box(Vec3::splat(size * 0.5), 0.0); + m.materials = vec!["Cube".into()]; + if let Some(s) = m.submeshes.first_mut() { + s.name = "Cube".into(); + } + m +} + +fn rounded_box_into(b: &mut Builder, center: Vec3, half: Vec3, bevel: f32, r: UvRect) { + let bevel = bevel.clamp(0.0, half.min_element() * 0.95); + // (normal, U = right, V = down) per face, seen from outside. + let faces = [ + (Vec3::Z, Vec3::X, -Vec3::Y), + (Vec3::X, -Vec3::Z, -Vec3::Y), + (-Vec3::Z, -Vec3::X, -Vec3::Y), + (-Vec3::X, Vec3::Z, -Vec3::Y), + (Vec3::Y, Vec3::X, Vec3::Z), + (-Vec3::Y, Vec3::X, -Vec3::Z), + ]; + let (kb, kc) = if bevel > 0.0 { (6usize, 10usize) } else { (0, 12) }; + // Coordinates along one face axis from -h to h, dense in the bevels. + let coords = |h: f32| -> Vec { + let inner = h - bevel; + let mut v = Vec::new(); + for i in 0..kb { + v.push(-h + bevel * i as f32 / kb as f32); + } + for i in 0..=kc { + v.push(-inner + 2.0 * inner * i as f32 / kc as f32); + } + for i in 1..=kb { + v.push(inner + bevel * i as f32 / kb as f32); + } + v + }; + let inner = half - Vec3::splat(bevel); + for (f, (n, u, v)) in faces.iter().enumerate() { + let cell = UvRect { o: r.map((f % 3) as f32 / 3.0, (f / 3) as f32 / 2.0), s: r.s * Vec2::new(1.0 / 3.0, 0.5) }.inset(0.01 * r.s.x); + let (hu, hv, hn) = ((*u * half).abs().max_element(), (*v * half).abs().max_element(), (*n * half).abs().max_element()); + let (cu, cv) = (coords(hu), coords(hv)); + let (cols, rows) = (cu.len() - 1, cv.len() - 1); + b.grid(rows, cols, |i, j| { + let (a, c) = (cu[j], cv[i]); + let q = *n * hn + *u * a + *v * c; + let clamped = q.clamp(-inner, inner); + let dir = (q - clamped).try_normalize().unwrap_or(*n); + let p = if bevel > 0.0 { clamped + dir * bevel } else { q }; + let nn = if bevel > 0.0 { dir } else { *n }; + (center + p, nn, cell.map((a + hu) / (2.0 * hu), (c + hv) / (2.0 * hv))) + }); + } +} + +/// Surface of revolution of a profile `(radius, y)` listed top → bottom, mapped into `r` +/// (u around, v down the profile by arc length). +fn lathe_into(b: &mut Builder, center: Vec3, profile: &[(f32, f32)], segs: usize, r: UvRect) { + if profile.len() < 2 { + return; + } + let mut len = vec![0.0f32]; + for w in profile.windows(2) { + let d = Vec2::new(w[1].0 - w[0].0, w[1].1 - w[0].1).length(); + len.push(len.last().copied().unwrap_or(0.0) + d); + } + let total = len.last().copied().unwrap_or(1.0).max(1e-6); + let rows = profile.len() - 1; + b.grid(rows, segs, |i, j| { + let (rad, y) = profile[i]; + // Profile tangent (downwards) → outward normal in the (r, y) plane. + let prev = profile[i.saturating_sub(1)]; + let next = profile[(i + 1).min(rows)]; + let t = Vec2::new(next.0 - prev.0, next.1 - prev.1).try_normalize().unwrap_or(Vec2::NEG_Y); + let n2 = Vec2::new(-t.y, t.x); + let u = j as f32 / segs as f32; + let phi = u * TAU + PI * 1.5; + let dir = Vec3::new(phi.cos(), 0.0, -phi.sin()); + let p = center + dir * rad + Vec3::Y * y; + let n = dir * n2.x + Vec3::Y * n2.y; + (p, n, r.map(u, len[i] / total)) + }); +} + +/// A flat disk facing up (+Y) or down, with planar UVs inside `r`. +fn disk_into(b: &mut Builder, center: Vec3, radius: f32, up: bool, segs: usize, r: UvRect) { + let n = if up { Vec3::Y } else { Vec3::NEG_Y }; + let c = b.vert(center, n, r.map(0.5, 0.5)); + let first = b.p.len() as u32; + for j in 0..segs { + let a = j as f32 / segs as f32 * TAU; + let (x, z) = (a.cos(), a.sin()); + // Top view: +X right, +Z down the texture; bottom view mirrors X. + let uv = if up { r.map(0.5 + x * 0.5, 0.5 + z * 0.5) } else { r.map(0.5 + x * 0.5, 0.5 - z * 0.5) }; + b.vert(center + Vec3::new(x, 0.0, z) * radius, n, uv); + } + for j in 0..segs as u32 { + let (a, bb) = (first + j, first + (j + 1) % segs as u32); + if up { + b.idx.extend_from_slice(&[c, bb, a]); + } else { + b.idx.extend_from_slice(&[c, a, bb]); + } + } +} + +/// A capped cylinder along Y. +pub fn cylinder(radius: f32, height: f32, segs: usize) -> Mesh { + let mut b = Builder::default(); + let h = height * 0.5; + lathe_into(&mut b, Vec3::ZERO, &[(radius, h), (radius, -h)], segs.max(3), UvRect { o: Vec2::ZERO, s: Vec2::new(1.0, 0.5) }.inset(0.01)); + disk_into(&mut b, Vec3::Y * h, radius, true, segs.max(3), UvRect { o: Vec2::new(0.0, 0.5), s: Vec2::splat(0.5) }.inset(0.01)); + disk_into(&mut b, -Vec3::Y * h, radius, false, segs.max(3), UvRect { o: Vec2::new(0.5, 0.5), s: Vec2::splat(0.5) }.inset(0.01)); + b.finish("Cylinder") +} + +/// A torus around Y. +pub fn torus(major: f32, minor: f32, segs: usize, sides: usize) -> Mesh { + let mut b = Builder::default(); + let (segs, sides) = (segs.max(3), sides.max(3)); + b.grid(sides, segs, |i, j| { + let (u, v) = (j as f32 / segs as f32, i as f32 / sides as f32); + let phi = u * TAU + PI * 1.5; + let theta = v * TAU; + let dir = Vec3::new(phi.cos(), 0.0, -phi.sin()); + let n = dir * theta.cos() - Vec3::Y * theta.sin(); + (dir * major + n * minor, n, Vec2::new(u, v)) + }); + b.finish("Torus") +} + +/// A subdivided plane facing +Y. +pub fn plane(size: f32, subdivisions: usize) -> Mesh { + let mut b = Builder::default(); + let s = subdivisions.max(1); + b.grid(s, s, |i, j| { + let (u, v) = (j as f32 / s as f32, i as f32 / s as f32); + (Vec3::new((u - 0.5) * size, 0.0, (v - 0.5) * size), Vec3::Y, Vec2::new(u, v)) + }); + b.finish("Plane") +} + +/// The default project mesh: a ball on a beveled pedestal, two materials ("Ball", "Base"). +pub fn material_ball() -> Mesh { + let mut ball = Builder::default(); + sphere_into(&mut ball, Vec3::new(0.0, 1.32, 0.0), 1.0, 128, 64, UvRect::FULL); + let mut ball = ball.finish("Ball"); + + let mut base = Builder::default(); + let (r, top, bot, bev) = (1.05f32, 0.32f32, 0.0f32, 0.07f32); + let mut profile = vec![(0.42, top + 0.06), (0.62, top + 0.06)]; + // Collar bevel and the ring the ball sits on, then the beveled drum. + for k in 1..=6 { + let a = k as f32 / 6.0 * PI * 0.5; + profile.push((0.62 + 0.06 * a.sin(), top + 0.06 * a.cos())); + } + profile.push((r - bev, top)); + for k in 1..=6 { + let a = k as f32 / 6.0 * PI * 0.5; + profile.push((r - bev + bev * a.sin(), top - bev + bev * a.cos())); + } + profile.push((r, bot + bev)); + for k in 1..=6 { + let a = k as f32 / 6.0 * PI * 0.5; + profile.push((r - bev + bev * a.cos(), bot + bev - bev * a.sin())); + } + lathe_into(&mut base, Vec3::ZERO, &profile, 128, UvRect { o: Vec2::ZERO, s: Vec2::new(1.0, 0.5) }.inset(0.01)); + disk_into(&mut base, Vec3::new(0.0, top + 0.06, 0.0), 0.42, true, 128, UvRect { o: Vec2::new(0.0, 0.5), s: Vec2::splat(0.5) }.inset(0.01)); + disk_into(&mut base, Vec3::new(0.0, bot, 0.0), r - bev, false, 128, UvRect { o: Vec2::new(0.5, 0.5), s: Vec2::splat(0.5) }.inset(0.01)); + let base = base.finish("Base"); + ball.append(&base); + ball +} + +/// A small showcase scene: a beveled crate with a rounded lid and a cylinder handle, in three +/// materials (used for demo projects and tests of multiple texture sets). +pub fn crate_scene() -> Mesh { + let mut body = Builder::default(); + rounded_box_into(&mut body, Vec3::new(0.0, 0.8, 0.0), Vec3::new(1.2, 0.8, 0.8), 0.12, UvRect::FULL); + let mut m = body.finish("Crate"); + let mut lid = Builder::default(); + rounded_box_into(&mut lid, Vec3::new(0.0, 1.72, 0.0), Vec3::new(1.28, 0.12, 0.88), 0.08, UvRect::FULL); + m.append(&lid.finish("Lid")); + let mut handle = torus(0.32, 0.07, 64, 24); + for p in &mut handle.positions { + *p = Vec3::new(p.x, p.z, -p.y) + Vec3::new(0.0, 1.84, 0.0); + } + for n in &mut handle.normals { + *n = Vec3::new(n.x, n.z, -n.y); + } + handle.materials = vec!["Handle".into()]; + if let Some(s) = handle.submeshes.first_mut() { + s.name = "Handle".into(); + } + handle.compute_tangents(); + m.append(&handle); + m +} + +/// Built-in mesh by id (`builtin:` in project files). +pub fn builtin(id: &str) -> Option { + Some(match id { + "material_ball" | "materialball" | "ball" => material_ball(), + "sphere" => sphere(1.0, 128, 64), + "cube" => cube(2.0), + "rounded_cube" | "roundedcube" | "box" => rounded_box(Vec3::ONE, 0.15), + "cylinder" => cylinder(1.0, 2.0, 96), + "torus" => torus(1.0, 0.35, 128, 48), + "plane" => plane(2.0, 16), + "crate" => crate_scene(), + _ => return None, + }) +} + +/// Ids accepted by [`builtin`], in menu order. +pub const BUILTINS: [(&str, &str); 8] = [ + ("material_ball", "Material ball"), + ("sphere", "Sphere"), + ("cube", "Cube"), + ("rounded_cube", "Rounded cube"), + ("cylinder", "Cylinder"), + ("torus", "Torus"), + ("plane", "Plane"), + ("crate", "Crate"), +]; + +#[cfg(test)] +mod tests { + use super::*; + + /// Every triangle's winding agrees with its vertex normals, UVs stay in 0..1, and the UV + /// mapping is not mirrored (tangent handedness +1). + fn check(m: &Mesh) { + m.validate().unwrap(); + let mut bad = 0; + for t in 0..m.triangle_count() { + let [a, b, c] = m.tri(t).unwrap(); + let face = (m.positions[b] - m.positions[a]).cross(m.positions[c] - m.positions[a]); + if face.length() < 1e-9 { + continue; + } + let n = m.normals[a] + m.normals[b] + m.normals[c]; + if face.dot(n) <= 0.0 { + bad += 1; + } + } + assert_eq!(bad, 0, "{} triangles wound against their normals", bad); + for uv in &m.uvs { + assert!((0.0..=1.0).contains(&uv.x) && (0.0..=1.0).contains(&uv.y), "{uv:?}"); + } + let mirrored = m.tangents.iter().filter(|t| t.w < 0.0).count(); + assert!(mirrored * 50 < m.tangents.len().max(1), "{mirrored} mirrored tangents"); + } + + #[test] + fn primitives_are_well_formed() { + for (id, _) in BUILTINS { + let m = builtin(id).unwrap(); + assert!(m.triangle_count() > 0, "{id}"); + check(&m); + } + assert!(builtin("nope").is_none()); + } + + #[test] + fn material_ball_has_two_materials() { + let m = material_ball(); + assert_eq!(m.materials, vec!["Ball".to_string(), "Base".to_string()]); + assert!(m.triangles_of(0).count() > 0 && m.triangles_of(1).count() > 0); + } +} diff --git a/crates/geom/src/unwrap.rs b/crates/geom/src/unwrap.rs new file mode 100644 index 00000000..2f2eafc0 --- /dev/null +++ b/crates/geom/src/unwrap.rs @@ -0,0 +1,384 @@ +//! Automatic UV unwrapping for meshes imported without texture coordinates. +//! +//! Triangles are grouped into charts by flood fill across shared (welded) edges while each face +//! normal stays within 60° of the chart's seed face, so every chart is a height field over its +//! seed plane and projects onto it without flipping. Charts are rotated to their principal axes +//! and shelf-packed per material into 0..1 with one uniform scale, so texel density is the same +//! everywhere within a material. + +use std::collections::{HashMap, VecDeque}; + +use glam::{Vec2, Vec3}; + +use crate::{GeomError, Mesh, Result}; + +/// Faces of a chart stay within this angle of the seed face normal (cos 60°). +const CHART_COS: f32 = 0.5; +/// Packing never goes beyond this virtual resolution (texels per side). +const MAX_PACK_RES: f32 = 65_536.0; + +/// Welded vertex id per vertex: vertices at the same position (snapped to a grid of 1e-6 of +/// the bounding diagonal) share an id. Ids are dense, in order of first appearance. +pub fn weld_ids(positions: &[Vec3]) -> Vec { + let (lo, hi) = positions.iter().fold((Vec3::splat(f32::MAX), Vec3::splat(f32::MIN)), |(lo, hi), p| (lo.min(*p), hi.max(*p))); + let cell = ((hi - lo).length() * 1e-6).max(1e-12); + let mut map: HashMap<[i64; 3], u32> = HashMap::with_capacity(positions.len()); + positions + .iter() + .map(|p| { + let q = ((*p - lo) / cell).round(); + let next = map.len() as u32; + *map.entry([q.x as i64, q.y as i64, q.z as i64]).or_insert(next) + }) + .collect() +} + +/// True when the mesh has triangles and every one of them has two corners at the same position. +/// MikkTSpace (and so [`Mesh::compute_tangents`]) crashes on such meshes, so callers reject them. +pub fn all_triangles_degenerate(mesh: &Mesh) -> bool { + let p = |i: &u32| mesh.positions.get(*i as usize); + !mesh.indices.is_empty() + && mesh.indices.chunks(3).all(|t| match t { + [a, b, c] => p(a) == p(b) || p(a) == p(c) || p(b) == p(c), + _ => true, + }) +} + +struct Chart { + material: usize, + /// Projection basis (right-handed with the seed normal). + t: Vec3, + b: Vec3, + /// Rotation to the chart's principal axes (cos, sin). + rot: Vec2, + lo: Vec2, + hi: Vec2, + /// Texel offset of the chart's packed rectangle and the material's scale and resolution. + offset: Vec2, +} + +impl Chart { + fn local(&self, p: Vec3) -> Vec2 { + let q = Vec2::new(p.dot(self.t), p.dot(self.b)); + Vec2::new(q.x * self.rot.x - q.y * self.rot.y, q.x * self.rot.y + q.y * self.rot.x) + } + fn size(&self) -> Vec2 { + (self.hi - self.lo).max(Vec2::ZERO) + } +} + +/// Replace the UVs of `mesh` with an automatic non-overlapping layout: each material gets its +/// own 0..1 space with charts at least `padding_texels` (minimum 1) away from each other and +/// the borders at `resolution`. Vertices are split at chart borders; tangents are recomputed. +/// Returns the number of charts. +pub fn auto_unwrap(mesh: &mut Mesh, padding_texels: f32, resolution: u32) -> Result { + mesh.validate_indices()?; + if all_triangles_degenerate(mesh) { + return Err(GeomError::Invalid("every triangle of the mesh is degenerate".into())); + } + if mesh.normals.len() != mesh.positions.len() { + mesh.compute_normals(); + } + let n = mesh.triangle_count(); + let weld = weld_ids(&mesh.positions); + let pos = |v: usize| mesh.positions.get(v).copied().unwrap_or_default(); + let wid = |v: usize| weld.get(v).copied().unwrap_or(u32::MAX); + + // Face normals (None for degenerate faces) and materials. + let mut normal: Vec> = Vec::with_capacity(n); + let mut area = Vec::with_capacity(n); + for t in 0..n { + let [a, b, c] = mesh.tri(t).unwrap_or([0; 3]); + let cr = (pos(b) - pos(a)).cross(pos(c) - pos(a)); + area.push(cr.length() * 0.5); + normal.push(cr.try_normalize()); + } + let mut material = vec![0usize; n]; + for s in &mesh.submeshes { + for t in (s.start / 3) as usize..((s.start as usize + s.count as usize) / 3) { + if let Some(m) = material.get_mut(t) { + *m = s.material; + } + } + } + + // Manifold edge adjacency over welded vertices: edge → (face, face, count). + let mut edges: HashMap<(u32, u32), (u32, u32, u8)> = HashMap::with_capacity(n * 2); + let tri_edges = |t: usize| -> [(u32, u32); 3] { + let [a, b, c] = mesh.tri(t).unwrap_or([0; 3]); + let key = |x: usize, y: usize| { + let (p, q) = (wid(x), wid(y)); + (p.min(q), p.max(q)) + }; + [key(a, b), key(b, c), key(c, a)] + }; + for t in 0..n { + for e in tri_edges(t) { + if e.0 == e.1 { + continue; + } + let slot = edges.entry(e).or_insert((t as u32, u32::MAX, 0)); + if slot.2 == 1 { + slot.1 = t as u32; + } + slot.2 = slot.2.saturating_add(1); + } + } + + // Grow charts from the largest unassigned faces. + let mut order: Vec = (0..n).collect(); + order.sort_by(|a, b| area[*b].total_cmp(&area[*a])); + let mut chart_of = vec![u32::MAX; n]; + let mut charts: Vec = Vec::new(); + let mut queue = VecDeque::new(); + for &seed in &order { + if chart_of[seed] != u32::MAX { + continue; + } + let id = charts.len() as u32; + let sn = normal[seed].unwrap_or(Vec3::Z); + let t = sn.any_orthonormal_vector(); + charts.push(Chart { material: material[seed], t, b: sn.cross(t), rot: Vec2::X, lo: Vec2::ZERO, hi: Vec2::ZERO, offset: Vec2::ZERO }); + chart_of[seed] = id; + queue.push_back(seed); + while let Some(f) = queue.pop_front() { + for e in tri_edges(f) { + let Some(&(f0, f1, 2)) = edges.get(&e) else { continue }; + let g = if f0 as usize == f { f1 } else { f0 } as usize; + let ok = normal.get(g).is_some_and(|nn| nn.is_none_or(|nn| nn.dot(sn) >= CHART_COS)); + if ok && chart_of.get(g) == Some(&u32::MAX) && material.get(g) == Some(&material[seed]) { + chart_of[g] = id; + queue.push_back(g); + } + } + } + } + + // Principal axes and bounds of every chart. + let mut cov = vec![(Vec2::ZERO, [0.0f64; 3], 0usize); charts.len()]; + for (t, &c) in chart_of.iter().enumerate() { + let c = c as usize; + for v in mesh.tri(t).unwrap_or([0; 3]) { + if let (Some(ch), Some(acc)) = (charts.get(c), cov.get_mut(c)) { + let q = ch.local(pos(v)); + acc.0 += q; + acc.1[0] += (q.x * q.x) as f64; + acc.1[1] += (q.y * q.y) as f64; + acc.1[2] += (q.x * q.y) as f64; + acc.2 += 1; + } + } + } + for (ch, (sum, m, k)) in charts.iter_mut().zip(&cov) { + let k = (*k).max(1) as f64; + let (mx, my) = (sum.x as f64 / k, sum.y as f64 / k); + let (cxx, cyy, cxy) = (m[0] / k - mx * mx, m[1] / k - my * my, m[2] / k - mx * my); + let angle = 0.5 * (2.0 * cxy).atan2(cxx - cyy); + // Rotate so the principal axis lies along x. + ch.rot = Vec2::new((-angle).cos() as f32, (-angle).sin() as f32); + ch.lo = Vec2::splat(f32::MAX); + ch.hi = Vec2::splat(f32::MIN); + } + for (t, &c) in chart_of.iter().enumerate() { + let c = c as usize; + for v in mesh.tri(t).unwrap_or([0; 3]) { + if let Some(ch) = charts.get_mut(c) { + let q = ch.local(pos(v)); + ch.lo = ch.lo.min(q); + ch.hi = ch.hi.max(q); + } + } + } + for ch in &mut charts { + if ch.size().y > ch.size().x { + // Quarter turn (x, y) → (y, −x) so shelves stay low. + ch.rot = Vec2::new(ch.rot.y, -ch.rot.x); + let (lo, hi) = (ch.lo, ch.hi); + ch.lo = Vec2::new(lo.y, -hi.x); + ch.hi = Vec2::new(hi.y, -lo.x); + } + } + + // Pack each material's charts into its own 0..1 square. + let pad = padding_texels.max(1.0); + let mut scale = HashMap::new(); + let mats: std::collections::BTreeSet = charts.iter().map(|c| c.material).collect(); + for m in mats { + let ids: Vec = (0..charts.len()).filter(|i| charts[*i].material == m).collect(); + let sizes: Vec = ids.iter().map(|i| charts[*i].size()).collect(); + let (s, res, offsets) = pack(&sizes, resolution.max(16) as f32, pad)?; + for (i, o) in ids.iter().zip(offsets) { + charts[*i].offset = o; + } + scale.insert(m, (s, res)); + } + + // Rebuild vertices: one per (vertex, chart). + let mut remap: HashMap<(u32, u32), u32> = HashMap::with_capacity(mesh.positions.len() * 2); + let (mut positions, mut normals, mut uvs, mut colors) = (Vec::new(), Vec::new(), Vec::new(), Vec::new()); + let mut indices = Vec::with_capacity(mesh.indices.len()); + for (t, &c) in chart_of.iter().enumerate() { + let Some(ch) = charts.get(c as usize) else { continue }; + let (s, res) = scale.get(&ch.material).copied().unwrap_or((0.0, 1.0)); + for v in mesh.tri(t).unwrap_or([0; 3]) { + let idx = *remap.entry((v as u32, c)).or_insert_with(|| { + let q = ch.local(pos(v)); + // Chart y points up; UV v points down the image. + let texel = ch.offset + Vec2::splat(pad) + Vec2::new(q.x - ch.lo.x, ch.hi.y - q.y) * s; + positions.push(pos(v)); + normals.push(mesh.normals.get(v).copied().unwrap_or(Vec3::Y)); + if let Some(c) = mesh.colors.get(v) { + colors.push(*c); + } + uvs.push((texel / res).clamp(Vec2::ZERO, Vec2::ONE)); + (positions.len() - 1) as u32 + }); + indices.push(idx); + } + } + mesh.positions = positions; + mesh.normals = normals; + mesh.uvs = uvs; + mesh.colors = colors; + mesh.indices = indices; + mesh.compute_tangents(); + mesh.validate()?; + Ok(charts.len()) +} + +/// Shelf-pack rectangles of world `sizes` (each grown by `pad` texels per side) into a square of +/// `res` texels with the largest uniform scale that fits. Returns (texels per world unit, +/// resolution used, texel offset per rectangle). The resolution doubles when the padding alone +/// cannot fit (very many charts), so the result always fits in 0..1. +fn pack(sizes: &[Vec2], mut res: f32, pad: f32) -> Result<(f32, f32, Vec)> { + let mut order: Vec = (0..sizes.len()).collect(); + order.sort_by(|a, b| sizes[*b].y.total_cmp(&sizes[*a].y)); + let place = |s: f32, res: f32| -> Option> { + let mut out = vec![Vec2::ZERO; sizes.len()]; + let (mut x, mut y, mut shelf) = (0.0f32, 0.0f32, 0.0f32); + for &i in &order { + let r = sizes[i] * s + Vec2::splat(2.0 * pad); + if r.x > res { + return None; + } + if x + r.x > res { + y += shelf; + x = 0.0; + shelf = 0.0; + } + if y + r.y > res { + return None; + } + out[i] = Vec2::new(x, y); + x += r.x; + shelf = shelf.max(r.y); + } + Some(out) + }; + while place(0.0, res).is_none() { + res *= 2.0; + if res > MAX_PACK_RES { + return Err(GeomError::Invalid("too many UV charts to pack".into())); + } + } + let largest = sizes.iter().map(|s| s.max_element()).fold(0.0f32, f32::max); + if largest <= 0.0 { + return Ok((0.0, res, place(0.0, res).unwrap_or_default())); + } + let (mut lo, mut hi) = (0.0f32, (res - 2.0 * pad).max(0.0) / largest); + if place(hi, res).is_some() { + lo = hi; + } + for _ in 0..40 { + if hi - lo <= lo * 1e-4 { + break; + } + let mid = 0.5 * (lo + hi); + if place(mid, res).is_some() { lo = mid } else { hi = mid } + } + Ok((lo, res, place(lo, res).unwrap_or_default())) +} + +impl Mesh { + /// Index-range checks only (attribute arrays may be incomplete before unwrapping). + fn validate_indices(&self) -> Result<()> { + let n = self.positions.len(); + if !self.indices.len().is_multiple_of(3) || self.indices.iter().any(|i| *i as usize >= n) { + return Err(GeomError::Invalid("mesh indices are out of range".into())); + } + if self.triangle_count() > crate::MAX_TRIANGLES { + return Err(GeomError::Invalid(format!("mesh has more than {} triangles", crate::MAX_TRIANGLES))); + } + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{UvGBuffer, primitives}; + + fn check(mut m: Mesh, min_coverage: f32) { + m.uvs.clear(); + let charts = auto_unwrap(&mut m, 4.0, 512).unwrap(); + assert!(charts >= 1); + m.validate().unwrap(); + assert!(m.uvs.iter().all(|uv| (0.0..=1.0).contains(&uv.x) && (0.0..=1.0).contains(&uv.y))); + let g = UvGBuffer::new(&m, 0, 512, 512); + let covered = g.covered_count() as f32; + let coverage = covered / (512.0 * 512.0); + assert!(coverage > min_coverage, "coverage {coverage} with {charts} charts"); + assert!((g.overlaps as f32) < covered * 0.005, "overlaps {} of {covered}", g.overlaps); + } + + #[test] + fn sphere_unwraps_without_overlaps() { + check(primitives::sphere(1.0, 48, 24), 0.3); + } + + #[test] + fn cube_unwraps_without_overlaps() { + check(primitives::cube(2.0), 0.3); + } + + #[test] + fn torus_and_material_ball_unwrap() { + check(primitives::torus(1.0, 0.3, 48, 24), 0.2); + let mut ball = primitives::material_ball(); + ball.uvs.clear(); + auto_unwrap(&mut ball, 2.0, 1024).unwrap(); + for m in 0..ball.materials.len() { + let g = UvGBuffer::new(&ball, m, 512, 512); + assert!((g.overlaps as f32) < g.covered_count() as f32 * 0.005 + 1.0, "material {m}: {} overlaps", g.overlaps); + } + } + + #[test] + fn many_tiny_charts_still_fit() { + // 2000 disconnected triangles: the packer grows its virtual resolution. + let mut p = Vec::new(); + let mut idx = Vec::new(); + for i in 0..2000u32 { + let o = Vec3::new(i as f32 * 3.0, 0.0, 0.0); + p.extend([o, o + Vec3::X, o + Vec3::Y]); + idx.extend([i * 3, i * 3 + 1, i * 3 + 2]); + } + let mut m = Mesh::from_parts(p, None, Vec::new(), idx, "m").unwrap(); + auto_unwrap(&mut m, 4.0, 128).unwrap(); + assert!(m.uvs.iter().all(|uv| (0.0..=1.0).contains(&uv.x) && (0.0..=1.0).contains(&uv.y))); + } + + #[test] + fn degenerate_and_empty_meshes_do_not_fail() { + let mut empty = Mesh::default(); + assert_eq!(auto_unwrap(&mut empty, 4.0, 256).unwrap(), 0); + // A sliver (zero-area) triangle next to a real one. + let p = vec![Vec3::ZERO, Vec3::X, Vec3::Y, Vec3::X * 2.0]; + let mut m = Mesh::from_parts(p, None, Vec::new(), vec![0, 1, 2, 0, 1, 3], "m").unwrap(); + auto_unwrap(&mut m, 4.0, 256).unwrap(); + m.validate().unwrap(); + let mut point = Mesh { positions: vec![Vec3::ONE; 3], indices: vec![0, 1, 2], ..Mesh::default() }; + assert!(all_triangles_degenerate(&point)); + assert!(auto_unwrap(&mut point, 4.0, 256).is_err()); + } +} diff --git a/crates/paint/Cargo.toml b/crates/paint/Cargo.toml new file mode 100644 index 00000000..6cc99089 --- /dev/null +++ b/crates/paint/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "texturecraft-paint" +description = "TextureCraft brush engine: strokes, stamps, visibility, texture-space rasterization, commit" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-texel = { workspace = true } +texturecraft-geom = { workspace = true } +texturecraft-compose = { workspace = true } +rayon = { workspace = true } +serde = { workspace = true } diff --git a/crates/paint/src/brush.rs b/crates/paint/src/brush.rs new file mode 100644 index 00000000..6649c1b1 --- /dev/null +++ b/crates/paint/src/brush.rs @@ -0,0 +1,289 @@ +//! Brush settings and alpha shapes. + +use serde::{Deserialize, Serialize}; +use texturecraft_compose::ImageRes; +use texturecraft_texel::noise; + +/// How the stamp plane is oriented. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum Alignment { + /// Along the surface (tangent to the hit normal). + #[default] + Tangent, + /// Facing the camera (stable on noisy geometry). + Camera, +} + +/// The stamp shape (multiplied by the hardness falloff). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum BrushAlpha { + #[default] + Round, + Square, + /// Speckled spray. + Spray, + /// Organic grunge blotches. + Grunge, + /// Soft cloud. + Cloud, + /// Five-point star. + Star, + /// Horizontal streaks (dry brush). + Streaks, +} + +impl BrushAlpha { + pub const ALL: [BrushAlpha; 7] = + [BrushAlpha::Round, BrushAlpha::Square, BrushAlpha::Spray, BrushAlpha::Grunge, BrushAlpha::Cloud, BrushAlpha::Star, BrushAlpha::Streaks]; + + pub fn label(self) -> &'static str { + match self { + BrushAlpha::Round => "Round", + BrushAlpha::Square => "Square", + BrushAlpha::Spray => "Spray", + BrushAlpha::Grunge => "Grunge", + BrushAlpha::Cloud => "Cloud", + BrushAlpha::Star => "Star", + BrushAlpha::Streaks => "Dry streaks", + } + } + + pub fn parse(s: &str) -> Option { + let n = |x: &str| x.to_ascii_lowercase().replace([' ', '_', '-'], ""); + BrushAlpha::ALL.into_iter().find(|a| n(a.label()) == n(s) || n(&format!("{a:?}")) == n(s)) + } + + /// Shape value at local stamp coordinates `l` (unit disc/square, −1..1), seeded per stamp. + pub fn sample(self, lx: f32, ly: f32, hardness: f32, seed: u32) -> f32 { + let r = (lx * lx + ly * ly).sqrt(); + let fall = |d: f32| 1.0 - smoothstep(hardness.min(0.999), 1.0, d); + match self { + BrushAlpha::Round => fall(r), + BrushAlpha::Square => fall(lx.abs().max(ly.abs())), + BrushAlpha::Spray => { + let n = noise::value([lx * 14.0, ly * 14.0, seed as f32 * 0.37], seed); + fall(r) * if n > 0.72 { 1.0 } else { 0.0 } + } + BrushAlpha::Grunge => { + let n = noise::fbm([lx * 2.5 + seed as f32 * 0.13, ly * 2.5, 0.5], 5, seed, noise::perlin); + fall(r) * ((n - 0.42) * 5.0).clamp(0.0, 1.0) + } + BrushAlpha::Cloud => fall(r) * noise::fbm([lx * 1.8, ly * 1.8, seed as f32 * 0.21], 4, seed, noise::value), + BrushAlpha::Star => { + let a = ly.atan2(lx); + let k = (a * 5.0 / 2.0).cos().abs(); + let edge = 0.45 + 0.55 * k * k; + fall(r / edge) + } + BrushAlpha::Streaks => { + let n = noise::value([lx * 0.8, ly * 18.0, seed as f32 * 0.7], seed); + fall(r) * ((n - 0.35) * 3.0).clamp(0.0, 1.0) + } + } + } +} + +/// A stamp shape ready to sample: the procedural alpha, or an image alpha when one is set. +#[derive(Clone, Copy)] +pub struct Shape<'a> { + pub alpha: BrushAlpha, + pub image: Option<&'a ImageRes>, +} + +impl Shape<'_> { + /// Shape value at local stamp coordinates (see [`BrushAlpha::sample`]). + pub fn sample(&self, lx: f32, ly: f32, hardness: f32, seed: u32) -> f32 { + match self.image { + Some(img) => image_alpha(img, lx, ly), + None => self.alpha.sample(lx, ly, hardness, seed), + } + } +} + +/// An image as a brush alpha: luminance × alpha over the stamp square (−1..1, y up), 0 outside. +pub fn image_alpha(img: &ImageRes, lx: f32, ly: f32) -> f32 { + if !(lx.abs() <= 1.0 && ly.abs() <= 1.0) { + return 0.0; + } + let [r, g, b, a] = img.sample(lx * 0.5 + 0.5, 0.5 - ly * 0.5); + ((0.2126 * r + 0.7152 * g + 0.0722 * b) * a).clamp(0.0, 1.0) +} + +fn smoothstep(e0: f32, e1: f32, x: f32) -> f32 { + let t = ((x - e0) / (e1 - e0).max(1e-6)).clamp(0.0, 1.0); + t * t * (3.0 - 2.0 * t) +} + +/// Mirror symmetry through the mesh center. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub struct Symmetry { + pub x: bool, + pub y: bool, + pub z: bool, +} + +impl Symmetry { + pub fn any(&self) -> bool { + self.x || self.y || self.z + } +} + +/// Particle brush: every stamp emits particles that slide down the surface under gravity +/// (world −Y), painting small dabs along their tracks instead of the stamp itself. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +pub struct Particles { + pub enabled: bool, + /// Particles per stamp. + pub count: u32, + /// Simulation steps per particle (one dab each). + pub lifetime: u32, + /// Distance slid per step, relative to the particle size (0 = particles stay put). + pub gravity: f32, +} + +impl Default for Particles { + fn default() -> Self { + Particles { enabled: false, count: 4, lifetime: 24, gravity: 1.0 } + } +} + +/// Brush parameters (the Painter "Brush" properties section plus tool-bar values). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BrushSettings { + /// Radius as a fraction of the mesh bounding-box diagonal (the UI shows 0–100). + pub size: f32, + /// Pen pressure may shrink the size down to this fraction. + pub min_size: f32, + /// Per-stamp alpha 0..1. + pub flow: f32, + /// Caps a whole stroke 0..1. + pub opacity: f32, + /// Distance between stamps as a fraction of the diameter. + pub spacing: f32, + /// Start of the edge falloff (0 soft … 1 hard). + pub hardness: f32, + /// Stamp rotation, degrees. + pub angle: f32, + pub follow_path: bool, + pub alignment: Alignment, + /// Surfaces facing away more than these angles (degrees) receive less paint. + pub angle_fade: (f32, f32), + /// Lazy mouse distance in screen pixels (0 = off). + pub lazy: f32, + pub jitter_size: f32, + pub jitter_angle: f32, + pub jitter_flow: f32, + /// Position jitter as a fraction of the radius. + pub jitter_position: f32, + pub alpha: BrushAlpha, + /// Image resource used as the stamp shape instead of `alpha` (grayscale, rotated with the stamp). + #[serde(default)] + pub alpha_image: Option, + /// Only paint surfaces facing the camera. + pub backface_culling: bool, + /// Half-depth of the stamp volume relative to the radius (thinner = less bleed into folds). + pub depth: f32, + pub symmetry: Symmetry, + /// Size in screen space (constant on screen) instead of world space. + pub screen_space: bool, + #[serde(default)] + pub particles: Particles, +} + +impl Default for BrushSettings { + fn default() -> Self { + BrushSettings { + size: 0.02, + min_size: 0.05, + flow: 1.0, + opacity: 1.0, + spacing: 0.1, + hardness: 0.5, + angle: 0.0, + follow_path: false, + alignment: Alignment::Tangent, + angle_fade: (70.0, 85.0), + lazy: 0.0, + jitter_size: 0.0, + jitter_angle: 0.0, + jitter_flow: 0.0, + jitter_position: 0.0, + alpha: BrushAlpha::Round, + alpha_image: None, + backface_culling: true, + depth: 1.0, + symmetry: Symmetry::default(), + screen_space: false, + particles: Particles::default(), + } + } +} + +impl BrushSettings { + /// Clamp every value into its valid range (input from UI, CLI or agents). + pub fn sanitized(&self) -> BrushSettings { + let f = |v: f32, lo: f32, hi: f32, d: f32| if v.is_finite() { v.clamp(lo, hi) } else { d }; + BrushSettings { + size: f(self.size, 0.0005, 0.5, 0.02), + min_size: f(self.min_size, 0.0, 1.0, 0.05), + flow: f(self.flow, 0.0, 1.0, 1.0), + opacity: f(self.opacity, 0.0, 1.0, 1.0), + spacing: f(self.spacing, 0.01, 10.0, 0.1), + hardness: f(self.hardness, 0.0, 0.999, 0.5), + angle: f(self.angle, -360.0, 360.0, 0.0), + angle_fade: (f(self.angle_fade.0, 0.0, 90.0, 70.0), f(self.angle_fade.1, 0.0, 90.0, 85.0)), + lazy: f(self.lazy, 0.0, 500.0, 0.0), + jitter_size: f(self.jitter_size, 0.0, 1.0, 0.0), + jitter_angle: f(self.jitter_angle, 0.0, 1.0, 0.0), + jitter_flow: f(self.jitter_flow, 0.0, 1.0, 0.0), + jitter_position: f(self.jitter_position, 0.0, 4.0, 0.0), + depth: f(self.depth, 0.05, 4.0, 1.0), + particles: Particles { + enabled: self.particles.enabled, + count: self.particles.count.clamp(1, 16), + lifetime: self.particles.lifetime.clamp(1, 128), + gravity: f(self.particles.gravity, 0.0, 2.0, 1.0), + }, + ..self.clone() + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn alphas_are_bounded_and_zero_outside() { + for a in BrushAlpha::ALL { + for i in 0..40 { + let t = i as f32 / 20.0 - 1.0; + let v = a.sample(t, t * 0.5, 0.5, 3); + assert!((0.0..=1.0).contains(&v), "{a:?} {v}"); + } + assert_eq!(a.sample(1.5, 1.5, 0.5, 1), 0.0, "{a:?}"); + assert_eq!(BrushAlpha::parse(a.label()), Some(a)); + } + assert!(BrushAlpha::Round.sample(0.0, 0.0, 0.5, 0) > 0.99); + } + + #[test] + fn image_alpha_follows_the_image_and_is_zero_outside() { + // Left half white, right half black (2×1 image, sampled at texel centers). + let img = ImageRes { width: 2, height: 1, rgba: vec![[1.0; 4], [0.0, 0.0, 0.0, 1.0]], srgb: true }; + let shape = Shape { alpha: BrushAlpha::Round, image: Some(&img) }; + assert!(shape.sample(-0.5, 0.0, 0.5, 0) > 0.99); + assert!(shape.sample(0.5, 0.0, 0.5, 0) < 0.01); + assert_eq!(shape.sample(1.5, 0.0, 0.5, 0), 0.0); + assert_eq!(shape.sample(f32::NAN, 0.0, 0.5, 0), 0.0); + } + + #[test] + fn sanitize_fixes_hostile_values() { + let b = BrushSettings { size: f32::NAN, flow: 9.0, hardness: 1.0, spacing: -1.0, ..BrushSettings::default() }.sanitized(); + assert_eq!(b.size, 0.02); + assert_eq!(b.flow, 1.0); + assert!(b.hardness < 1.0); + assert!(b.spacing > 0.0); + } +} diff --git a/crates/paint/src/commit.rs b/crates/paint/src/commit.rs new file mode 100644 index 00000000..7f1bd630 --- /dev/null +++ b/crates/paint/src/commit.rs @@ -0,0 +1,192 @@ +//! Committing a stroke: premultiplied "over" (paint) or scale-down (erase) of the stroke alpha +//! into a layer's channels or a mask's paint effect. Only touched tiles are un-shared, so the +//! previous state stays intact in undo snapshots. + +use std::collections::{BTreeMap, BTreeSet}; + +use texturecraft_compose::PixelStore; +use texturecraft_core::{Channel, ChannelKind, LayerId}; +use texturecraft_texel::{TILE, TILE_AREA, TileImage, from_u16, from_u16_signed, to_u16, to_u16_signed}; + +pub(crate) fn dec(kind: ChannelKind, v: u16) -> f32 { + if kind == ChannelKind::Signed { from_u16_signed(v) } else { from_u16(v) } +} + +pub(crate) fn enc(kind: ChannelKind, v: f32) -> u16 { + if kind == ChannelKind::Signed { to_u16_signed(v) } else { to_u16(v) } +} + +/// Blend `alpha × opacity` into one image of `n` value components plus coverage. With a +/// per-texel source, its alpha factor scales the stroke and, when `stencil_color`, its color +/// replaces `value`; `carried` (clone, smudge) replaces `value` per texel. +fn over(img: &mut TileImage, kind: ChannelKind, value: &[f32], src: &CommitSource, stencil_color: bool, carried: Option<&TileImage>) { + let comps = img.comps(); + let n = comps.saturating_sub(1); + let opacity = src.opacity.clamp(0.0, 1.0); + for &(tx, ty) in src.tiles { + let Some(a) = src.alpha.tile(tx, ty) else { continue }; + if src.erase && !img.is_allocated(tx, ty) { + continue; + } + let carried = match carried.map(|c| c.tile(tx, ty)) { + Some(None) => continue, + Some(Some(t)) => Some(t), + None => None, + }; + // New tiles start empty: zero coverage and a zero value (32768 in signed encoding). + let mut fill = vec![enc(kind, 0.0); n]; + fill.push(0); + let Some(dst) = img.tile_mut(tx, ty, &fill) else { continue }; + for i in 0..TILE_AREA { + let mut m = from_u16(a.get(i).copied().unwrap_or(0)) * opacity; + if m <= 0.0 { + continue; + } + let mut color = None; + if let Some(f) = src.per_texel { + let (x, y) = (tx * TILE + i as u32 % TILE, ty * TILE + i as u32 / TILE); + match f(x, y) { + Some((c, af)) => { + m *= af; + color = Some(c); + } + None => continue, + } + if m <= 0.0 { + continue; + } + } + let Some(px) = dst.get_mut(i * comps..(i + 1) * comps) else { continue }; + let cov = from_u16(px[n]); + for k in 0..n { + let p = dec(kind, px[k]); + let target = match (carried, color) { + (Some(t), _) => dec(kind, t.get(i * n + k).copied().unwrap_or(0)), + (None, Some(c)) if stencil_color => c.get(k).copied().unwrap_or(0.0), + _ => value.get(k).copied().unwrap_or(0.0), + }; + let v = if src.erase { p * (1.0 - m) } else { target * m + p * (1.0 - m) }; + px[k] = enc(kind, v); + } + px[n] = to_u16(if src.erase { cov * (1.0 - m) } else { m + cov * (1.0 - m) }); + } + } +} + +/// Per-texel override of a stroke: `(x, y)` → (base color, alpha factor), None = no paint. +pub type TexelFn<'a> = &'a (dyn Fn(u32, u32) -> Option<([f32; 3], f32)> + Sync); + +/// The stroke being committed: its alpha, touched tiles, opacity cap and mode. +#[derive(Clone, Copy)] +pub struct CommitSource<'a> { + pub alpha: &'a TileImage, + pub tiles: &'a BTreeSet<(u32, u32)>, + pub opacity: f32, + pub erase: bool, + /// Projection tool: base color and alpha per texel from a stencil. + pub per_texel: Option>, + /// Clone and smudge: straight values per channel carried by the stroke (replace `values`). + pub carried: Option<&'a BTreeMap>, +} + +/// Commit a stroke into paint layer `layer` (channels in `values`; erase clears every painted +/// channel of the layer, or only those in `values` when it is not empty). +pub fn commit_layer(pixels: &mut PixelStore, layer: LayerId, resolution: u32, values: &BTreeMap, src: CommitSource) { + let opacity = src.opacity.clamp(0.0, 1.0); + let channels: Vec = if src.erase { + let painted: BTreeSet = pixels.layers.keys().filter(|(id, _)| *id == layer).map(|(_, c)| *c).collect(); + painted.into_iter().filter(|c| values.is_empty() || values.contains_key(c)).collect() + } else { + values.keys().copied().collect() + }; + for c in channels { + let v = values.get(&c).copied().unwrap_or([0.0; 3]); + let img = pixels.layer_mut(layer, c, resolution); + let carried = src.carried.and_then(|m| m.get(&c)); + over(img, c.kind(), &v[..c.components()], &CommitSource { opacity, ..src }, c == Channel::BaseColor, carried); + } +} + +/// Commit a stroke into the paint effect `effect` of a mask, painting gray `value`. +pub fn commit_mask(pixels: &mut PixelStore, effect: LayerId, resolution: u32, value: f32, src: CommitSource) { + let img = pixels.mask_mut(effect, resolution); + over(img, ChannelKind::Scalar, &[value.clamp(0.0, 1.0)], &src, false, None); +} + +/// Commit a stroke into a coverage-only image (1 component), e.g. the quick mask. +pub fn commit_coverage(img: &mut TileImage, src: CommitSource) { + over(img, ChannelKind::Scalar, &[], &src, false, None); +} + +#[cfg(test)] +mod tests { + use super::*; + + fn src<'a>(alpha: &'a TileImage, tiles: &'a BTreeSet<(u32, u32)>, opacity: f32, erase: bool) -> CommitSource<'a> { + CommitSource { alpha, tiles, opacity, erase, per_texel: None, carried: None } + } + + fn alpha(v: f32) -> (TileImage, BTreeSet<(u32, u32)>) { + let mut a = TileImage::new(64, 64, 1); + a.set(5, 5, &[to_u16(v)]); + (a, [(0, 0)].into_iter().collect()) + } + + #[test] + fn paint_then_paint_then_erase_is_premultiplied_over() { + let mut px = PixelStore::default(); + let id = LayerId(1); + let vals: BTreeMap = [(Channel::Roughness, [0.8; 3])].into_iter().collect(); + let (a, tiles) = alpha(0.5); + commit_layer(&mut px, id, 64, &vals, src(&a, &tiles, 1.0, false)); + let t = px.layer(id, Channel::Roughness).unwrap().get(5, 5); + assert!((from_u16(t[0]) - 0.4).abs() < 1e-3, "premul v·a"); + assert!((from_u16(t[1]) - 0.5).abs() < 1e-3, "coverage a"); + commit_layer(&mut px, id, 64, &vals, src(&a, &tiles, 1.0, false)); + let t = px.layer(id, Channel::Roughness).unwrap().get(5, 5); + assert!((from_u16(t[1]) - 0.75).abs() < 1e-3); + assert!((from_u16(t[0]) - 0.6).abs() < 1e-3); + commit_layer(&mut px, id, 64, &BTreeMap::new(), src(&a, &tiles, 1.0, true)); + let t = px.layer(id, Channel::Roughness).unwrap().get(5, 5); + assert!((from_u16(t[1]) - 0.375).abs() < 1e-3); + assert!((from_u16(t[0]) - 0.3).abs() < 1e-3); + } + + #[test] + fn signed_height_and_stroke_opacity() { + let mut px = PixelStore::default(); + let id = LayerId(2); + let vals: BTreeMap = [(Channel::Height, [-0.5; 3])].into_iter().collect(); + let (a, tiles) = alpha(1.0); + commit_layer(&mut px, id, 64, &vals, src(&a, &tiles, 0.5, false)); + let t = px.layer(id, Channel::Height).unwrap().get(5, 5); + assert!((from_u16_signed(t[0]) + 0.25).abs() < 1e-3); + assert!((from_u16(t[1]) - 0.5).abs() < 1e-3); + } + + #[test] + fn mask_commit_and_untouched_tiles_stay_shared() { + let mut px = PixelStore::default(); + let (a, tiles) = alpha(1.0); + commit_mask(&mut px, LayerId(9), 64, 1.0, src(&a, &tiles, 1.0, false)); + let before = px.clone(); + commit_mask(&mut px, LayerId(9), 64, 0.0, src(&a, &tiles, 1.0, true)); + assert_eq!(from_u16(before.masks[&LayerId(9)].get(5, 5)[1]), 1.0); + assert_eq!(px.masks[&LayerId(9)].get(5, 5)[1], 0); + } + + #[test] + fn carried_values_replace_the_tool_value_and_coverage_images_work() { + let mut px = PixelStore::default(); + let (a, tiles) = alpha(1.0); + let mut carried = TileImage::new(64, 64, 1); + carried.set(5, 5, &[to_u16(0.25)]); + let carried: BTreeMap = [(Channel::Roughness, carried)].into_iter().collect(); + let vals: BTreeMap = [(Channel::Roughness, [0.8; 3])].into_iter().collect(); + commit_layer(&mut px, LayerId(3), 64, &vals, CommitSource { carried: Some(&carried), ..src(&a, &tiles, 1.0, false) }); + assert!((from_u16(px.layer(LayerId(3), Channel::Roughness).unwrap().get(5, 5)[0]) - 0.25).abs() < 1e-3); + let mut cov = TileImage::new(64, 64, 1); + commit_coverage(&mut cov, src(&a, &tiles, 0.5, false)); + assert!((from_u16(cov.get(5, 5)[0]) - 0.5).abs() < 1e-3); + } +} diff --git a/crates/paint/src/lib.rs b/crates/paint/src/lib.rs new file mode 100644 index 00000000..c6806432 --- /dev/null +++ b/crates/paint/src/lib.rs @@ -0,0 +1,28 @@ +//! # texturecraft-paint +//! +//! The brush engine. A [`Stroke`] turns pointer samples into world-space [`Stamp`]s (picking, +//! lazy mouse, spacing along the surface, jitter, symmetry); [`raster::rasterize`] accumulates +//! them into a texture-space stroke alpha over the UV G-buffer, hiding surfaces the camera can't +//! see ([`EyeDepth`]); [`commit`] blends the finished stroke into layer pixels. Clone and smudge +//! strokes carry channel values ([`pickup`]) instead of painting the tool's material. +//! [`path`] samples the Path tool's curves and lasso coverage; [`particles`] runs the particle +//! brush. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod brush; +pub mod commit; +pub mod particles; +pub mod path; +pub mod pickup; +pub mod raster; +pub mod stroke; +pub mod visibility; + +pub use brush::{Alignment, BrushAlpha, BrushSettings, Particles, Shape, Symmetry, image_alpha}; +pub use commit::{CommitSource, TexelFn, commit_coverage, commit_layer, commit_mask}; +pub use path::{Lasso, spline}; +pub use pickup::{Pickup, PickupMode}; +pub use raster::{RasterCtx, StrokeCanvas, UvStamp, fill_coverage, fill_triangles, rasterize, rasterize_uv}; +pub use stroke::{PickCtx, Stamp, Stroke, SurfaceHit, pick}; +pub use visibility::EyeDepth; diff --git a/crates/paint/src/particles.rs b/crates/paint/src/particles.rs new file mode 100644 index 00000000..556b1c22 --- /dev/null +++ b/crates/paint/src/particles.rs @@ -0,0 +1,101 @@ +//! Particle brush: each stamp emits a few particles that slide down the surface under gravity +//! (world −Y) and fall off overhangs, painting a small dab per simulation step. Deterministic: +//! particles are seeded by the stamp seed. + +use texturecraft_geom::glam::Vec3; +use texturecraft_geom::{Surface, surface_at}; +use texturecraft_texel::noise::pcg3d; + +use crate::brush::Particles; +use crate::stroke::{PickCtx, Stamp}; + +/// Particle dab radius relative to the brush stamp. +const PARTICLE_SIZE: f32 = 0.35; + +/// The surface hit by a ray, if any within `tmax`. +fn cast(ctx: &PickCtx, o: Vec3, d: Vec3, tmax: f32) -> Option { + let hit = ctx.bvh.closest(o, d, tmax)?; + surface_at(ctx.mesh, hit.tri, hit.u, hit.v) +} + +/// Project `p` onto the surface along the normal `n` (within `reach`). +fn snap(ctx: &PickCtx, p: Vec3, n: Vec3, reach: f32) -> Option { + cast(ctx, p + n * reach, -n, reach * 2.0) +} + +/// Particle dabs for one brush stamp. +pub fn emit(ctx: &PickCtx, p: &Particles, s: &Stamp) -> Vec { + let size = s.radius * PARTICLE_SIZE; + let step = size * p.gravity; + let fall = s.radius * 20.0; + let unit = |v: u32| v as f32 / u32::MAX as f32; + let mut out = Vec::new(); + for k in 0..p.count { + let r = pcg3d(s.seed, k, 0xD057); + let (a, d) = (unit(r[0]) * std::f32::consts::TAU, unit(r[1]).sqrt()); + let start = s.center + (s.tangent * a.cos() + s.bitangent * a.sin()) * d * s.radius; + let Some(mut at) = snap(ctx, start, s.normal, s.radius) else { continue }; + for life in 0..p.lifetime { + let tangent = at.nrm.any_orthonormal_vector(); + out.push(Stamp { + center: at.pos, + normal: at.nrm, + tangent, + bitangent: at.nrm.cross(tangent), + radius: size, + flow: s.flow * (1.0 - life as f32 / p.lifetime as f32), + seed: s.seed.wrapping_mul(17).wrapping_add(k), + ..*s + }); + if step <= 0.0 { + break; + } + let slide = Vec3::NEG_Y - at.nrm * at.nrm.dot(Vec3::NEG_Y); + let next = if slide.length() > 0.05 { + // Slide downhill; past an edge the particle drops onto what lies below. + let to = at.pos + slide.normalize() * step; + snap(ctx, to, at.nrm, step).or_else(|| cast(ctx, to + at.nrm * step, Vec3::NEG_Y, fall)) + } else if at.nrm.y < 0.0 { + // Hanging under a ceiling: fall straight down. + cast(ctx, at.pos + at.nrm * step, Vec3::NEG_Y, fall) + } else { + None // resting on flat ground + }; + match next { + Some(h) => at = h, + None => break, + } + } + } + out +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::glam::Vec2; + use texturecraft_geom::{Bvh, OrbitCamera, primitives}; + + #[test] + fn particles_slide_down_a_wall_deterministically() { + // A vertical wall: the plane rotated to face +Z. + let mut m = primitives::plane(2.0, 8); + for p in &mut m.positions { + *p = Vec3::new(p.x, -p.z, 0.0); + } + for n in &mut m.normals { + *n = Vec3::Z; + } + let bvh = Bvh::new(&m); + let cam = OrbitCamera::default(); + let ctx = PickCtx { mesh: &m, bvh: &bvh, camera: &cam, viewport: Vec2::new(100.0, 100.0) }; + let s = Stamp { center: Vec3::ZERO, normal: Vec3::Z, tangent: Vec3::X, bitangent: Vec3::Y, radius: 0.1, flow: 1.0, hardness: 0.5, depth: 1.0, seed: 3 }; + let p = Particles { enabled: true, count: 4, lifetime: 20, gravity: 1.0 }; + let a = emit(&ctx, &p, &s); + assert_eq!(a, emit(&ctx, &p, &s)); + assert_eq!(a.len(), 80); + let lowest = a.iter().map(|d| d.center.y).fold(f32::MAX, f32::min); + assert!(lowest < -0.4, "{lowest}"); + assert!(a.iter().all(|d| d.center.z.abs() < 1e-3)); + } +} diff --git a/crates/paint/src/path.rs b/crates/paint/src/path.rs new file mode 100644 index 00000000..fe483ee0 --- /dev/null +++ b/crates/paint/src/path.rs @@ -0,0 +1,97 @@ +//! Path tool geometry: a smooth curve through control points and the antialiased coverage of +//! a closed curve (lasso fill). Works in any 2D space (screen pixels or texels). + +use texturecraft_geom::glam::Vec2; + +/// Most samples per curve segment. +const MAX_SEGMENT_SAMPLES: f32 = 1024.0; + +/// A Catmull-Rom spline through `points`, sampled about every `step` units. Closed curves wrap +/// back to the first point; the result starts at the first point. +pub fn spline(points: &[Vec2], closed: bool, step: f32) -> Vec { + let n = points.len(); + if n < 2 { + return points.to_vec(); + } + let at = |i: isize| { + let i = if closed { i.rem_euclid(n as isize) } else { i.clamp(0, n as isize - 1) }; + points.get(i as usize).copied().unwrap_or_default() + }; + let step = if step.is_finite() && step > 1e-6 { step } else { 1.0 }; + let segments = if closed { n } else { n - 1 } as isize; + let mut out = vec![at(0)]; + for s in 0..segments { + let (p0, p1, p2, p3) = (at(s - 1), at(s), at(s + 1), at(s + 2)); + let k = ((p2 - p1).length() / step).ceil().clamp(1.0, MAX_SEGMENT_SAMPLES) as usize; + for j in 1..=k { + let t = j as f32 / k as f32; + let (t2, t3) = (t * t, t * t * t); + out.push(0.5 * (2.0 * p1 + (p2 - p0) * t + (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3) * t2 + (3.0 * p1 - p0 - 3.0 * p2 + p3) * t3)); + } + } + out +} + +/// A closed polygon's coverage: 1 inside, 0 outside, a one-unit ramp across the edge. +#[derive(Clone, Debug)] +pub struct Lasso { + poly: Vec, + lo: Vec2, + hi: Vec2, +} + +impl Lasso { + /// Fewer than three finite points cover nothing. + pub fn new(poly: Vec) -> Lasso { + let poly: Vec = if poly.len() >= 3 && poly.iter().all(|p| p.is_finite()) { poly } else { Vec::new() }; + let lo = poly.iter().fold(Vec2::splat(f32::MAX), |a, p| a.min(*p)) - 1.0; + let hi = poly.iter().fold(Vec2::splat(f32::MIN), |a, p| a.max(*p)) + 1.0; + Lasso { poly, lo, hi } + } + + pub fn coverage(&self, p: Vec2) -> f32 { + if !(p.x >= self.lo.x && p.y >= self.lo.y && p.x <= self.hi.x && p.y <= self.hi.y) { + return 0.0; + } + let mut inside = false; + let mut d2 = f32::MAX; + for (a, b) in self.poly.iter().zip(self.poly.iter().cycle().skip(1)) { + if (a.y > p.y) != (b.y > p.y) && p.x < (b.x - a.x) * (p.y - a.y) / (b.y - a.y) + a.x { + inside = !inside; + } + let e = *b - *a; + let t = ((p - *a).dot(e) / e.length_squared().max(1e-12)).clamp(0.0, 1.0); + d2 = d2.min((*a + e * t).distance_squared(p)); + } + let d = d2.sqrt(); + (if inside { 0.5 + d } else { 0.5 - d }).clamp(0.0, 1.0) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn spline_passes_through_the_points() { + let pts = [Vec2::new(0.0, 0.0), Vec2::new(10.0, 5.0), Vec2::new(20.0, 0.0)]; + let c = spline(&pts, false, 1.0); + for p in pts { + assert!(c.iter().any(|q| q.distance(p) < 1e-4), "{p}"); + } + assert_eq!(c.last().copied(), Some(pts[2])); + let closed = spline(&pts, true, 1.0); + assert!(closed.last().is_some_and(|q| q.distance(pts[0]) < 1e-4)); + assert!(closed.len() > c.len()); + assert_eq!(spline(&pts[..1], false, f32::NAN), vec![pts[0]]); + } + + #[test] + fn lasso_covers_the_inside_with_a_soft_edge() { + let sq = Lasso::new(vec![Vec2::new(0.0, 0.0), Vec2::new(10.0, 0.0), Vec2::new(10.0, 10.0), Vec2::new(0.0, 10.0)]); + assert_eq!(sq.coverage(Vec2::new(5.0, 5.0)), 1.0); + assert_eq!(sq.coverage(Vec2::new(12.0, 5.0)), 0.0); + assert!((sq.coverage(Vec2::new(10.0, 5.0)) - 0.5).abs() < 1e-4); + assert_eq!(Lasso::new(vec![Vec2::ZERO, Vec2::ONE]).coverage(Vec2::ZERO), 0.0); + } +} diff --git a/crates/paint/src/pickup.rs b/crates/paint/src/pickup.rs new file mode 100644 index 00000000..40ff8f88 --- /dev/null +++ b/crates/paint/src/pickup.rs @@ -0,0 +1,193 @@ +//! Clone and smudge: strokes that carry channel values picked up from the texture set instead of +//! painting the tool's material. The carried values are kept straight (not premultiplied) per +//! channel next to the stroke alpha, so the live preview and the commit read them directly. + +use std::collections::BTreeMap; +use std::sync::Arc; + +use texturecraft_compose::Composite; +use texturecraft_core::Channel; +use texturecraft_geom::{NO_TRI, UvGBuffer}; +use texturecraft_texel::{TileImage, from_u16, to_u16}; + +use crate::commit::{dec, enc}; + +/// How a pickup stroke finds the values it deposits. +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum PickupMode { + /// Copy the values `offset` texels away (source = destination + offset). + Clone { offset: [i64; 2] }, + /// Drag values along the stroke: each stamp deposits what lay under the previous stamp, + /// blended by `strength` (0..1). + Smudge { strength: f32 }, +} + +/// The values a clone or smudge stroke carries. +#[derive(Clone, Debug)] +pub struct Pickup { + pub mode: PickupMode, + /// The composite when the stroke began (what the stroke reads). + source: Composite, + /// Texels outside the texture set's UV islands are never read. + gbuf: Arc, + /// Straight values per painted channel; the stroke alpha lives in the stroke canvas. + pub values: BTreeMap, + /// Previous smudge stamp center (texels). + prev: Option<[f32; 2]>, + /// Per-stamp scratch: texels that receive values, and the values read for them. + reads: Vec<(u32, u32, f32)>, + read_values: Vec<[f32; 3]>, +} + +fn get(img: &TileImage, c: Channel, x: u32, y: u32) -> [f32; 3] { + let raw = img.get(x, y).map(|v| dec(c.kind(), v)); + if c.components() == 3 { [raw[0], raw[1], raw[2]] } else { [raw[0]; 3] } +} + +fn put(img: &mut TileImage, c: Channel, x: u32, y: u32, v: [f32; 3]) { + img.set(x, y, &v.map(|x| enc(c.kind(), x))[..c.components().min(3)]); +} + +impl Pickup { + /// A pickup reading `source` (whose resolution is the stroke's) for `channels`. + pub fn new(mode: PickupMode, source: Composite, gbuf: Arc, channels: impl IntoIterator) -> Pickup { + let res = source.resolution; + let values = channels.into_iter().map(|c| (c, TileImage::new(res, res, c.components()))).collect(); + Pickup { mode, source, gbuf, values, prev: None, reads: Vec::new(), read_values: Vec::new() } + } + + fn covered(&self, x: u32, y: u32) -> bool { + let i = y as usize * self.gbuf.width as usize + x as usize; + x < self.gbuf.width && self.gbuf.tri.get(i).is_some_and(|t| *t != NO_TRI) + } + + /// Blend one stamp's texels `(x, y, alpha)` (stamp center `center` in texels) into the + /// stroke `alpha` and the carried values. False when nothing was deposited: the first smudge + /// stamp only picks up. + pub fn stamp(&mut self, alpha: &mut TileImage, texels: &[(u32, u32, f32)], center: [f32; 2]) -> bool { + if texels.is_empty() { + return false; + } + let (shift, strength, smudge) = match self.mode { + PickupMode::Clone { offset } => (offset, 1.0, false), + PickupMode::Smudge { strength } => { + let Some(prev) = self.prev.replace(center) else { return false }; + let d = [center[0] - prev[0], center[1] - prev[1]]; + // A jump (UV seam, lifted cursor) has nothing to drag along. + if d[0].hypot(d[1]) > extent(texels) { + return false; + } + // shortcut: nearest-texel pickup; bilinear would smooth sub-texel stamp spacing. + ([-(d[0].round() as i64), -(d[1].round() as i64)], strength.clamp(0.0, 1.0), true) + } + }; + let res = i64::from(self.source.resolution); + self.reads.clear(); + self.read_values.clear(); + for &(x, y, a) in texels { + let a = a * strength; + let (sx, sy) = (i64::from(x) + shift[0], i64::from(y) + shift[1]); + if !(a > 0.0 && (0..res).contains(&sx) && (0..res).contains(&sy) && self.covered(sx as u32, sy as u32)) { + continue; + } + let (sx, sy) = (sx as u32, sy as u32); + // Smudge reads what the stroke shows so far: carried values over the source. + let m = if smudge { from_u16(alpha.get(sx, sy)[0]) } else { 0.0 }; + for (c, img) in &self.values { + let base = self.source.value(*c, sx, sy); + let v = if m > 0.0 { + let carried = get(img, *c, sx, sy); + std::array::from_fn(|k| carried[k] * m + base[k] * (1.0 - m)) + } else { + base + }; + self.read_values.push(v); + } + self.reads.push((x, y, a)); + } + let n = self.values.len(); + for (i, &(x, y, a)) in self.reads.iter().enumerate() { + let m = from_u16(alpha.get(x, y)[0]); + let m2 = a + m * (1.0 - a); + for (k, (c, img)) in self.values.iter_mut().enumerate() { + let Some(src) = self.read_values.get(i * n + k) else { continue }; + let old = get(img, *c, x, y); + put(img, *c, x, y, std::array::from_fn(|j| (src[j] * a + old[j] * m * (1.0 - a)) / m2.max(1e-6))); + } + alpha.set(x, y, &[to_u16(m2)]); + } + !self.reads.is_empty() + } +} + +/// Largest side of a stamp's texel bounding box. +fn extent(texels: &[(u32, u32, f32)]) -> f32 { + let (mut lo, mut hi) = ([u32::MAX; 2], [0u32; 2]); + for &(x, y, _) in texels { + lo = [lo[0].min(x), lo[1].min(y)]; + hi = [hi[0].max(x), hi[1].max(y)]; + } + hi[0].saturating_sub(lo[0]).max(hi[1].saturating_sub(lo[1])) as f32 + 1.0 +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::primitives; + use texturecraft_texel::{TILE, to_u16}; + + /// A 64² plane (fully covered) whose roughness is `f(x)`. + fn setup(f: impl Fn(u32) -> f32) -> (Composite, Arc) { + let m = primitives::plane(2.0, 4); + let g = Arc::new(UvGBuffer::new(&m, 0, TILE, TILE)); + let mut c = Composite::new(&[Channel::Roughness], TILE); + if let Some(img) = c.channels.get_mut(&Channel::Roughness) { + for y in 0..TILE { + for x in 0..TILE { + img.set(x, y, &[to_u16(f(x))]); + } + } + } + (c, g) + } + + fn disc(cx: u32, cy: u32, r: u32) -> Vec<(u32, u32, f32)> { + let mut v = Vec::new(); + for y in cy - r..=cy + r { + for x in cx - r..=cx + r { + if (x.abs_diff(cx).pow(2) + y.abs_diff(cy).pow(2)) <= r * r { + v.push((x, y, 1.0)); + } + } + } + v + } + + #[test] + fn clone_copies_values_from_the_offset() { + let (c, g) = setup(|x| if x < 32 { 0.9 } else { 0.1 }); + let mut p = Pickup::new(PickupMode::Clone { offset: [-30, 0] }, c, g, [Channel::Roughness]); + let mut alpha = TileImage::new(TILE, TILE, 1); + assert!(p.stamp(&mut alpha, &disc(45, 32, 4), [45.0, 32.0])); + let v = get(&p.values[&Channel::Roughness], Channel::Roughness, 45, 32); + assert!((v[0] - 0.9).abs() < 1e-3, "{v:?}"); + assert!(from_u16(alpha.get(45, 32)[0]) > 0.99); + // Sources outside the image are skipped. + assert!(!p.stamp(&mut alpha, &disc(5, 5, 2), [5.0, 5.0])); + } + + #[test] + fn smudge_drags_values_along_the_stroke() { + let (c, g) = setup(|x| if x < 20 { 1.0 } else { 0.0 }); + let mut p = Pickup::new(PickupMode::Smudge { strength: 1.0 }, c, g, [Channel::Roughness]); + let mut alpha = TileImage::new(TILE, TILE, 1); + assert!(!p.stamp(&mut alpha, &disc(18, 32, 5), [18.0, 32.0]), "the first stamp only picks up"); + for cx in 20..30 { + p.stamp(&mut alpha, &disc(cx, 32, 5), [cx as f32, 32.0]); + } + let v = get(&p.values[&Channel::Roughness], Channel::Roughness, 30, 32)[0]; + assert!(v > 0.5 && from_u16(alpha.get(30, 32)[0]) > 0.99, "white dragged to the right: {v}"); + // A jump larger than the stamp deposits nothing. + assert!(!p.stamp(&mut alpha, &disc(50, 10, 3), [50.0, 10.0])); + } +} diff --git a/crates/paint/src/raster.rs b/crates/paint/src/raster.rs new file mode 100644 index 00000000..a5fbce82 --- /dev/null +++ b/crates/paint/src/raster.rs @@ -0,0 +1,291 @@ +//! Stamps → stroke alpha in texture space. Every texel whose surface point lies inside a +//! stamp's oriented volume receives paint, so UV seams are seamless by construction. + +use std::collections::BTreeSet; + +use rayon::prelude::*; + +use texturecraft_geom::glam::Vec3; +use texturecraft_geom::{Bvh, Mesh, NO_TRI, UvGBuffer}; +use texturecraft_texel::{TILE, TileImage, from_u16, to_u16}; + +use crate::brush::Shape; +use crate::pickup::Pickup; +use crate::stroke::Stamp; +use crate::visibility::EyeDepth; + +/// The stroke alpha being accumulated for one texture set. +#[derive(Clone, Debug)] +pub struct StrokeCanvas { + pub alpha: TileImage, + /// Every tile the stroke touched. + pub dirty: BTreeSet<(u32, u32)>, + /// Tiles touched since the caller last cleared this set (incremental preview updates). + pub recent: BTreeSet<(u32, u32)>, + /// Quick mask: paint only where this coverage image (1 component) is set; inverted when + /// the flag is true. + pub limit: Option<(TileImage, bool)>, + /// Clone and smudge: the channel values the stroke carries. + pub pickup: Option, + /// The stamp being added: `(x, y, alpha)` per texel (reused between stamps). + texels: Vec<(u32, u32, f32)>, +} + +impl StrokeCanvas { + pub fn new(resolution: u32) -> StrokeCanvas { + StrokeCanvas { + alpha: TileImage::new(resolution, resolution, 1), + dirty: BTreeSet::new(), + recent: BTreeSet::new(), + limit: None, + pickup: None, + texels: Vec::new(), + } + } + + fn touch(&mut self, x: u32, y: u32) { + let t = (x / TILE, y / TILE); + self.dirty.insert(t); + self.recent.insert(t); + } + + /// Blend the gathered stamp texels (stamp center `center` in texels) into the stroke: the + /// quick mask scales them, then the pickup deposits its values or the alpha accumulates + /// ("over": `m = a + m·(1 − a)`). + fn add_stamp(&mut self, center: [f32; 2]) { + let mut texels = std::mem::take(&mut self.texels); + if let Some((mask, invert)) = &self.limit { + for t in &mut texels { + let m = from_u16(mask.get(t.0, t.1)[0]); + t.2 *= if *invert { 1.0 - m } else { m }; + } + } + let painted = match &mut self.pickup { + Some(p) => p.stamp(&mut self.alpha, &texels, center), + None => { + for &(x, y, a) in &texels { + let m = from_u16(self.alpha.get(x, y)[0]); + self.alpha.set(x, y, &[to_u16(a + m * (1.0 - a))]); + } + true + } + }; + if painted { + for &(x, y, a) in &texels { + if a > 0.0 { + self.touch(x, y); + } + } + } + texels.clear(); + self.texels = texels; + } +} + +/// What the rasterizer reads. +pub struct RasterCtx<'a> { + pub mesh: &'a Mesh, + pub bvh: &'a Bvh, + pub gbuf: &'a UvGBuffer, + pub material: usize, + /// Camera visibility (None paints hidden surfaces too, e.g. for scripted strokes). + pub depth: Option<&'a EyeDepth>, + pub eye: Vec3, + pub backface_culling: bool, + /// Angle fade from/to in degrees. + pub angle_fade: (f32, f32), + pub shape: Shape<'a>, +} + +fn smoothstep(e0: f32, e1: f32, x: f32) -> f32 { + let t = ((x - e0) / (e1 - e0).max(1e-6)).clamp(0.0, 1.0); + t * t * (3.0 - 2.0 * t) +} + +/// Accumulate `stamps` into `canvas` ("over": `m = a + m·(1 − a)`). +pub fn rasterize(canvas: &mut StrokeCanvas, ctx: &RasterCtx, stamps: &[Stamp]) { + let (w, h) = (ctx.gbuf.width, ctx.gbuf.height); + if canvas.alpha.width() != w { + *canvas = StrokeCanvas::new(w); + } + let fade_lo = ctx.angle_fade.1.to_radians().cos(); + let fade_hi = ctx.angle_fade.0.to_radians().cos(); + let mut tris = Vec::new(); + for s in stamps { + if s.radius.is_nan() || s.radius <= 0.0 || !s.center.is_finite() { + continue; + } + let ext = Vec3::splat(s.radius * s.depth.max(1.0) * 1.42); + // The stamp center in texels: the footprint texel nearest to it on the surface. + let mut center = ([0.0f32; 2], f32::MAX); + tris.clear(); + ctx.bvh.query_box(s.center - ext, s.center + ext, |t| tris.push(t)); + for &t in &tris { + if ctx.mesh.material_of(t as usize) != Some(ctx.material) { + continue; + } + let Some([a, b, c]) = ctx.mesh.tri(t as usize) else { continue }; + let (Some(ua), Some(ub), Some(uc)) = (ctx.mesh.uvs.get(a), ctx.mesh.uvs.get(b), ctx.mesh.uvs.get(c)) else { continue }; + let (Some(pa), Some(pb), Some(pc)) = (ctx.mesh.positions.get(a), ctx.mesh.positions.get(b), ctx.mesh.positions.get(c)) else { continue }; + let (Some(na), Some(nb), Some(nc)) = (ctx.mesh.normals.get(a), ctx.mesh.normals.get(b), ctx.mesh.normals.get(c)) else { continue }; + let x0 = (ua.x.min(ub.x).min(uc.x) * w as f32).floor().max(0.0) as u32; + let x1 = ((ua.x.max(ub.x).max(uc.x) * w as f32).ceil().max(0.0) as u32).min(w); + let y0 = (ua.y.min(ub.y).min(uc.y) * h as f32).floor().max(0.0) as u32; + let y1 = ((ua.y.max(ub.y).max(uc.y) * h as f32).ceil().max(0.0) as u32).min(h); + for y in y0..y1 { + for x in x0..x1 { + let i = (y * w + x) as usize; + if ctx.gbuf.tri.get(i).copied().unwrap_or(NO_TRI) != t { + continue; + } + let Some([b1, b2]) = ctx.gbuf.bary.get(i).copied() else { continue }; + let b0 = 1.0 - b1 - b2; + let p = *pa * b0 + *pb * b1 + *pc * b2; + let d = p - s.center; + let lx = d.dot(s.tangent) / s.radius; + let ly = d.dot(s.bitangent) / s.radius; + if lx * lx + ly * ly > 2.0 { + continue; + } + if d.dot(s.normal).abs() > s.radius * s.depth { + continue; + } + let dist = d.length_squared(); + if dist < center.1 { + center = ([x as f32 + 0.5, y as f32 + 0.5], dist); + } + let n = (*na * b0 + *nb * b1 + *nc * b2).try_normalize().unwrap_or(s.normal); + let to_eye = (ctx.eye - p).try_normalize().unwrap_or(n); + let facing = n.dot(to_eye); + if ctx.backface_culling && facing <= 0.0 { + continue; + } + if n.dot(s.normal) <= 0.0 { + continue; + } + if let Some(depth) = ctx.depth + && !depth.visible(p) + { + continue; + } + let fade = if ctx.backface_culling { smoothstep(fade_lo, fade_hi, facing) } else { 1.0 }; + let a = ctx.shape.sample(lx, ly, s.hardness, s.seed) * s.flow * fade; + if a > 0.0 { + canvas.texels.push((x, y, a)); + } + } + } + } + canvas.add_stamp(center.0); + } +} + +/// Stroke alpha covering whole triangles (polygon fill): every texel of `tris` gets alpha 1. +pub fn fill_triangles(canvas: &mut StrokeCanvas, gbuf: &UvGBuffer, tris: &BTreeSet) { + fill_coverage(canvas, gbuf, |_, t| if tris.contains(&t) { 1.0 } else { 0.0 }); +} + +/// One-shot fill of the texture set's texels: `coverage(texel index, triangle)` gives each +/// covered texel's alpha (lasso and polygon fills). +pub fn fill_coverage(canvas: &mut StrokeCanvas, gbuf: &UvGBuffer, coverage: impl Fn(usize, u32) -> f32 + Sync) { + let w = gbuf.width.max(1); + if canvas.alpha.width() != gbuf.width { + *canvas = StrokeCanvas::new(gbuf.width); + } + canvas.texels = gbuf + .tri + .par_iter() + .enumerate() + .filter(|(_, t)| **t != NO_TRI) + .filter_map(|(i, t)| { + let a = coverage(i, *t).min(1.0); + (a > 0.0).then_some(((i as u32) % w, (i as u32) / w, a)) + }) + .collect(); + canvas.add_stamp([0.0; 2]); +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::primitives; + + #[test] + fn one_stamp_on_a_plane_paints_a_disc() { + let m = primitives::plane(2.0, 8); + let bvh = Bvh::new(&m); + let g = UvGBuffer::new(&m, 0, 128, 128); + let mut canvas = StrokeCanvas::new(128); + let ctx = RasterCtx { + mesh: &m, + bvh: &bvh, + gbuf: &g, + material: 0, + depth: None, + eye: Vec3::new(0.0, 5.0, 0.0), + backface_culling: true, + angle_fade: (70.0, 85.0), + shape: Shape { alpha: crate::BrushAlpha::Round, image: None }, + }; + let st = + Stamp { center: Vec3::ZERO, normal: Vec3::Y, tangent: Vec3::X, bitangent: Vec3::Z, radius: 0.25, flow: 1.0, hardness: 0.9, depth: 1.0, seed: 0 }; + rasterize(&mut canvas, &ctx, &[st]); + // Plane is 2 units over 128 texels: radius 0.25 = 16 texels around the center (64, 64). + let at = |x: u32, y: u32| from_u16(canvas.alpha.get(x, y)[0]); + assert!(at(64, 64) > 0.99); + assert!(at(64 + 12, 64) > 0.9); + assert!(at(64 + 20, 64) < 0.01); + assert!(!canvas.dirty.is_empty()); + + // From below (backface), nothing is painted. + let mut c2 = StrokeCanvas::new(128); + let below = RasterCtx { eye: Vec3::new(0.0, -5.0, 0.0), ..ctx }; + rasterize(&mut c2, &below, &[st]); + assert!(c2.dirty.is_empty()); + } +} + +/// A dab in texture space (2D view painting): center and radius in UV units. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct UvStamp { + pub center: texturecraft_geom::glam::Vec2, + pub radius: f32, + pub angle: f32, + pub flow: f32, + pub hardness: f32, + pub seed: u32, +} + +/// Accumulate UV-space stamps into `canvas` (only texels covered by the texture set). +pub fn rasterize_uv(canvas: &mut StrokeCanvas, gbuf: &UvGBuffer, shape: Shape, stamps: &[UvStamp]) { + let (w, h) = (gbuf.width, gbuf.height); + if canvas.alpha.width() != w { + *canvas = StrokeCanvas::new(w); + } + for s in stamps { + if s.radius.is_nan() || s.radius <= 0.0 || !s.center.is_finite() { + continue; + } + let (cx, cy, r) = (s.center.x * w as f32, s.center.y * h as f32, s.radius * w as f32); + let x0 = (cx - r * 1.42).floor().max(0.0) as u32; + let x1 = ((cx + r * 1.42).ceil().max(0.0) as u32).min(w); + let y0 = (cy - r * 1.42).floor().max(0.0) as u32; + let y1 = ((cy + r * 1.42).ceil().max(0.0) as u32).min(h); + let (sn, cs) = s.angle.to_radians().sin_cos(); + for y in y0..y1 { + for x in x0..x1 { + if gbuf.tri.get((y * w + x) as usize).copied().unwrap_or(NO_TRI) == NO_TRI { + continue; + } + // Local frame with y up on screen (texel rows grow downward), as in the 3D view. + let (dx, dy) = ((x as f32 + 0.5 - cx) / r, (cy - y as f32 - 0.5) / r); + let (lx, ly) = (dx * cs + dy * sn, -dx * sn + dy * cs); + let a = shape.sample(lx, ly, s.hardness, s.seed) * s.flow; + if a > 0.0 { + canvas.texels.push((x, y, a)); + } + } + } + canvas.add_stamp([cx, cy]); + } +} diff --git a/crates/paint/src/stroke.rs b/crates/paint/src/stroke.rs new file mode 100644 index 00000000..471d43e2 --- /dev/null +++ b/crates/paint/src/stroke.rs @@ -0,0 +1,277 @@ +//! From pointer samples to stamps: picking, lazy mouse, spacing along the surface, stamp +//! frames, jitter and symmetry. + +use texturecraft_geom::glam::{Quat, Vec2, Vec3}; +use texturecraft_geom::{Bvh, Mesh, OrbitCamera, surface_at}; +use texturecraft_texel::noise::pcg3d; + +use crate::brush::{Alignment, BrushSettings}; + +/// Scene access for picking. +pub struct PickCtx<'a> { + pub mesh: &'a Mesh, + pub bvh: &'a Bvh, + pub camera: &'a OrbitCamera, + /// Viewport size in pixels. + pub viewport: Vec2, +} + +/// A point on the mesh under the cursor. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct SurfaceHit { + pub pos: Vec3, + pub nrm: Vec3, + pub tri: u32, + pub uv: Vec2, + pub material: usize, + pub screen: Vec2, +} + +/// Pick the mesh at a viewport pixel (origin top-left). +pub fn pick(ctx: &PickCtx, screen: Vec2) -> Option { + let vp = ctx.viewport.max(Vec2::ONE); + let ndc = Vec2::new(screen.x / vp.x * 2.0 - 1.0, 1.0 - screen.y / vp.y * 2.0); + let ray = ctx.camera.ray(ndc, vp.x / vp.y); + let hit = ctx.bvh.closest(ray.origin, ray.dir, f32::MAX)?; + let s = surface_at(ctx.mesh, hit.tri, hit.u, hit.v)?; + Some(SurfaceHit { pos: s.pos, nrm: s.nrm, tri: hit.tri, uv: s.uv, material: ctx.mesh.material_of(hit.tri as usize).unwrap_or(0), screen }) +} + +/// One brush dab in world space. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Stamp { + pub center: Vec3, + pub normal: Vec3, + pub tangent: Vec3, + pub bitangent: Vec3, + pub radius: f32, + pub flow: f32, + pub hardness: f32, + /// Half-depth of the stamp volume relative to the radius. + pub depth: f32, + /// Varies procedural alphas per stamp. + pub seed: u32, +} + +/// An in-progress stroke. +#[derive(Clone, Debug)] +pub struct Stroke { + pub settings: BrushSettings, + /// Brush radius in world units at full pressure. + pub radius: f32, + center: Vec3, + last: Option, + dist: f32, + lazy: Option, + count: u32, + last_dir: Option, + /// Every stamp emitted so far (for replay, inspect and tests). + pub stamps: Vec, +} + +fn rand01(n: u32, k: u32) -> f32 { + pcg3d(n, k, 0x5EED)[0] as f32 / u32::MAX as f32 +} + +impl Stroke { + pub fn new(settings: &BrushSettings, mesh: &Mesh) -> Stroke { + let s = settings.sanitized(); + let (lo, hi) = mesh.bounds(); + let diag = (hi - lo).length().max(1e-4); + Stroke { radius: s.size * diag, settings: s, center: (lo + hi) * 0.5, last: None, dist: 0.0, lazy: None, count: 0, last_dir: None, stamps: Vec::new() } + } + + /// Feed a pointer position (pixels) with pen pressure (1 for a mouse). Returns new stamps. + pub fn add(&mut self, ctx: &PickCtx, screen: Vec2, pressure: f32) -> Vec { + let mut p = screen; + if self.settings.lazy > 0.0 { + let l = *self.lazy.get_or_insert(screen); + let d = screen - l; + let len = d.length(); + let nl = if len > self.settings.lazy { l + d * (1.0 - self.settings.lazy / len) } else { l }; + self.lazy = Some(nl); + if self.last.is_some() && nl == l { + return Vec::new(); + } + p = nl; + } + let mut out = Vec::new(); + self.feed(ctx, p, pressure, 0, &mut out); + if self.settings.particles.enabled { + out = out.iter().flat_map(|s| crate::particles::emit(ctx, &self.settings.particles, s)).collect(); + } + let mut all = Vec::with_capacity(out.len() * 2); + for s in out { + all.push(s); + all.extend(self.mirrors(&s)); + } + self.stamps.extend_from_slice(&all); + all + } + + fn radius_at(&self, ctx: &PickCtx, pos: Vec3, pressure: f32) -> f32 { + let p = pressure.clamp(0.0, 1.0); + let scale = self.settings.min_size + (1.0 - self.settings.min_size) * p; + let r = self.radius * if pressure < 1.0 { scale } else { 1.0 }; + if self.settings.screen_space { r * (pos.distance(ctx.camera.eye()) / ctx.camera.distance.max(1e-4)) } else { r } + } + + fn feed(&mut self, ctx: &PickCtx, screen: Vec2, pressure: f32, depth: u32, out: &mut Vec) { + let Some(hit) = pick(ctx, screen) else { + self.last = None; + return; + }; + let radius = self.radius_at(ctx, hit.pos, pressure); + let Some(last) = self.last else { + out.push(self.stamp(ctx, &hit, radius)); + self.last = Some(hit); + self.dist = 0.0; + return; + }; + let seg = hit.pos - last.pos; + let len = seg.length(); + if len < 1e-9 { + return; + } + let step = (self.settings.spacing * 2.0 * radius).max(1e-6); + if len > 4.0 * radius && depth < 4 { + // Jumped across a silhouette or gap: resample in screen space, never through air. + let n = ((len / radius).ceil() as u32).clamp(2, 64); + let a = last.screen; + for k in 1..=n { + let s = a + (screen - a) * (k as f32 / n as f32); + self.feed(ctx, s, pressure, depth + 1, out); + } + return; + } + self.last_dir = Some(seg / len); + let mut t = step - self.dist; + let mut emitted = 0; + while t <= len && emitted < 4096 { + let p = last.pos + seg * (t / len); + // Snap to the surface by re-picking through the projected point. + let aspect = ctx.viewport.x.max(1.0) / ctx.viewport.y.max(1.0); + let snapped = ctx + .camera + .project(p, aspect) + .map(|ndc| Vec2::new((ndc.x * 0.5 + 0.5) * ctx.viewport.x, (0.5 - ndc.y * 0.5) * ctx.viewport.y)) + .and_then(|s| pick(ctx, s)) + .filter(|h| h.pos.distance(p) < radius * 2.0); + let h = snapped.unwrap_or(SurfaceHit { pos: p, ..hit }); + out.push(self.stamp(ctx, &h, radius)); + emitted += 1; + t += step; + } + self.dist = len - (t - step); + self.last = Some(hit); + } + + fn stamp(&mut self, ctx: &PickCtx, hit: &SurfaceHit, radius: f32) -> Stamp { + let s = &self.settings; + let n = self.count; + self.count = self.count.wrapping_add(1); + let jitter = |k: u32, amount: f32| if amount > 0.0 { (rand01(n, k) * 2.0 - 1.0) * amount } else { 0.0 }; + let normal = match s.alignment { + Alignment::Tangent => hit.nrm, + Alignment::Camera => -ctx.camera.forward(), + }; + let cam_up = { + let f = ctx.camera.forward(); + let right = f.cross(Vec3::Y).try_normalize().unwrap_or(Vec3::X); + right.cross(f) + }; + let up_src = if s.follow_path { self.last_dir.unwrap_or(cam_up) } else { cam_up }; + let up = (up_src - normal * normal.dot(up_src)).try_normalize().unwrap_or_else(|| normal.any_orthonormal_vector()); + let tangent0 = up.cross(normal).try_normalize().unwrap_or_else(|| normal.any_orthonormal_vector()); + let angle = (s.angle + jitter(1, s.jitter_angle) * 180.0).to_radians(); + let q = Quat::from_axis_angle(normal, angle); + let tangent = q * tangent0; + let bitangent = normal.cross(tangent); + let r = radius * (1.0 + jitter(2, s.jitter_size)).max(0.05); + let offset = (tangent * jitter(3, 1.0) + bitangent * jitter(4, 1.0)) * s.jitter_position * radius; + let flow = (s.flow * (1.0 - jitter(5, s.jitter_flow).abs())).clamp(0.0, 1.0); + Stamp { center: hit.pos + offset, normal, tangent, bitangent, radius: r, flow, hardness: s.hardness, depth: s.depth, seed: n } + } + + /// Mirror copies of a stamp for the enabled symmetry axes. + fn mirrors(&self, s: &Stamp) -> Vec { + let sym = self.settings.symmetry; + if !sym.any() { + return Vec::new(); + } + let mut out = Vec::new(); + for mask in 1u8..8 { + let (mx, my, mz) = (mask & 1 != 0, mask & 2 != 0, mask & 4 != 0); + if (mx && !sym.x) || (my && !sym.y) || (mz && !sym.z) { + continue; + } + let f = Vec3::new(if mx { -1.0 } else { 1.0 }, if my { -1.0 } else { 1.0 }, if mz { -1.0 } else { 1.0 }); + let m = |v: Vec3| v * f; + let normal = m(s.normal); + let tangent = m(s.tangent); + out.push(Stamp { center: self.center + m(s.center - self.center), normal, tangent, bitangent: normal.cross(tangent), ..*s }); + } + out + } + + pub fn last_hit(&self) -> Option { + self.last + } +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::primitives; + + fn ctx_parts() -> (Mesh, Bvh, OrbitCamera) { + let m = primitives::sphere(1.0, 64, 32); + let b = Bvh::new(&m); + let mut c = OrbitCamera::default(); + c.pitch = 0.0; + c.frame(Vec3::splat(-1.0), Vec3::splat(1.0)); + (m, b, c) + } + + #[test] + fn spacing_controls_stamp_count() { + let (m, b, c) = ctx_parts(); + let ctx = PickCtx { mesh: &m, bvh: &b, camera: &c, viewport: Vec2::new(400.0, 400.0) }; + let count = |spacing: f32| { + let mut s = Stroke::new(&BrushSettings { spacing, ..BrushSettings::default() }, &m); + let mut n = 0; + for i in 0..=40 { + n += s.add(&ctx, Vec2::new(150.0 + i as f32 * 2.5, 200.0), 1.0).len(); + } + n + }; + let dense = count(0.05); + let sparse = count(0.5); + assert!(dense > sparse * 5, "{dense} vs {sparse}"); + assert!(sparse >= 2); + } + + #[test] + fn misses_produce_nothing_and_stamps_lie_on_the_surface() { + let (m, b, c) = ctx_parts(); + let ctx = PickCtx { mesh: &m, bvh: &b, camera: &c, viewport: Vec2::new(400.0, 400.0) }; + let mut s = Stroke::new(&BrushSettings::default(), &m); + assert!(s.add(&ctx, Vec2::new(2.0, 2.0), 1.0).is_empty()); + let st = s.add(&ctx, Vec2::new(200.0, 200.0), 1.0); + assert_eq!(st.len(), 1); + assert!((st[0].center.length() - 1.0).abs() < 0.01); + assert!((st[0].tangent.dot(st[0].normal)).abs() < 1e-4); + } + + #[test] + fn symmetry_mirrors_stamps() { + let (m, b, c) = ctx_parts(); + let ctx = PickCtx { mesh: &m, bvh: &b, camera: &c, viewport: Vec2::new(400.0, 400.0) }; + let mut st = BrushSettings::default(); + st.symmetry.x = true; + let mut s = Stroke::new(&st, &m); + let out = s.add(&ctx, Vec2::new(250.0, 200.0), 1.0); + assert_eq!(out.len(), 2); + assert!((out[0].center.x + out[1].center.x).abs() < 1e-4); + } +} diff --git a/crates/paint/src/visibility.rs b/crates/paint/src/visibility.rs new file mode 100644 index 00000000..01ce84f8 --- /dev/null +++ b/crates/paint/src/visibility.rs @@ -0,0 +1,135 @@ +//! Which surface points the paint camera can see: a software-rasterized eye-distance buffer, +//! rendered once at the start of a stroke. + +use rayon::prelude::*; +use texturecraft_geom::glam::{Mat4, Vec3, Vec4}; +use texturecraft_geom::{Mesh, OrbitCamera}; + +const BAND: usize = 16; + +/// Distance from the eye to the nearest surface per screen pixel (f32::MAX where empty). +#[derive(Clone, Debug)] +pub struct EyeDepth { + pub width: u32, + pub height: u32, + pub view_proj: Mat4, + pub eye: Vec3, + pub dist: Vec, + /// Tolerance in world units (≈ 0.4% of the scene radius). + pub bias: f32, +} + +impl EyeDepth { + /// Rasterize `mesh` seen by `camera` into a `width × height` buffer (sizes capped at 4096). + pub fn render(mesh: &Mesh, camera: &OrbitCamera, width: u32, height: u32) -> EyeDepth { + let (w, h) = (width.clamp(1, 4096), height.clamp(1, 4096)); + let aspect = w as f32 / h as f32; + let vp = camera.view_proj(aspect); + let eye = camera.eye(); + // Project every vertex once. + let clip: Vec = mesh.positions.iter().map(|p| vp * p.extend(1.0)).collect(); + let screen: Vec> = + clip.iter().map(|c| (c.w > 1e-5).then(|| ((c.x / c.w * 0.5 + 0.5) * w as f32, (0.5 - c.y / c.w * 0.5) * h as f32))).collect(); + let dist_v: Vec = mesh.positions.iter().map(|p| p.distance(eye)).collect(); + let bands = (h as usize).div_ceil(BAND); + let mut bins: Vec> = vec![Vec::new(); bands]; + for t in 0..mesh.triangle_count() { + let Some([a, b, c]) = mesh.tri(t) else { continue }; + let (Some(Some(pa)), Some(Some(pb)), Some(Some(pc))) = (screen.get(a), screen.get(b), screen.get(c)) else { continue }; + let y0 = pa.1.min(pb.1).min(pc.1).floor().max(0.0); + let y1 = pa.1.max(pb.1).max(pc.1).ceil().min(h as f32); + if y1 <= y0 || !y0.is_finite() || !y1.is_finite() { + continue; + } + let (b0, b1) = (y0 as usize / BAND, ((y1 as usize).saturating_sub(1)) / BAND); + for bin in bins.iter_mut().take(b1 + 1).skip(b0) { + bin.push(t as u32); + } + } + let mut dist = vec![f32::MAX; (w * h) as usize]; + dist.par_chunks_mut(BAND * w as usize).enumerate().for_each(|(bi, rows)| { + let row0 = bi * BAND; + let nrows = rows.len() / w as usize; + for &t in bins.get(bi).map(Vec::as_slice).unwrap_or(&[]) { + let Some([a, b, c]) = mesh.tri(t as usize) else { continue }; + let (Some(Some(pa)), Some(Some(pb)), Some(Some(pc))) = (screen.get(a), screen.get(b), screen.get(c)) else { continue }; + let (da, db, dc) = (dist_v[a], dist_v[b], dist_v[c]); + let area = (pb.0 - pa.0) * (pc.1 - pa.1) - (pb.1 - pa.1) * (pc.0 - pa.0); + if area.abs() < 1e-9 { + continue; + } + let x0 = pa.0.min(pb.0).min(pc.0).floor().max(0.0) as usize; + let x1 = (pa.0.max(pb.0).max(pc.0).ceil().min(w as f32)) as usize; + let y0 = (pa.1.min(pb.1).min(pc.1).floor().max(row0 as f32)) as usize; + let y1 = (pa.1.max(pb.1).max(pc.1).ceil().min((row0 + nrows) as f32)) as usize; + for y in y0.max(row0)..y1 { + for x in x0..x1.min(w as usize) { + let (px, py) = (x as f32 + 0.5, y as f32 + 0.5); + let w0 = ((pb.0 - px) * (pc.1 - py) - (pb.1 - py) * (pc.0 - px)) / area; + let w1 = ((pc.0 - px) * (pa.1 - py) - (pc.1 - py) * (pa.0 - px)) / area; + let w2 = 1.0 - w0 - w1; + if w0 < -1e-4 || w1 < -1e-4 || w2 < -1e-4 { + continue; + } + let d = w0 * da + w1 * db + w2 * dc; + if let Some(slot) = rows.get_mut((y - row0) * w as usize + x) + && d < *slot + { + *slot = d; + } + } + } + } + }); + EyeDepth { width: w, height: h, view_proj: vp, eye, dist, bias: mesh.radius() * 0.004 } + } + + /// Whether world point `p` is visible (not hidden behind other geometry, inside the view). + pub fn visible(&self, p: Vec3) -> bool { + let c = self.view_proj * p.extend(1.0); + if c.w <= 1e-6 { + return false; + } + let (nx, ny) = (c.x / c.w, c.y / c.w); + if nx.abs() > 1.0 || ny.abs() > 1.0 { + return false; + } + let x = (((nx * 0.5 + 0.5) * self.width as f32) as u32).min(self.width - 1); + let y = (((0.5 - ny * 0.5) * self.height as f32) as u32).min(self.height - 1); + // Conservative: the nearest surface among the pixel and its neighbours. + let mut near = f32::MAX; + for dy in -1i32..=1 { + for dx in -1i32..=1 { + let (sx, sy) = (x as i32 + dx, y as i32 + dy); + if sx < 0 || sy < 0 || sx >= self.width as i32 || sy >= self.height as i32 { + continue; + } + if let Some(d) = self.dist.get((sy as u32 * self.width + sx as u32) as usize) { + near = near.min(*d); + } + } + } + // Allow a bias that grows with distance (depth buffer resolution). + p.distance(self.eye) <= near + self.bias + near * 0.002 + } +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::primitives; + + #[test] + fn front_of_sphere_is_visible_back_is_not() { + let m = primitives::sphere(1.0, 64, 32); + let mut cam = OrbitCamera::default(); + cam.yaw = 0.0; + cam.pitch = 0.0; + cam.frame(Vec3::splat(-1.0), Vec3::splat(1.0)); + let d = EyeDepth::render(&m, &cam, 256, 256); + let toward = (cam.eye() - cam.target).normalize(); + assert!(d.visible(toward * 1.0)); + assert!(!d.visible(-toward * 1.0)); + assert!(!d.visible(Vec3::new(100.0, 0.0, 0.0))); + } +} diff --git a/crates/render/Cargo.toml b/crates/render/Cargo.toml new file mode 100644 index 00000000..0138c994 --- /dev/null +++ b/crates/render/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "texturecraft-render" +description = "TextureCraft wgpu viewport renderer: PBR, image-based lighting, debug views, UV view" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-core = { workspace = true } +texturecraft-texel = { workspace = true } +texturecraft-geom = { workspace = true } +texturecraft-compose = { workspace = true } +wgpu = { workspace = true } +bytemuck = { workspace = true } +half = { workspace = true } +rayon = { workspace = true } + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +pollster = "0.4" + +[dev-dependencies] +image = { workspace = true } diff --git a/crates/render/src/headless.rs b/crates/render/src/headless.rs new file mode 100644 index 00000000..f22dd1d4 --- /dev/null +++ b/crates/render/src/headless.rs @@ -0,0 +1,30 @@ +//! A windowless wgpu device for CLI renders, screenshots and GPU tests. + +use crate::Renderer; + +pub struct Headless { + pub device: wgpu::Device, + pub queue: wgpu::Queue, + pub renderer: Renderer, + pub adapter_name: String, +} + +impl Headless { + /// Create a device on the default adapter. Errors when no GPU (or software) adapter exists. + pub fn new() -> Result { + let instance = wgpu::Instance::default(); + let adapter = pollster::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions::default())).map_err(|e| format!("no GPU adapter: {e}"))?; + let adapter_name = adapter.get_info().name; + let (device, queue) = pollster::block_on(adapter.request_device(&wgpu::DeviceDescriptor::default())).map_err(|e| format!("no GPU device: {e}"))?; + let renderer = Renderer::new(&device, &queue, wgpu::TextureFormat::Rgba8Unorm); + Ok(Headless { device, queue, renderer, adapter_name }) + } + + /// Render a frame and read it back as RGBA8 (sRGB-encoded). + pub fn render(&mut self, frame: &crate::Frame) -> Option<(u32, u32, Vec)> { + let mut enc = self.device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: Some("tc_headless") }); + self.renderer.prepare(&self.device, &self.queue, &mut enc, frame); + self.queue.submit([enc.finish()]); + self.renderer.read_view(&self.device, &self.queue, frame.view_id) + } +} diff --git a/crates/render/src/ibl.rs b/crates/render/src/ibl.rs new file mode 100644 index 00000000..d4c9fc8b --- /dev/null +++ b/crates/render/src/ibl.rs @@ -0,0 +1,354 @@ +//! Image-based lighting, computed on the CPU: procedural HDR environments (no image assets), +//! a GGX-prefiltered mip chain for specular, and 9 spherical-harmonics coefficients for +//! diffuse. +//! +//! Equirect convention: `u = φ / 2π`, `v = θ / π`, direction +//! `(sin θ cos φ, cos θ, sin θ sin φ)`; row 0 is straight up. + +use std::f32::consts::{PI, TAU}; + +use rayon::prelude::*; +use texturecraft_geom::glam::{Vec2, Vec3}; + +/// An equirect HDR image (linear RGB). +#[derive(Clone, Debug)] +pub struct EnvImage { + pub width: u32, + pub height: u32, + pub data: Vec<[f32; 3]>, +} + +/// Built-in environments, in menu order. +pub const ENVIRONMENTS: [&str; 6] = ["Studio Soft", "Studio Contrast", "Overcast", "Sunset", "Warehouse", "Night"]; + +pub fn dir_of(u: f32, v: f32) -> Vec3 { + let (theta, phi) = (v * PI, u * TAU); + Vec3::new(theta.sin() * phi.cos(), theta.cos(), theta.sin() * phi.sin()) +} + +pub fn uv_of(d: Vec3) -> Vec2 { + let phi = d.z.atan2(d.x); + Vec2::new((phi / TAU).rem_euclid(1.0), d.y.clamp(-1.0, 1.0).acos() / PI) +} + +/// A soft rectangular light: azimuth/elevation center (degrees), half sizes (degrees). +struct SoftBox { + az: f32, + el: f32, + hw: f32, + hh: f32, + color: Vec3, +} + +impl SoftBox { + fn eval(&self, d: Vec3) -> Vec3 { + let el = d.y.clamp(-1.0, 1.0).asin().to_degrees(); + let az = d.z.atan2(d.x).to_degrees(); + let daz = ((az - self.az + 540.0).rem_euclid(360.0)) - 180.0; + let (x, y) = (daz.abs() / self.hw, (el - self.el).abs() / self.hh); + let e = |t: f32| 1.0 - smooth((t - 0.8) / 0.4); + self.color * e(x) * e(y) + } +} + +fn smooth(t: f32) -> f32 { + let t = t.clamp(0.0, 1.0); + t * t * (3.0 - 2.0 * t) +} + +fn sky(d: Vec3, zenith: Vec3, horizon: Vec3, ground: Vec3) -> Vec3 { + if d.y >= 0.0 { horizon.lerp(zenith, d.y.powf(0.6)) } else { horizon.lerp(ground, (-d.y).powf(0.25)) } +} + +fn radiance(name: &str, d: Vec3) -> Vec3 { + match name { + "Studio Contrast" => { + let base = sky(d, Vec3::splat(0.04), Vec3::splat(0.03), Vec3::splat(0.01)); + base + SoftBox { az: 35.0, el: 30.0, hw: 22.0, hh: 18.0, color: Vec3::new(14.0, 13.2, 12.0) }.eval(d) + + SoftBox { az: -150.0, el: 40.0, hw: 6.0, hh: 30.0, color: Vec3::new(4.0, 4.4, 5.0) }.eval(d) + } + "Overcast" => { + let base = sky(d, Vec3::new(1.2, 1.25, 1.35), Vec3::new(0.95, 0.95, 0.95), Vec3::new(0.18, 0.2, 0.15)); + base + SoftBox { az: 60.0, el: 55.0, hw: 40.0, hh: 25.0, color: Vec3::splat(0.6) }.eval(d) + } + "Sunset" => { + let base = sky(d, Vec3::new(0.15, 0.25, 0.55), Vec3::new(1.4, 0.65, 0.3), Vec3::new(0.08, 0.06, 0.05)); + let sun_dir = dir_of(0.12, 0.47); + let sun = smooth((d.dot(sun_dir) - 0.9985) / 0.0012) * 120.0; + base + Vec3::new(1.0, 0.6, 0.3) * sun + } + "Warehouse" => { + let mut c = sky(d, Vec3::splat(0.25), Vec3::splat(0.18), Vec3::splat(0.06)); + for k in 0..6 { + c += SoftBox { az: -150.0 + k as f32 * 60.0, el: 50.0, hw: 6.0, hh: 3.0, color: Vec3::new(9.0, 8.5, 7.5) }.eval(d); + } + c + SoftBox { az: 90.0, el: 5.0, hw: 30.0, hh: 12.0, color: Vec3::new(1.6, 1.8, 2.2) }.eval(d) + } + "Night" => { + let base = sky(d, Vec3::new(0.01, 0.015, 0.04), Vec3::new(0.03, 0.03, 0.06), Vec3::splat(0.005)); + base + SoftBox { az: 20.0, el: 15.0, hw: 10.0, hh: 10.0, color: Vec3::new(0.4, 1.6, 4.0) }.eval(d) + + SoftBox { az: -110.0, el: 10.0, hw: 12.0, hh: 8.0, color: Vec3::new(4.0, 0.8, 1.6) }.eval(d) + } + // "Studio Soft" (default) + _ => { + let base = sky(d, Vec3::new(0.5, 0.52, 0.56), Vec3::new(0.32, 0.32, 0.33), Vec3::new(0.08, 0.075, 0.07)); + base + SoftBox { az: 40.0, el: 35.0, hw: 28.0, hh: 20.0, color: Vec3::new(5.5, 5.2, 4.8) }.eval(d) + + SoftBox { az: -125.0, el: 20.0, hw: 35.0, hh: 22.0, color: Vec3::new(1.1, 1.25, 1.5) }.eval(d) + + SoftBox { az: 175.0, el: 55.0, hw: 8.0, hh: 25.0, color: Vec3::new(3.0, 3.0, 3.0) }.eval(d) + } + } +} + +/// Render a built-in environment (unknown names give the default studio). +pub fn environment(name: &str, width: u32) -> EnvImage { + let w = width.clamp(16, 4096); + let h = w / 2; + let mut data = vec![[0.0f32; 3]; (w * h) as usize]; + data.par_chunks_mut(w as usize).enumerate().for_each(|(y, row)| { + for (x, px) in row.iter_mut().enumerate() { + let d = dir_of((x as f32 + 0.5) / w as f32, (y as f32 + 0.5) / h as f32); + *px = radiance(name, d).to_array(); + } + }); + EnvImage { width: w, height: h, data } +} + +impl EnvImage { + fn get(&self, x: i64, y: i64) -> Vec3 { + let xx = x.rem_euclid(self.width as i64) as u32; + let yy = y.clamp(0, self.height as i64 - 1) as u32; + self.data.get((yy * self.width + xx) as usize).map(|v| Vec3::from(*v)).unwrap_or(Vec3::ZERO) + } + + /// Bilinear lookup by direction. + pub fn sample(&self, d: Vec3) -> Vec3 { + let uv = uv_of(d); + let (fx, fy) = (uv.x * self.width as f32 - 0.5, uv.y * self.height as f32 - 0.5); + let (x0, y0) = (fx.floor() as i64, fy.floor() as i64); + let (tx, ty) = (fx - x0 as f32, fy - y0 as f32); + let a = self.get(x0, y0).lerp(self.get(x0 + 1, y0), tx); + let b = self.get(x0, y0 + 1).lerp(self.get(x0 + 1, y0 + 1), tx); + a.lerp(b, ty) + } + + /// Box-downsample by 2. + pub fn half(&self) -> EnvImage { + let (w, h) = ((self.width / 2).max(1), (self.height / 2).max(1)); + let mut data = vec![[0.0f32; 3]; (w * h) as usize]; + data.par_chunks_mut(w as usize).enumerate().for_each(|(y, row)| { + for (x, px) in row.iter_mut().enumerate() { + let (sx, sy) = (x as i64 * 2, y as i64 * 2); + let s = (self.get(sx, sy) + self.get(sx + 1, sy) + self.get(sx, sy + 1) + self.get(sx + 1, sy + 1)) * 0.25; + *px = s.to_array(); + } + }); + EnvImage { width: w, height: h, data } + } + + /// An imported equirect image (`rgba` row-major, top row first, sRGB-encoded when `srgb`) as + /// linear radiance: non-finite and negative values become 0, values are capped to the f16 + /// range, and images larger than [`MAX_IMPORT_WIDTH`] are box-downsampled. None when the + /// pixel count does not match the size. + pub fn from_rgba(width: u32, height: u32, rgba: &[[f32; 4]], srgb: bool) -> Option { + if width == 0 || height == 0 || rgba.len() as u64 != width as u64 * height as u64 { + return None; + } + let lin = |v: f32| { + let v = if v.is_finite() { v.clamp(0.0, 65_000.0) } else { 0.0 }; + if srgb { texturecraft_texel::srgb_to_linear(v.min(1.0)) } else { v } + }; + let data = rgba.par_iter().map(|p| [lin(p[0]), lin(p[1]), lin(p[2])]).collect(); + let mut img = EnvImage { width, height, data }; + while img.width > MAX_IMPORT_WIDTH || img.height > MAX_IMPORT_WIDTH { + img = img.half(); + } + // The mip chain needs at least 4×2 texels at its last level. + if img.width < 128 || img.height < 64 { + let (w, h) = (img.width.max(128), img.height.max(64)); + let data = (0..w * h).map(|i| img.sample(dir_of(((i % w) as f32 + 0.5) / w as f32, ((i / w) as f32 + 0.5) / h as f32)).to_array()).collect(); + img = EnvImage { width: w, height: h, data }; + } + Some(img) + } +} + +/// Widest imported environment kept (2K equirect: about 5.6 texels per degree). +pub const MAX_IMPORT_WIDTH: u32 = 2048; + +fn hammersley(i: u32, n: u32) -> Vec2 { + Vec2::new(i as f32 / n as f32, i.reverse_bits() as f32 * 2.328_306_4e-10) +} + +/// GGX-prefiltered mip chain: level `l` of `levels` is filtered for roughness `l / (levels-1)`. +pub fn prefilter(env: &EnvImage, levels: u32) -> Vec { + let levels = levels.clamp(1, 8); + // Clamp fireflies, then build a box pyramid to sample from (filtered importance sampling). + let clamped = EnvImage { data: env.data.iter().map(|c| c.map(|v| v.min(64.0))).collect(), ..env.clone() }; + let mut pyramid = vec![clamped]; + while pyramid.len() < 10 && pyramid.last().is_some_and(|p| p.width > 8) { + if let Some(next) = pyramid.last().map(EnvImage::half) { + pyramid.push(next); + } + } + let mut out = vec![env.clone()]; + let mut size = (env.width, env.height); + for l in 1..levels { + size = ((size.0 / 2).max(4), (size.1 / 2).max(2)); + let rough = l as f32 / (levels - 1) as f32; + let a = (rough * rough).max(1e-3); + let samples = 128u32; + let (w, h) = size; + let sa_texel = 4.0 * PI / (env.width as f32 * env.height as f32); + // With n = v, every sample's half vector, n·l and source level depend only on its index: + // tabulate them once per level as (tangent-space half vector, n·l, pyramid level). + let table: Vec<(Vec3, f32, &EnvImage)> = (0..samples) + .filter_map(|i| { + let xi = hammersley(i, samples); + let phi = TAU * xi.x; + let cos_t = ((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y)).max(0.0).sqrt(); + let sin_t = (1.0 - cos_t * cos_t).max(0.0).sqrt(); + let ndl = 2.0 * cos_t * cos_t - 1.0; + if ndl <= 0.0 { + return None; + } + let dd = a * a / (PI * ((cos_t * cos_t) * (a * a - 1.0) + 1.0).powi(2)).max(1e-8); + let sa_sample = 1.0 / (samples as f32 * dd / 4.0 + 1e-6); + let lod = (0.5 * (sa_sample / sa_texel).log2() + 1.0).clamp(0.0, (pyramid.len() - 1) as f32); + let src = pyramid.get(lod.round() as usize).unwrap_or(&pyramid[0]); + Some((Vec3::new(sin_t * phi.cos(), sin_t * phi.sin(), cos_t), ndl, src)) + }) + .collect(); + let wsum: f32 = table.iter().map(|t| t.1).sum(); + let mut data = vec![[0.0f32; 3]; (w * h) as usize]; + data.par_chunks_mut(w as usize).enumerate().for_each(|(y, row)| { + for (x, px) in row.iter_mut().enumerate() { + let n = dir_of((x as f32 + 0.5) / w as f32, (y as f32 + 0.5) / h as f32); + let up = if n.y.abs() < 0.999 { Vec3::Y } else { Vec3::X }; + let tx = up.cross(n).normalize(); + let ty = n.cross(tx); + let mut acc = Vec3::ZERO; + for (hv, ndl, src) in &table { + let hw = tx * hv.x + ty * hv.y + n * hv.z; + acc += src.sample(hw * (2.0 * hv.z) - n) * *ndl; + } + *px = (acc / wsum.max(1e-6)).to_array(); + } + }); + out.push(EnvImage { width: w, height: h, data }); + } + out +} + +/// Diffuse irradiance as 9 SH coefficients (already convolved with the cosine lobe and divided +/// by π, so `Σ c·Y(n)` times albedo is the diffuse radiance). +pub fn sh9(env: &EnvImage) -> [[f32; 3]; 9] { + let mut src = env.clone(); + while src.width > 128 { + src = src.half(); + } + let (w, h) = (src.width, src.height); + let mut c = [Vec3::ZERO; 9]; + for y in 0..h { + let theta = PI * (y as f32 + 0.5) / h as f32; + let dw = (TAU / w as f32) * (PI / h as f32) * theta.sin(); + for x in 0..w { + let d = dir_of((x as f32 + 0.5) / w as f32, (y as f32 + 0.5) / h as f32); + // No firefly clamp: the projection integrates, so a bright sun lights diffuse fully. + let l = src.get(x as i64, y as i64) * dw; + for (k, ylm) in sh_basis(d).iter().enumerate() { + c[k] += l * *ylm; + } + } + } + let a = [PI, 2.0 * PI / 3.0, 2.0 * PI / 3.0, 2.0 * PI / 3.0, PI / 4.0, PI / 4.0, PI / 4.0, PI / 4.0, PI / 4.0]; + let mut out = [[0.0; 3]; 9]; + for k in 0..9 { + out[k] = (c[k] * a[k] / PI).to_array(); + } + out +} + +pub fn sh_basis(d: Vec3) -> [f32; 9] { + let (x, y, z) = (d.x, d.y, d.z); + [ + 0.282_095, + 0.488_603 * y, + 0.488_603 * z, + 0.488_603 * x, + 1.092_548 * x * y, + 1.092_548 * y * z, + 0.315_392 * (3.0 * z * z - 1.0), + 1.092_548 * x * z, + 0.546_274 * (x * x - y * y), + ] +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn uv_and_direction_round_trip() { + for i in 1..20 { + for j in 1..10 { + let (u, v) = (i as f32 / 20.0, j as f32 / 10.0); + let back = uv_of(dir_of(u, v)); + assert!((back.x - u).abs() < 1e-4 && (back.y - v).abs() < 1e-4); + } + } + } + + #[test] + fn sh_of_a_uniform_environment_is_constant_irradiance() { + let env = EnvImage { width: 64, height: 32, data: vec![[1.0, 1.0, 1.0]; 64 * 32] }; + let c = sh9(&env); + for d in [Vec3::Y, Vec3::X, Vec3::NEG_Z, Vec3::new(0.3, -0.8, 0.5).normalize()] { + let b = sh_basis(d); + let e: f32 = (0..9).map(|k| c[k][0] * b[k]).sum(); + assert!((e - 1.0).abs() < 0.03, "{e}"); + } + } + + #[test] + fn prefilter_levels_shrink_and_stay_finite() { + let env = environment("Studio Soft", 128); + let mips = prefilter(&env, 5); + assert_eq!(mips.len(), 5); + assert!(mips[4].width < mips[1].width); + for m in &mips { + assert!(m.data.iter().all(|c| c.iter().all(|v| v.is_finite() && *v >= 0.0))); + } + for name in ENVIRONMENTS { + let e = environment(name, 64); + assert!(e.data.iter().any(|c| c[0] > 0.5), "{name} has no light"); + } + } + + #[test] + fn imported_images_become_safe_linear_environments() { + assert!(EnvImage::from_rgba(4, 2, &[[0.0; 4]; 7], false).is_none(), "pixel count must match"); + // HDR values stay above 1; NaN, infinity and negatives become 0; tiny images grow to 128×64. + let px = [[50.0, f32::NAN, -1.0, 1.0], [f32::INFINITY, 0.5, 0.25, 1.0]]; + let e = EnvImage::from_rgba(2, 1, &px, false).unwrap(); + assert_eq!((e.width, e.height), (128, 64)); + assert!(e.data.iter().all(|c| c.iter().all(|v| v.is_finite() && *v >= 0.0))); + assert!(e.data.iter().any(|c| c[0] > 40.0), "HDR range is kept"); + // 8-bit images are sRGB-decoded; big ones are halved down to the import limit. + let e = EnvImage::from_rgba(4096, 2048, &vec![[0.5, 0.5, 0.5, 1.0]; 4096 * 2048], true).unwrap(); + assert_eq!((e.width, e.height), (MAX_IMPORT_WIDTH, MAX_IMPORT_WIDTH / 2)); + assert!((e.data[0][0] - 0.214).abs() < 0.01, "{}", e.data[0][0]); + let mips = prefilter(&e, 6); + assert!(mips.iter().all(|m| m.data.iter().all(|c| c.iter().all(|v| v.is_finite())))); + } + + /// CPU cost of a 2K import: `cargo test -p texturecraft-render --release -- --ignored --nocapture`. + #[test] + #[ignore] + fn bench_prefilter_2k() { + let src = environment("Sunset", 2048); + let t = std::time::Instant::now(); + let mips = prefilter(&src, 6); + let sh = sh9(&src); + println!("2K environment: prefilter + SH {:.0} ms ({} levels, sh0 {:?})", t.elapsed().as_secs_f64() * 1000.0, mips.len(), sh[0]); + } +} diff --git a/crates/render/src/lib.rs b/crates/render/src/lib.rs new file mode 100644 index 00000000..095d77a8 --- /dev/null +++ b/crates/render/src/lib.rs @@ -0,0 +1,23 @@ +//! # texturecraft-render +//! +//! The wgpu viewport renderer: metal/roughness or specular/glossiness PBR with image-based +//! lighting (procedural environments or imported HDR images, prefiltered on the CPU in [`ibl`]), +//! height-to-normal, optional parallax occlusion, 4× MSAA plus idle temporal accumulation, channel / mesh-map / UV +//! checker debug views, the 2D UV view, a linear HDR scene with a post pass (exposure, Linear / +//! ACES tone mapping, bloom, sharpen, vignette, grain), key-light shadow maps, a 3D wireframe +//! overlay, and a [`headless`] device for renders +//! without a window. No UI toolkit dependency; the egui shell drives it through +//! [`Renderer::prepare`] and [`Renderer::blit`]. Fragment passes only, so it runs on WebGPU and +//! WebGL2 too. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod mesh_maps; +#[cfg(not(target_arch = "wasm32"))] +pub mod headless; +pub mod ibl; +pub mod renderer; +pub mod trace; + +pub use renderer::{COLOR_FORMAT, Frame, MSAA, Renderer, Shade, ViewKind}; +pub use wgpu; diff --git a/crates/render/src/mesh_maps.rs b/crates/render/src/mesh_maps.rs new file mode 100644 index 00000000..a9323c5e --- /dev/null +++ b/crates/render/src/mesh_maps.rs @@ -0,0 +1,26 @@ +//! Debug textures for the mesh-map view. + +use texturecraft_compose::BakedMaps; +use texturecraft_core::BakedMap; +use texturecraft_texel::linear_to_srgb; + +/// RGBA8 of baked map `m` resampled to `size × size` (mid gray where not baked). Scalar maps are +/// shown as grayscale; ID maps as their colors. Values are display (sRGB) encoded. +pub fn mesh_map_rgba(baked: Option<&BakedMaps>, m: BakedMap, size: u32) -> Vec { + let size = size.max(1); + let mut out = vec![128u8; (size * size * 4) as usize]; + let Some(b) = baked.filter(|b| b.maps.contains_key(&m)) else { return out }; + for y in 0..size { + for x in 0..size { + let v = b.sample(m, x, y, size).unwrap_or([0.5; 3]); + let i = ((y * size + x) * 4) as usize; + for k in 0..3 { + // Data maps are shown as stored (like Painter), i.e. treated as display values. + out[i + k] = (v[k].clamp(0.0, 1.0) * 255.0 + 0.5) as u8; + } + out[i + 3] = 255; + } + } + let _ = linear_to_srgb; + out +} diff --git a/crates/render/src/renderer.rs b/crates/render/src/renderer.rs new file mode 100644 index 00000000..dd61db33 --- /dev/null +++ b/crates/render/src/renderer.rs @@ -0,0 +1,1277 @@ +//! The wgpu viewport renderer. Independent of any UI toolkit: the shell calls [`Renderer::prepare`] +//! with an encoder (offscreen render into per-view targets) and [`Renderer::blit`] inside its +//! own render pass. +//! +//! Per view and frame: the scene pass (MSAA, linear HDR premultiplied by scene coverage, resolved) +//! → the bloom pyramid (only when bloom is on) → the post pass (flat studio backdrop, exposure, +//! tone mapping, effects, sRGB) into the view's RGBA8 target that [`Renderer::blit`] and +//! [`Renderer::read_view`] use. The key-light shadow map is re-rendered only when the mesh, the +//! light direction or the visible texture sets change. +//! +//! Temporal anti-aliasing (idle accumulation): while a 3D view's frame and the scene content stay +//! the same, each new frame renders with a sub-pixel jitter and is averaged into the view's +//! accumulation target, up to [`TAA_SAMPLES`] frames (4× MSAA each); then the view stops +//! rendering until something changes. [`Renderer::accumulating`] tells the shell to keep redrawing. + +use std::collections::HashMap; + +use bytemuck::{Pod, Zeroable}; +use texturecraft_compose::{DisplayKind, ImageRes}; +use texturecraft_core::{DisplaySettings, ToneMapping}; +use texturecraft_geom::glam::{Mat4, Vec3}; +use texturecraft_geom::{Mesh, OrbitCamera}; +use texturecraft_texel::TILE; + +use crate::ibl; + +pub const MSAA: u32 = 4; +pub const COLOR_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm; +pub const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth32Float; +/// Scene (pre tone mapping) format where float targets are renderable. +pub const HDR_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba16Float; +/// Prefiltered environment levels (roughness 0..1). +pub const ENV_LEVELS: u32 = 6; +const SHADOW_SIZE: u32 = 2048; +/// Bloom pyramid levels (1/2 .. 1/32 resolution). +const BLOOM_LEVELS: u32 = 5; +/// Bright-pass threshold on the exposed scene value, and the glow gain at strength 1. +const BLOOM_THRESHOLD: f32 = 1.0; +const BLOOM_GAIN: f32 = 0.15; +/// Frames averaged by idle accumulation (temporal anti-aliasing). +pub const TAA_SAMPLES: u32 = 16; + +#[repr(C)] +#[derive(Clone, Copy, Pod, Zeroable)] +struct GlobalsRaw { + view_proj: [[f32; 4]; 4], + inv_view_proj: [[f32; 4]; 4], + eye: [f32; 4], + env: [f32; 4], + sh: [[f32; 4]; 9], + mode: [f32; 4], + bg: [f32; 4], + uv_xform: [f32; 4], + light: [f32; 4], + light_vp: [[f32; 4]; 4], + shadow: [f32; 4], + material: [f32; 4], +} + +/// The post pass uniform (see `Post` in post.wgsl). +#[repr(C)] +#[derive(Clone, Copy, Pod, Zeroable)] +struct PostRaw { + a: [f32; 4], + b: [f32; 4], +} + +#[repr(C)] +#[derive(Clone, Copy, Pod, Zeroable)] +struct Vertex { + pos: [f32; 3], + nrm: [f32; 3], + tan: [f32; 4], + uv: [f32; 2], +} + +#[repr(C)] +#[derive(Clone, Copy, Pod, Zeroable)] +struct BlitRaw { + rect: [f32; 4], + dst: [f32; 4], +} + +/// How the material is shaded (from the project's display settings and the view mode). +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Shade { + /// Exposure in EV, applied in the post pass (not to data views). + pub exposure_ev: f32, + /// ACES filmic tone mapping (else linear, clipped). + pub aces: bool, + pub env_rotation_deg: f32, + /// 0..1 → background blur level. + pub env_blur: f32, + pub env_opacity: f32, + pub ao_intensity: f32, + pub height_strength: f32, + /// -1 for DirectX normal maps in the normal channel, 1 for OpenGL. + pub normal_y: f32, + /// 0 material, 1 channel, 2 mesh map (aux texture), 3 UV checker. + pub view_mode: u32, + /// Channel index for view mode 1 (Painter channel order, see the shader). + pub channel: u32, + /// Direction to an optional key light and its intensity (0 = off). The direction is in + /// environment space: it turns with `env_rotation_deg` like the lights painted into the + /// environment, so rotating the environment sweeps the key light and its shadows too. + pub light: [f32; 4], + /// Draw the UV wireframe in the 2D view. + pub wireframe: bool, + /// Key-light shadow map (needs `light[3] > 0`; 3D material view only). Shadows dim the key + /// light, not the image-based lighting. + pub shadows: bool, + /// Master switch of the effects below (Painter's "Post effects"); off costs no extra pass. + /// Effects never apply to data views (channels, mesh maps, UV checker, 2D view). + pub post_effects: bool, + /// Effect strengths, 0..1. + pub bloom: f32, + pub vignette: f32, + pub sharpen: f32, + pub grain: f32, + /// Draw the mesh edges over the shaded 3D view (depth tested). + pub wireframe_3d: bool, + /// Specular/glossiness shading: base color is the diffuse color and the Specular channel the + /// F0 color (roughness arrives as 1 - glossiness from the display conversion). + pub spec_gloss: bool, + /// Parallax occlusion mapping from the height channel (3D view). + pub parallax: bool, + /// Idle accumulation of jittered frames in the 3D view. + pub taa: bool, +} + +impl Shade { + /// The project-level shading (display and shader settings); the caller adds the view mode, + /// channel, height strength and wireframe toggles. + pub fn from_display(d: &DisplaySettings) -> Shade { + Shade { + exposure_ev: d.env_exposure, + aces: d.tone_mapping == ToneMapping::AcesFilmic, + env_rotation_deg: d.env_rotation, + env_blur: d.env_blur, + env_opacity: d.env_opacity, + ao_intensity: d.ao_intensity, + // The key light (on with shadows), in environment space. + light: if d.shadows { [0.5, 0.8, 0.4, 2.5] } else { [0.0; 4] }, + shadows: d.shadows, + post_effects: d.post_effects, + bloom: d.bloom, + vignette: d.vignette, + sharpen: d.sharpen, + grain: d.grain, + spec_gloss: d.spec_gloss, + parallax: d.parallax, + taa: d.taa, + ..Shade::default() + } + } +} + +impl Default for Shade { + fn default() -> Self { + Shade { + exposure_ev: 0.0, + aces: true, + env_rotation_deg: 0.0, + env_blur: 0.35, + env_opacity: 0.0, + ao_intensity: 0.75, + height_strength: 1.0, + normal_y: 1.0, + view_mode: 0, + channel: 0, + light: [0.0; 4], + wireframe: false, + shadows: false, + post_effects: false, + bloom: 0.0, + vignette: 0.0, + sharpen: 0.0, + grain: 0.0, + wireframe_3d: false, + spec_gloss: false, + parallax: false, + taa: false, + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum ViewKind { + /// The 3D viewport. + Scene, + /// The 2D UV view of texture set `ts`: zoom (1 = fit) and pan (clip-space offset). + Uv { ts: usize, zoom: f32, pan: [f32; 2] }, +} + +/// One view to render this frame. +#[derive(Clone, Debug, PartialEq)] +pub struct Frame { + pub view_id: u64, + /// Target size in physical pixels. + pub size: [u32; 2], + pub kind: ViewKind, + pub camera: OrbitCamera, + pub shade: Shade, + /// Visibility per texture set. + pub visible: Vec, +} + +struct Tex { + texture: wgpu::Texture, + view: wgpu::TextureView, + format: wgpu::TextureFormat, + mips: u32, +} + +fn mip_count(size: u32) -> u32 { + 32 - size.max(1).leading_zeros() +} + +impl Tex { + fn new(device: &wgpu::Device, label: &str, w: u32, h: u32, format: wgpu::TextureFormat, mips: u32) -> Tex { + let texture = device.create_texture(&wgpu::TextureDescriptor { + label: Some(label), + size: wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 }, + mip_level_count: mips, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST | wgpu::TextureUsages::RENDER_ATTACHMENT, + view_formats: &[], + }); + let view = texture.create_view(&wgpu::TextureViewDescriptor::default()); + Tex { texture, view, format, mips } + } +} + +struct SetGpu { + res: u32, + /// The five display textures in [`DisplayKind::ALL`] order, then the aux (mesh map) texture. + tex: Vec, + bind_group: wgpu::BindGroup, + mips_dirty: Vec, +} + +struct MeshGpu { + id: u64, + vb: wgpu::Buffer, + ib: wgpu::Buffer, + /// (first index, count, material) + draws: Vec<(u32, u32, usize)>, + /// Unique UV edges as a line list, per material: (first index, count, material). + lines: wgpu::Buffer, + line_draws: Vec<(u32, u32, usize)>, + /// Bounding sphere (center, radius) for fitting the shadow map. + center: Vec3, + radius: f32, +} + +/// The bloom pyramid of a view, created the first time bloom is used. +struct Bloom { + /// 1/2, 1/4, ... resolution targets. + levels: Vec, + /// Per level: reads the level above (the HDR scene for level 0). + down: Vec, + /// Per level but the last: reads the level below, added onto this one. + up: Vec, +} + +struct ViewTargets { + size: [u32; 2], + msaa: wgpu::TextureView, + depth: wgpu::TextureView, + /// The resolved HDR scene of a jittered accumulation frame. + hdr: wgpu::TextureView, + /// The HDR scene the post pass reads: resolved directly, or the running average of jittered + /// frames (see [`TAA_SAMPLES`]). + accum: wgpu::TextureView, + /// Reads `hdr` for the accumulation blend. + accum_bg: wgpu::BindGroup, + /// What `accum` holds: the frame and content revision, and the sample count. + history: Option<(Frame, u64)>, + samples: u32, + /// The display image (RGBA8, sRGB-encoded): post pass output, blit and read-back source. + resolve: wgpu::Texture, + resolve_view: wgpu::TextureView, + globals: wgpu::Buffer, + globals_bg: Option, + post_buf: wgpu::Buffer, + post_bg: wgpu::BindGroup, + bloom: Option, + blit_buf: wgpu::Buffer, + blit_bg: wgpu::BindGroup, + /// Set by [`Renderer::prepare`]: the view has content to blit. + ready: bool, +} + +/// Key-light shadow map, shared by all views (1×1 until shadows are first used). +struct ShadowMap { + view: wgpu::TextureView, + size: u32, + /// What the map was rendered for: mesh id, light direction bits, visible sets. + key: Option<(u64, [u32; 3])>, + visible: Vec, + vp: Mat4, + buf: wgpu::Buffer, + bg: wgpu::BindGroup, +} + +pub struct Renderer { + target_format: wgpu::TextureFormat, + /// [`HDR_FORMAT`], or [`COLOR_FORMAT`] where float targets are not renderable (WebGL2 + /// without float color buffers). + hdr_format: wgpu::TextureFormat, + globals_bgl: wgpu::BindGroupLayout, + set_bgl: wgpu::BindGroupLayout, + blit_bgl: wgpu::BindGroupLayout, + mip_bgl: wgpu::BindGroupLayout, + fx_bgl: wgpu::BindGroupLayout, + mesh_pipeline: wgpu::RenderPipeline, + uv_pipeline: wgpu::RenderPipeline, + wire_pipeline: wgpu::RenderPipeline, + wire3d_pipeline: wgpu::RenderPipeline, + bg_pipeline: wgpu::RenderPipeline, + blit_pipeline: wgpu::RenderPipeline, + post_pipeline: wgpu::RenderPipeline, + /// Bright pass + first downsample, downsample, additive upsample. + bloom_pipelines: [wgpu::RenderPipeline; 3], + shadow_pipeline: wgpu::RenderPipeline, + mip_pipelines: HashMap, + util_module: wgpu::ShaderModule, + sampler: wgpu::Sampler, + env_sampler: wgpu::Sampler, + shadow_sampler: wgpu::Sampler, + shadow: ShadowMap, + /// 1×1 black texture for unused effect inputs. + black: wgpu::TextureView, + accum_pipeline: wgpu::RenderPipeline, + env: Tex, + env_name: String, + sh: [[f32; 4]; 9], + /// Bumped by every change of what the views show (uploads, mesh, environment): restarts + /// accumulation. + content_rev: u64, + mesh: Option, + sets: Vec, + /// Texture set index per mesh material. + material_sets: Vec>, + views: HashMap, +} + +fn fragment_entry(binding: u32, ty: wgpu::BindingType) -> wgpu::BindGroupLayoutEntry { + wgpu::BindGroupLayoutEntry { binding, visibility: wgpu::ShaderStages::FRAGMENT, ty, count: None } +} + +fn tex_entry(binding: u32) -> wgpu::BindGroupLayoutEntry { + fragment_entry( + binding, + wgpu::BindingType::Texture { + multisampled: false, + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2, + }, + ) +} + +fn sampler_entry(binding: u32) -> wgpu::BindGroupLayoutEntry { + fragment_entry(binding, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering)) +} + +fn uniform_entry(binding: u32) -> wgpu::BindGroupLayoutEntry { + wgpu::BindGroupLayoutEntry { + binding, + visibility: wgpu::ShaderStages::VERTEX | wgpu::ShaderStages::FRAGMENT, + ty: wgpu::BindingType::Buffer { ty: wgpu::BufferBindingType::Uniform, has_dynamic_offset: false, min_binding_size: None }, + count: None, + } +} + +fn display_format(k: DisplayKind) -> wgpu::TextureFormat { + match k { + DisplayKind::BaseColor | DisplayKind::Emissive => wgpu::TextureFormat::Rgba8UnormSrgb, + DisplayKind::Orm | DisplayKind::Normal => wgpu::TextureFormat::Rgba8Unorm, + DisplayKind::Height => wgpu::TextureFormat::Rgba16Float, + } +} + +/// Default (neutral) texel of a display texture before any upload. +fn default_texel(k: DisplayKind) -> Vec { + match k { + DisplayKind::BaseColor => vec![188, 188, 188, 255], + DisplayKind::Orm => vec![255, 128, 0, 128], + DisplayKind::Normal => vec![128, 128, 255, 255], + DisplayKind::Height => [0.0, 0.04, 0.04, 0.04].iter().flat_map(|v| half::f16::from_f32(*v).to_le_bytes()).collect(), + DisplayKind::Emissive => vec![0, 0, 0, 255], + } +} + +/// The color output of a pipeline: fragment entry point, format, blending. `fs_wire*` entry +/// points draw line lists. +type ColorOut<'a> = (&'a str, wgpu::TextureFormat, Option); + +const ADD: wgpu::BlendComponent = wgpu::BlendComponent { src_factor: wgpu::BlendFactor::One, dst_factor: wgpu::BlendFactor::One, operation: wgpu::BlendOperation::Add }; +const ADDITIVE: wgpu::BlendState = wgpu::BlendState { color: ADD, alpha: ADD }; + +#[allow(clippy::too_many_arguments)] +fn pipeline( + device: &wgpu::Device, + label: &str, + layout: &wgpu::PipelineLayout, + module: &wgpu::ShaderModule, + vs: &str, + buffers: &[Option], + color: Option>, + samples: u32, + depth: Option, +) -> wgpu::RenderPipeline { + let lines = color.is_some_and(|(fs, ..)| fs.starts_with("fs_wire")); + let topology = if lines { wgpu::PrimitiveTopology::LineList } else { wgpu::PrimitiveTopology::TriangleList }; + let targets = color.map(|(_, format, blend)| [Some(wgpu::ColorTargetState { format, blend, write_mask: wgpu::ColorWrites::ALL })]); + device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some(label), + layout: Some(layout), + vertex: wgpu::VertexState { module, entry_point: Some(vs), buffers, compilation_options: Default::default() }, + primitive: wgpu::PrimitiveState { topology, cull_mode: None, ..Default::default() }, + depth_stencil: depth, + multisample: wgpu::MultisampleState { count: samples, mask: !0, alpha_to_coverage_enabled: false }, + fragment: color.zip(targets.as_ref()).map(|((fs, ..), targets)| wgpu::FragmentState { + module, + entry_point: Some(fs), + targets, + compilation_options: Default::default(), + }), + multiview_mask: None, + cache: None, + }) +} + +fn depth_state(write: bool, compare: wgpu::CompareFunction) -> wgpu::DepthStencilState { + wgpu::DepthStencilState { + format: DEPTH_FORMAT, + depth_write_enabled: Some(write), + depth_compare: Some(compare), + stencil: wgpu::StencilState::default(), + bias: wgpu::DepthBiasState::default(), + } +} + +/// Whether [`HDR_FORMAT`] works as an MSAA render target. Guaranteed on WebGPU and the native +/// backends; WebGL2/GLES need float color buffer extensions, so probe there (wgpu-core reports the +/// validation error synchronously, so the future is ready at once). +fn hdr_renderable(device: &wgpu::Device) -> bool { + if device.adapter_info().backend != wgpu::Backend::Gl { + return true; + } + let scope = device.push_error_scope(wgpu::ErrorFilter::Validation); + let _probe = texture(device, "tc_probe", [1, 1], HDR_FORMAT, MSAA, wgpu::TextureUsages::RENDER_ATTACHMENT); + let mut error = std::pin::pin!(scope.pop()); + matches!(error.as_mut().poll(&mut std::task::Context::from_waker(std::task::Waker::noop())), std::task::Poll::Ready(None)) +} + +fn texture(device: &wgpu::Device, label: &str, size: [u32; 2], format: wgpu::TextureFormat, samples: u32, usage: wgpu::TextureUsages) -> wgpu::Texture { + device.create_texture(&wgpu::TextureDescriptor { + label: Some(label), + size: wgpu::Extent3d { width: size[0], height: size[1], depth_or_array_layers: 1 }, + mip_level_count: 1, + sample_count: samples, + dimension: wgpu::TextureDimension::D2, + format, + usage, + view_formats: &[], + }) +} + +fn target_view(device: &wgpu::Device, label: &str, size: [u32; 2], format: wgpu::TextureFormat, samples: u32) -> wgpu::TextureView { + let usage = if samples > 1 || format == DEPTH_FORMAT { + wgpu::TextureUsages::RENDER_ATTACHMENT + } else { + wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING + }; + texture(device, label, size, format, samples, usage).create_view(&Default::default()) +} + +fn shadow_view(device: &wgpu::Device, size: u32) -> wgpu::TextureView { + texture(device, "tc_shadow", [size, size], DEPTH_FORMAT, 1, wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING).create_view(&Default::default()) +} + +/// One fullscreen-triangle pass into `target`. +fn fullscreen(encoder: &mut wgpu::CommandEncoder, label: &str, target: &wgpu::TextureView, load: wgpu::LoadOp, pipe: &wgpu::RenderPipeline, bg: &wgpu::BindGroup) { + fullscreen_blend(encoder, label, target, load, pipe, bg, 1.0); +} + +/// [`fullscreen`] with a blend constant (for pipelines that blend by it). +fn fullscreen_blend(encoder: &mut wgpu::CommandEncoder, label: &str, target: &wgpu::TextureView, load: wgpu::LoadOp, pipe: &wgpu::RenderPipeline, bg: &wgpu::BindGroup, constant: f64) { + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some(label), + color_attachments: &[Some(wgpu::RenderPassColorAttachment { + view: target, + resolve_target: None, + depth_slice: None, + ops: wgpu::Operations { load, store: wgpu::StoreOp::Store }, + })], + depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None, + multiview_mask: None, + }); + pass.set_pipeline(pipe); + pass.set_bind_group(0, bg, &[]); + pass.set_blend_constant(wgpu::Color { r: constant, g: constant, b: constant, a: constant }); + pass.draw(0..3, 0..1); +} + +/// Halton low-discrepancy value of `i` in `base` (0..1). +fn halton(mut i: u32, base: u32) -> f32 { + let (mut f, mut r) = (1.0, 0.0); + while i > 0 { + f /= base as f32; + r += f * (i % base) as f32; + i /= base; + } + r +} + +const CLEAR: wgpu::LoadOp = wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT); + +impl Renderer { + /// `target_format`: the format of the pass [`Renderer::blit`] draws into. + pub fn new(device: &wgpu::Device, queue: &wgpu::Queue, target_format: wgpu::TextureFormat) -> Renderer { + let shader = |label: &str, source: &str| device.create_shader_module(wgpu::ShaderModuleDescriptor { label: Some(label), source: wgpu::ShaderSource::Wgsl(source.into()) }); + let module = shader("tc_mesh", include_str!("shaders/mesh.wgsl")); + let util_module = shader("tc_util", include_str!("shaders/util.wgsl")); + let post_module = shader("tc_post", concat!(include_str!("shaders/util.wgsl"), include_str!("shaders/post.wgsl"))); + let shadow_module = shader("tc_shadow", include_str!("shaders/shadow.wgsl")); + let bgl = |label: &str, entries: &[wgpu::BindGroupLayoutEntry]| device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some(label), entries }); + let globals_bgl = bgl( + "tc_globals", + &[ + uniform_entry(0), + tex_entry(1), + sampler_entry(2), + fragment_entry(3, wgpu::BindingType::Texture { multisampled: false, sample_type: wgpu::TextureSampleType::Depth, view_dimension: wgpu::TextureViewDimension::D2 }), + fragment_entry(4, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Comparison)), + ], + ); + let set_bgl = bgl("tc_set", &[tex_entry(0), tex_entry(1), tex_entry(2), tex_entry(3), tex_entry(4), tex_entry(5), sampler_entry(6)]); + let blit_bgl = bgl("tc_blit", &[tex_entry(0), sampler_entry(1), uniform_entry(2)]); + let mip_bgl = bgl("tc_mip", &[tex_entry(0), sampler_entry(1)]); + let fx_bgl = bgl("tc_fx", &[tex_entry(0), sampler_entry(1), uniform_entry(3), tex_entry(4)]); + let shadow_bgl = bgl("tc_shadow", &[uniform_entry(0)]); + let pl = |label: &str, groups: &[Option<&wgpu::BindGroupLayout>]| { + device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some(label), bind_group_layouts: groups, immediate_size: 0 }) + }; + let layout = pl("tc_mesh", &[Some(&globals_bgl), Some(&set_bgl)]); + let bg_layout = pl("tc_bg", &[Some(&globals_bgl)]); + let blit_layout = pl("tc_blit", &[Some(&blit_bgl)]); + let fx_layout = pl("tc_fx", &[Some(&fx_bgl)]); + let shadow_layout = pl("tc_shadow", &[Some(&shadow_bgl)]); + let vb = [Some(wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &wgpu::vertex_attr_array![0 => Float32x3, 1 => Float32x3, 2 => Float32x4, 3 => Float32x2], + })]; + // shortcut: the RGBA8 fallback clips highlights above 1 and bands in the darks; encode + // (e.g. RGBM) if WebGL2 without float color buffers turns out to matter. + let hdr_format = if hdr_renderable(device) { HDR_FORMAT } else { COLOR_FORMAT }; + let hdr = |fs, blend| Some((fs, hdr_format, blend)); + let always = || Some(depth_state(false, wgpu::CompareFunction::Always)); + let mesh_pipeline = pipeline(device, "tc_mesh", &layout, &module, "vs_mesh", &vb, hdr("fs_mesh", None), MSAA, Some(depth_state(true, wgpu::CompareFunction::Less))); + let uv_pipeline = pipeline(device, "tc_uv", &layout, &module, "vs_uv", &vb, hdr("fs_uv", None), MSAA, always()); + let blend = Some(wgpu::BlendState::ALPHA_BLENDING); + let wire_pipeline = pipeline(device, "tc_wire", &layout, &module, "vs_uv", &vb, hdr("fs_wire", blend), MSAA, always()); + let wire3d_depth = Some(depth_state(false, wgpu::CompareFunction::LessEqual)); + let wire3d_pipeline = pipeline(device, "tc_wire3d", &layout, &module, "vs_wire3d", &vb, hdr("fs_wire3d", blend), MSAA, wire3d_depth); + let bg_pipeline = pipeline(device, "tc_bg", &bg_layout, &module, "vs_bg", &[], hdr("fs_bg", None), MSAA, always()); + let blit_pipeline = pipeline(device, "tc_blit", &blit_layout, &util_module, "vs_blit", &[], Some(("fs_blit", target_format, None)), 1, None); + let post_pipeline = pipeline(device, "tc_post", &fx_layout, &post_module, "vs_full", &[], Some(("fs_post", COLOR_FORMAT, None)), 1, None); + let bloom_pipelines = [("fs_bloom_pre", None), ("fs_bloom_down", None), ("fs_bloom_up", Some(ADDITIVE))] + .map(|(fs, blend)| pipeline(device, "tc_bloom", &fx_layout, &post_module, "vs_full", &[], hdr(fs, blend), 1, None)); + let shadow_depth = wgpu::DepthStencilState { + bias: wgpu::DepthBiasState { constant: 0, slope_scale: 1.5, clamp: 0.0 }, + ..depth_state(true, wgpu::CompareFunction::Less) + }; + let shadow_pipeline = pipeline(device, "tc_shadow", &shadow_layout, &shadow_module, "vs_shadow", &vb, None, 1, Some(shadow_depth)); + // accum = hdr * k + accum * (1 - k) with k = 1 / (sample + 1): a running average. + let average = wgpu::BlendComponent { src_factor: wgpu::BlendFactor::Constant, dst_factor: wgpu::BlendFactor::OneMinusConstant, operation: wgpu::BlendOperation::Add }; + let accum_layout = pl("tc_accum", &[Some(&mip_bgl)]); + let accum_blend = Some(wgpu::BlendState { color: average, alpha: average }); + let accum_pipeline = pipeline(device, "tc_accum", &accum_layout, &util_module, "vs_full", &[], hdr("fs_mip", accum_blend), 1, None); + let sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("tc_tex"), + address_mode_u: wgpu::AddressMode::ClampToEdge, + address_mode_v: wgpu::AddressMode::ClampToEdge, + mag_filter: wgpu::FilterMode::Linear, + min_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, + anisotropy_clamp: 8, + ..Default::default() + }); + let env_sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("tc_env"), + address_mode_u: wgpu::AddressMode::Repeat, + address_mode_v: wgpu::AddressMode::ClampToEdge, + mag_filter: wgpu::FilterMode::Linear, + min_filter: wgpu::FilterMode::Linear, + mipmap_filter: wgpu::MipmapFilterMode::Linear, + ..Default::default() + }); + let shadow_sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("tc_shadow"), + mag_filter: wgpu::FilterMode::Linear, + min_filter: wgpu::FilterMode::Linear, + compare: Some(wgpu::CompareFunction::LessEqual), + ..Default::default() + }); + let shadow_buf = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("tc_shadow"), + size: std::mem::size_of::<[[f32; 4]; 4]>() as u64, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let shadow = ShadowMap { + view: shadow_view(device, 1), + size: 1, + key: None, + visible: Vec::new(), + vp: Mat4::IDENTITY, + bg: device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_shadow"), + layout: &shadow_bgl, + entries: &[wgpu::BindGroupEntry { binding: 0, resource: shadow_buf.as_entire_binding() }], + }), + buf: shadow_buf, + }; + let black = Tex::new(device, "tc_black", 1, 1, COLOR_FORMAT, 1).view; + let env = Tex::new(device, "tc_env", 512, 256, wgpu::TextureFormat::Rgba16Float, ENV_LEVELS); + let mut r = Renderer { + target_format, + hdr_format, + globals_bgl, + set_bgl, + blit_bgl, + mip_bgl, + fx_bgl, + mesh_pipeline, + uv_pipeline, + wire_pipeline, + wire3d_pipeline, + bg_pipeline, + blit_pipeline, + post_pipeline, + bloom_pipelines, + shadow_pipeline, + accum_pipeline, + mip_pipelines: HashMap::new(), + util_module, + sampler, + env_sampler, + shadow_sampler, + shadow, + black, + env, + env_name: String::new(), + sh: [[0.0; 4]; 9], + content_rev: 0, + mesh: None, + sets: Vec::new(), + material_sets: Vec::new(), + views: HashMap::new(), + }; + r.set_environment(device, queue, "Studio Soft", None); + r + } + + pub fn environment_name(&self) -> &str { + &self.env_name + } + + /// Use environment `name`: with `image`, that equirect image (an imported `.hdr`/`.exr`, or + /// any image, linearized), prefiltered on the CPU (rayon); otherwise the built-in of that + /// name (no-op when already current; unknown names give the default studio). + pub fn set_environment(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, name: &str, image: Option<&ImageRes>) { + let img = match image.and_then(|i| ibl::EnvImage::from_rgba(i.width, i.height, &i.rgba, i.srgb)) { + Some(img) => img, + None if self.env_name == name => return, + None => ibl::environment(name, 512), + }; + let levels = ibl::prefilter(&img, ENV_LEVELS); + if self.env.texture.width() != img.width || self.env.texture.height() != img.height { + self.env = Tex::new(device, "tc_env", img.width, img.height, wgpu::TextureFormat::Rgba16Float, ENV_LEVELS); + } + for (l, lv) in levels.iter().enumerate() { + let bytes: Vec = lv.data.iter().flat_map(|c| [c[0], c[1], c[2], 1.0]).flat_map(|v| half::f16::from_f32(v).to_le_bytes()).collect(); + queue.write_texture( + wgpu::TexelCopyTextureInfo { texture: &self.env.texture, mip_level: l as u32, origin: wgpu::Origin3d::ZERO, aspect: wgpu::TextureAspect::All }, + &bytes, + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(lv.width * 8), rows_per_image: Some(lv.height) }, + wgpu::Extent3d { width: lv.width, height: lv.height, depth_or_array_layers: 1 }, + ); + } + let sh = ibl::sh9(&img); + self.sh = sh.map(|c| [c[0], c[1], c[2], 0.0]); + self.env_name = name.to_string(); + self.content_rev += 1; + for v in self.views.values_mut() { + v.globals_bg = None; + } + } + + /// Upload the mesh when `id` changed. + pub fn set_mesh(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, mesh: &Mesh, id: u64) { + if self.mesh.as_ref().is_some_and(|m| m.id == id) { + return; + } + let verts: Vec = (0..mesh.positions.len()) + .map(|i| Vertex { + pos: mesh.positions[i].to_array(), + nrm: mesh.normals.get(i).map(|n| n.to_array()).unwrap_or([0.0, 1.0, 0.0]), + tan: mesh.tangents.get(i).map(|t| t.to_array()).unwrap_or([1.0, 0.0, 0.0, 1.0]), + uv: mesh.uvs.get(i).map(|u| u.to_array()).unwrap_or([0.0, 0.0]), + }) + .collect(); + let mk = |label: &str, data: &[u8], usage: wgpu::BufferUsages| { + let buf = device.create_buffer(&wgpu::BufferDescriptor { + label: Some(label), + size: (data.len() as u64).max(4).next_multiple_of(4), + usage: usage | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + queue.write_buffer(&buf, 0, data); + buf + }; + let mut idx_bytes = bytemuck::cast_slice::(&mesh.indices).to_vec(); + idx_bytes.resize(idx_bytes.len().next_multiple_of(4), 0); + let vb = mk("tc_vb", bytemuck::cast_slice(&verts), wgpu::BufferUsages::VERTEX); + let ib = mk("tc_ib", &idx_bytes, wgpu::BufferUsages::INDEX); + let draws = mesh.submeshes.iter().map(|s| (s.start, s.count, s.material)).collect(); + // UV edges (each shared edge once) per material, for the 2D view wireframe. + let mut line_idx: Vec = Vec::new(); + let mut line_draws = Vec::new(); + for m in 0..mesh.materials.len().max(1) { + let start = line_idx.len() as u32; + let mut seen = std::collections::HashSet::new(); + for t in mesh.triangles_of(m) { + let Some(v) = mesh.tri(t) else { continue }; + for (a, b) in [(v[0], v[1]), (v[1], v[2]), (v[2], v[0])] { + let key = (a.min(b), a.max(b)); + if seen.insert(key) { + line_idx.extend_from_slice(&[key.0 as u32, key.1 as u32]); + } + } + } + line_draws.push((start, line_idx.len() as u32 - start, m)); + } + let lines = mk("tc_lines", bytemuck::cast_slice(&line_idx), wgpu::BufferUsages::INDEX); + let (lo, hi) = mesh.bounds(); + let (center, radius) = ((lo + hi) * 0.5, ((hi - lo).length() * 0.5).max(1e-3)); + self.mesh = Some(MeshGpu { id, vb, ib, draws, lines, line_draws, center, radius }); + self.content_rev += 1; + } + + /// Make the per-texture-set textures match `sets` (resolution per set) and map mesh + /// materials to sets. Re-created textures start neutral; returns the sets that were reset + /// (the caller must upload all their tiles). + pub fn set_texture_sets(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, sets: &[(u32, usize)], material_count: usize) -> Vec { + let mut reset = Vec::new(); + self.content_rev += 1; + self.sets.truncate(sets.len()); + for (i, &(res, _)) in sets.iter().enumerate() { + if self.sets.get(i).is_some_and(|s| s.res == res) { + continue; + } + let mips = mip_count(res); + let mut tex: Vec = DisplayKind::ALL.iter().map(|k| Tex::new(device, "tc_set", res, res, display_format(*k), mips)).collect(); + tex.push(Tex::new(device, "tc_aux", res.min(2048), res.min(2048), wgpu::TextureFormat::Rgba8Unorm, mip_count(res.min(2048)))); + for (t, k) in tex.iter().zip(DisplayKind::ALL.iter().map(|k| Some(*k)).chain(std::iter::once(None))) { + let texel = k.map(default_texel).unwrap_or_else(|| vec![128, 128, 128, 255]); + let (w, h) = (t.texture.width(), t.texture.height()); + let row: Vec = texel.iter().copied().cycle().take(texel.len() * w as usize).collect(); + let data: Vec = row.iter().copied().cycle().take(row.len() * h as usize).collect(); + queue.write_texture( + wgpu::TexelCopyTextureInfo { texture: &t.texture, mip_level: 0, origin: wgpu::Origin3d::ZERO, aspect: wgpu::TextureAspect::All }, + &data, + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(w * texel.len() as u32), rows_per_image: Some(h) }, + wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 }, + ); + } + let bind_group = self.set_bind_group(device, &tex); + let n = tex.len(); + let gpu = SetGpu { res, tex, bind_group, mips_dirty: vec![true; n] }; + if i < self.sets.len() { + self.sets[i] = gpu; + } else { + self.sets.push(gpu); + } + reset.push(i); + } + self.material_sets = vec![None; material_count]; + for (i, &(_, m)) in sets.iter().enumerate() { + if let Some(slot) = self.material_sets.get_mut(m) { + *slot = Some(i); + } + } + reset + } + + fn set_bind_group(&self, device: &wgpu::Device, tex: &[Tex]) -> wgpu::BindGroup { + let mut entries: Vec = + tex.iter().enumerate().map(|(i, t)| wgpu::BindGroupEntry { binding: i as u32, resource: wgpu::BindingResource::TextureView(&t.view) }).collect(); + entries.push(wgpu::BindGroupEntry { binding: 6, resource: wgpu::BindingResource::Sampler(&self.sampler) }); + device.create_bind_group(&wgpu::BindGroupDescriptor { label: Some("tc_set"), layout: &self.set_bgl, entries: &entries }) + } + + /// Upload one 64×64 tile of a display texture (bytes from `compose::tile_bytes`). + pub fn upload_tile(&mut self, queue: &wgpu::Queue, ts: usize, kind: DisplayKind, tx: u32, ty: u32, bytes: &[u8]) { + let Some(set) = self.sets.get_mut(ts) else { return }; + let Some(ki) = DisplayKind::ALL.iter().position(|k| *k == kind) else { return }; + let Some(t) = set.tex.get(ki) else { return }; + let bpt = kind.bytes_per_texel() as u32; + let (x, y) = (tx * TILE, ty * TILE); + if x >= set.res || y >= set.res || bytes.len() < (TILE * TILE * bpt) as usize { + return; + } + let (w, h) = (TILE.min(set.res - x), TILE.min(set.res - y)); + queue.write_texture( + wgpu::TexelCopyTextureInfo { texture: &t.texture, mip_level: 0, origin: wgpu::Origin3d { x, y, z: 0 }, aspect: wgpu::TextureAspect::All }, + bytes, + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(TILE * bpt), rows_per_image: Some(TILE) }, + wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 }, + ); + self.content_rev += 1; + if let Some(d) = set.mips_dirty.get_mut(ki) { + *d = true; + } + } + + /// Upload the aux (mesh map / debug) texture of a set: RGBA8, `size × size`. + pub fn upload_aux(&mut self, queue: &wgpu::Queue, ts: usize, size: u32, rgba: &[u8]) { + let Some(set) = self.sets.get_mut(ts) else { return }; + let Some(t) = set.tex.last() else { return }; + let (w, h) = (t.texture.width(), t.texture.height()); + if size != w || rgba.len() < (w * h * 4) as usize { + return; + } + queue.write_texture( + wgpu::TexelCopyTextureInfo { texture: &t.texture, mip_level: 0, origin: wgpu::Origin3d::ZERO, aspect: wgpu::TextureAspect::All }, + rgba, + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(w * 4), rows_per_image: Some(h) }, + wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 }, + ); + self.content_rev += 1; + if let Some(d) = set.mips_dirty.last_mut() { + *d = true; + } + } + + /// Size of the aux texture of a set. + pub fn aux_size(&self, ts: usize) -> Option { + self.sets.get(ts).and_then(|s| s.tex.last()).map(|t| t.texture.width()) + } + + fn generate_mips(&mut self, device: &wgpu::Device, encoder: &mut wgpu::CommandEncoder) { + for si in 0..self.sets.len() { + for ti in 0..self.sets[si].tex.len() { + if !self.sets[si].mips_dirty.get(ti).copied().unwrap_or(false) { + continue; + } + let format = self.sets[si].tex[ti].format; + if !self.mip_pipelines.contains_key(&format) { + let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: Some("tc_mip"), + bind_group_layouts: &[Some(&self.mip_bgl)], + immediate_size: 0, + }); + let p = pipeline(device, "tc_mip", &layout, &self.util_module, "vs_full", &[], Some(("fs_mip", format, None)), 1, None); + self.mip_pipelines.insert(format, p); + } + let Some(pipe) = self.mip_pipelines.get(&format) else { continue }; + let t = &self.sets[si].tex[ti]; + for level in 1..t.mips { + let src = t.texture.create_view(&wgpu::TextureViewDescriptor { base_mip_level: level - 1, mip_level_count: Some(1), ..Default::default() }); + let dst = t.texture.create_view(&wgpu::TextureViewDescriptor { base_mip_level: level, mip_level_count: Some(1), ..Default::default() }); + let bg = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_mip"), + layout: &self.mip_bgl, + entries: &[ + wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureView(&src) }, + wgpu::BindGroupEntry { binding: 1, resource: wgpu::BindingResource::Sampler(&self.sampler) }, + ], + }); + fullscreen(encoder, "tc_mip", &dst, CLEAR, pipe, &bg); + } + if let Some(d) = self.sets[si].mips_dirty.get_mut(ti) { + *d = false; + } + } + } + } + + /// Effect bind group (`fx_bgl`): source texture, the post uniform, an extra texture. + fn fx_bind_group(&self, device: &wgpu::Device, src: &wgpu::TextureView, aux: &wgpu::TextureView, post: &wgpu::Buffer) -> wgpu::BindGroup { + device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_fx"), + layout: &self.fx_bgl, + entries: &[ + wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureView(src) }, + wgpu::BindGroupEntry { binding: 1, resource: wgpu::BindingResource::Sampler(&self.sampler) }, + wgpu::BindGroupEntry { binding: 3, resource: post.as_entire_binding() }, + wgpu::BindGroupEntry { binding: 4, resource: wgpu::BindingResource::TextureView(aux) }, + ], + }) + } + + fn create_targets(&self, device: &wgpu::Device, size: [u32; 2]) -> ViewTargets { + let hdr = target_view(device, "tc_hdr", size, self.hdr_format, 1); + let accum = target_view(device, "tc_accum", size, self.hdr_format, 1); + let accum_bg = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_accum"), + layout: &self.mip_bgl, + entries: &[ + wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureView(&hdr) }, + wgpu::BindGroupEntry { binding: 1, resource: wgpu::BindingResource::Sampler(&self.sampler) }, + ], + }); + let usage = wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_SRC; + let resolve = texture(device, "tc_resolve", size, COLOR_FORMAT, 1, usage); + let resolve_view = resolve.create_view(&Default::default()); + let uniform = |label: &str, size: usize| { + device.create_buffer(&wgpu::BufferDescriptor { + label: Some(label), + size: size as u64, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }) + }; + let post_buf = uniform("tc_post", std::mem::size_of::()); + let blit_buf = uniform("tc_blit", std::mem::size_of::()); + let blit_bg = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_blit"), + layout: &self.blit_bgl, + entries: &[ + wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureView(&resolve_view) }, + wgpu::BindGroupEntry { binding: 1, resource: wgpu::BindingResource::Sampler(&self.sampler) }, + wgpu::BindGroupEntry { binding: 2, resource: blit_buf.as_entire_binding() }, + ], + }); + ViewTargets { + size, + msaa: target_view(device, "tc_msaa", size, self.hdr_format, MSAA), + depth: target_view(device, "tc_depth", size, DEPTH_FORMAT, MSAA), + post_bg: self.fx_bind_group(device, &accum, &self.black, &post_buf), + hdr, + accum, + accum_bg, + history: None, + samples: 0, + resolve, + resolve_view, + globals: uniform("tc_globals", std::mem::size_of::()), + globals_bg: None, + post_buf, + bloom: None, + blit_buf, + blit_bg, + ready: false, + } + } + + /// The bloom pyramid of `v`, and the post bind group that reads it. + fn create_bloom(&self, device: &wgpu::Device, v: &ViewTargets) -> (Bloom, wgpu::BindGroup) { + let levels: Vec = + (1..=BLOOM_LEVELS).map(|i| target_view(device, "tc_bloom", [(v.size[0] >> i).max(1), (v.size[1] >> i).max(1)], self.hdr_format, 1)).collect(); + let fx = |src: &wgpu::TextureView| self.fx_bind_group(device, src, &self.black, &v.post_buf); + let down = std::iter::once(&v.accum).chain(&levels).take(levels.len()).map(fx).collect(); + let up = levels.iter().skip(1).map(fx).collect(); + let post_bg = self.fx_bind_group(device, &v.accum, levels.first().unwrap_or(&self.black), &v.post_buf); + (Bloom { levels, down, up }, post_bg) + } + + fn targets(&mut self, device: &wgpu::Device, id: u64, size: [u32; 2], bloom: bool) -> Option<&mut ViewTargets> { + let size = [size[0].clamp(1, 8192), size[1].clamp(1, 8192)]; + if self.views.get(&id).is_none_or(|v| v.size != size) { + let v = self.create_targets(device, size); + self.views.insert(id, v); + } + if bloom + && let Some(v) = self.views.get(&id) + && v.bloom.is_none() + { + let (b, post_bg) = self.create_bloom(device, v); + let v = self.views.get_mut(&id)?; + v.bloom = Some(b); + v.post_bg = post_bg; + } + let (env_view, shadow_view) = (&self.env.view, &self.shadow.view); + let (bgl, env_sampler, shadow_sampler) = (&self.globals_bgl, &self.env_sampler, &self.shadow_sampler); + let v = self.views.get_mut(&id)?; + if v.globals_bg.is_none() { + v.globals_bg = Some(device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("tc_globals"), + layout: bgl, + entries: &[ + wgpu::BindGroupEntry { binding: 0, resource: v.globals.as_entire_binding() }, + wgpu::BindGroupEntry { binding: 1, resource: wgpu::BindingResource::TextureView(env_view) }, + wgpu::BindGroupEntry { binding: 2, resource: wgpu::BindingResource::Sampler(env_sampler) }, + wgpu::BindGroupEntry { binding: 3, resource: wgpu::BindingResource::TextureView(shadow_view) }, + wgpu::BindGroupEntry { binding: 4, resource: wgpu::BindingResource::Sampler(shadow_sampler) }, + ], + })); + } + Some(v) + } + + /// Index ranges of `ranges` (first, count, material) whose texture set is visible (and is + /// `only`, when given), with that set. + fn drawable<'a>(&'a self, ranges: &'a [(u32, u32, usize)], visible: &'a [bool], only: Option) -> impl Iterator, &'a SetGpu)> + 'a { + ranges.iter().filter_map(move |&(start, count, material)| { + let ts = self.material_sets.get(material).copied().flatten()?; + if only.is_some_and(|o| o != ts) || !visible.get(ts).copied().unwrap_or(true) { + return None; + } + Some((start..start + count, self.sets.get(ts)?)) + }) + } + + /// Keep the key-light shadow map current; returns its view-projection. `light` points to + /// the light (world space). Re-renders only when the mesh, light or visible sets changed. + /// shortcut: casters are fully opaque (the dithered opacity cut-out is ignored) and the map is + /// one shared buffer, so two 3D views with different lights in one frame would share the last + /// light; upgrade to a per-view map if split 3D views get their own lights. + fn update_shadow(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, encoder: &mut wgpu::CommandEncoder, light: Vec3, visible: &[bool]) -> Option { + let l = light.try_normalize()?; + let (id, center, radius) = self.mesh.as_ref().map(|m| (m.id, m.center, m.radius))?; + if self.shadow.size != SHADOW_SIZE { + self.shadow.view = shadow_view(device, SHADOW_SIZE); + self.shadow.size = SHADOW_SIZE; + self.shadow.key = None; + for v in self.views.values_mut() { + v.globals_bg = None; + } + } + let key = (id, l.to_array().map(f32::to_bits)); + if self.shadow.key == Some(key) && self.shadow.visible == visible { + return Some(self.shadow.vp); + } + // An orthographic light frustum around the mesh's bounding sphere. + let up = if l.y.abs() > 0.99 { Vec3::Z } else { Vec3::Y }; + let vp = Mat4::orthographic_rh(-radius, radius, -radius, radius, radius * 0.5, radius * 3.5) * Mat4::look_at_rh(center + l * radius * 2.0, center, up); + queue.write_buffer(&self.shadow.buf, 0, bytemuck::bytes_of(&vp.to_cols_array_2d())); + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("tc_shadow"), + color_attachments: &[], + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &self.shadow.view, + depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), store: wgpu::StoreOp::Store }), + stencil_ops: None, + }), + timestamp_writes: None, + occlusion_query_set: None, + multiview_mask: None, + }); + pass.set_pipeline(&self.shadow_pipeline); + pass.set_bind_group(0, &self.shadow.bg, &[]); + if let Some(m) = &self.mesh { + pass.set_vertex_buffer(0, m.vb.slice(..)); + pass.set_index_buffer(m.ib.slice(..), wgpu::IndexFormat::Uint32); + for (range, _) in self.drawable(&m.draws, visible, None) { + pass.draw_indexed(range, 0, 0..1); + } + } + drop(pass); + self.shadow.key = Some(key); + self.shadow.visible = visible.to_vec(); + self.shadow.vp = vp; + Some(vp) + } + + /// Whether view `id` is still accumulating anti-aliasing samples: the shell should draw it + /// again even though nothing changed. + pub fn accumulating(&self, id: u64) -> bool { + self.views.get(&id).is_some_and(|v| v.history.as_ref().is_some_and(|(f, _)| f.shade.taa && f.kind == ViewKind::Scene) && v.samples + 1 < TAA_SAMPLES) + } + + /// Render `frame` into its offscreen target (and regenerate dirty mips). A 3D frame with + /// `shade.taa` that repeats the previous one adds a jittered sample to the average instead, + /// and renders nothing once [`TAA_SAMPLES`] are in. + pub fn prepare(&mut self, device: &wgpu::Device, queue: &wgpu::Queue, encoder: &mut wgpu::CommandEncoder, frame: &Frame) { + self.generate_mips(device, encoder); + let rev = self.content_rev; + let sample = match self.views.get(&frame.view_id) { + Some(v) if frame.shade.taa && frame.kind == ViewKind::Scene && v.history.as_ref().is_some_and(|(f, r)| *r == rev && f == frame) => v.samples + 1, + _ => 0, + }; + if sample >= TAA_SAMPLES { + return; + } + let aspect = frame.size[0].max(1) as f32 / frame.size[1].max(1) as f32; + let mut vp = frame.camera.view_proj(aspect); + if sample > 0 { + // Sub-pixel jitter in clip space: a box filter over the pixel once averaged. + let (jx, jy) = (halton(sample, 2) - 0.5, halton(sample, 3) - 0.5); + vp = Mat4::from_translation(Vec3::new(2.0 * jx / frame.size[0].max(1) as f32, 2.0 * jy / frame.size[1].max(1) as f32, 0.0)) * vp; + } + let s = &frame.shade; + let (uv_view, uv_xform) = match frame.kind { + ViewKind::Scene => (0.0, [1.0, 1.0, 0.0, 0.0]), + ViewKind::Uv { zoom, pan, .. } => { + // Fit the 0..1 square into the view, keeping texels square. + let z = zoom.clamp(0.05, 64.0) * 0.92; + let (sx, sy) = if aspect >= 1.0 { (z / aspect, z) } else { (z, z * aspect) }; + (1.0, [sx, sy, pan[0], pan[1]]) + } + }; + // Data views (channels, mesh maps, UV checker, the 2D view) show values as they are: no + // exposure, tone mapping, effects or shadows. + let data = uv_view > 0.5 || s.view_mode != 0; + let fx = |v: f32| if s.post_effects && !data { v.clamp(0.0, 1.0) } else { 0.0 }; + let bloom = fx(s.bloom) > 0.0; + // The key light lives in the environment: turn it with it (the inverse of env_rotate in + // mesh.wgsl maps environment directions to world directions). + let (sin, cos) = s.env_rotation_deg.to_radians().sin_cos(); + let [lx, ly, lz, lw] = s.light; + let light = Vec3::new(cos * lx + sin * lz, ly, cos * lz - sin * lx); + let shadow_vp = if !data && s.shadows && lw > 0.0 { self.update_shadow(device, queue, encoder, light, &frame.visible) } else { None }; + let radius = self.mesh.as_ref().map_or(1.0, |m| m.radius); + // Background rays come from a perspective camera even in orthographic views (an ortho + // ray grid would show a single flat environment color). + let bg_vp = OrbitCamera { ortho: false, ..frame.camera }.view_proj(aspect); + let e = frame.camera.eye(); + let raw = GlobalsRaw { + view_proj: vp.to_cols_array_2d(), + inv_view_proj: bg_vp.inverse().to_cols_array_2d(), + eye: [e.x, e.y, e.z, 0.0], + env: [s.env_rotation_deg.to_radians(), (ENV_LEVELS - 1) as f32, s.ao_intensity, 0.0], + sh: self.sh, + mode: [s.view_mode as f32, s.channel as f32, s.height_strength, s.normal_y], + bg: [s.env_opacity, s.env_blur * (ENV_LEVELS - 1) as f32, uv_view, 0.0], + uv_xform, + light: [light.x, light.y, light.z, lw], + light_vp: shadow_vp.unwrap_or(Mat4::IDENTITY).to_cols_array_2d(), + // Normal offset: 1.5 shadow texels of the light frustum (2 × radius wide). + shadow: [if shadow_vp.is_some() { 1.0 } else { 0.0 }, 1.0 / SHADOW_SIZE as f32, radius * 3.0 / SHADOW_SIZE as f32, 0.0], + material: [if s.spec_gloss { 1.0 } else { 0.0 }, if s.parallax { 1.0 } else { 0.0 }, sample as f32, 0.0], + }; + let flag = |b: bool| if b { 1.0 } else { 0.0 }; + let post = PostRaw { + a: [2f32.powf(s.exposure_ev), flag(s.aces), flag(data), fx(s.bloom) * BLOOM_GAIN], + b: [fx(s.vignette), fx(s.sharpen), fx(s.grain), BLOOM_THRESHOLD], + }; + let Some(v) = self.targets(device, frame.view_id, frame.size, bloom) else { return }; + queue.write_buffer(&v.globals, 0, bytemuck::bytes_of(&raw)); + queue.write_buffer(&v.post_buf, 0, bytemuck::bytes_of(&post)); + v.ready = true; + v.history = Some((frame.clone(), rev)); + v.samples = sample; + let Some(v) = self.views.get(&frame.view_id) else { return }; + let Some(globals_bg) = v.globals_bg.as_ref() else { return }; + if sample == 0 { + self.scene_pass(encoder, v, &v.accum, globals_bg, frame); + } else { + self.scene_pass(encoder, v, &v.hdr, globals_bg, frame); + fullscreen_blend(encoder, "tc_accum", &v.accum, wgpu::LoadOp::Load, &self.accum_pipeline, &v.accum_bg, 1.0 / f64::from(sample + 1)); + } + if bloom && let Some(b) = &v.bloom { + let [pre, down, up] = &self.bloom_pipelines; + for (i, (level, bg)) in b.levels.iter().zip(&b.down).enumerate() { + fullscreen(encoder, "tc_bloom_down", level, CLEAR, if i == 0 { pre } else { down }, bg); + } + for (level, bg) in b.levels.iter().zip(&b.up).rev() { + fullscreen(encoder, "tc_bloom_up", level, wgpu::LoadOp::Load, up, bg); + } + } + fullscreen(encoder, "tc_post", &v.resolve_view, CLEAR, &self.post_pipeline, &v.post_bg); + } + + /// Background, mesh and wireframe into the view's MSAA HDR target, resolved to `resolve`. + fn scene_pass(&self, encoder: &mut wgpu::CommandEncoder, v: &ViewTargets, resolve: &wgpu::TextureView, globals_bg: &wgpu::BindGroup, frame: &Frame) { + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("tc_view"), + color_attachments: &[Some(wgpu::RenderPassColorAttachment { + view: &v.msaa, + resolve_target: Some(resolve), + depth_slice: None, + ops: wgpu::Operations { load: CLEAR, store: wgpu::StoreOp::Discard }, + })], + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &v.depth, + depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), store: wgpu::StoreOp::Discard }), + stencil_ops: None, + }), + timestamp_writes: None, + occlusion_query_set: None, + multiview_mask: None, + }); + pass.set_bind_group(0, globals_bg, &[]); + pass.set_pipeline(&self.bg_pipeline); + pass.draw(0..3, 0..1); + let Some(m) = &self.mesh else { return }; + let uv_ts = match frame.kind { + ViewKind::Scene => None, + ViewKind::Uv { ts, .. } => Some(ts), + }; + let (pipe, wire) = match uv_ts { + None => (&self.mesh_pipeline, frame.shade.wireframe_3d.then_some(&self.wire3d_pipeline)), + Some(_) => (&self.uv_pipeline, frame.shade.wireframe.then_some(&self.wire_pipeline)), + }; + pass.set_vertex_buffer(0, m.vb.slice(..)); + for (pipe, ib, ranges) in [(Some(pipe), &m.ib, &m.draws), (wire, &m.lines, &m.line_draws)] { + let Some(pipe) = pipe else { continue }; + pass.set_pipeline(pipe); + pass.set_index_buffer(ib.slice(..), wgpu::IndexFormat::Uint32); + for (range, set) in self.drawable(ranges, &frame.visible, uv_ts) { + pass.set_bind_group(1, &set.bind_group, &[]); + pass.draw_indexed(range, 0, 0..1); + } + } + } + + /// Draw view `id` into the current pass at `rect` (target pixels: x, y, w, h). + pub fn blit(&self, queue: &wgpu::Queue, pass: &mut wgpu::RenderPass<'_>, id: u64, rect: [f32; 4], target_size: [u32; 2]) { + let Some(v) = self.views.get(&id).filter(|v| v.ready) else { return }; + let raw = BlitRaw { rect, dst: [target_size[0] as f32, target_size[1] as f32, if self.target_format.is_srgb() { 1.0 } else { 0.0 }, 0.0] }; + queue.write_buffer(&v.blit_buf, 0, bytemuck::bytes_of(&raw)); + pass.set_pipeline(&self.blit_pipeline); + pass.set_bind_group(0, &v.blit_bg, &[]); + pass.draw(0..6, 0..1); + } + + /// Write the blit rectangle for view `id` (call from `prepare` when the pass can't write + /// buffers itself). + pub fn set_blit_rect(&self, queue: &wgpu::Queue, id: u64, rect: [f32; 4], target_size: [u32; 2]) { + if let Some(v) = self.views.get(&id) { + let raw = BlitRaw { rect, dst: [target_size[0] as f32, target_size[1] as f32, if self.target_format.is_srgb() { 1.0 } else { 0.0 }, 0.0] }; + queue.write_buffer(&v.blit_buf, 0, bytemuck::bytes_of(&raw)); + } + } + + /// Draw view `id` with the rectangle set by [`Renderer::set_blit_rect`]. + pub fn blit_prepared(&self, pass: &mut wgpu::RenderPass<'_>, id: u64) { + let Some(v) = self.views.get(&id).filter(|v| v.ready) else { return }; + pass.set_pipeline(&self.blit_pipeline); + pass.set_bind_group(0, &v.blit_bg, &[]); + pass.draw(0..6, 0..1); + } + + /// Read back the rendered view as tightly packed RGBA8 (sRGB-encoded), blocking. + pub fn read_view(&self, device: &wgpu::Device, queue: &wgpu::Queue, id: u64) -> Option<(u32, u32, Vec)> { + let v = self.views.get(&id)?; + let (w, h) = (v.size[0], v.size[1]); + let row = (w * 4).next_multiple_of(256); + let buf = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("tc_read"), + size: (row * h) as u64, + usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ, + mapped_at_creation: false, + }); + let mut enc = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: Some("tc_read") }); + enc.copy_texture_to_buffer( + wgpu::TexelCopyTextureInfo { texture: &v.resolve, mip_level: 0, origin: wgpu::Origin3d::ZERO, aspect: wgpu::TextureAspect::All }, + wgpu::TexelCopyBufferInfo { buffer: &buf, layout: wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(row), rows_per_image: Some(h) } }, + wgpu::Extent3d { width: w, height: h, depth_or_array_layers: 1 }, + ); + queue.submit([enc.finish()]); + buf.slice(..).map_async(wgpu::MapMode::Read, |_| {}); + let _ = device.poll(wgpu::PollType::Wait { submission_index: None, timeout: None }); + let data = buf.slice(..).get_mapped_range().ok()?; + let mut out = Vec::with_capacity((w * h * 4) as usize); + for y in 0..h as usize { + let start = y * row as usize; + out.extend_from_slice(data.get(start..start + (w * 4) as usize)?); + } + Some((w, h, out)) + } + + /// Forget a view's targets (e.g. a closed panel). + pub fn drop_view(&mut self, id: u64) { + self.views.remove(&id); + } +} diff --git a/crates/render/src/shaders/mesh.wgsl b/crates/render/src/shaders/mesh.wgsl new file mode 100644 index 00000000..eb7bf82a --- /dev/null +++ b/crates/render/src/shaders/mesh.wgsl @@ -0,0 +1,393 @@ +// TextureCraft viewport shaders: metal/roughness (or specular/glossiness) PBR with image-based +// lighting and optional parallax occlusion mapping, the 2D UV view, +// the background, debug views and the 3D wireframe. Output is scene-linear HDR, premultiplied by +// alpha = scene coverage over the flat studio backdrop; exposure, tone mapping and sRGB encoding +// happen in the post pass (post.wgsl). WebGPU/WebGL2-safe (fragment passes only). + +struct Globals { + view_proj: mat4x4, + inv_view_proj: mat4x4, // background rays: a perspective camera even when the view is orthographic + eye: vec4, // xyz eye position, w - + env: vec4, // x rotation (radians), y max lod, z AO intensity, w - + sh: array, 9>, + mode: vec4, // x view mode (0 material, 1 channel, 2 mesh map, 3 UV checker), y channel index, z height strength, w normal Y sign + bg: vec4, // x environment opacity, y background blur lod, z UV view (1) or 3D (0), w wireframe opacity + uv_xform: vec4, // UV view: scale xy, offset zw (clip space) + light: vec4, // xyz world direction to the key light (rotated with the environment), w intensity (0 = off) + light_vp: mat4x4, // world -> shadow map clip space + shadow: vec4, // x shadows on (1), y shadow map texel (uv), z normal offset (world units), w - + material: vec4, // x specular/glossiness shading (1), y parallax occlusion (1), z accumulation sample index, w - +}; + +@group(0) @binding(0) var g: Globals; +@group(0) @binding(1) var env_tex: texture_2d; +@group(0) @binding(2) var env_samp: sampler; +@group(0) @binding(3) var shadow_map: texture_depth_2d; +@group(0) @binding(4) var shadow_samp: sampler_comparison; + +@group(1) @binding(0) var t_base: texture_2d; +@group(1) @binding(1) var t_orm: texture_2d; +@group(1) @binding(2) var t_nrm: texture_2d; +@group(1) @binding(3) var t_height: texture_2d; +@group(1) @binding(4) var t_emis: texture_2d; +@group(1) @binding(5) var t_aux: texture_2d; +@group(1) @binding(6) var samp: sampler; + +struct VIn { + @location(0) pos: vec3, + @location(1) nrm: vec3, + @location(2) tan: vec4, + @location(3) uv: vec2, +}; + +struct VOut { + @builtin(position) clip: vec4, + @location(0) wpos: vec3, + @location(1) nrm: vec3, + @location(2) tan: vec4, + @location(3) uv: vec2, +}; + +@vertex +fn vs_mesh(v: VIn) -> VOut { + var o: VOut; + o.clip = g.view_proj * vec4(v.pos, 1.0); + o.wpos = v.pos; + o.nrm = v.nrm; + o.tan = v.tan; + o.uv = v.uv; + return o; +} + +@vertex +fn vs_uv(v: VIn) -> VOut { + var o: VOut; + let p = vec2(v.uv.x * 2.0 - 1.0, 1.0 - v.uv.y * 2.0) * g.uv_xform.xy + g.uv_xform.zw; + o.clip = vec4(p, 0.5, 1.0); + o.wpos = v.pos; + o.nrm = v.nrm; + o.tan = v.tan; + o.uv = v.uv; + return o; +} + +const PI: f32 = 3.14159265; + +fn env_uv(d: vec3) -> vec2 { + let c = cos(g.env.x); + let s = sin(g.env.x); + let r = vec3(c * d.x - s * d.z, d.y, s * d.x + c * d.z); + let phi = atan2(r.z, r.x); + return vec2(fract(phi / (2.0 * PI) + 1.0), acos(clamp(r.y, -1.0, 1.0)) / PI); +} + +fn env_rotate(d: vec3) -> vec3 { + let c = cos(g.env.x); + let s = sin(g.env.x); + return vec3(c * d.x - s * d.z, d.y, s * d.x + c * d.z); +} + +fn sh_irradiance(n0: vec3) -> vec3 { + let n = env_rotate(n0); + let x = n.x; + let y = n.y; + let z = n.z; + var r = g.sh[0].xyz * 0.282095; + r += g.sh[1].xyz * (0.488603 * y); + r += g.sh[2].xyz * (0.488603 * z); + r += g.sh[3].xyz * (0.488603 * x); + r += g.sh[4].xyz * (1.092548 * x * y); + r += g.sh[5].xyz * (1.092548 * y * z); + r += g.sh[6].xyz * (0.315392 * (3.0 * z * z - 1.0)); + r += g.sh[7].xyz * (1.092548 * x * z); + r += g.sh[8].xyz * (0.546274 * (x * x - y * y)); + return max(r, vec3(0.0)); +} + +// Analytic split-sum environment BRDF (Karis, "Physically Based Shading on Mobile"). +fn env_brdf(f0: vec3, rough: f32, nov: f32) -> vec3 { + let c0 = vec4(-1.0, -0.0275, -0.572, 0.022); + let c1 = vec4(1.0, 0.0425, 1.04, -0.04); + let r = rough * c0 + c1; + let a004 = min(r.x * r.x, exp2(-9.28 * nov)) * r.x + r.y; + let ab = vec2(-1.04, 1.04) * a004 + r.zw; + return f0 * ab.x + ab.y; +} + +fn to_linear(c: vec3) -> vec3 { + let lo = c / 12.92; + let hi = pow((c + 0.055) / 1.055, vec3(2.4)); + return select(hi, lo, c <= vec3(0.04045)); +} + +// Data views bypass exposure and tone mapping: linear color, clamped. +fn data_out(c: vec3) -> vec4 { + return vec4(clamp(c, vec3(0.0), vec3(1.0)), 1.0); +} + +// A value shown as-is on screen (normals, height, masks): undo the post pass's sRGB encoding. +fn raw_out(v: vec3) -> vec4 { + return vec4(to_linear(clamp(v, vec3(0.0), vec3(1.0))), 1.0); +} + +// Key-light visibility from the shadow map: 3x3 hardware-filtered PCF taps. +fn shadow_factor(wpos: vec3, n_geo: vec3) -> f32 { + let p = g.light_vp * vec4(wpos + n_geo * g.shadow.z, 1.0); + let ndc = p.xyz / p.w; + let uv = vec2(ndc.x * 0.5 + 0.5, 0.5 - ndc.y * 0.5); + if (any(uv < vec2(0.0)) || any(uv > vec2(1.0)) || ndc.z >= 1.0) { + return 1.0; + } + let depth = ndc.z - 0.0005; + var s = 0.0; + for (var y = -1; y <= 1; y++) { + for (var x = -1; x <= 1; x++) { + s += textureSampleCompareLevel(shadow_map, shadow_samp, uv + vec2(f32(x), f32(y)) * g.shadow.y * 1.5, depth); + } + } + return s / 9.0; +} + +// Reoriented normal mapping of a detail normal onto a base normal (tangent space, unpacked). +fn rnm(base: vec3, detail: vec3) -> vec3 { + let t = base + vec3(0.0, 0.0, 1.0); + let u = detail * vec3(-1.0, -1.0, 1.0); + return normalize(t * dot(t, u) - u * t.z); +} + +fn hash12(p: vec2) -> f32 { + var p3 = fract(vec3(p.xyx) * 0.1031); + p3 += dot(p3, p3.yzx + 33.33); + return fract((p3.x + p3.y) * p3.z); +} + +const PARALLAX_STEPS: i32 = 16; + +// Parallax occlusion mapping: march the view ray down through the signed height field (the mesh +// surface at height 0; height 1 lies strength/16 UV units above it, the same scale as +// height-to-normal) and return the UV where it first goes below the heights. `v_ts`: tangent-space +// direction to the eye (+y = up the image, so v grows along -y). A fixed step count keeps the +// loop free of data-dependent exits (derivatives stay valid after it). +fn parallax_uv(uv: vec2, v_ts: vec3) -> vec2 { + let dx = dpdx(uv); + let dy = dpdy(uv); + // UV shift per unit of height along the ray (grazing angles capped). + let shift = vec2(v_ts.x, -v_ts.y) / max(v_ts.z, 0.15) * (g.mode.z / 16.0); + var prev_z = 1.0; + var prev_d = 1.0 - textureSampleGrad(t_height, samp, uv + shift, dx, dy).r; + // Heights at the top of the range already hide the ray at entry. + var found = prev_d <= 0.0; + var hit = select(-1.0, 1.0, found); + for (var k = 1; k <= PARALLAX_STEPS; k++) { + let z = 1.0 - 2.0 * f32(k) / f32(PARALLAX_STEPS); + let d = z - textureSampleGrad(t_height, samp, uv + shift * z, dx, dy).r; + if (!found && d <= 0.0) { + // Linear refinement between the last step above and the first below the surface. + hit = mix(prev_z, z, prev_d / max(prev_d - d, 1e-5)); + found = true; + } + prev_z = z; + prev_d = d; + } + return uv + shift * hit; +} + +@fragment +fn fs_mesh(i: VOut, @builtin(front_facing) front: bool) -> @location(0) vec4 { + var n_geo = normalize(i.nrm); + if (!front) { + n_geo = -n_geo; + } + let t = normalize(i.tan.xyz - n_geo * dot(n_geo, i.tan.xyz)); + let b = cross(n_geo, t) * i.tan.w; + let v = normalize(g.eye.xyz - i.wpos); + var uv = i.uv; + if (g.material.y > 0.5) { + uv = parallax_uv(uv, vec3(dot(v, t), dot(v, b), dot(v, n_geo))); + } + let base_s = textureSample(t_base, samp, uv); + let orm = textureSample(t_orm, samp, uv); + let nrm_s = textureSample(t_nrm, samp, uv).xyz; + let emis = textureSample(t_emis, samp, uv).rgb; + let aux = textureSample(t_aux, samp, uv); + let dims = vec2(textureDimensions(t_height)); + let ts = 1.0 / dims; + let hgt = textureSample(t_height, samp, uv); + let hc = hgt.r; + let hl = textureSample(t_height, samp, uv - vec2(ts.x, 0.0)).r; + let hr = textureSample(t_height, samp, uv + vec2(ts.x, 0.0)).r; + let hu = textureSample(t_height, samp, uv - vec2(0.0, ts.y)).r; + let hd = textureSample(t_height, samp, uv + vec2(0.0, ts.y)).r; + + // Tangent-space normal: height gradient (+Y = up the image) combined with the normal channel. + // Same slope rule as texture export: strength 1 tilts 45° for a height change of 1 over 1/16 of the width. + let k = g.mode.z * dims.x / 16.0; + let n_height = normalize(vec3(-(hr - hl) * 0.5 * k, (hd - hu) * 0.5 * k, 1.0)); + var n_detail = nrm_s * 2.0 - 1.0; + n_detail.y *= g.mode.w; + let n_ts = rnm(n_height, normalize(n_detail)); + let n = normalize(t * n_ts.x + b * n_ts.y + n_geo * n_ts.z); + + let mode = i32(g.mode.x + 0.5); + if (mode == 1) { + let ch = i32(g.mode.y + 0.5); + switch ch { + case 0: { return data_out(base_s.rgb); } + case 1: { return data_out(vec3(orm.b)); } + case 2: { return data_out(vec3(orm.g)); } + case 3: { return raw_out(n_ts * 0.5 + 0.5); } + case 4: { return raw_out(vec3(hc * 0.5 + 0.5)); } + case 5: { return data_out(emis); } + case 6: { return raw_out(vec3(base_s.a)); } + case 7: { return raw_out(vec3(orm.r)); } + case 9: { return data_out(hgt.gba); } + case 10: { return data_out(vec3(1.0 - orm.g)); } + default: { return raw_out(vec3(orm.a)); } + } + } + if (mode == 2) { + return raw_out(aux.rgb); + } + if (mode == 3) { + let c = floor(uv * 32.0); + let chk = (c.x + c.y) - 2.0 * floor((c.x + c.y) * 0.5); + let fine = floor(uv * 256.0); + let f2 = (fine.x + fine.y) - 2.0 * floor((fine.x + fine.y) * 0.5); + let col = mix(vec3(0.85, 0.85, 0.85), vec3(0.18, 0.2, 0.24), chk) * (0.92 + 0.08 * f2); + let tint = vec3(fract(uv.x), fract(uv.y), 0.5) * 0.25; + let diff = max(dot(n, normalize(vec3(0.4, 0.8, 0.5))), 0.0) * 0.6 + 0.4; + return data_out((col + tint) * diff); + } + + // Opacity: dithered alpha test (a new pattern per accumulated frame, so it averages out). + if (base_s.a < hash12(i.clip.xy + g.material.z * vec2(17.0, 59.0))) { + discard; + } + + let albedo = base_s.rgb; + let ao = mix(1.0, orm.r, g.env.z); + let rough = clamp(orm.g, 0.045, 1.0); + let metal = orm.b; + let nov = clamp(abs(dot(n, v)), 1e-4, 1.0); + var f0 = mix(vec3(0.08 * orm.a), albedo, metal); + var diffuse_col = albedo * (1.0 - metal); + if (g.material.x > 0.5) { + // Specular/glossiness: the Specular color is F0 and base color the diffuse color, with + // the energy the specular takes removed (roughness already is 1 - glossiness). + f0 = hgt.gba; + diffuse_col = albedo * (1.0 - max(f0.r, max(f0.g, f0.b))); + } + + let diffuse = sh_irradiance(n) * diffuse_col * ao; + let r = reflect(-v, n); + let pre = textureSampleLevel(env_tex, env_samp, env_uv(r), rough * g.env.y).rgb; + // Horizon fading: reflections that point below the geometric surface are dimmed. + let horizon = clamp(1.0 + 1.3 * dot(r, n_geo), 0.0, 1.0); + let spec = pre * env_brdf(f0, rough, nov) * ao * horizon * horizon; + + var direct = vec3(0.0); + if (g.light.w > 0.0) { + let l = normalize(g.light.xyz); + let h = normalize(l + v); + let nol = max(dot(n, l), 0.0); + let noh = max(dot(n, h), 0.0); + let a = rough * rough; + let a2 = a * a; + let d = a2 / (PI * pow(noh * noh * (a2 - 1.0) + 1.0, 2.0)); + let vis = 0.5 / max(nol * sqrt(nov * nov * (1.0 - a2) + a2) + nov * sqrt(nol * nol * (1.0 - a2) + a2), 1e-5); + let f = f0 + (vec3(1.0) - f0) * pow(1.0 - max(dot(v, h), 0.0), 5.0); + direct = ((vec3(1.0) - f) * diffuse_col / PI + d * vis * f) * nol * g.light.w; + if (g.shadow.x > 0.5 && nol > 0.0) { + direct *= shadow_factor(i.wpos, n_geo); + } + } + + return vec4(diffuse + spec + direct + emis, 1.0); +} + +// The 2D UV view: unlit material color (or the selected debug channel) over the UV layout. +@fragment +fn fs_uv(i: VOut) -> @location(0) vec4 { + let base_s = textureSample(t_base, samp, i.uv); + let orm = textureSample(t_orm, samp, i.uv); + let mode = i32(g.mode.x + 0.5); + if (mode == 1) { + let ch = i32(g.mode.y + 0.5); + switch ch { + case 1: { return data_out(vec3(orm.b)); } + case 2: { return data_out(vec3(orm.g)); } + case 3: { return raw_out(textureSample(t_nrm, samp, i.uv).rgb); } + case 4: { return raw_out(vec3(textureSample(t_height, samp, i.uv).r * 0.5 + 0.5)); } + case 5: { return data_out(textureSample(t_emis, samp, i.uv).rgb); } + case 6: { return raw_out(vec3(base_s.a)); } + case 7: { return raw_out(vec3(orm.r)); } + case 8: { return raw_out(vec3(orm.a)); } + case 9: { return data_out(textureSample(t_height, samp, i.uv).gba); } + case 10: { return data_out(vec3(1.0 - orm.g)); } + default: { return data_out(base_s.rgb); } + } + } + if (mode == 2) { + return raw_out(textureSample(t_aux, samp, i.uv).rgb); + } + if (mode == 3) { + let c = floor(i.uv * 32.0); + let chk = (c.x + c.y) - 2.0 * floor((c.x + c.y) * 0.5); + return data_out(mix(vec3(0.85), vec3(0.18, 0.2, 0.24), chk)); + } + // Lightly shade by the AO so the flat 2D material view still reads as a surface. + return data_out(base_s.rgb * mix(1.0, orm.r, 0.5)); +} + +// Background: the blurred environment, premultiplied by its opacity (the post pass puts the flat +// studio backdrop behind it). +struct BgOut { + @builtin(position) pos: vec4, + @location(0) ndc: vec2, +}; + +@vertex +fn vs_bg(@builtin(vertex_index) vi: u32) -> BgOut { + var p = array, 3>(vec2(-1.0, -3.0), vec2(-1.0, 1.0), vec2(3.0, 1.0)); + var o: BgOut; + o.pos = vec4(p[vi], 1.0, 1.0); + o.ndc = p[vi]; + return o; +} + +@fragment +fn fs_bg(i: BgOut) -> @location(0) vec4 { + let o = g.bg.x; + if (g.bg.z > 0.5 || o <= 0.001) { + return vec4(0.0); + } + let a = g.inv_view_proj * vec4(i.ndc, 0.0, 1.0); + let b = g.inv_view_proj * vec4(i.ndc, 1.0, 1.0); + let d = normalize(b.xyz / b.w - a.xyz / a.w); + let env = textureSampleLevel(env_tex, env_samp, env_uv(d), g.bg.y).rgb; + return vec4(env * o, o); +} + +// UV wireframe in the 2D view. +@fragment +fn fs_wire(i: VOut) -> @location(0) vec4 { + return vec4(0.6, 0.6, 0.6, 0.16); +} + +// 3D wireframe over the shaded mesh: depth-tested, pulled slightly toward the camera so the +// lines win against their own triangles. +@vertex +fn vs_wire3d(v: VIn) -> VOut { + var o: VOut; + o.wpos = v.pos; + o.nrm = v.nrm; + o.tan = v.tan; + o.uv = v.uv; + o.clip = g.view_proj * vec4(v.pos + (g.eye.xyz - v.pos) * 0.002, 1.0); + return o; +} + +@fragment +fn fs_wire3d(i: VOut) -> @location(0) vec4 { + return vec4(0.35, 0.35, 0.35, 0.45); +} diff --git a/crates/render/src/shaders/post.wgsl b/crates/render/src/shaders/post.wgsl new file mode 100644 index 00000000..195d8244 --- /dev/null +++ b/crates/render/src/shaders/post.wgsl @@ -0,0 +1,133 @@ +// Viewport post processing, appended to util.wgsl (uses `src`, `src_samp`, `vs_full`): the +// resolved scene (linear HDR, premultiplied by scene coverage) → flat studio backdrop, exposure, +// tone mapping, optional bloom / sharpen / vignette / grain, sRGB encoding. + +struct Post { + a: vec4, // x exposure multiplier (2^EV), y tone mapping (0 linear, 1 ACES), z data view (1: no exposure, tone mapping or effects), w bloom strength + b: vec4, // x vignette, y sharpen, z grain, w bloom threshold +}; + +@group(0) @binding(3) var post: Post; +@group(0) @binding(4) var bloom_tex: texture_2d; + +// Narkowicz's fitted ACES filmic curve (pre-scaled so mid gray stays put). +fn aces(x: vec3) -> vec3 { + let v = x * 0.6; + return clamp((v * (2.51 * v + 0.03)) / (v * (2.43 * v + 0.59) + 0.14), vec3(0.0), vec3(1.0)); +} + +fn to_srgb(c: vec3) -> vec3 { + let lo = c * 12.92; + let hi = 1.055 * pow(max(c, vec3(0.0)), vec3(1.0 / 2.4)) - 0.055; + return select(hi, lo, c <= vec3(0.0031308)); +} + +fn tonemap(hdr: vec3) -> vec3 { + let x = max(hdr, vec3(0.0)) * post.a.x; + if (post.a.y > 0.5) { + return aces(x); + } + return min(x, vec3(1.0)); +} + +// The flat studio gray behind the scene, with a gentle falloff so the stage doesn't look like a hole. +fn backdrop(uv: vec2) -> vec3 { + let r = length(uv * 2.0 - 1.0) * 0.35; + return vec3(0.0232 * (1.06 - r * r)); +} + +// Display-linear color of one pixel (scene over backdrop), without bloom. +fn shade_px(uv: vec2) -> vec3 { + let c = textureSampleLevel(src, src_samp, uv, 0.0); + let a = clamp(c.a, 0.0, 1.0); + let s = c.rgb / max(c.a, 1e-4); + var m = tonemap(s); + if (post.a.z > 0.5) { + m = clamp(s, vec3(0.0), vec3(1.0)); + } + return mix(backdrop(uv), m, a); +} + +fn hash12(p: vec2) -> f32 { + var p3 = fract(vec3(p.xyx) * 0.1031); + p3 += dot(p3, p3.yzx + 33.33); + return fract((p3.x + p3.y) * p3.z); +} + +@fragment +fn fs_post(i: FsOut) -> @location(0) vec4 { + var col: vec3; + if (post.a.w > 0.0) { + // Bloom adds light in scene space, so it is tone mapped with the pixel; over the backdrop + // it glows on its own. + let c = textureSampleLevel(src, src_samp, i.uv, 0.0); + let glow = textureSampleLevel(bloom_tex, src_samp, i.uv, 0.0).rgb * post.a.w; + col = mix(backdrop(i.uv) + tonemap(glow), tonemap(c.rgb / max(c.a, 1e-4) + glow), clamp(c.a, 0.0, 1.0)); + } else { + col = shade_px(i.uv); + } + if (post.b.y > 0.0) { + // Unsharp mask on the display image (no HDR halos around highlights). + let t = 1.0 / vec2(textureDimensions(src)); + let blur = (shade_px(i.uv + vec2(t.x, 0.0)) + shade_px(i.uv - vec2(t.x, 0.0)) + shade_px(i.uv + vec2(0.0, t.y)) + shade_px(i.uv - vec2(0.0, t.y))) * 0.25; + col = max(col + (shade_px(i.uv) - blur) * post.b.y * 2.0, vec3(0.0)); + } + if (post.b.x > 0.0) { + let q = length(i.uv * 2.0 - 1.0) * 0.70710678; + col *= 1.0 - post.b.x * q * q * q; + } + var out = to_srgb(col); + if (post.b.z > 0.0) { + // Stable film grain, strongest in the mid tones. + let l = dot(out, vec3(0.2126, 0.7152, 0.0722)); + out += (hash12(i.pos.xy) - 0.5) * post.b.z * 0.12 * (1.0 - abs(l * 2.0 - 1.0) * 0.6); + } + return vec4(out, 1.0); +} + +// Bloom: a dual-filter blur pyramid (Bjørge, "Bandwidth-Efficient Rendering", SIGGRAPH 2015) over a +// soft-knee bright pass. +fn bright(c: vec3) -> vec3 { + let t = post.b.w; + let knee = t * 0.5; + let br = max(c.r, max(c.g, c.b)) * post.a.x; + var soft = clamp(br - t + knee, 0.0, 2.0 * knee); + soft = soft * soft / (4.0 * knee + 1e-4); + return c * (max(soft, br - t) / max(br, 1e-4)); +} + +fn down(uv: vec2) -> vec3 { + let h = 1.0 / vec2(textureDimensions(src)); + var s = textureSampleLevel(src, src_samp, uv, 0.0).rgb * 4.0; + s += textureSampleLevel(src, src_samp, uv - h, 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + h, 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + vec2(h.x, -h.y), 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv - vec2(h.x, -h.y), 0.0).rgb; + return s / 8.0; +} + +@fragment +fn fs_bloom_pre(i: FsOut) -> @location(0) vec4 { + return vec4(bright(down(i.uv)), 1.0); +} + +@fragment +fn fs_bloom_down(i: FsOut) -> @location(0) vec4 { + return vec4(down(i.uv), 1.0); +} + +// Upsample the smaller level (tent of 8 taps) and add it onto the larger one (additive blend). +@fragment +fn fs_bloom_up(i: FsOut) -> @location(0) vec4 { + let h = 1.0 / vec2(textureDimensions(src)); + let uv = i.uv; + var s = textureSampleLevel(src, src_samp, uv + vec2(-2.0 * h.x, 0.0), 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + vec2(2.0 * h.x, 0.0), 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + vec2(0.0, -2.0 * h.y), 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + vec2(0.0, 2.0 * h.y), 0.0).rgb; + s += textureSampleLevel(src, src_samp, uv + h, 0.0).rgb * 2.0; + s += textureSampleLevel(src, src_samp, uv - h, 0.0).rgb * 2.0; + s += textureSampleLevel(src, src_samp, uv + vec2(h.x, -h.y), 0.0).rgb * 2.0; + s += textureSampleLevel(src, src_samp, uv - vec2(h.x, -h.y), 0.0).rgb * 2.0; + return vec4(s / 12.0, 1.0); +} diff --git a/crates/render/src/shaders/shadow.wgsl b/crates/render/src/shaders/shadow.wgsl new file mode 100644 index 00000000..7f17495b --- /dev/null +++ b/crates/render/src/shaders/shadow.wgsl @@ -0,0 +1,8 @@ +// Depth-only key-light shadow map pass. + +@group(0) @binding(0) var light_vp: mat4x4; + +@vertex +fn vs_shadow(@location(0) pos: vec3) -> @builtin(position) vec4 { + return light_vp * vec4(pos, 1.0); +} diff --git a/crates/render/src/shaders/util.wgsl b/crates/render/src/shaders/util.wgsl new file mode 100644 index 00000000..658a476d --- /dev/null +++ b/crates/render/src/shaders/util.wgsl @@ -0,0 +1,61 @@ +// Fullscreen helpers: mip generation and blitting the viewport into the UI pass. + +struct FsOut { + @builtin(position) pos: vec4, + @location(0) uv: vec2, +}; + +@vertex +fn vs_full(@builtin(vertex_index) vi: u32) -> FsOut { + var p = array, 3>(vec2(-1.0, -3.0), vec2(-1.0, 1.0), vec2(3.0, 1.0)); + var o: FsOut; + o.pos = vec4(p[vi], 0.0, 1.0); + o.uv = vec2(p[vi].x * 0.5 + 0.5, 0.5 - p[vi].y * 0.5); + return o; +} + +@group(0) @binding(0) var src: texture_2d; +@group(0) @binding(1) var src_samp: sampler; + +@fragment +fn fs_mip(i: FsOut) -> @location(0) vec4 { + return textureSample(src, src_samp, i.uv); +} + +struct Blit { + rect: vec4, // destination x, y, w, h in target pixels + dst: vec4, // target w, h, decode sRGB (1 when the target format is sRGB), - +}; + +@group(0) @binding(2) var blit: Blit; + +struct BlitOut { + @builtin(position) pos: vec4, + @location(0) uv: vec2, +}; + +@vertex +fn vs_blit(@builtin(vertex_index) vi: u32) -> BlitOut { + var c = array, 6>(vec2(0.0, 0.0), vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(0.0, 1.0), vec2(1.0, 0.0), vec2(1.0, 1.0)); + let t = c[vi]; + let px = blit.rect.xy + t * blit.rect.zw; + var o: BlitOut; + o.pos = vec4(px.x / blit.dst.x * 2.0 - 1.0, 1.0 - px.y / blit.dst.y * 2.0, 0.0, 1.0); + o.uv = t; + return o; +} + +fn to_linear(c: vec3) -> vec3 { + let lo = c / 12.92; + let hi = pow((c + 0.055) / 1.055, vec3(2.4)); + return select(hi, lo, c <= vec3(0.04045)); +} + +@fragment +fn fs_blit(i: BlitOut) -> @location(0) vec4 { + let c = textureSample(src, src_samp, i.uv); + if (blit.dst.z > 0.5) { + return vec4(to_linear(c.rgb), 1.0); + } + return vec4(c.rgb, 1.0); +} diff --git a/crates/render/src/trace.rs b/crates/render/src/trace.rs new file mode 100644 index 00000000..45fbb62d --- /dev/null +++ b/crates/render/src/trace.rs @@ -0,0 +1,799 @@ +//! Progressive CPU path tracing for Rendering mode: the textured mesh under the environment, +//! with the raster viewport's material conventions (metallic/roughness or specular/glossiness +//! GGX, specular level, +//! height-to-normal slope rule, normal channel blended with RNM, emissive, opacity) but real +//! multi-bounce light transport. Each [`Tracer::pass`] adds one sample per pixel. + +use std::f32::consts::{PI, TAU}; +use std::sync::Arc; + +use rayon::prelude::*; +use texturecraft_compose::{Composite, ImageRes}; +use texturecraft_core::project::{DisplaySettings, ToneMapping}; +use texturecraft_core::Channel; +use texturecraft_geom::glam::{Vec2, Vec3}; +use texturecraft_geom::{Bvh, Mesh, OrbitCamera}; + +use crate::ibl::EnvImage; + +/// One texture set's composited channels. +#[derive(Clone)] +pub struct TraceSet { + /// Mesh material the set covers. + pub material: usize, + pub composite: Composite, + pub height_strength: f32, +} + +/// Everything a pass reads (cheap to clone: shared or copy-on-write data). +#[derive(Clone)] +pub struct TraceScene { + pub mesh: Arc, + pub bvh: Arc, + pub sets: Vec, + pub env: Arc, + /// Environment rotation around +Y (radians), as in the viewport. + pub env_rotation: f32, + /// Texture set per triangle (`usize::MAX`: none, default material). + tri_set: Arc>, + /// Importance sampling of the environment (None for an empty image). + light: Option>, + /// Specular/glossiness shading (Specular color is F0, base color is diffuse). + pub spec_gloss: bool, + /// Ray offset off surfaces, scaled to the mesh. + eps: f32, +} + +impl TraceScene { + pub fn new(mesh: Arc, bvh: Arc, sets: Vec, env: Arc, env_rotation: f32) -> TraceScene { + let mut tri_set = vec![usize::MAX; mesh.triangle_count()]; + let set_of = |material: usize| sets.iter().position(|s| s.material == material).unwrap_or(usize::MAX); + if mesh.submeshes.is_empty() { + tri_set.fill(set_of(0)); + } + for sm in &mesh.submeshes { + let set = set_of(sm.material); + let first = sm.start as usize / 3; + for t in tri_set.iter_mut().skip(first).take(sm.count as usize / 3) { + *t = set; + } + } + let (lo, hi) = mesh.bounds(); + let eps = ((hi - lo).length() * 2e-5).max(1e-6); + let light = EnvSampler::new(&env).map(Arc::new); + TraceScene { mesh, bvh, sets, env, env_rotation, tri_set: Arc::new(tri_set), light, spec_gloss: false, eps } + } + + /// The scene as `display` shows it: the imported environment `env_image` (when the display + /// names a resource and it decodes) or the built-in one, its rotation and the shading mode. + pub fn for_display(mesh: Arc, bvh: Arc, sets: Vec, display: &DisplaySettings, env_image: Option<&ImageRes>) -> TraceScene { + let imported = env_image.and_then(|i| EnvImage::from_rgba(i.width, i.height, &i.rgba, i.srgb)); + let env = imported.unwrap_or_else(|| crate::ibl::environment(&display.environment, 1024)); + let mut scene = TraceScene::new(mesh, bvh, sets, Arc::new(env), display.env_rotation.to_radians()); + scene.spec_gloss = display.spec_gloss; + scene + } + + /// World direction to environment space. + fn to_env(&self, d: Vec3) -> Vec3 { + let (s, c) = self.env_rotation.sin_cos(); + Vec3::new(c * d.x - s * d.z, d.y, s * d.x + c * d.z) + } + + fn env(&self, d: Vec3) -> Vec3 { + self.env.sample(self.to_env(d)) + } + + /// Solid-angle density of [`Self::sample_env`] picking world direction `d`. + fn env_pdf(&self, d: Vec3) -> f32 { + self.light.as_ref().map_or(0.0, |l| l.pdf(self.to_env(d))) + } + + /// A world direction toward the environment, chosen by brightness, with its density. + fn sample_env(&self, rng: &mut Rng) -> Option<(Vec3, f32)> { + let (e, pdf) = self.light.as_ref()?.sample(rng.next(), rng.next(), rng.next(), rng.next())?; + let (s, c) = self.env_rotation.sin_cos(); + Some((Vec3::new(c * e.x + s * e.z, e.y, -s * e.x + c * e.z), pdf)) + } +} + +/// Piecewise-constant importance sampling of an equirect environment by luminance and sin(theta). +struct EnvSampler { + width: usize, + height: usize, + /// Cumulative row probabilities (last = 1). + rows: Vec, + /// Cumulative probabilities within each row (last of each row = 1). + cols: Vec, + /// Probability of each pixel. + prob: Vec, +} + +impl EnvSampler { + fn new(env: &EnvImage) -> Option { + let (w, h) = (env.width as usize, env.height as usize); + if w == 0 || h == 0 || env.data.len() < w * h { + return None; + } + let mut weight: Vec = env.data.iter().take(w * h).map(|c| luminance(Vec3::from(*c)).max(0.0)).collect(); + for (y, row) in weight.chunks_mut(w).enumerate() { + let sin = (PI * (y as f32 + 0.5) / h as f32).sin(); + row.iter_mut().for_each(|v| *v = (*v + 1e-4) * sin); + } + let total: f32 = weight.iter().sum(); + if !total.is_finite() || total <= 0.0 { + return None; + } + let prob: Vec = weight.iter().map(|v| v / total).collect(); + let mut rows = Vec::with_capacity(h); + let mut cols = Vec::with_capacity(w * h); + let mut acc_rows = 0.0; + for row in prob.chunks(w) { + let sum: f32 = row.iter().sum(); + acc_rows += sum; + rows.push(acc_rows); + let mut acc = 0.0; + for p in row { + acc += if sum > 0.0 { p / sum } else { 1.0 / w as f32 }; + cols.push(acc); + } + } + Some(EnvSampler { width: w, height: h, rows, cols, prob }) + } + + /// Environment-space direction and its solid-angle density. + fn sample(&self, u0: f32, u1: f32, u2: f32, u3: f32) -> Option<(Vec3, f32)> { + let y = self.rows.partition_point(|c| *c < u0 * self.rows.last().copied().unwrap_or(1.0)).min(self.height - 1); + let row = self.cols.get(y * self.width..(y + 1) * self.width)?; + let x = row.partition_point(|c| *c < u1 * row.last().copied().unwrap_or(1.0)).min(self.width - 1); + let d = crate::ibl::dir_of((x as f32 + u2) / self.width as f32, (y as f32 + u3) / self.height as f32); + let pdf = self.pdf(d); + (pdf > 0.0).then_some((d, pdf)) + } + + fn pdf(&self, d: Vec3) -> f32 { + let uv = crate::ibl::uv_of(d); + let x = ((uv.x * self.width as f32) as usize).min(self.width - 1); + let y = ((uv.y * self.height as f32) as usize).min(self.height - 1); + let sin = (PI * (y as f32 + 0.5) / self.height as f32).sin(); + let p = self.prob.get(y * self.width + x).copied().unwrap_or(0.0); + if sin <= 1e-6 { 0.0 } else { p * (self.width * self.height) as f32 / (2.0 * PI * PI * sin) } + } +} + +/// How the accumulated radiance becomes display pixels. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct TraceDisplay { + /// Exposure multiplier (2^EV). + pub exposure: f32, + pub aces: bool, + /// How much of the environment shows behind the mesh (0: studio backdrop). + pub env_opacity: f32, + /// Filter the remaining noise (edge-aware; keeps texture detail). + pub denoise: bool, +} + +impl TraceDisplay { + /// Exposure, tone mapping and background as the viewport shows them. + pub fn from_display(d: &DisplaySettings) -> TraceDisplay { + TraceDisplay { exposure: d.env_exposure.exp2(), aces: d.tone_mapping == ToneMapping::AcesFilmic, env_opacity: d.env_opacity, denoise: false } + } +} + +/// Light transport settings. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct TraceSettings { + /// Diffuse/specular bounces after the camera hit. + pub bounces: u32, +} + +impl Default for TraceSettings { + fn default() -> Self { + TraceSettings { bounces: 6 } + } +} + +#[derive(Clone, Copy, Default)] +struct Px { + /// Radiance summed over samples that hit the mesh. + hit: Vec3, + /// Sum of the squared luminance of those samples (for the variance). + hit_lum2: f32, + /// First-hit reflectance, shading normal and distance, summed (denoiser guides). + albedo: Vec3, + normal: Vec3, + depth: f32, + /// Environment radiance summed over samples that missed it. + env: Vec3, + hits: f32, +} + +/// What one camera sample saw. +struct Sample { + radiance: Vec3, + albedo: Vec3, + normal: Vec3, + depth: f32, +} + +/// The accumulation buffer of one view. +pub struct Tracer { + pub width: u32, + pub height: u32, + pub samples: u32, + /// First row of the pass in progress (see [`Tracer::pass_rows`]). + row: u32, + acc: Vec, +} + +impl Tracer { + pub fn new(width: u32, height: u32) -> Tracer { + let (w, h) = (width.clamp(1, 8192), height.clamp(1, 8192)); + Tracer { width: w, height: h, samples: 0, row: 0, acc: vec![Px::default(); (w * h) as usize] } + } + + /// Add one sample per pixel. + pub fn pass(&mut self, scene: &TraceScene, cam: &OrbitCamera, settings: &TraceSettings) { + while !self.pass_rows(scene, cam, settings, self.height) {} + } + + /// Sample up to `rows` more rows of the current pass; true when that finished the pass (the + /// new sample then counts in [`Tracer::samples`]). Lets a single-threaded caller spread a + /// pass over several frames. + pub fn pass_rows(&mut self, scene: &TraceScene, cam: &OrbitCamera, settings: &TraceSettings, rows: u32) -> bool { + let (w, h, pass) = (self.width, self.height, self.samples); + let aspect = w as f32 / h as f32; + let (y0, y1) = (self.row, self.row.saturating_add(rows.max(1)).min(h)); + let span = self.acc.get_mut(y0 as usize * w as usize..y1 as usize * w as usize).unwrap_or_default(); + span.par_chunks_mut(w as usize).enumerate().for_each(|(dy, row)| { + let y = y0 as usize + dy; + for (x, px) in row.iter_mut().enumerate() { + let mut rng = Rng::new(x as u32, y as u32, pass); + let ndc = Vec2::new((x as f32 + rng.next()) / w as f32 * 2.0 - 1.0, 1.0 - (y as f32 + rng.next()) / h as f32 * 2.0); + let ray = cam.ray(ndc, aspect); + match trace(scene, ray.origin, ray.dir, settings, &mut rng) { + Some(s) => { + px.hit += s.radiance; + px.hit_lum2 += luminance(s.radiance).powi(2); + px.albedo += s.albedo; + px.normal += s.normal; + px.depth += s.depth; + px.hits += 1.0; + } + None => px.env += scene.env(ray.dir), + } + } + }); + if y1 >= h { + self.row = 0; + self.samples += 1; + true + } else { + self.row = y1; + false + } + } + + /// Tone-mapped sRGB pixels, row-major from the top. + pub fn rgba8(&self, d: &TraceDisplay) -> Vec { + let n = self.samples.max(1) as f32; + let (w, h) = (self.width as f32, self.height as f32); + let denoised = if d.denoise { self.denoise() } else { Vec::new() }; + let mut out = vec![0u8; self.acc.len() * 4]; + out.par_chunks_mut(4).zip(self.acc.par_iter()).enumerate().for_each(|(i, (o, px))| { + let uv = Vec2::new(((i as u32 % self.width) as f32 + 0.5) / w, ((i as u32 / self.width) as f32 + 0.5) / h); + let a = px.hits / n; + let misses = n - px.hits; + let back = if misses > 0.0 { backdrop(uv).lerp(tonemap(px.env / misses, d), d.env_opacity.clamp(0.0, 1.0)) } else { backdrop(uv) }; + let mean = denoised.get(i).copied().unwrap_or(px.hit / px.hits.max(1.0)); + let scene = if px.hits > 0.0 { tonemap(mean, d) } else { Vec3::ZERO }; + let c = back.lerp(scene, a); + for (k, v) in c.to_array().into_iter().enumerate() { + if let Some(o) = o.get_mut(k) { + *o = (texturecraft_texel::linear_to_srgb(v.clamp(0.0, 1.0)) * 255.0 + 0.5) as u8; + } + } + if let Some(o) = o.get_mut(3) { + *o = 255; + } + }); + out + } +} + +impl Tracer { + /// Edge-avoiding à-trous filtering of the mesh radiance: lighting is divided by the first-hit + /// reflectance (so texture detail stays sharp), filtered five times with growing steps, its + /// weights falling off across normal, depth and luminance edges (scaled by the estimated + /// noise), then multiplied back. Returns the mean radiance per pixel. + fn denoise(&self) -> Vec { + let (w, h) = (self.width as usize, self.height as usize); + struct G { + illum: Vec3, + albedo: Vec3, + normal: Vec3, + depth: f32, + var: f32, + hit: bool, + } + let guides: Vec = self + .acc + .par_iter() + .map(|px| { + let n = px.hits.max(1.0); + let albedo = (px.albedo / n).max(Vec3::splat(0.02)); + let mean = px.hit / n; + let var = (px.hit_lum2 / n - luminance(mean).powi(2)).max(0.0) / n; + let a = luminance(albedo).max(0.02); + G { illum: mean / albedo, albedo, normal: px.normal.normalize_or(Vec3::Z), depth: px.depth / n, var: var / (a * a), hit: px.hits > 0.0 } + }) + .collect(); + const H: [f32; 5] = [1.0 / 16.0, 1.0 / 4.0, 3.0 / 8.0, 1.0 / 4.0, 1.0 / 16.0]; + let mut cur: Vec<(Vec3, f32)> = guides.iter().map(|g| (g.illum, g.var)).collect(); + for step in [1usize, 2, 4, 8, 16] { + let prev = cur; + cur = (0..w * h) + .into_par_iter() + .map(|i| { + let (Some(p), Some(&(ip, vp))) = (guides.get(i), prev.get(i)) else { return (Vec3::ZERO, 0.0) }; + if !p.hit { + return (ip, vp); + } + let (x, y) = ((i % w) as i64, (i / w) as i64); + let sigma_l = 4.0 * vp.sqrt() + 1e-3; + let (mut sum, mut wsum, mut vsum) = (Vec3::ZERO, 0.0f32, 0.0f32); + for (j, hy) in H.iter().enumerate() { + for (k, hx) in H.iter().enumerate() { + let qx = x + (k as i64 - 2) * step as i64; + let qy = y + (j as i64 - 2) * step as i64; + if qx < 0 || qy < 0 || qx >= w as i64 || qy >= h as i64 { + continue; + } + let qi = qy as usize * w + qx as usize; + let (Some(q), Some(&(iq, vq))) = (guides.get(qi), prev.get(qi)) else { continue }; + if !q.hit { + continue; + } + let wn = p.normal.dot(q.normal).max(0.0).powi(64); + let wz = (-(p.depth - q.depth).abs() / (0.01 * p.depth.max(1e-3) * step as f32)).exp(); + let wl = (-(luminance(ip) - luminance(iq)).abs() / sigma_l).exp(); + let wt = hx * hy * wn * wz * wl; + sum += iq * wt; + wsum += wt; + vsum += wt * wt * vq; + } + } + if wsum > 1e-8 { (sum / wsum, vsum / (wsum * wsum)) } else { (ip, vp) } + }) + .collect(); + } + cur.iter().zip(&guides).map(|((illum, _), g)| *illum * g.albedo).collect() + } +} + +/// The viewport's flat studio gray with a gentle falloff (matches the post pass). +fn backdrop(uv: Vec2) -> Vec3 { + let r = (uv * 2.0 - Vec2::ONE).length() * 0.35; + Vec3::splat(0.0232 * (1.06 - r * r)) +} + +fn tonemap(hdr: Vec3, d: &TraceDisplay) -> Vec3 { + let x = hdr.max(Vec3::ZERO) * d.exposure; + if !d.aces { + return x.min(Vec3::ONE); + } + let v = x * 0.6; + ((v * (v * 2.51 + 0.03)) / (v * (v * 2.43 + 0.59) + 0.14)).clamp(Vec3::ZERO, Vec3::ONE) +} + +/// Small, fast per-sample generator (PCG hash seeded by pixel and pass). +struct Rng(u32); + +impl Rng { + fn new(x: u32, y: u32, pass: u32) -> Rng { + Rng(texturecraft_texel::noise::pcg3d(x, y, pass.wrapping_mul(7919).wrapping_add(17))[0] | 1) + } + + fn next(&mut self) -> f32 { + // xorshift32 + self.0 ^= self.0 << 13; + self.0 ^= self.0 >> 17; + self.0 ^= self.0 << 5; + (self.0 >> 8) as f32 / (1u32 << 24) as f32 + } +} + +/// Shading data at a hit. +struct Surface { + pos: Vec3, + /// Geometric normal facing the incoming ray. + geo: Vec3, + n: Vec3, + /// Diffuse albedo and specular reflectance at normal incidence. + diffuse: Vec3, + f0: Vec3, + roughness: f32, + emissive: Vec3, + opacity: f32, +} + +fn lerp3(a: Vec3, b: Vec3, c: Vec3, u: f32, v: f32) -> Vec3 { + a * (1.0 - u - v) + b * u + c * v +} + +/// Tangent-space normal blending (reoriented normal mapping), as in the viewport shader. +fn rnm(base: Vec3, detail: Vec3) -> Vec3 { + let t = base + Vec3::Z; + let u = detail * Vec3::new(-1.0, -1.0, 1.0); + (t * t.dot(u) - u * t.z).normalize_or(Vec3::Z) +} + +fn surface(scene: &TraceScene, tri: u32, u: f32, v: f32, o: Vec3, d: Vec3, t: f32) -> Option { + let m = &scene.mesh; + let i = tri as usize * 3; + let idx = [*m.indices.get(i)? as usize, *m.indices.get(i + 1)? as usize, *m.indices.get(i + 2)? as usize]; + let p = idx.map(|k| m.positions.get(k).copied().unwrap_or(Vec3::ZERO)); + let mut geo = (p[1] - p[0]).cross(p[2] - p[0]).normalize_or(Vec3::Y); + let nrm = idx.map(|k| m.normals.get(k).copied().unwrap_or(geo)); + let mut n_geo = lerp3(nrm[0], nrm[1], nrm[2], u, v).normalize_or(geo); + if geo.dot(d) > 0.0 { + geo = -geo; + } + if n_geo.dot(geo) < 0.0 { + n_geo = -n_geo; + } + let uvs = idx.map(|k| m.uvs.get(k).copied().unwrap_or(Vec2::ZERO)); + let uv = uvs[0] * (1.0 - u - v) + uvs[1] * u + uvs[2] * v; + let tan = idx.map(|k| m.tangents.get(k).copied().unwrap_or(texturecraft_geom::glam::Vec4::X)); + let tw = lerp3(tan[0].truncate(), tan[1].truncate(), tan[2].truncate(), u, v); + let sign = if tan[0].w < 0.0 { -1.0 } else { 1.0 }; + + let set = scene.tri_set.get(tri as usize).and_then(|s| scene.sets.get(*s)); + let ch = |c: Channel, dx: i32, dy: i32| -> [f32; 3] { + let Some(s) = set else { return c.default_value() }; + let res = s.composite.resolution.max(1) as i32; + let x = ((uv.x * res as f32).floor() as i32 + dx).rem_euclid(res) as u32; + let y = ((uv.y * res as f32).floor() as i32 + dy).rem_euclid(res) as u32; + s.composite.value(c, x, y) + }; + let base = Vec3::from(ch(Channel::BaseColor, 0, 0)); + let k = set.map_or(0.0, |s| s.height_strength * s.composite.resolution as f32 / 16.0); + let n_height = if k != 0.0 { + let h = |dx, dy| ch(Channel::Height, dx, dy)[0]; + Vec3::new(-(h(1, 0) - h(-1, 0)) * 0.5 * k, (h(0, 1) - h(0, -1)) * 0.5 * k, 1.0).normalize_or(Vec3::Z) + } else { + Vec3::Z + }; + let detail = (Vec3::from(ch(Channel::Normal, 0, 0)) * 2.0 - Vec3::ONE).normalize_or(Vec3::Z); + let n_ts = rnm(n_height, detail); + let tt = (tw - n_geo * n_geo.dot(tw)).normalize_or(n_geo.any_orthonormal_vector()); + let b = n_geo.cross(tt) * sign; + let mut n = (tt * n_ts.x + b * n_ts.y + n_geo * n_ts.z).normalize_or(n_geo); + if n.dot(-d) <= 0.0 { + n = n_geo; + } + // Glossiness replaces roughness wherever a set has it (as in the viewport). + let roughness = match set { + Some(s) if s.composite.channels.contains_key(&Channel::Glossiness) => 1.0 - ch(Channel::Glossiness, 0, 0)[0], + _ => ch(Channel::Roughness, 0, 0)[0], + }; + let (diffuse, f0) = if scene.spec_gloss { + let f0 = Vec3::from(ch(Channel::Specular, 0, 0)).clamp(Vec3::ZERO, Vec3::ONE); + (base * (1.0 - f0.max_element()), f0) + } else { + let metallic = ch(Channel::Metallic, 0, 0)[0].clamp(0.0, 1.0); + let level = ch(Channel::SpecularLevel, 0, 0)[0].clamp(0.0, 1.0); + (base * (1.0 - metallic), Vec3::splat(0.08 * level).lerp(base, metallic)) + }; + Some(Surface { + pos: o + d * t, + geo, + n, + diffuse, + f0, + roughness: roughness.clamp(0.045, 1.0), + emissive: Vec3::from(ch(Channel::Emissive, 0, 0)), + opacity: ch(Channel::Opacity, 0, 0)[0].clamp(0.0, 1.0), + }) +} + +fn luminance(c: Vec3) -> f32 { + c.dot(Vec3::new(0.2126, 0.7152, 0.0722)) +} + +fn schlick(f0: Vec3, cos: f32) -> Vec3 { + f0 + (Vec3::ONE - f0) * (1.0 - cos.clamp(0.0, 1.0)).powi(5) +} + +/// Smith GGX masking for one direction (local frame, z = normal). +fn smith_g1(w: Vec3, a: f32) -> f32 { + let z = w.z.max(1e-6); + 2.0 * z / (z + (a * a * (1.0 - z * z) + z * z).sqrt()) +} + +/// GGX visible-normal sampling (local frame, z = normal). +fn sample_vndf(ve: Vec3, a: f32, u1: f32, u2: f32) -> Vec3 { + let vh = Vec3::new(a * ve.x, a * ve.y, ve.z).normalize_or(Vec3::Z); + let len2 = vh.x * vh.x + vh.y * vh.y; + let t1 = if len2 > 0.0 { Vec3::new(-vh.y, vh.x, 0.0) / len2.sqrt() } else { Vec3::X }; + let t2 = vh.cross(t1); + let r = u1.sqrt(); + let phi = TAU * u2; + let p1 = r * phi.cos(); + let s = 0.5 * (1.0 + vh.z); + let p2 = (1.0 - s) * (1.0 - p1 * p1).max(0.0).sqrt() + s * r * phi.sin(); + let nh = t1 * p1 + t2 * p2 + vh * (1.0 - p1 * p1 - p2 * p2).max(0.0).sqrt(); + Vec3::new(a * nh.x, a * nh.y, nh.z.max(1e-6)).normalize_or(Vec3::Z) +} + +/// The surface's BRDF at one hit, in a local frame (z = shading normal). +struct Bsdf { + t: Vec3, + b: Vec3, + n: Vec3, + /// View direction, local. + v: Vec3, + f0: Vec3, + diffuse: Vec3, + /// GGX alpha. + a: f32, + /// Fresnel at the view angle. + fv: Vec3, + /// Probability of sampling the specular lobe. + p_spec: f32, +} + +impl Bsdf { + fn new(s: &Surface, v: Vec3) -> Bsdf { + let n = s.n; + let t = n.any_orthonormal_vector(); + let b = n.cross(t); + let vl = Vec3::new(v.dot(t), v.dot(b), v.dot(n).max(1e-4)); + let (f0, diffuse) = (s.f0, s.diffuse); + let fv = schlick(f0, vl.z); + let ld = luminance(diffuse * (Vec3::ONE - fv)); + let p_spec = if ld < 1e-5 { 1.0 } else { (luminance(fv) / (luminance(fv) + ld)).clamp(0.1, 0.9) }; + Bsdf { t, b, n, v: vl, f0, diffuse, a: (s.roughness * s.roughness).max(1e-3), fv, p_spec } + } + + fn local(&self, w: Vec3) -> Vec3 { + Vec3::new(w.dot(self.t), w.dot(self.b), w.dot(self.n)) + } + + fn ggx_d(&self, h: Vec3) -> f32 { + let a2 = self.a * self.a; + let d = h.z * h.z * (a2 - 1.0) + 1.0; + a2 / (PI * d * d).max(1e-12) + } + + /// BRDF times cos(theta) toward world direction `w`, and the density of [`Self::sample`] + /// picking it. + fn eval(&self, w: Vec3) -> (Vec3, f32) { + let l = self.local(w); + if l.z <= 0.0 { + return (Vec3::ZERO, 0.0); + } + let h = (l + self.v).normalize_or(Vec3::Z); + let d = self.ggx_d(h); + let g1v = smith_g1(self.v, self.a); + let spec = schlick(self.f0, l.dot(h)) * d * g1v * smith_g1(l, self.a) / (4.0 * self.v.z); + let diff = self.diffuse * (Vec3::ONE - self.fv) * (l.z / PI); + let pdf_spec = g1v * d / (4.0 * self.v.z); + let pdf_diff = l.z / PI; + (spec + diff, self.p_spec * pdf_spec + (1.0 - self.p_spec) * pdf_diff) + } + + /// A world direction from the BRDF lobes (specular by visible normals, diffuse by cosine). + fn sample(&self, rng: &mut Rng) -> Option { + let (u0, u1, u2) = (rng.next(), rng.next(), rng.next()); + let l = if u0 < self.p_spec { + let h = sample_vndf(self.v, self.a, u1, u2); + h * 2.0 * self.v.dot(h) - self.v + } else { + let r = u1.sqrt(); + let phi = TAU * u2; + Vec3::new(r * phi.cos(), r * phi.sin(), (1.0 - u1).max(0.0).sqrt()) + }; + (l.z > 0.0).then(|| self.t * l.x + self.b * l.y + self.n * l.z) + } +} + +/// Power-heuristic MIS weight of a strategy with density `a` against one with density `b`. +fn mis(a: f32, b: f32) -> f32 { + let (a2, b2) = (a * a, b * b); + if a2 + b2 > 0.0 { a2 / (a2 + b2) } else { 0.0 } +} + +/// Clamp rare, very bright indirect contributions (fireflies) to keep progressive renders calm. +fn clamp_firefly(c: Vec3) -> Vec3 { + let lum = luminance(c); + if lum > 32.0 { c * (32.0 / lum) } else { c } +} + +/// Radiance along a camera ray; None when it misses the mesh. Environment light is gathered +/// both by sampling it directly (next-event estimation) and by BRDF sampling, combined with MIS. +fn trace(scene: &TraceScene, mut o: Vec3, mut d: Vec3, settings: &TraceSettings, rng: &mut Rng) -> Option { + let origin = o; + let mut first: Option<(Vec3, Vec3, f32)> = None; + let mut thr = Vec3::ONE; + let mut l = Vec3::ZERO; + let mut bounce = 0u32; + // Density of the BRDF sample that produced `d` (None for the camera ray). + let mut brdf_pdf: Option = None; + // Cutout surfaces don't count as bounces; cap them so a stack of cards can't loop forever. + for _ in 0..settings.bounces + 24 { + let Some(hit) = scene.bvh.closest(o, d, f32::MAX) else { + let pdf = brdf_pdf?; + let w = if scene.light.is_some() { mis(pdf, scene.env_pdf(d)) } else { 1.0 }; + l += clamp_firefly(thr * scene.env(d) * w); + break; + }; + let Some(s) = surface(scene, hit.tri, hit.u, hit.v, o, d, hit.t) else { break }; + if rng.next() > s.opacity { + o = s.pos - s.geo * scene.eps; + continue; + } + if first.is_none() { + first = Some(((s.diffuse + s.f0).min(Vec3::ONE), s.n, (s.pos - origin).length())); + } + l += thr * s.emissive; + if bounce >= settings.bounces { + break; + } + let bsdf = Bsdf::new(&s, -d); + // Next-event estimation toward the environment. + if let Some((wl, pdf_env)) = scene.sample_env(rng) + && wl.dot(s.geo) > 0.0 + { + let (f, pdf_brdf) = bsdf.eval(wl); + if f.max_element() > 0.0 && !scene.bvh.occluded(s.pos + s.geo * scene.eps, wl, f32::MAX) { + l += clamp_firefly(thr * f * scene.env(wl) * (mis(pdf_env, pdf_brdf) / pdf_env)); + } + } + let Some(wi) = bsdf.sample(rng) else { break }; + let (f, pdf) = bsdf.eval(wi); + if pdf <= 0.0 { + break; + } + thr *= f / pdf; + brdf_pdf = Some(pdf); + if bounce >= 2 { + let p = thr.max_element().clamp(0.05, 0.95); + if rng.next() > p { + break; + } + thr /= p; + } + let side = if wi.dot(s.geo) >= 0.0 { 1.0 } else { -1.0 }; + o = s.pos + s.geo * scene.eps * side; + d = wi; + bounce += 1; + } + let (albedo, normal, depth) = first?; + Some(Sample { radiance: if l.is_finite() { l } else { Vec3::ZERO }, albedo, normal, depth }) +} + +#[cfg(test)] +mod tests { + use super::*; + use texturecraft_geom::primitives; + + fn scene(env: &str) -> TraceScene { + let mesh = Arc::new(primitives::sphere(1.0, 32, 16)); + let bvh = Arc::new(Bvh::new(&mesh)); + let env = Arc::new(crate::ibl::environment(env, 128)); + TraceScene::new(mesh, bvh, Vec::new(), env, 0.0) + } + + fn camera() -> OrbitCamera { + let mut cam = OrbitCamera::default(); + cam.target = Vec3::ZERO; + cam.distance = 4.0; + cam + } + + #[test] + fn renders_the_mesh_over_the_backdrop_and_converges() { + let s = scene("Studio Soft"); + let mut tr = Tracer::new(48, 32); + for _ in 0..8 { + tr.pass(&s, &camera(), &TraceSettings::default()); + } + assert_eq!(tr.samples, 8); + let d = TraceDisplay { exposure: 1.0, aces: true, env_opacity: 0.0, denoise: false }; + let img = tr.rgba8(&d); + assert_eq!(img.len(), 48 * 32 * 4); + let px = |x: usize, y: usize| &img[(y * 48 + x) * 4..(y * 48 + x) * 4 + 3]; + // The sphere (default material, lit by the studio) is brighter than the dark backdrop corner. + let center: u32 = px(24, 16).iter().map(|v| *v as u32).sum(); + let corner: u32 = px(0, 0).iter().map(|v| *v as u32).sum(); + assert!(center > corner + 60, "center {center} corner {corner}"); + assert!(tr.acc.iter().all(|p| p.hit.is_finite() && p.env.is_finite())); + } + + #[test] + fn environment_shows_behind_the_mesh_with_opacity() { + let s = scene("Overcast"); + let mut tr = Tracer::new(16, 8); + tr.pass(&s, &camera(), &TraceSettings::default()); + let corner = |opacity: f32| tr.rgba8(&TraceDisplay { exposure: 1.0, aces: true, env_opacity: opacity, denoise: false })[0]; + assert!(corner(1.0) > corner(0.0) + 40); + } + + #[test] + fn light_sampling_matches_brdf_sampling_on_average() { + let lit = scene("Studio Soft"); + let unlit = TraceScene { light: None, ..lit.clone() }; + let mean = |s: &TraceScene| { + let mut rng = Rng::new(9, 9, 9); + let n = 40_000; + let mut sum = Vec3::ZERO; + for _ in 0..n { + sum += trace(s, Vec3::new(0.3, 0.4, 4.0), Vec3::new(-0.07, -0.1, -1.0).normalize(), &TraceSettings { bounces: 3 }, &mut rng).map_or(Vec3::ZERO, |s| s.radiance); + } + sum / n as f32 + }; + let (a, b) = (mean(&lit), mean(&unlit)); + assert!((a - b).length() < 0.05 * b.length().max(0.05), "with light sampling {a}, without {b}"); + } + + #[test] + fn passes_split_into_row_slices_match_whole_passes() { + let s = scene("Studio Soft"); + let (mut whole, mut sliced) = (Tracer::new(40, 30), Tracer::new(40, 30)); + let d = TraceDisplay { exposure: 1.0, aces: true, env_opacity: 0.0, denoise: false }; + for _ in 0..2 { + whole.pass(&s, &camera(), &TraceSettings::default()); + let mut done = false; + while !done { + done = sliced.pass_rows(&s, &camera(), &TraceSettings::default(), 7); + } + } + assert_eq!(sliced.samples, 2); + assert_eq!(whole.rgba8(&d), sliced.rgba8(&d)); + } + + #[test] + fn denoising_lowers_noise_and_keeps_the_mean() { + let s = scene("Studio Contrast"); + let mut tr = Tracer::new(64, 48); + for _ in 0..4 { + tr.pass(&s, &camera(), &TraceSettings::default()); + } + let raw = tr.rgba8(&TraceDisplay { exposure: 1.0, aces: true, env_opacity: 0.0, denoise: false }); + let clean = tr.rgba8(&TraceDisplay { exposure: 1.0, aces: true, env_opacity: 0.0, denoise: true }); + // Neighbour differences inside the ball (rows 18..30, columns 26..38) drop; the mean stays. + let stats = |img: &[u8]| { + let px = |x: usize, y: usize| img[(y * 64 + x) * 4] as f32; + let (mut diff, mut sum, mut n) = (0.0, 0.0, 0.0); + for y in 18..30 { + for x in 26..38 { + diff += (px(x, y) - px(x + 1, y)).abs(); + sum += px(x, y); + n += 1.0; + } + } + (diff / n, sum / n) + }; + let ((d_raw, m_raw), (d_clean, m_clean)) = (stats(&raw), stats(&clean)); + assert!(d_clean < d_raw * 0.6, "noise {d_raw} -> {d_clean}"); + assert!((m_raw - m_clean).abs() < 0.08 * m_raw.max(1.0), "mean {m_raw} -> {m_clean}"); + } + + #[test] + fn white_furnace_keeps_energy_bounded() { + // A uniform white environment: a white diffuse sphere must not exceed the environment. + let mesh = Arc::new(primitives::sphere(1.0, 24, 12)); + let bvh = Arc::new(Bvh::new(&mesh)); + let env = Arc::new(EnvImage { width: 8, height: 4, data: vec![[1.0; 3]; 32] }); + let s = TraceScene::new(mesh, bvh, Vec::new(), env, 0.0); + let mut rng = Rng::new(1, 2, 3); + let mut sum = Vec3::ZERO; + let n = 4000; + for _ in 0..n { + sum += trace(&s, Vec3::new(0.0, 0.0, 4.0), Vec3::NEG_Z, &TraceSettings { bounces: 8 }, &mut rng).map_or(Vec3::ZERO, |s| s.radiance); + } + let avg = sum / n as f32; + assert!(avg.max_element() <= 1.05 && avg.min_element() > 0.3, "{avg}"); + } +} diff --git a/crates/render/tests/headless.rs b/crates/render/tests/headless.rs new file mode 100644 index 00000000..2c5250df --- /dev/null +++ b/crates/render/tests/headless.rs @@ -0,0 +1,352 @@ +use texturecraft_compose::{DisplayKind, ImageRes}; +use texturecraft_geom::{OrbitCamera, primitives}; +use texturecraft_render::headless::Headless; +use texturecraft_render::renderer::TAA_SAMPLES; +use texturecraft_render::{Frame, Shade, ViewKind}; + +/// The UI's key light (`viewport::shade`). +const LIGHT: [f32; 4] = [0.5, 0.8, 0.4, 2.5]; + +struct Img { + w: u32, + px: Vec, +} + +impl Img { + fn at(&self, x: u32, y: u32) -> [u8; 3] { + let i = ((y * self.w + x) * 4) as usize; + [self.px[i], self.px[i + 1], self.px[i + 2]] + } + fn luma(&self, x: u32, y: u32) -> f32 { + let [r, g, b] = self.at(x, y); + 0.2126 * r as f32 + 0.7152 * g as f32 + 0.0722 * b as f32 + } + /// Mean luma over a rectangle. + fn mean(&self, x0: u32, y0: u32, x1: u32, y1: u32) -> f32 { + let mut sum = 0.0; + for y in y0..y1 { + for x in x0..x1 { + sum += self.luma(x, y); + } + } + sum / ((x1 - x0) * (y1 - y0)) as f32 + } +} + +/// A headless renderer with the material ball framed in a 480×360 view (None without a GPU). +fn setup() -> Option<(Headless, Frame)> { + let Ok(mut h) = Headless::new() else { + eprintln!("skipping: no GPU adapter"); + return None; + }; + let mesh = primitives::material_ball(); + h.renderer.set_mesh(&h.device, &h.queue, &mesh, 1); + h.renderer.set_texture_sets(&h.device, &h.queue, &[(256, 0), (256, 1)], 2); + let mut cam = OrbitCamera { yaw: 0.6, pitch: 0.25, ..OrbitCamera::default() }; + let (lo, hi) = mesh.bounds(); + cam.frame(lo, hi); + let frame = Frame { view_id: 1, size: [480, 360], kind: ViewKind::Scene, camera: cam, shade: Shade::default(), visible: vec![true, true] }; + Some((h, frame)) +} + +fn render(h: &mut Headless, frame: &Frame, name: &str) -> Img { + let (w, hgt, px) = h.render(frame).expect("readback"); + assert_eq!((w, hgt), (frame.size[0], frame.size[1])); + if let Ok(dir) = std::env::var("TC_SNAPSHOT_DIR") { + image::save_buffer(format!("{dir}/{name}.png"), &px, w, hgt, image::ColorType::Rgba8).expect("save snapshot"); + } + Img { w, px } +} + +fn shaded(frame: &Frame, f: impl FnOnce(&mut Shade)) -> Frame { + let mut out = frame.clone(); + f(&mut out.shade); + out +} + +#[test] +fn renders_the_material_ball() { + let Some((mut h, frame)) = setup() else { return }; + let img = render(&mut h, &frame, "headless_ball"); + assert_ne!(img.at(240, 140), img.at(5, 5), "mesh should differ from background"); + // UV view of set 0. + let uv = Frame { view_id: 2, kind: ViewKind::Uv { ts: 0, zoom: 1.0, pan: [0.0, 0.0] }, ..frame.clone() }; + let uv_img = render(&mut h, &uv, "headless_uv"); + assert_eq!(uv_img.px.len(), img.px.len()); + let wire = render(&mut h, &shaded(&uv, |s| s.wireframe = true), "headless_uv_wire"); + assert_ne!(wire.px, uv_img.px, "the UV wireframe draws"); +} + +#[test] +fn exposure_brightens_the_material_but_not_data_views() { + let Some((mut h, frame)) = setup() else { return }; + let base = render(&mut h, &frame, "exposure_0"); + let bright = render(&mut h, &shaded(&frame, |s| s.exposure_ev = 1.0), "exposure_plus1"); + let (b0, b1) = (base.mean(200, 100, 280, 180), bright.mean(200, 100, 280, 180)); + assert!(b1 > b0 + 10.0, "exposure +1 brightens the ball ({b0} → {b1})"); + assert_eq!(base.at(5, 5), bright.at(5, 5), "the flat backdrop ignores exposure"); + let ch = shaded(&frame, |s| { + s.view_mode = 1; + s.channel = 0; + }); + let a = render(&mut h, &ch, "channel_base_color"); + let b = render(&mut h, &shaded(&ch, |s| s.exposure_ev = 2.0), "channel_base_color_ev2"); + assert_eq!(a.px, b.px, "data views ignore exposure"); + // Default base color 188 (sRGB) shows unchanged in the channel view. + let [r, ..] = a.at(240, 140); + assert!(r.abs_diff(188) <= 1, "base color channel shows the raw value, got {r}"); +} + +#[test] +fn post_effects() { + let Some((mut h, frame)) = setup() else { return }; + let base = render(&mut h, &frame, "post_off"); + // Strengths without the master switch change nothing. + let gated = render( + &mut h, + &shaded(&frame, |s| { + s.vignette = 1.0; + s.bloom = 1.0; + s.grain = 1.0; + s.sharpen = 1.0; + }), + "post_gated", + ); + assert_eq!(base.px, gated.px, "effects are off without post_effects"); + let on = |f: fn(&mut Shade)| { + shaded(&frame, |s| { + s.post_effects = true; + f(s); + }) + }; + let vignette = render(&mut h, &on(|s| s.vignette = 1.0), "post_vignette"); + assert!(vignette.mean(0, 0, 20, 20) < base.mean(0, 0, 20, 20) - 5.0, "vignette darkens the corners"); + assert!((vignette.luma(240, 180) - base.luma(240, 180)).abs() < 1.5, "vignette keeps the center"); + // A bright environment and +2 EV so highlights pass the bloom threshold. + let hot = |s: &mut Shade| { + s.exposure_ev = 2.0; + s.env_opacity = 1.0; + }; + let hot_base = render(&mut h, &shaded(&frame, hot), "post_hot"); + let bloom = render( + &mut h, + &on(|s| { + s.exposure_ev = 2.0; + s.env_opacity = 1.0; + s.bloom = 1.0; + }), + "post_bloom", + ); + assert!(bloom.mean(0, 0, 480, 360) > hot_base.mean(0, 0, 480, 360) + 0.5, "bloom adds light"); + let sharpen = render(&mut h, &on(|s| s.sharpen = 1.0), "post_sharpen"); + assert_ne!(sharpen.px, base.px, "sharpen changes edges"); + let grain = render(&mut h, &on(|s| s.grain = 1.0), "post_grain"); + assert_ne!(grain.px, base.px, "grain adds noise"); + let all = render( + &mut h, + &on(|s| { + s.bloom = 0.6; + s.vignette = 0.5; + s.sharpen = 0.4; + s.grain = 0.3; + }), + "post_all", + ); + assert_eq!(all.px.len(), base.px.len()); +} + +#[test] +fn shadows_darken_the_key_light() { + let Some((mut h, frame)) = setup() else { return }; + let lit = shaded(&frame, |s| s.light = LIGHT); + let a = render(&mut h, &lit, "shadows_off"); + let b = render(&mut h, &shaded(&lit, |s| s.shadows = true), "shadows_on"); + let (mut darker, mut brighter) = (0, 0); + for y in 0..360 { + for x in 0..480 { + let d = b.luma(x, y) - a.luma(x, y); + darker += (d < -8.0) as u32; + brighter += (d > 2.0) as u32; + } + } + assert!(darker > 1000, "the ball shadows its pedestal ({darker} darker pixels)"); + assert_eq!(brighter, 0, "shadows never brighten"); + // From above, where the pedestal top shows the ball's shadow. + let mut top = shaded(&lit, |s| s.shadows = true); + top.camera.pitch = 0.9; + render(&mut h, &top, "shadows_on_top"); + // Rotating the environment turns the key light and its shadow. + let turned = render(&mut h, &shaded(&lit, |s| { + s.shadows = true; + s.env_rotation_deg = 120.0; + }), "shadows_env_rotated"); + assert_ne!(turned.px, b.px); +} + +#[test] +fn wireframe_3d_overlays_the_mesh() { + let Some((mut h, frame)) = setup() else { return }; + let a = render(&mut h, &frame, "wire3d_off"); + let b = render(&mut h, &shaded(&frame, |s| s.wireframe_3d = true), "wire3d_on"); + assert_ne!(a.mean(200, 100, 280, 180), b.mean(200, 100, 280, 180), "edges draw over the ball"); + assert_eq!(a.at(5, 5), b.at(5, 5), "the background stays clean"); +} + +#[test] +fn ortho_background_matches_perspective() { + let Some((mut h, frame)) = setup() else { return }; + let env = shaded(&frame, |s| s.env_opacity = 1.0); + let persp = render(&mut h, &env, "env_perspective"); + let ortho = render(&mut h, &Frame { camera: OrbitCamera { ortho: true, ..env.camera }, ..env.clone() }, "env_ortho"); + for (x, y) in [(5, 5), (474, 5), (5, 354), (474, 354), (240, 5)] { + assert_eq!(persp.at(x, y), ortho.at(x, y), "background at {x},{y}"); + } + assert_ne!(ortho.at(5, 5), ortho.at(240, 5), "the environment varies across the view"); +} + +/// Frame cost at 1920×1080: `cargo test -p texturecraft-render --release -- --ignored --nocapture`. +#[test] +#[ignore] +fn bench_1080p() { + let Some((mut h, frame)) = setup() else { return }; + h.renderer.set_texture_sets(&h.device, &h.queue, &[(2048, 0), (2048, 1)], 2); + let frame = Frame { size: [1920, 1080], ..frame }; + let run = |h: &mut Headless, frame: &Frame| { + for _ in 0..5 { + h.render(frame); + } + let t = std::time::Instant::now(); + for _ in 0..100 { + let mut enc = h.device.create_command_encoder(&Default::default()); + h.renderer.prepare(&h.device, &h.queue, &mut enc, frame); + h.queue.submit([enc.finish()]); + let _ = h.device.poll(texturecraft_render::wgpu::PollType::Wait { submission_index: None, timeout: None }); + } + t.elapsed().as_secs_f64() * 1000.0 / 100.0 + }; + println!("adapter: {}", h.adapter_name); + println!("default: {:.3} ms/frame", run(&mut h, &frame)); + let effects = shaded(&frame, |s| { + s.post_effects = true; + s.bloom = 0.5; + s.vignette = 0.5; + s.sharpen = 0.5; + s.grain = 0.5; + }); + println!("post effects: {:.3} ms/frame", run(&mut h, &effects)); + let shadows = shaded(&frame, |s| { + s.light = LIGHT; + s.shadows = true; + }); + println!("shadows (cached map): {:.3} ms/frame", run(&mut h, &shadows)); + let wire = shaded(&frame, |s| s.wireframe_3d = true); + println!("3D wireframe: {:.3} ms/frame", run(&mut h, &wire)); + let all = shaded(&effects, |s| { + s.light = LIGHT; + s.shadows = true; + s.wireframe_3d = true; + }); + println!("everything: {:.3} ms/frame", run(&mut h, &all)); + println!("parallax occlusion: {:.3} ms/frame", run(&mut h, &shaded(&frame, |s| s.parallax = true))); + let taa = shaded(&frame, |s| s.taa = true); + h.render(&taa); + let t = std::time::Instant::now(); + for _ in 1..TAA_SAMPLES { + let mut enc = h.device.create_command_encoder(&Default::default()); + h.renderer.prepare(&h.device, &h.queue, &mut enc, &taa); + h.queue.submit([enc.finish()]); + let _ = h.device.poll(texturecraft_render::wgpu::PollType::Wait { submission_index: None, timeout: None }); + } + println!("TAA accumulation: {:.3} ms/sample", t.elapsed().as_secs_f64() * 1000.0 / f64::from(TAA_SAMPLES - 1)); + // Shadow map re-rendered every frame (light moving). + let t = std::time::Instant::now(); + for i in 0..100 { + let f = shaded(&shadows, |s| s.env_rotation_deg = i as f32); + let mut enc = h.device.create_command_encoder(&Default::default()); + h.renderer.prepare(&h.device, &h.queue, &mut enc, &f); + h.queue.submit([enc.finish()]); + let _ = h.device.poll(texturecraft_render::wgpu::PollType::Wait { submission_index: None, timeout: None }); + } + println!("shadows, light moving: {:.3} ms/frame", t.elapsed().as_secs_f64() * 1000.0 / 100.0); +} + +/// Fill the height texture of both 256² sets: `f(x, y)` → (height, F0 r, g, b). +fn upload_height(h: &mut Headless, f: impl Fn(u32, u32) -> [f32; 4]) { + for ts in 0..2 { + for (tx, ty) in (0..16).map(|i| (i % 4, i / 4)) { + let bytes: Vec = (0..64 * 64).flat_map(|i| f(tx * 64 + i % 64, ty * 64 + i / 64)).flat_map(|v| half::f16::from_f32(v).to_le_bytes()).collect(); + h.renderer.upload_tile(&h.queue, ts, DisplayKind::Height, tx, ty, &bytes); + } + } +} + +/// Mean of red minus blue over the ball. +fn warmth(img: &Img) -> f32 { + let mut sum = 0.0; + for y in 100..180 { + for x in 200..280 { + let [r, _, b] = img.at(x, y); + sum += r as f32 - b as f32; + } + } + sum / 6400.0 +} + +#[test] +fn imported_hdr_environment_lights_the_ball() { + let Some((mut h, frame)) = setup() else { return }; + let base = render(&mut h, &frame, "env_default"); + // A procedural HDR: a hot orange sky over a dim blue ground (values far above 1). + let (w, hh) = (256u32, 128u32); + let rgba = (0..w * hh).map(|i| if i / w < hh / 2 { [12.0, 4.0, 1.0, 1.0] } else { [0.02, 0.05, 0.2, 1.0] }).collect(); + let sky = ImageRes { width: w, height: hh, rgba, srgb: false }; + h.renderer.set_environment(&h.device, &h.queue, "resource:sky.hdr", Some(&sky)); + let lit = render(&mut h, &frame, "env_hdr_resource"); + assert_ne!(lit.px, base.px, "the imported environment changes the lighting"); + assert!(warmth(&lit) > warmth(&base) + 10.0, "the orange sky tints the ball"); + assert!(lit.mean(200, 100, 280, 180) > 20.0, "lit, finite shading (NaNs would render black)"); + h.renderer.set_environment(&h.device, &h.queue, "Studio Soft", None); + assert_eq!(render(&mut h, &frame, "env_default_again").px, base.px, "built-ins come back"); +} + +#[test] +fn specular_glossiness_takes_f0_from_the_specular_color() { + let Some((mut h, frame)) = setup() else { return }; + upload_height(&mut h, |_, _| [0.0, 1.0, 0.6, 0.1]); + let mr = render(&mut h, &frame, "shader_metal_rough"); + let sg = render(&mut h, &shaded(&frame, |s| s.spec_gloss = true), "shader_spec_gloss_gold"); + assert!(warmth(&sg) > warmth(&mr) + 10.0, "a gold F0 tints the reflections ({} vs {})", warmth(&sg), warmth(&mr)); + assert!(sg.mean(200, 100, 280, 180) > 20.0); +} + +#[test] +fn parallax_follows_the_height_channel() { + let Some((mut h, frame)) = setup() else { return }; + let pom = shaded(&frame, |s| s.parallax = true); + // A flat height field: parallax changes nothing. + let (off, on) = (render(&mut h, &frame, "parallax_flat_off"), render(&mut h, &pom, "parallax_flat_on")); + assert!(off.px.iter().zip(&on.px).all(|(a, b)| a.abs_diff(*b) <= 2), "flat heights keep the UVs"); + upload_height(&mut h, |x, y| [if (x / 16 + y / 16) % 2 == 0 { 0.8 } else { -0.8 }, 0.04, 0.04, 0.04]); + let (off, on) = (render(&mut h, &frame, "parallax_off"), render(&mut h, &pom, "parallax_on")); + assert_ne!(off.px, on.px, "a checker height field shifts the textures"); + assert!(on.mean(200, 100, 280, 180) > 20.0); +} + +#[test] +fn idle_accumulation_converges_then_stops() { + let Some((mut h, frame)) = setup() else { return }; + let taa = shaded(&frame, |s| s.taa = true); + let first = render(&mut h, &taa, "taa_first"); + assert_eq!(first.px, render(&mut h, &frame, "taa_off").px, "the first sample is the plain frame"); + render(&mut h, &taa, "taa_first_again"); + for _ in 1..TAA_SAMPLES { + assert!(h.renderer.accumulating(1)); + render(&mut h, &taa, "taa_sample"); + } + assert!(!h.renderer.accumulating(1), "converged after {TAA_SAMPLES} samples"); + let last = render(&mut h, &taa, "taa_converged"); + assert_ne!(last.px, first.px, "jittered samples smooth the edges"); + assert_eq!(render(&mut h, &taa, "taa_idle").px, last.px, "a converged view keeps its image"); + render(&mut h, &shaded(&taa, |s| s.env_rotation_deg = 30.0), "taa_changed"); + assert!(h.renderer.accumulating(1), "a change restarts accumulation"); +} diff --git a/crates/texel/Cargo.toml b/crates/texel/Cargo.toml new file mode 100644 index 00000000..dc61a011 --- /dev/null +++ b/crates/texel/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "texturecraft-texel" +description = "TextureCraft texel storage: sparse copy-on-write tiles, UV padding, noise" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] diff --git a/crates/texel/src/dilate.rs b/crates/texel/src/dilate.rs new file mode 100644 index 00000000..0b3d90a6 --- /dev/null +++ b/crates/texel/src/dilate.rs @@ -0,0 +1,118 @@ +//! UV padding: fill uncovered texels from their nearest covered texel. + +use std::collections::VecDeque; + +/// No source texel. +pub const NONE: u32 = u32::MAX; + +/// For every texel, the index of the covered texel whose value it takes (itself when covered, +/// [`NONE`] when beyond the padding distance). Computed once per UV layout and reused for every +/// dilation of that texture set. +#[derive(Clone, Debug, PartialEq)] +pub struct DilationMap { + pub width: u32, + pub height: u32, + pub src: Vec, +} + +impl DilationMap { + /// `covered.len()` must be `width × height` (shorter input is treated as uncovered). + /// `max_dist` limits padding in texels (Chebyshev steps); `None` fills everything reachable. + pub fn new(covered: &[bool], width: u32, height: u32, max_dist: Option) -> DilationMap { + let n = (width as usize).saturating_mul(height as usize); + let mut src = vec![NONE; n]; + let mut dist = vec![u32::MAX; n]; + let mut queue = VecDeque::new(); + for i in 0..n { + if covered.get(i).copied().unwrap_or(false) { + src[i] = i as u32; + dist[i] = 0; + queue.push_back(i); + } + } + let limit = max_dist.unwrap_or(u32::MAX); + let (w, h) = (width as i64, height as i64); + while let Some(i) = queue.pop_front() { + let d = dist[i]; + if d >= limit { + continue; + } + let (x, y) = ((i as i64) % w, (i as i64) / w); + for (dx, dy) in [(-1, 0), (1, 0), (0, -1), (0, 1), (-1, -1), (1, -1), (-1, 1), (1, 1)] { + let (nx, ny) = (x + dx, y + dy); + if nx < 0 || ny < 0 || nx >= w || ny >= h { + continue; + } + let j = (ny * w + nx) as usize; + if dist[j] == u32::MAX { + dist[j] = d + 1; + src[j] = src[i]; + queue.push_back(j); + } + } + } + DilationMap { width, height, src } + } + + /// Copy padded values in place: `data` holds `comps` components per texel. Texels with no + /// source keep their value. + pub fn apply(&self, data: &mut [T], comps: usize) { + for (i, &s) in self.src.iter().enumerate() { + let s = s as usize; + if s == i || s == NONE as usize { + continue; + } + for c in 0..comps { + if let Some(v) = data.get(s * comps + c).copied() + && let Some(d) = data.get_mut(i * comps + c) + { + *d = v; + } + } + } + } + + /// The source texel of (x, y), if any. + pub fn source(&self, x: u32, y: u32) -> Option<(u32, u32)> { + if x >= self.width || y >= self.height { + return None; + } + let s = *self.src.get((y * self.width + x) as usize)?; + (s != NONE).then(|| (s % self.width, s / self.width)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn uncovered_texels_take_the_nearest_covered_value() { + // 5×1 strip, only texel 1 covered. + let covered = [false, true, false, false, false]; + let m = DilationMap::new(&covered, 5, 1, Some(2)); + assert_eq!(m.src, vec![1, 1, 1, 1, NONE]); + let mut data = [0u8, 9, 0, 0, 0]; + m.apply(&mut data, 1); + assert_eq!(data, [9, 9, 9, 9, 0]); + } + + #[test] + fn infinite_padding_fills_everything_and_keeps_covered_values() { + let covered = [true, false, false, false, false, false, false, false, true]; + let m = DilationMap::new(&covered, 3, 3, None); + assert!(m.src.iter().all(|s| *s != NONE)); + assert_eq!(m.src[0], 0); + assert_eq!(m.src[8], 8); + assert_eq!(m.source(2, 2), Some((2, 2))); + assert_eq!(m.source(9, 9), None); + } + + #[test] + fn nothing_covered_is_a_no_op() { + let m = DilationMap::new(&[], 4, 4, None); + let mut data = [3u16; 16]; + m.apply(&mut data, 1); + assert_eq!(data, [3u16; 16]); + } +} diff --git a/crates/texel/src/lib.rs b/crates/texel/src/lib.rs new file mode 100644 index 00000000..329ffaa4 --- /dev/null +++ b/crates/texel/src/lib.rs @@ -0,0 +1,57 @@ +//! # texturecraft-texel +//! +//! Texel storage and texel-space helpers: sparse copy-on-write [`TileImage`]s (64×64 tiles of +//! `u16` components), UV padding ([`DilationMap`]), deterministic [`noise`], and sRGB transfer +//! functions. No workspace dependencies. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod dilate; +pub mod noise; +pub mod tile; + +pub use dilate::DilationMap; +pub use tile::{TILE, TILE_AREA, TileData, TileImage, from_u16, from_u16_signed, to_u16, to_u16_signed}; + +/// Linear → sRGB transfer (0..1). +#[inline] +pub fn linear_to_srgb(v: f32) -> f32 { + let v = v.clamp(0.0, 1.0); + if v <= 0.003_130_8 { v * 12.92 } else { 1.055 * v.powf(1.0 / 2.4) - 0.055 } +} + +/// sRGB → linear transfer (0..1). +#[inline] +pub fn srgb_to_linear(v: f32) -> f32 { + let v = v.clamp(0.0, 1.0); + if v <= 0.040_45 { v / 12.92 } else { ((v + 0.055) / 1.055).powf(2.4) } +} + +/// Lookup table from the top 12 bits of a linear u16 to an sRGB u8 (fast display upload). +pub fn srgb_lut() -> &'static [u8; 4096] { + static LUT: std::sync::OnceLock<[u8; 4096]> = std::sync::OnceLock::new(); + LUT.get_or_init(|| { + let mut t = [0u8; 4096]; + for (i, v) in t.iter_mut().enumerate() { + *v = (linear_to_srgb((i as f32 + 0.5) / 4096.0) * 255.0 + 0.5) as u8; + } + t + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn srgb_round_trips_and_lut_matches() { + for i in 0..=20 { + let v = i as f32 / 20.0; + assert!((srgb_to_linear(linear_to_srgb(v)) - v).abs() < 1e-5); + } + let lut = srgb_lut(); + assert_eq!(lut[0], 0); + assert_eq!(lut[4095], 255); + assert!((lut[2048] as i32 - (linear_to_srgb(0.5) * 255.0).round() as i32).abs() <= 1); + } +} diff --git a/crates/texel/src/noise.rs b/crates/texel/src/noise.rs new file mode 100644 index 00000000..62411fb7 --- /dev/null +++ b/crates/texel/src/noise.rs @@ -0,0 +1,166 @@ +//! Deterministic 3D noise (integer hashing, so results are identical on every platform). + +/// PCG3D hash (Jarzynski & Olano 2020). +#[inline] +pub fn pcg3d(x: u32, y: u32, z: u32) -> [u32; 3] { + let mut v = + [x.wrapping_mul(1664525).wrapping_add(1013904223), y.wrapping_mul(1664525).wrapping_add(1013904223), z.wrapping_mul(1664525).wrapping_add(1013904223)]; + v[0] = v[0].wrapping_add(v[1].wrapping_mul(v[2])); + v[1] = v[1].wrapping_add(v[2].wrapping_mul(v[0])); + v[2] = v[2].wrapping_add(v[0].wrapping_mul(v[1])); + v = v.map(|a| a ^ (a >> 16)); + v[0] = v[0].wrapping_add(v[1].wrapping_mul(v[2])); + v[1] = v[1].wrapping_add(v[2].wrapping_mul(v[0])); + v[2] = v[2].wrapping_add(v[0].wrapping_mul(v[1])); + v +} + +#[inline] +fn cell(p: f32) -> (i32, f32) { + let f = p.floor(); + (f as i32, p - f) +} + +#[inline] +fn hash01(x: i32, y: i32, z: i32, seed: u32) -> f32 { + pcg3d(x as u32 ^ seed.wrapping_mul(0x9E37_79B9), y as u32, z as u32)[0] as f32 / u32::MAX as f32 +} + +#[inline] +fn smooth(t: f32) -> f32 { + t * t * t * (t * (t * 6.0 - 15.0) + 10.0) +} + +#[inline] +fn lerp(a: f32, b: f32, t: f32) -> f32 { + a + (b - a) * t +} + +/// Value noise in 0..1. +pub fn value(p: [f32; 3], seed: u32) -> f32 { + let (ix, fx) = cell(p[0]); + let (iy, fy) = cell(p[1]); + let (iz, fz) = cell(p[2]); + let (sx, sy, sz) = (smooth(fx), smooth(fy), smooth(fz)); + let h = |dx: i32, dy: i32, dz: i32| hash01(ix + dx, iy + dy, iz + dz, seed); + lerp( + lerp(lerp(h(0, 0, 0), h(1, 0, 0), sx), lerp(h(0, 1, 0), h(1, 1, 0), sx), sy), + lerp(lerp(h(0, 0, 1), h(1, 0, 1), sx), lerp(h(0, 1, 1), h(1, 1, 1), sx), sy), + sz, + ) +} + +fn grad(x: i32, y: i32, z: i32, seed: u32, f: [f32; 3]) -> f32 { + let h = pcg3d(x as u32 ^ seed.wrapping_mul(0x85EB_CA6B), y as u32, z as u32)[1] % 12; + let (a, b) = match h { + 0 => (f[0], f[1]), + 1 => (-f[0], f[1]), + 2 => (f[0], -f[1]), + 3 => (-f[0], -f[1]), + 4 => (f[0], f[2]), + 5 => (-f[0], f[2]), + 6 => (f[0], -f[2]), + 7 => (-f[0], -f[2]), + 8 => (f[1], f[2]), + 9 => (-f[1], f[2]), + 10 => (f[1], -f[2]), + _ => (-f[1], -f[2]), + }; + a + b +} + +/// Gradient (Perlin) noise in about 0..1. +pub fn perlin(p: [f32; 3], seed: u32) -> f32 { + let (ix, fx) = cell(p[0]); + let (iy, fy) = cell(p[1]); + let (iz, fz) = cell(p[2]); + let (sx, sy, sz) = (smooth(fx), smooth(fy), smooth(fz)); + let g = |dx: i32, dy: i32, dz: i32| grad(ix + dx, iy + dy, iz + dz, seed, [fx - dx as f32, fy - dy as f32, fz - dz as f32]); + let v = lerp( + lerp(lerp(g(0, 0, 0), g(1, 0, 0), sx), lerp(g(0, 1, 0), g(1, 1, 0), sx), sy), + lerp(lerp(g(0, 0, 1), g(1, 0, 1), sx), lerp(g(0, 1, 1), g(1, 1, 1), sx), sy), + sz, + ); + (v * 0.5 + 0.5).clamp(0.0, 1.0) +} + +/// Worley (cellular) noise: distance to the nearest feature point, about 0..1. +pub fn worley(p: [f32; 3], seed: u32) -> f32 { + cellular(p, seed).0 +} + +/// Cellular noise: distances to the nearest and second-nearest feature points (each about +/// 0..1) and a random 0..1 id of the nearest point's cell (for per-cell variation). +pub fn cellular(p: [f32; 3], seed: u32) -> (f32, f32, f32) { + let (ix, fx) = cell(p[0]); + let (iy, fy) = cell(p[1]); + let (iz, fz) = cell(p[2]); + let (mut f1, mut f2, mut id) = (f32::MAX, f32::MAX, 0u32); + for dz in -1..=1 { + for dy in -1..=1 { + for dx in -1..=1 { + let h = pcg3d((ix + dx) as u32 ^ seed.wrapping_mul(0xC2B2_AE35), (iy + dy) as u32, (iz + dz) as u32); + let o = h.map(|v| v as f32 / u32::MAX as f32); + let d = [dx as f32 + o[0] - fx, dy as f32 + o[1] - fy, dz as f32 + o[2] - fz]; + let d2 = d[0] * d[0] + d[1] * d[1] + d[2] * d[2]; + if d2 < f1 { + (f2, f1, id) = (f1, d2, h[0] ^ h[1]); + } else if d2 < f2 { + f2 = d2; + } + } + } + } + (f1.sqrt().min(1.0), f2.sqrt().min(1.0), id as f32 / u32::MAX as f32) +} + +/// Random 0..1 value of an integer lattice cell (per-brick or per-tile variation). +pub fn cell_hash(x: i32, y: i32, z: i32, seed: u32) -> f32 { + hash01(x, y, z, seed) +} + +/// Fractal sum of `octaves` layers of `base` noise, normalized to 0..1. +pub fn fbm(p: [f32; 3], octaves: u32, seed: u32, base: fn([f32; 3], u32) -> f32) -> f32 { + let (mut sum, mut amp, mut norm, mut q) = (0.0, 0.5, 0.0, p); + for o in 0..octaves.clamp(1, 12) { + sum += amp * base(q, seed.wrapping_add(o * 31)); + norm += amp; + q = q.map(|v| v * 2.0 + 17.13); + amp *= 0.5; + } + sum / norm +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn noises_are_deterministic_and_in_range() { + for i in 0..500 { + let p = [i as f32 * 0.37, i as f32 * 0.11 - 3.0, (i % 17) as f32 * 0.53]; + for f in [value, perlin, worley] { + let a = f(p, 3); + assert!((0.0..=1.0).contains(&a), "{a}"); + assert_eq!(a, f(p, 3)); + } + let a = fbm(p, 5, 1, value); + assert!((0.0..=1.0).contains(&a)); + let (f1, f2, id) = cellular(p, 3); + assert!(f1 <= f2 && (0.0..=1.0).contains(&f2) && (0.0..=1.0).contains(&id), "{f1} {f2} {id}"); + } + } + + #[test] + fn seeds_change_the_pattern() { + let p = [1.3, 2.7, 0.4]; + assert_ne!(value(p, 1), value(p, 2)); + } + + #[test] + fn value_noise_is_continuous() { + let a = value([0.5, 0.5, 0.5], 0); + let b = value([0.5001, 0.5, 0.5], 0); + assert!((a - b).abs() < 1e-2); + } +} diff --git a/crates/texel/src/tile.rs b/crates/texel/src/tile.rs new file mode 100644 index 00000000..7a68bf0a --- /dev/null +++ b/crates/texel/src/tile.rs @@ -0,0 +1,315 @@ +//! Sparse, copy-on-write tiled images of `u16` components. + +use std::sync::Arc; + +/// Tile edge in texels. +pub const TILE: u32 = 64; +/// Texels per tile. +pub const TILE_AREA: usize = (TILE * TILE) as usize; + +/// A tile's texel data: `TILE_AREA × comps` interleaved components. +pub type TileData = Arc>; + +/// An image split into 64×64 tiles; unallocated tiles read as zero. Cloning shares every tile, +/// so snapshots for undo cost one `Arc` clone per allocated tile. +#[derive(Clone, Debug, PartialEq)] +pub struct TileImage { + width: u32, + height: u32, + comps: usize, + tiles_x: u32, + tiles_y: u32, + tiles: Vec>, +} + +impl TileImage { + /// `comps` is clamped to 1..=4; sizes to at least 1. + pub fn new(width: u32, height: u32, comps: usize) -> TileImage { + let (width, height) = (width.max(1), height.max(1)); + let tiles_x = width.div_ceil(TILE); + let tiles_y = height.div_ceil(TILE); + TileImage { width, height, comps: comps.clamp(1, 4), tiles_x, tiles_y, tiles: vec![None; (tiles_x * tiles_y) as usize] } + } + + pub fn width(&self) -> u32 { + self.width + } + pub fn height(&self) -> u32 { + self.height + } + pub fn comps(&self) -> usize { + self.comps + } + pub fn tiles_x(&self) -> u32 { + self.tiles_x + } + pub fn tiles_y(&self) -> u32 { + self.tiles_y + } + + fn tile_index(&self, tx: u32, ty: u32) -> Option { + (tx < self.tiles_x && ty < self.tiles_y).then(|| (ty * self.tiles_x + tx) as usize) + } + + pub fn tile(&self, tx: u32, ty: u32) -> Option<&[u16]> { + self.tile_index(tx, ty).and_then(|i| self.tiles.get(i)).and_then(|t| t.as_deref().map(Vec::as_slice)) + } + + /// The shared tile handle (for undo snapshots and change fingerprints). + pub fn tile_handle(&self, tx: u32, ty: u32) -> Option<&TileData> { + self.tile_index(tx, ty).and_then(|i| self.tiles.get(i)).and_then(Option::as_ref) + } + + /// Replace a tile wholesale (None frees it). + pub fn set_tile(&mut self, tx: u32, ty: u32, data: Option) { + let len = TILE_AREA * self.comps; + let data = data.filter(|d| d.len() == len); + if let Some(i) = self.tile_index(tx, ty) + && let Some(slot) = self.tiles.get_mut(i) + { + *slot = data; + } + } + + /// Mutable texels of a tile, allocating it filled with `fill` (one value per component) + /// when absent and un-sharing it when shared. + pub fn tile_mut(&mut self, tx: u32, ty: u32, fill: &[u16]) -> Option<&mut [u16]> { + let comps = self.comps; + let i = self.tile_index(tx, ty)?; + let slot = self.tiles.get_mut(i)?; + let tile = slot.get_or_insert_with(|| { + let mut v = vec![0u16; TILE_AREA * comps]; + if fill.iter().any(|f| *f != 0) { + for px in v.chunks_exact_mut(comps) { + for (d, s) in px.iter_mut().zip(fill) { + *d = *s; + } + } + } + Arc::new(v) + }); + Some(Arc::make_mut(tile).as_mut_slice()) + } + + pub fn is_allocated(&self, tx: u32, ty: u32) -> bool { + self.tile_handle(tx, ty).is_some() + } + + /// Allocated tile coordinates. + pub fn allocated(&self) -> impl Iterator + '_ { + self.tiles.iter().enumerate().filter(|(_, t)| t.is_some()).map(|(i, _)| (i as u32 % self.tiles_x, i as u32 / self.tiles_x)) + } + + pub fn allocated_count(&self) -> usize { + self.tiles.iter().filter(|t| t.is_some()).count() + } + + /// Components of the texel at (x, y); zeros when out of range or unallocated. + pub fn get(&self, x: u32, y: u32) -> [u16; 4] { + let mut out = [0u16; 4]; + if x >= self.width || y >= self.height { + return out; + } + if let Some(t) = self.tile(x / TILE, y / TILE) { + let o = (((y % TILE) * TILE + x % TILE) as usize) * self.comps; + for (c, v) in out.iter_mut().take(self.comps).enumerate() { + *v = t.get(o + c).copied().unwrap_or(0); + } + } + out + } + + /// Set one texel (allocating its tile with zeros). + pub fn set(&mut self, x: u32, y: u32, v: &[u16]) { + if x >= self.width || y >= self.height { + return; + } + let comps = self.comps; + if let Some(t) = self.tile_mut(x / TILE, y / TILE, &[]) { + let o = (((y % TILE) * TILE + x % TILE) as usize) * comps; + for (c, s) in v.iter().take(comps).enumerate() { + if let Some(d) = t.get_mut(o + c) { + *d = *s; + } + } + } + } + + /// Bytes held by allocated tiles (memory estimate for the status bar). + pub fn bytes(&self) -> usize { + self.allocated_count() * TILE_AREA * self.comps * 2 + } + + /// Drop tiles whose every texel is zero. + pub fn prune_empty(&mut self) { + for t in &mut self.tiles { + if t.as_ref().is_some_and(|d| d.iter().all(|v| *v == 0)) { + *t = None; + } + } + } +} + +/// 0..1 → u16. +#[inline] +pub fn to_u16(v: f32) -> u16 { + (v.clamp(0.0, 1.0) * 65535.0 + 0.5) as u16 +} + +/// u16 → 0..1. +#[inline] +pub fn from_u16(v: u16) -> f32 { + v as f32 * (1.0 / 65535.0) +} + +/// -1..1 → u16. +#[inline] +pub fn to_u16_signed(v: f32) -> u16 { + to_u16(v * 0.5 + 0.5) +} + +/// u16 → -1..1. +#[inline] +pub fn from_u16_signed(v: u16) -> f32 { + from_u16(v) * 2.0 - 1.0 +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn unallocated_tiles_read_zero_and_writes_allocate() { + let mut img = TileImage::new(200, 130, 2); + assert_eq!(img.tiles_x(), 4); + assert_eq!(img.tiles_y(), 3); + assert_eq!(img.get(10, 10), [0; 4]); + img.set(199, 129, &[7, 9]); + assert_eq!(img.get(199, 129), [7, 9, 0, 0]); + assert_eq!(img.allocated_count(), 1); + assert_eq!(img.allocated().collect::>(), vec![(3, 2)]); + // Out of range is ignored, not a panic. + img.set(500, 500, &[1, 1]); + assert_eq!(img.get(500, 500), [0; 4]); + } + + #[test] + fn clones_share_tiles_until_written() { + let mut a = TileImage::new(64, 64, 1); + a.set(0, 0, &[5]); + let b = a.clone(); + assert!(Arc::ptr_eq(a.tile_handle(0, 0).unwrap(), b.tile_handle(0, 0).unwrap())); + a.set(1, 0, &[6]); + assert!(!Arc::ptr_eq(a.tile_handle(0, 0).unwrap(), b.tile_handle(0, 0).unwrap())); + assert_eq!(b.get(1, 0)[0], 0); + assert_eq!(a.get(1, 0)[0], 6); + } + + #[test] + fn tile_mut_fills_new_tiles() { + let mut img = TileImage::new(64, 64, 2); + let t = img.tile_mut(0, 0, &[100, 200]).unwrap(); + assert_eq!(&t[..4], &[100, 200, 100, 200]); + img.prune_empty(); + assert_eq!(img.allocated_count(), 1); + img.set_tile(0, 0, Some(Arc::new(vec![0; TILE_AREA * 2]))); + img.prune_empty(); + assert_eq!(img.allocated_count(), 0); + } + + #[test] + fn unorm_round_trips() { + for v in [0.0, 0.25, 0.5, 1.0] { + assert!((from_u16(to_u16(v)) - v).abs() < 1e-4); + assert!((from_u16_signed(to_u16_signed(v * 2.0 - 1.0)) - (v * 2.0 - 1.0)).abs() < 1e-4); + } + assert_eq!(to_u16(f32::NAN), 0); + } +} + +impl TileImage { + /// A bilinear resample to `width × height` (same component count). Unallocated source + /// texels read as `empty` (one value per component); destination tiles whose source + /// footprint is entirely unallocated stay unallocated. + pub fn resampled(&self, width: u32, height: u32, empty: &[u16]) -> TileImage { + let mut out = TileImage::new(width, height, self.comps); + if self.allocated_count() == 0 { + return out; + } + let (sw, sh) = (self.width as f32, self.height as f32); + let (dw, dh) = (out.width, out.height); + let comps = self.comps; + for ty in 0..out.tiles_y { + for tx in 0..out.tiles_x { + // Skip destination tiles whose source footprint has no allocated tile. + let (x0, y0) = ((tx * TILE) as f32 * sw / dw as f32, (ty * TILE) as f32 * sh / dh as f32); + let (x1, y1) = (((tx + 1) * TILE) as f32 * sw / dw as f32, ((ty + 1) * TILE) as f32 * sh / dh as f32); + let any = ((y0 as u32).saturating_sub(1) / TILE..=((y1 as u32 + 1) / TILE).min(self.tiles_y.saturating_sub(1))) + .any(|sy| ((x0 as u32).saturating_sub(1) / TILE..=((x1 as u32 + 1) / TILE).min(self.tiles_x.saturating_sub(1))).any(|sx| self.is_allocated(sx, sy))); + if !any { + continue; + } + let mut data = vec![0u16; TILE_AREA * comps]; + for ly in 0..TILE { + let y = ty * TILE + ly; + if y >= dh { + break; + } + let fy = ((y as f32 + 0.5) * sh / dh as f32 - 0.5).max(0.0); + let (iy, wy) = (fy.floor() as u32, fy.fract()); + for lx in 0..TILE { + let x = tx * TILE + lx; + if x >= dw { + break; + } + let fx = ((x as f32 + 0.5) * sw / dw as f32 - 0.5).max(0.0); + let (ix, wx) = (fx.floor() as u32, fx.fract()); + let get = |x: u32, y: u32| { + let (x, y) = (x.min(self.width - 1), y.min(self.height - 1)); + if self.is_allocated(x / TILE, y / TILE) { + self.get(x, y) + } else { + let mut e = [0u16; 4]; + for (d, s) in e.iter_mut().zip(empty) { + *d = *s; + } + e + } + }; + let (a, b, c, d) = (get(ix, iy), get(ix + 1, iy), get(ix, iy + 1), get(ix + 1, iy + 1)); + let o = ((ly * TILE + lx) as usize) * comps; + for k in 0..comps { + let top = a[k] as f32 * (1.0 - wx) + b[k] as f32 * wx; + let bot = c[k] as f32 * (1.0 - wx) + d[k] as f32 * wx; + if let Some(slot) = data.get_mut(o + k) { + *slot = (top * (1.0 - wy) + bot * wy + 0.5) as u16; + } + } + } + } + out.set_tile(tx, ty, Some(Arc::new(data))); + } + } + out + } +} + +#[cfg(test)] +mod resample_tests { + use super::*; + + #[test] + fn resample_up_and_down_keeps_values_and_sparsity() { + let mut img = TileImage::new(128, 128, 2); + for y in 0..64 { + for x in 0..64 { + img.set(x, y, &[30000, 65535]); + } + } + let up = img.resampled(256, 256, &[]); + assert_eq!(up.get(40, 40)[..2], [30000, 65535]); + assert!(!up.is_allocated(3, 3), "empty regions stay sparse"); + let down = img.resampled(64, 64, &[]); + assert_eq!(down.get(10, 10)[..2], [30000, 65535]); + } +} diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml new file mode 100644 index 00000000..5eb58e95 --- /dev/null +++ b/crates/ui-egui/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "texturecraft-ui-egui" +description = "TextureCraft's egui shell: Painter-style docks, toolbars, viewports and windows" +version.workspace = true +edition.workspace = true +license.workspace = true + +[lints] +workspace = true + +[dependencies] +texturecraft-engine = { workspace = true } +texturecraft-render = { workspace = true } +eframe = { workspace = true, features = ["default_fonts", "wgpu", "persistence"] } +egui = { workspace = true } +egui-phosphor = { version = "0.14", features = ["regular", "fill"] } +# Dockable, tabbed, floating panels (MIT). +egui_dock = { version = "0.21", features = ["serde"] } +serde = { workspace = true } +serde_json = { workspace = true } +rayon = { workspace = true } +log = { workspace = true } +base64 = "0.22" +image = { workspace = true } +rfd = { workspace = true } +zip = { workspace = true } + +# Browser file I/O (web_files.rs): async pickers and Blob downloads. +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +js-sys = "0.3" +web-sys = { version = "0.3", features = ["Window", "Document", "HtmlElement", "HtmlAnchorElement", "Blob", "BlobPropertyBag", "Url", "CssStyleDeclaration"] } diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs new file mode 100644 index 00000000..15ac31d7 --- /dev/null +++ b/crates/ui-egui/src/control.rs @@ -0,0 +1,156 @@ +//! The JSON control channel: agents drive the running app with the same commands as the menus, +//! inspect session and UI state, invoke menu items, paint strokes and take screenshots. +//! +//! Methods (params as JSON objects): +//! - `command.run {id, params?}`: run an engine command (programmatic: never opens a dialog). +//! - `command.list {filter?}`: every command with params docs and enabled state. +//! - `session.inspect`: project, texture sets, layer stack, tool, camera, display, history. +//! - `ui.inspect`: the UI state (panels, windows, mode, layout, viewport rect). +//! - `ui.menu.list`: the menu catalog with ids, shortcuts and whether each is live. +//! - `ui.menu.invoke {id}`: behave like a menu click (may open a window). +//! - `ui.set {...}`: merge fields into the UI state (e.g. `{"layout":"Only3D"}`). +//! - `viewport.screenshot {view?: "3d"|"2d"}`: PNG of a viewport, base64. +//! - `ui.screenshot`: PNG of the whole window (replies after the next frame). + +use std::sync::mpsc::{Receiver, Sender, channel}; + +use base64::Engine as _; +use serde_json::{Value, json}; + +use crate::TextureCraftApp; + +pub struct ControlRequest { + pub method: String, + pub params: Value, + pub reply: Sender, +} + +impl ControlRequest { + pub fn new(method: String, params: Value) -> (ControlRequest, Receiver) { + let (tx, rx) = channel(); + (ControlRequest { method, params, reply: tx }, rx) + } +} + +fn ok(v: Value) -> Value { + json!({ "ok": true, "result": v }) +} + +fn err(e: impl std::fmt::Display) -> Value { + json!({ "ok": false, "error": e.to_string() }) +} + +pub fn poll(app: &mut TextureCraftApp, ctx: &egui::Context) { + // Finished window screenshots. + let shots: Vec> = + ctx.input(|i| i.raw.events.iter().filter_map(|e| if let egui::Event::Screenshot { image, .. } = e { Some(image.clone()) } else { None }).collect()); + for img in shots { + let reply = encode_png(img.size[0] as u32, img.size[1] as u32, img.pixels.iter().flat_map(|c| c.to_array()).collect()) + .map(|(w, h, png)| ok(json!({ "width": w, "height": h, "png": base64::engine::general_purpose::STANDARD.encode(png) }))) + .unwrap_or_else(|| err("could not encode the screenshot")); + for w in app.screenshot_waiters.drain(..) { + let _ = w.send(reply.clone()); + } + } + if !app.screenshot_waiters.is_empty() { + ctx.request_repaint(); + } + let Some(rx) = app.control.as_ref() else { return }; + let reqs: Vec = rx.try_iter().collect(); + for r in reqs { + if r.method == "ui.screenshot" { + // Replies when the next frame has been captured. + app.screenshot_waiters.push(r.reply); + ctx.send_viewport_cmd(egui::ViewportCommand::Screenshot(egui::UserData::default())); + ctx.request_repaint(); + continue; + } + let reply = handle(app, ctx, &r.method, &r.params); + let _ = r.reply.send(reply); + ctx.request_repaint(); + } +} + +pub(crate) fn encode_png(w: u32, h: u32, rgba: Vec) -> Option<(u32, u32, Vec)> { + let img = image::RgbaImage::from_raw(w, h, rgba)?; + let mut png = Vec::new(); + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).ok()?; + Some((w, h, png)) +} + +pub fn handle(app: &mut TextureCraftApp, ctx: &egui::Context, method: &str, p: &Value) -> Value { + match method { + "ping" => ok(json!("pong")), + "command.run" => { + let Some(id) = p.get("id").and_then(Value::as_str) else { return err("`id` is required") }; + let params = p.get("params").cloned().unwrap_or(Value::Null); + match texturecraft_engine::execute(&mut app.session, id, ¶ms) { + Ok(v) => ok(v), + Err(e) => err(e), + } + } + "command.list" => ok(texturecraft_engine::commands::list(&app.session, p.get("filter").and_then(Value::as_str))), + "session.inspect" => ok(texturecraft_engine::inspect::session(&app.session)), + "ui.inspect" => { + let r = app.viewport_rect; + ok(json!({ + "state": app.ui, + "viewport": [r.min.x, r.min.y, r.width(), r.height()], + "fps": app.fps, + "uiMs": app.ui_ms, + "baking": app.bake_progress(), + "toasts": app.toasts.iter().map(|t| json!({"text": t.text, "error": t.error})).collect::>(), + })) + } + "ui.menu.list" => ok(json!( + crate::menus::CATALOG + .iter() + .filter(|i| i.label != "-") + .map(|i| json!({ + "menu": i.menu, "submenu": i.sub, "label": i.label, "id": i.id, "shortcut": crate::keymap::shortcut_of(&app.ui.keymap, i.id), + "implemented": crate::menus::implemented(i.id), "enabled": crate::menus::enabled(app, i.id), + })) + .collect::>() + )), + "ui.menu.invoke" => { + let Some(id) = p.get("id").and_then(Value::as_str) else { return err("`id` is required") }; + if !crate::menus::implemented(id) { + return err(format!("menu item `{id}` is not implemented")); + } + crate::menus::invoke(app, ctx, id); + ok(Value::Null) + } + "ui.set" => { + let mut cur = serde_json::to_value(&app.ui).unwrap_or(Value::Null); + if let (Some(obj), Some(patch)) = (cur.as_object_mut(), p.as_object()) { + for (k, v) in patch { + obj.insert(k.clone(), v.clone()); + } + } + match serde_json::from_value(cur) { + Ok(ui) => { + app.ui = ui; + ok(Value::Null) + } + Err(e) => err(format!("invalid UI state: {e}")), + } + } + "viewport.screenshot" => { + let view = if p.get("view").and_then(Value::as_str) == Some("2d") { crate::viewport::VIEW_2D } else { crate::viewport::VIEW_3D }; + match screenshot(app, view) { + Some((w, h, png)) => ok(json!({ "width": w, "height": h, "png": base64::engine::general_purpose::STANDARD.encode(png) })), + None => err("no rendered view to capture yet"), + } + } + other => err(format!("unknown method `{other}`")), + } +} + +/// Encode a rendered view as PNG. +pub fn screenshot(app: &TextureCraftApp, view: u64) -> Option<(u32, u32, Vec)> { + let rs = app.render_state.as_ref()?; + let renderer = rs.renderer.read(); + let gpu = renderer.callback_resources.get::()?; + let (w, h, rgba) = gpu.renderer.read_view(&rs.device, &rs.queue, view)?; + encode_png(w, h, rgba) +} diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs new file mode 100644 index 00000000..5e2600dc --- /dev/null +++ b/crates/ui-egui/src/dock.rs @@ -0,0 +1,1321 @@ +//! Panel bodies of the right column: Texture Set List, Layers, Texture Set Settings, Properties +//! (hosted as dock tabs by `docking`). + +use egui::{Color32, Rect, RichText, Sense, Stroke, Ui, pos2, vec2}; +use egui_phosphor::regular as ic; +use serde_json::{Value, json}; +use texturecraft_engine::core::{BakedMap, BlendMode, Channel, EffectKind, Fill, Filter, GeneratorKind, Layer, LayerId, LayerKind, ProceduralKind, Source}; +use texturecraft_engine::paint::BrushAlpha; +use texturecraft_engine::{StackTarget, Tool}; + +use crate::TextureCraftApp; +use crate::state::PropsTab; +use crate::theme::{TOKENS, caption}; +use crate::widgets::{chip, color_swatch, elided, icon_button, section, slider}; + +const TAG_COLORS: [Color32; 8] = [ + Color32::from_rgb(0xc0, 0x40, 0x40), + Color32::from_rgb(0xd0, 0x80, 0x30), + Color32::from_rgb(0xc8, 0xb0, 0x30), + Color32::from_rgb(0x58, 0xa0, 0x40), + Color32::from_rgb(0x30, 0xa0, 0x90), + Color32::from_rgb(0x40, 0x78, 0xd0), + Color32::from_rgb(0x80, 0x58, 0xc8), + Color32::from_rgb(0xb0, 0x50, 0xa0), +]; + +pub(crate) fn texture_set_list(app: &mut TextureCraftApp, ui: &mut Ui) { + let sets: Vec<(String, u32, bool)> = app.session.doc.project.texture_sets.iter().map(|t| (t.name.clone(), t.resolution, t.visible)).collect(); + let active = app.session.ts(); + egui::ScrollArea::vertical().id_salt("ts_scroll").show(ui, |ui| { + for (i, (name, res, visible)) in sets.into_iter().enumerate() { + let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 22.0), Sense::click()); + let p = ui.painter(); + let bg = if i == active { + TOKENS.row_selected + } else if resp.hovered() { + TOKENS.row_hover + } else { + TOKENS.panel + }; + p.rect_filled(rect, 2.0, bg); + if i == active { + p.rect_stroke(rect, 2.0, Stroke::new(1.0, TOKENS.accent), egui::StrokeKind::Inside); + } + let eye = Rect::from_min_size(rect.min + vec2(4.0, 3.0), vec2(16.0, 16.0)); + let eye_resp = ui.interact(eye, ui.id().with(("ts_eye", i)), Sense::click()).on_hover_text("Show or hide the texture set"); + p.text(eye.center(), egui::Align2::CENTER_CENTER, if visible { ic::EYE } else { ic::EYE_SLASH }, egui::FontId::proportional(13.0), TOKENS.text); + // Narrow panels drop the shader label, then the resolution, before cutting the name. + let cy = rect.center().y; + let mut right = rect.right() - 6.0; + if rect.width() >= 260.0 { + let g = p.layout_no_wrap("Main shader".into(), egui::FontId::proportional(11.0), TOKENS.text_dim); + right -= g.size().x; + p.galley(pos2(right, cy - g.size().y * 0.5), g, TOKENS.text_dim); + right -= 10.0; + } + if rect.width() >= 170.0 { + let g = p.layout_no_wrap(format!("{res}x{res}"), egui::FontId::proportional(11.0), TOKENS.text_dim); + let x = (rect.left() + rect.width() * 0.48).min(right - g.size().x); + p.galley(pos2(x, cy - g.size().y * 0.5), g, TOKENS.text_dim); + right = x - 8.0; + } + let color = if i == active { TOKENS.text_strong } else { TOKENS.text }; + let g = elided(p, name, 12.0, color, right - rect.left() - 26.0); + p.galley(pos2(rect.left() + 26.0, cy - g.size().y * 0.5), g, color); + if eye_resp.clicked() { + app.run("textureSet.visible", json!({"ts": i})); + } else if resp.clicked() { + app.run("textureSet.select", json!({"ts": i})); + } + } + }); +} + +// --------------------------------------------------------------------------------------------- +// Layers + +pub(crate) fn layers(app: &mut TextureCraftApp, ui: &mut Ui) { + // Wraps in a narrow column instead of widening the rows below past the panel. + ui.horizontal_wrapped(|ui| { + let chans = app.session.doc.project.texture_set(app.session.ts()).map(|t| t.channel_list()).unwrap_or_default(); + egui::ComboBox::from_id_salt("layer_channel").width(86.0).selected_text(app.ui.layer_channel.label()).show_ui(ui, |ui| { + for c in chans { + ui.selectable_value(&mut app.ui.layer_channel, c, c.label()); + } + }); + let has = app.session.selected_layer().is_some(); + let selected = app.session.selected_layer().and_then(|id| app.session.doc.project.layers.get(&id)).cloned(); + ui.menu_button(RichText::new(ic::MAGIC_WAND).size(14.0), |ui| match &selected { + Some(l) => effect_menu(app, ui, l), + None => { + ui.label(RichText::new("Select a layer").color(TOKENS.text_dim)); + } + }) + .response + .on_hover_text("Add effect"); + ui.menu_button(RichText::new(ic::SELECTION_BACKGROUND).size(14.0), |ui| { + for (label, id) in + [("Add white mask", "mask.add.white"), ("Add black mask", "mask.add.black"), ("Add mask with color selection", "mask.add.colorSelection")] + { + if ui.add_enabled(has, egui::Button::new(label)).clicked() { + app.run(id, Value::Null); + ui.close(); + } + } + }) + .response + .on_hover_text("Add mask"); + if icon_button(ui, ic::PAINT_BRUSH, "Add paint layer", false, 22.0).clicked() { + app.run("layer.add.paint", Value::Null); + } + if icon_button(ui, ic::PAINT_BUCKET, "Add fill layer", false, 22.0).clicked() { + app.run("layer.add.fill", Value::Null); + } + if icon_button(ui, ic::FOLDER_SIMPLE, "Add folder", false, 22.0).clicked() { + app.run("layer.add.group", Value::Null); + } + if icon_button(ui, ic::TRASH, &crate::keymap::tip(&app.ui.keymap, "Remove layer", "layer.remove"), false, 22.0).clicked() { + app.run("layer.remove", Value::Null); + } + }); + ui.add_space(2.0); + let ts = app.session.ts(); + let stack: Vec = app.session.doc.project.texture_sets.get(ts).map(|t| t.stack.iter().rev().copied().collect()).unwrap_or_default(); + egui::ScrollArea::vertical().id_salt("layers_scroll").auto_shrink([false, false]).show(ui, |ui| { + for id in stack { + layer_tree(app, ui, id, 0); + } + // Click on empty space deselects nothing; leave room to drop at the bottom. + let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 24.0), Sense::hover()); + if let Some(dragged) = resp.dnd_release_payload::() { + let bottom = app.session.doc.project.texture_sets.get(ts).and_then(|t| t.stack.first().copied()); + if bottom.map(|b| b.0) != Some(*dragged) { + app.run("layer.move", json!({"layer": *dragged, "index": 0})); + } + } + if resp.dnd_hover_payload::().is_some() { + ui.painter().line_segment([rect.left_top(), rect.right_top()], Stroke::new(2.0, TOKENS.accent)); + } + }); +} + +/// Whether the selection targets the layer content (the content or one of its effects) rather +/// than the mask. +fn targets_content(app: &TextureCraftApp) -> bool { + let p = &app.session.doc.project; + match app.session.target { + StackTarget::Content => true, + StackTarget::Mask => false, + StackTarget::Effect(e) => p.effect(e).and_then(|(owner, _)| p.layers.get(&owner)).is_some_and(|l| l.content_effects.iter().any(|x| x.id == e)), + } +} + +/// "Add effect" items for `layer` (toolbar and context menu). Effects that fit both stacks go +/// to the content when it is the selected target; generators and compare always go to the +/// mask, anchor points to the content. +fn effect_menu(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer) { + let content = !layer.is_group() && app.session.selected_layer() == Some(layer.id) && targets_content(app); + let t = if content { "content" } else { "mask" }; + ui.label(caption(if content { "Add to the layer content" } else { "Add to the mask" })); + let items = [ + ("Add generator", "effect.add.generator", json!({})), + ("Add paint", "effect.add.paint", json!({"target": t})), + ("Add fill", "effect.add.fill", json!({"target": t})), + ("Add levels", "effect.add.levels", json!({"target": t})), + ("Add filter: blur", "effect.add.filter", json!({"target": t, "filter": "blur", "radius": 8})), + ("Add filter: sharpen", "effect.add.filter", json!({"target": t, "filter": "sharpen"})), + ("Add filter: invert", "effect.add.filter", json!({"target": t, "filter": "invert"})), + ("Add filter: threshold", "effect.add.filter", json!({"target": t, "filter": "threshold"})), + ("Add filter: HSL", "effect.add.filter", json!({"target": t, "filter": "hsl"})), + ("Add compare mask", "effect.add.compare", json!({})), + ("Add anchor point", "effect.add.anchor", json!({})), + ]; + for (label, id, p) in items { + let enabled = id != "effect.add.anchor" || !layer.is_group(); + if ui.add_enabled(enabled, egui::Button::new(label)).clicked() { + if app.session.selected_layer() != Some(layer.id) { + app.run("layer.select", json!({"layer": layer.id.0})); + } + app.run(id, with(&p, json!({"layer": layer.id.0}))); + ui.close(); + } + } +} + +fn layer_tree(app: &mut TextureCraftApp, ui: &mut Ui, id: LayerId, depth: usize) { + let Some(layer) = app.session.doc.project.layers.get(&id).cloned() else { return }; + layer_row(app, ui, &layer, depth); + for e in layer.content_effects.iter().rev() { + effect_row(app, ui, &layer, e.id, &e.name, e.visible, depth + 1, ic::SPHERE); + } + if let Some(m) = &layer.mask { + for e in m.effects.iter().rev() { + effect_row(app, ui, &layer, e.id, &e.name, e.visible, depth + 1, ic::MAGIC_WAND); + } + } + if let LayerKind::Group { children, collapsed } = &layer.kind + && !collapsed + && depth < 12 + { + for c in children.iter().rev() { + layer_tree(app, ui, *c, depth + 1); + } + } +} + +fn layer_row(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer, depth: usize) { + let selected = app.session.selected_layer() == Some(layer.id); + let h = 38.0; + let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), h), Sense::click_and_drag()); + let p = ui.painter().clone(); + let bg = if selected && app.session.target == StackTarget::Content { + TOKENS.row_selected + } else if resp.hovered() { + TOKENS.row_hover + } else { + TOKENS.row + }; + p.rect_filled(rect.shrink2(vec2(0.0, 1.0)), 2.0, bg); + if selected { + p.rect_stroke(rect.shrink2(vec2(0.0, 1.0)), 2.0, Stroke::new(1.0, TOKENS.accent), egui::StrokeKind::Inside); + } + if let Some(tag) = layer.color_tag.and_then(|t| TAG_COLORS.get(t as usize)) { + p.rect_filled(Rect::from_min_size(rect.min + vec2(0.0, 1.0), vec2(3.0, h - 2.0)), 0.0, *tag); + } + let x0 = rect.left() + 6.0 + depth as f32 * 14.0; + // Eye. + let eye = Rect::from_center_size(pos2(x0 + 8.0, rect.center().y), vec2(18.0, 18.0)); + let eye_resp = ui.interact(eye, ui.id().with(("eye", layer.id.0)), Sense::click()).on_hover_text("Show or hide the layer"); + p.text( + eye.center(), + egui::Align2::CENTER_CENTER, + if layer.visible { ic::EYE } else { ic::EYE_SLASH }, + egui::FontId::proportional(13.0), + if layer.visible { TOKENS.text } else { TOKENS.text_dim }, + ); + if eye_resp.clicked() { + app.run("layer.visible", json!({"layer": layer.id.0})); + } + // Group caret. + let mut x = x0 + 20.0; + if let LayerKind::Group { collapsed, .. } = layer.kind { + let caret = Rect::from_center_size(pos2(x + 6.0, rect.center().y), vec2(14.0, 14.0)); + let cr = ui.interact(caret, ui.id().with(("caret", layer.id.0)), Sense::click()).on_hover_text("Expand or collapse the folder"); + p.text( + caret.center(), + egui::Align2::CENTER_CENTER, + if collapsed { ic::CARET_RIGHT } else { ic::CARET_DOWN }, + egui::FontId::proportional(11.0), + TOKENS.text_dim, + ); + if cr.clicked() + && let Some(LayerKind::Group { collapsed, .. }) = app.session.doc.project.layers.get_mut(&layer.id).map(|l| &mut l.kind) + { + *collapsed = !*collapsed; + } + x += 14.0; + } + // Thumbnail. + let thumb = Rect::from_min_size(pos2(x, rect.top() + 5.0), vec2(28.0, 28.0)); + p.rect_filled(thumb, 2.0, Color32::from_rgb(0x1a, 0x1a, 0x1a)); + match &layer.kind { + LayerKind::Fill(f) => { + let c = match f.source(Channel::BaseColor) { + Source::Uniform(v) => v, + Source::Procedural { low, high, .. } => [(low[0] + high[0]) * 0.5, (low[1] + high[1]) * 0.5, (low[2] + high[2]) * 0.5], + Source::Image { .. } | Source::Anchor { .. } => [0.5; 3], + }; + crate::thumbs::paint_sphere(&p, thumb.center(), 12.0, c); + } + LayerKind::Paint => { + p.text(thumb.center(), egui::Align2::CENTER_CENTER, ic::PAINT_BRUSH, egui::FontId::proportional(15.0), TOKENS.text); + } + LayerKind::Group { .. } => { + p.text(thumb.center(), egui::Align2::CENTER_CENTER, ic::FOLDER_SIMPLE, egui::FontId::proportional(16.0), TOKENS.text); + } + LayerKind::Instance { .. } => { + p.text(thumb.center(), egui::Align2::CENTER_CENTER, ic::LINK, egui::FontId::proportional(16.0), TOKENS.accent); + } + } + x = thumb.right() + 8.0; + // An instance draws its source's content, blending and (unless it has its own) mask. + let project = &app.session.doc.project; + let source = layer.instance_source().map(|src| { + let set = project.locate(src).and_then(|(ts, _, _)| project.texture_sets.get(ts)).map(|t| t.name.as_str()).unwrap_or("?"); + project.layers.get(&src).map_or_else(|| "missing source".to_string(), |l| format!("{} · {set}", l.name)) + }); + let mask = project.layers.get(&project.mask_owner(layer.id)).and_then(|l| l.mask.clone()); + let blend = project.content_layer(layer.id).and_then(|l| l.blend(app.ui.layer_channel)); + // Mask thumbnail. + let right_w = 46.0; + let mask_rect = Rect::from_min_size(pos2(rect.right() - right_w - 30.0, rect.top() + 7.0), vec2(24.0, 24.0)); + if let Some(m) = &mask { + let mask_sel = selected && !targets_content(app); + p.rect_filled( + mask_rect, + 1.0, + if m.background == texturecraft_engine::core::MaskBackground::White { Color32::from_gray(225) } else { Color32::from_gray(18) }, + ); + p.rect_stroke( + mask_rect, + 1.0, + Stroke::new(if mask_sel { 1.5 } else { 1.0 }, if mask_sel { TOKENS.accent } else { Color32::from_gray(80) }), + egui::StrokeKind::Outside, + ); + if !m.effects.is_empty() { + p.text(mask_rect.center(), egui::Align2::CENTER_CENTER, ic::MAGIC_WAND, egui::FontId::proportional(11.0), Color32::from_rgb(0x80, 0x80, 0x80)); + } + if !m.enabled { + p.line_segment([mask_rect.left_top(), mask_rect.right_bottom()], Stroke::new(1.5, TOKENS.danger)); + } + let mr = + ui.interact(mask_rect, ui.id().with(("mask", layer.id.0)), Sense::click()).on_hover_text("Select the mask (Alt+click: show it in the viewport)"); + if mr.clicked() { + app.run("layer.select", json!({"layer": layer.id.0, "target": "mask"})); + if ui.input(|i| i.modifiers.alt) { + let showing = app.session.view == texturecraft_engine::ViewMode::Mask(layer.id); + let p = if showing { json!({"mode": "material"}) } else { json!({"mode": "mask", "layer": layer.id.0}) }; + app.run("viewport.view", p); + } + } + if app.session.view == texturecraft_engine::ViewMode::Mask(layer.id) { + p.rect_stroke(mask_rect.expand(2.0), 1.0, Stroke::new(1.5, Color32::from_rgb(0xe0, 0xb0, 0x40)), egui::StrokeKind::Outside); + } + } else { + p.rect_stroke(mask_rect, 1.0, Stroke::new(1.0, Color32::from_gray(52)), egui::StrokeKind::Inside); + } + // Name (or rename editor). + let name_rect = Rect::from_min_max(pos2(x, rect.top() + 4.0), pos2(mask_rect.left() - 4.0, rect.bottom() - 4.0)); + let renaming = app.ui.rename.as_ref().is_some_and(|(r, _)| *r == layer.id.0); + if renaming { + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(name_rect).layout(egui::Layout::left_to_right(egui::Align::Center))); + if let Some((_, buf)) = app.ui.rename.as_mut() { + let r = child.add(egui::TextEdit::singleline(buf).desired_width(name_rect.width())); + r.request_focus(); + if r.lost_focus() { + let name = buf.clone(); + app.ui.rename = None; + app.run("layer.rename", json!({"layer": layer.id.0, "name": name})); + } + } + } else { + let galley = elided(&p, layer.name.clone(), 12.0, if layer.visible { TOKENS.text_strong } else { TOKENS.text_dim }, name_rect.width()); + let y = if source.is_some() { rect.center().y - 7.0 } else { rect.center().y }; + p.galley(pos2(name_rect.left(), y - galley.size().y * 0.5), galley, TOKENS.text); + if let Some(src) = source { + let src = elided(&p, format!("{} {src}", ic::LINK_SIMPLE), 10.0, TOKENS.text_dim, name_rect.width()); + p.galley(pos2(name_rect.left(), rect.center().y + 7.0 - src.size().y * 0.5), src, TOKENS.text_dim); + } + } + // Blend mode and opacity of the displayed channel. + let ch = app.ui.layer_channel; + let blend_rect = Rect::from_min_size(pos2(rect.right() - right_w - 2.0, rect.top() + 3.0), vec2(right_w, 16.0)); + let op_rect = Rect::from_min_size(pos2(rect.right() - right_w - 2.0, rect.top() + 19.0), vec2(right_w, 16.0)); + if let Some(b) = blend { + let br = ui.interact(blend_rect, ui.id().with(("blend", layer.id.0)), Sense::click()).on_hover_text("Blending mode of the displayed channel"); + p.text(blend_rect.right_center() - vec2(10.0, 0.0), egui::Align2::RIGHT_CENTER, b.mode.short(), egui::FontId::proportional(11.0), TOKENS.text); + p.text(blend_rect.right_center(), egui::Align2::RIGHT_CENTER, ic::CARET_DOWN, egui::FontId::proportional(8.0), TOKENS.text_dim); + egui::Popup::menu(&br).show(|ui| { + ui.set_min_width(190.0); + for m in BlendMode::MENU { + match m { + Some(m) => { + if ui.selectable_label(m == b.mode, m.label()).clicked() { + app.run("layer.blend", json!({"layer": layer.id.0, "channel": ch.id(), "mode": format!("{m:?}")})); + ui.close(); + } + } + None => { + ui.separator(); + } + } + } + }); + let mut op = (b.opacity * 100.0).round(); + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(op_rect).layout(egui::Layout::right_to_left(egui::Align::Center))); + let r = child.add(egui::DragValue::new(&mut op).range(0.0..=100.0).speed(0.5).max_decimals(0)); + if r.changed() { + app.run("layer.blend", json!({"layer": layer.id.0, "channel": ch.id(), "opacity": op / 100.0})); + } + } else { + p.text(blend_rect.right_center(), egui::Align2::RIGHT_CENTER, "off", egui::FontId::proportional(11.0), TOKENS.text_dim); + } + // Interaction: select, rename, drag & drop, context menu. + if resp.clicked() && !eye_resp.clicked() { + app.run("layer.select", json!({"layer": layer.id.0})); + } + if resp.double_clicked() { + app.ui.rename = Some((layer.id.0, layer.name.clone())); + } + if resp.drag_started() { + resp.dnd_set_drag_payload(layer.id.0); + } + if let Some(src) = resp.dnd_hover_payload::() + && *src != layer.id.0 + { + let inside = layer.is_group() && ui.input(|i| i.pointer.hover_pos()).is_some_and(|p| (p.y - rect.center().y).abs() < h * 0.25); + if inside { + p.rect_stroke(rect, 2.0, Stroke::new(2.0, TOKENS.accent), egui::StrokeKind::Inside); + } else { + p.line_segment([rect.left_top(), rect.right_top()], Stroke::new(2.0, TOKENS.accent)); + } + } + if let Some(src) = resp.dnd_release_payload::() + && *src != layer.id.0 + { + let inside = layer.is_group() && ui.input(|i| i.pointer.hover_pos()).is_some_and(|p| (p.y - rect.center().y).abs() < h * 0.25); + app.run("layer.move", json!({"layer": *src, "above": layer.id.0, "inside": inside})); + } + resp.context_menu(|ui| layer_context_menu(app, ui, layer)); +} + +/// One effect of a layer's content (`glyph` sphere) or mask (`glyph` wand) stack. +#[allow(clippy::too_many_arguments)] +fn effect_row(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer, eid: LayerId, name: &str, visible: bool, depth: usize, glyph: &str) { + let selected = app.session.selected_layer() == Some(layer.id) && app.session.target == StackTarget::Effect(eid); + let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 22.0), Sense::click()); + let p = ui.painter().clone(); + p.rect_filled( + rect.shrink2(vec2(0.0, 1.0)), + 2.0, + if selected { + TOKENS.row_selected + } else if resp.hovered() { + TOKENS.row_hover + } else { + TOKENS.panel + }, + ); + if selected { + p.rect_stroke(rect.shrink2(vec2(0.0, 1.0)), 2.0, Stroke::new(1.0, TOKENS.accent), egui::StrokeKind::Inside); + } + let x0 = rect.left() + 6.0 + depth as f32 * 14.0; + let eye = Rect::from_center_size(pos2(x0 + 8.0, rect.center().y), vec2(16.0, 16.0)); + let er = ui.interact(eye, ui.id().with(("eff_eye", eid.0)), Sense::click()).on_hover_text("Enable or disable the effect"); + p.text(eye.center(), egui::Align2::CENTER_CENTER, if visible { ic::EYE } else { ic::EYE_SLASH }, egui::FontId::proportional(12.0), TOKENS.text_dim); + p.text(pos2(x0 + 22.0, rect.center().y), egui::Align2::LEFT_CENTER, glyph, egui::FontId::proportional(11.0), TOKENS.text_dim); + p.text(pos2(x0 + 38.0, rect.center().y), egui::Align2::LEFT_CENTER, name, egui::FontId::proportional(11.5), TOKENS.text); + if er.clicked() { + app.run("effect.set", json!({"effect": eid.0, "visible": !visible})); + } else if resp.clicked() { + app.run("layer.select", json!({"layer": layer.id.0, "target": eid.0})); + } + resp.context_menu(|ui| { + if ui.button("Remove effect").clicked() { + app.run("effect.remove", json!({"effect": eid.0})); + ui.close(); + } + }); +} + +fn layer_context_menu(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer) { + ui.set_min_width(230.0); + let lid = layer.id.0; + let run = |app: &mut TextureCraftApp, ui: &mut Ui, label: &str, id: &str, p: Value, enabled: bool| { + if ui.add_enabled(enabled, egui::Button::new(label)).clicked() { + app.run("layer.select", json!({"layer": lid})); + app.run(id, p); + ui.close(); + } + }; + // An instance without a mask of its own edits its source's; adding one overrides it. + let project = &app.session.doc.project; + let has_mask = project.layers.get(&project.mask_owner(layer.id)).is_some_and(|l| l.mask.is_some()); + run(app, ui, "Add white mask", "mask.add.white", json!({"layer": lid}), layer.mask.is_none()); + run(app, ui, "Add black mask", "mask.add.black", json!({"layer": lid}), layer.mask.is_none()); + run(app, ui, "Add mask with color selection", "mask.add.colorSelection", json!({"layer": lid}), true); + ui.separator(); + run(app, ui, "Toggle mask", "mask.toggle", json!({"layer": lid}), has_mask); + run(app, ui, "Invert mask background", "mask.invertBackground", json!({"layer": lid}), has_mask); + run(app, ui, "Invert mask", "mask.invert", json!({"layer": lid}), has_mask); + run(app, ui, "Clear mask", "mask.clear", json!({"layer": lid}), has_mask); + run(app, ui, "Remove mask", "mask.remove", json!({"layer": lid}), has_mask); + ui.separator(); + run(app, ui, "Flatten layer Ctrl+M", "layer.flatten", json!({"layer": lid}), !layer.is_group()); + #[cfg(not(target_arch = "wasm32"))] + if ui.button("Create smart material").clicked() { + let file = crate::library_dir().join(format!("{}.tcmat", texturecraft_engine::formats::sanitize_resource_name(&layer.name))); + if let Some(r) = app.run("material.save", json!({"layer": lid, "path": file.display().to_string(), "name": layer.name})) { + let p = r.get("path").and_then(|p| p.as_str()).unwrap_or_default().to_string(); + app.toast(format!("Smart material saved to {p}"), false); + app.library = None; + } + ui.close(); + } + ui.separator(); + run(app, ui, "Cut layer(s) Ctrl+X", "layer.cut", json!({"layer": lid}), true); + run(app, ui, "Copy layer(s) Ctrl+C", "layer.copy", json!({"layer": lid}), true); + run(app, ui, "Paste layer(s) Ctrl+V", "layer.paste", json!({}), app.session.clipboard.is_some()); + let paste_instance = crate::menus::enabled(app, "layer.pasteInstance"); + run(app, ui, "Paste as instance", "layer.pasteInstance", json!({}), paste_instance); + run(app, ui, "Duplicate layer(s) Ctrl+D", "layer.duplicate", json!({"layer": lid}), true); + run(app, ui, "Instantiate across texture sets", "layer.instantiateAll", json!({"layer": lid}), app.session.set_count() > 1); + run(app, ui, "Copy to all texture sets", "layer.instantiateAll", json!({"layer": lid, "copy": true}), app.session.set_count() > 1); + run(app, ui, "Remove layer(s) Del", "layer.remove", json!({"layer": lid}), true); + run(app, ui, "Group layer(s) Ctrl+G", "layer.group", json!({"layer": lid}), true); + ui.separator(); + ui.horizontal(|ui| { + let (r, resp) = ui.allocate_exact_size(vec2(16.0, 16.0), Sense::click()); + ui.painter().rect_stroke(r, 2.0, Stroke::new(1.0, TOKENS.text_dim), egui::StrokeKind::Inside); + ui.painter().line_segment([r.left_bottom(), r.right_top()], Stroke::new(1.0, TOKENS.danger)); + if resp.clicked() { + app.run("layer.colorTag", json!({"layer": lid})); + } + for (i, c) in TAG_COLORS.iter().enumerate() { + let (r, resp) = ui.allocate_exact_size(vec2(16.0, 16.0), Sense::click()); + ui.painter().rect_filled(r, 2.0, *c); + if resp.clicked() { + app.run("layer.colorTag", json!({"layer": lid, "tag": i})); + } + } + }); + ui.separator(); + effect_menu(app, ui, layer); +} + +// --------------------------------------------------------------------------------------------- +// Texture set settings + +pub(crate) fn texture_set_settings(app: &mut TextureCraftApp, ui: &mut Ui) { + let ts = app.session.ts(); + let Some(set) = app.session.doc.project.texture_sets.get(ts).cloned() else { return }; + egui::ScrollArea::vertical().id_salt("tss").show(ui, |ui| { + ui.label(caption("General properties")); + egui::Grid::new("tss_grid").num_columns(2).spacing(vec2(8.0, 6.0)).show(ui, |ui| { + ui.label("Name"); + ui.label(RichText::new(&set.name).color(TOKENS.text_strong)); + ui.end_row(); + ui.label("Size"); + egui::ComboBox::from_id_salt("ts_size").selected_text(format!("{}", set.resolution)).show_ui(ui, |ui| { + for r in [256u32, 512, 1024, 2048, 4096, 8192] { + if ui.selectable_label(r == set.resolution, format!("{r}")).clicked() { + app.run("textureSet.resolution", json!({"ts": ts, "resolution": r})); + } + } + }); + ui.end_row(); + ui.label("Shader instance"); + ui.label("Main shader"); + ui.end_row(); + }); + ui.add_space(8.0); + ui.horizontal(|ui| { + ui.label(caption("Channels")); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + ui.menu_button("Add channel", |ui| { + for c in Channel::ALL { + if !set.has_channel(c) && ui.button(c.label()).clicked() { + app.run("textureSet.channel.add", json!({"ts": ts, "channel": c.id()})); + ui.close(); + } + } + }); + }); + }); + for (c, f) in &set.channels { + ui.horizontal(|ui| { + ui.label(RichText::new(c.label()).strong()); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if *c != Channel::BaseColor && icon_button(ui, ic::X, "Remove channel", false, 18.0).clicked() { + app.run("textureSet.channel.remove", json!({"ts": ts, "channel": c.id()})); + } + ui.label(RichText::new(f.label()).color(TOKENS.text_dim)); + }); + }); + } + ui.add_space(6.0); + let mut hs = set.height_strength; + if slider(ui, "Height to normal strength", &mut hs, 0.0..=10.0, 2).changed() { + app.run("textureSet.settings", json!({"ts": ts, "heightStrength": hs})); + } + ui.add_space(8.0); + ui.horizontal(|ui| { + ui.label(caption("Mesh maps")); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if ui.button("Bake Mesh Maps").clicked() { + app.ui.mode = crate::state::Mode::Baking; + } + }); + }); + let baked = app.session.doc.baked.get(&ts); + for m in BakedMap::ALL { + let present = baked.is_some_and(|b| b.maps.contains_key(&m)); + ui.horizontal(|ui| { + let (r, _) = ui.allocate_exact_size(vec2(26.0, 26.0), Sense::hover()); + ui.painter().rect_filled(r, 2.0, if present { mesh_map_color(m) } else { Color32::from_gray(40) }); + ui.vertical(|ui| { + ui.label(RichText::new(m.label()).strong()); + ui.label( + RichText::new(if present { format!("{}_{}", set.name, m.id()) } else { "Missing (bake to create)".into() }) + .size(10.5) + .color(TOKENS.text_dim), + ); + }); + }); + } + }); +} + +fn mesh_map_color(m: BakedMap) -> Color32 { + match m { + BakedMap::Normal => Color32::from_rgb(128, 128, 255), + BakedMap::WorldNormal => Color32::from_rgb(120, 200, 140), + BakedMap::Id => Color32::from_rgb(220, 60, 60), + BakedMap::AmbientOcclusion => Color32::from_gray(200), + BakedMap::Curvature => Color32::from_gray(128), + BakedMap::Position => Color32::from_rgb(120, 180, 90), + BakedMap::Thickness => Color32::from_gray(160), + BakedMap::Height => Color32::from_gray(128), + BakedMap::BentNormal => Color32::from_rgb(140, 170, 230), + BakedMap::Opacity => Color32::from_gray(230), + BakedMap::ColorMap => Color32::from_rgb(200, 150, 90), + BakedMap::WorldDirection => Color32::from_gray(180), + } +} + +// --------------------------------------------------------------------------------------------- +// Properties + +/// The Properties tab title: what the panel edits. +pub(crate) fn properties_title(app: &TextureCraftApp) -> String { + let p = &app.session.doc.project; + let what = match (app.session.selected_layer().and_then(|id| p.layers.get(&id)), app.session.target) { + (Some(_), StackTarget::Effect(e)) => p.effect(e).map(|(_, x)| x.name.clone()).unwrap_or_default(), + (Some(l), StackTarget::Content) if matches!(l.kind, LayerKind::Fill(_)) => "Fill".to_string(), + (Some(l), StackTarget::Content) if l.is_group() => "Folder".to_string(), + (Some(l), StackTarget::Content) if l.instance_source().is_some() => "Instance".to_string(), + _ => app.session.tool.tool.label().to_string(), + }; + format!("{} - {what}", crate::i18n::tr("Properties")) +} + +pub(crate) fn properties(app: &mut TextureCraftApp, ui: &mut Ui) { + let sel = app.session.selected_layer().and_then(|id| app.session.doc.project.layers.get(&id).cloned()); + let target = app.session.target; + egui::ScrollArea::vertical().id_salt("props").auto_shrink([false, false]).show(ui, |ui| match (&sel, target) { + (Some(l), StackTarget::Effect(e)) => effect_properties(app, ui, l, e), + (Some(l), StackTarget::Content) if matches!(l.kind, LayerKind::Fill(_)) => fill_properties(app, ui, l), + (Some(l), StackTarget::Content) if l.is_group() => { + ui.label(RichText::new("A folder blends its children (pass-through). Set per-channel opacity in the layer rows.").color(TOKENS.text_dim)); + } + (Some(l), StackTarget::Content) if l.instance_source().is_some() => instance_properties(app, ui, l), + (Some(l), StackTarget::Mask) => { + height_mask_section(app, ui, l); + ui.separator(); + tool_properties(app, ui); + } + _ => tool_properties(app, ui), + }); +} + +/// An instance draws its source: point there for edits. +fn instance_properties(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer) { + let Some(src) = layer.instance_source() else { return }; + let p = &app.session.doc.project; + let name = p.layers.get(&src).map_or_else(|| "a missing layer".to_string(), |l| format!("\"{}\"", l.name)); + let set = p.locate(src).and_then(|(ts, _, _)| p.texture_sets.get(ts)).map(|t| t.name.clone()).unwrap_or_default(); + ui.label(caption("Instance")); + ui.label(RichText::new(format!("{} Draws {name} of texture set \"{set}\". Edits to the source show in every instance.", ic::LINK)).color(TOKENS.text_dim)); + if ui.button("Select source").clicked() { + app.run("layer.select", json!({"layer": src.0})); + } +} + +/// Mask with height: the layer's height shapes its mask transitions. +fn height_mask_section(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer) { + let id = layer.id.0; + let hm = app.session.doc.project.content_layer(layer.id).map(|l| l.height_mask).unwrap_or_default(); + section(ui, "sec_height_mask", "Mask with height", true, |ui| { + let mut on = hm.enabled; + if ui + .checkbox(&mut on, "Combine with the layer's height") + .on_hover_text("Partial mask values follow the layer's height: high parts show first") + .changed() + { + app.run("layer.set", json!({"layer": id, "heightMask": {"enabled": on}})); + } + ui.add_enabled_ui(hm.enabled, |ui| { + let (mut contrast, mut offset) = (hm.contrast, hm.offset); + if slider(ui, "Contrast", &mut contrast, 0.0..=16.0, 2).drag_stopped() { + app.run("layer.set", json!({"layer": id, "heightMask": {"contrast": contrast}})); + } + if slider(ui, "Height offset", &mut offset, -1.0..=1.0, 2).drag_stopped() { + app.run("layer.set", json!({"layer": id, "heightMask": {"offset": offset}})); + } + }); + }); +} + +fn tool_properties(app: &mut TextureCraftApp, ui: &mut Ui) { + // Brush preview: a stroke and a sphere with the tool's material. + let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 88.0), Sense::hover()); + let p = ui.painter(); + p.rect_filled(rect, 2.0, Color32::from_rgb(0x1e, 0x1e, 0x1e)); + let half = rect.width() * 0.5; + let b = &app.session.tool.brush; + let mut pts = Vec::new(); + for k in 0..=40 { + let t = k as f32 / 40.0; + pts.push(pos2(rect.left() + 14.0 + t * (half - 28.0), rect.center().y + (t * 9.0).sin() * 18.0)); + } + let w = (b.size / 0.25 * 60.0).clamp(2.0, 30.0); + let a = (b.flow * b.opacity * 255.0) as u8; + p.add(egui::Shape::line(pts, Stroke::new(w, Color32::from_white_alpha(a.max(30))))); + let base = app.session.tool.values.get(&Channel::BaseColor).copied().unwrap_or([0.8; 3]); + crate::thumbs::paint_sphere(p, pos2(rect.left() + half * 1.5, rect.center().y), 36.0, base); + ui.add_space(4.0); + ui.horizontal(|ui| { + for (tab, icon, tip) in + [(PropsTab::Brush, ic::PAINT_BRUSH, "Brush"), (PropsTab::Alpha, ic::CIRCLE_HALF, "Alpha"), (PropsTab::Material, ic::SPHERE, "Material")] + { + if icon_button(ui, icon, tip, app.ui.props_tab == tab, 24.0).clicked() { + app.ui.props_tab = tab; + } + } + }); + ui.separator(); + if app.session.quick_mask.editing { + ui.label(RichText::new("Editing the quick mask: strokes paint where painting is allowed. Press U to finish.").color(TOKENS.text_dim)); + ui.separator(); + } + let tool_section: Option = match app.session.tool.tool { + Tool::Projection => Some(stencil_section), + Tool::Clone => Some(clone_section), + Tool::Smudge => Some(smudge_section), + Tool::Path => Some(path_section), + _ => None, + }; + if let Some(section) = tool_section { + section(app, ui); + ui.separator(); + } + match app.ui.props_tab { + PropsTab::Brush => brush_section(app, ui), + PropsTab::Alpha => alpha_section(app, ui), + PropsTab::Material => material_section(app, ui), + } +} + +fn stencil_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Stencil")); + let names: Vec = app.session.doc.resources.keys().cloned().collect(); + let current = app.session.tool.stencil.as_ref().map(|s| s.image.clone()).unwrap_or_else(|| "None".into()); + ui.horizontal(|ui| { + egui::ComboBox::from_id_salt("stencil_img").width(170.0).selected_text(current.clone()).show_ui(ui, |ui| { + if ui.selectable_label(app.session.tool.stencil.is_none(), "None").clicked() { + app.run("tool.stencil", json!({"clear": true})); + } + for n in &names { + if ui.selectable_label(*n == current, n).clicked() { + app.run("tool.stencil", json!({"image": n})); + } + } + }); + import_button(app, ui); + }); + if names.is_empty() { + ui.label(RichText::new("Import an image (File > Import resources) to project it onto the mesh.").color(TOKENS.text_dim)); + return; + } + if let Some(st) = app.session.tool.stencil.as_mut() { + slider(ui, "Scale", &mut st.scale, 0.05..=4.0, 2); + slider(ui, "Rotation", &mut st.rotation, 0.0..=360.0, 0); + slider(ui, "Overlay opacity", &mut st.opacity, 0.0..=1.0, 2); + ui.checkbox(&mut st.tile, "Tile"); + ui.label(RichText::new("Hold S: left-drag rotates, right-drag scales, middle-drag moves the stencil.").size(10.5).color(TOKENS.text_dim)); + } +} + +fn import_button(app: &mut TextureCraftApp, ui: &mut Ui) { + if ui.small_button("Import...").clicked() { + let ctx = ui.ctx().clone(); + crate::menus::invoke(app, &ctx, "resource.import"); + } +} + +fn clone_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Clone")); + let Some(src) = app.session.tool.clone_source else { + ui.label(RichText::new("Hold V and click the mesh to set the source, then paint elsewhere to copy it.").color(TOKENS.text_dim)); + return; + }; + ui.horizontal(|ui| { + ui.label(format!("Source U {:.3} V {:.3}", src.uv[0], src.uv[1])); + if ui.small_button("Clear").clicked() { + app.run("tool.cloneSource", json!({"clear": true})); + } + }); + let hint = if src.offset.is_some() { + "Aligned: the offset set by the first stroke is kept. V + click sets a new source." + } else { + "The first stroke sets the offset from the source." + }; + ui.label(RichText::new(hint).size(10.5).color(TOKENS.text_dim)); +} + +fn smudge_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Smudge")); + let mut v = app.session.tool.smudge_strength * 100.0; + if slider(ui, "Strength", &mut v, 0.0..=100.0, 0).changed() { + app.session.tool.smudge_strength = (v / 100.0).clamp(0.0, 1.0); + } + ui.label(RichText::new("Drags the layer stack's values along the stroke into the selected layer.").size(10.5).color(TOKENS.text_dim)); +} + +fn path_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Path")); + ui.horizontal(|ui| crate::toolbar::path_controls(app, ui)); + let n = app.session.tool.path.points.len(); + let hint = format!( + "{n} control points. Click the mesh (or the 2D view) to add points and drag them to adjust; click the first point to close the path. Enter paints it with the brush (a closed, filled path fills its inside), Esc cancels." + ); + ui.label(RichText::new(hint).size(10.5).color(TOKENS.text_dim)); +} + +fn brush_section(app: &mut TextureCraftApp, ui: &mut Ui) { + let b = &mut app.session.tool.brush; + ui.label(caption("Brush")); + section(ui, "sec_size", "Size", true, |ui| { + let mut size = b.size / 0.25 * 100.0; + if slider(ui, "Size", &mut size, 0.05..=100.0, 1).changed() { + b.size = (size / 100.0 * 0.25).clamp(0.0005, 0.25); + } + let mut ms = b.min_size * 100.0; + if slider(ui, "Minimum size (%)", &mut ms, 0.0..=100.0, 0).changed() { + b.min_size = ms / 100.0; + } + ui.checkbox(&mut b.screen_space, "Size in screen space"); + }); + section(ui, "sec_flow", "Flow and opacity", true, |ui| { + let mut f = b.flow * 100.0; + if slider(ui, "Flow", &mut f, 0.0..=100.0, 0).changed() { + b.flow = f / 100.0; + } + let mut o = b.opacity * 100.0; + if slider(ui, "Stroke opacity", &mut o, 0.0..=100.0, 0).changed() { + b.opacity = o / 100.0; + } + let mut s = b.spacing * 100.0; + if slider(ui, "Spacing", &mut s, 1.0..=1000.0, 0).changed() { + b.spacing = s / 100.0; + } + let mut h = b.hardness * 100.0; + if slider(ui, "Hardness", &mut h, 0.0..=99.9, 0).changed() { + b.hardness = h / 100.0; + } + }); + section(ui, "sec_angle", "Angle", false, |ui| { + slider(ui, "Angle", &mut b.angle, -180.0..=180.0, 0); + ui.checkbox(&mut b.follow_path, "Follow path"); + }); + section(ui, "sec_jitter", "Jitters", false, |ui| { + for (label, v) in [("Size jitter", &mut b.jitter_size), ("Angle jitter", &mut b.jitter_angle), ("Flow jitter", &mut b.jitter_flow)] { + let mut x = *v * 100.0; + if slider(ui, label, &mut x, 0.0..=100.0, 0).changed() { + *v = x / 100.0; + } + } + let mut pj = b.jitter_position * 100.0; + if slider(ui, "Position jitter", &mut pj, 0.0..=400.0, 0).changed() { + b.jitter_position = pj / 100.0; + } + }); + section(ui, "sec_align", "Alignment and culling", false, |ui| { + egui::ComboBox::from_label("Alignment").selected_text(format!("{:?}", b.alignment)).show_ui(ui, |ui| { + ui.selectable_value(&mut b.alignment, texturecraft_engine::paint::Alignment::Tangent, "Tangent | Wrap"); + ui.selectable_value(&mut b.alignment, texturecraft_engine::paint::Alignment::Camera, "Camera"); + }); + ui.checkbox(&mut b.backface_culling, "Backface culling"); + slider(ui, "Angle fade from", &mut b.angle_fade.0, 0.0..=90.0, 0); + slider(ui, "Angle fade to", &mut b.angle_fade.1, 0.0..=90.0, 0); + slider(ui, "Stamp depth", &mut b.depth, 0.05..=4.0, 2); + }); + section(ui, "sec_particles", "Particles", false, |ui| { + let pt = &mut b.particles; + ui.checkbox(&mut pt.enabled, "Particle brush (slides down the surface)"); + let mut count = pt.count as f32; + if slider(ui, "Count per stamp", &mut count, 1.0..=16.0, 0).changed() { + pt.count = count as u32; + } + let mut life = pt.lifetime as f32; + if slider(ui, "Lifetime (steps)", &mut life, 1.0..=128.0, 0).changed() { + pt.lifetime = life as u32; + } + slider(ui, "Gravity", &mut pt.gravity, 0.0..=2.0, 2); + }); + section(ui, "sec_lazy", "Lazy mouse and symmetry", false, |ui| { + slider(ui, "Lazy mouse distance", &mut b.lazy, 0.0..=200.0, 0); + ui.horizontal(|ui| { + ui.checkbox(&mut b.symmetry.x, "Mirror X"); + ui.checkbox(&mut b.symmetry.y, "Mirror Y"); + ui.checkbox(&mut b.symmetry.z, "Mirror Z"); + }); + }); + *b = b.sanitized(); +} + +/// One alpha in the picker: a 52×64 tile with the shape drawn by `paint` and a label. +fn alpha_tile(ui: &mut Ui, on: bool, label: &str, paint: impl FnOnce(&egui::Painter, Rect)) -> egui::Response { + let (rect, resp) = ui.allocate_exact_size(vec2(52.0, 64.0), Sense::click()); + let p = ui.painter(); + p.rect_filled(rect, 3.0, if on { Color32::from_rgb(0x34, 0x3c, 0x48) } else { Color32::from_rgb(0x1e, 0x1e, 0x1e) }); + if on { + p.rect_stroke(rect, 3.0, Stroke::new(1.0, TOKENS.accent), egui::StrokeKind::Inside); + } + paint(p, Rect::from_center_size(rect.center() - vec2(0.0, 7.0), vec2(40.0, 40.0))); + p.text(rect.center_bottom() - vec2(0.0, 6.0), egui::Align2::CENTER_CENTER, label, egui::FontId::proportional(9.5), TOKENS.text); + resp.on_hover_text(label) +} + +fn alpha_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.horizontal(|ui| { + ui.label(caption("Alpha")); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| import_button(app, ui)); + }); + let brush = &app.session.tool.brush; + let (current, image, hardness) = (brush.alpha, brush.alpha_image.clone(), brush.hardness); + let mut pick = None; + ui.horizontal_wrapped(|ui| { + for a in BrushAlpha::ALL { + if alpha_tile(ui, image.is_none() && current == a, a.label(), |p, r| crate::thumbs::paint_alpha(p, r, a, hardness)).clicked() { + pick = Some(json!(a.label())); + } + } + // Imported images, sampled as grayscale. + for name in app.session.doc.resources.keys() { + let Some(img) = app.session.images.get(name) else { continue }; + let tex = app.thumbs.image(ui.ctx(), name, img); + let on = image.as_deref() == Some(name.as_str()); + if alpha_tile(ui, on, name, |p, r| { + p.image(tex.id(), r, Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0)), Color32::WHITE); + }) + .clicked() + { + pick = Some(json!({ "image": name })); + } + } + }); + if let Some(alpha) = pick { + app.run("tool.brush", json!({ "alpha": alpha })); + } +} + +fn material_section(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Material")); + let chans = app.session.doc.project.texture_set(app.session.ts()).map(|t| t.channel_list()).unwrap_or_default(); + ui.horizontal_wrapped(|ui| { + for c in &chans { + let on = app.session.tool.enabled.contains(c); + if chip(ui, c.short(), on).clicked() { + app.run("tool.material", json!({"channel": c.id(), "enabled": !on})); + } + } + }); + ui.add_space(4.0); + let mask_mode = !targets_content(app); + if mask_mode { + let mut v = app.session.tool.mask_value; + if slider(ui, "Mask value (gray)", &mut v, 0.0..=1.0, 2).changed() { + app.session.tool.mask_value = v; + } + return; + } + for c in chans { + if !app.session.tool.enabled.contains(&c) { + continue; + } + let mut v = app.session.tool.values.get(&c).copied().unwrap_or(c.default_value()); + match c.kind() { + texturecraft_engine::core::ChannelKind::Color => { + ui.horizontal(|ui| { + ui.label(c.label()); + if color_swatch(ui, &format!("tool_{}", c.id()), &mut v, ui.available_width() - 4.0) { + app.session.tool.values.insert(c, v); + } + }); + } + texturecraft_engine::core::ChannelKind::NormalMap => { + ui.label(RichText::new("Normal: painting uses the flat normal").color(TOKENS.text_dim)); + } + texturecraft_engine::core::ChannelKind::Signed => { + if slider(ui, c.label(), &mut v[0], -1.0..=1.0, 2).changed() { + app.session.tool.values.insert(c, [v[0]; 3]); + } + } + texturecraft_engine::core::ChannelKind::Scalar => { + if slider(ui, c.label(), &mut v[0], 0.0..=1.0, 2).changed() { + app.session.tool.values.insert(c, [v[0]; 3]); + } + } + } + } + if app.session.tool.tool == Tool::Eraser { + ui.label(RichText::new("The eraser removes paint from the enabled channels.").color(TOKENS.text_dim)); + } +} + +fn fill_properties(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer) { + let LayerKind::Fill(fill) = &layer.kind else { return }; + let on: Vec = layer.channels.keys().copied().collect(); + ui.label(caption("Fill")); + fill_editor(app, ui, fill, &json!({"layer": layer.id.0}), &on, layer.id); +} + +/// `base` with the fields of `extra` added. +fn with(base: &Value, extra: Value) -> Value { + let mut v = base.clone(); + if let (Some(o), Value::Object(e)) = (v.as_object_mut(), extra) { + o.extend(e); + } + v +} + +/// Anchor points below layer `reader` in its texture set: (effect id, "layer / anchor" label). +fn anchors_below(app: &TextureCraftApp, reader: LayerId) -> Vec<(LayerId, String)> { + let p = &app.session.doc.project; + let Some((ts, _, _)) = p.locate(reader) else { return Vec::new() }; + p.walk(ts) + .into_iter() + .map(|(id, _)| id) + .take_while(|id| *id != reader) + .filter_map(|id| p.layers.get(&id)) + .flat_map(|l| l.content_effects.iter().filter(|e| matches!(e.kind, EffectKind::Anchor)).map(move |e| (e.id, format!("{} / {}", l.name, e.name)))) + .collect() +} + +fn anchor_label(app: &TextureCraftApp, anchor: LayerId, channel: Channel) -> String { + let name = app.session.doc.project.effect(anchor).map(|(_, e)| e.name.clone()).unwrap_or_else(|| "missing".into()); + format!("Anchor: {name} ({})", channel.label()) +} + +/// Projection and per-channel sources of a fill: a fill layer's (`base` = {"layer"}, `on` = +/// its enabled channels) or a content fill effect's (`base` = {"effect"}, `on` = the channels +/// it has a source for). `reader` is the layer owning the fill (for anchor sources). +fn fill_editor(app: &mut TextureCraftApp, ui: &mut Ui, fill: &Fill, base: &Value, on: &[Channel], reader: LayerId) { + use texturecraft_engine::core::{ChannelKind, Projection}; + let salt = base.to_string(); + let proj_label = fill.projection.label(); + egui::ComboBox::from_label("Projection").selected_text(proj_label).show_ui(ui, |ui| { + for (id, label) in [ + ("uv", "UV projection"), + ("triplanar", "Tri-planar projection"), + ("planar", "Planar projection"), + ("spherical", "Spherical projection"), + ("cylindrical", "Cylindrical projection"), + ] { + if ui.selectable_label(proj_label == label, label).clicked() { + app.run("layer.fill.projection", with(base, json!({"projection": id}))); + } + } + }); + let (mut scale, proj_id) = match &fill.projection { + Projection::Uv { scale, .. } => (scale[0], "uv"), + Projection::Triplanar { scale, .. } => (*scale, "triplanar"), + Projection::Planar { scale, .. } => (*scale, "planar"), + Projection::Spherical { scale } => (*scale, "spherical"), + Projection::Cylindrical { scale, .. } => (*scale, "cylindrical"), + }; + if slider(ui, "Scale / tiling", &mut scale, 0.01..=20.0, 2).drag_stopped() { + app.run("layer.fill.projection", with(base, json!({"projection": proj_id, "scale": scale}))); + } + ui.add_space(6.0); + ui.label(caption("Material")); + let chans = app.session.doc.project.texture_set(app.session.ts()).map(|t| t.channel_list()).unwrap_or_default(); + ui.horizontal_wrapped(|ui| { + for c in &chans { + let enabled = on.contains(c); + if chip(ui, c.short(), enabled).clicked() { + app.run("layer.fill.set", with(base, json!({"channel": c.id(), "enabled": !enabled}))); + } + } + }); + ui.add_space(4.0); + let anchors = anchors_below(app, reader); + for c in chans { + if !on.contains(&c) { + continue; + } + let set = |extra: Value| with(base, with(&json!({"channel": c.id()}), extra)); + ui.group(|ui| { + ui.horizontal(|ui| { + ui.label(RichText::new(c.label()).strong()); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + ui.menu_button(RichText::new(ic::DOTS_THREE).size(13.0), |ui| { + if ui.button("Uniform value").clicked() { + app.run("layer.fill.set", set(json!({"value": c.default_value()}))); + ui.close(); + } + ui.separator(); + for k in ProceduralKind::ALL { + if ui.button(k.label()).clicked() { + let (lo, hi) = match c { + Channel::BaseColor => ([0.15, 0.15, 0.15], [0.85, 0.85, 0.85]), + Channel::Height => ([-0.05; 3], [0.05; 3]), + _ => ([0.2; 3], [0.8; 3]), + }; + app.run("layer.fill.set", set(json!({"procedural": k.label(), "low": lo, "high": hi}))); + ui.close(); + } + } + if !anchors.is_empty() { + ui.separator(); + } + for (a, label) in &anchors { + if ui.button(format!("Anchor: {label}")).clicked() { + app.run("layer.fill.set", set(json!({"anchor": a.0}))); + ui.close(); + } + } + }) + .response + .on_hover_text("Channel source: uniform value, procedural or anchor"); + }); + }); + match fill.source(c) { + Source::Uniform(mut v) => { + if c.kind() == ChannelKind::Color { + if color_swatch(ui, &format!("fill_{salt}_{}", c.id()), &mut v, ui.available_width() - 4.0) { + app.run("layer.fill.set", set(json!({"color": v}))); + } + } else { + let range = if c.kind() == ChannelKind::Signed { -1.0..=1.0 } else { 0.0..=1.0 }; + let r = slider(ui, "Value", &mut v[0], range, 2); + if r.changed() { + app.run("layer.fill.set", set(json!({"value": v[0]}))); + } + } + } + Source::Procedural { pattern, low, high } => { + ui.label(RichText::new(format!("{} (scale {:.1}, seed {})", pattern.kind.label(), pattern.scale, pattern.seed)).color(TOKENS.text_dim)); + let mut s = pattern.scale; + let mut con = pattern.contrast; + let r1 = slider(ui, "Pattern scale", &mut s, 0.1..=100.0, 1); + let r2 = slider(ui, "Contrast", &mut con, 0.0..=8.0, 2); + let mut seed = pattern.seed as f32; + let r3 = slider(ui, "Seed", &mut seed, 0.0..=999.0, 0); + if r1.drag_stopped() || r2.drag_stopped() || r3.drag_stopped() { + app.run("layer.fill.set", set(json!({"procedural": pattern.kind.label(), "scale": s, "contrast": con, "seed": seed as u64, "low": low, "high": high}))); + } + if c.kind() == ChannelKind::Color { + let (mut lo, mut hi) = (low, high); + let mut changed = false; + ui.horizontal(|ui| { + ui.label("Low"); + changed |= color_swatch(ui, &format!("lo_{salt}_{}", c.id()), &mut lo, 60.0); + ui.label("High"); + changed |= color_swatch(ui, &format!("hi_{salt}_{}", c.id()), &mut hi, 60.0); + }); + if changed { + app.run("layer.fill.set", set(json!({"procedural": pattern.kind.label(), "scale": s, "contrast": con, "seed": pattern.seed, "low": lo, "high": hi}))); + } + } + } + Source::Image { name } => { + ui.label(format!("Image: {name}")); + } + Source::Anchor { anchor, channel } => { + ui.label(RichText::new(anchor_label(app, anchor, channel)).color(TOKENS.text_dim)); + } + } + }); + } +} + +fn effect_properties(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer, eid: LayerId) { + let Some((_, e)) = app.session.doc.project.effect(eid).map(|(l, e)| (l, e.clone())) else { return }; + let id = eid.0; + ui.horizontal(|ui| { + ui.label("Blending"); + egui::ComboBox::from_id_salt("eff_blend").selected_text(e.blend.label()).show_ui(ui, |ui| { + for m in BlendMode::all() { + if ui.selectable_label(m == e.blend, m.label()).clicked() { + app.run("effect.set", json!({"effect": id, "blend": format!("{m:?}")})); + } + } + }); + }); + let mut op = e.opacity; + if slider(ui, "Opacity", &mut op, 0.0..=1.0, 2).drag_stopped() { + app.run("effect.set", json!({"effect": id, "opacity": op})); + } + ui.separator(); + match &e.kind { + EffectKind::Generator(g) => { + ui.label(caption("Generator")); + egui::ComboBox::from_id_salt("gen_kind").selected_text(g.kind.label()).show_ui(ui, |ui| { + for k in GeneratorKind::ALL { + if ui.selectable_label(k == g.kind, k.label()).clicked() { + // Replace the generator kind: remove and add keeps ordering simple. + app.run("effect.remove", json!({"effect": id})); + app.run("effect.add.generator", json!({"generator": format!("{k:?}")})); + } + } + }); + let (mut level, mut soft, mut noise, mut ns) = (g.level, g.softness, g.noise_amount, g.noise_scale); + let r1 = slider(ui, "Level", &mut level, 0.0..=1.0, 2); + let r2 = slider(ui, "Softness", &mut soft, 0.0..=1.0, 2); + let r3 = slider(ui, "Noise amount", &mut noise, 0.0..=2.0, 2); + let r4 = slider(ui, "Noise scale", &mut ns, 0.1..=64.0, 1); + let mut inv = g.invert; + let r5 = ui.checkbox(&mut inv, "Invert"); + if r1.drag_stopped() || r2.drag_stopped() || r3.drag_stopped() || r4.drag_stopped() || r5.changed() { + app.run("effect.set", json!({"effect": id, "level": level, "softness": soft, "noise": noise, "noiseScale": ns, "invert": inv})); + } + if !app.session.doc.baked.contains_key(&app.session.ts()) { + ui.label( + RichText::new(format!("{} Bake mesh maps (F8) for curvature, AO and thickness based generators.", ic::WARNING)) + .color(Color32::from_rgb(0xe0, 0xb0, 0x40)), + ); + } + } + EffectKind::Levels(l) => { + ui.label(caption("Levels")); + let mut v = [l.in_low, l.in_high, l.gamma, l.out_low, l.out_high]; + let labels = ["Input low", "Input high", "Gamma", "Output low", "Output high"]; + let mut done = false; + for (i, label) in labels.iter().enumerate() { + let range = if i == 2 { 0.1..=5.0 } else { 0.0..=1.0 }; + done |= slider(ui, label, &mut v[i], range, 2).drag_stopped(); + } + if done { + app.run("effect.set", json!({"effect": id, "inLow": v[0], "inHigh": v[1], "gamma": v[2], "outLow": v[3], "outHigh": v[4]})); + } + } + EffectKind::Fill { source, .. } => { + ui.label(caption("Fill")); + let anchors = anchors_below(app, layer.id); + let current = match source { + Source::Anchor { anchor, channel } => anchor_label(app, *anchor, *channel), + Source::Uniform(_) => "Uniform value".to_string(), + Source::Procedural { pattern, .. } => pattern.kind.label().to_string(), + Source::Image { name } => format!("Image: {name}"), + }; + egui::ComboBox::from_label("Source").selected_text(current).show_ui(ui, |ui| { + if ui.selectable_label(matches!(source, Source::Uniform(_)), "Uniform value").clicked() { + app.run("effect.set", json!({"effect": id, "value": 1.0})); + } + for (a, label) in &anchors { + if ui.selectable_label(source.anchor() == Some(*a), format!("Anchor: {label}")).clicked() { + app.run("effect.set", json!({"effect": id, "anchor": a.0})); + } + } + }); + match source { + Source::Uniform(v) => { + let mut x = v[0]; + if slider(ui, "Value", &mut x, 0.0..=1.0, 2).drag_stopped() { + app.run("effect.set", json!({"effect": id, "value": x})); + } + } + Source::Anchor { channel, .. } => { + let chans = app.session.doc.project.texture_set(app.session.ts()).map(|t| t.channel_list()).unwrap_or_default(); + egui::ComboBox::from_label("Channel").selected_text(channel.label()).show_ui(ui, |ui| { + for c in chans { + if ui.selectable_label(c == *channel, c.label()).clicked() { + app.run("effect.set", json!({"effect": id, "anchorChannel": c.id()})); + } + } + }); + ui.label(RichText::new("Colors read as gray. Add a levels or blur effect above to shape the result.").color(TOKENS.text_dim)); + } + _ => {} + } + if anchors.is_empty() { + ui.label(RichText::new("Add an anchor point to a layer below to use its stack as a mask.").color(TOKENS.text_dim)); + } + } + EffectKind::Material(f) => { + ui.label(caption("Fill")); + let on: Vec = f.sources.keys().copied().collect(); + fill_editor(app, ui, f, &json!({"effect": id}), &on, layer.id); + } + EffectKind::Anchor => { + ui.label(caption("Anchor point")); + ui.label( + RichText::new("Records the stack up to this layer. Fill effects in masks (and fill layers) above can read it as a source.") + .color(TOKENS.text_dim), + ); + } + EffectKind::Paint => { + let what = if layer.content_effects.iter().any(|x| x.id == eid) { "the layer content" } else { "this mask. Use the Material tab's mask value for gray" }; + ui.label(RichText::new(format!("Paint on the mesh to edit {what}.")).color(TOKENS.text_dim)); + tool_properties(app, ui); + } + EffectKind::Filter(Filter::Hsl { hue, saturation, lightness }) => { + ui.label(caption("HSL")); + let (mut h, mut s, mut l) = (hue * 360.0, *saturation, *lightness); + let r1 = slider(ui, "Hue shift (degrees)", &mut h, -180.0..=180.0, 0); + let r2 = slider(ui, "Saturation", &mut s, -1.0..=1.0, 2); + let r3 = slider(ui, "Lightness", &mut l, -1.0..=1.0, 2); + if r1.drag_stopped() || r2.drag_stopped() || r3.drag_stopped() { + app.run("effect.set", json!({"effect": id, "hue": h / 360.0, "saturation": s, "lightness": l})); + } + } + EffectKind::Filter(Filter::Blur { radius }) => { + ui.label(caption("Blur")); + let mut r = *radius; + if slider(ui, "Intensity (texels at 2K)", &mut r, 0.0..=128.0, 1).drag_stopped() { + app.run("effect.set", json!({"effect": id, "radius": r})); + } + } + EffectKind::Filter(Filter::Sharpen { amount }) => { + ui.label(caption("Sharpen")); + let mut a = *amount; + if slider(ui, "Amount", &mut a, 0.0..=5.0, 2).drag_stopped() { + app.run("effect.set", json!({"effect": id, "amount": a})); + } + } + EffectKind::Filter(Filter::Threshold { level }) => { + ui.label(caption("Threshold")); + let mut l = *level; + if slider(ui, "Level", &mut l, 0.0..=1.0, 2).drag_stopped() { + app.run("effect.set", json!({"effect": id, "level": l})); + } + } + other => { + ui.label(RichText::new(other.name()).color(TOKENS.text_dim)); + } + } +} + diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs new file mode 100644 index 00000000..c3c033c2 --- /dev/null +++ b/crates/ui-egui/src/docking.rs @@ -0,0 +1,612 @@ +//! The dock host: every side panel (assets, texture set list, layers, texture set settings, +//! properties, display/shader settings, history, log) is a tab that can be docked, tabbed, +//! resized, floated and closed around the viewport (`egui_dock`). The panel bodies live in +//! `dock.rs`, `shelf.rs` and `windows.rs`; this module only hosts them. +//! +//! The layout persists with `UiState` as a small validated tree (`Layout`), not as the dock +//! crate's internal arrays, so a hand-edited or stale layout can never break the dock. + +use egui::{CornerRadius, Id, Margin, Rect, RichText, Stroke, Ui, WidgetText, pos2, vec2}; +use egui_dock::{DockArea, DockState, LeafNode, NodeIndex, Split, Style, TabIndex, TabStyle, TabViewer, Tree}; +use serde::{Deserialize, Serialize}; + +use crate::TextureCraftApp; +use crate::i18n::tr; +use crate::theme::TOKENS; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum Panel { + Viewport, + Assets, + TextureSetList, + Layers, + TextureSetSettings, + Properties, + Display, + Shader, + History, + Log, + /// A panel from a newer layout file; dropped on load. + #[serde(other)] + Unknown, +} + +/// Window ▸ Views items and the panels they show or hide. +pub const VIEWS: [(&str, Panel); 9] = [ + ("ui.view.assets", Panel::Assets), + ("ui.view.display", Panel::Display), + ("ui.view.history", Panel::History), + ("ui.view.layers", Panel::Layers), + ("ui.view.log", Panel::Log), + ("ui.view.properties", Panel::Properties), + ("ui.view.shader", Panel::Shader), + ("ui.view.textureSetList", Panel::TextureSetList), + ("ui.view.textureSetSettings", Panel::TextureSetSettings), +]; + +/// The panel a Window ▸ Views item toggles. +pub fn view_panel(id: &str) -> Option { + VIEWS.iter().find(|(v, _)| *v == id).map(|(_, p)| *p) +} + +/// Where a closed panel comes back. +enum Home { + /// Left of the viewport. + Left, + /// The right column, top (0) to bottom (2). + Column(u8), + /// A floating window, cascaded by index. + Float(u8), + Fixed, +} + +impl Panel { + const COUNT: usize = Panel::Unknown as usize + 1; + + pub fn name(self) -> &'static str { + match self { + Panel::Viewport => "Viewport", + Panel::Assets => "Assets", + Panel::TextureSetList => "Texture Set List", + Panel::Layers => "Layers", + Panel::TextureSetSettings => "Texture Set Settings", + Panel::Properties => "Properties", + Panel::Display => "Display Settings", + Panel::Shader => "Shader Settings", + Panel::History => "History", + Panel::Log => "Log", + Panel::Unknown => "", + } + } + + fn home(self) -> Home { + match self { + Panel::Assets => Home::Left, + Panel::TextureSetList => Home::Column(0), + Panel::Layers | Panel::TextureSetSettings => Home::Column(1), + Panel::Properties => Home::Column(2), + Panel::Display => Home::Float(0), + Panel::Shader => Home::Float(1), + Panel::History => Home::Float(2), + Panel::Log => Home::Float(3), + Panel::Viewport | Panel::Unknown => Home::Fixed, + } + } +} + +// --------------------------------------------------------------------------------------------- +// Persisted layout + +/// A dock tree: a group of tabs, or two subtrees side by side (`vertical`: one above the other). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum Node { + Tabs { + tabs: Vec, + #[serde(default)] + active: usize, + }, + Split { + vertical: bool, + /// Share of the first (left or top) subtree, 0..1. + fraction: f32, + first: Box, + second: Box, + }, +} + +/// A floating window: screen rect `[x, y, width, height]` and its tree. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Floating { + #[serde(default)] + pub rect: Option<[f32; 4]>, + pub root: Node, +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Layout { + pub main: Node, + #[serde(default)] + pub windows: Vec, +} + +fn tabs(tabs: &[Panel]) -> Node { + Node::Tabs { tabs: tabs.to_vec(), active: 0 } +} + +fn split(vertical: bool, fraction: f32, first: Node, second: Node) -> Node { + Node::Split { vertical, fraction, first: Box::new(first), second: Box::new(second) } +} + +impl Default for Layout { + /// Painter's default: assets left of the viewport; texture set list, layers (tabbed with the + /// texture set settings) and properties down the right. Fractions match the 1600x960 window. + fn default() -> Self { + use Panel::*; + let column = split(true, 0.125, tabs(&[TextureSetList]), split(true, 0.57, tabs(&[Layers, TextureSetSettings]), tabs(&[Properties]))); + Layout { main: split(false, 0.115, tabs(&[Assets]), split(false, 0.78, tabs(&[Viewport]), column)), windows: Vec::new() } + } +} + +/// Deeper trees are flattened into one tab group (the dock's node array doubles per level). +const MAX_DEPTH: usize = 8; + +impl Node { + fn collect(self, out: &mut Vec) { + match self { + Node::Tabs { tabs, .. } => out.extend(tabs), + Node::Split { first, second, .. } => { + first.collect(out); + second.collect(out); + } + } + } + + /// Drop unknown and repeated panels (and the viewport outside the main area), empty groups + /// and one-sided splits; clamp fractions; flatten too-deep trees. + fn sanitize(self, seen: &mut [bool; Panel::COUNT], depth: usize, main: bool) -> Option { + match self { + Node::Split { .. } if depth >= MAX_DEPTH => { + let mut all = Vec::new(); + self.collect(&mut all); + Node::Tabs { tabs: all, active: 0 }.sanitize(seen, depth, main) + } + Node::Tabs { tabs, active } => { + let tabs: Vec = tabs + .into_iter() + .filter(|p| *p != Panel::Unknown && (main || *p != Panel::Viewport) && !std::mem::replace(&mut seen[*p as usize], true)) + .collect(); + let last = tabs.len().checked_sub(1)?; + Some(Node::Tabs { tabs, active: active.min(last) }) + } + Node::Split { vertical, fraction, first, second } => { + let first = first.sanitize(seen, depth + 1, main); + let second = second.sanitize(seen, depth + 1, main); + match (first, second) { + (Some(a), Some(b)) => Some(split(vertical, if fraction.is_finite() { fraction.clamp(0.05, 0.95) } else { 0.5 }, a, b)), + (a, b) => a.or(b), + } + } + } + } + + /// Write this (sanitized) tree into `tree` at `at`, which must hold a leaf. + fn place(self, tree: &mut Tree, at: NodeIndex) { + match self { + Node::Tabs { tabs, active } => { + let mut leaf = LeafNode::new(tabs); + leaf.active = TabIndex(active); + tree[at] = egui_dock::Node::Leaf(leaf); + } + Node::Split { vertical, fraction, first, second } => { + // The placeholder tab is overwritten by `second`. + let [a, b] = tree.split(at, if vertical { Split::Below } else { Split::Right }, fraction, egui_dock::Node::leaf(Panel::Unknown)); + first.place(tree, a); + second.place(tree, b); + } + } + } + + fn read(nodes: &[&egui_dock::Node], i: usize) -> Option { + let (vertical, s) = match nodes.get(i)? { + egui_dock::Node::Empty => return None, + egui_dock::Node::Leaf(l) => return (!l.tabs.is_empty()).then(|| Node::Tabs { tabs: l.tabs.clone(), active: l.active.0 }), + egui_dock::Node::Vertical(s) => (true, s), + egui_dock::Node::Horizontal(s) => (false, s), + }; + let first = Node::read(nodes, i.saturating_mul(2).saturating_add(1)); + let second = Node::read(nodes, i.saturating_mul(2).saturating_add(2)); + match (first, second) { + (Some(a), Some(b)) => Some(split(vertical, if s.fraction.is_finite() { s.fraction } else { 0.5 }, a, b)), + (a, b) => a.or(b), + } + } + + fn of(tree: &Tree) -> Option { + Node::read(&tree.iter().collect::>(), 0) + } +} + +impl Layout { + /// The live dock for this layout, or `None` when it has no viewport. + fn build(self) -> Option> { + let mut seen = [false; Panel::COUNT]; + let main = self.main.sanitize(&mut seen, 0, true)?; + if !seen[Panel::Viewport as usize] { + return None; + } + let mut state = DockState::new(Vec::new()); + main.place(state.main_surface_mut(), NodeIndex::root()); + for w in self.windows { + let Some(root) = w.root.sanitize(&mut seen, 0, false) else { continue }; + let s = state.add_window(vec![Panel::Unknown]); + if let Some(tree) = state.get_surface_mut(s).and_then(|x| x.node_tree_mut()) { + root.place(tree, NodeIndex::root()); + } + if let (Some([x, y, width, height]), Some(ws)) = (w.rect, state.get_window_state_mut(s)) + && [x, y, width, height].iter().all(|v| v.is_finite()) + && width > 0.0 + && height > 0.0 + { + ws.set_position(pos2(x, y)).set_size(vec2(width, height)); + } + } + Some(state) + } + + fn of(state: &DockState) -> Layout { + let Some(main) = Node::of(state.main_surface()) else { return Layout::default() }; + let windows = state + .iter_surfaces() + .filter_map(|s| match s { + egui_dock::Surface::Window(tree, ws) => { + let r = ws.rect(); + let rect = (r.is_finite() && r.is_positive()).then(|| [r.min.x, r.min.y, r.width(), r.height()]); + Node::of(tree).map(|root| Floating { rect, root }) + } + _ => None, + }) + .collect(); + Layout { main, windows } + } +} + +// --------------------------------------------------------------------------------------------- +// The live dock + +/// The dock layout (part of `UiState`; serialized as a `Layout`). Empty only while the dock is +/// being drawn. +#[derive(Clone, Debug)] +pub struct Dock(Option>); + +impl Default for Dock { + fn default() -> Self { + Dock(Layout::default().build()) + } +} + +impl PartialEq for Dock { + fn eq(&self, other: &Self) -> bool { + self.layout() == other.layout() + } +} + +impl Serialize for Dock { + fn serialize(&self, s: S) -> Result { + self.layout().serialize(s) + } +} + +impl<'de> Deserialize<'de> for Dock { + fn deserialize>(d: D) -> Result { + Ok(Layout::deserialize(d)?.build().map_or_else(Dock::default, |s| Dock(Some(s)))) + } +} + +impl Dock { + pub fn layout(&self) -> Layout { + self.0.as_ref().map(Layout::of).unwrap_or_default() + } + + pub fn is_open(&self, p: Panel) -> bool { + self.0.as_ref().is_some_and(|s| s.find_tab(&p).is_some()) + } + + /// Open and the front tab of its group. + pub fn is_visible(&self, p: Panel) -> bool { + let Some(s) = &self.0 else { return false }; + s.find_tab(&p).is_some_and(|path| s.leaf(path.node_path()).is_ok_and(|l| l.active == path.tab)) + } + + /// Hide a visible panel, otherwise bring it up (`screen` places floating windows). + pub fn toggle(&mut self, p: Panel, screen: Rect) { + if self.is_visible(p) { self.close(p) } else { self.focus(p, screen) } + } + + pub fn close(&mut self, p: Panel) { + if p == Panel::Viewport { + return; + } + if let Some(s) = &mut self.0 + && let Some(path) = s.find_tab(&p) + { + s.remove_tab(path); + } + } + + /// Open `p` where it lives by default (if closed) and bring it to the front. + pub fn focus(&mut self, p: Panel, screen: Rect) { + let Some(s) = &mut self.0 else { return }; + if s.find_tab(&p).is_none() { + insert(s, p, screen); + } + if let Some(path) = s.find_tab(&p) { + let _ = s.set_active_tab(path); + s.set_focused_node_and_surface(path.node_path()); + } + } +} + +fn insert(state: &mut DockState, p: Panel, screen: Rect) { + match p.home() { + Home::Fixed => {} + Home::Float(k) => { + let s = state.add_window(vec![p]); + if let Some(w) = state.get_window_state_mut(s) { + w.set_position(screen.right_top() + vec2(-640.0, 90.0 + 50.0 * k as f32)).set_size(vec2(300.0, 380.0)); + } + } + Home::Left => beside_viewport(state.main_surface_mut(), Split::Left, 0.13, p), + Home::Column(order) => { + let tree = state.main_surface_mut(); + // The right-column group nearest to the panel's slot (its own slot first). + let mut best: Option<(NodeIndex, u8)> = None; + for (i, n) in tree.iter().enumerate() { + let slot = n.get_leaf().and_then(|l| { + l.tabs.iter().find_map(|t| match t.home() { + Home::Column(o) => Some(o), + _ => None, + }) + }); + if let Some(o) = slot + && best.is_none_or(|(_, b)| o.abs_diff(order) < b.abs_diff(order)) + { + best = Some((NodeIndex(i), o)); + } + } + match best { + Some((node, o)) if o == order => { + if let Ok(leaf) = tree.leaf_mut(node) { + leaf.append_tab(p); + } + } + Some((node, o)) if o > order => { + tree.split_above(node, 0.3, vec![p]); + } + Some((node, _)) => { + tree.split_below(node, 0.6, vec![p]); + } + None => beside_viewport(tree, Split::Right, 0.78, p), + } + } + } +} + +/// Split the viewport's group; `fraction` is the left (or top) share. +fn beside_viewport(tree: &mut Tree, side: Split, fraction: f32, p: Panel) { + match tree.find_tab(&Panel::Viewport) { + Some((node, _)) => { + tree.split(node, side, fraction, egui_dock::Node::leaf(p)); + } + None => tree.push_to_first_leaf(p), + } +} + +// --------------------------------------------------------------------------------------------- +// Drawing + +struct Host<'a> { + app: &'a mut TextureCraftApp, +} + +impl TabViewer for Host<'_> { + type Tab = Panel; + + fn id(&mut self, tab: &mut Panel) -> Id { + Id::new(("panel", *tab)) + } + + fn title(&mut self, tab: &mut Panel) -> WidgetText { + let text = match tab { + Panel::Properties => crate::dock::properties_title(self.app), + // Bake mode shows its settings where the shelf lives, as Painter does. + Panel::Assets if self.app.ui.mode == crate::state::Mode::Baking => tr("Bake Mesh Maps").to_string(), + p => tr(p.name()).to_string(), + }; + RichText::new(text.to_uppercase()).size(10.5).strong().into() + } + + fn ui(&mut self, ui: &mut Ui, tab: &mut Panel) { + let app = &mut *self.app; + match tab { + Panel::Viewport => crate::viewport::central(app, ui), + Panel::Assets if app.ui.mode == crate::state::Mode::Baking => crate::windows::bake_body(app, ui), + Panel::Assets => crate::shelf::body(app, ui), + Panel::TextureSetList => crate::dock::texture_set_list(app, ui), + Panel::Layers => crate::dock::layers(app, ui), + Panel::TextureSetSettings => crate::dock::texture_set_settings(app, ui), + Panel::Properties => crate::dock::properties(app, ui), + Panel::Display => crate::windows::display(app, ui), + Panel::Shader => crate::windows::shader(app, ui), + Panel::History => crate::windows::history(app, ui), + Panel::Log => crate::windows::log(app, ui), + Panel::Unknown => {} + } + } + + fn is_closeable(&self, tab: &Panel) -> bool { + *tab != Panel::Viewport + } + + fn allowed_in_windows(&self, tab: &mut Panel) -> bool { + *tab != Panel::Viewport + } + + fn scroll_bars(&self, tab: &Panel) -> [bool; 2] { + // The other panels scroll their own lists. + [false, matches!(tab, Panel::Display | Panel::Shader)] + } + + fn tab_style_override(&self, tab: &Panel, global: &TabStyle) -> Option { + (*tab == Panel::Viewport).then(|| { + let mut s = global.clone(); + s.tab_body.inner_margin = Margin::ZERO; + s.tab_body.bg_fill = TOKENS.viewport; + s + }) + } +} + +/// The dock look: flat dark tab bars, Painter-style uppercase captions, thin separators. +fn style(egui_style: &egui::Style) -> Style { + let t = TOKENS; + let mut s = Style::from_egui(egui_style); + s.separator.width = 2.0; + // Smallest panel extent a separator drag leaves (the crate's 175 px would grow the list). + s.separator.extra = 60.0; + s.separator.color_idle = t.separator; + s.separator.color_hovered = t.accent_dim; + s.separator.color_dragged = t.accent; + s.tab_bar.bg_fill = t.chrome; + s.tab_bar.height = 24.0; + s.tab_bar.hline_color = t.separator; + s.tab_bar.corner_radius = CornerRadius::ZERO; + for (tab, text) in [ + (&mut s.tab.active, t.text_strong), + (&mut s.tab.focused, t.text_strong), + (&mut s.tab.active_with_kb_focus, t.text_strong), + (&mut s.tab.focused_with_kb_focus, t.text_strong), + (&mut s.tab.hovered, t.text), + (&mut s.tab.inactive, t.text_dim), + (&mut s.tab.inactive_with_kb_focus, t.text_dim), + ] { + tab.text_color = text; + tab.corner_radius = CornerRadius::ZERO; + tab.bg_fill = if text == t.text_strong { t.panel } else { t.chrome }; + tab.outline_color = tab.bg_fill; + } + let body = &mut s.tab.tab_body; + body.bg_fill = t.panel; + body.inner_margin = Margin::symmetric(6, 4); + body.stroke = Stroke::NONE; + body.corner_radius = CornerRadius::ZERO; + // The viewport's group hides its tab bar entirely: no drag strip, no "show tab bar" button. + body.hidden_tab_bar_drag_height = Some(0.0); + s.buttons.show_tab_bar_size = 0.0; + s.buttons.show_tab_bar_hover_expand = 0.0; + s.buttons.show_tab_bar_color = egui::Color32::TRANSPARENT; + s.buttons.show_tab_bar_active_color = egui::Color32::TRANSPARENT; + s.overlay.selection_color = t.accent.gamma_multiply(0.35); + s +} + +/// Draw the dock (viewport and panels) into `ui`. +pub fn show(app: &mut TextureCraftApp, ui: &mut Ui) { + let Some(mut state) = app.ui.dock.0.take() else { + app.ui.dock = Dock::default(); + return; + }; + // Only the viewport alone in its group hides the tab bar. + for (_, leaf) in state.iter_leaves_mut() { + leaf.tab_bar_hidden = leaf.tabs == [Panel::Viewport]; + } + DockArea::new(&mut state) + .id(Id::new("dock_area")) + .style(style(ui.style())) + .hidable_tab_bars(true) + .tab_context_menus(false) + .show_leaf_close_all_buttons(false) + .show_leaf_collapse_buttons(false) + .show_secondary_button_hint(false) + .show_inside(ui, &mut Host { app }); + // A layout adopted while drawing (Window ▸ Load UI Layout) wins over the drawn one. + if app.ui.dock.0.is_none() { + app.ui.dock.0 = Some(state); + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_layout_round_trips() { + let dock = Dock::default(); + assert_eq!(dock.layout(), Layout::default()); + let json = serde_json::to_string(&dock).unwrap(); + let back: Dock = serde_json::from_str(&json).unwrap(); + assert_eq!(back.layout(), Layout::default()); + } + + #[test] + fn hostile_layouts_are_repaired() { + // Duplicates, unknown panels, a viewport in a window, bad fractions and rects, empty groups. + let json = r#"{"main":{"split":{"vertical":false,"fraction":0.3,"first":{"tabs":{"tabs":["Layers","Layers","Bogus"],"active":9}}, + "second":{"split":{"vertical":true,"fraction":7,"first":{"tabs":{"tabs":["Viewport"]}},"second":{"tabs":{"tabs":[]}}}}}}, + "windows":[{"rect":[0,0,-5,10],"root":{"tabs":{"tabs":["Viewport","Log","Layers"]}}}]}"#; + let dock: Dock = serde_json::from_str(json).unwrap(); + let l = dock.layout(); + assert_eq!(l.main, split(false, 0.3, Node::Tabs { tabs: vec![Panel::Layers], active: 0 }, tabs(&[Panel::Viewport]))); + assert_eq!(l.windows.len(), 1); + assert_eq!(l.windows[0].root, tabs(&[Panel::Log])); + // No viewport at all: the default layout. + let none: Dock = serde_json::from_str(r#"{"main":{"tabs":{"tabs":["Layers"]}}}"#).unwrap(); + assert_eq!(none.layout(), Layout::default()); + } + + #[test] + fn deep_trees_are_flattened() { + let mut node = tabs(&[Panel::Viewport]); + for p in [ + Panel::Assets, + Panel::Layers, + Panel::Log, + Panel::History, + Panel::Shader, + Panel::Display, + Panel::Properties, + Panel::TextureSetList, + Panel::TextureSetSettings, + ] { + node = split(true, 0.5, tabs(&[p]), node); + } + let dock = Dock(Layout { main: node, windows: Vec::new() }.build()); + let mut all = Vec::new(); + dock.layout().main.collect(&mut all); + assert_eq!(all.len(), 10); + } + + #[test] + fn closed_panels_come_back_home() { + let screen = Rect::from_min_size(pos2(0.0, 0.0), vec2(1600.0, 960.0)); + let mut dock = Dock::default(); + assert!(dock.is_visible(Panel::Layers) && !dock.is_visible(Panel::TextureSetSettings)); + dock.toggle(Panel::TextureSetSettings, screen); + assert!(dock.is_visible(Panel::TextureSetSettings) && !dock.is_visible(Panel::Layers)); + for p in [Panel::Assets, Panel::TextureSetList, Panel::Layers, Panel::TextureSetSettings, Panel::Properties] { + dock.close(p); + assert!(!dock.is_open(p)); + } + for p in [Panel::Properties, Panel::Layers, Panel::TextureSetList, Panel::Assets, Panel::Display] { + dock.focus(p, screen); + assert!(dock.is_visible(p), "{p:?}"); + } + dock.close(Panel::Viewport); + assert!(dock.is_open(Panel::Viewport)); + let l = dock.layout(); + assert_eq!(l.windows.len(), 1); + let mut order = Vec::new(); + l.main.collect(&mut order); + assert_eq!(order, [Panel::Assets, Panel::Viewport, Panel::TextureSetList, Panel::Layers, Panel::Properties]); + } +} diff --git a/crates/ui-egui/src/gpu.rs b/crates/ui-egui/src/gpu.rs new file mode 100644 index 00000000..55d56ee7 --- /dev/null +++ b/crates/ui-egui/src/gpu.rs @@ -0,0 +1,251 @@ +//! Bridge between the session and the wgpu renderer: per-frame scene sync (mesh, texture set +//! layout, dirty tiles, environment) and the egui paint callback that renders and blits a view. + +use std::collections::BTreeMap; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Arc, Mutex, PoisonError}; + +use eframe::egui_wgpu::{self, CallbackResources, CallbackTrait, ScreenDescriptor}; +use rayon::prelude::*; +use texturecraft_engine::Session; +use texturecraft_engine::compose::{DisplayKind, ImageRes, tile_bytes}; +use texturecraft_engine::core::BakedMap; +use texturecraft_engine::geom::Mesh; +use texturecraft_render::{Frame, Renderer, wgpu}; + +/// Content shown through the aux texture. +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum AuxView { + MeshMap(BakedMap), + Mask(texturecraft_engine::core::LayerId), + /// The quick mask being edited, over the base color. + QuickMask, +} + +/// What the renderer must catch up with before drawing. +#[derive(Default)] +pub struct SceneSync { + pub mesh: Option<(Arc, u64)>, + /// (resolution, material) per texture set, and the mesh material count. + pub sets: Option<(Vec<(u32, usize)>, usize)>, + /// The environment name and, for `resource:`, its decoded image. + pub env: Option<(String, Option>)>, + pub tiles: Vec<(usize, DisplayKind, u32, u32, Vec)>, + pub aux: Vec<(usize, u32, Vec)>, +} + +/// Lives in egui's callback resources. +pub struct GpuState { + pub renderer: Renderer, + /// Raised when texture-set textures were recreated: the UI must upload every tile again. + pub reset: Arc, +} + +/// UI-side bookkeeping of what the GPU already has. +pub struct GpuLink { + pub reset: Arc, + /// Raised when a view callback was dropped before the GPU applied its scene sync (the + /// frame was never painted, e.g. a WebGPU surface not ready yet): send everything again. + pub lost: Arc, + mesh_id: u64, + sets: Vec<(u32, usize)>, + /// The environment the GPU has: name and image identity (a re-imported resource differs). + env: (String, usize), + /// What each set's aux texture holds: (mesh map or mask key, revision). + aux: BTreeMap, + pub adapter: String, + /// Most tiles waiting to be composited since compositing last caught up (progress). + composite_total: usize, +} + +/// Compositing time per frame: a full recomposite of a large texture set spreads over frames. +const COMPOSITE_BUDGET_MS: f64 = 30.0; + +pub fn init(rs: &egui_wgpu::RenderState) -> GpuLink { + let reset = Arc::new(AtomicBool::new(false)); + let renderer = Renderer::new(&rs.device, &rs.queue, rs.target_format); + rs.renderer.write().callback_resources.insert(GpuState { renderer, reset: reset.clone() }); + let info = rs.adapter.get_info(); + GpuLink { + reset, + lost: Arc::new(AtomicBool::new(false)), + mesh_id: 0, + sets: Vec::new(), + env: Default::default(), + aux: BTreeMap::new(), + adapter: format!("{} ({:?})", info.name, info.backend), + composite_total: 0, + } +} + +impl GpuLink { + /// Collect everything the GPU needs this frame (runs the compositor first). + /// Compositing progress (0..1) while tiles wait to be composited. + pub fn composite_progress(&self, s: &Session) -> Option { + let pending = s.pending_tiles(); + (pending > 0 && self.composite_total > 0).then(|| 1.0 - pending as f32 / self.composite_total as f32) + } + + pub fn sync(&mut self, s: &mut Session, aux_map: Option) -> SceneSync { + let pending = s.pending_tiles(); + self.composite_total = if pending == 0 { 0 } else { self.composite_total.max(pending) }; + s.update_for(COMPOSITE_BUDGET_MS, crate::now_ms); + let mut out = SceneSync::default(); + if self.lost.swap(false, Ordering::AcqRel) { + self.mesh_id = 0; + self.sets.clear(); + self.env = Default::default(); + self.reset.store(true, Ordering::Release); + } + if self.mesh_id != s.mesh_id { + out.mesh = Some((s.mesh.clone(), s.mesh_id)); + self.mesh_id = s.mesh_id; + self.aux.clear(); + } + let sets: Vec<(u32, usize)> = s.doc.project.texture_sets.iter().map(|t| (t.resolution, t.material)).collect(); + if sets != self.sets || out.mesh.is_some() { + out.sets = Some((sets.clone(), s.mesh.materials.len().max(1))); + self.sets = sets; + } + let d = &s.doc.project.display; + let image = d.environment_resource().and_then(|n| s.images.get(n)); + let ptr = image.map_or(0, |i| Arc::as_ptr(i) as usize); + if self.env.0 != d.environment || self.env.1 != ptr { + self.env = (d.environment.clone(), ptr); + out.env = Some((d.environment.clone(), image.cloned())); + } + if self.reset.swap(false, Ordering::AcqRel) { + for c in &mut s.caches { + c.upload.extend(texturecraft_engine::compose::all_tiles(c.resolution)); + } + self.aux.clear(); + } + for ts in 0..s.caches.len() { + let tiles = s.take_uploads(ts); + if tiles.is_empty() { + continue; + } + let Some(cache) = s.caches.get(ts) else { continue }; + let empty = Default::default(); + let baked = s.doc.baked.get(&ts).unwrap_or(&empty); + let comp = &cache.composite; + let bytes: Vec<_> = tiles + .par_iter() + .flat_map_iter(|&(tx, ty)| DisplayKind::ALL.into_iter().map(move |k| (k, tx, ty))) + .map(|(k, tx, ty)| (ts, k, tx, ty, tile_bytes(comp, baked, k, tx, ty))) + .collect(); + out.tiles.extend(bytes); + } + match aux_map { + Some(AuxView::MeshMap(m)) => { + for ts in 0..s.caches.len() { + let rev = s.doc.baked.get(&ts).and_then(|b| b.maps.get(&m)).map(|d| Arc::as_ptr(d) as u64).unwrap_or(0); + let key = (format!("{m:?}"), rev); + if self.aux.get(&ts) == Some(&key) { + continue; + } + let res = s.caches.get(ts).map(|c| c.resolution).unwrap_or(1024).min(2048); + out.aux.push((ts, res, texturecraft_render::mesh_maps::mesh_map_rgba(s.doc.baked.get(&ts), m, res))); + self.aux.insert(ts, key); + } + } + Some(AuxView::Mask(id)) => { + if let Some((ts, _, _)) = s.doc.project.locate(id) { + let key = (format!("mask{}", id.0), s.revision); + if self.aux.get(&ts) != Some(&key) && !s.stroke_active() { + let res = s.caches.get(ts).map(|c| c.resolution).unwrap_or(1024).min(2048); + if let Some(rgba) = s.mask_view_rgba(id, res) { + out.aux.push((ts, res, rgba)); + } + self.aux.insert(ts, key); + } + } + } + Some(AuxView::QuickMask) => { + for ts in 0..s.caches.len() { + let Some(cache) = s.caches.get(ts) else { continue }; + let key = (format!("quickmask{}", s.quick_mask.revision), cache.revision); + if self.aux.get(&ts) == Some(&key) { + continue; + } + let res = cache.resolution.min(2048); + if let Some(rgba) = s.quick_mask_rgba(ts, res) { + out.aux.push((ts, res, rgba)); + } + self.aux.insert(ts, key); + } + } + None => {} + } + out + } +} + +/// Paint callback for one view. +pub struct ViewCallback { + pub frame: Frame, + /// Scene changes, applied by the first view drawn this frame. + pub sync: Mutex>, + pub rect: egui::Rect, + /// [`GpuLink::lost`]. + pub lost: Arc, +} + +impl Drop for ViewCallback { + fn drop(&mut self) { + if self.sync.get_mut().unwrap_or_else(PoisonError::into_inner).is_some() { + self.lost.store(true, Ordering::Release); + } + } +} + +impl CallbackTrait for ViewCallback { + fn prepare( + &self, + device: &wgpu::Device, + queue: &wgpu::Queue, + screen: &ScreenDescriptor, + encoder: &mut wgpu::CommandEncoder, + resources: &mut CallbackResources, + ) -> Vec { + let Some(gpu) = resources.get_mut::() else { return Vec::new() }; + let sync = self.sync.lock().unwrap_or_else(PoisonError::into_inner).take(); + if let Some(sync) = sync { + if let Some((env, image)) = &sync.env { + gpu.renderer.set_environment(device, queue, env, image.as_deref()); + } + if let Some((mesh, id)) = &sync.mesh { + gpu.renderer.set_mesh(device, queue, mesh, *id); + } + if let Some((sets, mats)) = &sync.sets { + let reset = gpu.renderer.set_texture_sets(device, queue, sets, *mats); + if !reset.is_empty() { + gpu.reset.store(true, Ordering::Release); + } + } + for (ts, k, tx, ty, bytes) in &sync.tiles { + gpu.renderer.upload_tile(queue, *ts, *k, *tx, *ty, bytes); + } + for (ts, size, bytes) in &sync.aux { + gpu.renderer.upload_aux(queue, *ts, *size, bytes); + } + } + gpu.renderer.prepare(device, queue, encoder, &self.frame); + let ppp = screen.pixels_per_point; + let r = self.rect; + gpu.renderer.set_blit_rect(queue, self.frame.view_id, [r.min.x * ppp, r.min.y * ppp, r.width() * ppp, r.height() * ppp], screen.size_in_pixels); + Vec::new() + } + + fn paint(&self, info: egui::PaintCallbackInfo, pass: &mut wgpu::RenderPass<'static>, resources: &CallbackResources) { + let Some(gpu) = resources.get::() else { return }; + let [sw, sh] = info.screen_size_px; + let clip = info.clip_rect_in_pixels(); + if clip.width_px <= 0 || clip.height_px <= 0 || sw == 0 || sh == 0 { + return; + } + pass.set_viewport(0.0, 0.0, sw as f32, sh as f32, 0.0, 1.0); + pass.set_scissor_rect(clip.left_px.max(0) as u32, clip.top_px.max(0) as u32, clip.width_px as u32, clip.height_px as u32); + gpu.renderer.blit_prepared(pass, self.frame.view_id); + } +} diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs new file mode 100644 index 00000000..5197b154 --- /dev/null +++ b/crates/ui-egui/src/i18n.rs @@ -0,0 +1,43 @@ +//! UI text lookup. Keys are the English strings, so English needs no table and a missing +//! translation falls back to English. A language is one `Language` entry whose table lists +//! `(English, translation)` pairs sorted by the English key; `Prefs::language` picks it. + +use std::sync::atomic::{AtomicUsize, Ordering}; + +pub struct Language { + /// BCP 47 code ("en", "de", "ja"). + pub code: &'static str, + /// The language's own name, for a picker. + pub name: &'static str, + /// `(English, translation)`, sorted by the English key. + pub table: &'static [(&'static str, &'static str)], +} + +pub const LANGUAGES: &[Language] = &[Language { code: "en", name: "English", table: &[] }]; + +static CURRENT: AtomicUsize = AtomicUsize::new(0); + +/// Switch the UI language (unknown codes fall back to English). +pub fn set_language(code: &str) { + CURRENT.store(LANGUAGES.iter().position(|l| l.code == code).unwrap_or(0), Ordering::Relaxed); +} + +/// `text` in the current language. +pub fn tr(text: &'static str) -> &'static str { + let Some(lang) = LANGUAGES.get(CURRENT.load(Ordering::Relaxed)) else { return text }; + lang.table.binary_search_by_key(&text, |(en, _)| en).ok().and_then(|i| lang.table.get(i)).map_or(text, |(_, t)| t) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn tables_are_sorted_and_english_is_identity() { + for l in LANGUAGES { + assert!(l.table.windows(2).all(|w| w[0].0 < w[1].0), "{} table must be sorted by key", l.code); + } + set_language("xx"); + assert_eq!(tr("Layers"), "Layers"); + } +} diff --git a/crates/ui-egui/src/keymap.rs b/crates/ui-egui/src/keymap.rs new file mode 100644 index 00000000..e010734d --- /dev/null +++ b/crates/ui-egui/src/keymap.rs @@ -0,0 +1,295 @@ +//! Keyboard shortcuts: every menu item and every command with a default shortcut, the user's +//! overrides (`UiState::keymap`, id → "Ctrl+Shift+E" or "" for unbound), conflict detection and +//! the shortcut editor window (Edit ▸ Settings ▸ Keyboard, Help ▸ Shortcuts list). + +use std::collections::BTreeMap; + +use egui::{Event, Id, Key, KeyboardShortcut, Modifiers, RichText, vec2}; +use egui_phosphor::regular as ic; + +use crate::TextureCraftApp; +use crate::i18n::tr; +use crate::menus::{CATALOG, parse_shortcut}; +use crate::theme::TOKENS; +use crate::widgets::{icon_button, section}; + +pub type Keymap = BTreeMap; + +/// Something a shortcut can trigger. +pub struct Binding { + pub id: &'static str, + /// Menu (or command group) it belongs to. + pub group: &'static str, + pub label: &'static str, + pub default: Option<&'static str>, +} + +/// Every bindable item: the menu catalog, then commands with a default shortcut. +pub fn bindings() -> &'static [Binding] { + static ALL: std::sync::OnceLock> = std::sync::OnceLock::new(); + ALL.get_or_init(|| { + let mut v: Vec = Vec::new(); + for i in CATALOG.iter().filter(|i| i.label != "-") { + if !v.iter().any(|b| b.id == i.id) { + v.push(Binding { id: i.id, group: i.menu, label: i.label, default: i.shortcut }); + } + } + for c in texturecraft_engine::command_specs().iter().filter(|c| c.shortcut.is_some()) { + if !v.iter().any(|b| b.id == c.id) { + v.push(Binding { id: c.id, group: c.menu.first().copied().unwrap_or("Commands"), label: c.label, default: c.shortcut }); + } + } + v + }) +} + +/// The shortcut `b` currently has. +pub fn shortcut<'a>(keymap: &'a Keymap, b: &'a Binding) -> Option<&'a str> { + match keymap.get(b.id) { + Some(s) => (!s.is_empty()).then_some(s.as_str()), + None => b.default, + } +} + +/// The shortcut of item `id` (for menu labels and tooltips). +pub fn shortcut_of<'a>(keymap: &'a Keymap, id: &str) -> Option<&'a str> { + bindings().iter().find(|b| b.id == id).and_then(|b| shortcut(keymap, b)) +} + +/// "Label (Shortcut)" for an icon button's tooltip. +pub fn tip(keymap: &Keymap, label: &str, id: &str) -> String { + match shortcut_of(keymap, id) { + Some(s) => format!("{label} ({s})"), + None => label.to_owned(), + } +} + +/// "Ctrl+Shift+E" notation (the inverse of `menus::parse_shortcut`). +pub fn format_shortcut(sc: &KeyboardShortcut) -> String { + let m = sc.modifiers; + let mut s = String::new(); + if m.command || m.ctrl || m.mac_cmd { + s.push_str("Ctrl+"); + } + if m.shift { + s.push_str("Shift+"); + } + if m.alt { + s.push_str("Alt+"); + } + s.push_str(sc.logical_key.name()); + s +} + +fn modifier_count(m: Modifiers) -> u8 { + u8::from(m.command || m.ctrl || m.mac_cmd) + u8::from(m.shift) + u8::from(m.alt) +} + +/// Every bound shortcut with its item id, most modifiers first: egui ignores extra Shift and +/// Alt when matching, so Shift+C has to be tried before C. +pub fn active(keymap: &Keymap) -> Vec<(&'static str, KeyboardShortcut)> { + let mut v: Vec<(&'static str, KeyboardShortcut)> = bindings().iter().filter_map(|b| Some((b.id, parse_shortcut(shortcut(keymap, b)?)?))).collect(); + v.sort_by_key(|(_, sc)| std::cmp::Reverse(modifier_count(sc.modifiers))); + v +} + +/// Each binding's parsed shortcut, in `bindings()` order. +pub fn resolve(keymap: &Keymap) -> Vec> { + bindings().iter().map(|b| shortcut(keymap, b).and_then(parse_shortcut)).collect() +} + +/// Another binding with the same shortcut as binding `i`. +pub fn conflict(resolved: &[Option], i: usize) -> Option { + let sc = resolved.get(i).copied().flatten()?; + resolved.iter().enumerate().position(|(j, o)| j != i && *o == Some(sc)) +} + +/// Bind `b` to `value` ("" = no shortcut); the default is stored as no override. +pub fn rebind(keymap: &mut Keymap, b: &Binding, value: &str) { + if b.default.unwrap_or("") == value { + keymap.remove(b.id); + } else { + keymap.insert(b.id.to_owned(), value.to_owned()); + } +} + +const CAPTURE: &str = "keymap_capture"; + +/// Whether the editor is waiting for a key combination (global shortcuts pause meanwhile). +pub fn capturing(ctx: &egui::Context) -> bool { + ctx.data(|d| d.get_temp::(Id::new(CAPTURE))).is_some() +} + +/// The first key press this frame as a shortcut. +fn pressed(ctx: &egui::Context) -> Option { + ctx.input(|i| { + i.events.iter().find_map(|e| match e { + Event::Key { key, pressed: true, modifiers, .. } => Some(KeyboardShortcut::new(*modifiers, *key)), + _ => None, + }) + }) +} + +/// The shortcut editor window. +pub fn window(app: &mut TextureCraftApp, ctx: &egui::Context) { + if !app.ui.windows.shortcuts { + return; + } + let capture_id = Id::new(CAPTURE); + let filter_id = Id::new("keymap_filter"); + let mut capture: Option = ctx.data(|d| d.get_temp(capture_id)); + if let (Some(i), Some(sc)) = (capture, pressed(ctx)) { + if (sc.logical_key != Key::Escape || !sc.modifiers.is_none()) + && let Some(b) = bindings().get(i) + { + rebind(&mut app.ui.keymap, b, &format_shortcut(&sc)); + } + capture = None; + } + let mut filter: String = ctx.data(|d| d.get_temp(filter_id)).unwrap_or_default(); + let mut open = true; + crate::windows::window("Keyboard shortcuts", &mut open).default_width(480.0).show(ctx, |ui| { + let resolved = resolve(&app.ui.keymap); + ui.horizontal(|ui| { + ui.label(RichText::new(ic::MAGNIFYING_GLASS).color(TOKENS.text_dim)); + ui.add(egui::TextEdit::singleline(&mut filter).hint_text("Search commands or keys").desired_width(300.0)); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if ui.add_enabled(!app.ui.keymap.is_empty(), egui::Button::new("Reset all")).on_hover_text("Restore every default shortcut").clicked() { + app.ui.keymap.clear(); + } + }); + }); + let clashes = (0..resolved.len()).filter(|i| conflict(&resolved, *i).is_some()).count(); + if clashes > 0 { + ui.label(RichText::new(format!("{} {clashes} items share a shortcut; the first one listed wins.", ic::WARNING)).color(TOKENS.danger)); + } + ui.add_space(4.0); + let needle = filter.to_lowercase(); + egui::ScrollArea::vertical().max_height(420.0).auto_shrink([false, true]).show(ui, |ui| { + egui::Grid::new("keymap_grid").num_columns(3).striped(true).spacing(vec2(10.0, 4.0)).show(ui, |ui| { + for (i, b) in bindings().iter().enumerate() { + let current = shortcut(&app.ui.keymap, b); + if !needle.is_empty() && ![b.label, b.group, b.id, current.unwrap_or("")].iter().any(|t| t.to_lowercase().contains(&needle)) { + continue; + } + ui.horizontal(|ui| { + ui.label(tr(b.label)); + ui.label(RichText::new(tr(b.group)).size(10.5).color(TOKENS.text_dim)); + }); + let waiting = capture == Some(i); + let text = if waiting { "Press a key..." } else { current.unwrap_or("-") }; + let key = egui::Button::new(RichText::new(text).monospace()).selected(waiting).min_size(vec2(130.0, 0.0)); + if ui.add(key).on_hover_text("Click, then press the new shortcut (Esc cancels)").clicked() { + capture = if waiting { None } else { Some(i) }; + } + let bound = current.is_some(); + ui.horizontal(|ui| { + if let Some(other) = conflict(&resolved, i).and_then(|j| bindings().get(j)) { + ui.label(RichText::new(ic::WARNING).color(TOKENS.danger)).on_hover_text(format!( + "Also bound to {} ({})", + tr(other.label), + tr(other.group) + )); + } + if bound && icon_button(ui, ic::X, "Remove the shortcut", false, 18.0).clicked() { + rebind(&mut app.ui.keymap, b, ""); + } + if app.ui.keymap.contains_key(b.id) + && icon_button(ui, ic::ARROW_COUNTER_CLOCKWISE, &format!("Reset to {}", b.default.unwrap_or("none")), false, 18.0).clicked() + { + app.ui.keymap.remove(b.id); + } + }); + ui.end_row(); + } + }); + }); + ui.add_space(4.0); + section(ui, "keymap_nav", "Viewport and brush (fixed)", false, |ui| { + egui::Grid::new("keymap_fixed").striped(true).show(ui, |ui| { + for (k, v) in [ + ("Alt + LMB drag", "Orbit"), + ("MMB drag / Alt + MMB", "Pan"), + ("Wheel / Alt + RMB drag", "Zoom"), + ("LMB", "Paint with the current tool"), + ("[ / ]", "Brush size down / up"), + ("Shift + wheel", "Brush size"), + ("Esc", "Cancel the stroke"), + ] { + ui.label(RichText::new(k).strong()); + ui.label(v); + ui.end_row(); + } + }); + }); + }); + app.ui.windows.shortcuts = open; + if !open { + capture = None; + } + ctx.data_mut(|d| { + d.insert_temp(filter_id, filter); + match capture { + Some(i) => { + d.insert_temp(capture_id, i); + } + None => { + d.remove::(capture_id); + } + } + }); +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn shortcuts_round_trip_through_parse_and_format() { + for b in bindings() { + if let Some(s) = b.default { + let sc = parse_shortcut(s).unwrap_or_else(|| panic!("{} has an unparsable shortcut {s}", b.id)); + assert_eq!(format_shortcut(&sc), s); + } + } + for s in ["Ctrl+Shift+Alt+F12", "Alt+OpenBracket", "Shift+Delete", "Ctrl+9"] { + assert_eq!(parse_shortcut(s).map(|sc| format_shortcut(&sc)).as_deref(), Some(s)); + } + assert!(parse_shortcut("Ctrl+").is_none() && parse_shortcut("Ctrl+NoSuchKey").is_none()); + } + + #[test] + fn default_shortcuts_do_not_conflict() { + let resolved = resolve(&Keymap::new()); + for (i, b) in bindings().iter().enumerate() { + assert!(conflict(&resolved, i).is_none(), "{} shares its default shortcut", b.id); + } + } + + #[test] + fn rebinding_detects_conflicts_and_resets() { + let all = bindings(); + let save = all.iter().position(|b| b.id == "file.save").unwrap(); + let undo = all.iter().position(|b| b.id == "edit.undo").unwrap(); + let mut keymap = Keymap::new(); + rebind(&mut keymap, &all[save], "Ctrl+Z"); + let resolved = resolve(&keymap); + assert_eq!(conflict(&resolved, save), Some(undo)); + assert_eq!(conflict(&resolved, undo), Some(save)); + assert_eq!(shortcut_of(&keymap, "file.save"), Some("Ctrl+Z")); + // Unbinding clears the conflict; binding back to the default drops the override. + rebind(&mut keymap, &all[save], ""); + assert_eq!(shortcut_of(&keymap, "file.save"), None); + assert!(conflict(&resolve(&keymap), undo).is_none()); + rebind(&mut keymap, &all[save], "Ctrl+S"); + assert!(keymap.is_empty()); + } + + #[test] + fn specific_shortcuts_are_tried_first() { + let active = active(&Keymap::new()); + let pos = |id: &str| active.iter().position(|(x, _)| *x == id).unwrap(); + assert!(pos("viewport.previousChannel") < pos("viewport.nextChannel")); + assert!(pos("file.saveAs") < pos("file.save")); + } +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs new file mode 100644 index 00000000..2709f23d --- /dev/null +++ b/crates/ui-egui/src/lib.rs @@ -0,0 +1,349 @@ +//! # texturecraft-ui-egui +//! +//! The TextureCraft desktop and web shell: a dense dark professional layout (menu bar, +//! tool-settings bar, tool shelf, asset shelf, 3D + 2D viewports, texture set list, layer stack, +//! properties, display/shader/history windows, bake mode). It is a thin layer: every action goes +//! through `texturecraft-engine` commands, so the CLI, control channel and MCP can do the same. +#![forbid(unsafe_code)] +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +pub mod control; +pub mod dock; +pub mod docking; +pub mod gpu; +pub mod i18n; +pub mod keymap; +pub mod menus; +pub mod parity; +pub mod render_mode; +pub mod shelf; +pub mod state; +pub mod theme; +pub mod thumbs; +pub mod toolbar; +pub mod viewport; +pub mod web_files; +pub mod widgets; +pub mod windows; + +use std::sync::Arc; +use std::sync::atomic::Ordering; + +use serde_json::Value; +use texturecraft_engine::bake::Progress; +use texturecraft_engine::{BakeTask, Session}; + +pub use control::ControlRequest; +pub use state::UiState; + +/// A background bake of one or more texture sets. +pub struct BakeJob { + pub queue: Vec, + pub current: Option<(usize, Arc, std::sync::mpsc::Receiver>)>, + pub total: usize, +} + +pub struct Toast { + pub text: String, + pub error: bool, + pub until: f64, +} + +pub struct TextureCraftApp { + pub session: Session, + pub ui: UiState, + pub gpu: Option, + pub control: Option>, + pub toasts: Vec, + pub bake: Option, + pub thumbs: thumbs::Thumbs, + /// Last frame's viewport rect (logical points), for scripted input. + pub viewport_rect: egui::Rect, + /// Pending screenshot requests from the control channel. + pub screenshot_waiters: Vec>, + pub fps: f32, + /// User smart materials found in the library folder (refreshed on demand). + pub library: Option>, + /// Rendering mode's path tracer. + pub render: render_mode::RenderView, + /// Smoothed CPU time spent building the UI per frame (ms). + pub ui_ms: f32, + /// Where the last 3D stroke ended (viewport pixels), for Shift+click straight lines. + pub last_paint_point: Option, + /// The wgpu state (screenshots read the renderer's targets). + pub render_state: Option, + last_time: f64, + /// When the next autosave is due (seconds of app time; desktop only). + #[cfg_attr(target_arch = "wasm32", allow(dead_code))] + next_autosave: f64, + styled: bool, +} + +impl TextureCraftApp { + pub fn new(cc: &eframe::CreationContext<'_>, session: Session) -> TextureCraftApp { + theme::install(&cc.egui_ctx); + let gpu = cc.wgpu_render_state.as_ref().map(gpu::init); + let ui = cc.storage.and_then(|s| eframe::get_value::(s, "ui")).unwrap_or_default(); + let next_autosave = ui.prefs.autosave_minutes as f64 * 60.0; + let mut app = TextureCraftApp { + session, + ui, + gpu, + control: None, + toasts: Vec::new(), + bake: None, + thumbs: thumbs::Thumbs::default(), + viewport_rect: egui::Rect::NOTHING, + screenshot_waiters: Vec::new(), + fps: 0.0, + ui_ms: 0.0, + library: None, + render: render_mode::RenderView::default(), + last_paint_point: None, + render_state: cc.wgpu_render_state.clone(), + last_time: 0.0, + next_autosave, + styled: true, + }; + app.ui.rename = None; + app.ui.windows.new_project = false; + app + } + + /// Run an engine command, reporting errors as toasts. Returns the result on success. + pub fn run(&mut self, id: &str, params: Value) -> Option { + match texturecraft_engine::execute(&mut self.session, id, ¶ms) { + Ok(v) => Some(v), + Err(e) => { + self.toast(e.to_string(), true); + None + } + } + } + + pub fn toast(&mut self, text: impl Into, error: bool) { + self.toasts.push(Toast { text: text.into(), error, until: self.last_time + if error { 6.0 } else { 3.0 } }); + } + + /// Start baking texture sets in the background (one after another). + pub fn start_bake(&mut self, sets: Vec) { + if self.bake.is_some() || sets.is_empty() { + return; + } + let total = sets.len(); + self.bake = Some(BakeJob { queue: sets, current: None, total }); + } + + fn poll_bake(&mut self, ctx: &egui::Context) { + let Some(job) = self.bake.as_mut() else { return }; + ctx.request_repaint_after(std::time::Duration::from_millis(50)); + if let Some((ts, _, rx)) = &job.current { + match rx.try_recv() { + Ok(Ok(out)) => { + let ts = *ts; + job.current = None; + if let Err(e) = self.session.apply_bake(ts, out) { + self.toast(e.to_string(), true); + } + } + Ok(Err(e)) => { + job.current = None; + let msg = e.to_string(); + self.bake = None; + self.toast(msg, true); + return; + } + Err(std::sync::mpsc::TryRecvError::Empty) => return, + Err(std::sync::mpsc::TryRecvError::Disconnected) => { + self.bake = None; + self.toast("bake worker stopped", true); + return; + } + } + } + let Some(job) = self.bake.as_mut() else { return }; + if job.current.is_none() { + if job.queue.is_empty() { + self.bake = None; + self.toast("Mesh maps baked", false); + return; + } + let ts = job.queue.remove(0); + match self.session.bake_task(ts) { + Ok(task) => { + let progress = Arc::new(Progress::new()); + let (tx, rx) = std::sync::mpsc::channel(); + spawn_bake(task, progress.clone(), tx); + if let Some(job) = self.bake.as_mut() { + job.current = Some((ts, progress, rx)); + } + } + Err(e) => self.toast(e.to_string(), true), + } + } + } + + pub fn cancel_bake(&mut self) { + if let Some(job) = self.bake.take() + && let Some((_, p, _)) = job.current + { + p.cancel.store(true, Ordering::Relaxed); + } + } + + /// Bake progress 0..1 across all queued sets. + pub fn bake_progress(&self) -> Option { + let job = self.bake.as_ref()?; + let done = job.total - job.queue.len() - usize::from(job.current.is_some()); + let cur = job.current.as_ref().map(|(_, p, _)| p.fraction()).unwrap_or(0.0); + Some(((done as f32 + cur) / job.total.max(1) as f32).clamp(0.0, 1.0)) + } +} + +#[cfg(not(target_arch = "wasm32"))] +fn spawn_bake(task: BakeTask, progress: Arc, tx: std::sync::mpsc::Sender>) { + std::thread::spawn(move || { + let _ = tx.send(task.run(&progress)); + }); +} + +#[cfg(target_arch = "wasm32")] +fn spawn_bake(task: BakeTask, progress: Arc, tx: std::sync::mpsc::Sender>) { + // shortcut: no threads on the web; the bake runs on the UI thread (the window pauses). + let _ = tx.send(task.run(&progress)); +} + +impl TextureCraftApp { + /// Every `prefs.autosave_minutes`, write a modified project to the autosave folder (encoded + /// and written on a worker thread; the project data is shared copy-on-write). + #[cfg(not(target_arch = "wasm32"))] + fn autosave(&mut self, now: f64) { + let period = self.ui.prefs.autosave_minutes as f64 * 60.0; + // The clock starts at the first unsaved change. + if period <= 0.0 || !self.session.modified { + self.next_autosave = now + period; + return; + } + if now < self.next_autosave { + return; + } + self.next_autosave = now + period; + let dir = user_dir("autosave"); + let path = dir.join(format!("{}.{}", texturecraft_engine::formats::export::sanitize_file_stem(&self.session.doc.project.name), texturecraft_engine::core::PROJECT_EXT)); + let pf = self.session.project_file(); + let spawned = std::thread::Builder::new().name("texturecraft-autosave".into()).spawn(move || { + let result = std::fs::create_dir_all(&dir).map_err(|e| e.to_string()).and_then(|_| texturecraft_engine::formats::save_project(&path, &pf).map_err(|e| e.to_string())); + match result { + Ok(()) => log::info!("autosaved {}", path.display()), + Err(e) => log::warn!("autosave to {} failed: {e}", path.display()), + } + }); + if let Err(e) = spawned { + log::warn!("could not start autosave: {e}"); + } + } +} + +impl eframe::App for TextureCraftApp { + fn save(&mut self, storage: &mut dyn eframe::Storage) { + eframe::set_value(storage, "ui", &self.ui); + } + + fn logic(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { + let now = ctx.input(|i| i.time); + let dt = (now - self.last_time) as f32; + if dt > 0.0 { + self.fps = self.fps * 0.9 + (1.0 / dt) * 0.1; + } + self.last_time = now; + if !self.styled { + theme::install(ctx); + self.styled = true; + } + control::poll(self, ctx); + web_files::poll(self); + let dropped = ctx.input(|i| i.raw.dropped_files.clone()); + for f in &dropped { + web_files::dropped(self, ctx, f); + } + self.poll_bake(ctx); + let scale = self.ui.prefs.ui_scale.clamp(0.5, 3.0); + if (ctx.zoom_factor() - scale).abs() > 1e-3 { + ctx.set_zoom_factor(scale); + } + #[cfg(not(target_arch = "wasm32"))] + self.autosave(now); + i18n::set_language(&self.ui.prefs.language); + menus::shortcuts(self, ctx); + self.toasts.retain(|t| t.until > now); + } + + fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) { + let ctx = ui.ctx().clone(); + let t0 = now_ms(); + if !self.ui.hide_ui { + menus::menu_bar(self, ui); + toolbar::top_bar(self, ui); + toolbar::status_bar(self, ui); + toolbar::tool_shelf(self, ui); + // Bake settings take the Assets slot; a side panel only when Assets is closed. + if self.ui.mode == state::Mode::Baking && !self.ui.dock.is_open(docking::Panel::Assets) { + windows::bake_left(self, ui); + } + toolbar::rail(self, ui); + } + let hide = self.ui.hide_ui; + egui::CentralPanel::default().frame(egui::Frame::NONE.fill(if hide { theme::TOKENS.viewport } else { theme::TOKENS.separator })).show(ui, |ui| { + if hide { viewport::central(self, ui) } else { docking::show(self, ui) } + }); + windows::show(self, &ctx); + toasts(self, &ctx); + let dt = (now_ms() - t0) as f32; + self.ui_ms = if self.ui_ms == 0.0 { dt } else { self.ui_ms * 0.9 + dt * 0.1 }; + } +} + +/// `Documents/TextureCraft/` in the user's home folder. +#[cfg(not(target_arch = "wasm32"))] +pub fn user_dir(sub: &str) -> std::path::PathBuf { + let home = std::env::var("USERPROFILE").or_else(|_| std::env::var("HOME")).unwrap_or_else(|_| ".".into()); + std::path::Path::new(&home).join("Documents").join("TextureCraft").join(sub) +} + +/// Folder holding the user's smart materials. +#[cfg(not(target_arch = "wasm32"))] +pub fn library_dir() -> std::path::PathBuf { + user_dir("library") +} + +/// Milliseconds since the first call (0 on the web, where `std::time` is unavailable). +pub fn now_ms() -> f64 { + #[cfg(not(target_arch = "wasm32"))] + { + static START: std::sync::OnceLock = std::sync::OnceLock::new(); + START.get_or_init(std::time::Instant::now).elapsed().as_secs_f64() * 1000.0 + } + #[cfg(target_arch = "wasm32")] + 0.0 +} + +fn toasts(app: &mut TextureCraftApp, ctx: &egui::Context) { + if app.toasts.is_empty() { + return; + } + ctx.request_repaint_after(std::time::Duration::from_millis(250)); + egui::Area::new(egui::Id::new("toasts")).anchor(egui::Align2::RIGHT_BOTTOM, egui::vec2(-16.0, -36.0)).show(ctx, |ui| { + for t in &app.toasts { + egui::Frame::NONE + .fill(egui::Color32::from_rgb(0x30, 0x30, 0x30)) + .stroke(egui::Stroke::new(1.0, if t.error { theme::TOKENS.danger } else { theme::TOKENS.accent })) + .corner_radius(4) + .inner_margin(egui::Margin::symmetric(10, 6)) + .show(ui, |ui| { + ui.set_max_width(360.0); + ui.label(egui::RichText::new(&t.text).color(theme::TOKENS.text_strong)); + }); + ui.add_space(4.0); + } + }); +} diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs new file mode 100644 index 00000000..1184bf55 --- /dev/null +++ b/crates/ui-egui/src/menus.rs @@ -0,0 +1,286 @@ +//! The menu bar and global shortcuts. The menu catalog follows the menu layout of a standard +//! texture-painting workflow, with stable ids; an item is live when the engine (or the shell, for `ui.*` ids) implements +//! its id. The same catalog drives `docs/parity.md`. + +use egui::{Key, KeyboardShortcut, Modifiers}; +use serde_json::{Value, json}; + +use crate::TextureCraftApp; +use crate::i18n::tr; +use crate::state::{Mode, ViewLayout}; +use crate::theme::TOKENS; + +/// One menu entry. `label == "-"` is a separator; `sub` names a submenu group. +#[derive(Clone, Copy, Debug)] +pub struct Item { + pub menu: &'static str, + pub sub: Option<&'static str>, + pub label: &'static str, + pub id: &'static str, + pub shortcut: Option<&'static str>, +} + +const fn it(menu: &'static str, label: &'static str, id: &'static str, shortcut: Option<&'static str>) -> Item { + Item { menu, sub: None, label, id, shortcut } +} +const fn sub(menu: &'static str, sub: &'static str, label: &'static str, id: &'static str, shortcut: Option<&'static str>) -> Item { + Item { menu, sub: Some(sub), label, id, shortcut } +} +const fn sep(menu: &'static str) -> Item { + Item { menu, sub: None, label: "-", id: "", shortcut: None } +} + +pub const TOP: [&str; 6] = ["File", "Edit", "Mode", "Window", "Viewport", "Help"]; + +/// The menu catalog (Painter's menu tree with our ids). +pub const CATALOG: &[Item] = &[ + it("File", "New project...", "ui.newProject", Some("Ctrl+N")), + it("File", "Open...", "file.open", Some("Ctrl+O")), + it("File", "Open sample project...", "project.sample", None), + it("File", "Close", "file.close", Some("Ctrl+F4")), + sep("File"), + it("File", "Save", "file.save", Some("Ctrl+S")), + it("File", "Save as...", "file.saveAs", Some("Ctrl+Shift+S")), + it("File", "Save a copy...", "file.saveCopy", None), + it("File", "Remove unused resources...", "file.removeUnused", None), + sep("File"), + it("File", "Import resources...", "resource.import", None), + it("File", "Export Textures...", "ui.export", Some("Ctrl+Shift+E")), + it("File", "Export Mesh...", "file.exportMesh", None), + sep("File"), + it("File", "Quit", "ui.quit", Some("Ctrl+Q")), + it("Edit", "Undo", "edit.undo", Some("Ctrl+Z")), + it("Edit", "Redo", "edit.redo", Some("Ctrl+Y")), + sep("Edit"), + it("Edit", "Project Configuration...", "ui.projectConfig", None), + it("Edit", "Reimport mesh", "file.reimportMesh", Some("Ctrl+Shift+R")), + it("Edit", "Settings...", "ui.settings", None), + it("Mode", "Bake Mesh Maps", "ui.mode.bake", Some("F8")), + it("Mode", "Painting", "ui.mode.paint", Some("F9")), + it("Mode", "Rendering (path traced)", "ui.mode.render", Some("F10")), + sub("Window", "Views", "Assets", "ui.view.assets", None), + sub("Window", "Views", "Display Settings", "ui.view.display", None), + sub("Window", "Views", "History", "ui.view.history", None), + sub("Window", "Views", "Layers", "ui.view.layers", None), + sub("Window", "Views", "Log", "ui.view.log", None), + sub("Window", "Views", "Properties", "ui.view.properties", None), + sub("Window", "Views", "Shader Settings", "ui.view.shader", None), + sub("Window", "Views", "Texture Set List", "ui.view.textureSetList", None), + sub("Window", "Views", "Texture Set Settings", "ui.view.textureSetSettings", None), + sub("Window", "Save UI Layout", "Save current layout...", "ui.layout.save", None), + it("Window", "Load UI Layout", "ui.layout.load", None), + it("Window", "Hide UI", "ui.hideUi", Some("Tab")), + it("Window", "Reset UI", "ui.resetUi", None), + it("Viewport", "Display material", "viewport.displayMaterial", Some("M")), + it("Viewport", "Display next channel", "viewport.nextChannel", Some("C")), + it("Viewport", "Display previous channel", "viewport.previousChannel", Some("Shift+C")), + it("Viewport", "Display next mesh map", "viewport.nextMeshMap", Some("B")), + it("Viewport", "Display previous mesh map", "viewport.previousMeshMap", Some("Shift+B")), + it("Viewport", "UV checker", "ui.uvChecker", None), + sep("Viewport"), + it("Viewport", "Show entire mesh", "viewport.frame", Some("F")), + sep("Viewport"), + it("Viewport", "3D/2D views", "ui.layout.split", Some("F1")), + it("Viewport", "3D view only", "ui.layout.3d", Some("F2")), + it("Viewport", "2D view only", "ui.layout.2d", Some("F3")), + sep("Viewport"), + it("Viewport", "Enable quick mask", "viewport.quickMask", Some("Y")), + it("Viewport", "Edit quick mask", "viewport.quickMask.edit", Some("U")), + it("Viewport", "Invert quick mask", "viewport.quickMask.invert", Some("Ctrl+Shift+I")), + it("Help", "Documentation...", "ui.help.docs", None), + it("Help", "Shortcuts list...", "ui.help.shortcuts", None), + it("Help", "Join the community (Discord)...", "ui.help.discord", None), + it("Help", "ArtCraft website...", "ui.help.website", None), + it("Help", "Report a bug...", "ui.help.bug", None), + sep("Help"), + it("Help", "Show log...", "ui.view.log", None), + it("Help", "About TextureCraft...", "ui.about", None), +]; + +/// Ids the shell handles itself. +fn is_ui(id: &str) -> bool { + id.starts_with("ui.") +} + +/// Whether an item can run now. +pub fn enabled(app: &TextureCraftApp, id: &str) -> bool { + if is_ui(id) { + return true; + } + texturecraft_engine::find(id).is_some_and(|c| (c.enabled)(&app.session).is_ok()) +} + +/// Whether an id is implemented at all (parity report). +pub fn implemented(id: &str) -> bool { + is_ui(id) || texturecraft_engine::find(id).is_some() +} + +/// Invoke a menu item (menus, shortcuts, palette, control channel `ui.menu.invoke`). +pub fn invoke(app: &mut TextureCraftApp, ctx: &egui::Context, id: &str) { + if let Some(panel) = crate::docking::view_panel(id) { + app.ui.dock.toggle(panel, ctx.content_rect()); + return; + } + match id { + "ui.newProject" => app.ui.windows.new_project = true, + "ui.export" => app.ui.windows.export = true, + "ui.quit" => ctx.send_viewport_cmd(egui::ViewportCommand::Close), + "ui.projectConfig" => app.ui.dock.focus(crate::docking::Panel::Display, ctx.content_rect()), + "ui.settings" => app.ui.windows.settings = true, + "ui.mode.bake" => app.ui.mode = Mode::Baking, + "ui.mode.paint" => app.ui.mode = Mode::Painting, + "ui.mode.render" => app.ui.mode = Mode::Rendering, + "ui.hideUi" => app.ui.hide_ui = !app.ui.hide_ui, + "ui.resetUi" => app.ui.adopt_layout(crate::UiState::default()), + "ui.layout.save" => crate::windows::layout_file(app, true), + "ui.layout.load" => crate::windows::layout_file(app, false), + "ui.uvChecker" => { + app.run("viewport.view", json!({"mode": "uvChecker"})); + } + "ui.layout.split" => app.ui.layout = ViewLayout::Split, + "ui.layout.3d" => app.ui.layout = ViewLayout::Only3D, + "ui.layout.2d" => app.ui.layout = ViewLayout::Only2D, + "ui.help.shortcuts" => app.ui.windows.shortcuts = true, + "ui.about" => app.ui.windows.about = true, + "ui.help.discord" => ctx.open_url(egui::OpenUrl::new_tab("https://discord.gg/artcraft")), + "ui.help.website" => ctx.open_url(egui::OpenUrl::new_tab("https://getartcraft.com/apps/texturecraft")), + "ui.help.docs" => ctx.open_url(egui::OpenUrl::new_tab("https://github.com/storytold/texturecraft#readme")), + "ui.help.bug" => ctx.open_url(egui::OpenUrl::new_tab("https://github.com/storytold/texturecraft/issues")), + _ => { + if crate::windows::file_action(app, ctx, id) { + return; + } + app.run(id, Value::Null); + } + } +} + +/// Parse "Ctrl+Shift+E" style shortcuts. +pub fn parse_shortcut(s: &str) -> Option { + let mut mods = Modifiers::NONE; + let mut key = None; + for part in s.split('+') { + match part { + "Ctrl" | "Cmd" => mods |= Modifiers::COMMAND, + "Shift" => mods |= Modifiers::SHIFT, + "Alt" => mods |= Modifiers::ALT, + k => key = Key::from_name(k), + } + } + key.map(|k| KeyboardShortcut::new(mods, k)) +} + +pub fn menu_bar(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + egui::Panel::top("menu_bar").exact_size(24.0).frame(egui::Frame::NONE.fill(TOKENS.chrome).inner_margin(egui::Margin::symmetric(6, 0))).show(ui, |ui| { + egui::MenuBar::new().ui(ui, |ui| { + let ctx = ui.ctx().clone(); + for top in TOP { + ui.menu_button(tr(top), |ui| { + ui.set_min_width(220.0); + let mut current_sub: Option<&str> = None; + let items: Vec = CATALOG.iter().filter(|i| i.menu == top).copied().collect(); + for item in &items { + if let Some(s) = item.sub { + if current_sub == Some(s) { + continue; + } + current_sub = Some(s); + ui.menu_button(tr(s), |ui| { + for x in items.iter().filter(|x| x.sub == Some(s)) { + menu_item(app, &ctx, ui, x); + } + }); + continue; + } + if item.label == "-" { + ui.separator(); + continue; + } + menu_item(app, &ctx, ui, item); + } + }); + } + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + let mode = match app.ui.mode { + Mode::Painting => "Painting", + Mode::Baking => "Baking", + Mode::Rendering => "Rendering", + }; + ui.label(egui::RichText::new(mode).size(11.0).color(TOKENS.text_dim)); + }); + }); + }); +} + +fn menu_item(app: &mut TextureCraftApp, ctx: &egui::Context, ui: &mut egui::Ui, item: &Item) { + let on = enabled(app, item.id); + let mut b = egui::Button::new(tr(item.label)); + if let Some(sc) = crate::keymap::shortcut_of(&app.ui.keymap, item.id) { + b = b.shortcut_text(sc); + } + let checked = match item.id { + "ui.mode.paint" => Some(app.ui.mode == Mode::Painting), + "ui.mode.bake" => Some(app.ui.mode == Mode::Baking), + "ui.mode.render" => Some(app.ui.mode == Mode::Rendering), + id => crate::docking::view_panel(id).map(|p| app.ui.dock.is_open(p)), + }; + if let Some(c) = checked { + b = b.selected(c); + } + if ui.add_enabled(on, b).clicked() { + invoke(app, ctx, item.id); + ui.close(); + } + #[cfg(not(target_arch = "wasm32"))] + if item.id == "file.open" { + ui.add_enabled_ui(!app.ui.recent.is_empty(), |ui| { + ui.menu_button("Recent projects", |ui| { + for path in app.ui.recent.clone() { + if ui.button(&path).clicked() { + crate::windows::open_path(app, &path); + ui.close(); + } + } + ui.separator(); + if ui.button("Clear recent projects").clicked() { + app.ui.recent.clear(); + ui.close(); + } + }); + }); + } +} + +/// Global shortcuts: the catalog's and every engine command's (defaults or the user's keymap), +/// plus the fixed brush keys. +pub fn shortcuts(app: &mut TextureCraftApp, ctx: &egui::Context) { + if crate::keymap::capturing(ctx) || (ctx.memory(|m| m.focused().is_some()) && ctx.egui_wants_keyboard_input()) { + return; + } + if !ctx.input(|i| i.events.iter().any(|e| matches!(e, egui::Event::Key { pressed: true, .. }))) { + return; + } + let active = crate::keymap::active(&app.ui.keymap); + let mut fire: Vec<&str> = Vec::new(); + ctx.input_mut(|i| { + for (id, sc) in &active { + if i.consume_shortcut(sc) { + fire.push(*id); + } + } + // Brush size and hardness: [ and ]. + let size_down = i.consume_key(Modifiers::NONE, Key::OpenBracket); + let size_up = i.consume_key(Modifiers::NONE, Key::CloseBracket); + if size_down || size_up { + let f = if size_up { 1.15 } else { 1.0 / 1.15 }; + app.session.tool.brush.size = (app.session.tool.brush.size * f).clamp(0.0005, 0.25); + } + if i.consume_key(Modifiers::NONE, Key::Escape) { + app.session.cancel_stroke(); + app.session.tool.path.points.clear(); + } + }); + for id in fire { + invoke(app, ctx, id); + } +} diff --git a/crates/ui-egui/src/parity.rs b/crates/ui-egui/src/parity.rs new file mode 100644 index 00000000..4bfc1b6c --- /dev/null +++ b/crates/ui-egui/src/parity.rs @@ -0,0 +1,52 @@ +//! Menu parity with Painter: which catalog items are live. `cargo test -p texturecraft-ui-egui +//! parity` checks the floor; with `TC_UPDATE_PARITY=1` it rewrites `docs/parity.md`. + +use crate::menus::{CATALOG, implemented}; + +/// Live menu items must never drop below this (raise it when parity rises). +pub const FLOOR: usize = 51; + +/// (live, total) over the catalog, separators excluded. +pub fn counts() -> (usize, usize) { + let items: Vec<_> = CATALOG.iter().filter(|i| i.label != "-").collect(); + (items.iter().filter(|i| implemented(i.id)).count(), items.len()) +} + +/// The Markdown report. +pub fn report() -> String { + let (live, total) = counts(); + let mut out = String::new(); + out.push_str("# Menu parity\n\nGenerated by `TC_UPDATE_PARITY=1 cargo test -p texturecraft-ui-egui parity`. "); + out.push_str("Each row is a menu item of the target menu layout with TextureCraft's command id; "); + out.push_str("**live** means the id is implemented. Feature parity beyond menus is tracked in [`ROADMAP.md`](../ROADMAP.md).\n\n"); + out.push_str(&format!("**{live} of {total} menu items live ({:.0}%).**\n\n", live as f32 * 100.0 / total.max(1) as f32)); + for top in crate::menus::TOP { + out.push_str(&format!("## {top}\n\n| Item | Id | Shortcut | Status |\n|---|---|---|---|\n")); + for i in CATALOG.iter().filter(|i| i.menu == top && i.label != "-") { + let label = match i.sub { + Some(s) => format!("{s} ▸ {}", i.label), + None => i.label.to_string(), + }; + let status = if implemented(i.id) { "live" } else { "missing" }; + out.push_str(&format!("| {label} | `{}` | {} | {status} |\n", i.id, i.shortcut.unwrap_or(""))); + } + out.push('\n'); + } + out +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parity_floor_and_report() { + let (live, total) = counts(); + assert!(live >= FLOOR, "menu parity dropped: {live} < {FLOOR}"); + assert!(total >= live); + if std::env::var("TC_UPDATE_PARITY").is_ok() { + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../docs/parity.md"); + std::fs::write(path, report()).unwrap(); + } + } +} diff --git a/crates/ui-egui/src/render_mode.rs b/crates/ui-egui/src/render_mode.rs new file mode 100644 index 00000000..e4122aea --- /dev/null +++ b/crates/ui-egui/src/render_mode.rs @@ -0,0 +1,274 @@ +//! Rendering mode (F10): a progressive path-traced view of the current camera. The tracer runs on +//! a worker thread (one pass per frame on the single-threaded web) and restarts whenever the +//! scene, camera, view size or settings change. + +use std::sync::Arc; +#[cfg(not(target_arch = "wasm32"))] +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Mutex, PoisonError}; + +use egui::{Color32, ColorImage, Rect, RichText, TextureHandle, TextureOptions, Ui, vec2}; +use texturecraft_engine::geom::OrbitCamera; +use texturecraft_render::trace::{TraceDisplay, TraceScene, TraceSet, TraceSettings, Tracer}; + +use crate::TextureCraftApp; +use crate::theme::TOKENS; + +/// A finished pass, ready to show. +struct Frame { + width: u32, + height: u32, + rgba: Vec, + samples: u32, +} + +/// The tracer and everything it needs. +struct Work { + scene: TraceScene, + camera: OrbitCamera, + settings: TraceSettings, + display: TraceDisplay, + max_samples: u32, + tracer: Tracer, +} + +impl Work { + fn frame(&self) -> Frame { + Frame { width: self.tracer.width, height: self.tracer.height, rgba: self.tracer.rgba8(&self.display), samples: self.tracer.samples } + } + + /// One more sample per pixel, or None when done. + #[cfg(not(target_arch = "wasm32"))] + fn step(&mut self) -> Option { + if self.tracer.samples >= self.max_samples { + return None; + } + self.tracer.pass(&self.scene, &self.camera, &self.settings); + Some(self.frame()) + } + + /// Trace for about `budget_ms` of this frame (the web has one thread: the UI must keep + /// running); a frame to show when a pass finished. + #[cfg(target_arch = "wasm32")] + fn step_for(&mut self, budget_ms: f64) -> Option { + let start = js_sys::Date::now(); + let mut rows = 4; + while self.tracer.samples < self.max_samples { + let t = js_sys::Date::now(); + if self.tracer.pass_rows(&self.scene, &self.camera, &self.settings, rows) { + return Some(self.frame()); + } + let now = js_sys::Date::now(); + if now - start >= budget_ms { + break; + } + // Grow the slice while rows are cheap, staying inside the budget. + if now - t < budget_ms / 8.0 { + rows *= 2; + } + } + None + } +} + +/// The running render of one scene state. +struct Job { + key: String, + latest: Arc>>, + started: f64, + #[cfg(not(target_arch = "wasm32"))] + cancel: Arc, + #[cfg(target_arch = "wasm32")] + work: Work, +} + +#[cfg(not(target_arch = "wasm32"))] +impl Drop for Job { + fn drop(&mut self) { + self.cancel.store(true, Ordering::Release); + } +} + +/// Rendering mode state kept by the app. +#[derive(Default)] +pub struct RenderView { + job: Option, + texture: Option, + shown: Option<(u32, u32, Vec)>, + samples: u32, + elapsed: f64, +} + +/// Viewport resolution of the render (the web renders at half size: it has one thread). +fn render_size(rect: Rect) -> (u32, u32) { + let scale = if cfg!(target_arch = "wasm32") { 0.5 } else { 1.0 }; + ((rect.width() * scale).max(16.0) as u32, (rect.height() * scale).max(16.0) as u32) +} + +fn work(app: &TextureCraftApp, size: (u32, u32)) -> Work { + let s = &app.session; + let d = &s.doc.project.display; + let sets = s + .doc + .project + .texture_sets + .iter() + .zip(&s.caches) + .map(|(ts, c)| TraceSet { material: ts.material, composite: c.composite.clone(), height_strength: ts.height_strength }) + .collect(); + let env_image = d.environment_resource().and_then(|n| s.images.get(n)); + Work { + scene: TraceScene::for_display(s.mesh.clone(), s.bvh.clone(), sets, d, env_image.map(|i| i.as_ref())), + camera: s.camera, + settings: TraceSettings { bounces: app.ui.render.bounces }, + display: TraceDisplay { denoise: app.ui.render.denoise, ..TraceDisplay::from_display(d) }, + max_samples: app.ui.render.max_samples.max(1), + tracer: Tracer::new(size.0, size.1), + } +} + +/// What the render depends on; a change restarts it. +fn key(app: &TextureCraftApp, size: (u32, u32)) -> String { + let s = &app.session; + let revisions: Vec = s.caches.iter().map(|c| c.revision).collect(); + format!("{}|{revisions:?}|{:?}|{size:?}|{:?}|{:?}", s.mesh_id, s.camera, s.doc.project.display, app.ui.render) +} + +fn start(app: &TextureCraftApp, ctx: &egui::Context, key: String, size: (u32, u32)) -> Job { + let latest = Arc::new(Mutex::new(None)); + let started = ctx.input(|i| i.time); + #[cfg(not(target_arch = "wasm32"))] + { + let cancel = Arc::new(AtomicBool::new(false)); + let mut w = work(app, size); + let (out, stop, ctx) = (latest.clone(), cancel.clone(), ctx.clone()); + let spawned = std::thread::Builder::new().name("texturecraft-render".into()).spawn(move || { + while !stop.load(Ordering::Acquire) { + let Some(frame) = w.step() else { break }; + if stop.load(Ordering::Acquire) { + break; + } + *out.lock().unwrap_or_else(PoisonError::into_inner) = Some(frame); + ctx.request_repaint(); + } + }); + if let Err(e) = spawned { + log::error!("could not start the render thread: {e}"); + } + Job { key, latest, started, cancel } + } + #[cfg(target_arch = "wasm32")] + { + let _ = ctx; + Job { key, latest, started, work: work(app, size) } + } +} + +/// Draw Rendering mode over the 3D view in `rect` (navigation is handled by the 3D view). +pub fn show(app: &mut TextureCraftApp, ui: &mut Ui, rect: Rect) { + let ctx = ui.ctx().clone(); + let size = render_size(rect); + let k = key(app, size); + if app.render.job.as_ref().is_none_or(|j| j.key != k) { + app.render.job = Some(start(app, &ctx, k, size)); + app.render.samples = 0; + } + let now = ctx.input(|i| i.time); + let mut running = false; + if let Some(job) = app.render.job.as_mut() { + #[cfg(target_arch = "wasm32")] + { + if let Some(f) = job.work.step_for(30.0) { + *job.latest.lock().unwrap_or_else(PoisonError::into_inner) = Some(f); + } + if job.work.tracer.samples < job.work.max_samples { + ctx.request_repaint(); + } + } + if let Some(f) = job.latest.lock().unwrap_or_else(PoisonError::into_inner).take() { + let img = ColorImage::from_rgba_unmultiplied([f.width as usize, f.height as usize], &f.rgba); + match app.render.texture.as_mut() { + Some(t) => t.set(img, TextureOptions::LINEAR), + None => app.render.texture = Some(ctx.load_texture("render-view", img, TextureOptions::LINEAR)), + } + app.render.samples = f.samples; + app.render.elapsed = now - job.started; + app.render.shown = Some((f.width, f.height, f.rgba)); + } + running = app.render.samples < app.ui.render.max_samples; + } + let p = ui.painter_at(rect); + match &app.render.texture { + Some(t) if app.render.samples > 0 => { + p.image(t.id(), rect, Rect::from_min_max(egui::pos2(0.0, 0.0), egui::pos2(1.0, 1.0)), Color32::WHITE); + } + _ => { + p.rect_filled(rect, 0.0, TOKENS.viewport); + p.text(rect.center(), egui::Align2::CENTER_CENTER, "Starting render...", egui::FontId::proportional(14.0), TOKENS.text_dim); + } + } + overlay(app, ui, rect, running); +} + +/// The render status and settings card in the top-left corner. +fn overlay(app: &mut TextureCraftApp, ui: &mut Ui, rect: Rect, running: bool) { + let card = Rect::from_min_size(rect.min + vec2(12.0, 12.0), vec2(250.0, 176.0)); + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(card).layout(egui::Layout::top_down(egui::Align::Min))); + egui::Frame::popup(child.style()).show(&mut child, |ui| { + ui.set_width(226.0); + let max = app.ui.render.max_samples.max(1); + ui.label(RichText::new("RENDERING").size(11.0).strong()); + let status = if running { "Rendering" } else { "Done" }; + ui.label(RichText::new(format!("{status}: {} / {max} samples, {:.1} s", app.render.samples, app.render.elapsed)).size(11.0).color(TOKENS.text_dim)); + ui.add(egui::ProgressBar::new(app.render.samples as f32 / max as f32).desired_height(4.0)); + ui.horizontal(|ui| { + ui.label("Samples"); + ui.add(egui::DragValue::new(&mut app.ui.render.max_samples).range(1..=16384)); + ui.label("Bounces"); + ui.add(egui::DragValue::new(&mut app.ui.render.bounces).range(1..=32)); + }); + ui.checkbox(&mut app.ui.render.denoise, "Denoise").on_hover_text("Filter the remaining noise while keeping edges and texture detail"); + ui.horizontal(|ui| { + if ui.add_enabled(app.render.shown.is_some(), egui::Button::new("Save render...")).clicked() { + save(app); + } + if ui.button("Back to painting").clicked() { + app.ui.mode = crate::state::Mode::Painting; + } + }); + }); +} + +/// Save the shown render as PNG. +fn save(app: &mut TextureCraftApp) { + let Some((w, h, rgba)) = app.render.shown.clone() else { return }; + let Some(png) = crate::control::encode_png(w, h, rgba).map(|(_, _, png)| png) else { + app.toast("Couldn't encode the render", true); + return; + }; + let name = format!("{}_render.png", texturecraft_engine::formats::export::sanitize_file_stem(&app.session.doc.project.name)); + #[cfg(not(target_arch = "wasm32"))] + { + let Some(path) = rfd::FileDialog::new().add_filter("PNG image", &["png"]).set_file_name(name).save_file() else { return }; + match std::fs::write(&path, png) { + Ok(()) => app.toast(format!("Saved {}", path.display()), false), + Err(e) => app.toast(format!("Couldn't save the render: {e}"), true), + } + } + #[cfg(target_arch = "wasm32")] + match crate::web_files::download(&name, &png) { + Ok(()) => app.toast(format!("Downloaded {name}"), false), + Err(e) => app.toast(format!("Couldn't save the render: {e}"), true), + } +} + +impl RenderView { + pub fn is_active(&self) -> bool { + self.job.is_some() || self.texture.is_some() + } +} + +/// Stop rendering (leaving Rendering mode frees the worker and the image). +pub fn stop(app: &mut TextureCraftApp) { + app.render = RenderView::default(); +} diff --git a/crates/ui-egui/src/shelf.rs b/crates/ui-egui/src/shelf.rs new file mode 100644 index 00000000..650e462f --- /dev/null +++ b/crates/ui-egui/src/shelf.rs @@ -0,0 +1,266 @@ +//! The asset shelf (the Assets dock tab): Painter-style tabs (materials, smart materials, smart +//! masks, procedurals, environments, textures), all built in and procedural. Search filters +//! across every tab. + +use egui::{Color32, RichText, Sense, Ui, vec2}; +use egui_phosphor::regular as ic; +use serde_json::json; +use texturecraft_engine::core::ProceduralKind; +use texturecraft_engine::materials::MATERIALS; +use texturecraft_engine::smart_masks::SMART_MASKS; +use texturecraft_render::ibl::ENVIRONMENTS; + +use crate::TextureCraftApp; +use crate::theme::TOKENS; +use crate::widgets::icon_button; + +#[derive(Clone, Copy, PartialEq, Eq)] +enum Tab { + Materials, + Smart, + Masks, + Procedurals, + Environments, + Textures, +} + +const TABS: [(Tab, &str, &str); 6] = [ + (Tab::Materials, ic::SPHERE, "Materials"), + (Tab::Smart, ic::STACK, "Smart materials"), + (Tab::Masks, ic::CIRCLE_HALF, "Smart masks"), + (Tab::Procedurals, ic::CHECKERBOARD, "Procedurals"), + (Tab::Environments, ic::SUN_HORIZON, "Environments"), + (Tab::Textures, ic::IMAGE, "Textures"), +]; + +/// The Assets panel body (a dock tab). +pub fn body(app: &mut TextureCraftApp, ui: &mut Ui) { + let ctx = ui.ctx().clone(); + let tab_id = egui::Id::new("shelf_tab"); + let mut tab = ctx.data_mut(|d| *d.get_persisted_mut_or(tab_id, 0usize)).min(TABS.len() - 1); + let searching = !app.ui.shelf_filter.is_empty(); + ui.horizontal_wrapped(|ui| { + ui.spacing_mut().item_spacing = vec2(2.0, 2.0); + for (i, (_, icon, label)) in TABS.iter().enumerate() { + if icon_button(ui, icon, label, i == tab && !searching, 24.0).clicked() { + tab = i; + app.ui.shelf_filter.clear(); + } + } + }); + ctx.data_mut(|d| d.insert_persisted(tab_id, tab)); + ui.horizontal(|ui| { + ui.label(RichText::new(ic::MAGNIFYING_GLASS).color(TOKENS.text_dim)); + ui.add(egui::TextEdit::singleline(&mut app.ui.shelf_filter).hint_text("Search all assets").desired_width(f32::INFINITY)); + }); + ui.add_space(4.0); + let filter = app.ui.shelf_filter.to_lowercase(); + egui::ScrollArea::vertical().id_salt("shelf_scroll").auto_shrink([false, false]).show(ui, |ui| { + // Searching shows matches from every tab, each under its tab's name. + for (i, (t, _, title)) in TABS.iter().enumerate() { + if filter.is_empty() && i != tab { + continue; + } + match t { + Tab::Materials => materials(app, ui, &ctx, &filter, false, title), + Tab::Smart => { + materials(app, ui, &ctx, &filter, true, title); + library(app, ui, &filter); + } + Tab::Masks => smart_masks(app, ui, &ctx, &filter, title), + Tab::Procedurals => procedurals(app, ui, &ctx, &filter, title), + Tab::Environments => environments(app, ui, &filter, title), + Tab::Textures => textures(app, ui, &ctx, &filter, title), + } + } + }); +} + +fn matches(filter: &str, texts: &[&str]) -> bool { + filter.is_empty() || texts.iter().any(|t| t.to_lowercase().contains(filter)) +} + +fn title(ui: &mut Ui, text: &str) { + ui.label(RichText::new(text).strong().color(TOKENS.text_strong)); +} + +fn header(ui: &mut Ui, text: &str) { + ui.add_space(2.0); + ui.label(RichText::new(text).size(11.0).color(TOKENS.text_dim)); +} + +fn tiles(ui: &mut Ui, body: impl FnOnce(&mut Ui)) { + ui.horizontal_wrapped(|ui| { + ui.spacing_mut().item_spacing = vec2(4.0, 4.0); + body(ui); + }); + ui.add_space(6.0); +} + +/// Built-in materials (or smart materials), grouped by category. +fn materials(app: &mut TextureCraftApp, ui: &mut Ui, ctx: &egui::Context, filter: &str, smart: bool, name: &str) { + let shown: Vec<_> = MATERIALS.iter().filter(|m| m.smart == smart && matches(filter, &[m.label, m.category, m.id])).collect(); + if shown.is_empty() { + return; + } + title(ui, name); + let mut categories: Vec<&str> = Vec::new(); + for m in &shown { + if !categories.contains(&m.category) { + categories.push(m.category); + } + } + for cat in categories { + header(ui, cat); + tiles(ui, |ui| { + for m in shown.iter().filter(|m| m.category == cat) { + let tex = app.thumbs.material(ctx, m.id); + let hint = if m.smart { + "Add the smart material folder above the selected layer" + } else { + "Add a fill layer with this material above the selected layer" + }; + if tile(ui, tex.as_ref(), m.label, hint).clicked() { + app.run("material.apply", json!({"material": m.id})); + } + } + }); + } +} + +/// The user's saved smart materials (desktop library folder). +#[cfg(not(target_arch = "wasm32"))] +fn library(app: &mut TextureCraftApp, ui: &mut Ui, filter: &str) { + if app.library.is_none() { + let mut files: Vec = std::fs::read_dir(crate::library_dir()) + .map(|d| d.flatten().map(|e| e.path()).filter(|p| p.extension().is_some_and(|x| x == "tcmat")).collect()) + .unwrap_or_default(); + files.sort(); + app.library = Some(files); + } + let files = app.library.clone().unwrap_or_default(); + let name = |f: &std::path::PathBuf| f.file_stem().and_then(|s| s.to_str()).unwrap_or("material").to_string(); + let shown: Vec<_> = files.iter().filter(|f| matches(filter, &[&name(f)])).collect(); + if !filter.is_empty() && shown.is_empty() { + return; + } + ui.horizontal(|ui| { + header(ui, "My smart materials"); + if ui.small_button(ic::ARROW_CLOCKWISE).on_hover_text("Rescan the library folder").clicked() { + app.library = None; + } + }); + if files.is_empty() { + ui.label(RichText::new("Right-click a layer > Create smart material").size(10.0).color(TOKENS.text_dim)); + } + for f in shown { + if ui.selectable_label(false, format!("{} {}", ic::SPHERE, name(f))).on_hover_text(f.display().to_string()).clicked() { + app.run("material.load", json!({"path": f.display().to_string()})); + } + } + ui.add_space(6.0); +} + +#[cfg(target_arch = "wasm32")] +fn library(_: &mut TextureCraftApp, _: &mut Ui, _: &str) {} + +fn smart_masks(app: &mut TextureCraftApp, ui: &mut Ui, ctx: &egui::Context, filter: &str, name: &str) { + let shown: Vec<_> = SMART_MASKS.iter().filter(|m| matches(filter, &[m.label, m.id])).collect(); + if shown.is_empty() { + return; + } + title(ui, name); + tiles(ui, |ui| { + for m in shown { + let tex = app.thumbs.smart_mask(ctx, m.id); + if tile(ui, tex.as_ref(), m.label, "Replace the selected layer's mask with this smart mask").clicked() { + app.run("mask.smart.apply", json!({"name": m.id})); + } + } + }); +} + +fn procedurals(app: &mut TextureCraftApp, ui: &mut Ui, ctx: &egui::Context, filter: &str, name: &str) { + let shown: Vec = ProceduralKind::ALL.into_iter().filter(|k| matches(filter, &[k.label()])).collect(); + if shown.is_empty() { + return; + } + title(ui, name); + tiles(ui, |ui| { + for k in shown { + let tex = app.thumbs.procedural(ctx, k); + if tile(ui, tex.as_ref(), k.label(), "Add a fill layer using this pattern").clicked() { + app.run("layer.add.fill", json!({"name": k.label()})); + app.run("layer.fill.set", json!({"channel": "baseColor", "procedural": k.label(), "low": [0.1, 0.1, 0.1], "high": [0.9, 0.9, 0.9]})); + } + } + }); +} + +fn environments(app: &mut TextureCraftApp, ui: &mut Ui, filter: &str, name: &str) { + let shown: Vec<&&str> = ENVIRONMENTS.iter().filter(|e| matches(filter, &[e])).collect(); + if shown.is_empty() { + return; + } + title(ui, name); + for env in shown { + let on = app.session.doc.project.display.environment == **env; + if ui.selectable_label(on, format!("{} {env}", ic::SUN_HORIZON)).clicked() { + app.run("display.set", json!({"environment": env})); + } + } + ui.add_space(6.0); +} + +fn textures(app: &mut TextureCraftApp, ui: &mut Ui, ctx: &egui::Context, filter: &str, name: &str) { + let names: Vec = app.session.doc.resources.keys().filter(|n| matches(filter, &[n])).cloned().collect(); + if !filter.is_empty() && names.is_empty() { + return; + } + ui.horizontal(|ui| { + title(ui, name); + if ui.small_button("Import...").clicked() { + crate::menus::invoke(app, ctx, "resource.import"); + } + }); + if names.is_empty() { + ui.label(RichText::new("Import images to use them in fills and masks").size(10.0).color(TOKENS.text_dim)); + } + tiles(ui, |ui| { + for name in names { + let Some(img) = app.session.images.get(&name).cloned() else { continue }; + let tex = app.thumbs.image(ctx, &name, &img); + let r = tile(ui, Some(&tex), &name, "Add a fill layer using this image"); + if r.clicked() { + app.run("layer.add.image", json!({"name": name})); + } + r.context_menu(|ui| { + if ui.button("Remove resource").clicked() { + app.run("resource.remove", json!({"name": name})); + ui.close(); + } + }); + } + }); +} + +/// A shelf tile: thumbnail (a placeholder disc while it renders) and a wrapped label. +fn tile(ui: &mut Ui, tex: Option<&egui::TextureHandle>, label: &str, hint: &str) -> egui::Response { + let (rect, resp) = ui.allocate_exact_size(vec2(72.0, 86.0), Sense::click()); + let p = ui.painter(); + if resp.hovered() { + p.rect_filled(rect, 3.0, TOKENS.row_hover); + } + let img = egui::Rect::from_center_size(rect.center_top() + vec2(0.0, 32.0), vec2(56.0, 56.0)); + match tex { + Some(t) => { + p.image(t.id(), img, egui::Rect::from_min_max(egui::pos2(0.0, 0.0), egui::pos2(1.0, 1.0)), Color32::WHITE); + } + None => { + p.circle_filled(img.center(), img.width() * 0.45, TOKENS.row_hover); + } + } + let galley = p.layout(label.to_string(), egui::FontId::proportional(9.5), TOKENS.text, rect.width() - 4.0); + p.galley(egui::pos2(rect.center().x - galley.size().x * 0.5, img.bottom() + 3.0), galley, TOKENS.text); + resp.on_hover_text(format!("{label}: {hint}")) +} diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs new file mode 100644 index 00000000..2d67c00b --- /dev/null +++ b/crates/ui-egui/src/state.rs @@ -0,0 +1,250 @@ +//! UI state (serde, so the control channel can read and drive it). + +use serde::{Deserialize, Serialize}; +use texturecraft_engine::core::Channel; + +use crate::docking::Dock; +use crate::keymap::Keymap; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum Mode { + #[default] + Painting, + Baking, + /// Path-traced view (F10). + Rendering, +} + +/// Rendering mode settings. +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct RenderUi { + pub max_samples: u32, + pub bounces: u32, + pub denoise: bool, +} + +impl Default for RenderUi { + fn default() -> Self { + // The web traces on one thread: fewer bounces keep it interactive. + RenderUi { max_samples: 256, bounces: if cfg!(target_arch = "wasm32") { 3 } else { 6 }, denoise: true } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum ViewLayout { + /// 3D and 2D side by side. + #[default] + Split, + Only3D, + Only2D, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Default)] +pub enum PropsTab { + #[default] + Brush, + Alpha, + Material, +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)] +pub struct Windows { + pub export: bool, + pub new_project: bool, + pub about: bool, + pub shortcuts: bool, + #[serde(default)] + pub settings: bool, +} + +/// Edit › Settings. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(default)] +pub struct Prefs { + /// Interface zoom (1 = 100%). + pub ui_scale: f32, + /// Minutes between autosaves of a modified project (0: off; desktop). + pub autosave_minutes: u32, + /// UI language code (`i18n::LANGUAGES`). + pub language: String, +} + +impl Default for Prefs { + fn default() -> Self { + Prefs { ui_scale: 1.0, autosave_minutes: 10, language: "en".into() } + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NewProject { + pub mesh: String, + pub resolution: u32, + pub name: String, + /// A mesh file chosen from disk (desktop only). + pub file: Option, +} + +impl Default for NewProject { + fn default() -> Self { + NewProject { mesh: "material_ball".into(), resolution: 2048, name: "Untitled".into(), file: None } + } +} + +/// The export dialog's settings (remembered between sessions). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ExportUi { + pub dir: String, + pub preset: String, + /// File extension override ("" = the preset's formats). + pub format: String, + /// Bit depth override (0 = the preset's). + pub bit_depth: u8, + /// none | dilation | dilationDefault | infinite + pub padding: String, + pub dilation: u32, + /// Output size override (0 = each texture set's size). + pub size: u32, + /// "" (project), openGl or directX. + pub normal_format: String, + /// Texture sets excluded from export. + pub skip: Vec, + pub tab: u8, +} + +impl Default for ExportUi { + fn default() -> Self { + ExportUi { + dir: default_export_dir(), + preset: "Document channels + Normal + AO".into(), + format: String::new(), + bit_depth: 0, + padding: "infinite".into(), + dilation: 16, + size: 0, + normal_format: String::new(), + skip: Vec::new(), + tab: 0, + } + } +} + +fn default_export_dir() -> String { + #[cfg(not(target_arch = "wasm32"))] + { + crate::user_dir("export").display().to_string() + } + #[cfg(target_arch = "wasm32")] + { + String::new() + } +} + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UiState { + pub mode: Mode, + pub layout: ViewLayout, + /// The docked, tabbed and floating panels around the viewport. + #[serde(default)] + pub dock: Dock, + /// Window ▸ Hide UI (Tab): only the viewport. + pub hide_ui: bool, + pub windows: Windows, + pub uv_zoom: f32, + pub uv_pan: [f32; 2], + /// Channel whose blending the layer rows show. + pub layer_channel: Channel, + pub shelf_filter: String, + pub props_tab: PropsTab, + /// Layer being renamed and the edit buffer. + pub rename: Option<(u64, String)>, + pub new_project: NewProject, + /// Show the UV wireframe in the 2D view. + pub uv_wireframe: bool, + /// Show the mesh wireframe over the 3D view. + #[serde(default)] + pub wireframe_3d: bool, + #[serde(default)] + pub render: RenderUi, + #[serde(default)] + pub prefs: Prefs, + #[serde(default)] + pub export: ExportUi, + /// Recently opened or saved projects (desktop). + #[serde(default)] + pub recent: Vec, + /// Custom keyboard shortcuts (item id → "Ctrl+Shift+E", "" = none) over the defaults. + #[serde(default)] + pub keymap: Keymap, +} + +impl UiState { + /// Take `layout`'s panels, windows and view settings, keeping this state's dialogs, export + /// settings and recent files. + pub fn adopt_layout(&mut self, layout: UiState) { + let keep = std::mem::replace(self, layout); + self.new_project = keep.new_project; + self.export = keep.export; + self.recent = keep.recent; + self.shelf_filter = keep.shelf_filter; + self.prefs = keep.prefs; + self.keymap = keep.keymap; + self.rename = None; + } +} + +impl Default for UiState { + fn default() -> Self { + UiState { + mode: Mode::Painting, + layout: ViewLayout::Split, + dock: Dock::default(), + hide_ui: false, + windows: Windows::default(), + uv_zoom: 1.0, + uv_pan: [0.0, 0.0], + layer_channel: Channel::BaseColor, + shelf_filter: String::new(), + props_tab: PropsTab::Brush, + rename: None, + new_project: NewProject::default(), + uv_wireframe: true, + wireframe_3d: false, + render: RenderUi::default(), + prefs: Prefs::default(), + export: ExportUi::default(), + recent: Vec::new(), + keymap: Keymap::new(), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn adopting_a_layout_keeps_recent_files_export_settings_and_shortcuts() { + let mut ui = UiState { recent: vec!["a.tcraft".into()], ..UiState::default() }; + ui.export.preset = "Mine".into(); + ui.keymap.insert("file.save".into(), "F5".into()); + let mut layout = UiState::default(); + layout.dock.close(crate::docking::Panel::Assets); + ui.adopt_layout(layout); + assert!(!ui.dock.is_open(crate::docking::Panel::Assets)); + assert_eq!(ui.recent, vec!["a.tcraft".to_string()]); + assert_eq!(ui.export.preset, "Mine"); + assert_eq!(ui.keymap.get("file.save").map(String::as_str), Some("F5")); + } + + #[test] + fn older_saved_state_without_a_dock_loads_the_default_layout() { + let mut v = serde_json::to_value(UiState::default()).unwrap(); + let obj = v.as_object_mut().unwrap(); + obj.remove("dock"); + obj.remove("keymap"); + obj.insert("show_shelf".into(), serde_json::json!(false)); + let ui: UiState = serde_json::from_value(v).unwrap(); + assert_eq!(ui.dock, Dock::default()); + } +} diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs new file mode 100644 index 00000000..3ea09fe0 --- /dev/null +++ b/crates/ui-egui/src/theme.rs @@ -0,0 +1,113 @@ +//! Design tokens and egui styling: a dense, very dark professional theme (our own palette and +//! widgets; no third-party assets). + +use egui::{Color32, CornerRadius, FontFamily, FontId, Stroke, TextStyle, Visuals}; + +/// Colors and metrics used across the UI. Never hard-code colors elsewhere. +#[derive(Clone, Copy, Debug)] +pub struct Tokens { + /// Menu bar, title strip, tool shelves. + pub chrome: Color32, + /// Dock panel backgrounds. + pub panel: Color32, + /// Panel title rows ("LAYERS", "PROPERTIES"). + pub header: Color32, + /// List rows (layers, texture sets). + pub row: Color32, + pub row_hover: Color32, + pub row_selected: Color32, + /// Separators between panels. + pub separator: Color32, + pub text: Color32, + pub text_dim: Color32, + pub text_strong: Color32, + /// Selection and focus. + pub accent: Color32, + pub accent_dim: Color32, + pub field: Color32, + pub danger: Color32, + pub viewport: Color32, + pub radius: u8, +} + +pub const TOKENS: Tokens = Tokens { + chrome: Color32::from_rgb(0x1c, 0x1c, 0x1c), + panel: Color32::from_rgb(0x24, 0x24, 0x24), + header: Color32::from_rgb(0x24, 0x24, 0x24), + row: Color32::from_rgb(0x2a, 0x2a, 0x2a), + row_hover: Color32::from_rgb(0x33, 0x33, 0x33), + row_selected: Color32::from_rgb(0x2c, 0x34, 0x40), + separator: Color32::from_rgb(0x14, 0x14, 0x14), + text: Color32::from_rgb(0xd4, 0xd4, 0xd4), + text_dim: Color32::from_rgb(0x96, 0x96, 0x96), + text_strong: Color32::from_rgb(0xf2, 0xf2, 0xf2), + accent: Color32::from_rgb(0x2f, 0x86, 0xeb), + accent_dim: Color32::from_rgb(0x1f, 0x4f, 0x8a), + field: Color32::from_rgb(0x1a, 0x1a, 0x1a), + danger: Color32::from_rgb(0xe0, 0x55, 0x4a), + viewport: Color32::from_rgb(0x2a, 0x2a, 0x2a), + radius: 3, +}; + +/// Install fonts (egui defaults + the Phosphor icon font) and the dark style. +pub fn install(ctx: &egui::Context) { + let mut fonts = egui::FontDefinitions::default(); + egui_phosphor::add_to_fonts(&mut fonts, egui_phosphor::Variant::Regular); + ctx.set_fonts(fonts); + let t = TOKENS; + ctx.all_styles_mut(|s| { + s.text_styles = [ + (TextStyle::Small, FontId::new(10.0, FontFamily::Proportional)), + (TextStyle::Body, FontId::new(12.0, FontFamily::Proportional)), + (TextStyle::Button, FontId::new(12.0, FontFamily::Proportional)), + (TextStyle::Heading, FontId::new(14.0, FontFamily::Proportional)), + (TextStyle::Monospace, FontId::new(11.5, FontFamily::Monospace)), + ] + .into(); + s.spacing.item_spacing = egui::vec2(6.0, 4.0); + s.spacing.button_padding = egui::vec2(6.0, 2.0); + s.spacing.interact_size = egui::vec2(36.0, 20.0); + s.spacing.slider_width = 120.0; + s.spacing.menu_margin = egui::Margin::same(4); + s.spacing.window_margin = egui::Margin::same(8); + let mut v = Visuals::dark(); + v.panel_fill = t.panel; + v.window_fill = t.panel; + v.extreme_bg_color = t.field; + v.faint_bg_color = t.row; + v.code_bg_color = t.field; + v.window_stroke = Stroke::new(1.0, Color32::from_rgb(0x3a, 0x3a, 0x3a)); + v.window_corner_radius = CornerRadius::same(4); + v.menu_corner_radius = CornerRadius::same(3); + v.selection.bg_fill = t.accent_dim; + v.selection.stroke = Stroke::new(1.0, t.accent); + v.hyperlink_color = t.accent; + let r = CornerRadius::same(t.radius); + v.widgets.noninteractive.bg_fill = t.panel; + v.widgets.noninteractive.fg_stroke = Stroke::new(1.0, t.text); + v.widgets.noninteractive.bg_stroke = Stroke::new(1.0, t.separator); + v.widgets.inactive.bg_fill = Color32::from_rgb(0x33, 0x33, 0x33); + v.widgets.inactive.weak_bg_fill = Color32::from_rgb(0x30, 0x30, 0x30); + v.widgets.inactive.fg_stroke = Stroke::new(1.0, t.text); + v.widgets.inactive.corner_radius = r; + v.widgets.hovered.bg_fill = Color32::from_rgb(0x40, 0x40, 0x40); + v.widgets.hovered.weak_bg_fill = Color32::from_rgb(0x3b, 0x3b, 0x3b); + v.widgets.hovered.fg_stroke = Stroke::new(1.0, t.text_strong); + v.widgets.hovered.bg_stroke = Stroke::new(1.0, Color32::from_rgb(0x55, 0x55, 0x55)); + v.widgets.hovered.corner_radius = r; + v.widgets.active.bg_fill = Color32::from_rgb(0x4a, 0x4a, 0x4a); + v.widgets.active.weak_bg_fill = Color32::from_rgb(0x45, 0x45, 0x45); + v.widgets.active.fg_stroke = Stroke::new(1.0, Color32::WHITE); + v.widgets.active.corner_radius = r; + v.widgets.open.bg_fill = Color32::from_rgb(0x3a, 0x3a, 0x3a); + v.widgets.open.corner_radius = r; + v.slider_trailing_fill = true; + v.striped = false; + s.visuals = v; + }); +} + +/// Painter-style uppercase panel caption. +pub fn caption(text: &str) -> egui::RichText { + egui::RichText::new(text.to_uppercase()).size(10.5).strong().color(TOKENS.text_strong) +} diff --git a/crates/ui-egui/src/thumbs.rs b/crates/ui-egui/src/thumbs.rs new file mode 100644 index 00000000..70ff7fd6 --- /dev/null +++ b/crates/ui-egui/src/thumbs.rs @@ -0,0 +1,236 @@ +//! Thumbnails: shaded material spheres, smart mask spheres, procedural swatches and brush alpha +//! previews, rendered on the CPU into cached egui textures (no image assets). New shelf +//! thumbnails are rendered lazily, a few per frame, so opening the shelf never stalls a frame. + +use std::collections::HashMap; + +use egui::{Color32, ColorImage, Painter, Pos2, Rect, TextureHandle, TextureOptions}; +use texturecraft_engine::core::ProceduralKind; +use texturecraft_engine::paint::BrushAlpha; +use texturecraft_engine::preview::{self, Sample}; +use texturecraft_engine::texel::linear_to_srgb; + +/// Shelf thumbnails rendered per frame at most (the rest follow on the next frames). +const PER_FRAME: usize = 2; +/// Shelf sphere thumbnail size in pixels. +const SPHERE_PX: usize = 72; + +#[derive(Default)] +pub struct Thumbs { + /// Shelf thumbnails by key (`mat:`, `mask:`, `proc:`). + shelf: HashMap, + images: HashMap, + /// (frame, thumbnails rendered in it). + budget: (u64, usize), +} + +fn shade(n: [f32; 3], base: [f32; 3], metal: f32, rough: f32) -> [f32; 3] { + let l = [0.45f32, 0.7, 0.55]; + let len = (l[0] * l[0] + l[1] * l[1] + l[2] * l[2]).sqrt(); + let l = l.map(|v| v / len); + let ndl = (n[0] * l[0] + n[1] * l[1] + n[2] * l[2]).max(0.0); + let ndv = n[2].max(0.0); + // View along +Z: half vector between light and view. + let h = [l[0], l[1], l[2] + 1.0]; + let hl = (h[0] * h[0] + h[1] * h[1] + h[2] * h[2]).sqrt(); + let ndh = ((n[0] * h[0] + n[1] * h[1] + n[2] * h[2]) / hl).max(0.0); + let shin = 2.0 / (rough * rough * rough * rough).max(1e-3) - 2.0; + let spec_amt = ndh.powf(shin.clamp(1.0, 4096.0)) * (shin + 2.0) / 8.0; + // A studio environment seen in the mirror direction: dark floor, bright sky, a horizon that + // blurs (and the whole environment averages out) as roughness grows. + let ry = 2.0 * ndv * n[1]; + let w = 0.06 + rough * 0.9; + let t = ((ry + w) / (2.0 * w)).clamp(0.0, 1.0); + let sharp = 0.04 + 0.03 * (ry + 1.0) + (0.2 + 0.55 * ry.max(0.0)) * t * t * (3.0 - 2.0 * t); + let env = sharp + (0.28 - sharp) * (rough * rough); + let fres = (1.0 - ndv).powi(5); + let sky = 0.35 + 0.25 * n[1]; + let mut out = [0.0; 3]; + for k in 0..3 { + let f0 = 0.04 + (base[k] - 0.04) * metal; + let f = f0 + ((1.0 - rough).max(f0) - f0) * fres; + let diffuse = base[k] * (1.0 - metal) * (ndl * 0.85 + sky * 0.5); + out[k] = diffuse * (1.0 - f) + f * env + f0 * spec_amt * ndl * 1.5; + } + out +} + +fn aces(x: f32) -> f32 { + let v = x * 0.6; + ((v * (2.51 * v + 0.03)) / (v * (2.43 * v + 0.59) + 0.14)).clamp(0.0, 1.0) +} + +/// A shaded sphere image (sRGB, transparent outside) from per-pixel preview samples (row-major +/// `size²`, see [`preview::sphere_normals`]); height bumps the normals. +pub fn sphere_image(size: usize, samples: &[Option]) -> ColorImage { + let mut img = ColorImage::filled([size, size], Color32::TRANSPARENT); + let r = (size as f32 * 0.5 - 1.0).max(0.5); + let h = |x: Option, y: Option| { + let (x, y) = (x.filter(|x| *x < size)?, y?); + samples.get(y.checked_mul(size)?.checked_add(x)?).copied().flatten().map(|s| s.height) + }; + for (i, n) in preview::sphere_normals(size).enumerate() { + let (Some(n), Some(Some(s))) = (n, samples.get(i)) else { continue }; + let (x, y) = (i % size, i / size); + let c = s.height; + // Central differences (image y points down). + let dx = h(Some(x + 1), Some(y)).unwrap_or(c) - h(x.checked_sub(1), Some(y)).unwrap_or(c); + let dy = h(Some(x), y.checked_sub(1)).unwrap_or(c) - h(Some(x), Some(y + 1)).unwrap_or(c); + let k = r * 0.5 * 1.5; + let b = [n.x - dx * k, n.y - dy * k, n.z]; + let len = (b[0] * b[0] + b[1] * b[1] + b[2] * b[2]).sqrt().max(1e-6); + let col = shade(b.map(|v| v / len), s.base, s.metallic, s.roughness).map(|v| (linear_to_srgb(aces(v * 1.4)) * 255.0 + 0.5) as u8); + let edge = ((1.0 - (n.x * n.x + n.y * n.y).sqrt()) * r).clamp(0.0, 1.0); + img.pixels[i] = Color32::from_rgba_unmultiplied(col[0], col[1], col[2], (edge * 255.0) as u8); + } + img +} + +impl Thumbs { + /// A larger cached texture of an image resource for the stencil overlay (up to 1024 px). + pub fn stencil(&mut self, ctx: &egui::Context, name: &str, img: &texturecraft_engine::compose::ImageRes) -> TextureHandle { + let key = format!("stencil:{name}"); + if let Some(t) = self.images.get(&key) { + return t.clone(); + } + let scale = (1024.0 / img.width.max(img.height).max(1) as f32).min(1.0); + let (w, h) = (((img.width as f32 * scale) as usize).max(1), ((img.height as f32 * scale) as usize).max(1)); + let mut ci = ColorImage::filled([w, h], Color32::TRANSPARENT); + for y in 0..h { + for x in 0..w { + let s = img.sample((x as f32 + 0.5) / w as f32, (y as f32 + 0.5) / h as f32); + let enc = |v: f32| if img.srgb { (v.clamp(0.0, 1.0) * 255.0) as u8 } else { (linear_to_srgb(v) * 255.0) as u8 }; + ci.pixels[y * w + x] = Color32::from_rgba_unmultiplied(enc(s[0]), enc(s[1]), enc(s[2]), (s[3].clamp(0.0, 1.0) * 255.0) as u8); + } + } + let t = ctx.load_texture(key.clone(), ci, TextureOptions::LINEAR); + self.images.insert(key, t.clone()); + t + } + + /// Cached preview of an image resource (64 px, nearest downsample). + pub fn image(&mut self, ctx: &egui::Context, name: &str, img: &texturecraft_engine::compose::ImageRes) -> TextureHandle { + if let Some(t) = self.images.get(name) { + return t.clone(); + } + let n = 64usize; + let mut ci = ColorImage::filled([n, n], Color32::BLACK); + for y in 0..n { + for x in 0..n { + let s = img.sample((x as f32 + 0.5) / n as f32, (y as f32 + 0.5) / n as f32); + let enc = |v: f32| if img.srgb { (v.clamp(0.0, 1.0) * 255.0) as u8 } else { (linear_to_srgb(v) * 255.0) as u8 }; + ci.pixels[y * n + x] = Color32::from_rgb(enc(s[0]), enc(s[1]), enc(s[2])); + } + } + let t = ctx.load_texture(format!("res_{name}"), ci, TextureOptions::LINEAR); + self.images.insert(name.to_string(), t.clone()); + t + } + + /// A cached shelf thumbnail, rendering it with `render` if this frame's budget allows (None + /// until then; a repaint is requested so it follows shortly). + fn shelf(&mut self, ctx: &egui::Context, key: String, render: impl FnOnce() -> ColorImage) -> Option { + if let Some(t) = self.shelf.get(&key) { + return Some(t.clone()); + } + let frame = ctx.cumulative_pass_nr(); + if self.budget.0 != frame { + self.budget = (frame, 0); + } + if self.budget.1 >= PER_FRAME { + ctx.request_repaint(); + return None; + } + self.budget.1 += 1; + let t = ctx.load_texture(format!("thumb_{key}"), render(), TextureOptions::LINEAR); + self.shelf.insert(key, t.clone()); + Some(t) + } + + /// Sphere thumbnail of built-in material `id`. + pub fn material(&mut self, ctx: &egui::Context, id: &str) -> Option { + self.shelf(ctx, format!("mat:{id}"), || sphere_image(SPHERE_PX, &preview::material(id, SPHERE_PX).unwrap_or_default())) + } + + /// Sphere thumbnail of smart mask `id`: white where the mask applies, over dark gray. + pub fn smart_mask(&mut self, ctx: &egui::Context, id: &str) -> Option { + self.shelf(ctx, format!("mask:{id}"), || { + let px = preview::smart_mask(id, SPHERE_PX).unwrap_or_default(); + let samples: Vec> = + px.iter().map(|m| m.map(|m| Sample { base: [0.04 + 0.76 * m; 3], metallic: 0.0, roughness: 0.6, height: 0.0 })).collect(); + sphere_image(SPHERE_PX, &samples) + }) + } + + /// Grayscale swatch of procedural `k`. + pub fn procedural(&mut self, ctx: &egui::Context, k: ProceduralKind) -> Option { + use texturecraft_engine::compose::pattern::{Coords, procedural}; + use texturecraft_engine::core::{Procedural, Projection}; + use texturecraft_engine::geom::glam::{Vec2, Vec3}; + self.shelf(ctx, format!("proc:{k:?}"), || { + let n = 56usize; + let pr = Procedural { scale: 3.0, ..Procedural::new(k) }; + let mut img = ColorImage::filled([n, n], Color32::BLACK); + for (i, px) in img.pixels.iter_mut().enumerate() { + let uv = Vec2::new(((i % n) as f32 + 0.5) / n as f32, ((i / n) as f32 + 0.5) / n as f32); + let v = procedural(&pr, &Projection::default(), &Coords { uv, pos: Vec3::ZERO, nrm: Vec3::Y }); + *px = Color32::from_gray((v.clamp(0.0, 1.0) * 255.0) as u8); + } + img + }) + } +} + +/// A small shaded sphere drawn with a vertex-colored mesh (layer thumbnails, previews). +pub fn paint_sphere(p: &Painter, c: Pos2, r: f32, base: [f32; 3]) { + let mut mesh = egui::Mesh::default(); + let rings = 10; + let segs = 28; + let color = |dx: f32, dy: f32| { + let d2 = (dx * dx + dy * dy).min(1.0); + let n = [dx, dy, (1.0 - d2).sqrt()]; + let s = shade(n, base, 0.0, 0.5).map(|v| (linear_to_srgb(aces(v * 1.4)) * 255.0) as u8); + Color32::from_rgb(s[0], s[1], s[2]) + }; + mesh.colored_vertex(c, color(0.0, 0.0)); + for i in 1..=rings { + let rr = i as f32 / rings as f32; + for j in 0..segs { + let a = j as f32 / segs as f32 * std::f32::consts::TAU; + let (dx, dy) = (a.cos() * rr, a.sin() * rr); + mesh.colored_vertex(Pos2::new(c.x + dx * r, c.y - dy * r), color(dx, dy)); + } + } + for j in 0..segs { + let (a, b) = (1 + j, 1 + (j + 1) % segs); + mesh.add_triangle(0, a as u32, b as u32); + } + for i in 1..rings { + let r0 = 1 + (i - 1) * segs; + let r1 = 1 + i * segs; + for j in 0..segs { + let (a, b) = (r0 + j, r0 + (j + 1) % segs); + let (c2, d) = (r1 + j, r1 + (j + 1) % segs); + mesh.add_triangle(a as u32, c2 as u32, d as u32); + mesh.add_triangle(a as u32, d as u32, b as u32); + } + } + p.add(egui::Shape::mesh(mesh)); +} + +/// Brush alpha preview drawn as small cells (cheap, no texture). +pub fn paint_alpha(p: &Painter, rect: Rect, a: BrushAlpha, hardness: f32) { + let n = 20; + let cell = rect.width() / n as f32; + for y in 0..n { + for x in 0..n { + let lx = (x as f32 + 0.5) / n as f32 * 2.0 - 1.0; + let ly = (y as f32 + 0.5) / n as f32 * 2.0 - 1.0; + let v = a.sample(lx, ly, hardness, 7); + if v > 0.02 { + let r = Rect::from_min_size(rect.min + egui::vec2(x as f32 * cell, y as f32 * cell), egui::vec2(cell + 0.5, cell + 0.5)); + p.rect_filled(r, 0.0, Color32::from_white_alpha((v * 255.0) as u8)); + } + } + } +} diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs new file mode 100644 index 00000000..10dd7acd --- /dev/null +++ b/crates/ui-egui/src/toolbar.rs @@ -0,0 +1,260 @@ +//! The context tool bar (brush size, flow, stroke opacity, spacing, lazy mouse, symmetry, view +//! toggles), the vertical tool shelf, the right icon rail and the status bar. + +use egui::{RichText, vec2}; +use egui_phosphor::regular as ic; +use serde_json::json; +use texturecraft_engine::Tool; + +use crate::TextureCraftApp; +use crate::docking::Panel; +use crate::i18n::tr; +use crate::keymap::tip; +use crate::state::{Mode, ViewLayout}; +use crate::theme::TOKENS; +use crate::widgets::{bar_slider, icon_button}; + +pub fn tool_icon(t: Tool) -> &'static str { + match t { + Tool::Paint => ic::PAINT_BRUSH, + Tool::Eraser => ic::ERASER, + Tool::Projection => ic::PROJECTOR_SCREEN, + Tool::PolygonFill => ic::POLYGON, + Tool::Smudge => ic::FINGERPRINT, + Tool::Clone => ic::STAMP, + Tool::ColorPicker => ic::EYEDROPPER, + Tool::Path => ic::PATH, + } +} + +pub fn top_bar(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + egui::Panel::top("tool_bar").exact_size(34.0).frame(egui::Frame::NONE.fill(TOKENS.chrome).inner_margin(egui::Margin::symmetric(8, 2))).show(ui, |ui| { + ui.horizontal_centered(|ui| { + ui.spacing_mut().item_spacing.x = 10.0; + if app.ui.mode == Mode::Baking { + ui.label(RichText::new("Bake Mesh Maps").color(TOKENS.text_strong)); + return; + } + let tool = app.session.tool.tool; + ui.label(RichText::new(tool_icon(tool)).size(15.0).color(TOKENS.text_strong)).on_hover_text(tool.label()); + let b = &mut app.session.tool.brush; + match tool { + Tool::Paint | Tool::Eraser | Tool::Projection | Tool::Smudge | Tool::Clone | Tool::Path => { + let mut size = b.size / 0.25 * 100.0; + if bar_slider(ui, "Size", &mut size, 0.05..=100.0, 110.0).changed() { + b.size = (size / 100.0 * 0.25).clamp(0.0005, 0.25); + } + let mut flow = b.flow * 100.0; + if bar_slider(ui, "Flow", &mut flow, 0.0..=100.0, 100.0).changed() { + b.flow = flow / 100.0; + } + let mut op = b.opacity * 100.0; + if bar_slider(ui, "Stroke opacity", &mut op, 0.0..=100.0, 110.0).changed() { + b.opacity = op / 100.0; + } + let mut sp = b.spacing * 100.0; + if bar_slider(ui, "Spacing", &mut sp, 1.0..=200.0, 100.0).changed() { + b.spacing = sp / 100.0; + } + ui.separator(); + let lazy_on = b.lazy > 0.0; + if icon_button(ui, ic::SCRIBBLE, "Lazy mouse", lazy_on, 24.0).clicked() { + b.lazy = if lazy_on { 0.0 } else { 20.0 }; + } + if lazy_on { + let mut d = b.lazy; + if bar_slider(ui, "Distance", &mut d, 1.0..=200.0, 90.0).changed() { + b.lazy = d; + } + } + ui.separator(); + if icon_button(ui, ic::FLIP_HORIZONTAL, "Symmetry (X)", b.symmetry.x, 24.0).clicked() { + b.symmetry.x = !b.symmetry.x; + } + if icon_button(ui, ic::FLIP_VERTICAL, "Symmetry (Y)", b.symmetry.y, 24.0).clicked() { + b.symmetry.y = !b.symmetry.y; + } + if icon_button(ui, ic::CLOUD_RAIN, "Particle brush: particles slide down the surface", b.particles.enabled, 24.0).clicked() { + b.particles.enabled = !b.particles.enabled; + } + if tool == Tool::Smudge { + ui.separator(); + let mut st = app.session.tool.smudge_strength * 100.0; + if bar_slider(ui, "Strength", &mut st, 0.0..=100.0, 100.0).changed() { + app.session.tool.smudge_strength = (st / 100.0).clamp(0.0, 1.0); + } + } + if tool == Tool::Clone && app.session.tool.clone_source.is_none() { + ui.separator(); + ui.label(RichText::new("Hold V and click the mesh to set the clone source").color(TOKENS.text_dim)); + } + if tool == Tool::Path { + ui.separator(); + path_controls(app, ui); + } + } + Tool::PolygonFill => { + use texturecraft_engine::FillMode; + for (m, icon, tip) in [ + (FillMode::Triangle, ic::POLYGON, "Triangle fill"), + (FillMode::UvIsland, ic::SHAPES, "UV island fill"), + (FillMode::Mesh, ic::CUBE, "Mesh fill"), + ] { + if icon_button(ui, icon, tip, app.session.tool.fill_mode == m, 24.0).clicked() { + app.session.tool.fill_mode = m; + } + } + } + Tool::ColorPicker => { + ui.label(RichText::new("Click the mesh to pick its material into the brush").color(TOKENS.text_dim)); + } + } + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if icon_button(ui, ic::CAMERA, "Screenshot of the viewport", false, 24.0).clicked() { + app.toast("Use the control channel or `texturecraft-cli render` for screenshots", false); + } + ui.separator(); + for (l, icon, label, id) in [ + (ViewLayout::Only2D, ic::SQUARE, "2D view only", "ui.layout.2d"), + (ViewLayout::Only3D, ic::CUBE, "3D view only", "ui.layout.3d"), + (ViewLayout::Split, ic::COLUMNS, "3D/2D views", "ui.layout.split"), + ] { + if icon_button(ui, icon, &tip(&app.ui.keymap, label, id), app.ui.layout == l, 24.0).clicked() { + app.ui.layout = l; + } + } + ui.separator(); + let checker = app.session.view == texturecraft_engine::ViewMode::UvChecker; + if icon_button(ui, ic::CHECKERBOARD, &tip(&app.ui.keymap, "UV checker", "ui.uvChecker"), checker, 24.0).clicked() { + let mode = if checker { "material" } else { "uvChecker" }; + app.run("viewport.view", json!({"mode": mode})); + } + }); + }); + }); +} + +/// Path tool options and actions (top bar and properties). +pub fn path_controls(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + let path = &mut app.session.tool.path; + if icon_button(ui, ic::POLYGON, "Closed path", path.closed, 24.0).clicked() { + path.closed = !path.closed; + } + let fill_tip = if path.closed { "Fill the closed path (lasso)" } else { "Fill the path (close it first)" }; + if icon_button(ui, ic::PAINT_BUCKET, fill_tip, path.fill, 24.0).clicked() { + path.fill = !path.fill; + } + let has_points = !path.points.is_empty(); + if ui.add_enabled(has_points, egui::Button::new(format!("{} Apply", ic::CHECK))).on_hover_text("Paint the path with the brush (Enter)").clicked() { + app.run("tool.path", json!({"commit": true})); + } + if ui.add_enabled(has_points, egui::Button::new(format!("{} Cancel", ic::X))).on_hover_text("Remove the path (Esc)").clicked() { + app.run("tool.path", json!({"clear": true})); + } +} + +pub fn tool_shelf(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + egui::Panel::left("tool_shelf") + .resizable(false) + .exact_size(34.0) + .frame(egui::Frame::NONE.fill(TOKENS.chrome).inner_margin(egui::Margin::symmetric(3, 6))) + .show(ui, |ui| { + ui.spacing_mut().item_spacing.y = 3.0; + let painting = app.ui.mode == Mode::Painting; + for t in Tool::ALL { + let selected = painting && app.session.tool.tool == t; + let hint = tip(&app.ui.keymap, t.label(), &format!("tool.{}", t.id())); + if icon_button(ui, tool_icon(t), &hint, selected, 28.0).clicked() { + app.ui.mode = Mode::Painting; + app.run("tool.select", json!({"tool": t.id()})); + } + } + ui.add_space(6.0); + ui.separator(); + ui.add_space(6.0); + let q = &app.session.quick_mask; + for (id, icon, label, on) in [ + ("viewport.quickMask", ic::SELECTION_BACKGROUND, "Quick mask", q.enabled), + ("viewport.quickMask.edit", ic::SELECTION, "Edit quick mask", q.editing), + ("viewport.quickMask.invert", ic::SELECTION_INVERSE, "Invert quick mask", q.inverted), + ] { + if icon_button(ui, icon, &tip(&app.ui.keymap, label, id), on, 28.0).clicked() { + app.run(id, json!({})); + } + } + ui.add_space(6.0); + ui.separator(); + ui.add_space(6.0); + if icon_button(ui, ic::ATOM, &tip(&app.ui.keymap, "Bake mesh maps", "ui.mode.bake"), app.ui.mode == Mode::Baking, 28.0).clicked() { + app.ui.mode = if app.ui.mode == Mode::Baking { Mode::Painting } else { Mode::Baking }; + } + if icon_button(ui, ic::APERTURE, &tip(&app.ui.keymap, "Rendering, path traced", "ui.mode.render"), app.ui.mode == Mode::Rendering, 28.0).clicked() { + app.ui.mode = if app.ui.mode == Mode::Rendering { Mode::Painting } else { Mode::Rendering }; + } + if icon_button(ui, ic::SPHERE, "Add smart material from the shelf", false, 28.0).clicked() { + app.ui.dock.focus(Panel::Assets, ui.ctx().content_rect()); + } + }); +} + +pub fn rail(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + egui::Panel::right("rail").resizable(false).exact_size(32.0).frame(egui::Frame::NONE.fill(TOKENS.chrome).inner_margin(egui::Margin::symmetric(3, 6))).show( + ui, + |ui| { + ui.spacing_mut().item_spacing.y = 4.0; + if icon_button(ui, ic::EXPORT, &tip(&app.ui.keymap, "Export textures", "ui.export"), app.ui.windows.export, 26.0).clicked() { + app.ui.windows.export = !app.ui.windows.export; + } + let screen = ui.ctx().content_rect(); + for (panel, icon, id) in [ + (Panel::TextureSetSettings, ic::STACK, "ui.view.textureSetSettings"), + (Panel::Display, ic::MONITOR, "ui.view.display"), + (Panel::Shader, ic::SLIDERS_HORIZONTAL, "ui.view.shader"), + (Panel::History, ic::CLOCK_COUNTER_CLOCKWISE, "ui.view.history"), + ] { + if icon_button(ui, icon, &tip(&app.ui.keymap, tr(panel.name()), id), app.ui.dock.is_visible(panel), 26.0).clicked() { + app.ui.dock.toggle(panel, screen); + } + } + }, + ); +} + +pub fn status_bar(app: &mut TextureCraftApp, ui: &mut egui::Ui) { + egui::Panel::bottom("status_bar").exact_size(22.0).frame(egui::Frame::NONE.fill(TOKENS.chrome).inner_margin(egui::Margin::symmetric(10, 0))).show( + ui, + |ui| { + ui.horizontal_centered(|ui| { + if let Some(p) = app.bake_progress() { + ui.add(egui::ProgressBar::new(p).desired_width(160.0).desired_height(10.0).text(RichText::new("Baking").size(10.0))); + if ui.small_button("Cancel").clicked() { + app.cancel_bake(); + } + } else if let Some(p) = app.gpu.as_ref().and_then(|g| g.composite_progress(&app.session)) { + ui.add(egui::ProgressBar::new(p).desired_width(160.0).desired_height(10.0).text(RichText::new("Compositing").size(10.0))); + ui.ctx().request_repaint(); + } else if let Some(msg) = app.session.log.last() { + ui.label(RichText::new(msg).size(11.0).color(TOKENS.text_dim)); + } + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + let gpu = app.gpu.as_ref().map(|g| g.adapter.as_str()).unwrap_or("no GPU"); + ui.label(RichText::new(format!("Version: {} ({gpu})", texturecraft_engine::VERSION)).size(11.0).color(TOKENS.text_dim)); + ui.separator(); + let m = app.session.memory(); + let mb = |b: usize| b as f64 / (1024.0 * 1024.0); + let total = mb(m.total()); + let decimals = if total < 10.0 { 1 } else { 0 }; + ui.label(RichText::new(format!("Layer memory: {total:.decimals$} MB")).size(11.0).color(TOKENS.text_dim)).on_hover_text(format!( + "Painted layer pixels {:.1} MB, composited channels {:.1} MB, compositing cache {:.1} MB", + mb(m.pixels), + mb(m.composites), + mb(m.cache) + )); + ui.separator(); + ui.label(RichText::new(format!("UI {:.1} ms", app.ui_ms)).size(11.0).color(TOKENS.text_dim)); + ui.add_space(vec2(0.0, 0.0).x); + }); + }); + }, + ); +} diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs new file mode 100644 index 00000000..1adf5980 --- /dev/null +++ b/crates/ui-egui/src/viewport.rs @@ -0,0 +1,597 @@ +//! The 3D viewport and the 2D UV view: navigation, painting input, brush cursor and the GPU +//! callbacks that render them. + +use std::sync::Mutex; + +use egui::{Color32, PointerButton, Pos2, Rect, RichText, Sense, Stroke, Ui, pos2, vec2}; +use serde_json::json; +use texturecraft_engine::core::{BakedMap, Channel}; +use texturecraft_engine::geom::glam::{Vec2, Vec3}; +use texturecraft_engine::{Tool, ViewMode}; +use texturecraft_render::{Frame, Shade, ViewKind}; + +use crate::TextureCraftApp; +use crate::gpu::{SceneSync, ViewCallback}; +use crate::state::ViewLayout; +use crate::theme::TOKENS; + +pub const VIEW_3D: u64 = 1; +pub const VIEW_2D: u64 = 2; + +pub fn central(app: &mut TextureCraftApp, ui: &mut Ui) { + let aux = match app.session.view { + _ if app.session.quick_mask.editing => Some(crate::gpu::AuxView::QuickMask), + ViewMode::MeshMap(m) => Some(crate::gpu::AuxView::MeshMap(m)), + ViewMode::Mask(id) => Some(crate::gpu::AuxView::Mask(id)), + _ => None, + }; + let mut sync = app.gpu.as_mut().map(|g| g.sync(&mut app.session, aux)); + let full = ui.max_rect(); + let mode = app.ui.mode; + path_keys(app, ui); + let layout = if mode == crate::state::Mode::Painting { app.ui.layout } else { ViewLayout::Only3D }; + match layout { + ViewLayout::Only3D => view_3d(app, ui, full, &mut sync), + ViewLayout::Only2D => view_2d(app, ui, full, &mut sync), + ViewLayout::Split => { + let mid = full.center().x; + let left = Rect::from_min_max(full.min, pos2(mid - 1.0, full.max.y)); + let right = Rect::from_min_max(pos2(mid + 1.0, full.min.y), full.max); + view_3d(app, ui, left, &mut sync); + view_2d(app, ui, right, &mut sync); + ui.painter().line_segment([pos2(mid, full.top()), pos2(mid, full.bottom())], Stroke::new(2.0, TOKENS.separator)); + } + } + if mode == crate::state::Mode::Rendering { + crate::render_mode::show(app, ui, full); + } else if app.render.is_active() { + crate::render_mode::stop(app); + } + // Keep drawing while the 3D view accumulates anti-aliasing samples (it stops on its own). + let accumulating = layout != ViewLayout::Only2D + && app.render_state.as_ref().is_some_and(|rs| rs.renderer.read().callback_resources.get::().is_some_and(|g| g.renderer.accumulating(VIEW_3D))); + if app.session.stroke_active() || accumulating { + ui.ctx().request_repaint(); + } +} + +fn shade(app: &TextureCraftApp) -> Shade { + let (view_mode, channel) = match app.session.view { + _ if app.session.quick_mask.editing => (2, 0), + ViewMode::Material => (0, 0), + ViewMode::Channel(c) => (1, c.index() as u32), + ViewMode::MeshMap(_) | ViewMode::Mask(_) => (2, 0), + ViewMode::UvChecker => (3, 0), + }; + let ts = app.session.ts(); + let hs = app.session.doc.project.texture_sets.get(ts).map(|t| t.height_strength).unwrap_or(1.0); + Shade { + height_strength: hs, + view_mode, + channel, + wireframe: app.ui.uv_wireframe, + wireframe_3d: app.ui.wireframe_3d, + ..Shade::from_display(&app.session.doc.project.display) + } +} + +fn add_callback(app: &TextureCraftApp, ui: &Ui, rect: Rect, frame: Frame, sync: &mut Option) { + let Some(gpu) = &app.gpu else { + ui.painter().text(rect.center(), egui::Align2::CENTER_CENTER, "No GPU renderer available", egui::FontId::proportional(14.0), TOKENS.text_dim); + return; + }; + let cb = ViewCallback { frame, sync: Mutex::new(sync.take()), rect, lost: gpu.lost.clone() }; + ui.painter().add(eframe::egui_wgpu::Callback::new_paint_callback(rect, cb)); +} + +/// The view-mode dropdown shown at the top of each view. +fn view_header(app: &mut TextureCraftApp, ui: &mut Ui, rect: Rect, id: &str) { + let header = Rect::from_min_size(rect.min + vec2(rect.width() * 0.5 - 150.0, 8.0), vec2(300.0, 22.0)); + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(header).layout(egui::Layout::left_to_right(egui::Align::Center))); + egui::ComboBox::from_id_salt(format!("{id}_cam")).width(130.0).selected_text("Default camera").show_ui(&mut child, |ui| { + if ui.selectable_label(true, "Default camera").clicked() { + app.run("viewport.frame", json!({})); + } + }); + let label = app.session.view.label(); + let channels = app.session.doc.project.texture_set(app.session.ts()).map(|t| t.channel_list()).unwrap_or_default(); + egui::ComboBox::from_id_salt(format!("{id}_mode")).width(130.0).selected_text(label).show_ui(&mut child, |ui| { + if ui.selectable_label(app.session.view == ViewMode::Material, "Material").clicked() { + app.run("viewport.view", json!({"mode": "material"})); + } + ui.separator(); + for c in channels { + if ui.selectable_label(app.session.view == ViewMode::Channel(c), c.label()).clicked() { + app.run("viewport.view", json!({"mode": c.id()})); + } + } + ui.separator(); + for m in BakedMap::ALL { + if ui.selectable_label(app.session.view == ViewMode::MeshMap(m), format!("Mesh map: {}", m.label())).clicked() { + app.run("viewport.view", json!({"mode": format!("map:{}", m.id())})); + } + } + ui.separator(); + if ui.selectable_label(app.session.view == ViewMode::UvChecker, "UV checker").clicked() { + app.run("viewport.view", json!({"mode": "uvChecker"})); + } + }); +} + +fn axis_gizmo(ui: &Ui, rect: Rect, app: &TextureCraftApp, uv: bool) { + let o = pos2(rect.left() + 28.0, rect.bottom() - 28.0); + let p = ui.painter(); + if uv { + p.line_segment([o, o + vec2(16.0, 0.0)], Stroke::new(1.5, Color32::from_rgb(0xd8, 0x4a, 0x3a))); + p.line_segment([o, o - vec2(0.0, 16.0)], Stroke::new(1.5, Color32::from_rgb(0x5c, 0xc0, 0x4a))); + p.text(o + vec2(20.0, 0.0), egui::Align2::LEFT_CENTER, "U", egui::FontId::proportional(9.0), TOKENS.text_dim); + p.text(o - vec2(0.0, 22.0), egui::Align2::CENTER_CENTER, "V", egui::FontId::proportional(9.0), TOKENS.text_dim); + return; + } + let view = app.session.camera.view(); + for (axis, color, name) in [ + (Vec3::X, Color32::from_rgb(0xd8, 0x4a, 0x3a), "X"), + (Vec3::Y, Color32::from_rgb(0x5c, 0xc0, 0x4a), "Y"), + (Vec3::Z, Color32::from_rgb(0x4a, 0x80, 0xe0), "Z"), + ] { + let d = view.transform_vector3(axis); + let end = o + vec2(d.x, -d.y) * 16.0; + p.line_segment([o, end], Stroke::new(1.5, color)); + p.text(end + vec2(d.x, -d.y) * 6.0, egui::Align2::CENTER_CENTER, name, egui::FontId::proportional(9.0), TOKENS.text_dim); + } +} + +fn view_3d(app: &mut TextureCraftApp, ui: &mut Ui, rect: Rect, sync: &mut Option) { + let resp = ui.interact(rect, ui.id().with("view3d"), Sense::click_and_drag()); + app.viewport_rect = rect; + let size = rect.size(); + app.session.viewport = Vec2::new(size.x.max(16.0), size.y.max(16.0)); + let (alt, shift) = ui.input(|i| (i.modifiers.alt, i.modifiers.shift)); + let local = |p: egui::Pos2| Vec2::new(p.x - rect.left(), p.y - rect.top()); + let navigating = alt || ui.input(|i| i.pointer.middle_down() || i.pointer.secondary_down()); + + // Navigation. + let delta = ui.input(|i| i.pointer.delta()); + if resp.dragged_by(PointerButton::Middle) || (alt && resp.dragged_by(PointerButton::Middle)) { + app.session.camera.pan(delta.x / size.y, delta.y / size.y); + } else if alt && resp.dragged_by(PointerButton::Primary) { + app.session.camera.orbit(delta.x * 0.008, delta.y * 0.008); + } else if resp.dragged_by(PointerButton::Secondary) { + if alt { + app.session.camera.zoom(-delta.y * 0.01); + } else { + app.session.camera.orbit(delta.x * 0.008, delta.y * 0.008); + } + } + if resp.hovered() { + let scroll = ui.input(|i| i.smooth_scroll_delta.y); + if scroll != 0.0 { + if shift { + let b = &mut app.session.tool.brush; + b.size = (b.size * (1.0 + scroll * 0.002)).clamp(0.0005, 0.25); + } else { + app.session.camera.zoom(scroll * 0.0025); + } + } + } + + // Stencil: S + left drag rotates, S + right drag scales, S + middle drag moves. + let s_held = ui.input(|i| i.key_down(egui::Key::S)) && !ui.ctx().egui_wants_keyboard_input(); + if s_held + && let Some(st) = app.session.tool.stencil.as_mut() + { + if resp.dragged_by(PointerButton::Primary) { + st.rotation = (st.rotation + delta.x * 0.4).rem_euclid(360.0); + } else if resp.dragged_by(PointerButton::Secondary) { + st.scale = (st.scale * (1.0 + delta.x * 0.005)).clamp(0.05, 10.0); + } else if resp.dragged_by(PointerButton::Middle) { + st.center[0] += delta.x / size.x * 2.0; + st.center[1] -= delta.y / size.y * 2.0; + } + } + // Clone source: V + click. + let v_held = clone_source_key(app, ui); + if v_held + && !alt + && (resp.clicked_by(PointerButton::Primary) || resp.drag_started_by(PointerButton::Primary)) + && let Some(p) = resp.interact_pointer_pos() + { + let (q, vp) = (local(p), app.session.viewport); + app.run("tool.cloneSource", json!({"x": q.x, "y": q.y, "viewport": [vp.x, vp.y]})); + } + // Painting. + let painting = app.ui.mode == crate::state::Mode::Painting && !alt && !s_held && !v_held; + let path_tool = app.session.tool.tool == Tool::Path; + let vp = app.session.viewport; + let show = |app: &TextureCraftApp, p: Vec3| project(app, rect, p); + if painting && path_tool { + path_input(app, ui, &resp, false, |app, p| app.session.pick(local(p), vp).map(|h| h.pos), show); + } else if painting { + // Pen pressure arrives as touch force (Windows Ink, Wayland, web); mice report none. + // shortcut: egui 0.36 / winit 0.30 report no pen tilt, so tilt can't drive the brush angle yet. + let pressure = ui.input(|i| { + i.raw.events.iter().rev().find_map(|e| match e { + egui::Event::Touch { force: Some(f), .. } if f.is_finite() => Some(f.clamp(0.0, 1.0)), + _ => None, + }) + }); + let pressure = pressure.unwrap_or(1.0); + if resp.drag_started_by(PointerButton::Primary) || resp.clicked_by(PointerButton::Primary) { + // Shift+click paints a straight line from where the last stroke ended. + let line_from = if shift { app.last_paint_point } else { None }; + if let Some(p) = resp.interact_pointer_pos() { + match app.session.begin_stroke(line_from.unwrap_or(local(p)), app.session.viewport, pressure) { + Ok(_) => { + if line_from.is_some() { + app.session.continue_stroke(local(p), pressure); + } + app.last_paint_point = Some(local(p)); + } + Err(e) => app.toast(e.to_string(), true), + } + } + if resp.clicked_by(PointerButton::Primary) + && let Err(e) = app.session.end_stroke() + { + app.toast(e.to_string(), true); + } + } else if resp.dragged_by(PointerButton::Primary) + && app.session.stroke_active() + && let Some(p) = resp.interact_pointer_pos() + { + app.session.continue_stroke(local(p), pressure); + app.last_paint_point = Some(local(p)); + } + if resp.drag_stopped_by(PointerButton::Primary) + && let Err(e) = app.session.end_stroke() + { + app.toast(e.to_string(), true); + } + } + + let frame = Frame { + view_id: crate::viewport::VIEW_3D, + size: [(size.x * ui.ctx().pixels_per_point()).max(1.0) as u32, (size.y * ui.ctx().pixels_per_point()).max(1.0) as u32], + kind: ViewKind::Scene, + camera: app.session.camera, + shade: shade(app), + visible: app.session.doc.project.texture_sets.iter().map(|t| t.visible).collect(), + }; + add_callback(app, ui, rect, frame, sync); + + // Brush cursor. + if app.ui.mode == crate::state::Mode::Painting + && !navigating + && resp.hovered() + && matches!(app.session.tool.tool, Tool::Paint | Tool::Eraser | Tool::Projection | Tool::Smudge | Tool::Clone | Tool::Path) + && let Some(hp) = resp.hover_pos() + && let Some(hit) = app.session.pick(local(hp), app.session.viewport) + { + ui.ctx().set_cursor_icon(egui::CursorIcon::None); + brush_cursor(app, ui, rect, hit.pos, hit.nrm); + if app.session.tool.tool == Tool::Clone + && let Some(src) = app.session.clone_source_point(Some(hit.uv)) + { + clone_marker(app, ui, rect, src); + } + // Shift: preview the straight line Shift+click paints from the last stroke. + if shift + && !path_tool + && let Some(from) = app.last_paint_point + { + rubber_band(ui, rect, pos2(rect.left() + from.x, rect.top() + from.y), hp); + } + } + if app.ui.mode == crate::state::Mode::Painting && path_tool { + path_overlay(app, ui, rect, &resp, false, show); + } + stencil_overlay(app, ui, rect); + if app.session.quick_mask.editing { + ui.painter_at(rect).text( + rect.left_top() + vec2(12.0, 40.0), + egui::Align2::LEFT_TOP, + "Editing quick mask: paint where painting is allowed (U to finish)", + egui::FontId::proportional(12.0), + Color32::from_rgb(0xe8, 0x6a, 0x6a), + ); + } + view_header(app, ui, rect, "v3d"); + axis_gizmo(ui, rect, app, false); +} + +/// Draw the projection stencil over the 3D view. +fn stencil_overlay(app: &mut TextureCraftApp, ui: &Ui, rect: Rect) { + if app.session.tool.tool != Tool::Projection { + return; + } + let Some(st) = app.session.tool.stencil.clone() else { return }; + let Some(img) = app.session.images.get(&st.image).cloned() else { return }; + let tex = app.thumbs.stencil(ui.ctx(), &st.image, &img); + let aspect = rect.width() / rect.height().max(1.0); + let (center, half, rot) = st.placement(img.width as f32 / img.height.max(1) as f32, aspect); + let to_screen = |nx: f32, ny: f32| pos2(rect.left() + (nx * 0.5 + 0.5) * rect.width(), rect.top() + (0.5 - ny * 0.5) * rect.height()); + let (sn, cs) = rot.sin_cos(); + let corner = |lx: f32, ly: f32| { + let (x, y) = (lx * half[0], ly * half[1]); + to_screen(center[0] + x * cs - y * sn, center[1] + x * sn + y * cs) + }; + let tint = Color32::from_white_alpha((st.opacity * 255.0) as u8); + let mut mesh = egui::Mesh::with_texture(tex.id()); + for (lx, ly, u, v) in [(-1.0, 1.0, 0.0, 0.0), (1.0, 1.0, 1.0, 0.0), (1.0, -1.0, 1.0, 1.0), (-1.0, -1.0, 0.0, 1.0)] { + mesh.vertices.push(egui::epaint::Vertex { pos: corner(lx, ly), uv: pos2(u, v), color: tint }); + } + mesh.indices.extend_from_slice(&[0, 1, 2, 0, 2, 3]); + let p = ui.painter_at(rect); + p.add(egui::Shape::mesh(mesh)); + let outline = vec![corner(-1.0, 1.0), corner(1.0, 1.0), corner(1.0, -1.0), corner(-1.0, -1.0), corner(-1.0, 1.0)]; + p.add(egui::Shape::dashed_line(&outline, Stroke::new(1.0, Color32::from_white_alpha(120)), 5.0, 4.0)); +} + +/// A world point on screen in the 3D view `rect` (None behind the camera). +fn project(app: &TextureCraftApp, rect: Rect, p: Vec3) -> Option { + let n = app.session.camera.project(p, rect.width() / rect.height().max(1.0))?; + Some(pos2(rect.left() + (n.x * 0.5 + 0.5) * rect.width(), rect.top() + (0.5 - n.y * 0.5) * rect.height())) +} + +/// Control point grab radius (points). +const HANDLE_GRAB: f32 = 8.0; + +/// Path tool keys: Enter applies the path, Backspace removes its last point (Esc, handled with +/// the global shortcuts, cancels it). +fn path_keys(app: &mut TextureCraftApp, ui: &Ui) { + if app.ui.mode != crate::state::Mode::Painting + || app.session.tool.tool != Tool::Path + || app.session.tool.path.points.is_empty() + || ui.ctx().egui_wants_keyboard_input() + { + return; + } + let (enter, back) = ui.input_mut(|i| (i.consume_key(egui::Modifiers::NONE, egui::Key::Enter), i.consume_key(egui::Modifiers::NONE, egui::Key::Backspace))); + if enter { + app.run("tool.path", json!({"commit": true})); + } + if back { + app.session.tool.path.points.pop(); + } +} + +/// Path tool input in a view (`uv`: the 2D view). Pressing on a control point drags it, +/// elsewhere adds a point (and drags it); clicking the first point of an open path closes it. +/// `place` maps a pointer position to a path point (None off the surface), `show` a path point +/// to the screen. +fn path_input( + app: &mut TextureCraftApp, + ui: &Ui, + resp: &egui::Response, + uv: bool, + place: impl Fn(&TextureCraftApp, Pos2) -> Option, + show: impl Fn(&TextureCraftApp, Vec3) -> Option, +) { + let drag_id = resp.id.with("path_drag"); + let clicked = resp.clicked_by(PointerButton::Primary); + if (clicked || resp.drag_started_by(PointerButton::Primary)) + && let Some(at) = ui.input(|i| i.pointer.press_origin()).or(resp.interact_pointer_pos()) + { + let path = &app.session.tool.path; + let near = if path.uv == uv { path.points.iter().position(|p| show(app, *p).is_some_and(|s| s.distance(at) < HANDLE_GRAB)) } else { None }; + match near { + Some(0) if clicked && !path.closed && path.points.len() >= 3 => app.session.tool.path.closed = true, + Some(i) => ui.data_mut(|d| { + d.insert_temp(drag_id, i); + }), + None => match place(app, at) { + Some(p) => { + app.session.tool.path.push(p, uv); + let last = app.session.tool.path.points.len().saturating_sub(1); + ui.data_mut(|d| { + d.insert_temp(drag_id, last); + }); + } + None => app.toast("Place path points on the mesh", false), + }, + } + } + if resp.dragged_by(PointerButton::Primary) + && let Some(i) = ui.data(|d| d.get_temp::(drag_id)) + && let Some(p) = resp.interact_pointer_pos().and_then(|pos| place(app, pos)) + && let Some(q) = app.session.tool.path.points.get_mut(i) + { + *q = p; + } + if !resp.is_pointer_button_down_on() { + ui.data_mut(|d| d.remove::(drag_id)); + } +} + +/// The path being edited: its curve, control points (the first one in the accent color) and, +/// while open, a dashed preview of the next segment. +fn path_overlay(app: &TextureCraftApp, ui: &Ui, rect: Rect, resp: &egui::Response, uv: bool, show: impl Fn(&TextureCraftApp, Vec3) -> Option) { + let p = ui.painter_at(rect); + let path = &app.session.tool.path; + let hint = "Path: click adds a point, drag moves it, Enter applies, Esc cancels"; + p.text(rect.left_bottom() + vec2(56.0, -12.0), egui::Align2::LEFT_BOTTOM, hint, egui::FontId::proportional(12.0), TOKENS.text_dim); + if path.uv != uv { + return; + } + let handles: Vec = path.points.iter().filter_map(|q| show(app, *q)).collect(); + let pts: Vec = handles.iter().map(|h| Vec2::new(h.x, h.y)).collect(); + let curve: Vec = texturecraft_engine::paint::spline(&pts, path.closed, 3.0).into_iter().map(|v| pos2(v.x, v.y)).collect(); + let color = if path.closed && path.fill { TOKENS.accent } else { Color32::from_white_alpha(230) }; + p.add(egui::Shape::line(curve.clone(), Stroke::new(3.0, Color32::from_black_alpha(140)))); + p.add(egui::Shape::line(curve, Stroke::new(1.4, color))); + let hover = resp.hover_pos(); + if !path.closed + && let (Some(last), Some(to)) = (handles.last(), hover) + { + rubber_band(ui, rect, *last, to); + } + for (i, h) in handles.iter().enumerate() { + let r = if hover.is_some_and(|m| m.distance(*h) < HANDLE_GRAB) { 5.5 } else { 4.0 }; + p.circle(*h, r, if i == 0 { TOKENS.accent } else { Color32::WHITE }, Stroke::new(1.5, Color32::from_black_alpha(180))); + } +} + +/// Dashed preview of a straight segment. +fn rubber_band(ui: &Ui, rect: Rect, from: Pos2, to: Pos2) { + let p = ui.painter_at(rect); + p.add(egui::Shape::dashed_line(&[from, to], Stroke::new(2.5, Color32::from_black_alpha(120)), 6.0, 4.0)); + p.add(egui::Shape::dashed_line(&[from, to], Stroke::new(1.0, Color32::from_white_alpha(200)), 6.0, 4.0)); +} + +/// V held with the Clone tool in painting mode: clicks set the clone source. +fn clone_source_key(app: &TextureCraftApp, ui: &Ui) -> bool { + app.ui.mode == crate::state::Mode::Painting + && app.session.tool.tool == Tool::Clone + && ui.input(|i| i.key_down(egui::Key::V)) + && !ui.ctx().egui_wants_keyboard_input() +} + +/// Crosshair where the Clone tool reads from. +fn clone_marker(app: &TextureCraftApp, ui: &Ui, rect: Rect, pos: Vec3) { + let Some(c) = project(app, rect, pos) else { return }; + let p = ui.painter_at(rect); + for (w, color) in [(3.0, Color32::from_black_alpha(140)), (1.2, TOKENS.accent)] { + p.circle_stroke(c, 7.0, Stroke::new(w, color)); + p.line_segment([c - vec2(11.0, 0.0), c + vec2(11.0, 0.0)], Stroke::new(w, color)); + p.line_segment([c - vec2(0.0, 11.0), c + vec2(0.0, 11.0)], Stroke::new(w, color)); + } +} + +fn brush_cursor(app: &TextureCraftApp, ui: &Ui, rect: Rect, pos: Vec3, nrm: Vec3) { + let (lo, hi) = app.session.mesh.bounds(); + let r = app.session.tool.brush.size * (hi - lo).length(); + let t = nrm.any_orthonormal_vector(); + let b = nrm.cross(t); + let to_screen = |p: Vec3| project(app, rect, p); + let mut pts = Vec::with_capacity(49); + for k in 0..=48 { + let a = k as f32 / 48.0 * std::f32::consts::TAU; + if let Some(s) = to_screen(pos + (t * a.cos() + b * a.sin()) * r) { + pts.push(s); + } + } + let p = ui.painter_at(rect); + p.add(egui::Shape::line(pts.clone(), Stroke::new(2.5, Color32::from_black_alpha(140)))); + p.add(egui::Shape::line(pts, Stroke::new(1.2, Color32::from_white_alpha(230)))); + let h = app.session.tool.brush.hardness; + if h > 0.05 { + let mut inner = Vec::new(); + for k in 0..=48 { + let a = k as f32 / 48.0 * std::f32::consts::TAU; + if let Some(s) = to_screen(pos + (t * a.cos() + b * a.sin()) * r * h) { + inner.push(s); + } + } + p.add(egui::Shape::dashed_line(&inner, Stroke::new(1.0, Color32::from_white_alpha(120)), 3.0, 3.0)); + } + if let Some(c) = to_screen(pos) { + p.circle_filled(c, 1.5, Color32::WHITE); + } +} + +fn view_2d(app: &mut TextureCraftApp, ui: &mut Ui, rect: Rect, sync: &mut Option) { + let resp = ui.interact(rect, ui.id().with("view2d"), Sense::click_and_drag()); + let size = rect.size(); + let alt = ui.input(|i| i.modifiers.alt); + let delta = ui.input(|i| i.pointer.delta()); + if resp.dragged_by(PointerButton::Middle) || (alt && resp.dragged_by(PointerButton::Primary)) { + app.ui.uv_pan[0] += delta.x / size.x * 2.0; + app.ui.uv_pan[1] -= delta.y / size.y * 2.0; + } + if resp.hovered() { + let scroll = ui.input(|i| i.smooth_scroll_delta.y); + if scroll != 0.0 { + let old = app.ui.uv_zoom; + let new = (old * (1.0 + scroll * 0.002)).clamp(0.1, 40.0); + // Zoom about the cursor. + if let Some(hp) = resp.hover_pos() { + let c = [(hp.x - rect.left()) / size.x * 2.0 - 1.0, 1.0 - (hp.y - rect.top()) / size.y * 2.0]; + for k in 0..2 { + app.ui.uv_pan[k] = c[k] - (c[k] - app.ui.uv_pan[k]) * new / old; + } + } + app.ui.uv_zoom = new; + } + } + let aspect = size.x / size.y.max(1.0); + let z = app.ui.uv_zoom * 0.92; + let (sx, sy) = if aspect >= 1.0 { (z / aspect, z) } else { (z, z * aspect) }; + let pan = app.ui.uv_pan; + let to_uv = |p: egui::Pos2| { + let xc = (p.x - rect.left()) / size.x * 2.0 - 1.0; + let yc = 1.0 - (p.y - rect.top()) / size.y * 2.0; + Vec2::new(((xc - pan[0]) / sx + 1.0) * 0.5, (1.0 - (yc - pan[1]) / sy) * 0.5) + }; + let to = |u: f32, v: f32| { + let x = (u * 2.0 - 1.0) * sx + pan[0]; + let y = (1.0 - v * 2.0) * sy + pan[1]; + pos2(rect.left() + (x * 0.5 + 0.5) * size.x, rect.top() + (0.5 - y * 0.5) * size.y) + }; + let show = |_: &TextureCraftApp, p: Vec3| Some(to(p.x, p.y)); + let path_tool = app.session.tool.tool == Tool::Path; + // Clone source (V + click) and painting in UV space. + let v_held = clone_source_key(app, ui); + if v_held + && (resp.clicked_by(PointerButton::Primary) || resp.drag_started_by(PointerButton::Primary)) + && let Some(p) = resp.interact_pointer_pos() + { + let uv = to_uv(p); + app.run("tool.cloneSource", json!({"uv": [uv.x, uv.y]})); + } + let painting = app.ui.mode == crate::state::Mode::Painting && !alt && !v_held; + if painting && path_tool { + path_input(app, ui, &resp, true, |_, p| Some(to_uv(p).extend(0.0)), show); + } else if painting { + if resp.drag_started_by(PointerButton::Primary) || resp.clicked_by(PointerButton::Primary) { + if let Some(p) = resp.interact_pointer_pos() + && let Err(e) = app.session.begin_stroke_uv(to_uv(p), 1.0) + { + app.toast(e.to_string(), true); + } + if resp.clicked_by(PointerButton::Primary) + && let Err(e) = app.session.end_stroke() + { + app.toast(e.to_string(), true); + } + } else if resp.dragged_by(PointerButton::Primary) + && app.session.stroke_active() + && let Some(p) = resp.interact_pointer_pos() + { + app.session.continue_stroke_uv(to_uv(p), 1.0); + } + if resp.drag_stopped_by(PointerButton::Primary) + && let Err(e) = app.session.end_stroke() + { + app.toast(e.to_string(), true); + } + } + if resp.double_clicked() && !(painting && path_tool) { + app.ui.uv_zoom = 1.0; + app.ui.uv_pan = [0.0, 0.0]; + } + let ts = app.session.ts(); + let frame = Frame { + view_id: VIEW_2D, + size: [(size.x * ui.ctx().pixels_per_point()).max(1.0) as u32, (size.y * ui.ctx().pixels_per_point()).max(1.0) as u32], + kind: ViewKind::Uv { ts, zoom: app.ui.uv_zoom, pan: app.ui.uv_pan }, + camera: app.session.camera, + shade: shade(app), + visible: app.session.doc.project.texture_sets.iter().map(|t| t.visible).collect(), + }; + add_callback(app, ui, rect, frame, sync); + // The 0..1 tile outline and the path being edited. + ui.painter_at(rect).rect_stroke( + Rect::from_two_pos(to(0.0, 0.0), to(1.0, 1.0)), + 0.0, + Stroke::new(1.0, Color32::from_white_alpha(40)), + egui::StrokeKind::Outside, + ); + if app.ui.mode == crate::state::Mode::Painting && path_tool { + path_overlay(app, ui, rect, &resp, true, show); + } + view_header(app, ui, rect, "v2d"); + axis_gizmo(ui, rect, app, true); + let name = app.session.doc.project.texture_sets.get(ts).map(|t| t.name.clone()).unwrap_or_default(); + ui.painter().text(rect.right_bottom() + vec2(-10.0, -10.0), egui::Align2::RIGHT_BOTTOM, name, egui::FontId::proportional(11.0), TOKENS.text_dim); + let _ = (RichText::new(""), Channel::BaseColor); +} diff --git a/crates/ui-egui/src/web_files.rs b/crates/ui-egui/src/web_files.rs new file mode 100644 index 00000000..274d59a3 --- /dev/null +++ b/crates/ui-egui/src/web_files.rs @@ -0,0 +1,314 @@ +//! File I/O that works without paths. In the browser, File › Open is the browser's file picker and +//! Save / Export are downloads; on the desktop, the same calls open native dialogs and run the +//! path-based engine commands (`file.open`, `file.saveAs`, `file.exportTextures`). +//! +//! A browser pick is asynchronous: its bytes wait in an inbox until [`poll`] (called every frame) +//! turns them into the session. + +use std::sync::{Mutex, PoisonError}; + +use texturecraft_engine::Session; +use texturecraft_engine::core::PROJECT_EXT; +use texturecraft_engine::formats::ExportedFile; +use texturecraft_engine::formats::export::sanitize_file_stem; +use texturecraft_engine::formats::mesh_import::MESH_EXTENSIONS; + +use crate::TextureCraftApp; + +/// What File › Open accepts: projects and meshes. +pub const OPEN_EXTS: &[&str] = &[PROJECT_EXT, "glb", "gltf", "fbx", "dae", "obj", "ply", "stl"]; + +/// Images File › Import resources accepts. +pub const IMAGE_EXTS: &[&str] = &["png", "jpg", "jpeg", "tga", "tif", "tiff", "bmp", "webp", "exr", "hdr"]; + +/// Equirect HDR images Display settings › Import HDR accepts. +pub const ENV_EXTS: &[&str] = &["hdr", "exr"]; + +/// Texture size of a project made from an opened mesh (smaller on the single-threaded web). +const MESH_RESOLUTION: u32 = if cfg!(target_arch = "wasm32") { 1024 } else { 2048 }; + +/// What a picked file is for. +#[derive(Clone, Copy, PartialEq)] +#[cfg_attr(not(target_arch = "wasm32"), allow(dead_code))] +enum Pick { + /// File > Open / a dropped file: a project, a mesh or an image resource. + Open, + /// Display settings > Import HDR. + Environment, + /// Bake mode: a high-definition mesh. + HighPoly, + /// Bake mode: the cage mesh. + Cage, +} + +/// Files picked in the browser, waiting for the next frame: (file name, bytes, purpose). +static INBOX: Mutex, Pick)>> = Mutex::new(Vec::new()); + +/// Load files that arrived since the last frame. Call once per frame. +pub fn poll(app: &mut TextureCraftApp) { + let picked = std::mem::take(&mut *INBOX.lock().unwrap_or_else(PoisonError::into_inner)); + for (name, bytes, pick) in picked { + let done = match pick { + Pick::Open => { + load(app, &name, &bytes); + continue; + } + Pick::Environment => app.session.import_resource_bytes(&name, bytes).map(|res| use_environment(app, &res)), + Pick::HighPoly => app.session.add_high_poly_bytes(&name, bytes).map(|n| app.toast(format!("High poly: {n}"), false)), + Pick::Cage => app.session.set_cage_bytes(&name, bytes).map(|n| app.toast(format!("Cage: {n}"), false)), + }; + if let Err(e) = done { + app.toast(format!("Couldn't import {name}: {e}"), true); + } + } +} + +/// Bake mode: add high-definition meshes (or load the cage) with the native file dialog; in +/// the browser they arrive on a later frame. +#[cfg(not(target_arch = "wasm32"))] +pub fn import_bake_mesh(app: &mut TextureCraftApp, _ctx: &egui::Context, cage: bool) { + let dialog = rfd::FileDialog::new().add_filter("Meshes", &MESH_EXTENSIONS); + let paths = if cage { dialog.pick_file().into_iter().collect() } else { dialog.pick_files().unwrap_or_default() }; + for p in paths { + let cmd = if cage { "bake.cage.set" } else { "bake.highPoly.add" }; + app.run(cmd, serde_json::json!({ "path": p.display().to_string() })); + } +} + +/// Display settings › Import HDR: pick an equirect `.hdr`/`.exr`, import it as a resource and +/// light the scene with it (in the browser the file arrives on a later frame). +#[cfg(not(target_arch = "wasm32"))] +pub fn import_environment(app: &mut TextureCraftApp, _ctx: &egui::Context) { + let Some(p) = rfd::FileDialog::new().add_filter("HDR environments", ENV_EXTS).pick_file() else { return }; + if let Some(r) = app.run("resource.import", serde_json::json!({ "path": p.display().to_string() })) + && let Some(name) = r.get("name").and_then(|n| n.as_str()) + { + use_environment(app, name); + } +} + +/// Make image resource `name` the environment. +fn use_environment(app: &mut TextureCraftApp, name: &str) { + let env = format!("{}{name}", texturecraft_engine::core::project::ENV_RESOURCE_PREFIX); + if app.run("display.set", serde_json::json!({ "environment": env })).is_some() { + app.toast(format!("Environment: {name}"), false); + } +} + +/// Import an image as a project resource, or replace the session with a `.tcraft` project or a +/// mesh file's bytes (errors become toasts). +pub fn load(app: &mut TextureCraftApp, name: &str, bytes: &[u8]) { + let path = std::path::Path::new(name); + let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("").to_ascii_lowercase(); + if IMAGE_EXTS.contains(&ext.as_str()) { + match app.session.import_resource_bytes(name, bytes.to_vec()) { + Ok(res) => { + app.ui.dock.focus(crate::docking::Panel::Assets, egui::Rect::ZERO); + app.toast(format!("Imported {res}"), false); + } + Err(e) => app.toast(format!("Couldn't import {name}: {e}"), true), + } + return; + } + let stem = path.file_stem().and_then(|s| s.to_str()).unwrap_or("Untitled"); + let next = if ext == PROJECT_EXT { Session::from_project_bytes(bytes) } else { Session::from_mesh_bytes(name, bytes, MESH_RESOLUTION, stem) }; + match next { + Ok(mut next) => { + next.viewport = app.session.viewport; + app.session = next; + app.toast(format!("Opened {name}"), false); + } + Err(e) => app.toast(format!("Couldn't open {name}: {e}"), true), + } +} + +/// A file dropped on the window: images import as resources, anything else opens. +pub fn dropped(app: &mut TextureCraftApp, ctx: &egui::Context, file: &egui::DroppedFileHandle) { + #[cfg(not(target_arch = "wasm32"))] + { + let _ = ctx; + let path = file.path(); + let ext = path.extension().and_then(|e| e.to_str()).unwrap_or("").to_ascii_lowercase(); + let path = path.display().to_string(); + if IMAGE_EXTS.contains(&ext.as_str()) { + if let Some(r) = app.run("resource.import", serde_json::json!({ "path": path })) { + let name = r.get("name").and_then(|n| n.as_str()).unwrap_or_default().to_string(); + app.ui.dock.focus(crate::docking::Panel::Assets, egui::Rect::ZERO); + app.toast(format!("Imported {name}"), false); + } + } else { + crate::windows::open_path(app, &path); + } + } + #[cfg(target_arch = "wasm32")] + { + let _ = app; + let (file, ctx) = (file.clone(), ctx.clone()); + wasm_bindgen_futures::spawn_local(async move { + let name = file.path().display().to_string(); + match file.bytes_async().await { + Ok(bytes) => INBOX.lock().unwrap_or_else(PoisonError::into_inner).push((name, bytes, Pick::Open)), + Err(e) => log::warn!("couldn't read dropped file {name}: {e}"), + } + ctx.request_repaint(); + }); + } +} + +/// The project's download / suggested file name. +pub fn project_file_name(app: &TextureCraftApp) -> String { + format!("{}.{PROJECT_EXT}", sanitize_file_stem(&app.session.doc.project.name)) +} + +/// Pack exported textures into one zip archive. +#[cfg_attr(not(target_arch = "wasm32"), allow(dead_code))] +fn zip_files(files: &[ExportedFile]) -> Result, String> { + use std::io::Write as _; + let mut zip = zip::ZipWriter::new(std::io::Cursor::new(Vec::new())); + let opts = zip::write::SimpleFileOptions::default().compression_method(zip::CompressionMethod::Deflated).large_file(true); + for f in files { + zip.start_file(f.name.as_str(), opts).map_err(|e| e.to_string())?; + zip.write_all(&f.bytes).map_err(|e| e.to_string())?; + } + Ok(zip.finish().map_err(|e| e.to_string())?.into_inner()) +} + +#[cfg(target_arch = "wasm32")] +pub use web::{download, export_mesh, export_textures, import_bake_mesh, import_environment, import_images, open, save_project}; + +#[cfg(target_arch = "wasm32")] +mod web { + use super::*; + use serde_json::Value; + use wasm_bindgen::JsCast as _; + + /// File › Open: the browser's file picker; the file loads on a later frame (see [`poll`]). + pub fn open(ctx: &egui::Context) { + pick(ctx, "Projects and meshes", OPEN_EXTS, false, Pick::Open); + } + + /// File › Import resources: pick images; they import on a later frame. + pub fn import_images(ctx: &egui::Context) { + pick(ctx, "Images", IMAGE_EXTS, true, Pick::Open); + } + + /// Display settings › Import HDR: pick an equirect image; it becomes the environment on a + /// later frame. + pub fn import_environment(_app: &mut TextureCraftApp, ctx: &egui::Context) { + pick(ctx, "HDR environments", ENV_EXTS, false, Pick::Environment); + } + + /// Bake mode: pick high-definition meshes (or the cage); they load on a later frame. + pub fn import_bake_mesh(_app: &mut TextureCraftApp, ctx: &egui::Context, cage: bool) { + pick(ctx, "Meshes", &MESH_EXTENSIONS, !cage, if cage { Pick::Cage } else { Pick::HighPoly }); + } + + fn pick(ctx: &egui::Context, filter: &'static str, exts: &'static [&'static str], multiple: bool, kind: Pick) { + let ctx = ctx.clone(); + wasm_bindgen_futures::spawn_local(async move { + let dialog = rfd::AsyncFileDialog::new().add_filter(filter, exts); + let files = if multiple { dialog.pick_files().await.unwrap_or_default() } else { dialog.pick_file().await.into_iter().collect() }; + for file in files { + let bytes = file.read().await; + INBOX.lock().unwrap_or_else(PoisonError::into_inner).push((file.file_name(), bytes, kind)); + } + ctx.request_repaint(); + }); + } + + /// File › Save: download the project as `.tcraft`. + pub fn save_project(app: &mut TextureCraftApp) { + let name = project_file_name(app); + match app.session.to_project_bytes().map_err(|e| e.to_string()).and_then(|b| download(&name, &b)) { + Ok(()) => { + app.session.modified = false; + app.session.log.push(format!("Saved {name}")); + app.toast(format!("Downloaded {name}"), false); + } + Err(e) => app.toast(format!("Couldn't save {name}: {e}"), true), + } + } + + /// File › Export Mesh: download the working mesh as GLB with its textures embedded (the + /// browser has no save dialog to pick a format; the desktop also offers OBJ). + pub fn export_mesh(app: &mut TextureCraftApp) { + let name = format!("{}.glb", sanitize_file_stem(&app.session.doc.project.name)); + match app.session.mesh_glb_bytes().map_err(|e| e.to_string()).and_then(|b| download(&name, &b)) { + Ok(()) => app.toast(format!("Downloaded {name}"), false), + Err(e) => app.toast(format!("Couldn't export the mesh: {e}"), true), + } + } + + /// Export texture sets `sets` with `file.exportTextures` params (minus `dir` and `ts`): one + /// file downloads as is, several as `_textures.zip`. + pub fn export_textures(app: &mut TextureCraftApp, params: &Value, sets: &[usize]) { + match export(app, params, sets) { + Ok(name) => app.toast(format!("Downloaded {name}"), false), + Err(e) => app.toast(format!("Couldn't export textures: {e}"), true), + } + } + + fn export(app: &mut TextureCraftApp, params: &Value, sets: &[usize]) -> Result { + let opts = texturecraft_engine::file_cmds::export_options(params, "file.exportTextures").map_err(|e| e.to_string())?; + let files = app.session.export_files(sets, &opts).map_err(|e| e.to_string())?; + app.session.log.extend(files.iter().flat_map(|f| f.warnings.iter().cloned())); + let name = match files.as_slice() { + [] => return Err("the preset produced no files".into()), + [f] => { + download(&f.name, &f.bytes)?; + f.name.clone() + } + _ => { + let name = format!("{}_textures.zip", sanitize_file_stem(&app.session.doc.project.name)); + download(&name, &zip_files(&files)?)?; + name + } + }; + app.session.log.push(format!("Exported {} textures ({name})", files.len())); + Ok(name) + } + + /// Start a browser download of `bytes` named `name` (Blob + a temporary ``). + pub fn download(name: &str, bytes: &[u8]) -> Result<(), String> { + let js = |e: wasm_bindgen::JsValue| format!("{e:?}"); + let window = web_sys::window().ok_or("no window")?; + let document = window.document().ok_or("no document")?; + let parts = js_sys::Array::of1(&js_sys::Uint8Array::from(bytes)); + let opts = web_sys::BlobPropertyBag::new(); + opts.set_type(if name.ends_with(".zip") { "application/zip" } else { "application/octet-stream" }); + let blob = web_sys::Blob::new_with_u8_array_sequence_and_options(&parts, &opts).map_err(js)?; + let url = web_sys::Url::create_object_url_with_blob(&blob).map_err(js)?; + let a: web_sys::HtmlAnchorElement = document.create_element("a").map_err(js)?.dyn_into().map_err(|_| "not an anchor")?; + a.set_href(&url); + a.set_download(name); + a.style().set_property("display", "none").map_err(js)?; + document.body().ok_or("no body")?.append_child(&a).map_err(js)?; + a.click(); + a.remove(); + // Revoke once the click has been dispatched; the download keeps its own reference. + let revoke = wasm_bindgen::closure::Closure::once_into_js(move || { + web_sys::Url::revoke_object_url(&url).ok(); + }); + window.set_timeout_with_callback_and_timeout_and_arguments_0(revoke.unchecked_ref(), 10_000).map_err(js)?; + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn zip_round_trips_every_export_file() { + let file = |name: &str, bytes: &[u8]| ExportedFile { name: name.into(), bytes: bytes.to_vec(), width: 1, height: 1, warnings: Vec::new() }; + let files = [file("a_BaseColor.png", b"one"), file("a_Normal.png", &[7u8; 4096])]; + let bytes = zip_files(&files).unwrap(); + let mut zip = zip::ZipArchive::new(std::io::Cursor::new(bytes)).unwrap(); + assert_eq!(zip.len(), 2); + for f in &files { + let mut out = Vec::new(); + std::io::Read::read_to_end(&mut zip.by_name(&f.name).unwrap(), &mut out).unwrap(); + assert_eq!(out, f.bytes); + } + } +} diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs new file mode 100644 index 00000000..42574f1d --- /dev/null +++ b/crates/ui-egui/src/widgets.rs @@ -0,0 +1,172 @@ +//! Compact widgets matching the app's look: labelled slim sliders, icon buttons, section +//! headers, channel toggle chips and color swatches. + +use egui::{Color32, Response, RichText, Sense, Stroke, Ui, vec2}; + +use crate::theme::TOKENS; + +/// A labelled slider in two rows: "Label ........ value" over a slim track with a round knob. +/// Returns the response of the track (`.changed()` when dragged, `.drag_stopped()` at the end). +pub fn slider(ui: &mut Ui, label: &str, value: &mut f32, range: std::ops::RangeInclusive, decimals: usize) -> Response { + let (lo, hi) = (*range.start(), *range.end()); + let w = ui.available_width(); + ui.horizontal(|ui| { + ui.label(RichText::new(label).color(TOKENS.text)); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + let mut text = format!("{:.*}", decimals, value); + let r = ui.add(egui::TextEdit::singleline(&mut text).desired_width(44.0).horizontal_align(egui::Align::RIGHT).frame(egui::Frame::NONE)); + if r.lost_focus() + && let Ok(v) = text.trim().parse::() + && v.is_finite() + { + *value = v.clamp(lo, hi); + } + }); + }); + let (rect, mut resp) = ui.allocate_exact_size(vec2(w, 14.0), Sense::click_and_drag()); + if (resp.dragged() || resp.clicked()) + && let Some(p) = resp.interact_pointer_pos() + { + let t = ((p.x - rect.left() - 5.0) / (rect.width() - 10.0).max(1.0)).clamp(0.0, 1.0); + let v = lo + (hi - lo) * t; + if (v - *value).abs() > f32::EPSILON { + *value = v; + resp.mark_changed(); + } + } + let p = ui.painter(); + let y = rect.center().y; + let (x0, x1) = (rect.left() + 5.0, rect.right() - 5.0); + let t = if hi > lo { ((*value - lo) / (hi - lo)).clamp(0.0, 1.0) } else { 0.0 }; + let xk = x0 + (x1 - x0) * t; + p.line_segment([egui::pos2(x0, y), egui::pos2(x1, y)], Stroke::new(2.0, Color32::from_rgb(0x4a, 0x4a, 0x4a))); + p.line_segment([egui::pos2(x0, y), egui::pos2(xk, y)], Stroke::new(2.0, Color32::from_rgb(0xb8, 0xb8, 0xb8))); + let knob = if resp.hovered() || resp.dragged() { TOKENS.text_strong } else { Color32::from_rgb(0xc8, 0xc8, 0xc8) }; + p.circle(egui::pos2(xk, y), 4.5, Color32::from_rgb(0x26, 0x26, 0x26), Stroke::new(1.5, knob)); + resp +} + +/// A small inline slider for the top tool bar: "Label value" above a short track. +pub fn bar_slider(ui: &mut Ui, label: &str, value: &mut f32, range: std::ops::RangeInclusive, width: f32) -> Response { + let (lo, hi) = (*range.start(), *range.end()); + let (rect, mut resp) = ui.allocate_exact_size(vec2(width, 28.0), Sense::click_and_drag()); + if (resp.dragged() || resp.clicked()) + && let Some(p) = resp.interact_pointer_pos() + { + let t = ((p.x - rect.left() - 4.0) / (rect.width() - 8.0).max(1.0)).clamp(0.0, 1.0); + let v = lo + (hi - lo) * t; + if (v - *value).abs() > f32::EPSILON { + *value = v; + resp.mark_changed(); + } + } + let p = ui.painter(); + let font = egui::FontId::proportional(11.0); + p.text(rect.left_top() + vec2(2.0, 2.0), egui::Align2::LEFT_TOP, label, font.clone(), TOKENS.text); + p.text(rect.right_top() + vec2(-2.0, 2.0), egui::Align2::RIGHT_TOP, format!("{:.0}", value), font, TOKENS.text_strong); + let y = rect.bottom() - 7.0; + let (x0, x1) = (rect.left() + 4.0, rect.right() - 4.0); + let t = if hi > lo { ((*value - lo) / (hi - lo)).clamp(0.0, 1.0) } else { 0.0 }; + let xk = x0 + (x1 - x0) * t; + p.line_segment([egui::pos2(x0, y), egui::pos2(x1, y)], Stroke::new(1.5, Color32::from_rgb(0x4a, 0x4a, 0x4a))); + p.line_segment([egui::pos2(x0, y), egui::pos2(xk, y)], Stroke::new(1.5, Color32::from_rgb(0xc0, 0xc0, 0xc0))); + p.circle(egui::pos2(xk, y), 4.0, Color32::from_rgb(0x22, 0x22, 0x22), Stroke::new(1.5, Color32::from_rgb(0xd0, 0xd0, 0xd0))); + resp +} + +/// One line of `text` cut with "…" to fit `max_width`, for list rows that shrink with their panel. +pub fn elided(painter: &egui::Painter, text: impl Into, size: f32, color: Color32, max_width: f32) -> std::sync::Arc { + let mut job = egui::text::LayoutJob::simple_singleline(text.into(), egui::FontId::proportional(size), color); + job.wrap = egui::text::TextWrapping::truncate_at_width(max_width.max(0.0)); + painter.layout_job(job) +} + +/// A square icon button (Phosphor glyph). `selected` draws the accent background. +pub fn icon_button(ui: &mut Ui, icon: &str, tooltip: &str, selected: bool, size: f32) -> Response { + let (rect, resp) = ui.allocate_exact_size(vec2(size, size), Sense::click()); + let p = ui.painter(); + let bg = if selected { + Color32::from_rgb(0x3d, 0x3d, 0x3d) + } else if resp.hovered() { + Color32::from_rgb(0x33, 0x33, 0x33) + } else { + Color32::TRANSPARENT + }; + p.rect_filled(rect, 3.0, bg); + if selected { + p.rect_stroke(rect, 3.0, Stroke::new(1.0, Color32::from_rgb(0x55, 0x55, 0x55)), egui::StrokeKind::Inside); + } + let color = if selected || resp.hovered() { TOKENS.text_strong } else { TOKENS.text }; + p.text(rect.center(), egui::Align2::CENTER_CENTER, icon, egui::FontId::proportional(size * 0.62), color); + resp.on_hover_text(tooltip) +} + +/// A collapsible section header with a chevron ("> Size"). +pub fn section(ui: &mut Ui, id: &str, title: &str, default_open: bool, body: impl FnOnce(&mut Ui)) { + let id = ui.make_persistent_id(id); + let mut state = egui::collapsing_header::CollapsingState::load_with_default_open(ui.ctx(), id, default_open); + let open = state.is_open(); + let resp = ui + .horizontal(|ui| { + let chev = if open { egui_phosphor::regular::CARET_DOWN } else { egui_phosphor::regular::CARET_RIGHT }; + ui.label(RichText::new(chev).size(10.0).color(TOKENS.text_dim)); + ui.label(RichText::new(title).strong().color(TOKENS.text_strong)); + }) + .response + .interact(Sense::click()); + if resp.clicked() { + state.toggle(ui); + } + state.show_body_unindented(ui, |ui| { + ui.indent(id.with("in"), body); + }); +} + +/// A Painter-style channel chip ("color", "metal", "rough"…): toggled = accent outline. +pub fn chip(ui: &mut Ui, text: &str, on: bool) -> Response { + let galley = ui.painter().layout_no_wrap(text.into(), egui::FontId::proportional(11.0), TOKENS.text); + let size = vec2(galley.size().x + 14.0, 20.0); + let (rect, resp) = ui.allocate_exact_size(size, Sense::click()); + let p = ui.painter(); + p.rect_filled(rect, 3.0, if on { Color32::from_rgb(0x3a, 0x3a, 0x3a) } else { Color32::from_rgb(0x2a, 0x2a, 0x2a) }); + p.rect_stroke( + rect, + 3.0, + Stroke::new(1.0, if on { Color32::from_rgb(0x9a, 0x9a, 0x9a) } else { Color32::from_rgb(0x3a, 0x3a, 0x3a) }), + egui::StrokeKind::Inside, + ); + p.text(rect.center(), egui::Align2::CENTER_CENTER, text, egui::FontId::proportional(11.0), if on { TOKENS.text_strong } else { TOKENS.text_dim }); + resp +} + +/// A color swatch button for a linear RGB value; opens a picker on click. Returns true when +/// the color changed. +pub fn color_swatch(ui: &mut Ui, id: &str, linear: &mut [f32; 3], width: f32) -> bool { + let srgb = linear.map(|v| (texturecraft_engine::texel::linear_to_srgb(v) * 255.0 + 0.5) as u8); + let mut c = Color32::from_rgb(srgb[0], srgb[1], srgb[2]); + let (rect, resp) = ui.allocate_exact_size(vec2(width, 18.0), Sense::click()); + ui.painter().rect_filled(rect, 2.0, c); + ui.painter().rect_stroke(rect, 2.0, Stroke::new(1.0, Color32::from_rgb(0x55, 0x55, 0x55)), egui::StrokeKind::Inside); + let popup = ui.make_persistent_id(id); + if resp.clicked() { + egui::Popup::toggle_id(ui.ctx(), popup); + } + let mut changed = false; + egui::Popup::from_response(&resp).id(popup).close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside).show(|ui| { + if egui::color_picker::color_picker_color32(ui, &mut c, egui::color_picker::Alpha::Opaque) { + let lin = [c.r(), c.g(), c.b()].map(|v| texturecraft_engine::texel::srgb_to_linear(v as f32 / 255.0)); + *linear = lin; + changed = true; + } + }); + changed +} + +/// Panel title row with optional trailing content. +pub fn panel_header(ui: &mut Ui, title: &str, trailing: impl FnOnce(&mut Ui)) { + ui.horizontal(|ui| { + ui.set_min_height(22.0); + ui.label(crate::theme::caption(title)); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), trailing); + }); +} diff --git a/crates/ui-egui/src/windows.rs b/crates/ui-egui/src/windows.rs new file mode 100644 index 00000000..438ec4e7 --- /dev/null +++ b/crates/ui-egui/src/windows.rs @@ -0,0 +1,874 @@ +//! Floating windows, the dockable panel bodies (display, shader, history, log) and the bake mode +//! panels. + +use egui::{Color32, RichText, Ui, vec2}; +use egui_phosphor::regular as ic; +use serde_json::json; +use texturecraft_engine::bake_cmds; +use texturecraft_engine::core::project::ENV_RESOURCE_PREFIX; +use texturecraft_engine::core::{BakeMatch, BakeSettings, BakedMap, ToneMapping}; +use texturecraft_engine::geom::primitives::BUILTINS; +use texturecraft_render::ibl::ENVIRONMENTS; + +use crate::TextureCraftApp; +use crate::state::Mode; +use crate::theme::{TOKENS, caption}; +use crate::widgets::{icon_button, slider}; + +pub fn show(app: &mut TextureCraftApp, ctx: &egui::Context) { + new_project(app, ctx); + about(app, ctx); + settings(app, ctx); + crate::keymap::window(app, ctx); + crate::windows::export(app, ctx); + if app.ui.mode == Mode::Baking { + bake_bar(app, ctx); + } +} + +pub(crate) fn window<'a>(title: &'a str, open: &'a mut bool) -> egui::Window<'a> { + egui::Window::new(RichText::new(title.to_uppercase()).size(10.5).strong()).open(open).resizable(true).collapsible(false).default_width(300.0) +} + +/// The Display Settings panel body (a dock tab). +pub(crate) fn display(app: &mut TextureCraftApp, ui: &mut Ui) { + let ctx = ui.ctx().clone(); + let mut d = app.session.doc.project.display.clone(); + let before = d.clone(); + ui.label(caption("Environment settings")); + let mut hdrs: Vec<&String> = app.session.images.iter().filter(|(_, i)| !i.srgb).map(|(k, _)| k).collect(); + hdrs.sort(); + let mut import_hdr = false; + let shown = d.environment_resource().unwrap_or(&d.environment).to_string(); + egui::ComboBox::from_label("Environment map").selected_text(shown).show_ui(ui, |ui| { + for e in ENVIRONMENTS { + ui.selectable_value(&mut d.environment, e.to_string(), e); + } + ui.separator(); + for name in hdrs { + ui.selectable_value(&mut d.environment, format!("{ENV_RESOURCE_PREFIX}{name}"), name.as_str()); + } + import_hdr = ui + .selectable_label(false, format!("{} Import HDR...", ic::FILE_ARROW_UP)) + .on_hover_text("Use an equirectangular .hdr or .exr image as the environment") + .clicked(); + }); + slider(ui, "Environment opacity", &mut d.env_opacity, 0.0..=1.0, 2); + slider(ui, "Environment exposure (EV)", &mut d.env_exposure, -5.0..=5.0, 2); + slider(ui, "Environment blur", &mut d.env_blur, 0.0..=1.0, 2); + slider(ui, "Environment rotation", &mut d.env_rotation, 0.0..=360.0, 0); + ui.checkbox(&mut d.shadows, "Key light (shadow-casting light, direct only)"); + ui.add_space(6.0); + ui.label(caption("Camera settings")); + slider(ui, "Field of view (deg)", &mut d.fov, 5.0..=120.0, 0); + ui.horizontal(|ui| { + ui.label("Tone mapping"); + ui.selectable_value(&mut d.tone_mapping, ToneMapping::Linear, "Linear"); + ui.selectable_value(&mut d.tone_mapping, ToneMapping::AcesFilmic, "ACES filmic"); + }); + ui.add_space(6.0); + ui.label(caption("Viewer settings")); + slider(ui, "Ambient occlusion intensity", &mut d.ao_intensity, 0.0..=1.0, 2); + ui.checkbox(&mut app.ui.wireframe_3d, "Show wireframe in the 3D view"); + ui.checkbox(&mut app.ui.uv_wireframe, "Show UV wireframe in the 2D view"); + ui.checkbox(&mut d.taa, "Temporal anti-aliasing (refines the 3D view while it is still)"); + if d != before { + app.session.camera.fov = d.fov; + app.session.doc.project.display = d; + } + if import_hdr { + crate::web_files::import_environment(app, &ctx); + } +} + +/// The Shader Settings panel body (a dock tab). +pub(crate) fn shader(app: &mut TextureCraftApp, ui: &mut Ui) { + let mut d = app.session.doc.project.display.clone(); + let before = d.clone(); + let model = |sg: bool| if sg { "TextureCraft PBR - Specular Glossiness" } else { "TextureCraft PBR - Metallic Roughness" }; + egui::ComboBox::from_id_salt("shader_model").width(260.0).selected_text(model(d.spec_gloss)).show_ui(ui, |ui| { + for sg in [false, true] { + ui.selectable_value(&mut d.spec_gloss, sg, model(sg)); + } + }); + let channels = if d.spec_gloss { + "Base color is the diffuse color, Specular the F0 color and Glossiness 1 - roughness (add these channels in the texture set settings)." + } else { + "Base color, Metallic, Roughness and Specular level." + }; + ui.label(RichText::new(format!("GGX specular with height-correlated Smith visibility, Lambert diffuse, split-sum image-based lighting with spherical-harmonics irradiance and horizon fading. {channels}")).color(TOKENS.text_dim)); + ui.add_space(6.0); + ui.checkbox(&mut d.parallax, "Parallax occlusion (height channel)") + .on_hover_text("Offsets the textures by the height channel, at the height to normal strength"); + if d != before { + app.session.doc.project.display = d; + } + let ts = app.session.ts(); + if let Some(set) = app.session.doc.project.texture_sets.get(ts) { + let mut hs = set.height_strength; + if slider(ui, "Height to normal strength", &mut hs, 0.0..=10.0, 2).drag_stopped() { + app.run("textureSet.settings", json!({"ts": ts, "heightStrength": hs})); + } + } + let mut ao = app.session.doc.project.display.ao_intensity; + if slider(ui, "AO intensity", &mut ao, 0.0..=1.0, 2).changed() { + app.session.doc.project.display.ao_intensity = ao; + } +} + +/// The History panel body (a dock tab). +pub(crate) fn history(app: &mut TextureCraftApp, ui: &mut Ui) { + let labels = app.session.history_labels(); + egui::ScrollArea::vertical().max_height(320.0).show(ui, |ui| { + ui.label(RichText::new("Project opened").color(TOKENS.text_dim)); + for l in &labels { + ui.label(l); + } + if let Some(r) = app.session.redo_label() { + ui.label(RichText::new(format!("{r} (undone)")).color(TOKENS.text_dim)); + } + }); + ui.horizontal(|ui| { + if ui.add_enabled(app.session.can_undo(), egui::Button::new(format!("{} Undo", ic::ARROW_COUNTER_CLOCKWISE))).clicked() { + app.run("edit.undo", json!({})); + } + if ui.add_enabled(app.session.can_redo(), egui::Button::new(format!("{} Redo", ic::ARROW_CLOCKWISE))).clicked() { + app.run("edit.redo", json!({})); + } + }); +} + +fn new_project(app: &mut TextureCraftApp, ctx: &egui::Context) { + if !app.ui.windows.new_project { + return; + } + let mut open = true; + let mut create = false; + egui::Window::new("New project").open(&mut open).collapsible(false).resizable(false).anchor(egui::Align2::CENTER_CENTER, vec2(0.0, 0.0)).show(ctx, |ui| { + ui.label(caption("Basic settings")); + egui::Grid::new("np").num_columns(2).spacing(vec2(12.0, 8.0)).show(ui, |ui| { + ui.label("3D mesh"); + ui.horizontal(|ui| { + let label = app.ui.new_project.file.clone().unwrap_or_else(|| { + BUILTINS.iter().find(|(id, _)| *id == app.ui.new_project.mesh).map(|(_, l)| format!("Built-in: {l}")).unwrap_or_default() + }); + egui::ComboBox::from_id_salt("np_mesh").width(200.0).selected_text(label).show_ui(ui, |ui| { + for (id, l) in BUILTINS { + if ui.selectable_label(app.ui.new_project.mesh == id && app.ui.new_project.file.is_none(), format!("Built-in: {l}")).clicked() { + app.ui.new_project.mesh = id.to_string(); + app.ui.new_project.file = None; + } + } + }); + if file_dialogs_available() && ui.button("Select...").clicked() + && let Some(p) = pick_mesh_file() { + app.ui.new_project.file = Some(p); + } + }); + ui.end_row(); + ui.label("Project template"); + ui.label("PBR - Metallic Roughness (TextureCraft)"); + ui.end_row(); + ui.label("Document resolution"); + egui::ComboBox::from_id_salt("np_res").selected_text(format!("{0} x {0}", app.ui.new_project.resolution)).show_ui(ui, |ui| { + for r in [512u32, 1024, 2048, 4096] { + ui.selectable_value(&mut app.ui.new_project.resolution, r, format!("{r} x {r}")); + } + }); + ui.end_row(); + ui.label("Name"); + ui.text_edit_singleline(&mut app.ui.new_project.name); + ui.end_row(); + }); + ui.add_space(8.0); + ui.horizontal(|ui| { + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if ui.add(egui::Button::new(RichText::new("Create").color(Color32::WHITE)).fill(TOKENS.accent)).clicked() { + create = true; + } + if ui.button("Cancel").clicked() { + app.ui.windows.new_project = false; + } + }); + }); + }); + if create { + let np = app.ui.new_project.clone(); + let r = match &np.file { + Some(path) => file_new_from_mesh(app, path, np.resolution, &np.name), + None => app.run("project.new", json!({"mesh": np.mesh, "resolution": np.resolution, "name": np.name})).map(|_| ()), + }; + if r.is_some() { + app.ui.windows.new_project = false; + app.ui.mode = Mode::Painting; + } + } + if !open { + app.ui.windows.new_project = false; + } +} + +fn settings(app: &mut TextureCraftApp, ctx: &egui::Context) { + let mut open = app.ui.windows.settings; + window("Settings", &mut open).default_width(360.0).show(ctx, |ui| { + let p = &mut app.ui.prefs; + ui.label(caption("Interface")); + slider(ui, "Interface scale", &mut p.ui_scale, 0.75..=2.0, 2); + ui.add_space(6.0); + #[cfg(not(target_arch = "wasm32"))] + { + ui.label(caption("Project")); + ui.horizontal(|ui| { + ui.label("Autosave every"); + ui.add(egui::DragValue::new(&mut p.autosave_minutes).range(0..=120).suffix(" min")); + }); + ui.label(RichText::new(format!("0 turns autosave off. Copies go to {}", crate::user_dir("autosave").display())).size(10.5).color(TOKENS.text_dim)); + ui.add_space(6.0); + ui.label(caption("Folders")); + for (label, dir) in [("Smart materials", crate::library_dir()), ("UI layouts", crate::user_dir("layouts"))] { + ui.horizontal(|ui| { + ui.label(label); + ui.label(RichText::new(dir.display().to_string()).size(10.5).color(TOKENS.text_dim)); + }); + } + ui.add_space(6.0); + } + ui.label(caption("Keyboard")); + if ui.button("Edit keyboard shortcuts...").on_hover_text("Rebind any menu item, tool or command").clicked() { + app.ui.windows.shortcuts = true; + } + }); + app.ui.windows.settings = open; +} + +fn about(app: &mut TextureCraftApp, ctx: &egui::Context) { + let mut open = app.ui.windows.about; + egui::Window::new("About TextureCraft").open(&mut open).collapsible(false).resizable(false).anchor(egui::Align2::CENTER_CENTER, vec2(0.0, 0.0)).show( + ctx, + |ui| { + ui.vertical_centered(|ui| { + ui.label(RichText::new("TextureCraft").size(22.0).strong().color(TOKENS.text_strong)); + ui.label(format!("Version {}", texturecraft_engine::VERSION)); + ui.add_space(6.0); + ui.label("3D texture painting: layers, masks, smart materials, mesh map baking and export."); + ui.label("Free and open source (MIT OR Apache-2.0), written in Rust."); + ui.add_space(6.0); + ui.hyperlink_to("Join the ArtCraft community on Discord", "https://discord.gg/artcraft"); + ui.hyperlink_to("getartcraft.com/apps/texturecraft", "https://getartcraft.com/apps/texturecraft"); + ui.add_space(6.0); + ui.label(RichText::new("Made by the ArtCraft team and community.").color(TOKENS.text_dim)); + }); + }, + ); + app.ui.windows.about = open; +} + +/// The Log panel body (a dock tab). +pub(crate) fn log(app: &mut TextureCraftApp, ui: &mut Ui) { + egui::ScrollArea::vertical().max_height(300.0).stick_to_bottom(true).show(ui, |ui| { + for l in &app.session.log { + ui.label(RichText::new(l).monospace()); + } + }); +} + +// --------------------------------------------------------------------------------------------- +// Bake mode (Painter's "Bake Mesh Maps": texture sets, bakers, common and per-map parameters) + +pub fn bake_left(app: &mut TextureCraftApp, ui: &mut Ui) { + egui::Panel::left("bake_left") + .resizable(true) + .default_size(320.0) + .frame(egui::Frame::NONE.fill(TOKENS.panel).inner_margin(egui::Margin::symmetric(8, 6))) + .show(ui, |ui| bake_body(app, ui)); +} + +/// The bake settings, scrollable (the Assets dock slot shows them in bake mode). +pub fn bake_body(app: &mut TextureCraftApp, ui: &mut Ui) { + egui::ScrollArea::vertical().id_salt("bake_body").auto_shrink([false; 2]).show(ui, |ui| bake_panel(app, ui)); +} + +fn bake_panel(app: &mut TextureCraftApp, ui: &mut Ui) { + ui.label(caption("Texture set list")); + for i in 0..app.session.set_count() { + let Some(t) = app.session.doc.project.texture_sets.get(i) else { continue }; + let (name, res, mut on) = (t.name.clone(), t.bake.resolution, t.bake.enabled); + ui.horizontal(|ui| { + if ui.checkbox(&mut on, "").on_hover_text("Bake with \"Bake selected textures\"").changed() { + app.run("bake.settings", json!({ "ts": i, "enabled": on })); + } + if ui.selectable_label(i == app.session.ts(), format!("{name} ({res}x{res})")).clicked() { + app.run("textureSet.select", json!({ "ts": i })); + } + }); + } + ui.separator(); + let ts = app.session.ts(); + let Some(before) = app.session.doc.project.texture_sets.get(ts).map(|t| t.bake.clone()) else { return }; + let mut b = before.clone(); + // The selected baker entry: None = common parameters. + let sel_id = egui::Id::new("bake_selected_baker"); + let mut selected: Option = ui.data(|d| d.get_temp(sel_id)).flatten(); + ui.label(caption("Mesh map bakers")); + if ui.selectable_label(selected.is_none(), format!("{} Common parameters", ic::GEAR)).clicked() { + selected = None; + } + for m in BakedMap::ALL { + ui.horizontal(|ui| { + let mut on = b.maps.contains(&m); + if ui.checkbox(&mut on, "").changed() { + if on { + b.maps.insert(m); + } else { + b.maps.remove(&m); + } + } + if ui.selectable_label(selected == Some(m), m.label()).clicked() { + selected = Some(m); + } + }); + } + ui.data_mut(|d| d.insert_temp(sel_id, selected)); + ui.separator(); + match selected { + None => common_params(app, ui, &mut b), + Some(m) => map_params(ui, m, &mut b), + } + if b.direction == [0.0; 3] { + b.direction = before.direction; + } + if b != before { + let mut p = bake_cmds::settings_params(&b); + p["ts"] = ts.into(); + app.run("bake.settings", p); + } +} + +fn hint(ui: &mut Ui, text: &str) { + ui.label(RichText::new(text).color(TOKENS.text_dim).size(11.0)); +} + +fn common_params(app: &mut TextureCraftApp, ui: &mut Ui, b: &mut BakeSettings) { + ui.label(caption("Common parameters")); + egui::ComboBox::from_label("Output size").selected_text(format!("{}", b.resolution)).show_ui(ui, |ui| { + for r in [256u32, 512, 1024, 2048, 4096, 8192] { + ui.selectable_value(&mut b.resolution, r, format!("{r}")); + } + }); + egui::ComboBox::from_label("Antialiasing") + .selected_text(match b.antialiasing { + 2 => "Subsampling 2x2", + 4 => "Subsampling 4x4", + 8 => "Subsampling 8x8", + _ => "None", + }) + .show_ui(ui, |ui| { + for (v, l) in [(1u32, "None"), (2, "Subsampling 2x2"), (4, "Subsampling 4x4"), (8, "Subsampling 8x8")] { + ui.selectable_value(&mut b.antialiasing, v, l); + } + }); + let mut dil = b.dilation as f32; + if slider(ui, "Dilation width", &mut dil, 0.0..=64.0, 0).changed() { + b.dilation = dil as u32; + } + + ui.add_space(6.0); + ui.label(RichText::new("High definition meshes").strong().color(TOKENS.text_strong)); + let ctx = ui.ctx().clone(); + let highs: Vec<(String, usize)> = app.session.bake_meshes.high.iter().map(|h| (h.name.clone(), h.mesh.triangle_count())).collect(); + let mut remove = None; + for (i, (name, tris)) in highs.iter().enumerate() { + ui.horizontal(|ui| { + ui.label(format!("{name} ({tris} triangles)")); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if icon_button(ui, ic::TRASH, "Remove", false, 18.0).clicked() { + remove = Some(i); + } + }); + }); + } + if highs.is_empty() { + hint(ui, "None: the low poly is its own high poly."); + } + if let Some(i) = remove { + app.run("bake.highPoly.remove", json!({ "index": i })); + } + if ui.button(format!("{} Add high definition meshes", ic::PLUS)).clicked() { + crate::web_files::import_bake_mesh(app, &ctx, false); + } + ui.checkbox(&mut b.use_low_as_high, "Use low poly mesh as high poly mesh"); + egui::ComboBox::from_label("Match") + .selected_text(match b.matching { + BakeMatch::Always => "Always", + BakeMatch::ByMeshName => "By mesh name", + }) + .show_ui(ui, |ui| { + ui.selectable_value(&mut b.matching, BakeMatch::Always, "Always"); + ui.selectable_value(&mut b.matching, BakeMatch::ByMeshName, "By mesh name"); + }); + if b.matching == BakeMatch::ByMeshName { + for (label, suffix) in [("Low poly mesh suffix", &mut b.low_suffix), ("High poly mesh suffix", &mut b.high_suffix)] { + ui.horizontal(|ui| { + ui.label(label); + ui.add(egui::TextEdit::singleline(suffix).desired_width(80.0)); + }); + } + } + slider(ui, "Max frontal distance", &mut b.max_frontal, 0.0..=0.2, 3); + slider(ui, "Max rear distance", &mut b.max_rear, 0.0..=0.2, 3); + hint(ui, "Relative to the bounding box diagonal."); + ui.checkbox(&mut b.average_normals, "Average normals"); + + ui.add_space(6.0); + let cage = app.session.bake_meshes.cage.as_ref().map(|c| c.name.clone()); + ui.horizontal(|ui| { + ui.label(format!("Cage: {}", cage.as_deref().unwrap_or("none"))); + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if cage.is_some() && icon_button(ui, ic::TRASH, "Remove the cage", false, 18.0).clicked() { + app.run("bake.cage.clear", json!({})); + } + if icon_button(ui, ic::FOLDER_OPEN, "Load a cage (the low poly, inflated)", false, 18.0).clicked() { + crate::web_files::import_bake_mesh(app, &ctx, true); + } + }); + }); + + ui.add_space(6.0); + if ui.button("Apply to all texture sets").on_hover_text("Copy these bake settings to every texture set").clicked() { + let mut p = bake_cmds::settings_params(b); + p["ts"] = "all".into(); + if let Some(o) = p.as_object_mut() { + o.remove("enabled"); + } + app.run("bake.settings", p); + } +} + +fn map_params(ui: &mut Ui, m: BakedMap, b: &mut BakeSettings) { + ui.label(caption(m.label())); + match m { + BakedMap::AmbientOcclusion | BakedMap::Thickness | BakedMap::BentNormal => { + let mut rays = b.rays as f32; + if slider(ui, "Secondary rays", &mut rays, 4.0..=256.0, 0).changed() { + b.rays = rays as u32; + } + slider(ui, "Max occluder distance", &mut b.max_distance, 0.01..=1.0, 2); + hint(ui, "Shared by ambient occlusion, thickness and bent normals."); + } + BakedMap::Curvature => { + slider(ui, "Strength", &mut b.curvature_strength, 0.1..=4.0, 2); + ui.checkbox(&mut b.curvature_from_normal, "From normal map"); + hint(ui, "From normal map: curvature of the baked normal map's detail instead of the mesh."); + } + BakedMap::WorldDirection => { + for (axis, v) in ["X", "Y", "Z"].iter().zip(b.direction.iter_mut()) { + slider(ui, &format!("Direction {axis}"), v, -1.0..=1.0, 2); + } + hint(ui, "White where the surface faces the direction, black where it faces away."); + } + BakedMap::Normal => hint(ui, "Tangent-space normals of the high definition meshes."), + BakedMap::WorldNormal => hint(ui, "World-space normals of the high poly (or the low poly)."), + BakedMap::Id => hint(ui, "One color per mesh part."), + BakedMap::Position => hint(ui, "Position in the low poly's bounding box."), + BakedMap::Height => hint(ui, "High poly height between the max rear (black) and max frontal (white) distances."), + BakedMap::Opacity => hint(ui, "White where the high poly covers the low poly, times its vertex alpha."), + BakedMap::ColorMap => hint(ui, "Vertex colors of the high definition meshes."), + } +} + +fn bake_bar(app: &mut TextureCraftApp, ctx: &egui::Context) { + egui::Area::new(egui::Id::new("bake_bar")).anchor(egui::Align2::CENTER_BOTTOM, vec2(0.0, -40.0)).show(ctx, |ui| { + ui.horizontal(|ui| { + if let Some(p) = app.bake_progress() { + ui.add(egui::ProgressBar::new(p).desired_width(220.0).show_percentage()); + if ui.button("Cancel").clicked() { + app.cancel_bake(); + } + } else { + let sets: Vec = app.session.doc.project.texture_sets.iter().enumerate().filter(|(_, t)| t.bake.enabled).map(|(i, _)| i).collect(); + let label = RichText::new(format!("Bake selected textures ({})", sets.len())).color(Color32::WHITE); + if ui.add_enabled(!sets.is_empty(), egui::Button::new(label).fill(TOKENS.accent)).clicked() { + app.start_bake(sets); + } + } + if ui.button("Return to painting mode").clicked() { + app.ui.mode = Mode::Painting; + } + }); + }); +} + +// --------------------------------------------------------------------------------------------- +// Files (wired to texturecraft-formats once it lands) + +pub fn file_dialogs_available() -> bool { + cfg!(not(target_arch = "wasm32")) +} + +#[cfg(not(target_arch = "wasm32"))] +fn pick_mesh_file() -> Option { + rfd::FileDialog::new().add_filter("3D meshes", &texturecraft_engine::formats::mesh_import::MESH_EXTENSIONS).pick_file().map(|p| p.display().to_string()) +} + +#[cfg(target_arch = "wasm32")] +fn pick_mesh_file() -> Option { + None +} + +fn file_new_from_mesh(app: &mut TextureCraftApp, path: &str, resolution: u32, name: &str) -> Option<()> { + app.run("file.new", json!({"mesh": path, "resolution": resolution, "name": name})).map(|_| ()) +} + +/// Remember a project path in File ▸ Recent projects. +pub fn remember(app: &mut TextureCraftApp, path: &str) { + app.ui.recent.retain(|p| p != path); + app.ui.recent.insert(0, path.to_string()); + app.ui.recent.truncate(10); +} + +/// Window › Save / Load UI layout: panels, windows and view settings as a JSON file. +#[cfg(not(target_arch = "wasm32"))] +pub fn layout_file(app: &mut TextureCraftApp, save: bool) { + let dir = crate::user_dir("layouts"); + let dialog = rfd::FileDialog::new().add_filter("UI layout", &["json"]).set_directory(&dir); + let result = if save { + let Some(path) = dialog.set_file_name("layout.json").save_file() else { return }; + let layout = crate::UiState { recent: Vec::new(), ..app.ui.clone() }; + std::fs::create_dir_all(&dir) + .map_err(|e| e.to_string()) + .and_then(|_| serde_json::to_vec_pretty(&layout).map_err(|e| e.to_string())) + .and_then(|bytes| std::fs::write(&path, bytes).map_err(|e| e.to_string())) + .map(|_| format!("Saved UI layout {}", path.display())) + } else { + let Some(path) = dialog.pick_file() else { return }; + std::fs::read(&path) + .map_err(|e| e.to_string()) + .and_then(|bytes| serde_json::from_slice::(&bytes).map_err(|e| e.to_string())) + .map(|layout| { + app.ui.adopt_layout(layout); + format!("Loaded UI layout {}", path.display()) + }) + }; + match result { + Ok(msg) => app.toast(msg, false), + Err(e) => app.toast(format!("UI layout: {e}"), true), + } +} + +/// The browser has no file paths; layouts persist with the rest of the UI state. +#[cfg(target_arch = "wasm32")] +pub fn layout_file(app: &mut TextureCraftApp, _save: bool) { + app.toast("Saving UI layouts to files is available in the desktop app", false); +} + +/// File menu actions that need dialogs. Returns true when handled. +#[cfg(not(target_arch = "wasm32"))] +pub fn file_action(app: &mut TextureCraftApp, _ctx: &egui::Context, id: &str) -> bool { + match id { + "file.open" => { + let pick = rfd::FileDialog::new().add_filter("TextureCraft project or mesh", crate::web_files::OPEN_EXTS).pick_file(); + if let Some(p) = pick { + open_path(app, &p.display().to_string()); + } + true + } + "file.save" if app.session.path.is_some() => { + if let Some(r) = app.run("file.save", json!({})) { + let p = r.get("path").and_then(|p| p.as_str()).unwrap_or_default().to_string(); + app.toast(format!("Saved {p}"), false); + } + true + } + "file.save" | "file.saveAs" | "file.saveCopy" => { + let name = crate::web_files::project_file_name(app); + if let Some(p) = rfd::FileDialog::new().add_filter("TextureCraft project", &[texturecraft_engine::core::PROJECT_EXT]).set_file_name(name).save_file() { + let path = p.display().to_string(); + let cmd = if id == "file.saveCopy" { "file.saveCopy" } else { "file.saveAs" }; + if app.run(cmd, json!({"path": path})).is_some() { + remember(app, &path); + app.toast(format!("Saved {path}"), false); + } + } + true + } + "file.importResources" | "resource.import" => { + let picks = rfd::FileDialog::new().add_filter("Images", crate::web_files::IMAGE_EXTS).pick_files(); + for p in picks.unwrap_or_default() { + if let Some(r) = app.run("resource.import", json!({"path": p.display().to_string()})) { + let name = r.get("name").and_then(|n| n.as_str()).unwrap_or_default().to_string(); + app.toast(format!("Imported {name}"), false); + } + } + app.ui.dock.focus(crate::docking::Panel::Assets, _ctx.content_rect()); + true + } + "file.exportMesh" => { + let name = format!("{}.obj", texturecraft_engine::formats::export::sanitize_file_stem(&app.session.doc.project.name)); + if let Some(p) = + rfd::FileDialog::new().add_filter("Wavefront OBJ", &["obj"]).add_filter("glTF binary with textures", &["glb"]).set_file_name(name).save_file() + && let Some(r) = app.run("file.exportMesh", json!({"path": p.display().to_string()})) + { + let p = r.get("path").and_then(|p| p.as_str()).unwrap_or_default().to_string(); + app.toast(format!("Exported mesh to {p}"), false); + } + true + } + "file.reimportMesh" if app.session.mesh_source.is_none() => { + if let Some(p) = rfd::FileDialog::new().add_filter("3D meshes", &texturecraft_engine::formats::mesh_import::MESH_EXTENSIONS).pick_file() { + app.run("file.reimportMesh", json!({"path": p.display().to_string()})); + } + true + } + _ => false, + } +} + +/// Open a project or mesh by path (menus, Recent projects, drag and drop). +#[cfg(not(target_arch = "wasm32"))] +pub fn open_path(app: &mut TextureCraftApp, path: &str) { + if app.run("file.open", json!({"path": path})).is_some() { + remember(app, path); + app.ui.mode = Mode::Painting; + } +} + +/// In the browser, Open and Import use the file picker and Save downloads the project. +#[cfg(target_arch = "wasm32")] +pub fn file_action(app: &mut TextureCraftApp, ctx: &egui::Context, id: &str) -> bool { + match id { + "file.open" => crate::web_files::open(ctx), + "file.importResources" | "resource.import" => crate::web_files::import_images(ctx), + "file.save" | "file.saveAs" | "file.saveCopy" => crate::web_files::save_project(app), + "file.exportMesh" => crate::web_files::export_mesh(app), + _ => return false, + } + true +} + +/// Texture sets ticked in the export dialog. +fn export_selection(app: &TextureCraftApp) -> Vec { + (0..app.session.set_count()).filter(|i| !app.ui.export.skip.contains(i)).collect() +} + +/// Export the selected texture sets; false when a command failed (its error is already shown). +#[cfg(not(target_arch = "wasm32"))] +fn export_sets(app: &mut TextureCraftApp) -> bool { + let mut written = 0usize; + for ts in export_selection(app) { + let mut p = export_params(app); + p["dir"] = json!(app.ui.export.dir); + p["ts"] = json!(ts); + match app.run("file.exportTextures", p) { + Some(r) => written += r.get("files").and_then(|f| f.as_array()).map(Vec::len).unwrap_or(0), + None => return false, + } + } + app.toast(format!("Exported {written} textures to {}", app.ui.export.dir), false); + true +} + +/// In the browser the textures download (one zip for several files). +#[cfg(target_arch = "wasm32")] +fn export_sets(app: &mut TextureCraftApp) -> bool { + let sets = export_selection(app); + crate::web_files::export_textures(app, &export_params(app), &sets); + true +} + +fn export_params(app: &TextureCraftApp) -> serde_json::Value { + let e = &app.ui.export; + let mut p = json!({"preset": e.preset, "padding": e.padding, "dilation": e.dilation}); + if !e.format.is_empty() { + p["format"] = json!(e.format); + } + if e.bit_depth > 0 { + p["bitDepth"] = json!(e.bit_depth); + } + if e.size > 0 { + p["size"] = json!(e.size); + } + if !e.normal_format.is_empty() { + p["normalFormat"] = json!(e.normal_format); + } + p +} + +fn export_settings_tab(app: &mut TextureCraftApp, ui: &mut Ui, presets: &[texturecraft_engine::formats::ExportPreset]) { + ui.label(caption("General export parameters")); + egui::Grid::new("exp_grid").num_columns(2).spacing(vec2(12.0, 8.0)).show(ui, |ui| { + // The browser downloads the files instead. + #[cfg(not(target_arch = "wasm32"))] + { + ui.label("Output directory"); + ui.horizontal(|ui| { + ui.add(egui::TextEdit::singleline(&mut app.ui.export.dir).desired_width(360.0)); + if ui.button("...").clicked() + && let Some(d) = rfd::FileDialog::new().set_directory(&app.ui.export.dir).pick_folder() + { + app.ui.export.dir = d.display().to_string(); + } + }); + ui.end_row(); + } + ui.label("Output template"); + egui::ComboBox::from_id_salt("exp_preset").width(360.0).selected_text(app.ui.export.preset.clone()).show_ui(ui, |ui| { + for p in presets { + ui.selectable_value(&mut app.ui.export.preset, p.name.clone(), &p.name); + } + }); + ui.end_row(); + ui.label("File type"); + ui.horizontal(|ui| { + let label = if app.ui.export.format.is_empty() { "From template".to_string() } else { app.ui.export.format.clone() }; + egui::ComboBox::from_id_salt("exp_fmt").selected_text(label).show_ui(ui, |ui| { + ui.selectable_value(&mut app.ui.export.format, String::new(), "From template"); + for f in ["png", "jpeg", "tga", "tiff", "bmp", "webp", "exr", "hdr"] { + ui.selectable_value(&mut app.ui.export.format, f.to_string(), f); + } + }); + let bd = if app.ui.export.bit_depth == 0 { "Default".to_string() } else { format!("{} bits", app.ui.export.bit_depth) }; + egui::ComboBox::from_id_salt("exp_bits").selected_text(bd).show_ui(ui, |ui| { + for (v, l) in [(0u8, "Default"), (8, "8 bits"), (16, "16 bits"), (32, "32 bits (float)")] { + ui.selectable_value(&mut app.ui.export.bit_depth, v, l); + } + }); + }); + ui.end_row(); + ui.label("Size"); + let sz = if app.ui.export.size == 0 { "Based on each texture set's size".to_string() } else { format!("{0} x {0}", app.ui.export.size) }; + egui::ComboBox::from_id_salt("exp_size").width(360.0).selected_text(sz).show_ui(ui, |ui| { + ui.selectable_value(&mut app.ui.export.size, 0, "Based on each texture set's size"); + for r in [256u32, 512, 1024, 2048, 4096, 8192] { + ui.selectable_value(&mut app.ui.export.size, r, format!("{r} x {r}")); + } + }); + ui.end_row(); + ui.label("Padding"); + ui.horizontal(|ui| { + let label = match app.ui.export.padding.as_str() { + "none" => "No padding (passthrough)", + "dilation" => "Dilation + transparent", + "dilationDefault" => "Dilation + default background color", + _ => "Dilation infinite", + }; + egui::ComboBox::from_id_salt("exp_pad").width(260.0).selected_text(label).show_ui(ui, |ui| { + for (v, l) in [("infinite", "Dilation infinite"), ("dilation", "Dilation + transparent"), ("dilationDefault", "Dilation + default background color"), ("none", "No padding (passthrough)")] { + ui.selectable_value(&mut app.ui.export.padding, v.to_string(), l); + } + }); + if app.ui.export.padding.starts_with("dilation") { + ui.add(egui::DragValue::new(&mut app.ui.export.dilation).range(0..=256).suffix(" px")); + } + }); + ui.end_row(); + ui.label("Normal map format"); + let nf = match app.ui.export.normal_format.as_str() { + "openGl" => "OpenGL", + "directX" => "DirectX", + _ => "From template / project", + }; + egui::ComboBox::from_id_salt("exp_nf").selected_text(nf).show_ui(ui, |ui| { + for (v, l) in [("", "From template / project"), ("openGl", "OpenGL"), ("directX", "DirectX")] { + ui.selectable_value(&mut app.ui.export.normal_format, v.to_string(), l); + } + }); + ui.end_row(); + }); +} + +pub fn export(app: &mut TextureCraftApp, ctx: &egui::Context) { + if !app.ui.windows.export { + return; + } + let mut open = true; + let mut do_export = false; + let presets = texturecraft_engine::formats::builtin_presets(); + egui::Window::new("Export textures").open(&mut open).collapsible(false).resizable(false).fixed_size(vec2(820.0, 430.0)).anchor(egui::Align2::CENTER_CENTER, vec2(0.0, 0.0)).show(ctx, |ui| { + ui.horizontal(|ui| { + for (i, t) in ["Settings", "Output templates", "List of exports"].iter().enumerate() { + if ui.selectable_label(app.ui.export.tab == i as u8, caption(t)).clicked() { + app.ui.export.tab = i as u8; + } + } + }); + ui.separator(); + ui.allocate_ui_with_layout(vec2(ui.available_width(), 360.0), egui::Layout::left_to_right(egui::Align::Min), |ui| { + ui.set_height(360.0); + ui.vertical(|ui| { + ui.set_width(180.0); + ui.label(RichText::new("Texture sets").strong()); + for i in 0..app.session.set_count() { + let name = app.session.doc.project.texture_sets.get(i).map(|t| t.name.clone()).unwrap_or_default(); + let mut on = !app.ui.export.skip.contains(&i); + if ui.checkbox(&mut on, name).changed() { + if on { + app.ui.export.skip.retain(|x| *x != i); + } else { + app.ui.export.skip.push(i); + } + } + } + }); + ui.separator(); + ui.vertical(|ui| match app.ui.export.tab { + 0 => export_settings_tab(app, ui, &presets), + 1 => { + if let Some(p) = presets.iter().find(|p| p.name == app.ui.export.preset) { + ui.label(RichText::new(&p.name).strong()); + egui::ScrollArea::vertical().max_height(340.0).show(ui, |ui| { + for m in &p.maps { + ui.horizontal(|ui| { + ui.label(RichText::new(&m.file).monospace()); + ui.label(RichText::new(format!("{} {}-bit", m.format.extension(), m.bit_depth)).color(TOKENS.text_dim)); + }); + for (dest, src) in &m.channels { + ui.label(RichText::new(format!(" {dest:?} <- {src:?}")).size(11.0).color(TOKENS.text_dim)); + } + } + }); + } + } + _ => { + let mut params = export_params(app); + params["ts"] = json!("all"); + match texturecraft_engine::execute(&mut app.session, "export.plan", ¶ms) { + Ok(v) => { + egui::ScrollArea::vertical().max_height(340.0).show(ui, |ui| { + for f in v.as_array().into_iter().flatten() { + let ts = f.get("ts").and_then(|t| t.as_u64()).unwrap_or(0) as usize; + if !app.ui.export.skip.contains(&ts) { + ui.label(RichText::new(f.get("file").and_then(|x| x.as_str()).unwrap_or_default()).monospace()); + } + } + }); + } + Err(e) => { + ui.label(RichText::new(e.to_string()).color(TOKENS.danger)); + } + } + } + }); + }); + ui.add_space(8.0); + ui.separator(); + ui.horizontal(|ui| { + if ui.button("Reset all").clicked() { + app.ui.export = crate::state::ExportUi::default(); + } + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + if ui.add(egui::Button::new(RichText::new("Export").color(Color32::WHITE)).fill(TOKENS.accent)).clicked() { + do_export = true; + } + if ui.button("Cancel").clicked() { + app.ui.windows.export = false; + } + }); + }); + }); + if do_export && export_sets(app) { + app.ui.windows.export = false; + } + if !open { + app.ui.windows.export = false; + } +} diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 00000000..781b6e5a --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,92 @@ +# Architecture + +TextureCraft is a 3D texture painter: import a mesh, paint PBR material channels on its surface +in layers with masks, bake mesh maps that drive procedural masks, and export game-ready textures. +This document explains how the pieces fit together. + +## Crates and layers + +```text +L0 core document model: Project, TextureSet, Layer (paint / fill / group), Mask, Effect, + Channel, 32 BlendModes with the CPU reference math (blend1/blend3) +L0 texel TileImage (sparse copy-on-write 64x64 tiles of u16), DilationMap (UV padding), + deterministic noise, sRGB transfer +L0 geom Mesh (+ MikkTSpace tangents), primitives, SAH BVH, UvGBuffer, OrbitCamera, auto-unwrap +L1 compose the layer-stack compositor (CPU, per tile, rayon), patterns, display conversion +L1 bake AO, curvature, thickness, world normal, position, ID, normal and height bakers +L2 paint strokes -> stamps, camera visibility, texture-space rasterization, commit +L2 formats mesh import (glTF/GLB, OBJ, PLY, STL), texture export presets, .tcraft projects, + image resources +L3 engine Session (document + caches + history + tools), the command registry +L3 render wgpu viewport renderer (PBR, IBL, post effects, UV view), headless renders +L4 automation MCP server, JSON-lines RPC, bridge to the running app +L5 ui-egui the egui shell (swappable) + apps texturecraft (desktop), texturecraft-cli, texturecraft-web +``` + +`cargo xtask layers` enforces that a crate depends only on lower layers and that nothing below +`ui-egui` touches egui, eframe, winit or rfd. + +## The UV-space G-buffer: one source of truth + +For every texture set (one per mesh material) `geom::UvGBuffer` rasterizes the mesh's UV layout +once: each texel knows which triangle covers its center and where on it (barycentrics). From that +every texel has a world position, a shading normal and a tangent frame. Painting, compositing, +procedural masks, baking and UV padding all read the same buffer, so they agree exactly on which +texel is which surface point. Texels whose centers fall outside UV islands are filled by padding +(`texel::DilationMap`, a multi-source BFS computed once per layout). + +## Painting + +1. A `paint::Stroke` turns pointer samples into world-space stamps: picking through the BVH, + lazy mouse, spacing measured along the surface (re-projected and re-picked so stamps stay on + the mesh, resampled in screen space across silhouettes), jitter and mirror symmetry. +2. `paint::rasterize` gathers the triangles within each stamp's volume (BVH box query) and + accumulates the brush alpha into a texture-space stroke mask for every covered texel inside the + stamp's oriented box. Because stamps live in 3D, strokes cross UV seams without gaps. A CPU + eye-distance buffer (`EyeDepth`, rendered once per stroke) keeps paint off surfaces the camera + can't see; angle fade and backface culling soften grazing surfaces. +3. While dragging, the compositor reads the stroke mask as a live preview. On release, + `paint::commit` blends it into the layer's tiles with premultiplied "over" (or scales them down + when erasing); only touched tiles are un-shared. Strokes in the 2D view use UV-space stamps. + +## Compositing + +`compose::composite_tiles` evaluates a texture set's stack per 64x64 tile in parallel. For each +covered texel it walks the stack bottom to top: paint layers are unpremultiplied from their +(value, coverage) tiles, fill layers evaluate uniform values, procedurals (through UV, tri-planar, +planar, spherical or cylindrical projections) or image resources; masks evaluate their effect +stack (painted bitmaps, fills, mesh-map generators, levels, filters, ID color selection, +compare); each enabled channel blends with its mode and opacity. Only dirty tiles are recomposited +(a stroke dirties the tiles it touches), then padded, converted to display formats and uploaded to +the GPU. + +The CPU compositor is the reference for everything users see and export. Export +(`formats::export`) reads the same composite, adds height-to-normal (Sobel) combined with the +normal channel and baked normals by reoriented normal mapping, and packs channels per preset. + +## Undo + +`Session::edit` snapshots the `Document` (project + pixels + baked maps + resources) before a +change and restores it if the change fails. Pixel data is copy-on-write (`Arc` tiles), so a +snapshot costs one reference-count bump per allocated tile, and an undo step only keeps the tiles +that actually changed. + +## Rendering + +`render::Renderer` draws the mesh with metal/roughness PBR: GGX specular with height-correlated +Smith visibility, Lambert diffuse, image-based lighting from procedural studio environments +(prefiltered on the CPU into a mip chain for specular, nine spherical-harmonic coefficients for +diffuse), the analytic split-sum environment BRDF, horizon fading, baked AO, height-to-normal and +the painted normal channel. Debug views show any channel, any baked mesh map or a UV checker. +The 2D view draws the UV layout with the material and a wireframe. Everything is fragment passes, +so it runs on Vulkan, Metal, DX12, WebGPU and WebGL2. `render::headless` renders without a window +(CLI, MCP, tests). + +## Commands and automation + +Every action is a `CommandSpec` in `engine::commands` (id, label, menu path, shortcut, params doc, +enabled predicate, run). The menus, shortcuts, the desktop app's control channel +(`--control `), the CLI and the MCP server all execute commands by id, so an agent can do +anything a user can and verify it through `project.inspect`. See +[`control-protocol.md`](control-protocol.md). diff --git a/docs/brand/LICENSE-brand.txt b/docs/brand/LICENSE-brand.txt new file mode 100644 index 00000000..adf1ad77 --- /dev/null +++ b/docs/brand/LICENSE-brand.txt @@ -0,0 +1,42 @@ +ArtCraft brand assets: license + +The ArtCraft name, wordmark and mark (the "ArtCraft Marks"), including every file in this +directory in every color, size and format, are owned by the ArtCraft Team. They are trademarks +and are NOT open source. They are not covered by TextureCraft's MIT OR Apache-2.0 license, and nothing in +that license, in NOTICE or in any other file of this repository grants any right to them. + +Permission + +The ArtCraft Team grants a limited, non-exclusive, non-transferable, revocable, royalty-free +permission to use the ArtCraft Marks only: + + 1. as part of copies of this repository; and + 2. within TextureCraft itself, its documentation and its official builds, to identify TextureCraft as made + by the ArtCraft team and community and to link to getartcraft.com and its community. + +Conditions + +The permission holds only while every one of these is true: + + - The marks are used exactly as supplied in this directory. Do not redraw, recolor, crop, + stretch, rotate, animate, outline or add effects to them, extract parts of them, or combine + them with any other name, mark or artwork. + - They are used only in the context of TextureCraft, and only to say that the ArtCraft team makes it. + They must never suggest that the ArtCraft Team made, sponsors, endorses, certifies or supports + any other product, service, fork, modified version, plug-in, organization or person. + - Neither the marks nor the ArtCraft name appear in the name, logo, icon, domain, social media + handle, app-store listing, advertising or marketing of anything other than TextureCraft. + +Forks and modified versions + +If you distribute or publish a modified version of TextureCraft, or any work derived from it, you must +remove the ArtCraft Marks from it (or replace them with your own) and must not call it ArtCraft or +present it as an ArtCraft product. You may say, in plain text, that your work is based on TextureCraft by +the ArtCraft team. A fork kept only to propose changes back to this repository may keep the marks +unchanged. + +Everything else + +Any use not expressly permitted here needs prior written permission from the ArtCraft Team +(https://getartcraft.com/). The permission ends automatically for anyone who breaks these terms. +All other rights are reserved. diff --git a/docs/brand/artcraft-logo-white.png b/docs/brand/artcraft-logo-white.png new file mode 100644 index 0000000000000000000000000000000000000000..8cfb31d940f6663ecaf93da2bc04c5904704b4af GIT binary patch literal 32161 zcmagGcOVsP_&W||;D3K#K`{Scf5nFX|NOd=ll-r9AB~Uy96i`{lWv^HSxyfg%x-(O z&m`6g<9E-#mD!#;F#dc;?@L%mkh7cHtj~WN+V@}Z_-z&bA3o* zCmQugTzl>-ORKb*c-Z&U`tvG$_*>}nSyR(GThk|<9389a{w<;is7QZ6rzn)VPp}VW zZ_T2va;S0sj>C7-f`hP^9Xa7;Q?Qcf1fX)pi(6NDUW;l=X_Murm<kP<{UK;)woTcCfxusE2KQ-IGA+b+p2($Cuh<1Q}BPsPM zh1UJHPhjrsW^2Z`bJN4@g~{5Ev}!qq$Se0*o6K=vBa?o8dC9iiwF+|bN{&(!q#xc) z(^wo~{Dca8QA@>O5ky(j9uLs{ZEmTbIi(e)OxCN-!6W5`*@CKWM(jw6mK z)VbK@Z-chPp3bjQOV_7$f-feH@lBpM($oLM`*?@;^KW0j_J*OY*}0HjZpo=MfT3r0 zw9xEJeRPN#m%`^!?L4oGvv>GBLrRwxZ{G}jrL*SfCYB<5vX%c-#K;ubOknR&2r!^{ zJ=s`c$d>co`zQMHk`OUvP^UvPtXr?A?UdG)9iFy^R(-?G@*z}_rg-J6O0VRheCSJ?3pC2&`x_rGSk z7;t~1$wQ&lr^#=L`ohVPs;iy~$VciFW7)o*<2U3!-Jl`JY>A8DsjewJR#p|sC<#rH zvWqS)h)r;_sGjKF4GGQu;*jDLWEXhlFjOG@1VESU<i*^ih%2@c-t|x|_d&i-adiH=iu)KI{8(o6o&RYdsGA?u z=zCm8fQaW(5byBy7->CH`6Nt4m>96X7;2ihvzt0R-7PWxZI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42AduVu-WPs{I z^X(_Juh!jLxEHn*=-of#%btlBx<4ALIb-wv-)Fe~eWvQ9>fwf+MwW%F54M++*DdE# z4;aC>an(d?kMnJAe5~Z(iDhF!uMT972oU^%9}=n5>w)yf+W4aTX{+tiWt;B%okEXr zd(MmQsaC8$kurBexawfyTGlO(^|uwS8QQluhnvZYeP|YpejF}f`R{%I{uNm=f>{3l tf56#M-sj)H5EK5_7m~~V-~M~UhsPu0=Yf5}`_KzsRMS3}sX}=8{{T + ArtCraft + + + + + diff --git a/docs/brand/artcraft-logo.png b/docs/brand/artcraft-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d1544caa4c8b8dae14e1d10d79afa197261e3b GIT binary patch literal 31302 zcmYg&c|6qL_x~M(A&inJ*(#B;wAgn^!h6tEh%l|lnl)pas8kYV;vGUUmXL|;+eqGe zlO^kvJv8=xU&imwc>lhSk3V`?a$om#?m5qM&htF4r)DMwJiCN;0RVUmFPy^yz)b)E zf#G0>-}!QMsTBY`kKsAp%l8u|d#Ajuy9$&hOLPVVL6{rc_2V3-@Sl@OyS`o)f4hs@ z0$0L<-Dmkx$Ac~AIQeq*OTAe^C30WEx#Jgw0|{T*$%t!R`%gO>+9&+I`pdsbk=Dxv zAM$@6YB_@c_c{E;D-N;yf4(NXI0IPz=j)bx>^lGRB~WVu9RKsRPTdlc@gT7;Hh8oR2kEmsw@=AT=i>ua}Rth&-i`h0(BZU&RyX7}In_oMik3whPg&CMCM zDFlD)r}d~~9Pe!oM*dDY6p=6_zaVJtG67F$r1#pBRt#WVKG6S}#xdroUP0ea8!|%>PT!yAGJ2CExb`c7)`W;HlN9 z`Zo14N)x-LC5Cc()kjQPh@Wq4NbsM*T9uElY`FDT_^(LrJP60TA0QZ?-X{#bcZ{q0 z)1w~oE&Z{E+SC=Ju|^w@3m6{1t&jhihI$BYOU0qCt}Y$ZwkZvEbwA+k4nrm&DCSH9 zsAcqNH_;ZfyUs<<=h`cF9C?opAZKBXX0*5;5@+m0L_{il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GT?_1b(U14 zSK3nn8|=v4URS~pbeeILPFT42#7!ouTNP@lp8rfXj<2jFwXZsHZng2yD!PIAy=SX# zgJs?0>?`_!P}_#HY3-A&mLn{zcK19_vu9^2DH0K~7v*#^*zRQs?-MtIM9d*1#Ukjc zF9<4O@gECEr;kW_j(oo9)e};-Y0q`*cbN&`Eirs z@^G{JM!MC{z6okkd3aDzxdZiK6oDIrS^(ELu(K)}=bK|jd*FfN=;^@o2U#DFv~8`Z zjF1zi+sMvR?3!eC@3qU*1}7VzNdny?LYldp-S4t50hThM-ZpL6feenH7ik;H>JDGH zCd%GZ^g)p?g+;m4`Gvf8m+K9`a!pY>QxVtdSxUTRcC1`^#cm#T+C;g_3ta`HVbxE?KU^37Zw)Eh>OEX{0Qm8Dh*UA@F8%!Iy#D0*+-mvY!<^EA|o~4 zyIFPUT2`^K)Z+2Eh?SOY%Qee^^;aLh|9$RBH1GhyM=|7$1jJfr&-1FzhKYv=jFZpv z;uhQ+Qmo=UWF|fA1`;bpp#2v8Tz>N3BX^{DBhsxHoLfR>!|W}tr0(E0(c>tl-*4&!h;{W$nml$-)X3(d&NuJS+Y z>mqUKGQegtxo9^adFh64 ew&(x%&)c}D8%*^he-v=&6Y45j7qZXe1OE?JG~1&9 literal 0 HcmV?d00001 diff --git a/docs/brand/artcraft-logo.svg b/docs/brand/artcraft-logo.svg new file mode 100644 index 00000000..d63f3eae --- /dev/null +++ b/docs/brand/artcraft-logo.svg @@ -0,0 +1,7 @@ + + ArtCraft + + + + + diff --git a/docs/brand/artcraft-mark-black.png b/docs/brand/artcraft-mark-black.png new file mode 100644 index 0000000000000000000000000000000000000000..27664bc119d2b485ba6fee213ee749df658ab508 GIT binary patch literal 26793 zcmeFZ`9D;e z-K8wa5@jzWWZ#FG^SRDUckl1x^Cx^CpI_cfX3m`Ry0+)_yq?#&W^AZ0A}A?{5E3ys zu+J1BUihE9Xc0gB7j>86)#o0IJ5L_w+igj_>!Ee%n8%j91luxUf=;9`O~c>w z(sN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00001 diff --git a/docs/brand/artcraft-mark-black.svg b/docs/brand/artcraft-mark-black.svg new file mode 100644 index 00000000..63943537 --- /dev/null +++ b/docs/brand/artcraft-mark-black.svg @@ -0,0 +1,4 @@ + + ArtCraft + + diff --git a/docs/brand/artcraft-mark.png b/docs/brand/artcraft-mark.png new file mode 100644 index 0000000000000000000000000000000000000000..dbb3dc08955f8214561c7922730e78266600aa36 GIT binary patch literal 24715 zcmeFZ=R;HJ);@eEp-NM60I51Cih!U}q$XHEML?0>)uVu*AiYWASa3vOREknFBZ$%! zL{uPg5E}v!q*y456e-fBCE4%VLC^F2{)6|!^Wlt#>~`;UuX3%muC@O>U}Y}0Om-PU zNNn$(T{Z~u!T;q$LIUs)RYC0>LY_8zcbVFTXN+{Zh1#}1(jD>I>~LCkRBG3$rxwo3 zKN0Sf(*i{fBwQ8jJN!-N6LFV_4U5n#)ltsO;aAeneeE0Ln{xibv+VOjUL4nUnMJ#6 znN{ykA81XReVpxOPk_fvyZ;9NrHl!~e~~9|0Z0oG@xNpcegYDu;r~Sf6y86iHTXX? z!gBl{CKAH``M=9R2>&M%TowLLOF#(!|1+E`MC5q$&7`}#IwnaO&fR33j%gbRqvHLr zTCd5#d2RDg!t|Lyw=q4k6_KX44eUSu)#t!#LHmh=m&(cWhxNsHCo_AJhp3rTEyy6Z zc-Wl4Oa`|hQ)R>Pj~U@-ZSkQ7R#r+P*FV7;Ob>BlPx;1BA0Sk`kspb^%U@tPa#wV5 zcjnpkz9sjUO-G?|Cs}YWDMRGxoz;%=e8?k*fS7A|PoNS9FPt!12sN=NA`6>e)5|7ihr+T~R?5B0ZL9 zoFE3L?3_`G^w;FF57i3xNP?>s{bPtMy3?&akw{Bii4ZHQf?NAn4(F9by$@Ug&aXOe zL8A8Ba5Nds(cqoj;hjFeS`nra8)ryh^21XjEoPK176@}kh^TTGxKaPR+}eO5XH-_D zgxI^`2hF=&(#(-9B8Yp9h$4^MaXi#9A%E=fc>cuT$9eT?aiopVpi(QfCo}S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@~wFCCMd+OQg2DESPz0_cH#B9isU1@+1;Fb2?ytejqm4wBz8rIOhIF z&QqP86bEMP_kKe)eR#Uz7=s7ZF3(9ctGB*BmyG-ehlE6U}8_SxutM1q|3WfsOJ~JfB#lB3Q5k104*I@PF8a}RHise>o`elTG zwn{N=#nhe{S7Oo@Iy8m9K9jZTx^Q6LTz;=6mlSM}QwpZ)`x Cm;%NC literal 0 HcmV?d00001 diff --git a/docs/brand/artcraft-mark.svg b/docs/brand/artcraft-mark.svg new file mode 100644 index 00000000..72e191f8 --- /dev/null +++ b/docs/brand/artcraft-mark.svg @@ -0,0 +1,4 @@ + + ArtCraft + + diff --git a/docs/control-protocol.md b/docs/control-protocol.md new file mode 100644 index 00000000..1dbba734 --- /dev/null +++ b/docs/control-protocol.md @@ -0,0 +1,225 @@ +# Control protocol, MCP and CLI + +Everything TextureCraft does is an engine command with a stable id (`layer.add.fill`, +`bake.run`, `edit.undo`, …). Agents and scripts reach the same commands four ways: + +| Surface | Start it with | Use it for | +|---|---|---| +| Control channel | `texturecraft --control ` | Drive the running desktop app: commands, inspect, menus, screenshots | +| MCP server | `texturecraft-cli mcp` | AI agents (Claude Code, Claude Desktop, any MCP client), headless or bridged to the app | +| JSON-lines server | `texturecraft-cli serve [--port ]` | Scripts that keep one headless session open | +| CLI subcommands | `texturecraft-cli info/run/batch/bake/export/render/new` | One-shot jobs in shells and pipelines | + +Programmatic calls never open dialogs: a command runs with its defaults. Only `ui.menu.invoke` +behaves like a menu click. `session.inspect` shows every layer, mask, effect, fill source and +painted tile count, so an agent can verify its work without a screenshot. + +## Control channel (desktop app) + +```sh +texturecraft --control 7878 +# stderr: texturecraft: control token written to /texturecraft-control-7878.token +``` + +Loopback TCP (`127.0.0.1` only), one JSON object per line each way. Requests are +`{"id", "method", "params"}`; replies are `{"id", "ok": true, "result"}` or +`{"id", "ok": false, "error"}`. Requests are limited to 8 MiB. + +**Authentication.** The first request on every connection must be + +```json +{"id": 0, "method": "auth", "params": {"token": ""}} +``` + +The token is `TEXTURECRAFT_CONTROL_TOKEN` when that is set (16 characters or more), otherwise a +fresh random token the app writes to `/texturecraft-control-.token` (`` is +`%TEMP%` on Windows, `$TMPDIR` or `/tmp` elsewhere). Any other first request is refused. + +| Method | Params | Result | +|---|---|---| +| `ping` | | `"pong"` | +| `command.run` | `{id, params?}` | the command's JSON result | +| `command.list` | `{filter?}` | `[{id, label, menu, shortcut, params, enabled}]` | +| `session.inspect` | | project, mesh, texture sets, layer stack, tool, camera, display, history | +| `ui.inspect` | | UI state, viewport rect, fps, bake progress, toasts | +| `ui.menu.list` | | the menu catalog: `{menu, submenu, label, id, shortcut, implemented, enabled}` | +| `ui.menu.invoke` | `{id}` | behaves like a menu click (may open a window) | +| `ui.set` | fields of the UI state, e.g. `{"layout": "Only3D"}`; `dock` is the panel layout (`{main, windows}`: `{"tabs": {"tabs": [...], "active": 0}}` or `{"split": {"vertical", "fraction", "first", "second"}}` nodes over `Viewport`, `Assets`, `TextureSetList`, `Layers`, `TextureSetSettings`, `Properties`, `Display`, `Shader`, `History`, `Log`), `keymap` the custom shortcuts (`{"file.save": "F5"}`, `""` unbinds) | `null` | +| `viewport.screenshot` | `{view?: "3d" \| "2d"}` | `{width, height, png}` (PNG, base64) | +| `ui.screenshot` | | `{width, height, png}` of the whole window, after the next frame | + +Example session: + +```text +> {"id":0,"method":"auth","params":{"token":"3f9c…"}} +< {"id":0,"ok":true} +> {"id":1,"method":"command.run","params":{"id":"layer.add.fill","params":{"color":"#336699","roughness":0.2}}} +< {"id":1,"ok":true,"result":{"layer":7}} +> {"id":2,"method":"command.run","params":{"id":"mask.add.black"}} +< {"id":2,"ok":true,"result":null} +> {"id":3,"method":"viewport.screenshot","params":{"view":"3d"}} +< {"id":3,"ok":true,"result":{"width":1210,"height":788,"png":"iVBORw0KGgo…"}} +``` + +A minimal client (Python, for illustration): + +```python +import json, os, socket, tempfile +port = 7878 +token = os.environ.get("TEXTURECRAFT_CONTROL_TOKEN") or open( + os.path.join(tempfile.gettempdir(), f"texturecraft-control-{port}.token")).read().strip() +s = socket.create_connection(("127.0.0.1", port)); f = s.makefile("rw") +def call(method, params=None, _id=[0]): + _id[0] += 1 + f.write(json.dumps({"id": _id[0], "method": method, "params": params or {}}) + "\n"); f.flush() + reply = json.loads(f.readline()) + if not reply["ok"]: raise RuntimeError(reply["error"]) + return reply.get("result") +call("auth", {"token": token}) +print(call("command.run", {"id": "layer.add.fill", "params": {"color": [0.8, 0.1, 0.1]}})) +``` + +## MCP server + +`texturecraft-cli mcp` speaks MCP on stdin/stdout (stdout carries only protocol messages). + +- **Headless** (default): an in-process session that starts on the material ball (1024). + Files are reachable only below the roots given at launch, as forward-slash paths relative to + them: `--read-root ` for `project_open` / `mesh_import`, `--write-root ` for + `project_save` / `material_save` / `textures_export`. Without roots there is no file access. `..`, absolute + paths, drive letters, device names and symlink or junction escapes are refused. +- **Bridge**: `--bridge ` forwards to a running `texturecraft --control ` (token from + `--token`, `TEXTURECRAFT_CONTROL_TOKEN` or the app's token file). The app reads and writes its + own files, so the path tools are unavailable there; `project_save` without a path invokes + File › Save. + +Through `command_run`, every `file.*` command but `file.close` (and `file.reimportMesh` without +a `path`) is refused, and so is any command given a `path` or `dir` (`resource.import`, +`material.save`, `material.load`, …), in both modes: use the workspace tools below. + +| Tool | Params | Notes | +|---|---|---| +| `session_inspect` | | The whole session as JSON | +| `command_list` | `{filter?}` | Command ids, labels, params docs, enabled now | +| `command_run` | `{id, params?}` | Any command by id | +| `command_batch` | `{steps: [{id, params?}]}` | Stops at the first error: `{completed, results, failed: {index, id, error}}` (a tool error) | +| `project_new` | `{mesh?, resolution?, name?}` | Built-in mesh: material_ball, sphere, cube, rounded_cube, cylinder, torus, plane, crate | +| `project_open` | `{path}` | `.tcraft` or a mesh file, relative to the read root | +| `project_save` | `{path?}` | `.tcraft` (appended if missing), relative to the write root | +| `mesh_import` | `{path, resolution?}` | New project from .glb/.gltf/.fbx/.dae/.obj/.ply/.stl | +| `resource_import` | `{path}` | Image resource (png, jpg, tga, tif, bmp, webp, exr, hdr) → its name, for `layer.add.image` / `tool.stencil` | +| `material_save` | `{path, layer?, name?}` | A layer or folder as a `.tcmat` smart material below the write root | +| `material_load` | `{path}` | Add a `.tcmat` smart material above the selection | +| `textures_export` | `{dir, preset?, ts?, format?, padding?, size?}` | Writes files below the write root | +| `bake` | `{ts?, resolution?, maps?}` | Mesh maps for generators and smart materials | +| `paint_stroke` | `{points, viewport?, color?, roughness?, metallic?, height?, size?, hardness?}` | Paint tool + brush material + `tool.stroke`; points in viewport pixels | +| `viewport_render` | `{view?: "3d" \| "2d", width?, height?, yaw?, pitch?, samples?, bounces?}` | Headless: PNG image (≤ 2048 px a side); yaw/pitch in degrees for this render only; `samples` (1–4096) path traces the 3D view on the CPU instead (no GPU needed) | +| `viewport_screenshot` | `{view?}` | Bridge: the app's 3D or 2D view | +| `ui_screenshot` | | Bridge: the whole window (downscaled to 2048 px) | +| `ui_inspect` | | Bridge: UI state | +| `ui_menu_invoke` | `{id}` | Bridge: a menu click | + +Replies are capped: 8 MiB of JSON, 5 MiB per PNG, 256 batch steps. Stroke points and render +sizes share one space: the default render size is the session viewport (1280×800), so +`paint_stroke` points can be read straight off a `viewport_render` image. + +A typical agent run: `project_new {"mesh": "sphere"}` → `command_run layer.add.fill +{"color": "#336699", "roughness": 0.2}` → `bake {"resolution": 512}` → `command_run +mask.add.black` → `command_run effect.add.generator {"generator": "edgeWear"}` → +`session_inspect` → `viewport_render` → `project_save {"path": "ball.tcraft"}` → +`textures_export {"dir": "textures", "preset": "glTF PBR Metal Roughness"}`. + +### Claude Code + +```sh +claude mcp add texturecraft -- texturecraft-cli mcp --read-root . --write-root . +# bridged to the running app: +claude mcp add texturecraft-app -- texturecraft-cli mcp --bridge 7878 +``` + +or a project `.mcp.json`: + +```json +{ + "mcpServers": { + "texturecraft": { "command": "texturecraft-cli", "args": ["mcp", "--read-root", ".", "--write-root", "."] } + } +} +``` + +### Claude Desktop + +In `claude_desktop_config.json` (Settings › Developer › Edit Config), with absolute paths: + +```json +{ + "mcpServers": { + "texturecraft": { + "command": "C:\\Program Files\\TextureCraft\\texturecraft-cli.exe", + "args": ["mcp", "--read-root", "C:\\Users\\me\\Texturing", "--write-root", "C:\\Users\\me\\Texturing"] + } + } +} +``` + +## Headless JSON-lines server + +`texturecraft-cli serve` keeps one headless session open and answers the control channel's +envelope on stdin/stdout (no authentication: the caller started the process). With +`--port ` it listens on `127.0.0.1:` instead, with the same `auth` handshake and +token rules as the app (a generated token goes to `/texturecraft-control-.token`). +File access follows `--read-root` / `--write-root` as for MCP. + +| Method | Params | +|---|---| +| `ping`, `methods`, `session.inspect` | | +| `command.run` | `{id, params?}` | +| `command.list` | `{filter?}` | +| `command.batch` | `{steps: [{id, params?}]}` | +| `project.open` | `{path}` | +| `project.save` | `{path?}` | +| `mesh.import` | `{path, resolution?, name?}` | +| `resource.import` | `{path}` | +| `material.save` | `{path, layer?, name?}` | +| `material.load` | `{path}` | +| `textures.export` | `{dir, preset?, ts?, format?, padding?, size?, bitDepth?, dilation?, normalFormat?}` | +| `render` | `{view?, width?, height?, yaw?, pitch?}` → `{width, height, png}` | + +```sh +printf '%s\n' '{"id":1,"method":"command.run","params":{"id":"project.new","params":{"mesh":"torus"}}}' \ + '{"id":2,"method":"render","params":{"width":512,"height":512}}' | texturecraft-cli serve +``` + +## CLI + +```sh +texturecraft-cli --version # TextureCraft 0.1.0 (abc1234 2026-10-14) +texturecraft-cli info model.glb # triangles, materials, UV report +texturecraft-cli info project.tcraft # texture sets, layers, baked maps +texturecraft-cli commands --filter mask +texturecraft-cli new builtin:material_ball ball.tcraft --resolution 1024 --sample +texturecraft-cli new model.glb model.tcraft --resolution 2048 +texturecraft-cli run ball.tcraft layer.add.fill '{"color":"#c08040","metallic":1}' -o ball.tcraft +texturecraft-cli batch script.json +texturecraft-cli bake model.tcraft --resolution 2048 --maps ambientOcclusion,curvature,thickness +texturecraft-cli export model.tcraft out/ --preset "Unreal Engine (Packed)" --format png --size 2048 +texturecraft-cli render ball.tcraft ball.png --size 1280x800 --view 3d --yaw 30 --pitch 15 +``` + +`` is a `.tcraft` project, a mesh file or `builtin:`. A batch script is a list of +steps or an object with an optional input and output (paths relative to the current directory): + +```json +{ + "open": "builtin:sphere", + "steps": [ + {"id": "layer.add.fill", "params": {"color": [0.6, 0.6, 0.62], "metallic": 1, "roughness": 0.3}}, + {"id": "bake.run", "params": {"resolution": 512}}, + {"id": "material.apply", "params": {"material": "iron_rusted"}} + ], + "save": "rusty.tcraft" +} +``` + +Errors print `texturecraft-cli : error: …` and exit 1; usage errors exit 2. The CLI is a +console program and never opens a window; `render` needs a GPU or software adapter. diff --git a/docs/images/texturecraft-workspace.png b/docs/images/texturecraft-workspace.png new file mode 100644 index 0000000000000000000000000000000000000000..009e6a8c3c278646d52e9790081dc88b5177abc1 GIT binary patch literal 564779 zcmb@v3s{up+C4sqipNN;G!I~knwjCw6iZ~REHyKBwTI-LrJsynPFc4z>O7y-yN9eIX_B@zH~7tskbozx=DU+`fsoQHrXEh(BZ#+e|&JWZguHje!l!dd0?e>t-E!z zd)emLNDq~|d6)W(c5SGpCbas1y5)eAsRlU=NoMK;fvOvSUGcqD#;R)bgI=yF{_hw z&B?m*VVd$`mV)M!!M5ig^G`puC+e3yrirc*h1r%PDJ@Tx+?sCKs@-did})%=z0B-W zXC4ji72ul;TNK}}*`r#?3OaF%Y(Li;Y;Wkc(Ll&0k= zxvd-B)#qGWe{eP7hL3qyJg8TdzT;p0j^(<}9%P@ez#MQjP*WWk){?4?kmYEZP`^3$ zUl-4~xBlpEQvdkY{x7aSWgod9{Eh)NJ#=x-D#rS9q^X zQ$OA2nwoRt>ni(Ymh}spOEZ#vxM{H8EUp^?W3#wUsxp*K*4~-gKZ~+-%RMe%_A{s!-npewmjYEE^5m$)xTdG;igz} zo$>d^4&GJ6eant!UO%b|(=|n?OX^xnVq06IO3DV5tmu7V!Pp93h{Y1Cg!$kU^o@>R z{!RQ_{U<**=SWVzm*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GHQ#e!95VxW<1co=s*0rd$-COyFkb&U65C4zXA*g#DQ#S-;( z*3uj~j2MV`k?C4x)Ds8xw7R(4YK@*LO+0rQm!9B&H(0b*ww%;xao5pF1UyVGIM38I zu642y(y&!)n~7GzX79@{u@X5l)re4M>yfEAA7S+&rOa2a06*5f;?7u|i)H{-uig>c0Pwj zIb4|u6Pg*CLsTvAH}hsQf%;=&Y_y(OXAYDl&AtC_baBbgf7y5c-M>tE=gE(Sy9=AQ z7R|Y7y647U{`~2Ww%(rigS@wXW@MBsf}yXt`(W}F<;~jbUuwV5>qc*Vj!wdBNv~(z z^Q)l~e}Cq$f1kAL@8Z-?ev%^{2_^F1et7lK7etp>kya?gbd?#7EXU%NI+7{J4vqEn zF$RXoK>#z59x}8k1I3#}q6MYhMA8+XRAD|%?X!dzIs?RXU~{!9#OdMl?Ib)$ytCyq znuui7wZgq%#;ttQig1V~(ZFXi^QIVR9hFv>4$7F^j5BEOF`pP_QpjcOWhk*8d9%h&*ohRI#XP=mE7j;Trz#B$v(A$_E)3^2E?RX z%{xPX`#&rH+Q}{wR0&xttDHZ&dSQ2Fa#v*0-op=`%BZU8JgR(E`D$L$GoMtuD;KPt zRb=SddvNlO=?x*l+o-I+mA4>Oi&TP^G*luCd2OQ+mO7LmJ39~zMGJaRirCDD+JsG3 zG$09lTPmNvympvQVkiXa-Z$_suPaint PBR textures directly on 3D meshes + + Learning Machines LLC + + +

+ TextureCraft is an open-source, native 3D texture painter that works the way Substance 3D + Painter users expect: familiar menus, shortcuts, panels and tools, with texture sets, + layers, masks, fills and effects painted straight onto the model. +

+
    +
  • Open glTF/GLB, OBJ, PLY and STL meshes and save projects as .tcraft
  • +
  • Paint base colour, roughness, metallic, normal and height together with PBR brushes
  • +
  • Bake mesh maps and export texture sets as PNG, EXR, TGA, JPEG or TIFF
  • +
  • Every action is a command, scriptable from a CLI and a JSON control channel
  • +
+
+ ai.storyteller.texturecraft.desktop + ai.storyteller.texturecraft + + https://getartcraft.com/apps/texturecraft + https://github.com/storytold/texturecraft/issues + https://github.com/storytold/texturecraft + https://discord.gg/artcraft + + Graphics + 3DGraphics + + + texture painting + pbr + 3d + mesh + + + #f0c39c + #8f4416 + + + 760 + + + keyboard + pointing + tablet + + + texturecraft + application/x-texturecraft + model/gltf-binary + model/gltf+json + model/obj + model/x-ply + model/stl + + + + + + diff --git a/packaging/linux/ai.storyteller.texturecraft.mime.xml b/packaging/linux/ai.storyteller.texturecraft.mime.xml new file mode 100644 index 00000000..9ec32b9e --- /dev/null +++ b/packaging/linux/ai.storyteller.texturecraft.mime.xml @@ -0,0 +1,41 @@ + + + + + TextureCraft project + + + + + + glTF binary model + + + + + + + glTF model + + + + + Wavefront OBJ model + + + + + PLY model + + + + + + + + STL model + + + diff --git a/packaging/linux/apprun-test.sh b/packaging/linux/apprun-test.sh new file mode 100644 index 00000000..0668cc80 --- /dev/null +++ b/packaging/linux/apprun-test.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# Smoke test for packaging/linux/AppRun: the AppImage's desktop integration writes +# and refreshes the host .desktop entry and icons, is idempotent, honours the opt-out +# and an unwritable HOME, and always launches the app. +# +# Runs in seconds with no build (CI: .github/workflows/packaging-lint.yml). +set -euo pipefail + +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd "$HERE/../.." && pwd)" +APP_ID=ai.storyteller.texturecraft + +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT + +# Fake AppDir with the real AppRun, .desktop template, icons, and a stub binary. +APPDIR="$TMP/TextureCraft.AppDir" +mkdir -p "$APPDIR/usr/bin" +install -Dm755 "$HERE/AppRun" "$APPDIR/AppRun" +install -Dm644 "$HERE/$APP_ID.desktop" "$APPDIR/usr/share/applications/$APP_ID.desktop" +mkdir -p "$APPDIR/usr/share/icons" +cp -R "$ROOT/assets/app-icon/hicolor" "$APPDIR/usr/share/icons/" +printf '#!/bin/sh\necho "stub: $*"\n' >"$APPDIR/usr/bin/texturecraft" +chmod +x "$APPDIR/usr/bin/texturecraft" + +APPIMAGE="$TMP/texturecraft test.AppImage" # spaces on purpose: Exec must stay quoted +: >"$APPIMAGE" +export APPIMAGE +export HOME="$TMP/home" +export XDG_DATA_HOME="$HOME/.local/share" +mkdir -p "$HOME" + +fail() { + echo "FAIL: $*" >&2 + exit 1 +} + +# 1. Launch works and passes arguments through. +out="$("$APPDIR/AppRun" open model.glb)" || fail "AppRun exited non-zero" +[ "$out" = "stub: open model.glb" ] || fail "arguments not forwarded: $out" + +DESKTOP="$XDG_DATA_HOME/applications/$APP_ID.desktop" +[ -f "$DESKTOP" ] || fail "desktop entry not installed" + +# 2. Exec rewritten to the AppImage (quoted, spaces intact), TryExec dropped, +# everything else preserved from the packaged entry. +expected_exec="Exec=\"$(readlink -f "$APPIMAGE")\" %F" +grep -Fxq "$expected_exec" "$DESKTOP" || fail "Exec not rewritten: $(grep '^Exec=' "$DESKTOP")" +grep -q '^TryExec=' "$DESKTOP" && fail "TryExec kept, the entry would be hidden" +grep -Fxq "Icon=$APP_ID" "$DESKTOP" || fail "Icon line lost" +grep -Fxq 'Categories=Graphics;3DGraphics;' "$DESKTOP" || fail "metadata lines lost" +if command -v desktop-file-validate >/dev/null; then + desktop-file-validate "$DESKTOP" || fail "generated desktop entry is invalid" +fi + +# 3. Icons landed under the name the .desktop entry references. +for f in "16x16/apps/$APP_ID.png" "256x256/apps/$APP_ID.png" "scalable/apps/$APP_ID.svg"; do + [ -f "$XDG_DATA_HOME/icons/hicolor/$f" ] || fail "icon missing: $f" +done + +# 4. Idempotent: a second launch must not rewrite anything (inode unchanged). +before="$(stat -c %i "$DESKTOP")" +out="$("$APPDIR/AppRun")" || fail "second launch exited non-zero" +[ "$out" = "stub: " ] || fail "second launch output: $out" +after="$(stat -c %i "$DESKTOP")" +[ "$before" = "$after" ] || fail "desktop entry rewritten although unchanged" + +# 5. Moving the AppImage refreshes Exec. +mv "$APPIMAGE" "$TMP/moved.AppImage" +export APPIMAGE="$TMP/moved.AppImage" +"$APPDIR/AppRun" >/dev/null || fail "launch after move exited non-zero" +grep -Fxq "Exec=\"$(readlink -f "$APPIMAGE")\" %F" "$DESKTOP" || fail "Exec not refreshed after move" + +# 6. Opt-out installs nothing. +rm -rf "$XDG_DATA_HOME" +TEXTURECRAFT_NO_DESKTOP_INTEGRATION=1 "$APPDIR/AppRun" >/dev/null || fail "opt-out launch exited non-zero" +[ ! -e "$XDG_DATA_HOME" ] || fail "opt-out still integrated" + +# 7. An unwritable data dir never blocks the launch. +mkdir -p "$TMP/ro" && chmod a-w "$TMP/ro" +out="$(XDG_DATA_HOME="$TMP/ro/data" "$APPDIR/AppRun" out.txt)" || fail "launch blocked by unwritable data dir" +[ "$out" = "stub: out.txt" ] || fail "stub not run against unwritable data dir: $out" +chmod u+w "$TMP/ro" + +# 8. No $APPIMAGE (extracted AppDir): launch only, nothing installed. +rm -rf "$XDG_DATA_HOME" +env -u APPIMAGE "$APPDIR/AppRun" >/dev/null || fail "extracted-AppDir launch exited non-zero" +[ ! -e "$XDG_DATA_HOME" ] || fail "integrated without $APPIMAGE" + +# 9. A path that would need Exec escaping (here a `$`): launch only, nothing installed. +rm -rf "$XDG_DATA_HOME" +odd="$TMP/odd\$(id).AppImage" +: >"$odd" +out="$(APPIMAGE="$odd" "$APPDIR/AppRun" x)" || fail "launch with an odd path exited non-zero" +[ "$out" = "stub: x" ] || fail "odd path: $out" +[ ! -e "$XDG_DATA_HOME" ] || fail "integrated an AppImage path that needs escaping" + +echo "AppRun desktop integration ok" diff --git a/packaging/linux/flatpak-bundle.sh b/packaging/linux/flatpak-bundle.sh new file mode 100644 index 00000000..3f9e4e07 --- /dev/null +++ b/packaging/linux/flatpak-bundle.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# Repackage a TextureCraft Linux tarball as a single-file Flatpak bundle: +# +# $DIST/texturecraft--linux-.flatpak +# +# Usage: packaging/linux/flatpak-bundle.sh [--no-test] [TARBALL] +# +# TARBALL defaults to $DIST/texturecraft--linux-.tar.gz from package.sh. The bundle +# is built for the host architecture (x86_64 or aarch64), which must match the tarball's. +# Needs flatpak, flatpak-builder and the SVG pixbuf loader (librsvg2-common) for the host's +# `appstreamcli compose`; the freedesktop runtime and SDK named in the manifest are +# installed per-user from Flathub. Unless --no-test, the bundle is then installed per-user and +# `texturecraft-cli --version` is run inside the sandbox as a smoke test. +# Manifest: packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml. +set -euo pipefail +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" +HERE="$ROOT/packaging/linux" +APP_ID=ai.storyteller.texturecraft +FLATHUB=https://dl.flathub.org/repo/flathub.flatpakrepo + +TEST=1 +TARBALL="" +while [ $# -gt 0 ]; do + case "$1" in + --no-test) TEST=0; shift ;; + -h | --help) sed -n '2,14p' "$0"; exit 0 ;; + -*) echo "unknown argument: $1" >&2; exit 2 ;; + *) TARBALL="$1"; shift ;; + esac +done + +ARCH="$(uname -m)" +case "$ARCH" in + x86_64) ;; + aarch64 | arm64) ARCH=aarch64 ;; + *) echo "unsupported architecture $ARCH" >&2; exit 2 ;; +esac +BASENAME="texturecraft-$VERSION-linux-$ARCH" +TARBALL="${TARBALL:-$DIST/$BASENAME.tar.gz}" +[ -f "$TARBALL" ] || { echo "error: $TARBALL not found (run packaging/linux/package.sh --formats tar first)" >&2; exit 1; } +for tool in flatpak flatpak-builder; do + command -v "$tool" >/dev/null || { echo "error: $tool not found (apt install flatpak flatpak-builder librsvg2-common)" >&2; exit 1; } +done + +echo "==> TextureCraft $VERSION Flatpak bundle for $ARCH from $(basename "$TARBALL")" + +WORK="$CARGO_TARGET_DIR/flatpak-bundle" +rm -rf "$WORK" +mkdir -p "$WORK/stage" +tar -xzf "$TARBALL" -C "$WORK/stage" --strip-components=1 +[ -x "$WORK/stage/bin/texturecraft" ] || { echo "error: $TARBALL has no bin/texturecraft" >&2; exit 1; } +cp "$HERE/flatpak/ai.storyteller.TextureCraft.bundle.yml" "$WORK/$APP_ID.yml" + +flatpak remote-add --user --if-not-exists flathub "$FLATHUB" +# --disable-rofiles-fuse: no FUSE in containers and CI runners. +flatpak-builder --user --install-deps-from=flathub --disable-rofiles-fuse --force-clean \ + --default-branch=stable --repo="$WORK/repo" --state-dir="$WORK/state" "$WORK/build" "$WORK/$APP_ID.yml" + +OUT="$DIST/$BASENAME.flatpak" +# --runtime-repo lets `flatpak install` fetch the freedesktop runtime from Flathub if missing. +flatpak build-bundle --runtime-repo="$FLATHUB" "$WORK/repo" "$OUT" "$APP_ID" stable +echo "wrote $OUT" + +if [ "$TEST" = 1 ]; then + flatpak install --user -y --noninteractive --reinstall "$OUT" + flatpak info --user "$APP_ID" + flatpak run --command=texturecraft-cli "$APP_ID" --version + flatpak run --command=sh "$APP_ID" -c 'ls /app/share/applications /app/share/metainfo /app/share/mime/packages /app/share/icons/hicolor/scalable/apps' +fi +echo "==> done" +ls -lh "$OUT" diff --git a/packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml b/packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml new file mode 100644 index 00000000..259e2396 --- /dev/null +++ b/packaging/linux/flatpak/ai.storyteller.TextureCraft.bundle.yml @@ -0,0 +1,50 @@ +# Flatpak manifest for the single-file bundle attached to every GitHub release +# (texturecraft--linux-.flatpak). Build it with packaging/linux/flatpak-bundle.sh. +# +# It repackages the release's own Linux tarball (texturecraft--linux-.tar.gz, +# built on Ubuntu 22.04 by package.sh) instead of compiling Rust inside flatpak-builder: no +# network and no vendored crate sources during the build, a few seconds instead of 20+ minutes, +# and byte-for-byte the same binaries as the AppImage/deb/rpm. The script unpacks the tarball +# into `stage/` next to a copy of this file. The binaries need glibc >= 2.35 and load X11, +# Wayland, xkbcommon and Vulkan at runtime; the freedesktop runtime has all of them, and the +# GPU driver comes from its org.freedesktop.Platform.GL extension. +# +# ai.storyteller.TextureCraft.yml (same directory) is the from-source manifest for Flathub. Keep +# runtime-version and finish-args identical in both (packaging-lint checks this). +id: ai.storyteller.texturecraft +runtime: org.freedesktop.Platform +runtime-version: '26.08' +sdk: org.freedesktop.Sdk +command: texturecraft +finish-args: + # Display: Wayland first; X11 only when no Wayland compositor is running. + - --socket=wayland + - --socket=fallback-x11 + # X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails. + - --share=ipc + # GPU access for the wgpu viewport (Vulkan, or GL as a fallback). + - --device=dri + # Open/Save dialogs go through the file-chooser portal (rfd's xdg-portal backend) and + # drag-and-drop through the document portal, so picked files work anywhere without broad + # filesystem access. Pictures and Documents are granted so files passed by path (the command + # line, Open Recent, "Save" next to the original) work in the usual places. + - --filesystem=xdg-pictures + - --filesystem=xdg-documents + # Deliberately not granted: network (the optional --control server listens on 127.0.0.1 in + # the sandbox; `flatpak override --user --share=network ai.storyteller.texturecraft` exposes it to + # host agents) and home/host filesystem access. +modules: + - name: texturecraft + buildsystem: simple + build-commands: + - install -Dm755 bin/texturecraft /app/bin/texturecraft + - install -Dm755 bin/texturecraft-cli /app/bin/texturecraft-cli + - install -Dm644 share/applications/ai.storyteller.texturecraft.desktop /app/share/applications/ai.storyteller.texturecraft.desktop + # .tcraft, plus mesh types older shared-mime-info databases lack. + - install -Dm644 share/mime/packages/ai.storyteller.texturecraft.xml /app/share/mime/packages/ai.storyteller.texturecraft.xml + # Already has the release's version and date substituted by package.sh. + - install -Dm644 share/metainfo/ai.storyteller.texturecraft.metainfo.xml /app/share/metainfo/ai.storyteller.texturecraft.metainfo.xml + - mkdir -p /app/share/icons /app/share/doc && cp -R share/icons/hicolor /app/share/icons/ && cp -R share/doc/texturecraft /app/share/doc/ + sources: + - type: dir + path: stage diff --git a/packaging/linux/flatpak/ai.storyteller.TextureCraft.yml b/packaging/linux/flatpak/ai.storyteller.TextureCraft.yml new file mode 100644 index 00000000..3b680178 --- /dev/null +++ b/packaging/linux/flatpak/ai.storyteller.TextureCraft.yml @@ -0,0 +1,66 @@ +# Flatpak manifest for TextureCraft, ready for a Flathub submission. +# +# Flatpak builds run offline, so the crate sources must be vendored first. From the repo root: +# +# curl -fsSLO https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py +# python3 flatpak-cargo-generator.py Cargo.lock -o packaging/linux/flatpak/cargo-sources.json +# flatpak-builder --user --install --force-clean build-flatpak packaging/linux/flatpak/ai.storyteller.TextureCraft.yml +# flatpak run ai.storyteller.texturecraft +# +# For Flathub, replace the `dir` source with a `git` source pinned to a release tag and commit. +# The single-file .flatpak attached to each release comes from ai.storyteller.TextureCraft.bundle.yml, +# which repackages the prebuilt release binaries. Keep runtime-version and finish-args identical. +id: ai.storyteller.texturecraft +runtime: org.freedesktop.Platform +runtime-version: '26.08' +sdk: org.freedesktop.Sdk +sdk-extensions: + - org.freedesktop.Sdk.Extension.rust-stable +command: texturecraft +finish-args: + # Display: Wayland first; X11 only when no Wayland compositor is running. + - --socket=wayland + - --socket=fallback-x11 + # X11 shared memory (MIT-SHM). Without it the X11 fallback is slow or fails. + - --share=ipc + # GPU access for the wgpu viewport (Vulkan, or GL as a fallback). + - --device=dri + # Open/Save dialogs go through the file-chooser portal (rfd's xdg-portal backend) and + # drag-and-drop through the document portal, so picked files work anywhere without broad + # filesystem access. Pictures and Documents are granted so files passed by path (the command + # line, Open Recent, "Save" next to the original) work in the usual places. + - --filesystem=xdg-pictures + - --filesystem=xdg-documents + # Deliberately not granted: network (the optional --control server listens on 127.0.0.1 in + # the sandbox; `flatpak override --user --share=network ai.storyteller.texturecraft` exposes it to + # host agents) and home/host filesystem access. +build-options: + append-path: /usr/lib/sdk/rust-stable/bin +modules: + - name: texturecraft + buildsystem: simple + build-options: + env: + CARGO_HOME: /run/build/texturecraft/cargo + CARGO_NET_OFFLINE: 'true' + build-commands: + - cargo --offline build --release --locked -p texturecraft -p texturecraft-cli + - install -Dm755 target/release/texturecraft /app/bin/texturecraft + - install -Dm755 target/release/texturecraft-cli /app/bin/texturecraft-cli + - install -Dm644 packaging/linux/ai.storyteller.texturecraft.desktop /app/share/applications/ai.storyteller.texturecraft.desktop + - install -Dm644 packaging/linux/ai.storyteller.texturecraft.mime.xml /app/share/mime/packages/ai.storyteller.texturecraft.xml + - mkdir -p /app/share/icons && cp -R assets/app-icon/hicolor /app/share/icons/ + - >- + version=$(awk '/^\[/{p=($0=="[workspace.package]");next} p&&$1=="version"{gsub(/[" ]/,"",$3);print $3;exit}' Cargo.toml); + install -d /app/share/metainfo; + sed -e "s/@VERSION@/$version/" -e "s/@DATE@/$(date -u +%Y-%m-%d)/" + packaging/linux/ai.storyteller.texturecraft.metainfo.xml.in > /app/share/metainfo/ai.storyteller.texturecraft.metainfo.xml + sources: + - type: dir + path: ../../.. + skip: + - target + - dist + - build-flatpak + - .flatpak-builder + - cargo-sources.json diff --git a/packaging/linux/nfpm.yaml b/packaging/linux/nfpm.yaml new file mode 100644 index 00000000..30aca20a --- /dev/null +++ b/packaging/linux/nfpm.yaml @@ -0,0 +1,81 @@ +# .deb and .rpm packages (nfpm: https://nfpm.goreleaser.com). Run by package.sh, which stages +# the file tree, substitutes its path for ${STAGE} (nfpm doesn't expand env vars in `src`) and +# exports VERSION and NFPM_ARCH. +# +# nfpm package -f packaging/linux/nfpm.yaml -p deb -t dist/release/ +name: texturecraft +arch: ${NFPM_ARCH} +platform: linux +version: ${VERSION} +# semver: 0.2.0-rc.1 becomes 0.2.0~rc.1 in deb/rpm, so pre-releases sort before the release. +version_schema: semver +release: 1 +section: graphics +priority: optional +maintainer: ${TEXTURECRAFT_MAINTAINER} +vendor: Learning Machines LLC +homepage: https://getartcraft.com/apps/texturecraft +license: MIT OR Apache-2.0 +description: |- + Open-source, native 3D texture painter that works the way Substance 3D + Painter users expect. Paints PBR texture sets directly on glTF, OBJ, PLY and + STL meshes with layers, masks, fills and smart materials; bakes mesh maps; + exports texture sets for game engines. GPU viewport (wgpu). + Includes texturecraft-cli, a headless converter and command runner. + +# The binaries link only glibc and libgcc_s directly. Windowing (X11/Wayland, xkbcommon) and the +# GPU (Vulkan, EGL/GL) are loaded at runtime with dlopen, so they aren't ELF NEEDED entries and +# the package tools can't find them: list them here. winit 0.30 loads, for X11: libX11, +# libX11-xcb, libxcb, libXcursor, libXi, libxkbcommon and libxkbcommon-x11 (missing +# libxkbcommon-x11 panics); for Wayland: libwayland-client and libxkbcommon. wgpu needs libvulkan +# or libEGL. RandR goes through x11rb's protocol code and fonts are found by scanning directories, +# so libXrandr and fontconfig aren't loaded. +overrides: + deb: + depends: + - libc6 (>= 2.35) + - libgcc-s1 + - libxkbcommon0 + - libxkbcommon-x11-0 + - libwayland-client0 + - libx11-6 + - libx11-xcb1 + - libxcb1 + - libxcursor1 + - libxi6 + - libvulkan1 | libegl1 + recommends: + - mesa-vulkan-drivers + - libegl-mesa0 + - xdg-desktop-portal + rpm: + # Soname provides rather than package names, so the same requirements resolve on Fedora/RHEL + # (libxkbcommon-x11, libX11-xcb, ...) and openSUSE (libxkbcommon-x11-0, libX11-xcb1, ...). + depends: + - libxkbcommon.so.0()(64bit) + - libxkbcommon-x11.so.0()(64bit) + - libwayland-client.so.0()(64bit) + - libX11.so.6()(64bit) + - libX11-xcb.so.1()(64bit) + - libxcb.so.1()(64bit) + - libXcursor.so.1()(64bit) + - libXi.so.6()(64bit) + - (libvulkan.so.1()(64bit) or libEGL.so.1()(64bit)) + recommends: + - mesa-vulkan-drivers + - xdg-desktop-portal + +contents: + - src: ${STAGE}/usr/bin/texturecraft + dst: /usr/bin/texturecraft + file_info: { mode: 0755 } + - src: ${STAGE}/usr/bin/texturecraft-cli + dst: /usr/bin/texturecraft-cli + file_info: { mode: 0755 } + - src: ${STAGE}/usr/share/ + dst: /usr/share/ + type: tree + +scripts: + postinstall: packaging/linux/postinst.sh + postremove: packaging/linux/postinst.sh diff --git a/packaging/linux/package.sh b/packaging/linux/package.sh new file mode 100644 index 00000000..81f8884d --- /dev/null +++ b/packaging/linux/package.sh @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +# Build and package TextureCraft for Linux ( is x86_64 or aarch64): +# +# $DIST/texturecraft--linux-.AppImage any distro with glibc >= the build host's +# $DIST/texturecraft--linux-.AppImage.zsync delta updates (needs zsyncmake) +# $DIST/texturecraft--linux-.deb Debian, Ubuntu, Mint, Pop!_OS, ... +# $DIST/texturecraft--linux-.rpm Fedora, openSUSE, RHEL, ... +# $DIST/texturecraft--linux-.tar.gz plain FHS-style tree (bin/, share/) +# +# Usage: packaging/linux/package.sh [--skip-build] [--formats "appimage deb rpm tar"] +# +# Needs: cargo; nfpm for deb/rpm (https://nfpm.goreleaser.com); appimagetool for the AppImage +# (downloaded into $CARGO_TARGET_DIR if missing). Build on an old distro (CI: Ubuntu 22.04, +# glibc 2.35) so the binaries run on newer ones. Optional: desktop-file-validate, appstreamcli, +# zsyncmake (the zsync package) for the AppImage's .zsync. +set -euo pipefail +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" +HERE="$ROOT/packaging/linux" +APP_ID=ai.storyteller.texturecraft + +SKIP_BUILD=0 +FORMATS="appimage deb rpm tar" +while [ $# -gt 0 ]; do + case "$1" in + --skip-build) SKIP_BUILD=1; shift ;; + --formats) FORMATS="$2"; shift 2 ;; + -h | --help) sed -n '2,15p' "$0"; exit 0 ;; + *) echo "unknown argument: $1" >&2; exit 2 ;; + esac +done + +ARCH="$(uname -m)" +case "$ARCH" in + x86_64) DEB_ARCH=amd64 ;; + aarch64 | arm64) ARCH=aarch64; DEB_ARCH=arm64 ;; + *) echo "unsupported architecture $ARCH" >&2; exit 2 ;; +esac +export TEXTURECRAFT_MAINTAINER="${TEXTURECRAFT_MAINTAINER:-TextureCraft maintainers }" +BASENAME="texturecraft-$VERSION-linux-$ARCH" + +echo "==> TextureCraft $VERSION for Linux $ARCH ($FORMATS)" + +if [ "$SKIP_BUILD" = 0 ]; then + (cd "$ROOT" && cargo build --release --locked -p texturecraft -p texturecraft-cli) +fi +BIN="$CARGO_TARGET_DIR/release" +WORK="$CARGO_TARGET_DIR/linux-package" +STAGE="$WORK/root" +rm -rf "$WORK" + +# ---- stage an FHS tree (shared by every format) ------------------------------------------------- +install -Dm755 "$BIN/texturecraft" "$STAGE/usr/bin/texturecraft" +install -Dm755 "$BIN/texturecraft-cli" "$STAGE/usr/bin/texturecraft-cli" +strip "$STAGE/usr/bin/texturecraft" "$STAGE/usr/bin/texturecraft-cli" 2>/dev/null || true +install -Dm644 "$HERE/$APP_ID.desktop" "$STAGE/usr/share/applications/$APP_ID.desktop" +install -Dm644 "$HERE/$APP_ID.mime.xml" "$STAGE/usr/share/mime/packages/$APP_ID.xml" +mkdir -p "$STAGE/usr/share/metainfo" +sed -e "s/@VERSION@/$VERSION/g" -e "s/@DATE@/$TEXTURECRAFT_BUILD_DATE/g" \ + "$HERE/$APP_ID.metainfo.xml.in" >"$STAGE/usr/share/metainfo/$APP_ID.metainfo.xml" +mkdir -p "$STAGE/usr/share/icons" +cp -R "$ROOT/assets/app-icon/hicolor" "$STAGE/usr/share/icons/" +mkdir -p "$STAGE/usr/share/doc/texturecraft" +copy_docs "$STAGE/usr/share/doc/texturecraft" + +if command -v desktop-file-validate >/dev/null; then + desktop-file-validate "$STAGE/usr/share/applications/$APP_ID.desktop" +fi +if command -v appstreamcli >/dev/null; then + appstreamcli validate --no-net --explain "$STAGE/usr/share/metainfo/$APP_ID.metainfo.xml" +fi + +has() { case " $FORMATS " in *" $1 "*) return 0 ;; *) return 1 ;; esac; } + +# ---- .tar.gz ------------------------------------------------------------------------------------ +if has tar; then + mkdir -p "$WORK/tar" + cp -R "$STAGE/usr" "$WORK/tar/$BASENAME" + tar -C "$WORK/tar" -czf "$DIST/$BASENAME.tar.gz" "$BASENAME" + echo "wrote $DIST/$BASENAME.tar.gz" +fi + +# ---- .deb / .rpm -------------------------------------------------------------------------------- +if has deb || has rpm; then + command -v nfpm >/dev/null || { echo "error: nfpm not found (https://nfpm.goreleaser.com/install/)" >&2; exit 1; } + export VERSION + export NFPM_ARCH="$DEB_ARCH" + # nfpm expands env vars in fields like `version` and `arch`, but not in `contents[].src`. + sed "s|\${STAGE}|$STAGE|g" "$HERE/nfpm.yaml" >"$WORK/nfpm.yaml" + for fmt in deb rpm; do + if has "$fmt"; then (cd "$ROOT" && nfpm package -f "$WORK/nfpm.yaml" -p "$fmt" -t "$DIST/$BASENAME.$fmt"); fi + done +fi + +# ---- AppImage ----------------------------------------------------------------------------------- +if has appimage; then + APPDIR="$WORK/TextureCraft.AppDir" + cp -R "$STAGE" "$APPDIR" + mv "$APPDIR/usr/share/doc" "$WORK/doc-unused" + # AppRun is a script, not a symlink: it installs the .desktop entry and icons into + # $XDG_DATA_HOME before launching, so Wayland compositors can resolve the window's + # app_id to our icon instead of the generic Wayland logo (opt-out env in the + # script header). Logic is covered by packaging/linux/apprun-test.sh. + install -Dm755 "$HERE/AppRun" "$APPDIR/AppRun" + cp "$HERE/$APP_ID.desktop" "$APPDIR/$APP_ID.desktop" + cp "$ROOT/assets/app-icon/hicolor/256x256/apps/$APP_ID.png" "$APPDIR/$APP_ID.png" + ln -s "$APP_ID.png" "$APPDIR/.DirIcon" + + TOOL="${APPIMAGETOOL:-$(command -v appimagetool || true)}" + if [ -z "$TOOL" ]; then + TOOL="$CARGO_TARGET_DIR/appimagetool-$ARCH.AppImage" + if [ ! -x "$TOOL" ]; then + curl -fsSL -o "$TOOL" "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage" + chmod +x "$TOOL" + fi + fi + # Absolute, because appimagetool runs in $DIST below (CARGO_TARGET_DIR or APPIMAGETOOL may be + # relative, e.g. target/agent-). + OUT="$(cd "$DIST" && pwd)/$BASENAME.AppImage" + APPDIR="$(cd "$APPDIR" && pwd)" + TOOL="$(cd "$(dirname "$TOOL")" && pwd)/$(basename "$TOOL")" + # A .zsync left by an earlier run would hide a missing zsyncmake and describe another file. + rm -f "$OUT.zsync" + # Update information: AppImageUpdate, AppImageLauncher and the like read it from the + # file and fetch only the blocks that changed in a newer release, through the .zsync published + # next to each AppImage on GitHub Releases. `latest` is the newest published release that is + # not a pre-release. A fork's builds point at its own releases through GITHUB_REPOSITORY. + REPO="${GITHUB_REPOSITORY:-storytold/texturecraft}" + UPDATE_INFO="gh-releases-zsync|${REPO%%/*}|${REPO#*/}|latest|texturecraft-*-linux-$ARCH.AppImage.zsync" + # Extract-and-run: works without FUSE (containers, CI). The output embeds the static runtime, + # so users don't need libfuse2 either. With zsyncmake on the host (CI installs the zsync + # package) appimagetool also writes the .zsync, into its working directory, hence the cd. + (cd "$DIST" && ARCH="$ARCH" APPIMAGE_EXTRACT_AND_RUN=1 "$TOOL" --no-appstream -u "$UPDATE_INFO" "$APPDIR" "$OUT") + echo "wrote $OUT" + if [ -s "$OUT.zsync" ]; then + echo "wrote $OUT.zsync" + else + warn "zsyncmake not found, so $OUT.zsync was not written; AppImage delta updates need it" + fi +fi + +"$STAGE/usr/bin/texturecraft-cli" --version +echo "==> done" +ls -lh "$DIST" diff --git a/packaging/linux/postinst.sh b/packaging/linux/postinst.sh new file mode 100644 index 00000000..775e4df9 --- /dev/null +++ b/packaging/linux/postinst.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# deb/rpm post-install and post-remove: refresh the desktop, MIME and icon caches. +# Every tool is optional; missing ones are skipped. +if command -v update-desktop-database >/dev/null 2>&1; then + update-desktop-database -q /usr/share/applications || true +fi +if command -v update-mime-database >/dev/null 2>&1; then + update-mime-database /usr/share/mime || true +fi +if command -v gtk-update-icon-cache >/dev/null 2>&1; then + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true +fi +exit 0 diff --git a/packaging/macos/Info.plist.in b/packaging/macos/Info.plist.in new file mode 100644 index 00000000..29391ec0 --- /dev/null +++ b/packaging/macos/Info.plist.in @@ -0,0 +1,183 @@ + + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + TextureCraft + CFBundleName + TextureCraft + CFBundleExecutable + TextureCraft + CFBundleIdentifier + ai.storyteller.texturecraft + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleShortVersionString + @SHORT_VERSION@ + CFBundleVersion + @SHORT_VERSION@ + TextureCraftVersion + @VERSION@ + TextureCraftBuildCommit + @BUILD_SHA@ + CFBundleIconFile + TextureCraft + LSApplicationCategoryType + public.app-category.graphics-design + + LSMinimumSystemVersion + 11.0 + NSHighResolutionCapable + + NSSupportsAutomaticGraphicsSwitching + + NSRequiresAquaSystemAppearance + + NSHumanReadableCopyright + Copyright © the TextureCraft contributors. MIT OR Apache-2.0. + + + UTExportedTypeDeclarations + + + UTTypeIdentifier + ai.storyteller.texturecraft.project + UTTypeDescription + TextureCraft Project + UTTypeConformsTo + + public.data + public.content + + UTTypeIconFile + TextureCraft + UTTypeTagSpecification + + public.filename-extension + tcraft + public.mime-type + application/x-texturecraft + + + + + UTImportedTypeDeclarations + + + UTTypeIdentifier + ai.storyteller.texturecraft.gltf-binary + UTTypeDescription + glTF Binary Model + UTTypeConformsTo + public.datapublic.3d-content + UTTypeTagSpecification + + public.filename-extension + glb + public.mime-type + model/gltf-binary + + + + UTTypeIdentifier + ai.storyteller.texturecraft.gltf + UTTypeDescription + glTF Model + UTTypeConformsTo + public.datapublic.3d-content + UTTypeTagSpecification + + public.filename-extension + gltf + public.mime-type + model/gltf+json + + + + UTTypeIdentifier + public.geometry-definition-format + UTTypeDescription + Wavefront OBJ Model + UTTypeConformsTo + public.datapublic.3d-content + UTTypeTagSpecification + + public.filename-extension + obj + public.mime-type + model/obj + + + + UTTypeIdentifier + public.polygon-file-format + UTTypeDescription + PLY Model + UTTypeConformsTo + public.datapublic.3d-content + UTTypeTagSpecification + + public.filename-extension + ply + + + + UTTypeIdentifier + public.standard-tesselated-geometry-format + UTTypeDescription + STL Model + UTTypeConformsTo + public.datapublic.3d-content + UTTypeTagSpecification + + public.filename-extension + stl + public.mime-type + model/stl + + + + + CFBundleDocumentTypes + + + CFBundleTypeName + TextureCraft Project + CFBundleTypeRole + Editor + LSHandlerRank + Owner + CFBundleTypeIconFile + TextureCraft + LSItemContentTypes + ai.storyteller.texturecraft.project + + + + CFBundleTypeName + 3D Model + CFBundleTypeRole + Viewer + LSHandlerRank + Alternate + LSItemContentTypes + + ai.storyteller.texturecraft.gltf-binary + ai.storyteller.texturecraft.gltf + public.geometry-definition-format + public.polygon-file-format + public.standard-tesselated-geometry-format + + + + + diff --git a/packaging/macos/entitlements.plist b/packaging/macos/entitlements.plist new file mode 100644 index 00000000..295c5d95 --- /dev/null +++ b/packaging/macos/entitlements.plist @@ -0,0 +1,9 @@ + + + + + + + diff --git a/packaging/macos/import-cert.sh b/packaging/macos/import-cert.sh new file mode 100644 index 00000000..249dfed1 --- /dev/null +++ b/packaging/macos/import-cert.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# CI only: import the Developer ID certificate into a temporary keychain so codesign can use it. +# +# Inputs (env): APPLE_CERTIFICATE (base64 .p12), APPLE_CERTIFICATE_PASSWORD, KEYCHAIN_PASSWORD +# (optional; random if unset), RUNNER_TEMP (or TMPDIR). +# Outputs: MACOS_SIGN_IDENTITY (SHA-1 of the identity) and MACOS_KEYCHAIN, appended to +# $GITHUB_ENV when running in Actions, otherwise printed. +# +# Missing certificate: prints a warning and exits 0, so package.sh falls back to ad-hoc signing. +set -euo pipefail +umask 077 +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" + +if [ -z "${APPLE_CERTIFICATE:-}" ]; then + warn "APPLE_CERTIFICATE is not set: macOS builds will be ad-hoc signed and not notarized" + exit 0 +fi + +TMP="${RUNNER_TEMP:-${TMPDIR:-/tmp}}" +KEYCHAIN="$TMP/texturecraft-signing.keychain-db" +CERT="$TMP/texturecraft-signing.p12" +KC_PASS="${KEYCHAIN_PASSWORD:-$(openssl rand -hex 24)}" + +trap 'rm -f "$CERT"' EXIT +printf '%s' "$APPLE_CERTIFICATE" | base64 --decode >"$CERT" +security create-keychain -p "$KC_PASS" "$KEYCHAIN" +security set-keychain-settings -lut 21600 "$KEYCHAIN" +security unlock-keychain -p "$KC_PASS" "$KEYCHAIN" +security import "$CERT" -P "${APPLE_CERTIFICATE_PASSWORD:-}" -T /usr/bin/codesign -T /usr/bin/security -t cert -f pkcs12 -k "$KEYCHAIN" +rm -f "$CERT" +# Let codesign use the key without a UI prompt. +security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KC_PASS" "$KEYCHAIN" >/dev/null +# Put it on the search list (keeping the login keychain) so codesign and notarytool find it. +# shellcheck disable=SC2046 +security list-keychains -d user -s "$KEYCHAIN" $(security list-keychains -d user | tr -d '"') + +IDENTITY="$(security find-identity -v -p codesigning "$KEYCHAIN" | awk '/Developer ID Application/ { print $2; exit }')" +if [ -z "$IDENTITY" ]; then + security find-identity -v -p codesigning "$KEYCHAIN" >&2 + echo "error: no 'Developer ID Application' identity in APPLE_CERTIFICATE" >&2 + exit 1 +fi +echo "Imported signing identity $IDENTITY" +if [ -n "${GITHUB_ENV:-}" ]; then + { echo "MACOS_SIGN_IDENTITY=$IDENTITY"; echo "MACOS_KEYCHAIN=$KEYCHAIN"; } >>"$GITHUB_ENV" +else + echo "MACOS_SIGN_IDENTITY=$IDENTITY" + echo "MACOS_KEYCHAIN=$KEYCHAIN" +fi diff --git a/packaging/macos/package.sh b/packaging/macos/package.sh new file mode 100644 index 00000000..43a3c218 --- /dev/null +++ b/packaging/macos/package.sh @@ -0,0 +1,165 @@ +#!/usr/bin/env bash +# Build, sign and (optionally) notarize the macOS release artifacts: +# +# $DIST/texturecraft--macos-.dmg TextureCraft.app on a drag-to-Applications DMG +# $DIST/texturecraft-cli--macos-.zip the headless CLI +# +# Usage: packaging/macos/package.sh [--arch universal|aarch64|x86_64] [--skip-build] +# +# Signing (env): +# MACOS_SIGN_IDENTITY codesign identity (name or SHA-1). Default "-" = ad-hoc (local testing; +# Gatekeeper will reject the result on other Macs). In CI, import-cert.sh sets it. +# MACOS_KEYCHAIN keychain holding the identity (optional) +# Notarization (env; all three needed, and a real identity): +# APPLE_ID, APPLE_PASSWORD (app-specific password), APPLE_TEAM_ID +set -euo pipefail +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" +HERE="$ROOT/packaging/macos" + +ARCH=universal +SKIP_BUILD=0 +while [ $# -gt 0 ]; do + case "$1" in + --arch) ARCH="$2"; shift 2 ;; + --skip-build) SKIP_BUILD=1; shift ;; + -h | --help) sed -n '2,16p' "$0"; exit 0 ;; + *) echo "unknown argument: $1" >&2; exit 2 ;; + esac +done +case "$ARCH" in + universal) TARGETS=(aarch64-apple-darwin x86_64-apple-darwin) ;; + aarch64) TARGETS=(aarch64-apple-darwin) ;; + x86_64) TARGETS=(x86_64-apple-darwin) ;; + *) echo "unknown --arch $ARCH" >&2; exit 2 ;; +esac + +# Keep in sync with LSMinimumSystemVersion in Info.plist.in. +export MACOSX_DEPLOYMENT_TARGET=11.0 +IDENTITY="${MACOS_SIGN_IDENTITY:--}" +SHORT_VERSION="${VERSION%%-*}" +WORK="$CARGO_TARGET_DIR/macos-package" +APP="$WORK/TextureCraft.app" +DMG="$DIST/texturecraft-$VERSION-macos-$ARCH.dmg" +CLI_ZIP="$DIST/texturecraft-cli-$VERSION-macos-$ARCH.zip" + +NOTARIZE=0 +if [ "$IDENTITY" = "-" ]; then + warn "macOS: ad-hoc signing (no MACOS_SIGN_IDENTITY); artifacts are not notarized" +elif [ -n "${APPLE_ID:-}" ] && [ -n "${APPLE_PASSWORD:-}" ] && [ -n "${APPLE_TEAM_ID:-}" ]; then + NOTARIZE=1 +else + warn "macOS: APPLE_ID / APPLE_PASSWORD / APPLE_TEAM_ID incomplete; signed but not notarized" +fi + +echo "==> TextureCraft $VERSION for macOS ($ARCH), identity: $IDENTITY, notarize: $NOTARIZE" + +# ---- build ------------------------------------------------------------------------------------- +if [ "$SKIP_BUILD" = 0 ]; then + args=() + for t in "${TARGETS[@]}"; do args+=(--target "$t"); done + (cd "$ROOT" && cargo build --release --locked -p texturecraft -p texturecraft-cli "${args[@]}") +fi + +rm -rf "$WORK" +mkdir -p "$WORK/bin" +for bin in texturecraft texturecraft-cli; do + inputs=() + for t in "${TARGETS[@]}"; do inputs+=("$CARGO_TARGET_DIR/$t/release/$bin"); done + lipo -create -output "$WORK/bin/$bin" "${inputs[@]}" + lipo -info "$WORK/bin/$bin" +done + +# ---- signing helpers --------------------------------------------------------------------------- +sign() { + # Hardened runtime + secure timestamp for a real identity; ad-hoc can't be timestamped. + local ts=(--timestamp) + [ "$IDENTITY" = "-" ] && ts=(--timestamp=none) + local kc=() + [ -n "${MACOS_KEYCHAIN:-}" ] && kc=(--keychain "$MACOS_KEYCHAIN") + codesign --force --sign "$IDENTITY" ${kc[@]+"${kc[@]}"} "${ts[@]}" "$@" +} + +notarize() { + local file="$1" out id status + echo "==> notarizing $(basename "$file") (this can take a few minutes)" + out="$(xcrun notarytool submit "$file" --apple-id "$APPLE_ID" --password "$APPLE_PASSWORD" \ + --team-id "$APPLE_TEAM_ID" --wait --timeout 1h --output-format json)" || true + echo "$out" + id="$(printf '%s' "$out" | plutil -extract id raw -o - - 2>/dev/null || true)" + status="$(printf '%s' "$out" | plutil -extract status raw -o - - 2>/dev/null || true)" + if [ "$status" != "Accepted" ]; then + if [ -n "$id" ]; then + xcrun notarytool log "$id" --apple-id "$APPLE_ID" --password "$APPLE_PASSWORD" --team-id "$APPLE_TEAM_ID" || true + fi + echo "error: notarization of $(basename "$file") failed (status: ${status:-unknown})" >&2 + exit 1 + fi +} + +# ---- TextureCraft.app ---------------------------------------------------------------------------- +echo "==> assembling $APP" +mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" +# Executable and icon carry the display name (CFBundleExecutable / CFBundleIconFile). +cp "$WORK/bin/texturecraft" "$APP/Contents/MacOS/TextureCraft" +cp "$ROOT/assets/app-icon/texturecraft.icns" "$APP/Contents/Resources/TextureCraft.icns" +sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" \ + -e "s/@BUILD_SHA@/${TEXTURECRAFT_BUILD_SHA:-unknown}/g" \ + "$HERE/Info.plist.in" >"$APP/Contents/Info.plist" +plutil -lint "$APP/Contents/Info.plist" +printf 'APPL????' >"$APP/Contents/PkgInfo" + +# Sign inside-out: nested code first, then the bundle itself (no --deep on the final signature). +# Today the only nested code is the main executable; frameworks/helpers would be signed here too. +sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP/Contents/MacOS/TextureCraft" +sign --options runtime --entitlements "$HERE/entitlements.plist" "$APP" +codesign --verify --strict --deep --verbose=2 "$APP" + +if [ "$NOTARIZE" = 1 ]; then + ditto -c -k --keepParent "$APP" "$WORK/TextureCraft-notarize.zip" + notarize "$WORK/TextureCraft-notarize.zip" + xcrun stapler staple "$APP" + xcrun stapler validate "$APP" + spctl --assess --type execute -vvv "$APP" +fi + +# ---- DMG --------------------------------------------------------------------------------------- +echo "==> building $DMG" +STAGE="$WORK/dmg" +mkdir -p "$STAGE" +ditto "$APP" "$STAGE/TextureCraft.app" +ln -s /Applications "$STAGE/Applications" +rm -f "$DMG" "$WORK/raw.dmg" +# makehybrid + convert builds the image without attaching a device, unlike `create -srcfolder`, +# which is flaky on CI runners ("Resource busy") and hangs in sandboxed sessions. +hdiutil makehybrid -hfs -hfs-volume-name "TextureCraft $VERSION" -hfs-openfolder "$STAGE" -o "$WORK/raw.dmg" "$STAGE" +hdiutil convert "$WORK/raw.dmg" -format UDZO -imagekey zlib-level=9 -o "$DMG" +rm -f "$WORK/raw.dmg" +sign "$DMG" +codesign --verify --strict --verbose=2 "$DMG" +if [ "$NOTARIZE" = 1 ]; then + notarize "$DMG" + xcrun stapler staple "$DMG" + xcrun stapler validate "$DMG" + spctl --assess --type open --context context:primary-signature -vvv "$DMG" +fi + +# ---- CLI --------------------------------------------------------------------------------------- +echo "==> building $CLI_ZIP" +CLI_DIR="$WORK/texturecraft-cli-$VERSION-macos-$ARCH" +mkdir -p "$CLI_DIR" +cp "$WORK/bin/texturecraft-cli" "$CLI_DIR/" +copy_docs "$CLI_DIR" +# Same Developer ID and hardened runtime as the app, with an explicit reverse-DNS identifier +# (codesign would otherwise use the bare file name). +sign --options runtime --identifier ai.storyteller.texturecraft-cli "$CLI_DIR/texturecraft-cli" +codesign --verify --strict --verbose=2 "$CLI_DIR/texturecraft-cli" +rm -f "$CLI_ZIP" +ditto -c -k --keepParent "$CLI_DIR" "$CLI_ZIP" +# notarytool accepts a zip of the bare binary. A bare Mach-O can't carry a stapled ticket, so +# Gatekeeper looks the notarization up online when a quarantined copy first runs. +if [ "$NOTARIZE" = 1 ]; then notarize "$CLI_ZIP"; fi + +"$WORK/bin/texturecraft-cli" --version +echo "==> done (check the artifacts as shipped with packaging/macos/verify.sh --arch $ARCH)" +ls -lh "$DMG" "$CLI_ZIP" diff --git a/packaging/macos/verify.sh b/packaging/macos/verify.sh new file mode 100644 index 00000000..30dc1458 --- /dev/null +++ b/packaging/macos/verify.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +# Check the macOS release artifacts exactly as users download them: +# +# $DIST/texturecraft--macos-.dmg signed, notarized, ticket stapled +# $DIST/texturecraft-cli--macos-.zip unpacked here; the binary inside must be +# Developer ID signed with the hardened runtime, +# timestamped and notarized +# +# Usage: packaging/macos/verify.sh [--arch universal|aarch64|x86_64] +# +# With a real signing identity and notarization credentials in the environment (the same +# MACOS_SIGN_IDENTITY / APPLE_ID / APPLE_PASSWORD / APPLE_TEAM_ID that package.sh uses), every +# check is strict and a failure exits non-zero. Without them (local ad-hoc builds, or a release run +# whose secrets are missing) only the signature's integrity is checked and the rest is a warning, +# matching package.sh. Nothing here reads or prints a secret's value; it only tests whether one is set. +# +# A bare Mach-O can't carry a stapled notarization ticket (only .app, .dmg and .pkg can), so for the +# CLI Gatekeeper looks the ticket up online the first time a quarantined copy runs. `spctl --assess +# --type install` does that same online lookup here, which is how this script proves the CLI was +# notarized. +set -euo pipefail +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" + +ARCH=universal +while [ $# -gt 0 ]; do + case "$1" in + --arch) ARCH="$2"; shift 2 ;; + -h | --help) sed -n '2,20p' "$0"; exit 0 ;; + *) echo "unknown argument: $1" >&2; exit 2 ;; + esac +done +case "$ARCH" in + universal) WANT_ARCHS="x86_64 arm64" ;; + aarch64) WANT_ARCHS="arm64" ;; + x86_64) WANT_ARCHS="x86_64" ;; + *) echo "unknown --arch $ARCH" >&2; exit 2 ;; +esac + +DMG="$DIST/texturecraft-$VERSION-macos-$ARCH.dmg" +CLI_ZIP="$DIST/texturecraft-cli-$VERSION-macos-$ARCH.zip" +IDENTITY="${MACOS_SIGN_IDENTITY:--}" +STRICT=0 +if [ "$IDENTITY" != "-" ] && [ -n "${APPLE_ID:-}" ] && [ -n "${APPLE_PASSWORD:-}" ] && [ -n "${APPLE_TEAM_ID:-}" ]; then + STRICT=1 +fi + +FAILED=0 +fail() { + if [ "$STRICT" = 1 ]; then + echo "error: $*" >&2 + FAILED=1 + else + warn "$* (expected without signing secrets)" + fi +} + +# spctl's online ticket lookup can lag a few seconds behind notarytool's "Accepted". +assess() { + local out attempt tries=1 + [ "$STRICT" = 1 ] && tries=5 + for attempt in $(seq "$tries"); do + if out="$(spctl "$@" 2>&1)"; then + printf '%s\n' "$out" + return 0 + fi + [ "$attempt" = "$tries" ] || sleep 10 + done + printf '%s\n' "$out" + return 1 +} + +for f in "$DMG" "$CLI_ZIP"; do + if [ ! -f "$f" ]; then + echo "error: missing $f" >&2 + exit 1 + fi +done + +WORK="$(mktemp -d "${RUNNER_TEMP:-${TMPDIR:-/tmp}}/texturecraft-verify.XXXXXX")" +trap 'rm -rf "$WORK"' EXIT + +# ---- CLI zip ----------------------------------------------------------------------------------- +echo "==> $(basename "$CLI_ZIP")" +ditto -x -k "$CLI_ZIP" "$WORK/cli" +CLI="$WORK/cli/texturecraft-cli-$VERSION-macos-$ARCH/texturecraft-cli" +if [ ! -x "$CLI" ]; then + echo "error: $(basename "$CLI_ZIP") has no executable texturecraft-cli-$VERSION-macos-$ARCH/texturecraft-cli" >&2 + exit 1 +fi + +archs="$(lipo -archs "$CLI")" +for a in $WANT_ARCHS; do + case " $archs " in + *" $a "*) ;; + *) echo "error: texturecraft-cli lacks $a (has: $archs)" >&2; exit 1 ;; + esac +done + +# Integrity first: this must hold even for ad-hoc builds. +codesign --verify --strict --verbose=2 "$CLI" +details="$(codesign -d --verbose=2 "$CLI" 2>&1)" +printf '%s\n' "$details" | grep -E '^(Identifier|Format|CodeDirectory|Authority|Timestamp|TeamIdentifier)[= ]' || true + +printf '%s\n' "$details" | grep -Eq '^CodeDirectory .*flags=0x[0-9a-f]+\([^)]*runtime' \ + || fail "texturecraft-cli is not signed with the hardened runtime" +printf '%s\n' "$details" | grep -q '^Authority=Developer ID Application:' \ + || fail "texturecraft-cli is not signed with a Developer ID Application identity" +printf '%s\n' "$details" | grep -q '^Timestamp=' \ + || fail "texturecraft-cli signature has no secure timestamp" +if [ -n "${APPLE_TEAM_ID:-}" ]; then + printf '%s\n' "$details" | grep -qx "TeamIdentifier=$APPLE_TEAM_ID" \ + || fail "texturecraft-cli is signed by a different team" +fi +if gk="$(assess --assess --type install -vv "$CLI")"; then + printf '%s\n' "$gk" + printf '%s\n' "$gk" | grep -q 'source=Notarized Developer ID' \ + || fail "Gatekeeper accepts texturecraft-cli but not as notarized" +else + printf '%s\n' "$gk" + fail "Gatekeeper rejects texturecraft-cli (not notarized?)" +fi +"$CLI" --version + +# ---- DMG --------------------------------------------------------------------------------------- +echo "==> $(basename "$DMG")" +codesign --verify --strict --verbose=2 "$DMG" +if [ "$STRICT" = 1 ]; then + xcrun stapler validate "$DMG" || fail "no notarization ticket stapled to the DMG" + assess --assess --type open --context context:primary-signature -vv "$DMG" \ + || fail "Gatekeeper rejects the DMG" +fi + +if [ "$FAILED" != 0 ]; then + echo "error: macOS artifacts failed verification" >&2 + exit 1 +fi + +if [ "$STRICT" = 1 ]; then + result="signed (Developer ID, hardened runtime), notarized; DMG stapled" +else + result="signature intact; Developer ID and notarization not required (no signing secrets)" +fi +echo "==> verified: $result" +if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then + { + echo "- macOS \`$(basename "$DMG")\`, \`$(basename "$CLI_ZIP")\`: $result" + } >>"$GITHUB_STEP_SUMMARY" +fi diff --git a/packaging/web/.htaccess b/packaging/web/.htaccess new file mode 100644 index 00000000..7b7e6e18 --- /dev/null +++ b/packaging/web/.htaccess @@ -0,0 +1,16 @@ +# Apache (see HOSTING.md). Needs mod_mime; mod_deflate and mod_headers are optional. +AddType application/wasm .wasm +AddType text/javascript .js + + + AddOutputFilterByType DEFLATE application/wasm text/javascript text/html + + + + + Header set Cache-Control "public, max-age=31536000, immutable" + + + Header set Cache-Control "no-cache" + + diff --git a/packaging/web/README.md b/packaging/web/README.md new file mode 100644 index 00000000..914ce49c --- /dev/null +++ b/packaging/web/README.md @@ -0,0 +1,88 @@ +# Hosting TextureCraft for the web + +`texturecraft-web-.zip` (from the GitHub release, or `packaging/web/package.sh`) holds a +static site in `texturecraft-web-/`: + +| File | What it is | +|---|---| +| `index.html` | The page. It loads everything through relative URLs. | +| `texturecraft-web-.js` | wasm-bindgen glue (generated by trunk, ES module) | +| `texturecraft-web-_bg.wasm` | The app (built with the `wasm-release` Cargo profile) | +| `_headers`, `.htaccess` | Sample header rules for Netlify/Cloudflare Pages and Apache | + +There is no server-side code and no hand-written JavaScript: trunk generates the glue from the +Rust crate `apps/texturecraft-web`. Upload the folder's contents anywhere that serves static files. + +`packaging/web/package.sh` fails the build when a `.wasm` grows past 24 MiB, because Cloudflare +Pages and Workers reject any file over 25 MiB. + +## Any path works + +All URLs in `index.html` are relative (`public_url = "./"` in `apps/texturecraft-web/Trunk.toml`), +so the site works at a domain root (`https://example.com/`), under a prefix +(`https://example.com/tools/texturecraft/`) and from a CDN bucket. The asset names carry a content +hash, so they can be cached forever. Only `index.html` needs revalidation. + +## Required server settings + +- **MIME type:** serve `.wasm` as `application/wasm`. Browsers refuse to stream-compile it under + any other type, and the app then loads slowly or not at all. Serve `.js` as `text/javascript`. + For nginx, check that `mime.types` has `application/wasm wasm;`. +- **Compression:** turn on gzip or Brotli for `.wasm`, `.js` and `.html` (a wasm file typically + shrinks to well under half). You can also precompress (`brotli -k *.wasm`) and let the server + send `Content-Encoding: br`. +- **Caching:** `Cache-Control: public, max-age=31536000, immutable` on the hashed `.wasm` and + `.js` files, and `no-cache` on `index.html`. +- **HTTPS:** WebGPU (and the clipboard) only work in a secure context, which means `https://` + or `http://localhost`. Over plain HTTP elsewhere, the app falls back to WebGL2. +- **No special isolation headers:** the app doesn't use `SharedArrayBuffer`, so it doesn't need + `Cross-Origin-Opener-Policy` or `Cross-Origin-Embedder-Policy`. If your site already sends COEP + `require-corp`, also send `Cross-Origin-Resource-Policy: same-origin` (or `cross-origin` when + the files live on a CDN) on the app's files. + +nginx example: + +```nginx +location /texturecraft/ { + types { application/wasm wasm; text/javascript js; text/html html; } + gzip on; + gzip_types application/wasm text/javascript text/html; + location ~* \.(wasm|js)$ { add_header Cache-Control "public, max-age=31536000, immutable"; } + location ~* index\.html$ { add_header Cache-Control "no-cache"; } +} +``` + +Local test: `python3 -m http.server 8765` inside the folder, then open http://localhost:8765/. + +## Embedding in a page (iframe) + +```html + +``` + +- The app fills the iframe and follows its size, so size the iframe and not the app. +- Keyboard shortcuts go to the iframe after the user clicks into it, as with any embedded app. +- **Sandboxed iframes** need at least + `sandbox="allow-scripts allow-same-origin allow-downloads allow-popups"`. Without + `allow-same-origin` there's no storage. Without `allow-downloads`, Save and Export (browser + downloads) are blocked. +- Don't send `X-Frame-Options: DENY` or a `frame-ancestors` CSP that excludes the embedding page. + +## Renderer selection and fallback flags + +TextureCraft renders with wgpu. It uses **WebGPU** when the browser has it and falls back to +**WebGL2** on its own. URL query flags override this, and they work on the iframe `src` too: + +| Flag | Effect | +|---|---| +| *(none)* | WebGPU if available, otherwise WebGL2 | +| `?webgl` | Force the WebGL2 backend (useful when a WebGPU driver misbehaves, and for headless smoke tests) | + +The viewport needs a GPU backend, so there is no CPU-only mode. A browser with neither WebGPU nor +WebGL2 gets a message in place of the app. diff --git a/packaging/web/_headers b/packaging/web/_headers new file mode 100644 index 00000000..fac0fbe1 --- /dev/null +++ b/packaging/web/_headers @@ -0,0 +1,13 @@ +# Netlify / Cloudflare Pages header rules (see HOSTING.md). Other hosts: set the same headers. +/* + X-Content-Type-Options: nosniff + +/*.wasm + Content-Type: application/wasm + Cache-Control: public, max-age=31536000, immutable + +/*.js + Cache-Control: public, max-age=31536000, immutable + +/index.html + Cache-Control: no-cache diff --git a/packaging/web/package.sh b/packaging/web/package.sh new file mode 100644 index 00000000..baecbc0d --- /dev/null +++ b/packaging/web/package.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# Build the browser version and zip it: $DIST/texturecraft-web-.zip +# +# Usage: packaging/web/package.sh [--skip-build] +# +# Needs: trunk (brew install trunk / cargo install trunk --locked) and the wasm32-unknown-unknown +# target. The zip holds a self-contained static site in texturecraft-web-/ that works +# from any URL path and inside an

(^SHlo>HRlRM>{DSE( zmCuDUIg4l3Vn4MIE(s6XxvA@pQ~iJn?Se-(g+FI z{TSG-)1-AR{uQz>UM9fQYz(;&4`b&UVHV44eQsWdz+ou3;h-Q8;FeLSL4OOD_D8g~ z1ZoeDGm7PJkX3}bm^=1@wqHj@mC{uP^gQr=>(*YyeuB(`k{Jr^Xbw)79HQ6OLmX1Z zf)kC$yAC5uyqvXaCmA?G5^liEa%?)e08El<89l-df?u(^eCdkFY9fyqm|PYi$VWdx*d*rfnd#x*y|`wFjYGTe0tsPf_&^BPQ_QcH?1IXyHL(1 z>g{f!Q)O*e7TJ=a48bdfL+rLXcZ4<0&dE^6EX*#C(}BQ~V`eq-%P4OhG|vPK%1R{Y z*nPxoK1R@ZQFVI+>}GSSpOYx>e>u|bzV%(U*7xMb|JqCbGhXKI+Tw5T2@S+8cE0oI zFKd=PIplGCjRcCeLduqkPN9rWf-d5nMImSvz+0$TF2_o2rUuuSTMyNXs}}zBvjeYu zRrut!S3bU~{P|xpkKX)s*UD-4f7*QinTL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MyI8%l`rh><3BP6;{Em1yTG;p?v z41LZ@WQ2%M$mB<2fa6C@Oxz}Yl$W1=N+PptispP@Xo^#B)*-%N&G|iqZ%XMWQF?18 zbjc>qC{C?zIszi0&wyJ61xp7^W1C7$p6A4h(upszNm*2PJW&C0_??kG<8?6k0};JL zToU+;`(A86G@=Z97k5)x2Oc*A~2r728hpf0G73C-zq zReIh{XS}a6Vg(n6N?T6&Kn8aSAQPhC`Sg0HdUMbgopHsnKz3$ z(r6eEU;?9pih3rjiP!ok8HYDCrKkgtwfP-g+$Y!otsuDc0`KBvxw~`+XN$(p7DzCk za3(t28A<4f%uP&p6p@Wi73Rb=Z$|Dno;N|XGq7Z&3(6xgHINjdqS0&ol?sv6>k@j` zLBw-+5;Noe#l1TI4rc&Nx>C-GE8`Z7#4G^Sv_D~&5zmM*lSE^#U=tPRUAiDtV{;W{ z-|rBeS4MlqxxR*+=O2%`CL;Q0+({1py!krfzOnd(!h_>wMLg1@s+TIOUJ`XV2|-8Y zCE>XLdmYH!nOc4pA?lC#`Z}ph8{xbgQi?x!TXTo21CWcE0?1?My=t-4P2!Can5Sgn zQwV<}7fmrbKn>S6g3D_uBU2 m0`, tag `v`, with `SHA256SUMS.txt`. Review it, then publish. + A draft is updated in place (assets replaced); a published release is never overwritten, so + bump the version before building again. + +Test builds: dispatch the workflow on `release` with a `version` such as `1.2.0-rc.1`; the input +overrides `Cargo.toml` for that run (`cargo xtask version set` runs in every build job). A +dispatch on any other branch is a dry run: Linux, Flatpak, FreeBSD and web build for real, the +signing jobs are refused by the `release` environment (0 steps), and no draft is created. + +Before the first release, an org admin runs craftrules `release/signing-setup.md` steps 1-2 for +`storytold/texturecraft` (the `release` environment, its deployment-branch rule, the ruleset and +the twelve secrets) and adds the repo to the org's Default runner group (`release/cut-a-release.md` +§3), or the macOS job waits forever. + +## What gets built + +All file names are `texturecraft---.`, written to `dist/release/`. + +| Platform | Artifacts | Script | +|---|---|---| +| macOS (`macos-15-xlarge`) | `-macos-universal.dmg` (`TextureCraft.app`), `texturecraft-cli--macos-universal.zip` | `packaging/macos/package.sh`, `verify.sh` | +| Windows x64, x86, arm64 | `-windows-.msi`, `-windows--portable.zip` | `packaging/windows/package.ps1` | +| Linux x86_64, aarch64 (Ubuntu 22.04, glibc 2.35) | `.AppImage` + `.AppImage.zsync`, `.deb`, `.rpm`, `.tar.gz` | `packaging/linux/package.sh` | +| Flatpak x86_64, aarch64 | `-linux-.flatpak`, repackaged from the Linux tarball | `packaging/linux/flatpak-bundle.sh` | +| FreeBSD x86_64 (14.3 VM) | `-freebsd-x86_64.tar.gz` | `packaging/freebsd/package.sh` | +| Web | `texturecraft-web-.zip` (trunk, `wasm-release` profile; hosting notes in `packaging/web/README.md`) | `packaging/web/package.sh` | + +Every desktop package ships both binaries, `texturecraft` and `texturecraft-cli`. The packaging +scripts smoke-test `texturecraft-cli --version`, and the Linux job also runs the AppImage with +`--version`, so both binaries must print their version and exit without opening a window. + +## TextureCraft-specific values + +| What | Value | +|---|---| +| Bundle / app id | `ai.storyteller.texturecraft` | +| Project format | `.tcraft`, MIME `application/x-texturecraft`, UTI `ai.storyteller.texturecraft.project` (owned) | +| Also opens | `.glb .gltf .obj .ply .stl` ("Open with" only, never the default app) | +| WiX UpgradeCode | `7E670E60-BB22-4E6B-8749-DD3FD4CA8979`, never change it | +| Flathub manifest | `packaging/linux/flatpak/ai.storyteller.TextureCraft.yml` (release bundle: `…TextureCraft.bundle.yml`) | +| macOS minimum | 11.0 (`LSMinimumSystemVersion`, `MACOSX_DEPLOYMENT_TARGET`) | + +## Version and build info in the binaries + +`apps/texturecraft/build.rs` (also `include!`d by `apps/texturecraft-cli/build.rs`) sets, for +`env!`: + +- `TEXTURECRAFT_BUILD_SHA`: the full commit. CI sets it to `github.sha`; `packaging/env.sh` sets + it from git; otherwise build.rs asks git itself; empty when unknown. +- `TEXTURECRAFT_BUILD_DATE`: `YYYY-MM-DD` (UTC). CI sets it once per run; otherwise today's date, + or `SOURCE_DATE_EPOCH`'s for reproducible builds. + +On Windows targets it also embeds `assets/app-icon/texturecraft.ico` and VERSIONINFO +(ProductName TextureCraft); `package.ps1` sets `TEXTURECRAFT_REQUIRE_WINRES=1` so a release can't +ship an exe without them. The version itself is `CARGO_PKG_VERSION`. + +Other environment variables the scripts read: `TEXTURECRAFT_VERSION` (override the version), +`DIST`, `CARGO_TARGET_DIR`, `TEXTURECRAFT_MAINTAINER` (deb/rpm maintainer), +`TEXTURECRAFT_WASM_MAX_BYTES` (web size gate, default 24 MiB), and at run time +`TEXTURECRAFT_NO_DESKTOP_INTEGRATION=1` (the AppImage's AppRun skips installing its `.desktop` +entry and icons). + +## Signing + +Secrets live only in the `release` environment and are all optional: a missing one gives an +unsigned artifact and a `::warning::`, never a failed build. + +- macOS: `APPLE_CERTIFICATE`, `APPLE_CERTIFICATE_PASSWORD`, `KEYCHAIN_PASSWORD` (import into a + temporary keychain, `packaging/macos/import-cert.sh`), then `APPLE_ID`, `APPLE_PASSWORD`, + `APPLE_TEAM_ID` for `notarytool` and stapling. Without them the app is ad-hoc signed. +- Windows: `packaging/windows/sign.ps1` uses a PFX (`WINDOWS_CERTIFICATE`, + `WINDOWS_CERTIFICATE_PASSWORD`) if set, otherwise Azure Trusted Signing (all six `AZURE_*`). + It signs both exes before WiX and the MSI after. + +## Icons + +`assets/app-icon/icon.py` draws the octopus (original artwork, three colours, craftrules +`standards/icon-design.md`) into `icon.svg`. `packaging/icons.sh` renders everything else with +resvg and `cargo xtask ico|icns`: the hicolor PNGs (16-512 px) and scalable SVG, `icon-1024.png`, +`texturecraft.ico` and `texturecraft.icns`. The outputs are committed; rerun both after changing +the drawing and keep `ATTRIBUTION.md` in step. + +## Local checks + +- `cargo xtask ci`: fmt, clippy, tests, `cargo xtask layers`, `cargo xtask wasm`. +- `bash packaging/linux/apprun-test.sh` and `bash packaging/freebsd/package.sh --dry-run` run + anywhere with bash. +- `packaging/macos/package.sh --arch aarch64` on a Mac builds an ad-hoc signed DMG. +- `packaging/windows/package.ps1 -Arch x64` on Windows (needs WiX 5.0.2) builds an unsigned MSI. +- `.github/workflows/packaging-lint.yml` runs actionlint, shellcheck, the PowerShell parser and + the desktop/AppStream/Flatpak validators on every change to `packaging/` or the workflows. diff --git a/packaging/.shellcheckrc b/packaging/.shellcheckrc new file mode 100644 index 00000000..36c19d06 --- /dev/null +++ b/packaging/.shellcheckrc @@ -0,0 +1,3 @@ +# shellcheck config for the packaging scripts (CI: .github/workflows/packaging-lint.yml). +source-path=SCRIPTDIR +external-sources=true diff --git a/packaging/env.sh b/packaging/env.sh new file mode 100644 index 00000000..211b541f --- /dev/null +++ b/packaging/env.sh @@ -0,0 +1,53 @@ +# shellcheck shell=bash +# Shared setup for the packaging scripts. Source it: `. "$(dirname "$0")/../env.sh"`. +# +# Exports: +# ROOT workspace root +# VERSION [workspace.package] version from Cargo.toml (override: TEXTURECRAFT_VERSION) +# DIST output directory for release artifacts (default: $ROOT/dist/release) +# TEXTURECRAFT_BUILD_SHA git commit baked into the binaries (apps/texturecraft/build.rs) +# TEXTURECRAFT_BUILD_DATE UTC build date, YYYY-MM-DD +# CARGO_TARGET_DIR cargo's target dir (default: $ROOT/target) + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +export ROOT + +# The version lives in exactly one place: `[workspace.package] version` in the root Cargo.toml. +# (`cargo xtask version` prints the same thing; awk avoids compiling xtask here.) +workspace_version() { + awk ' + /^\[/ { in_pkg = ($0 == "[workspace.package]") ; next } + in_pkg && $1 == "version" { gsub(/[" ]/, "", $3); print $3; exit } + ' "$ROOT/Cargo.toml" +} + +VERSION="${TEXTURECRAFT_VERSION:-$(workspace_version)}" +if [ -z "$VERSION" ]; then + echo "error: could not read [workspace.package] version from $ROOT/Cargo.toml" >&2 + exit 1 +fi +export VERSION + +DIST="${DIST:-$ROOT/dist/release}" +mkdir -p "$DIST" +export DIST + +if [ -z "${TEXTURECRAFT_BUILD_SHA:-}" ]; then + TEXTURECRAFT_BUILD_SHA="$(git -C "$ROOT" rev-parse HEAD 2>/dev/null || true)" +fi +export TEXTURECRAFT_BUILD_SHA +export TEXTURECRAFT_BUILD_DATE="${TEXTURECRAFT_BUILD_DATE:-$(date -u +%Y-%m-%d)}" +export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target}" + +# Emit a GitHub Actions warning (plain stderr outside Actions). +warn() { + if [ -n "${GITHUB_ACTIONS:-}" ]; then echo "::warning::$*"; else echo "warning: $*" >&2; fi +} + +# Copy licence, notice and readme files that exist into a package directory. +copy_docs() { + local dest="$1" f + for f in README.md LICENSE-MIT LICENSE-APACHE NOTICE ATTRIBUTION.md; do + if [ -f "$ROOT/$f" ]; then cp "$ROOT/$f" "$dest/"; fi + done +} diff --git a/packaging/freebsd/package.sh b/packaging/freebsd/package.sh new file mode 100644 index 00000000..463ca9ba --- /dev/null +++ b/packaging/freebsd/package.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +# Build and package TextureCraft for FreeBSD: +# +# $DIST/texturecraft--freebsd-x86_64.tar.gz a /usr/local-style tree: +# texturecraft--freebsd-x86_64/{bin, share/applications, share/icons, share/mime, +# share/metainfo, share/doc/texturecraft} +# +# Install by copying the tree's contents into /usr/local: +# tar -xzf texturecraft--freebsd-x86_64.tar.gz --strip-components 1 -C /usr/local +# +# Usage: packaging/freebsd/package.sh [--skip-build] [--dry-run] +# --dry-run stage the tree from stub binaries and list it, without building (works on any OS) +# +# Needs: bash, cargo, and the packages installed in .github/workflows/freebsd.yml. +set -euo pipefail +# shellcheck source=../env.sh +. "$(dirname "${BASH_SOURCE[0]}")/../env.sh" +LINUX="$ROOT/packaging/linux" +APP_ID=ai.storyteller.texturecraft + +SKIP_BUILD=0 +DRY_RUN=0 +while [ $# -gt 0 ]; do + case "$1" in + --skip-build) SKIP_BUILD=1; shift ;; + --dry-run) DRY_RUN=1; SKIP_BUILD=1; shift ;; + -h | --help) sed -n '2,15p' "$0"; exit 0 ;; + *) echo "unknown argument: $1" >&2; exit 2 ;; + esac +done + +# FreeBSD's uname says amd64; release file names use x86_64 like the Linux and Windows ones. +MACHINE="$(uname -m)" +case "$MACHINE" in + amd64 | x86_64) ARCH=x86_64 ;; + arm64 | aarch64) ARCH=aarch64 ;; + *) echo "unsupported architecture $MACHINE" >&2; exit 2 ;; +esac +if [ "$DRY_RUN" = 0 ] && [ "$(uname -s)" != FreeBSD ]; then + echo "error: build on FreeBSD (or pass --dry-run to check the tree layout)" >&2 + exit 2 +fi +BASENAME="texturecraft-$VERSION-freebsd-$ARCH" + +echo "==> TextureCraft $VERSION for FreeBSD $ARCH" + +# The release VM has 12 GB; full parallelism on the biggest crates runs it out of memory. +export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-4}" +if [ "$SKIP_BUILD" = 0 ]; then + (cd "$ROOT" && cargo build --release --locked -p texturecraft -p texturecraft-cli) +fi +WORK="$CARGO_TARGET_DIR/freebsd-package" +STAGE="$WORK/$BASENAME" +rm -rf "$WORK" +mkdir -p "$WORK" + +BIN="$CARGO_TARGET_DIR/release" +OUT_DIR="$DIST" +if [ "$DRY_RUN" = 1 ]; then + # Stub binaries, and the tarball stays in the work dir so dist/ only ever holds real builds. + BIN="$WORK/stub-bin" + OUT_DIR="$WORK" + mkdir -p "$BIN" + for b in texturecraft texturecraft-cli; do + printf '#!/bin/sh\necho "%s %s (dry-run stub)"\n' "$b" "$VERSION" >"$BIN/$b" + chmod 755 "$BIN/$b" + done +fi + +# ---- stage a /usr/local-style tree -------------------------------------------------------------- +# FreeBSD's install(1) has no -D: create the directories first. +mkdir -p "$STAGE/bin" "$STAGE/share/applications" "$STAGE/share/mime/packages" \ + "$STAGE/share/metainfo" "$STAGE/share/icons" "$STAGE/share/doc/texturecraft" +install -m 755 "$BIN/texturecraft" "$BIN/texturecraft-cli" "$STAGE/bin/" +strip "$STAGE/bin/texturecraft" "$STAGE/bin/texturecraft-cli" 2>/dev/null || true +# The desktop entry, MIME type, metainfo and icons are the freedesktop files Linux ships. +install -m 644 "$LINUX/$APP_ID.desktop" "$STAGE/share/applications/$APP_ID.desktop" +install -m 644 "$LINUX/$APP_ID.mime.xml" "$STAGE/share/mime/packages/$APP_ID.xml" +sed -e "s/@VERSION@/$VERSION/g" -e "s/@DATE@/$TEXTURECRAFT_BUILD_DATE/g" \ + "$LINUX/$APP_ID.metainfo.xml.in" >"$STAGE/share/metainfo/$APP_ID.metainfo.xml" +cp -R "$ROOT/assets/app-icon/hicolor" "$STAGE/share/icons/" +copy_docs "$STAGE/share/doc/texturecraft" + +for f in bin/texturecraft bin/texturecraft-cli "share/applications/$APP_ID.desktop" \ + "share/icons/hicolor/256x256/apps/$APP_ID.png" "share/icons/hicolor/scalable/apps/$APP_ID.svg" \ + share/doc/texturecraft/LICENSE-MIT share/doc/texturecraft/LICENSE-APACHE; do + if [ ! -e "$STAGE/$f" ]; then echo "error: $f is missing from the package" >&2; exit 1; fi +done + +# ---- .tar.gz ------------------------------------------------------------------------------------ +mkdir -p "$OUT_DIR" +tar -C "$WORK" -czf "$OUT_DIR/$BASENAME.tar.gz" "$BASENAME" +echo "wrote $OUT_DIR/$BASENAME.tar.gz" + +"$STAGE/bin/texturecraft-cli" --version +if [ "$DRY_RUN" = 1 ]; then + echo "==> dry run: tarball contents" + tar -tzvf "$OUT_DIR/$BASENAME.tar.gz" +fi +echo "==> done" diff --git a/packaging/icons.sh b/packaging/icons.sh new file mode 100644 index 00000000..06996126 --- /dev/null +++ b/packaging/icons.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# Regenerate every app icon from assets/app-icon/icon.svg (written by assets/app-icon/icon.py). +# +# Needs: resvg (cargo install resvg / brew install resvg) and cargo (for `cargo xtask ico|icns`). +# The outputs are committed, so packaging never needs these tools. +# +# python3 assets/app-icon/icon.py && packaging/icons.sh +set -euo pipefail +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +DIR="$ROOT/assets/app-icon" +SVG="$DIR/icon.svg" +ID=ai.storyteller.texturecraft +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT + +command -v resvg >/dev/null || { echo "error: resvg not found (cargo install resvg)" >&2; exit 1; } + +# The artwork is a full-bleed 512-unit tile (rx=112). macOS icons pad it to Apple's 824/1024 body +# grid (transparent margin). Windows and Linux icons crop 22 units off each side (into the +# rounded corners) so the portrait reads at 16-48 px. +grep -q 'viewBox="0 0 512 512"' "$SVG" || { echo "error: expected viewBox=\"0 0 512 512\" in $SVG" >&2; exit 1; } +MAC="$TMP/mac.svg" +sed 's/viewBox="0 0 512 512"/viewBox="-62 -62 636 636"/' "$SVG" >"$MAC" +TIGHT="$TMP/tight.svg" +sed 's/viewBox="0 0 512 512"/viewBox="22 22 468 468"/' "$SVG" >"$TIGHT" + +render() { resvg -w "$2" -h "$2" "$1" "$3" /dev/null || return 0 + tmp="$apps/.$DESK_ID.tmp.$$" + esc="$(printf '%s' "$appimage" | sed 's/[\\&|]/\\&/g')" + if sed -e "s|^Exec=.*|Exec=\"$esc\" %F|" -e '/^TryExec=/d' "$src_desktop" 2>/dev/null >"$tmp"; then + if cmp -s "$tmp" "$apps/$DESK_ID.desktop"; then + rm -f "$tmp" + else + if mv -f "$tmp" "$apps/$DESK_ID.desktop" 2>/dev/null; then + command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$apps" >/dev/null 2>&1 + else + rm -f "$tmp" + fi + fi + else + rm -f "$tmp" + return 0 + fi + + # Icons: per-file compare so an unchanged install costs a handful of cmp calls. + src_icons="$APPDIR/usr/share/icons/hicolor" + [ -d "$src_icons" ] || return 0 + icons="$data/icons/hicolor" + (cd "$src_icons" && find . -type f) | while IFS= read -r rel; do + mkdir -p "$icons/$(dirname "$rel")" 2>/dev/null || continue + if ! cmp -s "$src_icons/$rel" "$icons/$rel"; then + cp "$src_icons/$rel" "$icons/$rel" 2>/dev/null || true + fi + done +} + +integrate +exec "$APPDIR/usr/bin/texturecraft" "$@" diff --git a/packaging/linux/ai.storyteller.texturecraft.desktop b/packaging/linux/ai.storyteller.texturecraft.desktop new file mode 100644 index 00000000..5f0f43f6 --- /dev/null +++ b/packaging/linux/ai.storyteller.texturecraft.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Application +Name=TextureCraft +GenericName=3D Texture Painter +Comment=Paint PBR textures directly on 3D meshes +Exec=texturecraft %F +TryExec=texturecraft +Icon=ai.storyteller.texturecraft +Terminal=false +StartupNotify=true +StartupWMClass=texturecraft +Categories=Graphics;3DGraphics; +Keywords=texture;paint;pbr;material;3d;mesh;bake;gltf; +MimeType=application/x-texturecraft;model/gltf-binary;model/gltf+json;model/obj;model/x-ply;model/stl; diff --git a/packaging/linux/ai.storyteller.texturecraft.metainfo.xml.in b/packaging/linux/ai.storyteller.texturecraft.metainfo.xml.in new file mode 100644 index 00000000..a1f37874 --- /dev/null +++ b/packaging/linux/ai.storyteller.texturecraft.metainfo.xml.in @@ -0,0 +1,68 @@ + + + + ai.storyteller.texturecraft + CC0-1.0 + MIT OR Apache-2.0 + TextureCraft +