diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index f21edd73..4c641aa9 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -15,8 +15,11 @@ licensed and keep their license file next to them. | `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/images/texturecraft-workspace.png` | README screenshot: the TextureCraft workspace with procedural materials | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | -| `docs/images/texturecraft-render.png` | README render: worn paint on the material ball (`texturecraft-cli render --samples 256`) | TextureCraft contributors | original render | MIT OR Apache-2.0 | +| `docs/images/texturecraft-workspace.png` | README screenshot: the TextureCraft workspace (material ball in chipped paint, grime and a gold stripe) | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | +| `docs/images/texturecraft-bake.png` | README screenshot: bake mode | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | +| `docs/images/texturecraft-export.png` | README screenshot: the Export textures dialog | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | +| `docs/images/texturecraft-rendering.png` | README screenshot: Rendering mode, path traced on the GPU | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | +| `docs/images/texturecraft-light.png` | README screenshot: the light brightness level with the blue accent | TextureCraft contributors | original screenshot of TextureCraft | MIT OR Apache-2.0 | | `docs/images/texturecraft-materials.png` | README render: car paint, velvet and brushed steel on the material ball (`texturecraft-cli render --samples 256`, three renders side by side) | TextureCraft contributors | original render | 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)) | diff --git a/README.md b/README.md index 9fc1c736..05d7c501 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@

- The TextureCraft workspace: the material library on the left, the 3D viewport with a material ball wearing a worn 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 TextureCraft workspace: the material library on the left; the 3D viewport and the 2D UV view of a material ball in chipped red paint with grime and a hand-painted gold stripe, on a rusted iron base; and the texture set list, layer stack and brush properties on the right
The workspace: asset shelf, 3D viewport, 2D UV view, texture sets, layer stack and properties.

@@ -158,6 +158,11 @@ and share them as JSON. - **Mesh export** to OBJ, textured GLB (with clear coat and sheen) and USD. +

+ Bake mode: the texture sets and mesh map bakers on the left, the common bake parameters below them, and the Bake selected textures button under the viewport + The Export textures dialog: texture sets to export, the output directory, an output template, file type, size, padding and normal map format +

+ ### The viewport - Physically based shading (metallic/roughness or specular/glossiness) with clear coat, sheen, @@ -172,19 +177,25 @@ wheel to zoom, F to frame, M / C / B to cycle views.

- A path-traced render of the material ball in worn red paint over bare steel, made with texturecraft-cli render --samples 256 + Rendering mode: the material ball path traced on the GPU at 256 samples with denoising, the gold stripe catching the studio light, and the render settings in a card over the viewport

### Interface -- A Painter-style layout with **dockable, tabbed and floating panels**, saved layouts, and panels - that reopen where you closed them. +- A modern look in **four brightness levels** (dark, medium dark, medium light and light) with + **seven accent colors**, set in Settings › Interface. +- **Dockable, tabbed and floating panels**, saved layouts, and panels that reopen where you closed + them. - A **shortcut editor** with conflict detection, and every shortcut shown in its tooltip. - **9 languages:** English, French, German, Spanish, Portuguese, Italian, Japanese, Chinese and Korean, switchable live. - **In the browser:** the same app compiled to WebAssembly, on WebGPU or WebGL2, with touch navigation and project open, save and download. +

+ TextureCraft in the light brightness level with the blue accent: the same panels as rounded cards on a light background around the dark 3D viewport +

