> [!abstract] Summary > Deep-dive reference on how to make **Mari fast** — color management setup, RAM/cache benchmarking, importing Substance Painter bakes as channel presets (instead of Geo Channels) so they stay filterable, per-object workflow inside clusters, proxy/full-res subdivision, hotkeys, normal-map strategy, and useful Extension Pack shortcuts. > [!info] Companion notes > - [[MARI Single channel Practice]] — base workflow > - [[MARI Multi channel Practice]] — multi-material workflow > - [[MARI Pro Tips]] — general pro tips and Kafitz speed pass --- # Part 1 — Color Management - Work in **ACEScg** whenever the pipeline allows it. - Set the Mari color space on project creation — retrofitting it afterwards is painful. - Tag every color input (base color, SSS color, emission color) as **`Utility - sRGB - Texture`** or its ACEScg equivalent; tag data inputs (roughness, bump, AO, masks) as **`Raw` / `Utility - Raw`**. - Match the render color space (Arnold ACEScg) to the Mari color space so the viewport is representative. --- # Part 2 — Performance Benchmark ## The Spinning Wheel The spinning wheel = Mari compiling / caching. There are two levers that reduce it measurably: 1. **Exclude the Mari executable from the virus scanner** (Windows Defender and similar). - Reference: [UE5 shader compile optimization](https://store.algosyntax.com/tutorials/unreal-engine/ue5-how-to-speed-up-compiling-shaders) — same principle applies to Mari. 2. **Raise the Mari process priority** in Task Manager (Windows) — `High`, not `Realtime`. ## RAM & Memory Parameters | Setting | Recommendation | Why | | --- | --- | --- | | **RAM** | Half of total system RAM | Leaves headroom for OS + viewer + renderer | | **Max Image Memory** | High, when many images feed Tiled / Triplanar nodes | Count all image inputs outside Paint nodes and Bake Points, multiply by **256 MB** for a worst-case estimate | ![[file-20250127222737552.png]] ![[file-20250127222751184.png]] > [!tip] Rule of thumb > If your node graph uses **N** images in Tiled or Triplanar nodes, budget **N × 256 MB** of Max Image Memory. --- # Part 3 — Importing Bakes (Channel Presets, Not Geo Channels) The recommended path when you already have **Substance Painter** bakes (AO, curvature, thickness, position, normal…): 1. Import the SPP bakes — **do not** use Geo Channels for them. 2. In the **Channels** window, open **Channel Preset**. ![[file-20250111161901581.png]] 3. Point the **Root path** to the folder containing your bakes, click **Scan**. Mari loads each map as a proper channel. ## Why channels, not Geo Channels? Channels stay **filterable** — Geo Channels do not (without adding a Bake Point, which is an extra, slow step). Example — soft-AO variant: 1. Duplicate the AO channel. 2. Select the copy → **Filter** window → **Blur → Gaussian**. 3. Set the blur radius. You now have a softer AO alongside the original, ready to be multiplied/masked without rebaking anything. --- # Part 4 — Object & Cluster Workflow ## Work per object inside a cluster Splitting a complex asset into **one object per material** (a `clus` in PROTOCOL naming) keeps each Mari object focused and fast. > [!tip] Paint two objects at once > If you display two objects simultaneously **and** click a paint node inside each of them, you can project-paint on both at the same time. Handy for matching seams at the boundary between two objects. ## Subdivision & Proxy - Import both the **proxy** and the **full-res** model. - Texture on the proxy for speed; flip to the full-res version only to validate silhouette or displacement. - Use **Subdivision controls** on the object to raise or lower mesh density on demand rather than re-importing. --- # Part 5 — Hotkeys & Shortcuts | Hotkey | Action | | --- | --- | | **K** (hold in viewport) | Open the brush HUD — cycle through brushes and parameters without leaving the viewport | | **Shift + E** (Extension Pack) | Quick **Export** shortcut | ![[file-20250111162448153.png]] ![[file-20250111162510614.png]] --- # Part 6 — Normal Maps ## Work in Bump, Convert at the End - Author a **height / bump map**; apply the **`Height as Normal`** node at the end of the chain. - Consider **baking** the result — the `Height as Normal` evaluation is *very* heavy at interactive rates. ## Mixing Multiple Normals Use a **Merge** node and set its **Mode** to **`Mix Reoriented Normal Map`** — a reoriented-normal blend is the only physically correct way to combine two tangent-space normal maps. > [!warning] A plain `Overlay` or `Average` blend on normals will break the tangent basis and introduce shading artifacts. --- # Part 7 — Additional Optimizations ## Channel Hygiene - Delete unused channels — they still cache on disk even when not connected. - Use the **lowest bit depth** that works per channel: 8-bit for color, 16-bit for bump / normal / displacement, 32-bit only when you actually need HDR range. - Match the channel's **UV Patch size** to the real texel density of the asset. Don't default everything to 4K. ## Graph - Place a **Bake Point** at the output of every finished material group — see [[MARI Multi channel Practice Jotu]] for the multi-channel bake setup. - Group repeated chains into **Node Groups** (`.mng`). - Use **Teleport** nodes to keep the graph readable; the receiver evaluates only once per frame. ## Disk & Project - Always store the project on a **local NVMe SSD**. Network paths destroy Mari performance. - When the project gets heavy: **bake milestones → archive → reopen** in a fresh project. Mari accumulates state that slows interactive feedback. - Use **File → Archive Project** (`.mra`) when handing the project to another artist — smaller and atomic. ## Viewport - Lower the **shader LOD** while masking. - **Ctrl + Space** to stop auto-compiling the shader during heavy editing bursts. - Disable unused Arnold lobes (SSS / coat / transmission) on the preview shader to save compile time. --- # Part 8 — References - [[MARI Single channel Practice]] - [[MARI Multi channel Practice]] - [[MARI Pro Tips]] - [Jens Kafitz — Mari Speed Optimization](https://www.jenskafitz.com/tutorials/mari/speed-optimization/) - [Algosyntax — UE5 shader compile optimization (Virus Scanner exclusion)](https://store.algosyntax.com/tutorials/unreal-engine/ue5-how-to-speed-up-compiling-shaders)