# INU_Tools (GTA SA) — Documentation > **[Русская версия / Russian version](DOCS_rus.md)** --- ## Table of Contents - [Installation](#installation) - [Quick Start](#quick-start) - [Floating window (Validation)](#floating-window-validation) - [Multi-game support (III / VC / SA)](#multi-game-support-iii--vc--sa) - [Export / Import](#export--import) - [DFF (Models)](#dff-models) - [COL (Collision)](#col-collision) - [TXD (Textures)](#txd-textures) - [Export All (Batch)](#export-all-batch) - [IDE / IPL / IMG](#ide--ipl--img) - [Import Map Workflow](#import-map-workflow) - [Import selected models](#import-selected-models) - [Import from a models folder](#import-from-a-models-folder) - [IDE (Definitions)](#ide-definitions) - [IPL (Placement)](#ipl-placement) - [IPL Sections](#ipl-sections) - [IMG Archive](#img-archive) - [Preset / data folder](#preset--data-folder) - [BBox Mode](#bbox-mode) - [Model type detection (DFF / LOD / COL)](#model-type-detection-dff--lod--col) - [LOD Detection](#lod-detection) - [Model ID Manager](#model-id-manager) - [Materials](#materials) - [GTA Material](#gta-material) - [COL Surface Types](#col-surface-types) - [Textures](#textures) - [Alpha Materials](#alpha-materials) - [Prelight (Vertex Colors)](#prelight-vertex-colors) - [Baking](#baking) - [Scatter Color](#scatter-color) - [Post-Processing](#post-processing) - [COL Light](#col-light) - [Presets](#presets) - [Adjust Color (per-attribute V-offset)](#adjust-color-per-attribute-v-offset) - [2DFX Effects](#2dfx-effects) - [Particle Effects (effects.fxp)](#particle-effects-effectsfxp) - [UV Tools](#uv-tools) - [Check](#check) - [Validate Scene](#validate-scene) - [Export audits — "Game will crash"](#export-audits--game-will-crash) - [File Scanner](#file-scanner) - [Lint Profiles](#lint-profiles) - [Map Analyzer (Game Validator)](#map-analyzer-game-validator) - [Texture Browser](#texture-browser) - [Texture Baking](#texture-baking-210) - [Characters (Skinned DFF)](#characters-skinned-dff) - [Animated Map Objects](#animated-map-objects) - [Cutscene Cameras (.dat)](#cutscene-cameras-dat) - [Handsign (ghands.ifp)](#handsign-ghandsifp) - [Fragment Mesh](#fragment-mesh) - [Split into Chunks](#split-into-chunks) - [Water IO](#water-io) - [Map zones (map.zon)](#map-zones-mapzon) - [Path IO](#path-io) - [Vehicles](#vehicles) - [Grass](#grass) - [X Radar Maker](#x-radar-maker) - [Time cycles (timecyc.dat)](#time-cycles-timecycdat) - [LightMap (beta_MTA)](#lightmap-beta_mta) - [Integrations](#integrations) - [Ariane Bridge](#ariane-bridge) - [Asset Library](#asset-library) - [Advanced](#advanced) - [Map Export](#map-export) - [Binary IPL Write](#binary-ipl-write) - [UV Animation](#uv-animation-210) - [Breakable Objects](#breakable-objects) - [IFP Batch Import](#ifp-batch-import) - [GTA Material Panel](#gta-material-panel) - [Bitmaps Manager](#bitmaps-manager) - [CST IO](#cst-io) - [Vehicle Scale Helper](#vehicle-scale-helper) - [Vehicle Damage Variants](#vehicle-damage-variants) - [Train Station Markers](#train-station-markers) - [Roadblocks & Traffic Lights](#roadblocks--traffic-lights) - [FLA4 Path Format](#fla4-path-format) - [Technical Reference](#technical-reference) - [Project Structure](#project-structure) - [Core Modules](#core-modules) - [File Formats](#file-formats) - [Object Properties (INUObjectProps)](#object-properties-inuobjectprops) - [Material Properties (INUMaterialProps)](#material-properties-inumaterialprops) - [Scene Properties](#scene-properties-inuscenesettings) --- ## Installation **Blender 4.2+ — extension installation:** open *Edit → Preferences → Get Extensions*, search for **INU Tools**, or use *Install from Disk…* with the release extension `.zip`. Use the release archive, rather than GitHub's source-code ZIP. **Manual installation (Blender 2.83+):** copy the `INU_tools/` folder into the addons directory, then enable **INU_tools(gta_sa)** in *Edit → Preferences → Add-ons*: - **Windows:** `%APPDATA%/Blender Foundation/Blender//scripts/addons/` - **Linux:** `~/.config/blender//scripts/addons/` - **macOS:** `/Users//Library/Application Support/Blender//scripts/addons/` **Requirements:** - Blender 2.83+ (4.2+ for installs through extensions.blender.org) - Blender 5.2.3 LTS: background checks cover extension registration, DFF/COL round-trips, IFP preview, NODES editing, texture baking and Day/Night prelight. Older Blender support is retained. Checks requiring external game assets are skipped when those files are unavailable; background checks do not verify the interactive panel layout. - Itera Tools 3 — optional, for vertex lighting **Settings persistence:** all paths (Game Root, IDE, IPL, IMG, textures) and presets (profiles, material & ID presets, pipeline flag defaults) live in a user-writable data folder — `paths.json` plus per-feature subfolders. By default this is Blender's per-user extension directory; you can point it at any folder of your own via **Properties → Scene → INU Tools → Preset folder** (see [Preset / data folder](#preset--data-folder)). Settings survive addon updates and are restored automatically when Blender starts. --- ## Quick Start ### Export a model to GTA SA 1. Name objects so types are auto-detected — put `LOD` in LOD names (`LODmybuilding`), and use `_DFF` / `_COL` when a model and its collision share a base name (see [Model type detection](#model-type-detection-dff--lod--col)) 2. Set **Model ID**, **TXD Name**, **Draw Distance** in object properties (`obj.inu`) 3. Select all, click **Export All** → choose folder 4. Output: `mybuilding.dff`, `mybuilding.col`, `LODmybuilding.dff`, `mybuilding.txd` ### Import the entire GTA SA map 1. Set **Game Root** to GTA SA folder (e.g. `D:\GTA San Andreas\`) 2. In the **Map** tab, choose the region, save the `.blend` and click **Extract Resources** to prepare the DFF/COL/textures cache 3. Click **Import Map**. For a models folder or selected IDE/IPL files, use the separate [Import workflow](#import-selected-models) ### Hotkeys | Key | Action | |-----|--------| | `Shift+T` | Toggle UV Editor | | `Shift+A` | Add GTA SA model (Army.dff / Admiral.dff) | ### Floating window (Validation) A free-floating GPU-rendered window gives one-click access to the pre-export sweep without scrolling the N-sidebar: | Window | What it holds | Toggle | |---|---|---| | **Validation** | Pre-export sweep results (quaternions, paintjob, UV-anim × night vcols, _ok/_dam pairs) with one-click fixes | Click 🪟 in the **Check** panel header | The floater is **draggable** (any non-button area), **collapsible** to the title bar, **dockable per-workspace** (Lock icon — appears only in pinned workspace), and uses your current Blender theme palette. Position survives `.blend` save/load. > The other floaters (Info, Import/Export, Lighting, IDE/IPL/IMG) had their launch buttons removed — only Validation remains. The underlying floater code still exists, but those windows are no longer exposed in the UI. --- ## Multi-game support (III / VC / SA) The active game is picked from the top of the **GTA Tools** N-sidebar — three buttons **San Andreas / Vice City / GTA III**. Every exporter, validator, and lint check routes through this choice. Default = San Andreas (the addon's primary target). Import auto-detects the file's game and either flips the scene (when fresh) or shows a warning suggesting to switch the tab manually. ### Format matrix | Format | III (RW 3.3) | VC (RW 3.5) | SA (RW 3.6) | |---|:-:|:-:|:-:| | **DFF** read | ✅ auto-detect by RW version | ✅ | ✅ | | **DFF** write | ✅ (skips SA-only Night vcols, Pipeline chunk, UV anim) | ✅ (skips Night vcols, Pipeline) | ✅ | | **COL** | ✅ `COLL` v1 | ✅ `COL2` v2 | ✅ `COL3` v3 | | **TXD** | ✅ (RW lib_id per game) | ✅ | ✅ | | **IDE** | ✅ (5-field OBJS, no `txdp`/`2dfx`) | ✅ (5-field, no `2dfx`) | ✅ (multi-mesh, `txdp`, `2dfx`) | | **IDE cars cols** | 12 | 13 (+ `anims`) | 15 (+ flags, wheel split) | | **IDE peds cols** | 7 | 10 (+ anim_file, radio×2) | 14 (+ flags, voice×3) | | **IPL inst cols** | 12 (scale, no interior) | 13 (interior + scale) | 11 (lod_index, no scale) | | **IPL binary** | — | — | ✅ `bnry` | | **IMG** | ✅ VER1 (split `.dir` + `.img`) | ✅ VER1 | ✅ VER2 | | **IFP** | ✅ ANPK chunked | ✅ ANPK | ✅ ANPK + ANP3 compressed | | **2DFX storage** | IDE `2dfx` section | IDE `2dfx` section | DFF chunk 0x253F2F8 | | **2DFX types** | Light, Particle, Strobe | + PedAttractor, SunGlare | + Type 5 (special-IDE) | | **Surface IDs** | 0–84 (clamp on write) | 0–85 | 0–178 | | **model_id ceiling** | 6500 | 8500 | 19999 | ### Switching games **Manual:** click III / VC / SA in the GTA Tools header. **Automatic on import:** the import operators (DFF/COL/IPL/TXD/IMG) have a "Game" dropdown in the file browser sidebar with **Auto** as the default. Auto reads the file's header/columns and stamps the right game on imported objects. If the detected game differs from the active scene's: - **Fresh scene (game=SA + 0 INU-tagged objects):** scene auto-flips to detected. - **Populated scene:** WARNING shown — `Imported file = VC, but the scene's active game = SA. Switch the GTA Tools tab to "VC"`. Tab switch is manual to avoid surprise flips in mixed-game projects. **On export:** every export dialog opens with an **"Export to game:"** block at the very top — a PC/Mobile row over a SA/VC/III row — that sets the output's RW version (III 3.3 / VC 3.4 / SA 3.6) and IPL/IDE column layout. It defaults to the project game (set by auto-detect on import); override it right before exporting. **GTA III textures (auto R↔B):** III uses palettized (PAL8) textures whose palette is stored BGRA. The importer auto-swaps R↔B **only** for D3D8 palettized textures, so III colours import correctly (bark stays brown, not blue). VC (16-bit) and SA are left untouched — no manual toggle, keyed off each texture's own `platform_id`. ### Cross-game translation (lossy) When you import a III file and export it as SA (or vice versa), the writer routes data through canonical-category tables so the bytes match the target engine's expectations. - **COL surface IDs** — 12 canonical categories (TARMAC, GRASS, WOOD, METAL, GLASS, …) via `core/surface_translate.py`. SA's 178 surfaces collapse to ~12 categories on cross-game; SA → VC → SA loses sub-type distinctions like `GRASS_SHORT` vs `GRASS_LONG`. Each material carries `inu.col_source_game` so this only fires on actual game mismatch. - **IDE objs.flags** — bit values mean different things per game. Example: bit `0x20` is `IGNORE_LIGHTING` in III/VC but anim-only in SA. `core/ide_flag_translate.py` translates via 19 categories. UI shows only the checkboxes valid for the active game (III=6, VC=10, SA=15). - **PEDS cars_can_drive** — VC inserted `normal` at bit 0, shifting III's positions by 1. `core/ped_mask_translate.py` re-maps via canonical class names. `IdePed.source_game` tags imported peds. ### Validate Scene — cross-game warnings When the scene targets III/VC but objects still carry SA-only features, **Validate before export** flags them: - `model_id > vanilla_max` (would need FLA) - `has_night_vcols` (SA-only RW extension) - `has_multi_mesh_lod` (downgrades to single-mesh) - `has_uv_anim_material` (III-only; UV anim is RW 3.5+) - `fx_2dfx_ids` outside per-game allowlist ### Known limitations - **Full map round-trip is SA-only.** III/VC modders can import vanilla DFF/COL/TXD/IDE/IPL/IMG individually, but the Map Import pipeline (district auto-split, bulk IMG rebuild) was authored for SA's data layout. - **Asset Library Builder is SA-only.** Future work — needs III/VC source parsers. - **IFP** — ANP3 (compressed int16) is SA-native; III/VC auto-downgrade to ANPK with a warning if you forget to switch the export format. - **2DFX import for III/VC IDE** creates placeholder Empties (position + type + color), with raw type_params stashed on the Empty for byte-identical re-export. Per-type Blender prop mapping (corona texture, particle name, attractor behaviour) is partial — Light and Particle are wired; PedAttractor / SunGlare / Strobe re-emit via stashed params only. --- ## Export / Import **Panel:** View3D → Sidebar (N) → GTA Tools → Export / Import > The 🌐 planet icon in the panel header opens [Ariane support (INU Tools + DragonFF)](https://github.com/INU-ez/ariane-support-INU-Tools-and-DragonFF-) — a map editor for round-trips with the addon (temporary fork until Ariane's public release). ### DFF (Models) | Button | Operator | Description | |--------|----------|-------------| | Import DFF | `gtatools.import_dff` | Import .dff file with mesh, materials, UV maps | | Export DFF | `gtatools.export_dff` | Export selected mesh to .dff (GTA SA v3.6.0.3) | **Export includes:** geometry, materials, vertex colors (Day/Night), UV maps, normals, 2DFX effects, BinMesh PLG. **Auto TXD:** when importing DFF, automatically imports .txd from the same directory if found. **Textures from files (2.4.0):** whatever the TXD did not cover (or everything, when there is no `.txd` next to the model) is pulled in as ordinary images — `png / jpg / tga / bmp / dds / tiff / webp` — by looking for a file named after the texture in the model's folder **and its subfolders**. Drag-drop goes through the same path. The report says how many textures came from there: `textures from files: N`. **Platform (2.4.0):** a **PC / Mobile** selector in the import panel. Mobile DFFs are recognised from the data itself; the selector sets the default for later exports and hints. **Import 2DFX:** a toggle on DFF import (single Import, the Import-All file browser, and drag-drop). Creates the 2DFX effect empties baked into the DFF — lamps/coronas, particles, ped attractors, sun glare, signs, etc. On by default; turn it off to import the model geometry without its effects. > 💡 **Example — import a single model:** File → Import → GTA SA DFF → pick `admiral.dff`. The addon parses geometry, materials, UV. If `admiral.txd` sits next to it, textures are applied automatically. > 💡 **Example — export a single mesh:** select mesh → N → Export / Import → **Export DFF** → choose path → saves with current materials and vertex colors. #### DFF format limits (uint16 / uint8) RenderWare packs triangle indices and counts into small integer types — these limits apply **per geometry (Atomic)**: | Field | Type | Max | |---|---|---| | Vertices | u16 (triangle index in `<4H>`) | 65 536 | | Triangles | — | 65 536 | | Materials | u16 (material index in triangle) | 65 536 | | UV layers | u8 (bits 16-23 of geometry flags) | 255 (SA renders max 2) | | Bones in Skin PLG | u8 | 255 | If a mesh exceeds the limit, export raises a clear error such as: ``` admiral.dff: geometry #0: 78432 vertices — RenderWare stores triangle indices in uint16 (max 65536). Split the mesh or simplify (Decimate). ``` **There is no workaround**: the limit is hard-coded into the binary format and the RenderWare engine. Either split the mesh into multiple `model_id`s or simplify the geometry. ### COL (Collision) | Button | Operator | Description | |--------|----------|-------------| | Import COL | `gtatools.import_col` | Import .col with surface materials | | Export COL | `gtatools.export_col` | Export as COL3 format | | Generate COL | `gtatools.auto_col` | Build a collision mesh from the selected model — **Convex hull** or **Bounding box** | **Generate COL** (`gtatools.auto_col`, button "Generate COL" in the Export/Import section): select a model and it creates an editable `_COL` mesh, either a **convex hull** ("Convex Hull") or an axis-aligned **bounding box** ("Bounding Box"). The mesh is tagged `inu.type='COL'` and flows into normal COL export; you can edit it afterwards like any COL. COL export writes surface material IDs and keeps the geometry in model-local space. It bakes the object's **scale** but **not its rotation** — a viewport rotation is placement (it belongs in the IPL), so it is never baked into the collision, and the COL matches the DFF under the same IPL placement. > 💡 **Example:** create a cube, name it `mybuilding_COL`, assign a material with `col_mat_index = 0` (default asphalt) in Properties → Material → **COL Surface Type**. Select → **Export COL** → you get `mybuilding.col` with the correct surface material. #### COL format limits (uint16) COL2/COL3/COL4 stores counts and indices as **uint16**, so per-model limits are: | Field | Max | |---|---| | Vertices | 65 536 | | Faces (triangles) | 65 535 | | Spheres / boxes | 65 535 each | | Shadow mesh (verts/faces) | same limits | | Header `model_id` | 65 535 | If a mesh exceeds the limit, export raises a clear error such as: ``` collision.col: 'collision': 78432 faces — COL format supports max 65535. Split the mesh or simplify (Decimate). ``` **There is no workaround**: the limit is hard-coded into the COL format and the RenderWare engine. Either split the mesh into multiple `model_id`s or simplify (vanilla SA collisions are typically below 5–10k tris). **Collision lighting on export:** **COL Light Mode → From material** preserves each COL material's Day/Night Light values; faces without a setting keep zero. **Auto: day + night** overrides the whole collision using the configured day/night values (default Kam values: day 14, night 4, packed byte 78). Use **From material** to preserve imported or hand-edited lighting. ### TXD (Textures) | Button | Operator | Description | |--------|----------|-------------| | Import TXD | `gtatools.import_txd` | Extract textures and assign to materials | | Export TXD | `gtatools.export_txd` | Compile textures into .txd archive | **Compression backend:** pure-numpy DXT encoder bundled with the addon (`core/dxt.py`) — vectorized BC1/BC3, ~7× faster than the old cluster-fit path on the textures vanilla SA actually ships. No external binaries needed. An experimental `bpy.gpu` compute-shader path is selectable in Scene properties (`gtatools_dxt_backend`). **Supported formats:** DXT1 (opaque), DXT3 (sharp alpha), DXT5 (smooth alpha). Auto-detected based on alpha channel. > 💡 **Example — quick TXD build:** a mesh with 3 textures (brick, window with alpha, logo) → select → **Export TXD** → you get a `.txd` where brick is DXT1, window is DXT5, logo is DXT3 — format auto-picked based on each image's alpha channel. **Append to existing TXD (2.1.0).** The export dialog (and Export All) has an **"Append to existing"** checkbox. If the chosen `.txd` already exists, the scene's textures are **added/updated** in it (matched by name, case-insensitive) while **every other texture in the file (from other models) is kept byte-for-byte**. Without the checkbox the file is fully overwritten. > ⚠ **Gotcha — cache & in-place edits.** Encoded DXT is cached by `session_uid+size`, so an in-place pixel edit (Image Editor) used to ship the stale version. The cache is now cleared on every manual export — but if you recolour a texture with a **material node** (Hue/Sat etc.), export **ignores** it: it reads the Image datablock itself, not the node result. Bake/save the edit into the image. > ⚠ **Gotcha — textures too dark/bright (bit depth).** `image.pixels` for **16/32-bit** PNGs (and EXR) are scene-linear, while **8-bit** ones are already sRGB. The exporter accounts for this (it linear→sRGB-encodes only float images). If a TXD texture's brightness looks off, check the source bit depth and colour space (sRGB vs Non-Color). ### Export All (Batch) | Button | Operator | Description | |--------|----------|-------------| | Export All (To Folder) | `gtatools.export_all` | Batch export DFF+COL+LOD+TXD | Select your model + its LOD + collision (types are auto-detected — `LOD` in the name marks a LOD, `_DFF`/`_COL` separate a model from its collision), click Export All, choose output folder. **Toggles:** DFF / COL / LOD / TXD — enable/disable each format. **Pipeline:** None / Building (Day/Night vertex colors) / Reflections (window reflections). > 💡 **Example — export a building with LOD and collision:** you have three meshes `hospital_DFF`, `hospital_LOD`, `hospital_COL`. Select all three → **To Folder** → you get 4 files at once: `hospital.dff` + `hospitalLOD.dff` + `hospital.col` + `hospital.txd`. Ready to drop into the game. ### File Menu All formats are also accessible via **File > Import** and **File > Export**: - GTA SA DFF (.dff) - GTA SA COL (.col) - GTA SA TXD (.txd) - GTA SA IDE (.ide) - GTA SA IPL (.ipl) ### Drag & Drop Drag PNG/JPG/TGA images from File Browser into the 3D viewport to automatically create a material with that texture assigned. --- ### Multi-select DFF Import (2.1.0) **Menu:** File → Import → **INU Import** *(or View3D → Sidebar (N) → GTA Tools → Export / Import → **DFF**)* The DFF importer now accepts many files at once. Ctrl- or Shift-click any number of `.dff` files in the file browser and every one is imported as a separate model in a single run, with a live progress bar (press **ESC** to abort — models already built stay in the scene). **Pipeline:** 1. In the N-panel open **GTA Tools → Export / Import** and click the **Import** button, then pick **DFF** — or use the popover **DFF** entry directly. 2. In the file browser, Ctrl/Shift-select all the `.dff` files you want. 3. (Optional) In the sidebar set **Game** — leave on **Auto-detect** to read each file's RW version, or force III / Vice City / San Andreas. 4. (Optional) toggle **Auto TXD** — see *smart TXD auto-pull* below. 5. Click **Import DFF**. Each selected file is parsed and built in turn; the status bar shows `current/total`. **What you get automatically (no extra clicks):** | Feature | What it does | | --- | --- | | Smart TXD auto-pull | With **Auto TXD** on, for each DFF the addon looks for a matching `.txd` next to it: ① `.txd` in the same folder, ② a `.txd` covering ≥50% of the DFF's textures (highest coverage wins, smaller file breaks ties), ③ the only `.txd` in the folder. Only the textures that DFF actually references are decoded, so dropping a model into an already-loaded map stays fast. | | LOD-aware naming | A file recognised as a LOD (e.g. `LODham_orz_str_18`) is named `ham_orz_str_18_LOD`; normal models get the `_DFF` suffix. Multi-part DFFs keep clean frame names. | | Auto weld + sharpen | Map/terrain meshes (no authored normals) are welded and their hard edges split right into the geometry — no piles of EdgeSplit modifiers, so FPS stays high. | | Custom split normals | The DFF's per-vertex normals are re-applied as custom split normals, so the model shades **exactly** as it was authored (hard/soft edges preserved). | > 💡 **Example — import a whole folder of buildings at once:** Open **INU Import**, press Ctrl+A in the file browser to select every `.dff` in a building folder, and import. Each becomes its own object, each pulls its matching `.txd`, LODs are named `…_LOD`, and authored shading is preserved — no per-file repetition. > Drag-and-drop also works: drag one or several `.dff` files straight into the 3D viewport and they import as a batch with the same auto-TXD behaviour. ### Import dialog — format filter (2.1.0) **Menu:** File → Import → **INU Import** The **INU Import** dialog is a pure dispatcher: it imports **exactly** the files you tick, each through its own importer by extension. The sidebar header **Show formats:** has six toggle buttons that filter which file types the browser shows: | Toggle | Extension | | --- | --- | | **DFF** | `*.dff` | | **COL** | `*.col` | | **CST** | `*.cst` | | **TXD** | `*.txd` | | **IDE** | `*.ide` | | **IPL** | `*.ipl` | - Untick a format and those files disappear from the browser; the list re-filters instantly. - There is **no** auto-TXD pull here — if you want textures, tick **TXD** and select the `.txd` in the list. (Auto-TXD lives in **Import DFF** / drag-drop, not here.) - If a `.txd` is selected alongside a `.dff`, the TXD is loaded first so the DFF's materials immediately pick up its images. > 💡 **Example — load a model plus its textures and collision in one go:** Open **INU Import**, leave **DFF**, **TXD** and **COL** ticked, untick the rest, select `bistro.dff`, `bistro.txd` and `bistro.col`, and import. All three load together with textures already linked. ### Export DFF — per model (2.1.0) **Panel:** View3D → Sidebar (N) → GTA Tools → Export / Import → **DFF** (under the **Export** popover) The mirror of multi-select import: select several models and get **one `.dff` per model**, each named from its model name. Parts of a single model (a hierarchy) export into one file. **Pipeline:** 1. Select the model(s) in the viewport. The panel's top box shows the detected **DFF / LOD / COL** counts so you can confirm the batch size. 2. Open the **Export** popover and click **DFF**. 3. In the file browser pick the destination **folder**. The sidebar reminds you *"Each selected model → its own .dff"* and shows the **Pipeline + DFF Flags** block (these come straight from each object's N-panel DFF Flags — no separate export override). 4. Confirm. Each model group is written as `.dff`. > 💡 **Example — export 10 reworked props:** Box-select 10 prop meshes, **Export → DFF**, choose your `models/` folder. You get 10 separate `.dff` files named after the meshes, each carrying its own DFF flags. ### Export All — to folder or into .img (2.1.0) **Panel:** View3D → Sidebar (N) → GTA Tools → Export / Import → **Export** → **All → Folder** or **All → IMG** **Export All** writes every selected model group — DFF + LOD + COL + TXD (+ optional CST) — in one pass. In the export dialog the **What to export:** row holds the format toggles: | Toggle | Output per model | | --- | --- | | **DFF** | `.dff` | | **COL** | `.col` | | **LOD** | `LOD.dff` | | **TXD** | `.txd` (textures from the DFF + LOD) | | **CST** | `.cst` *(2.1.0 — collision in Collision File Editor II text format, same mesh as the .col)* | Conditional options appear when their format is on: a **COL Library** package toggle (all collisions into one multi-entry `.col`), shared-TXD packaging, and the collision auto-light block (shared by COL and CST). **Also to IDE / IPL** *(paths from the panel)*: when ticked, after the models are written the exporter also appends each one to the **IDE** and **IPL** files currently picked in the **IDE / IPL / IMG** panel (id, name, TXD, draw distance + placement, and the recomputed `lod_index`). **All → IMG:** at the bottom of the dialog, the **All → IMG** toggle redirects the whole export straight into the `.img` archive whose path is set in the addon preferences — the chosen folder is ignored. If no `.img` path is configured the dialog shows an error and the export is blocked. **Pipeline (to a folder):** 1. Select all the models to export. 2. **Export → All → Folder**. 3. In the dialog tick the formats you want under **What to export:** (e.g. DFF + COL + TXD). 4. Pick the destination folder and confirm. Files are written per model group with a progress bar. **Pipeline (into gta3.img):** 1. Set the `.img` path in the addon preferences once. 2. Select the models, then **Export → All → IMG** (or open **All → Folder** and tick **All → IMG**). 3. Confirm — every model is packed directly into that archive, no folder needed. > 💡 **Example — export 10 selected models straight into gta3.img:** With the addon's `.img` path pointing at `gta3.img`, select your 10 finished buildings and run **Export → All → IMG**. Their DFFs (and TXDs/COLs for the ticked formats) are written into the archive in one operation — no intermediate folder, no manual repacking. --- ## IDE / IPL / IMG **Panel:** View3D → Sidebar (N) → GTA Tools → IDE / IPL / IMG **Settings:** Properties → Scene → INU Tools → Import Map ### Import / Export / Map — three tabs The top of the IDE / IPL / IMG panel has three toggle buttons, **Import** | **Export** | **Map**, like the Ariane tab. These used to be separate collapsible sub-panels. The active tab's button is depressed; everything below belongs to it. The **Map** tab holds the full map import/export workflow (Game Root, region, resource extraction, Import Map / Export Map, BBox) — it moved here from *Properties → Scene → INU Tools*. **Import tab** — pulls models from the game into the scene: - **Game Root / Models folder** — choose the game installation for IMG sources, or an unpacked models folder. Filling one clears the other; DFF/TXD/COL in a models folder are indexed recursively. - **IPL** — multi-select: the 📁 button accepts Ctrl/Shift, and picked files accumulate in the collapsible **IPL to import** list. Import merges all selected IPLs (with a `lod_index` offset). - **IMG with IPL models** — archives found by **Find IMG**; the import uses these and any configured primary IMG. **LOD / 2DFX / TXD / COL** toggles control loaded data. These are **ON = load** (the old "Skip" prefixes are gone — LOD on pulls LOD models, TXD on pulls textures, COL on pulls collisions). - **Find IDE** — scans the game folder for the `.ide` files that declare the selected IPLs' models (**IDE with IPL models** list). - **Find IMG** — scans the game folder recursively for every `.img` that actually contains the IPL's model DFFs (**IMG with IPL models** list). Import then pulls models from the primary IMG **plus** all found custom archives (e.g. `maps/RESOURCES`). Needed when a custom map's models are split across several `.img`. - **Import** — the big button. IMG import is **modal**: an **"Import from IMG: X/Y"** counter shows at the bottom, Blender doesn't freeze, and **ESC** cancels. On import it fills: TXD name, LOD partner (`inu.lod_object` from the IPL `lod_index`), distances (LOD → LOD Dist, main model → Draw Dist), and the IDE link (status "In IDE (file)", just like IPL). - **Refresh from IDE/IPL** — pulls fresh data (distances / TXD / flags / coordinates) from the files **into the scene** (file→scene direction). Handy after editing the files by hand. **Export tab** — writing and syncing back to files. At the top sits the **Selected model** status box: - **Selected model** — a per-file status board for the active model. It shows the model name plus one status row each for **IDE**, **IPL** and **IMG** — "In IDE (file)" / "Not in IDE" / "params differ", "In IPL (file)" / "coordinates differ" / "duplicate", "In IMG (file)" / "Not in IMG". Each row carries its own action buttons: **Add** / **Export** (write this model to its own file), a **🗑** to remove it from that file, and a **🔄** icon (in the IPL row, **🔄 = restore coordinates from IPL**; in the IMG row, verify which archive holds the DFF). At the model name: **Check** (read-only present/missing/no-ID) and **🗑 Remove from IDE+IPL** (remove from *both* IDE and IPL and clear link tracking — distinct from a single-file **🗑**). - Collapsible **IPL to export** and **IDE to export** boxes (collapsed by default) — the *same* shared lists populated on the Import tab (Find IDE/IMG, multi-select IPL) — a round-trip. Each header carries icon-only buttons: **🔄 Refresh-from-files** · **+ Add** · **📁 Folder** · **🗑 Clear**. - The **📄 (open in text editor)** button next to the IPL/IDE paths and in the found lists opens the file in the OS external editor. - Below: **Additional (IPL)** (cull/paths/garages sections + "Replace Empty") and the **IMG** box (Export to IMG / Remove from IMG / Rebuild IMG). ### Adding models to the game — full pipeline The end-to-end flow for putting one or more models (with or without LOD) into GTA SA. Example: four models, each with a main model, collision, textures and a LOD: ``` base → base.dff base.col base.txd LODbase.dff base1 → base1.dff base1.col base1.txd LODbase1.dff base2 → base2.dff base2.col base2.txd LODbase2.dff base3 → base3.dff base3.col base3.txd LODbase3.dff ``` **What each piece is:** **DFF** = the model itself · **COL** = collision · **TXD** = texture container · **LOD** = the low-detail model shown at distance · **IMG** = the game's big archive of .dff/.txd/.col · **IDE** = the model's "passport" (ID, name, TXD, draw distance, flags) · **IPL** = placement in the world (coordinates, rotation, and the main↔LOD link). **Order that won't break: ID → IMG → IDE → IPL → Rebuild IMG.** **1. Name objects correctly.** Main model → `base`; LOD → `LODbase` (the `LOD` marker tags it); collision → set its type to COL (or leave it untextured). The addon groups everything by base name: `base` + `LODbase` + collision = one model. Explicit suffixes also work as a manual override (`_DFF`/`_dff`, `_LOD`/`_lod`, `_COL`/`_col`, case-insensitive). **2. Assign Model IDs FIRST.** The game references models by a numeric ID. ID Manager → Auto-Assign gives each model and each LOD a free ID, e.g. `base`=18000, `LODbase`=18001, `base1`=18002 … **If an ID is still 0, Add-to-IDE/IPL refuses with an error** — a row with ID 0 corrupts the game (0 = the player model). Always assign IDs before adding. **3. Pack into the IMG.** Pick your `.img`, Export to IMG. It builds and stores `base.dff`, `LODbase.dff`, `base.col`, `base.txd` (× all models). **Name limit: each entry name is ≤ 24 chars incl. extension.** The longest is the LOD (`LOD`+base+`.dff`), so if `base` is too long the export **blocks and asks you to shorten** — a truncated name wouldn't match the IDE/IPL and the model would be invisible. (Collision note: `base.col` goes into the IMG; make sure your setup actually loads collision from there, or embed it in the DFF.) **4. Add to IDE (define the models).** Pick your `.ide`, Add to IDE. One line per model + one per LOD: ``` 18000, base, base, 299, flags 18001, LODbase, base, 999, flags ← LOD: own ID, same TXD, far draw distance 18002, base1, base1, 299, flags ... ``` Rows go to the **picked file** (the chosen file always wins — no silent split). Flags imported from another game (VC/III) are auto-translated to SA. **5. Add to IPL (place in the world).** Pick your `.ipl`, position the objects, Add to IPL. Each row: ID, name, interior, X/Y/Z, rotation, and **lod_index** — a pointer to the LOD's row in the same IPL. **Select the main model AND its LOD together** so the LOD lands in the same file and the link is set. Adding them separately / to different files loses the link — the addon now tries to recover it from the file and warns if it can't. Coordinates/rotation come from the object's real world transform (parenting and rotation included). **6. Rebuild IMG (compact).** After exports — especially re-exports — use Rebuild IMG to reclaim dead space (each replace appends new data and leaks the old block). It rewrites the archive cleanly via an atomic file swap. **In game:** IPL says "model 18000 stands at X" → IDE says ID 18000 is `base`, TXD `base`, draw 299 → the streamer loads `base.dff`/`base.txd`/collision from the IMG → at distance it swaps to `LODbase.dff` (18001). Same in parallel for `base1`/`base2`/`base3`. ### Import Map Workflow This workflow uses the **Map** tab and its **Import Map** button. For selected IDE/IPL files or a models folder, use the separate **Import** tab described below. **Step 1: Setup** - Set **Game Root** to GTA SA installation folder - Select **Region** (auto-detected from gta.dat: LA, SF, VEGAS, COUNTRY, etc.) - Keep **2DFX off** for district imports (the default); the current toggles use **ON = load**. Otherwise thousands of effect objects can slow the viewport. Enable it when you need the effects. - **Load COL** toggle (default off) — pulls collisions from the cache alongside DFF geometry. Needed for the round-trip workflow (import part of the map → edit → export to IMG in another build). Turn it off if you only care about geometry and want a lighter scene. **Step 2: Extract Resources** - Click **Extract Resources** — extracts all DFF, COL, and textures from IMG archives into `.inu_cache/` folder next to your .blend file (so save the .blend first) - Textures are decoded to PNG in parallel (4 workers, numpy DXT). Already cached files are skipped on re-run - Typical time: ~8 seconds for one region **Step 3: Import Map** - Click **Import Map** — cache-only, reads DFFs, PNG textures and (optionally) COLs from `.inu_cache/` — no IMG access during import - If the cache is empty, a warning is shown and only Empty placeholders are placed from IPL coordinates. Extract resources first to import actual geometry. - DFFs are parsed in parallel (4-worker thread pool, numpy releases GIL) while the main thread creates Blender objects — no wait between stages - COLs are parsed in the same pool. SA ships district-wide lib-COL files (LAs.col, LAn.col …) each containing hundreds of ColModel entries, so the map is keyed by model name (not filename); a DFF named `building01` automatically gets its `building01` ColModel if one exists anywhere in the cached COL libs - Objects auto-sorted into collections — with **Group by IPL** off, into four flat buckets: - **Map_DFF_Far** — draw distance 300+ - **Map_DFF_Mid** — draw distance 100-299 - **Map_DFF_Near** — draw distance <100 - **Map_LOD** — LOD models (detected by name: `LODfoo`, `foo_LOD`, `foo1LOD`, `modeLODlaett`) - **Map_COL** — collision meshes (created lazily, only if `Load COL` is on AND at least one match is found). Each COL object shares the transform of its DFF instance - **Group by IPL** toggle (**default on**) — instead of the four flat `Map_DFF_*` / `Map_LOD` buckets and the global `Map_COL`, objects go into per-IPL collection trees, named after the source IPL filenames (no `Map_` prefix — keeps the round-trip readable, the parent's name matches the original IPL exactly): ``` vegasN/ vegasN_DFF vegasN_LOD vegasN_COL vegasS/ vegasS_DFF vegasS_LOD vegasS_COL vegasn_stream0/ … ``` Each parent collection is hidden during import and re-shown afterwards; sub-collections are created lazily, so an IPL with no LODs gets no `_LOD` sub. Useful when you want to: - Hide an entire district at once (toggle the parent's eye icon — DFFs, LODs and collisions go dark together) - Co-author a map — author A edits `vegasN`, author B edits `vegasS`, no overlap - Keep IPL provenance visible in the outliner so you know where each model came from - Round-trip: import → edit → re-export with **Map Export → Split: By collection** rebuilds the original district structure; the collection's name is reused as the district's basename - Source IPL is taken from each instance's parent file basename (text IPLs by file path, binary IPLs by their entry name in the IMG archive) - Typical time: ~30 seconds for a full LA-sized district with COL enabled **Performance tuning (advanced):** Enable **Profile Import / Extract** in *Scene → INU Tools → Performance* to dump a timing report into `.inu_cache/_profile.log`. Useful if you want to see where time goes (per-stage wall time, per-thread breakdown, slowest individual calls). Stage names worth knowing in the report: - `submit parse jobs` — one-shot; should be sub-second - `parse wait` — how long the main thread blocked on a DFF worker; near zero means workers keep ahead - `parse COL files` — upfront aggregation of all .col entries into `model_name → ColModel` - `loop iter` — total time spent inside the generator body (compare against `Total wall time`; the delta is Blender UI overhead) - `build objects` / `build_mesh` — bpy work per DFF - `build COL` / `reuse COL` / `COL transform` — per-model and per-instance COL steps - `reuse (copy)` — `src.copy()` for repeat instances - `TXD cache load` — PNG assignment to material nodes - `transform apply` — DFF location/rotation + inu props ### Import selected models The **Import** tab's **Import** button reads models directly from IMG archives or **Models folder**. It does not require resource extraction into `.inu_cache/`. - Select the IDE files and text or binary IPL files. IPL imports preserve placements; binary model IDs need matching IDE definitions. With selected IDE files only, each defined model is imported once and arranged on a grid. An IPL without model instances reports an error. - For IMG sources, set **Game Root** and use **Find IMG** to locate the archives containing the selected models. - Set **LOD / 2DFX / TXD / COL**: enabled means load that data. TXD and COL are off by default. Repeated instances reuse imported model data. - Models are placed in **Map_DFF**, **Map_LOD** and, when enabled, **Map_COL**. COL entries are matched by their internal model names. Source IDE/IPL links and LOD references are retained; this importer does not create per-IPL collection trees. ### Import from a models folder Use **Models folder** in the import source box for an unpacked custom map. It replaces **Game Root**; filling either field clears the other. Choose one source. 1. Point **Models folder** at the directory containing DFF, TXD, COL and loose textures. DFF/TXD/COL files are indexed recursively, including subfolders. 2. Select the IDE files and text or binary IPL files. IPL imports preserve placements; with selected IDE files only, the models are arranged on a grid. If IPL needs model definitions and no IDE was explicitly selected, IDE files are searched under the models folder. 3. Enable the **TXD / COL / LOD / 2DFX** data you need and click **Import** on the **Import** tab. IMG archives and resource extraction are not required for this source. Model filenames are matched without case sensitivity. If several subfolders contain the same model filename, the first file in the sorted traversal is used and a warning is reported. Use unique filenames to avoid ambiguity. ### IDE (Definitions) > **Per-object properties:** Model ID, Draw Distance, LOD Distance, IDE Flags, Interior, LOD index live in **Properties → Object → "GTA SA: IDE / IPL"**. The same panel shows **ID conflict detection** — if multiple objects share the same Model ID, the addon highlights the error with names of conflicting objects. IDE files define model properties: ID, texture dictionary, draw distance, flags. | Button | Operator | Description | |--------|----------|-------------| | Add | `gtatools.upsert_ide` | Insert/update entry in IDE file (auto-LOD) | | Remove | `gtatools.remove_ide` | Remove entry by Model ID | | Export | `gtatools.export_ide` | Write selected objects to a new IDE file | > **Add / Del / Export** live on the **Export** tab. There is no standalone "Import" button anymore: geometry comes from **Import from IMG** (Import tab), and **Refresh from IDE/IPL** pulls the definitions into the scene. **All sections supported:** objs, tobj, anim, cars, peds, weap, hier, txdp. **Auto-LOD:** when adding DFF+LOD pair, the following are assigned automatically: - **Model ID:** LOD = DFF ID + 1 (e.g. DFF ID 3500 → LOD ID 3501) - **Draw Distance:** LOD = 999 (maximum visibility). The HD model is visible up to its draw distance (e.g. 299m), then LOD appears and stays visible up to 999m - **TXD:** LOD uses the same texture dictionary as DFF > 💡 **Example — add a building to mymap.ide:** select `building01_DFF` and `building01_LOD` → Object Properties → **INU Tools: Model** → set `Model ID = 3500` on DFF → N → IDE / IPL / IMG → IDE section → set path to `mymap.ide` → **Add**. Two lines get written: `3500, building01, building01, 299` and `3501, LODbuilding01, building01, 999`. **IDE Flags** (15 checkboxes in object properties): | Flag | Bit | Description | |------|-----|-------------| | IS_ROAD | 1 | Road surface | | DRAW_LAST | 4 | Transparent, draw last | | ADDITIVE | 8 | Additive blending | | NO_ZBUFFER_WRITE | 64 | Don't write to Z-buffer | | NO_SHADOWS | 128 | Don't receive shadows | | GLASS_TYPE_1 | 512 | Breakable glass | | GLASS_TYPE_2 | 1024 | Cracked glass | | GARAGE_DOOR | 2048 | Garage door | | DAMAGABLE | 4096 | Destructible | | IS_TREE | 8192 | Tree, sways in wind | | IS_PALM | 16384 | Palm tree, sways in wind | | NO_FLYER_COL | 32768 | No collision with aircraft | | IS_TAG | 1048576 | Graffiti tag | | NO_BACKFACE_CULL | 2097152 | Render both sides | | BREAKABLE_STATUE | 4194304 | Breakable statue | ### IPL (Placement) IPL files define object positions, rotations, and LOD links on the map. | Button | Operator | Description | |--------|----------|-------------| | Add | `gtatools.upsert_ipl` | Insert/update placement (auto-LOD linking) | | Remove | `gtatools.remove_ipl` | Remove by Model ID. When an entry is deleted from the middle of the file, all LOD indices of remaining objects are automatically recalculated — otherwise the game would reference wrong lines and may crash | | Export | `gtatools.export_ipl` | Write selected objects with world transforms | > The IPL box no longer has a standalone Import button — placement is done by **Import from IMG** (Import tab), and stubs are resolved by "Replace Empty" under **Additional (IPL)**. **Quaternion conversion:** GTA SA stores (X,Y,Z,W) conjugated, Blender uses (W,X,Y,Z). Conversion is automatic. **Binary IPL:** files with `bnry` header (inside IMG archives) are read automatically. > 💡 **Example — place a model on the map:** imported `building01.dff`, set Model ID 3500. Move/rotate it freely in the scene → IPL → **Export** → pick `mymap.ipl` → the line `3500, building01, 0, X, Y, Z, QX, QY, QZ, QW, lod` is written with the real world coordinates. ### IPL Sections All IPL sections are supported for import/export as Blender objects: | Section | Collection | Visualization | |---------|-----------|---------------| | cull | IPL_Cull | Wireframe cube | | grge | IPL_Garage | Empty (cube) | | enex | IPL_Enex | Empty (axes) — enter + exit points | | pick | IPL_Pickup | Empty (sphere) | | cars | IPL_Cars | Empty (arrow) | | auzo | IPL_Auzo | Cube mesh or Empty (sphere) | | jump | IPL_Jump | Cube mesh — start + target + camera | | occl | IPL_Occl | Wireframe cube with rotation | | zone | IPL_Zone | Wireframe cube | | Button | Operator | Description | |--------|----------|-------------| | Sections IPL ↓ | `gtatools.import_ipl_sections` | Import all sections from IPL file | | Sections IPL ↑ | `gtatools.export_ipl_sections` | Export all section collections to IPL file | | Replace Empty | `gtatools.replace_ipl_placeholders` | When IPL import can't find a model, it creates an Empty with `_empty` suffix in IPL_Empty collection. After adding the model to the scene, click this button — the model moves to the Empty's position and the Empty is removed | ### IMG Archive | Button | Operator | Description | |--------|----------|-------------| | Export to IMG | `gtatools.export_to_img` | Pack DFF+COL+LOD+TXD directly into .img archive | > **Import from IMG** (`gtatools.import_from_img`) and the **LOD / TXD / COL** toggles (ON = load) moved to the **Import** tab (now modal, with an "Import from IMG: X/Y" counter, ESC to cancel). The Export tab's IMG box keeps only writing and archive service: **Export to IMG**, **Remove from IMG**, **Rebuild IMG**. **Export to IMG dialog — per-model hierarchy.** The dialog is a tree with one box per selected model: - **DFF** — a checkbox (include this model) plus its **TXD name** field (hidden when **Shared TXD** is on). - Indented under it, a **LOD** checkbox and a **COL** checkbox. If the model has no LOD in the scene, the row reads **"LOD: main model (stub)"** — the main model is written as the LOD (stub). If it has no COL, the row reads **"COL: empty stub"** — an empty bounding-box COL is created so the game still finds collision by ID. - At the top of the dialog: an **IMG archive** dropdown — defaults to the model's own IMG (the archive it was imported from), or any `.img` in the game folder. - **Shared TXD** toggle + name field — packs all textures of every exported model into one shared `.txd` (default `textures.txd`) instead of one `.txd` per model. - **Rebuild after export** checkbox — compacts the IMG right after writing, reclaiming the dead space left by replaced entries. **Batch writer + parallel encode (big exports):** `Export to IMG` opens the archive once, appends every new payload sequentially, and rewrites the directory exactly once at the end — not per-file. Plus DFF and COL serialisation (`to_bytes()` / `write_col()`) runs in a 4-worker `ThreadPoolExecutor` (numpy/zlib release the GIL). For a full-district export this replaces ~3000 directory rewrites (~2.6 GB of redundant writes) with one, plus ~4× speedup on the CPU-bound encode — typically **5–15× end-to-end**. > 💡 **Example — batch upload to gta3.img:** you have 50 buildings ready to export. Select the buildings → **Export to IMG** → the per-model dialog opens, each model as a box (DFF + its TXD name, plus indented LOD/COL checkboxes; models with no LOD/COL show a "stub" note). Pick the **IMG archive** (defaults to each model's own IMG), optionally toggle **Shared TXD** if they share textures, and tick **Rebuild after export** to compact in one go. Click OK — all DFF+COL+LOD+TXD get encoded in parallel and written to the archive. ### Preset / data folder **Panel:** Properties → Scene → INU Tools → ▸ **Preset folder** *(collapsible)* All INU Tools presets and saved data live under one user-writable root: `paths.json` (Game Root / IDE / IPL / IMG / texture paths) plus the `profiles/`, `material_presets/`, `id_presets/` subfolders and the per-pipeline DFF-flag defaults. By default the root is Blender's per-user extension directory (the addon never writes inside its own folder — required by the extensions platform). | Button | Operator | Description | |--------|----------|-------------| | Change | `gtatools.set_preset_dir` | Pick a new folder; existing presets are merge-copied into it, then storage switches over | | (open) | `gtatools.open_preset_dir` | Open the current folder in your file manager | | Reset to default | `gtatools.reset_preset_dir` | Forget the custom folder and go back to the default location | The chosen folder is remembered globally (across `.blend` files and Blender restarts) via a tiny pointer file at the default location. If the custom folder later goes missing (e.g. an unplugged drive), the addon silently falls back to the default. The header line shows **Default** or **Custom folder** plus the full path. > 💡 **Example — keep presets on a project drive:** open **Preset folder** → **Change** → pick `F:\GTA Project\INU presets`. Your existing profiles and material presets are copied there, and from now on everything reads/writes from that folder — handy for syncing presets between machines or keeping them next to a project. ### BBox Mode | Button | Operator | Description | |--------|----------|-------------| | BBox: ON/OFF | `gtatools.toggle_bbox` | Toggle Bounding Box display for map objects | When enabled, all Map_ collection objects switch to `BOUNDS` display. Objects within 300m of the selected object stay as `TEXTURED`. Updates automatically when selection changes. > 💡 **Example:** imported the LA map (5000+ objects), Blender struggles with viewport rendering. Toggle **BBox: ON** → distant buildings become wireframe boxes, objects within 300m of your selected one stay fully textured. Viewport flies. ### Model type detection (DFF / LOD / COL) The addon detects a mesh's model type **automatically** — no need to rename the scene. The old editable "Suffixes / Prefixes" section was removed; the suffixes remain as a manual **override**. Detection order (top to bottom — first match wins): 1. **Explicit marker on the name** — suffix `_DFF` / `_LOD` / `_COL` / `_SHA` (or a prefix) → that type. Use it to force a type by hand. 2. **Object tag `inu.type = COL/SHA`** (stamped by the COL importer and the Batch Set Type button) → **COL**. Reliable for anything imported as `.col`; checked before the LOD rule so a collision with an accidental `lod` in its name isn't read as a LOD. 3. **A `lod` token** anywhere in the name (**case-insensitive** — the same rule the map importer uses) → **LOD**. `LODfunc_detail`, `func_LOD`, vanilla lowercase `lodxxx` → LOD; the base name is taken without `lod` (so it pairs with the HD model). 4. **Texture heuristic** — a material with an image → **DFF**; no materials, or materials with no texture → **COL**. > 💡 Addon-imported meshes already carry the type tag; external meshes (map > converters, e.g. `func_detail` / `LODfunc_detail`) are classified by name and > textures with no renaming. > ⚠️ An **untextured visible DFF** (vertex-colour / flat-colour, no image) lands > in COL via rule 4. If such a model must be a DFF, add a `_DFF` suffix. **Why the suffixes stayed (override):** Blender can't hold two objects with the same name, so a DFF and its COL sharing one base name can't coexist — you'll use `_DFF` / `_COL` for the pair. The suffix also sets the base name used to pair models on export. When exporting IDE/IPL, LOD models are always written with the `LOD` prefix (GTA SA format). ### LOD Detection When importing maps, INU Tools decides which models are LODs in two layers: **Layer 1 (authoritative) — IPL cross-reference.** Every IPL `inst` line has a `lod_index` field pointing to its LOD companion's line in the same file. Any instance another line references is a LOD regardless of its name. 100% reliable for properly authored maps. **Layer 2 (fallback) — name.** When no IPL context is available, a name is a LOD if it **contains `lod` anywhere (case-insensitive)** — prefix `LODfoo` / `lodfoo`, suffix `foo_LOD`, or embedded `des_damlodbit04`. For real GTA map names `lod` reliably means a LOD; the rare English words that contain it (`lodge`, `explode`) don't occur as model names. This is the same `is_lod_name` rule the **type detector** (above) uses, so import and export agree. **Base-name stripping** (`strip_lod_marker`) removes the marker to recover the base name for COL/DFF/LOD pairing: | Name | Stripped to | |---|---| | `LODbush2b`, `lod_tree` | `bush2b`, `tree` | | `bush1b_LOD`, `tatar_str_1LOD` | `bush1b`, `tatar_str_1` | | `modeLODlaett` (embedded) | `modelaett` | | `barrier1` (no `lod`) | `barrier1` (unchanged) | **When it matters.** Used for map-import renaming, `Replace IPL Placeholders`, collection sorting, and COL/DFF pairing — getting the base name right sends a model to `Map_LOD` instead of `Map_DFF_*` and lets paired-object utilities find the HD twin. > Implementation: `is_lod_name()` and `strip_lod_marker()` in [core/ipl.py](../INU_tools/core/ipl.py); reused by `classify_model()` in [core/model_classify.py](../INU_tools/core/model_classify.py). ### Model ID Manager **Panel:** N-sidebar (`N`) → GTA Tools → **ID Manager** *(dedicated subpanel in DATA zone)* - Shows free/used ID count - **Next free ID** displayed - **Auto Assign** — assigns next free ID to selected objects - **Assign from ID...** — assign sequential IDs starting from a specific number. By default it honours the exact start (321, 322, 323…); tick **Skip occupied IDs** to jump over numbers already in use (and it warns if the range overlaps other objects) - **Release** — marks ID as free - **Extend IDs (FLA)** — add IDs beyond 19999 for Fastman Limit Adjuster - IDs stored in `model_ids.txt` in INU_Preset folder > 💡 **Example — assign IDs to a batch of buildings:** imported 50 new buildings (no IDs). Select all → **Assign** → each object gets the next free ID starting from the first available (e.g. 3500, 3501, 3502 …). Now you can batch-export them into IDE. > 💡 **Example — separate ID preset per map:** working on map `mycity`. Create preset with **+** → name `mycity`. All IDs you hand out in this scene now go into `INU_Preset/id_presets/mycity.txt` — no conflicts with your main project. Switch preset back to `default` — your previous ID database is back. --- ### Multi-IPL Sync (2.1.0) **Panel:** the **Import** tab (**IPL to import** list, multi-select) and the **Export** tab (**IPL to export** list) — the lists are shared. The reconcile button is now **Refresh from IDE/IPL** (`gtatools.link_sync`) on the Import tab, replacing the former "Sync". A district is rarely one `.ipl`. Vanilla SA splits each region across several files (`LAn.ipl`, `LAs.ipl`, `LAe.ipl`, streamed chunks…), and the single **IPL File** picker in the box above only reconciles one of them per click. The Multi-IPL Sync list lets you register every `.ipl` that makes up a map and reconcile your whole scene against all of them in **one** pass. When the list is empty, **Sync** behaves exactly as before — it uses the single IPL path from the IPL box. As soon as the list has entries, **Sync** iterates every listed file instead. **Pipeline:** 1. Expand **Sync multiple IPL** (▸ disclosure triangle, collapsed by default — the row shows a live `(N)` count once files are added). 2. **Add** → file dialog. Multi-select is supported: hold **Ctrl/Shift** to pick several `.ipl` files at once. Duplicates (same absolute path) are silently skipped; the report reads **"Added IPL: N"**. 3. Each row shows a short clickable path label + an **X** to drop that one file. **Clear** empties the whole list. 4. Click **Sync** (the unified IDE+IPL button below the list). What one Sync pass does, per object: - **Already linked** (object carries an IPL link) → its position/rotation is pulled **from** the IPL it belongs to, back into Blender. - **Not yet linked** (e.g. fresh after Map Import) → matched by `(Model ID + world position)` against the files; on a hit it gets linked to that file. **Per-file skip accounting.** Each object belongs to at most one IPL in the set, so a naive sum of per-file skips would massively over-count (an object that lives in `LAs.ipl` is a "no match" for `LAn.ipl`). The multi-file pass instead unions the linked + synced object **names** across all files and treats only the genuinely untouched remainder as *skipped*. An object that already carries a link to another file in the set is left alone — it is not re-stolen by a coincidental content match elsewhere. The alarming "nothing matched" warning fires **only** when truly zero objects linked or synced — a `skipped N` with successful work elsewhere is normal (that part of the selection just lives in a file you didn't list). > 💡 **Example — sync Los Santos after Map Import:** you imported the LS district and have ~2000 fresh objects with no IPL links yet. Open **Sync multiple IPL** → **Add** → Ctrl-select `LAn.ipl`, `LAs.ipl`, `LAe.ipl`, `LAw.ipl`, `LAhills.ipl` → the row now reads `Sync multiple IPL (5)`. Deselect everything (Sync then sweeps every mesh in the scene) → **Sync**. Each object is matched against whichever of the 5 files holds its placement, and you get `Sync IPL: updated 0, new links 1980, skipped 20 (5 IPL)` — the 20 skips are props you added by hand that aren't in any vanilla IPL. ### Adding and removing in IDE/IPL: how the sync works **Panel:** View3D → Sidebar (N) → GTA Tools → IDE / IPL / IMG → IDE / IPL boxes → **Add** / **Del**, plus the selected-model box (**Add** ↑, 🗑, ▶) **Where Add writes.** When a file is picked in the box, every selected model is written **there**. If a model used to be in another file, you get a warning that its row is still in the old file. With the box empty, each model goes to its own file (the one it was imported from or last added to). **Del** removes from the picked file. 🗑 in the model box removes from the model's own file. **How the addon finds a model's row.** A model remembers what it last wrote: file, Model ID, name, position and rotation. No line numbers are stored anywhere. Before every write the file is read again and the row is looked up by that content. So a repeated **Add** updates the row in place instead of adding a duplicate. Edits in another tool, deleted rows and reordering break nothing. A row nudged by hand (up to 2 m) is found nearby. A deleted row is added again, and the report warns about it. **The LOD always travels with its model.** You don't need to select the `LOD…` mesh. The partner comes from the **LOD partner** field (`inu.lod_object`), or, when that is empty, from the scene mesh with the same base name (`LODhouse` for `house`). Each placement gets **its own** LOD at its own spot. A copy (Shift+D) adds a new model row and a new LOD row and leaves the original's rows alone. `lod_index` is recomputed for every row in the file on every write. It stays correct for all neighbours after **Del**, and the removed model's LOD goes with it unless another model still uses it. A LOD with no Model ID takes **ID = DFF + 1**. **Copies.** A copy (Shift+D / Ctrl+D) inherits the original's link. The addon tells them apart by the object name remembered at write time. The copy becomes a new placement, and its status reads **Copy — will be added as a new instance**. **IDE: someone else's row is never overwritten.** An IDE row is updated only when that ID in the file holds the same model (same name, or this model's previous name). These cases are a **conflict**: the model isn't written and the report says why: - the ID is taken by a different model; - the ID is used in another section (`anim`, `cars`…); - the model's name is already in the file under another ID. Changing a model's Model ID updates its own row with the new ID. `tobj` rows keep their hours, multi-mesh rows keep their extra draw distances. **Summary before writing — only when there's a problem.** A normal Add or Del writes straight away. If there is a conflict, a model without a Model ID, a LOD without its model or a lost row, a dialog lists them first. Press **OK** and everything else is written. **File safety.** - Only the needed lines change. Comments, blank lines, other rows' number formatting, `path`/`mult` sections, line endings and a BOM stay as they were. - The file is written through a temp file, so an interrupted write can't corrupt it. - The first write of a file in a session leaves `.bak` with its previous state. - Binary IPLs from an IMG (`bnry`) are not edited, and the report says so. **Import links right away.** Map import, IMG import and IPL import link each model to its row in the text IPL. **Add** and **Del** work straight after an import, no **Check** needed. **Check / Update from IPL / ▶.** - **Check** moves nothing. It drops the link of a model whose row is gone from the file. An unlinked model is recognised by a row of its model nearby (0.5 m) or by the only free row of that model. - **Update from IPL** moves models to the positions in the file. - **▶** puts the selected model back at its IPL coordinates. **Setting the LOD partner — "Find LOD".** Press **Find LOD** (`gtatools.auto_find_lod`) next to the **LOD** row in the model box. It finds the LOD twins of the selected models by base name and fills `inu.lod_object`. The report reads `LOD found: N, not found: M`. If a LOD's name doesn't match the model's base name, set the partner by hand. > 💡 **Example — a copy of a house with its LOD:** `house` (ID 3500) and `LODhouse` (ID 3501) are already in `mymap.ipl`. Shift+D on `house`, move the copy, select it and press **Add**. The result is `IPL: added 1, LOD +1 ~0`. The file gets two new rows: the copy and its own LOD at its spot. The original's rows are untouched. > 💡 **Example — update two buildings in their own files:** `bank01` came from `LAn.ipl`, `tower05` from `LAs.ipl`. Move both, select them and press **Add** ↑ in the model box, or **Add** with the IPL box empty. Each building is written, with its LOD, to its own file. ### Inline path pickers for IDE / IPL / IMG (2.1.0) **Panel:** View3D → Sidebar (N) → GTA Tools → IDE / IPL / IMG → IDE / IPL / IMG box headers Each of the three boxes carries a 📁 **file-browser button** in its header. Click it to pick the target file; the box then shows the chosen path as a short, read-only label (last two path segments, e.g. `…/data/maps/LA/LAn.ipl`) under the header. If nothing is set yet, the label reads **File not selected**. The label itself is not editable inline — to change a path, click 📁 again. The same picker serves all three boxes; the file dialog filters to `*.ipl / *.ide / *.img`. ### Apply to Selected — batch-edit IDE properties (2.4.0) **Panel:** View3D → Sidebar (N) → GTA Tools → IDE / IPL / IMG → selected-model box → **Apply to selected (N)** button (appears once more than one model is selected) Opens a dialog that writes IDE properties to every selected mesh at once. Each field has **its own checkbox** on the left: only the ticked fields are overwritten, everything else is left as it is. | Field | Notes | |---|---| | **Draw Dist** | Draw distance (ticked by default). | | **LOD Dist** | LOD distance. | | **Model ID** | With **Sequential (+1)** the first model gets the given ID and each next one +1. Objects are ordered by name (not by selection order, which follows Blender's internal scene order). | | **TXD** | Texture dictionary name. | | **Interior** | Interior number. | | **IDE Flags** | Numeric flag value. | | **COL Library** | `.col` library name. | Source: [`ops/col_surface_ops.py`](../INU_tools/ops/col_surface_ops.py) → `gtatools.batch_set_distance`. ### Opening IDE / IPL in an editor (2.4.0) The 📄 button next to a file path opens it in the **OS text editor** (like double-clicking it in the file manager). Turn on **Open IPL/IDE in Blender's editor** in the addon preferences (*Edit → Preferences → Add-ons → INU Tools*) and the file is loaded into Blender's own text editor instead — into an open TEXT_EDITOR area, or a new window when there is none. Handy when you do not want to leave Blender over a single line. ### Region filter pulls streamed child IPLs (2.1.0) **Panel:** View3D → Sidebar (N) → GTA Tools → IDE / IPL / IMG → Import Map (Region selector) When you import a single region (Map Region ≠ ALL), the old folder rule only loaded IPLs physically sitting in `maps//`. That silently dropped **streamed / child IPLs** — vanilla splits big districts into a base file plus streamed chunks named `_` (e.g. `countn2` → `countn2_stream3`) that usually live **outside** the region folder. The region filter now keeps a chunk if **either** its folder is the selected region **or** its basename is `_` where `` is one of the region's base IPLs. So selecting the countryside now pulls in `countn2.ipl` **and** `countn2_stream3.ipl` — the district loads whole. The `_` guard keeps `countn` from grabbing unrelated `countnXYZ` files. The system console prints which IPLs the region filter dropped vs loaded, so an incomplete district can be traced. **Map import — "Skip 2DFX".** The Import Map toggle **Skip 2DFX** (default ON) controls whether 2DFX effects (lights, particles…) are imported with each model. It is read once at import start and passed explicitly into the builder, so the bulk/modal path can't silently flip back to "load 2DFX". Leaving it ON makes a map import lighter and faster; turn it OFF only when you actually need the 2DFX data in-scene. **Texture-alpha auto-link.** During Map Import, the first time each material is seen the addon inspects its image: if it has genuinely transparent pixels (foliage, fences, windows) it wires *texture Alpha → BSDF Alpha* and switches the material to alpha-test so the cutouts render correctly; opaque textures are untouched. This runs once per material (not per instance), so a district reusing one fence texture across hundreds of buildings pays the check exactly once. --- ## Materials ### GTA Material **Panel:** Properties → Material → GTA Material | Property | Description | |----------|-------------| | Environment Map | Reflection texture with coefficient (0-1) | | Bump Map | Normal map texture | | Reflection | Mirror reflection with scale, offset, intensity | | Specular | Specular highlight with level and texture | | Dual Texture | Second texture with blend modes (11 options for Src/Dst) | | UV Animation | Animated UV scrolling with animation name | > 💡 **Example — building window with reflections:** create a material `building_window` → enable ☑ Environment Map → set texture `xenvmap`, coefficient `0.6` → in-game the window will reflect the sky/clouds moving over the city. For transparent glass, additionally enable FB Alpha. ### GTA Material Presets DFF export preserves imported vehicle paint/light colour markers and decal tints even when Base Color is linked to a texture. Enabled Reflection Material settings (scale, offset and intensity) are written to DFF and restored on reimport. **Panel:** View3D → Sidebar (N) → GTA Tools → **GTA Material** → **EFFECTS** tab → **Quick presets** Four one-click buttons write a full GTA effect setup onto the active material in a single click — no dropdown, no save dialog. The button labels appear in the UI in Russian: | Button (RU / EN) | Preset | What it sets | |---|---|---| | **Glass** | `VEHICLE_GLASS` | Car glass: env map with framebuffer alpha | | **Chrome** | `CHROME` | Strong environment reflection + specular (bumpers, trim) | | **Paint** | `VEHICLE` | Car body: `xvehicleenv128` env map + `vehiclespecdot64` specular + reflection | | **Reset** | `GENERIC` | Clears every effect flag — plain textured material | #### Example — modeling a car Say you're building a car with body, glass and chrome-trim materials. **Step 1.** Select the car-body material in the object's material stack → click **Paint**. Env map, specular and reflection are all set at once. **Step 2.** Switch to the glass material → **Glass**. Done. **Step 3.** Select the bumper/trim material → **Chrome**. Made a mistake → **Reset** clears it back to a plain textured material. > 💡 Use **Copy to Selected** below the buttons to push the active material's GTA settings onto the materials of every other selected object in one go. ### COL Surface Types **Panel:** Properties → Material → COL Surface Type 179 GTA SA surface materials organized in 13 categories. Searchable dropdown with category filtering. Each surface has: - Surface ID (0-178) - Flags, Brightness, Light - Day Light (0-15), Night Light (0-15) > 💡 **Example — wooden bar floor:** bar floor mesh → new material `bar_wood_floor` → COL Surface Type → search for `wood` → pick `WOOD_BENCH` (ID 9). Now character footsteps on this COL will play the wooden sound, and bullets will leave splinters. ### Textures **Panel:** Properties → Scene → INU Tools → Textures - **System textures** — path to a shared texture folder (e.g. `System_textures` from MTA/GTA) - **.blend folder** — automatically points to the current .blend file's directory. Refresh button 🔄 updates the path - **Load Textures** — searches for PNG/TGA/JPG files matching material names on the object. Searches both folders: system and .blend. If a material is named `brick_wall`, the addon finds `brick_wall.png` in the specified folders and assigns it as texture - **Drag & Drop** — drag images from File Browser directly into the viewport to create a new material with the texture > 💡 **Example — auto-assign textures by name:** unzipped 100 PNG textures into `F:/gta_textures/`. Scene has 100 materials named like `brick01`, `brick02`, `roof_tile` (no textures yet). Set `F:/gta_textures/` as System textures → select objects → **Load Textures** → the addon finds `brick01.png`, `brick02.png` etc. and attaches them to the matching materials automatically. ### Alpha Materials **Panel:** Properties → Material → **GTA Material** → **Alpha** tab A bulk editor for the transparency mode of alpha materials — GTA maps carry hundreds of alpha-cutout materials (fences, foliage, windows) and fixing each one in Blender's native Material panel is tedious. The tool scans the scene (or the selection), lists every alpha material in a scrollable list with a per-row blend-mode dropdown, and offers one-click bulk actions. - **Scope** — **Scene** (whole scene) or **Selected** (selected objects only). - **Filter mode** — how a material counts as "alpha": - **NODE** (default) — the Principled BSDF's **Alpha** input is actually wired (the material genuinely uses texture alpha). - **CHANNEL** — the base texture has a *significant* alpha channel. - **TRANSPARENT** — the material's blend method is already non-opaque. - **ALL** — any of the above. - **Scan** — (re)builds the list under the current scope + filter; the header shows how many were found. - **Blend mode for all** + **Apply to all** (Apply blend mode to all) — set one transparency mode (OPAQUE / CLIP / HASHED / BLEND) on every listed material at once. - **Select objects** — select the objects that use the listed alpha materials. > **Unified transparency standard:** applying any transparent mode also switches Blender's *Show Backface* / transparency-overlap **off** — the project's standard for GTA alpha materials — and writes both the legacy `blend_method` and the 4.2+ `surface_render_method` so it also takes on EEVEE Next. --- ## Prelight (Vertex Colors) > **Important in 1.6.3:** baking now respects **smooth/flat shading** (uses `loop.normal` instead of `poly.normal`). Also **hidden lights** (via 👁 viewport, 📷 render, or hidden collection) **are skipped** during baking — previously all point lights in the scene were used. **Panel:** View3D → Sidebar (N) → GTA Tools → Prelight > **Lighting panel — three tabs.** The top of the Lighting panel has toggle buttons **PreLight** | **Prelight COL** | **Itera** (formerly separate collapsible sub-panels; LightMap is not in this switch). The 🌐 planet icon in the header opens [Itera Tools 3](https://itera.gumroad.com/l/IteraTools3). The prelight settings block is **always shown**; with no mesh selected it is greyed out (disabled), not hidden. ### Baking 1. **Create Day/Night** — creates `Day` and `Night` color attributes 2. **Lights (8 lamps)** — places 8 point lights around the object; **Sun** adds an independent directional source 3. **Bake (Fast)** — CPU bake without shadows 4. **Bake with Shadows** — raycast shadow baking via depsgraph **Light sources — the toggle row** below the bake buttons chooses what the bake samples. It is no longer just the 8-lamp rig: - **Point / Sun / Spot / Area** — four toggles, one per Blender light type. Only the enabled types contribute, so you can bake from your own scene lamps of any kind, not only the auto-placed 8 point lights. - **HDRI** (World, 🌐) — also add world/HDRI lighting: the sky colour is sampled along each vertex normal and combined with the lamps. The HDRI is taken from the viewport's *Scene Environment* (studio light) or the real `scene.world`. **Settings:** - Ambient (0-1) — base brightness - Intensity (0-1) — light strength - Gamma (0.5-3.0) — gamma correction - Shadows toggle > 💡 **Example — prelight a building for your map:** select the building mesh → Prelight → **Create Day/Night** → **Create 8 Lights** (8 point lights auto-placed around the object) → toggle ☑ Shadows → **Bake with Shadows**. The `Day` attribute gets filled with soft-shadowed lighting. Then same for Night (usually drop Intensity to 0.3 and switch light color to blueish) — switch to the Night attribute before Bake. ### Scatter Color **Sub-panel:** Prelight → Tools → Scatter Color Paints a tinted color **around** selected faces (instead of redistributing existing prelight). Useful for spilling a localized accent color onto neighboring geometry — neon reflections, accent glows under spotlights, dirt around drains. **Parameters:** - *Strength* (0–1) — center-vertex saturation of the chosen color (1 = fully replace existing colors at the centre). - *Distance* (0–1) — radius as fraction of the mesh's bbox half-diagonal. 0 = only selected verts; 1 = falloff covers half-diagonal. - *Color* — picked from the active **Vertex Paint brush** (so painting workflow stays unified). Falls back to a scene color picker if no brush is active. The falloff is linear by KDTree distance — vertices further from any selected polygon receive proportionally less colour. ### Post-Processing | Tool | Description | |------|-------------| | Smooth | Average colors between neighboring vertices | | Smooth Between Objects | Smooth at seams between different meshes | | Contrast | Adjust color contrast | | Brightness | Adjust brightness offset | | Gamma | Gamma correction | > 💡 **Example — seam between two buildings:** two adjacent buildings stand flush. You baked prelight on each separately — a visible vertex-color seam at the border. Select both → **Smooth Between Objects** (passes 2, strength 0.5) → the gradient flows smoothly across the meshes, seam gone. ### COL Light **Panel:** View3D → Sidebar (N) → GTA Tools → Prelight COL Convert vertex colors to COL Day/Night Light values (0-15). Auto-splits materials by brightness ranges. - **Preview** — visualize light values on mesh - **Bake** — write values to COL material properties - **Day/Night ranges** — adjustable thresholds > 💡 **Example — tunnel COL lighting:** COL mesh of a tunnel has vertex colors with a dark center and lighter edges. Open Prelight COL → **👁 Preview** — mesh gets painted with numbers 0-15. Adjust Day range (min=0, max=6) so center is 0 (dark) and entrance is 6 (lighter) → **Bake COL Light** → materials get the corresponding Day/Night Light values. In-game, cars entering the tunnel will auto-darken. ### Presets **Header row** at the top of the Prelight panel — preset selector plus 4 buttons. Stored as `.json` in `INU_Preset/` folder. A preset captures everything bake-related across the panel and its sub-panels: - **Bake** — Ambient, Intensity, Gamma, Shadows - **Modulate Color** — mode (OFF/Day/Night), mix, contrast, gamma - **Adjust Color** — V-offset - **Scatter Color** — strength, distance - **Post-Processing** — smooth iterations/factor, contrast, brightness, gamma - **Per-object Day/Night** — V-offset per attribute, plus a flag whether to auto-create missing Day/Night attributes on Load | Button | Action | |---|---| | ✓ | **Save to Selected Preset** — overwrites the preset currently chosen in the dropdown with current scene values. Status bar reports diff: which fields changed (`old → new`) and which were added. No name dialog. | | ⬇ Load | Pull preset values into the scene + active mesh (creates Day/Night attrs if the preset asked for them). | | + Save | Create a NEW preset (opens name dialog). | | − Delete | Delete the selected preset file. | > 💡 **Example workflow:** craft your night look — Modulate Color = Night, Day V = +30, Night V = −20 → **+ Save** → name `my_night`. Tweak Modulate Mix from 0.002 to 0.005 → **✓** overwrites `my_night`, status bar shows `modulate_mix: 0.002 → 0.005`. Switch to a different scene → pick `my_night` → **⬇ Load** → all settings restored on whichever mesh you're working on. ### Adjust Color (per-attribute V-offset) Each Day/Night row in the colour-attribute selector has its own V-offset slider: ``` [Day] V: +30.0 [-] [Night] V: -20.0 [-] ``` Type a value → press Enter → the brightness offset is applied **immediately** to that attribute's vertex colors (only this object). The value persists per-object and survives re-baking — after a fresh bake the offset is automatically re-applied to the new colors. ### Vertex Color Management | Button | Description | |--------|-------------| | Create Day/Night | Creates both `Day` and `Night` color attributes | | Day + / Night + | Create individual color attribute | | Day - / Night - | Remove individual color attribute | | Toggle Preview | Enable/disable Day/Night mix visualization in viewport | | ⧉ (under Preview) | **Copy the alpha** of the active attribute into the other one (Day↔Night), keeping its RGB. With `Day` active the alpha goes to `Night` and vice versa; if the target attribute does not exist yet it is created as a full copy of the active one | | 🗑 (next to Day/Night) | **Clear vertex alpha** on the active attribute: the alpha channel is filled with 1.0 and the RGB kept, so the model exports fully opaque. Applies to every selected mesh | | Add LightMap | Load lightmap texture and connect to UV2 (Multiply blend) | | 👁 LightMap | Toggle lightmap visibility (mute/unmute) | | ➖ LightMap | Remove lightmap nodes from materials | | Analyze | Show vertex color histogram (min/max/avg) | | Reset | Reset bake settings to defaults | **Edit/Paint modes:** buttons to switch between Object, Edit, and Vertex Paint modes for quick workflow. > 💡 **Example — quick-start Night from the Day bake:** you've only baked the `Day` attribute → **Day → Night** → `Night` gets created as a copy of `Day`. Now open Post-Processing → **Brightness** = −0.3 → apply to Night → you've got a darkened version of the daytime bake. Then tweak manually (add yellow fill around lamp posts, etc.). ### VC Layer System (BETA) **Section:** Prelight panel → ▸ **Vertex Color Layers (BETA)** (collapsible, between LightMap and Bake) Photoshop-style **non-destructive** vertex color editing. Stack of named layers per scope (Day / Night), each with its own opacity / blend mode / brightness / contrast. The composite is written back into `Day` / `Night` automatically — both for live viewport preview AND on DFF export. Layers themselves stay editable in the .blend. **Purpose:** when you want to: - Add a green tint to walls without re-baking lighting - Hand-paint a window glow on top of an Itera bake - Adjust shadow intensity in one area without touching the rest - Try a colour variation, then revert with one slider **Storage:** each layer is a `BYTE_COLOR` color attribute on the mesh, named `VCL_D_