+ ## Built for agents Everything you can do in the window, an agent can do too: diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index b04d997b..15116399 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -16,7 +16,7 @@ use crate::i18n::{n_, tr, trf}; use crate::shelf::{Asset, ShelfDrag}; use crate::state::PropsTab; use crate::theme::{Tokens, caption}; -use crate::widgets::{chip, color_swatch, dnd_release, elided, icon_button, section, slider}; +use crate::widgets::{chip, color_swatch, combo, dnd_release, elided, icon_button, section, slider}; const TAG_COLORS: [Color32; 8] = [ Color32::from_rgb(0xc0, 0x40, 0x40), @@ -989,7 +989,7 @@ fn brush_section(app: &mut TextureCraftApp, ui: &mut Ui) { use texturecraft_engine::paint::Alignment; let alignments = [(Alignment::Tangent, tr("Tangent | Wrap")), (Alignment::Camera, tr("Camera"))]; let shown = alignments.iter().find(|(a, _)| *a == b.alignment).map_or("", |(_, l)| l); - egui::ComboBox::from_label(tr("Alignment")).selected_text(shown).show_ui(ui, |ui| { + combo(ui, tr("Alignment"), shown, |ui| { for (a, l) in alignments { ui.selectable_value(&mut b.alignment, a, l); } @@ -1209,7 +1209,7 @@ fn fill_editor(app: &mut TextureCraftApp, ui: &mut Ui, fill: &Fill, base: &Value fn projection_editor(app: &mut TextureCraftApp, ui: &mut Ui, fill: &Fill, base: &Value) { use texturecraft_engine::core::Projection; let proj_label = fill.projection.label(); - egui::ComboBox::from_label(tr("Projection")).selected_text(tr(proj_label)).show_ui(ui, |ui| { + combo(ui, tr("Projection"), tr(proj_label), |ui| { for (id, label) in [ ("uv", n_("UV projection")), ("triplanar", n_("Tri-planar projection")), @@ -1441,7 +1441,7 @@ fn effect_properties(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer, eid: Source::Procedural { pattern, .. } => tr(pattern.kind.label()).to_string(), Source::Image { name } => trf("Image: {name}", &[("name", name)]), }; - egui::ComboBox::from_label(tr("Source")).selected_text(current).show_ui(ui, |ui| { + combo(ui, tr("Source"), current, |ui| { if ui.selectable_label(matches!(source, Source::Uniform(_)), tr("Uniform value")).clicked() { app.run("effect.set", json!({"effect": id, "value": 1.0})); } @@ -1460,7 +1460,7 @@ fn effect_properties(app: &mut TextureCraftApp, ui: &mut Ui, layer: &Layer, eid: } 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(tr("Channel")).selected_text(tr(channel.label())).show_ui(ui, |ui| { + combo(ui, tr("Channel"), tr(channel.label()), |ui| { for c in chans { if ui.selectable_label(c == *channel, tr(c.label())).clicked() { app.run("effect.set", json!({"effect": id, "anchorChannel": c.id()})); diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index 12ebb97d..535995b2 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -118,6 +118,19 @@ pub fn primary_button<'a>(ui: &Ui, text: &str) -> egui::Button<'a> { egui::Button::new(RichText::new(text).color(Color32::WHITE)).fill(tk.accent_strong).stroke(Stroke::NONE) } +/// A labelled dropdown on one row: the label, then the box filling the rest of the row, so a +/// narrow panel shortens the box (its text truncated) instead of pushing the row past its edge. +pub fn combo(ui: &mut Ui, label: &str, selected: impl Into, menu: impl FnOnce(&mut Ui)) { + ui.horizontal(|ui| { + ui.label(label); + egui::ComboBox::from_id_salt(label) + .width(ui.available_width().max(60.0)) + .wrap_mode(egui::TextWrapMode::Truncate) + .selected_text(selected) + .show_ui(ui, menu); + }); +} + /// 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 tk = Tokens::get(ui.ctx()); diff --git a/crates/ui-egui/src/windows.rs b/crates/ui-egui/src/windows.rs index 6c2c71b1..588220e7 100644 --- a/crates/ui-egui/src/windows.rs +++ b/crates/ui-egui/src/windows.rs @@ -15,7 +15,7 @@ use crate::i18n::LANGUAGES; use crate::i18n::{tr, trf}; use crate::state::Mode; use crate::theme::{Accent, Brightness, Tokens, caption}; -use crate::widgets::{color_swatch, icon_button, primary_button, slider}; +use crate::widgets::{color_swatch, combo, icon_button, primary_button, slider}; pub fn show(app: &mut TextureCraftApp, ctx: &egui::Context) { new_project(app, ctx); @@ -55,7 +55,7 @@ pub(crate) fn display(app: &mut TextureCraftApp, ui: &mut Ui) { hdrs.sort(); let mut import_hdr = false; let shown = d.environment_resource().unwrap_or(&d.environment).to_string(); - egui::ComboBox::from_label(tr("Environment map")).selected_text(shown).show_ui(ui, |ui| { + combo(ui, tr("Environment map"), shown, |ui| { for e in ENVIRONMENTS { ui.selectable_value(&mut d.environment, e.to_string(), e); } @@ -570,23 +570,26 @@ fn hint(ui: &mut Ui, text: &str) { fn common_params(app: &mut TextureCraftApp, ui: &mut Ui, b: &mut BakeSettings) { let tk = Tokens::get(ui.ctx()); ui.label(caption(tr("Common parameters"))); - egui::ComboBox::from_label(tr("Output size")).selected_text(format!("{}", b.resolution)).show_ui(ui, |ui| { + combo(ui, tr("Output size"), format!("{}", b.resolution), |ui| { for r in [256u32, 512, 1024, 2048, 4096, 8192] { ui.selectable_value(&mut b.resolution, r, format!("{r}")); } }); - egui::ComboBox::from_label(tr("Antialiasing")) - .selected_text(match b.antialiasing { + combo( + ui, + tr("Antialiasing"), + match b.antialiasing { 2 => tr("Subsampling 2x2"), 4 => tr("Subsampling 4x4"), 8 => tr("Subsampling 8x8"), _ => tr("None"), - }) - .show_ui(ui, |ui| { + }, + |ui| { for (v, l) in [(1u32, tr("None")), (2, tr("Subsampling 2x2")), (4, tr("Subsampling 4x4")), (8, tr("Subsampling 8x8"))] { ui.selectable_value(&mut b.antialiasing, v, l); } - }); + }, + ); let mut dil = b.dilation as f32; if slider(ui, tr("Dilation width"), &mut dil, 0.0..=64.0, 0).changed() { b.dilation = dil as u32; @@ -659,7 +662,7 @@ fn common_params(app: &mut TextureCraftApp, ui: &mut Ui, b: &mut BakeSettings) { /// A combo box picking one of `options` (value, label). fn choice(ui: &mut Ui, label: &str, value: &mut T, options: &[(T, &str)]) { let shown = options.iter().find(|(v, _)| v == value).map_or("", |(_, l)| *l); - egui::ComboBox::from_label(label).selected_text(shown).show_ui(ui, |ui| { + combo(ui, label, shown, |ui| { for (v, l) in options { ui.selectable_value(value, *v, *l); } diff --git a/docs/images/texturecraft-bake.png b/docs/images/texturecraft-bake.png new file mode 100644 index 00000000..04a79189 Binary files /dev/null and b/docs/images/texturecraft-bake.png differ diff --git a/docs/images/texturecraft-export.png b/docs/images/texturecraft-export.png new file mode 100644 index 00000000..208b817f Binary files /dev/null and b/docs/images/texturecraft-export.png differ diff --git a/docs/images/texturecraft-light.png b/docs/images/texturecraft-light.png new file mode 100644 index 00000000..008f7e9f Binary files /dev/null and b/docs/images/texturecraft-light.png differ diff --git a/docs/images/texturecraft-render.png b/docs/images/texturecraft-render.png deleted file mode 100644 index 618940d0..00000000 Binary files a/docs/images/texturecraft-render.png and /dev/null differ diff --git a/docs/images/texturecraft-rendering.png b/docs/images/texturecraft-rendering.png new file mode 100644 index 00000000..4252eff7 Binary files /dev/null and b/docs/images/texturecraft-rendering.png differ diff --git a/docs/images/texturecraft-workspace.png b/docs/images/texturecraft-workspace.png index fe63c329..f11d4ede 100644 Binary files a/docs/images/texturecraft-workspace.png and b/docs/images/texturecraft-workspace.png differ