Vixen
dd8b0a81
csharp
public static class TextureRunner

`vixen texture bake` — a folder of authored maps in, a material asset out.

Read the guide page for this →

Remarks

docs/plan/48 § M5's CLI row, and it runs the same code a panel will. Everything below the argument parsing is MaterialBake and ProjectMaterialBaker in Vixen.Editor.Assets — the ORM packing, the mip chain, the block compression, the scan-then-read-back GUID dance, the texturing: block and the painted-over refusal. There is one baker and this is a second caller of it, which is the only arrangement in which "the same code the panel runs" is a fact rather than an intention.

⚠ It reads maps from a folder and does not evaluate a graph, and the reason this file used to give for that had become a stale claim that argued against fixing it — #1009. It said a .vxtexgraph "is M4's document and does not exist yet". It exists: TextureCompoundLibrary.Extension is that extension, TextureGraphEditorFactory opens one, and TexturingModule's Bake Material verb now evaluates one and writes a material through ProjectMaterialBaker — this type's own baker, called from the editor as a second caller rather than copied.

⚠ And --graph is the other half of this verb now, rather than the thing this file explained the absence of — #1020. TextureGraphRunner compiles and evaluates one, on a device HeadlessGraphics refuses to fake, and ends in this type's own baker. What is here stays independently useful and is the half that needs no GPU: a build script with a folder of authored or externally generated maps gets a packed, mipped, compressed, provenanced material out of it.

⚠ The inputs are named by usage and the outputs by file, which are not the same vocabulary. hull_roughness.png is an input and hull_orm.png is an output, so re-reading a bake's own output folder does not round-trip — the packed map is three inputs and one output by construction. The alternative, naming inputs after the files, would mean asking an artist to pack the ORM map themselves, which is the work this verb exists to do.

Methods (1)

  • public static ExitCode Bake(Project project, string from, string name, string folder, string adapter, bool force, bool parallax, TextWriter output, TextWriter error)

    Bakes a folder of maps into a material in a project.

Used by (1)

  • VixenCommandVixen.Cli