Skip to content

IEver3st/cortex-labs

Repository files navigation

Cortex Studio v4.0 — ROAN

Cortex Studio UI ko-fi

Cortex Studio

The Ultimate Livery Development Environment for GTA V / FiveM

Cortex Studio is a high-performance, real-time 3D livery previewer and development environment. It bridges the gap between your design software (Photoshop, paint.net, etc.) and the game engine, allowing for an instantaneous, iterative workflow.

Download the Latest Version Here!


New in v4.0 (ROAN)

Named after the Roan Mountains / Roan Highlands on the Tennessee–North Carolina border.

Vehicle Slot Colors (v4.0)

Per-slot color controls for primary, secondary, accent, and glass materials—paint each region of the vehicle independently instead of one flat body color. Available in Livery and All Textures modes.

CLMESH Binary Cache (v4.0)

A new .clmesh binary mesh format replaces the old JSON pipeline between the CodeWalker bridge and the viewer. Smaller payloads, faster loads, and proper multi-UV channel support (UV2/UV3/UV4).

Skeleton Parsing (v4.0)

The YFT parser now reads skeleton/bone data, enabling correct skinning setup for models that rely on bone transforms.

Interactive Light Dome (v4.0)

A drag-to-position hemisphere lighting widget that adjusts both azimuth (0–360°) and elevation (0–90°) simultaneously. Position the sun indicator on the dome to dial in the perfect lighting angle.

Preview Watermarks (v4.0)

Automatically stamp preview captures with configurable text watermarks. Choose font family, size, color, opacity, position (corner/center/tiled), and rotation from Settings.

Context Menus (v4.0)

Right-click context menus throughout the UI with custom Cortex Studio styling.

Additional Texture Formats (v4.0)

TIFF and AVIF texture support added alongside existing PSD, PNG, JPG, TGA, DDS, BMP, WebP, PDN, and AI formats.

Workspace Save-Fail Toast (v4.0)

When localStorage runs out of space, you now get a clear toast instead of a silent failure.

PSD Variant Builder

The dedicated environment for managing complex livery projects with multiple variants.

  • PSD Native Workflow: Load your Photoshop files directly. Cortex Studio parses layers and groups with full hierarchy support.
  • Variant Management: Create, duplicate, and rename variants. Each variant stores its own unique set of layer visibilities.
  • IDE-Style Interface: A professional layout featuring a variant sidebar, dual 3D/2D preview panes, and a comprehensive layer panel.
  • Solo & Group Controls: Quickly isolate layers or toggle entire groups.
  • Batch Export: Export all your variants at once to high-quality PNGs (up to 4K resolution) into a dedicated output folder.
  • Real-time Compositing: As you toggle layers in the panel, the 3D model updates instantly with the new composited texture.

Also improved in v4.0

  • Custom DDS/BC7 Texture Decoder: Purpose-built DDS parser with DXT1/DXT3/DXT5, BC4, BC5, BC7, and uncompressed format support. Replaces reliance on Three.js DDSLoader and matches CodeWalker's TextureFormat enum exactly.
  • Multi-Angle Preview Capture: Preview capture enhanced with selectable camera angles (Front, Back, Side, 3/4, Top), adjustable zoom factor, and progress indicator.
  • Camera Framing & State Persistence: Improved auto-framing with better bounds computation and persistent camera state across model swaps and preset switches.
  • PDN Decoding: Paint.NET files now decode via dedicated Web Worker with Tauri native fallback for improved reliability.

Also shipped in recent releases

  • Model Shadows (v3.8): Real-time shadow rendering for improved depth perception.
  • Template Generator (beta) (v3.7): Auto-create layered PSD templates directly from .yft models with live preview, manual marker selection (Alt/Ctrl/Shift + click), flexible .psd/.png exports, and cage wireframe overlay.

Key Features

  • Vehicle Slot Colors: Independent primary, secondary, accent, and glass color controls for accurate multi-region liveries.
  • CLMESH Mesh Cache: Binary .clmesh format for fast model loads with multi-UV channel support.
  • Custom DDS/BC7 Decoder: In-app DDS parsing with DXT1/3/5, BC4, BC5, BC7, and uncompressed format support.
  • Interactive Light Dome: Drag-to-position hemisphere lighting for simultaneous azimuth/elevation control.
  • Multi-Angle Preview Capture: Batch screenshot export from selectable camera angles with zoom and watermark support.
  • Preview Watermarks: Configurable text watermarks with font, color, opacity, position, and rotation controls.
  • In-App Bug Reporting: Submit bug reports with environment detection and optional console logs.
  • Template Generator (beta): Auto-generate layered PSD templates directly from .yft models with live preview and manual marker selection.
  • PSD Variant Builder: Manage complex livery projects with multiple variants, layer groups, and batch export to PNG.
  • Live Texture Reloading: Uses a native file watcher to detect saves in your design software and reloads textures in milliseconds.
  • Five Powerful Viewing Modes:
    • Livery Mode: Intelligently auto-targets vehicle carpaint and livery materials.
    • All Textures: Applies the loaded texture to every mesh on the model (great for checking templates).
    • EUP Mode: Specialized support for Emergency Uniform Packs and clothing models (.ydd).
    • Multi-Model Viewer: Compare two models side-by-side with independent texture controls.
    • Template Mode: Dedicated workspace for template generation with cage wireframe overlay.
  • Model Shadows: Real-time shadow rendering for improved depth perception.
  • Camera Framing: Auto-framing with persistent camera state across model swaps.
  • UI Scaling: Adjustable interface scale for accessibility and high-DPI displays.
  • Context Menus: Right-click context menus throughout the UI.
  • Workspace Persistence: Recent projects restore their full state (model paths, textures, colors, camera positions) on relaunch.
  • Native GTA V Support: Direct parsing of .yft (vehicles) and .ydd (clothing) files, with skeleton/bone data.
  • Full Camera Control: Quick presets (Front, Side, 3/4, Top), center action, and optional WASD flight controls.
  • Material Controls: Fine-tune body and slot colors, background color, glossiness, and light intensity to see how your design looks in different conditions.
  • Light & Dark Theme: Branded light and dark modes with native system integration.
  • Fully Local & Private: No cloud dependencies, no accounts, no data leaves your machine.
  • Tauri v2 Core: Built on the latest Tauri framework for maximum performance and a tiny footprint.

