DirtFX - user-grinch/ModelExtras GitHub Wiki

🧼 Overview

DirtFX brings your vehicle models to life by dynamically blending clean and dirty textures based on the in-game vehicle dirt level. As your vehicle gets filthier through gameplay, so does its appearance β€” no scripting, animations, or hacks needed. Just smooth, natural grime buildup. 😎

There are two main methods to activate dirt blending with DirtFX:


πŸ”§ Method 1 – Predefined Dirt Textures

For this method, simply use any of the following predefined textures in your model’s materials:

πŸ›ž For Tyres:

  • tyrewall_dirt

πŸš— For Vehicle Body Grime:

  • vehiclegrunge_iv (IVF HD dirt)
  • vehiclegrunge256 (GTA SA default)
  • vehiclegrunge512 (512x512 HD dirt)
  • vehicle_genericmud_truck (Heavy mud / offroad)

These supported texture names are automatically replaced or blended depending on the vehicle’s dirt level. No extra setup is needed β€” just assign them like normal materials in your model.

πŸ’‘ Note: These names use DirtFX's built-in texture handling. As the vehicle gets dirty, they progressively show their grungy variants. They are ideal for tyres and large dirty patches on bodywork.


🌍 Method 2 – Universal Dirt Mapping (Clean + Dirt Texture Pair)

This powerful method allows any texture on your vehicle to support dynamic dirt blending β€” as long as you follow a simple naming convention and include the matching textures in your .txd.

πŸ“¦ How it works:

  1. Assign your clean texture like normal, e.g. chassis_texture or remap_body.

  2. Provide a dirty version of that same texture in your .txd file using one of the supported suffixes:

    • _d (e.g., chassis_texture_d, Tyre_D, remap_fica_d) β€” Industry & IVF standard
    • _dt (e.g., chassis_texture_dt, door_diffuse_dt)
    • _dirt (e.g., chassis_texture_dirt, interior_dirt)
  3. DirtFX will automatically detect the dirt variant and smoothly blend between the clean and dirty textures across 16 dirt stages as the vehicle drives.

  4. Vehicles with custom paintjobs / remap textures (e.g., remap_body + remap_body_d) are fully supported!

πŸ§ͺ Example:

  • door_diffuse (clean)
  • door_diffuse_d / door_diffuse_dt (dirty variant)
    As the dirt level increases, the clean texture gradually mixes with its dirt counterpart for a realistic effect.

πŸ“ Requirements:

  • Both the clean and dirt textures must be present in the vehicle .txd file.
  • The clean and dirt textures should use matching UV layouts. Their resolutions may differ; DirtFX resamples them to a common size while generating blend stages.
  • Any texture can use this system β€” body panels, bumpers, glass, wheels, or custom accessories!
  • Compressed DXT1, DXT3, and DXT5 inputs are supported. For _d and _dirt overlays, alpha controls where grime is applied. _dt is treated as a complete dirty replacement; _d and _dirt are alpha overlays.

🎨 Tips & Best Practices

  • 🧽 Keep your dirt subtle β€” Avoid overly aggressive grime unless you're going for a junkyard aesthetic.
  • πŸ’Ύ Optimize your .txd β€” Choose compression based on the texture and alpha needs; DXT1, DXT3, and DXT5 compressed inputs are supported.
  • πŸ§ͺ Test in-game β€” Watch how different parts of the vehicle blend as it gets dirty from driving. Fine-tune your textures for the best results.

βš™οΈ Behind the Scenes

DirtFX integrates with the game’s internal dirt level system, updating dynamically based on driving behavior (off-road, crashes, rain, weather). It then blends the clean and dirty textures across 16 discrete levels in real time.