New README showcase renders: a storm lantern and a rangefinder camera

Replace the crate and material-ball renders in Made in TextureCraft with two
original props, modelled procedurally and textured with TextureCraft's own
materials, masks and mesh-map generators, path traced at 2048 samples.

texturecraft-cli render gains --camera <name> to look through a camera saved
in the project (camera.add), so a render can use an art-directed framing
(distance, target, field of view) rather than only yaw and pitch.
This commit is contained in:
bflatastic committed 2026-11-02 01:08:59 +07:00
1 parent bf03e6ad2f
commit 4a259e7270
9 files changed
+25 -14

No files matched your search

+2 -2
View File
@@ -21,8 +21,8 @@ licensed and keep their license file next to them.
| `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/images/texturecraft-crate.png` | README render: the built-in crate with chipped paint on wood, rusted iron and tarnished brass smart materials (`texturecraft-cli render --samples 512`, cropped) | TextureCraft contributors | original render by TextureCraft | MIT OR Apache-2.0 |
| `docs/images/texturecraft-lantern.png` | README render: a storm lantern (original procedural mesh of lathes and swept wires, eight texture sets) in chipped red enamel, rust, soot, tarnished brass and glass with an emissive flame (`texturecraft-cli render --camera Hero --samples 2048`, 1200×900) | TextureCraft contributors | original model and render by TextureCraft | MIT OR Apache-2.0 |
| `docs/images/texturecraft-camera.png` | README render: a rangefinder camera (original procedural mesh) in black enamel worn to brass, leatherette, chrome and coated glass; the lens distance scale is an original image drawn in code (`texturecraft-cli render --camera Hero --samples 2048`, 1200×900) | TextureCraft contributors | original model and render by TextureCraft | 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
+7 -6
View File
@@ -95,18 +95,19 @@
## Made in TextureCraft
Both pieces below were textured with TextureCraft's procedural materials and smart materials (no
textures or models from anywhere else) and path traced on the GPU by `texturecraft-cli render`.
Two original props, modelled procedurally by contributors, textured layer by layer with TextureCraft's
own materials, masks and mesh-map generators (no textures or models from anywhere else) and path
traced on the GPU by `texturecraft-cli render`.
<table>
<tr>
<td width="50%" valign="top">
<img src="docs/images/texturecraft-crate.png" alt="A path-traced crate: teal paint chipping off wooden planks, a rusted iron lid and a tarnished brass handle" width="100%">
<p align="center"><sub><b>Crate</b>: chipped paint on wood, rusted iron and tarnished brass smart materials, one per texture set</sub></p>
<img src="docs/images/texturecraft-lantern.png" alt="A path-traced storm lantern on a dark stage: red enamel chipped to bare steel on the edges, rust and grime in the seams, a cream pinstripe, a tarnished brass burner and knob, rusty guard wires and a glowing flame behind the glass globe" width="100%">
<p align="center"><sub><b>Storm lantern</b>: chipped enamel, rust, soot and a lit flame over eight texture sets</sub></p>
</td>
<td width="50%" valign="top">
<img src="docs/images/texturecraft-materials.png" alt="Three path-traced material balls: glossy red car paint with a clear coat, purple velvet with sheen, and brushed steel with anisotropic highlights" width="100%">
<p align="center"><sub><b>Shading lobes</b>: car paint (clear coat), velvet (sheen) and brushed steel (anisotropy)</sub></p>
<img src="docs/images/texturecraft-camera.png" alt="A path-traced vintage rangefinder camera: black enamel worn through to brass on the top plate, cognac leatherette, knurled chrome dials, a black lens barrel with an engraved distance scale and a coated front element" width="100%">
<p align="center"><sub><b>Rangefinder camera</b>: black paint brassing, leatherette, chrome and coated glass</sub></p>
</td>
</tr>
</table>
+9 -6
View File
@@ -29,11 +29,11 @@ USAGE:
Bake mesh maps for every texture set (a project is saved in place without -o).
texturecraft-cli export <input> <dir> [--preset <name>] [--format <ext>] [--padding <mode>] [--size <px>]
Export textures (default preset: Document channels + Normal + AO).
texturecraft-cli render <input> <out.png> [--size <W>x<H>] [--view 3d|2d] [--yaw <deg>] [--pitch <deg>]
[--samples <n>] [--bounces <n>] [--cpu]
Render the viewport to PNG (needs a GPU or software adapter); --samples path traces it
instead (Rendering mode), on the GPU when it has compute shaders, else (or with --cpu) on
the CPU.
texturecraft-cli render <input> <out.png> [--size <W>x<H>] [--view 3d|2d] [--camera <name>] [--yaw <deg>]
[--pitch <deg>] [--samples <n>] [--bounces <n>] [--cpu]
Render the viewport to PNG (needs a GPU or software adapter); --camera looks through a
camera saved in the project (camera.add); --samples path traces it instead (Rendering
mode), on the GPU when it has compute shaders, else (or with --cpu) on the CPU.
texturecraft-cli new <mesh file | builtin:<id>> <out.tcraft> [--resolution <px>] [--sample]
New project; --sample bakes and applies a smart material to every texture set.
texturecraft-cli mcp [--bridge <port>] [--token <token>] [--read-root <dir>] [--write-root <dir>]
@@ -55,7 +55,7 @@ const SUBCOMMANDS: &[(&str, &[&str], &[&str])] = &[
("batch", &[], &[]),
("bake", &["-o", "--resolution", "--maps"], &[]),
("export", &["--preset", "--format", "--padding", "--size"], &[]),
("render", &["--size", "--view", "--yaw", "--pitch", "--samples", "--bounces"], &["--cpu"]),
("render", &["--size", "--view", "--camera", "--yaw", "--pitch", "--samples", "--bounces"], &["--cpu"]),
("new", &["--resolution"], &["--sample"]),
("mcp", &["--bridge", "--token", "--read-root", "--write-root"], &[]),
("serve", &["--port", "--read-root", "--write-root"], &[]),
@@ -336,6 +336,9 @@ fn render(a: &Args) -> R {
cpu: a.has("--cpu"),
};
let mut h = open(input, None)?;
if let Some(name) = a.get("--camera") {
h.command_run("camera.select", json!({ "name": name })).map_err(s)?;
}
let t0 = std::time::Instant::now();
let r = h.render_png(&o).map_err(s)?;
let secs = t0.elapsed().as_secs_f64();
+6
View File
@@ -128,6 +128,12 @@ fn path_traced_render_needs_no_gpu() {
let lum = |x, y| img.get_pixel(x, y).0.iter().map(|v| *v as u32).sum::<u32>();
assert!(lum(48, 28) > lum(1, 1) + 60);
}
// --camera looks through a camera saved in the project; an unknown name is an error.
let proj = d.join("cams.tcraft");
ok(&["run", "builtin:cube", "camera.set", r#"{"yaw": 80, "distance": 9}"#, "-o", p(&proj)]);
ok(&["run", p(&proj), "camera.add", r#"{"name": "Side"}"#, "-o", p(&proj)]);
ok(&["render", p(&proj), p(&out), "--size", "48x32", "--camera", "Side", "--samples", "2", "--cpu"]);
assert_eq!(cli(&["render", p(&proj), p(&out), "--camera", "Nope", "--samples", "2", "--cpu"]).status.code(), Some(1));
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);
+1
View File
@@ -217,6 +217,7 @@ 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
texturecraft-cli render scene.tcraft hero.png --size 1200x900 --camera Hero --samples 2048 # a saved camera (camera.add), path traced
```
`<input>` is a `.tcraft` project, a mesh file or `builtin:<id>`. A batch script is a list of
Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 KiB