Supported Files

Models

  • .yft (GTA V/FiveM Vehicles)
  • .ydd (GTA V/FiveM Clothing/EUP)

Textures

  • .psd (Photoshop - Recommended for Variants)
  • .png, .jpg, .tga, .dds, .bmp, .webp, .tiff, .avif, .pdn, .ai

Why Cortex Studio

Livery work is iterative. In-game testing is slow and breaks your flow. Cortex Studio keeps your preview live so you can focus on design and iteration instead of constant exporting, loading, and reloading.


Limitations (By Design)

  • Not a material editor. Cortex Studio doesn’t aim to replace a full material/shader workflow or in-game tuning.
  • Preview-focused. It’s built to view liveries/textures in real time on a 3D model—fast iteration, quick inspection, and instant feedback.
  • Asset fidelity depends on the source files. What you see is constrained by the model/material setup and naming conventions in the asset.

Project Structure

  • src/ - React UI, Three.js viewer, and logic.
  • src/components/VariantsPage.jsx - The PSD Variant Builder.
  • src/components/TemplateGenerationPage.jsx - Template Generator workspace for auto-generating PSD templates.
  • src/components/BugReportModal.jsx - In-app bug report modal with environment detection.
  • src/components/LightDome.jsx - Interactive hemisphere lighting control.
  • src/components/ContextMenu.jsx - Radix-based context menu wrapper with Cortex styling.
  • src/lib/yft.js - High-performance YFT/YDD parser (with skeleton/bone support).
  • src/lib/clmesh.js - Parser for the .clmesh binary mesh cache emitted by the CodeWalker bridge.
  • src/lib/dds.js - Custom DDS parser with DXT/BC4/BC5/BC7 and uncompressed format support.
  • src/lib/bc7.js - BC7 block decoder.
  • src/lib/camera-framing.js - Camera bounds computation and auto-framing system.
  • src/lib/camera-state.js - Camera state clone/sync for persistence across model swaps.
  • src/lib/watermark.js - Preview watermark configuration and rendering.
  • src/lib/bug-report.js - Bug report payload builder with environment detection.
  • src/lib/pdn.js - Paint.NET file decoder with Web Worker and Tauri fallback.
  • src-tauri/ - Rust-based Tauri v2 backend for file system access, file watching, and mesh cache management.
  • tools/codewalker-bridge/ - C# sidecar that parses .yft files via CodeWalker.Core and emits .clmesh caches.

Getting Started

Prerequisites

  • Bun (Fastest JS runtime & package manager)
  • Rust toolchain (Required for building the Tauri app)
  • .NET 10 SDK (Optional — only needed to build the CodeWalker bridge from source; bundled builds ship the executable)

Installation

bun install

Development

To run the full application with native features (recommended):

bun run tauri dev

To run just the UI (limited features, no file system access):

bun run dev

Building

bun run tauri build

Workflow Tips

  • Vehicle Slot Colors: In Livery or All Textures mode, use the per-slot color cards to set primary, secondary, accent, and glass colors independently. Copy hex values between slots with the copy button.
  • Light Dome: Drag the sun indicator on the hemisphere widget to adjust both lighting direction and elevation simultaneously.
  • Multi-Angle Previews: Click the capture button, select which angles to export, set a zoom level, and generate batch screenshots in one pass.
  • Preview Watermarks: Configure automatic text watermarks in Settings → Watermark to stamp all preview captures.
  • Bug Reports: Click the bug icon in the toolbar to submit a report with environment details and optional console logs.
  • UI Scaling: Adjust the interface scale in Settings if you need larger or smaller UI elements.
  • Template Generator: Start a new project from the home screen to auto-generate a PSD template from your .yft model—no more manual UV mapping.
  • Manual Marker Selection: In Template Generator, use Alt/Ctrl/Shift + click to pick individual markers. Selections stay staged until you confirm.
  • The Variant Sidebar: Use it to create "Night", "High-Vis", or "Stealth" versions of your liveries in one project file.
  • Double-Click Layers: In the Variant Builder, double-click a layer in the panel to "Solo" it.
  • Alt + 1-4: Use these hotkeys to quickly switch between viewing modes.
  • Custom Hotkeys: Check the Settings menu to customize every action to your liking.
  • Pinned Projects: Pin frequently used projects to your home screen for quick access.
  • Workspace Restoration: Your project state (models, textures, camera position) auto-saves and restores when you reopen the app.
  • Bridge Auto-Build: If you're running from source and the CodeWalker bridge is missing, just open a .yft—Cortex will build it automatically if dotnet is on your PATH.

License

MIT. Free forever. Developed with ❤️ for the GTA V modding community.


Contributing

Contributions are welcome! Whether it is a bug fix, a new feature, or improved documentation, feel free to open an issue or a PR.

About

Cortex Studio provides Realtime Previews of changes made to vehicle textures for Livery Creators in FiveM, with YFT support from the very beginning. made with TauriV2

Topics

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors