New Dirt Layers System (introduced in Beta14d) for Modders and Track Makers

Miscellaneous, Modding 2 Comments

This article is about the new dirt layers system introduced with beta14d, and it should be useful to both track makers and modders, as they all have to make their part to make this system work.

First of all a couple of words on how this new system works compared to the old one:

it basically does the same thing as before with the difference (and this is far better in terms of visual realism) that now the dirt color isn’t embedded anymore in the layer’s image itself (making the same kind of dirt appear on different tracks with different soil and with different colors, making it look weird and out of place most of the times), but it get its color information from the gfx.cfg file that should be inside the track folder (and in the model folder too), making the dirt appear of the ‘correct’ color of the track’s soil, set by the track maker.

This method has always been used in the stock models (bike, tires, rider, helmet etc) and now is available to all third party content if certain requirements are met (check below for more info)

NOTE: the gfx.cfg file is not mandatory, but without it the dirt layers will inherit the ‘stock’ dirt color

 

For modders: how to setup the dirt layers inside your model’s folder

Like before, the dirt layers are a series of images (3 to be specific) showing different ‘levels’ of dirt.

Those images should be saved with RGB profile in the usual accepted formats (.tga .dds .bmp) but without any color information.

In order to do so in Adobe Photoshop you have to lower the saturation to 0% by selecting the image and pressing Ctrl+U (hue/saturation).

Here’s an example of one of the dirt layers in the Agv AX-8 helmet i did:

on the left is the dirt layer itself, on the right is the alpha channel of the same layer

 

 

tips:

  • try to stay as close as possible to white, otherwise it will look way too dark in game
  • remember to have the rgb channels as solid color, the ‘shape’ of the dirt splatters are defined in the alpha channel (white is visible, black is not)
  • remember to include the alpha channel when saving the image

One last thing to make all of this work, is to add the dirt_color = 1 line at the end of the gfx.cfg file of your model.

The combined_dirt = 1 should make the dirt layers appear also on sand (i recently find out, still have to test it)

Here’s the gfx.cfg of the Agv AX-8 helmet:

model = helmet.hrc
visor = visor
shadow = helmet_s.edf

camlinkobj = cam

cockpit
{
model = c_helmet.edf
shadow = helmet_s.edf
}

combined_dirt = 1
dirt_color = 1

If all of this is done correctly you should now have the black and white layers to show the correct RGB values set in the track folder, if you see the dirt layers appear in black and white come back here and check that everything has been done correctly.

 

For Track Makers: add the gfx.cfg file to your folder

The gfx.cfg file should be added to your final track folder, and should include both the RGB values of the dirt color and the RGB values of the particles (if you want your roost to be a specific color instead of the stock one)

Here’s how the file from Lierop looks like:

dirt_color
{
red = 0.29
green = 0.22
blue = 0.15
}

particles
{
sand
{
red = 0.29
green = 0.22
blue = 0.15
}
}

Note that in the particles section i only included the sand option, but you can add all the accepted soil types (sand, loose soil, soil, compact soil, grass, gravel, rocks) each with its own values.

Important: the RGB values in game use the 0.00>1.00 scale while Adobe Photoshop uses the 0>255 scale.

To convert them you can use EasyRGB.com

This is all you need to do to in order to make the particles the color you want and mostly to help the modders to have their dirt layers to show correctly.

0 0 votes
Article Rating
Subscribe
Notify of
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mulock22
Member
07/13/2020 6:13 pm

For the track maker’s part:
Can you do multiple dirt_color(s)?
If not, when doing multiple particles, would you average out those particle values for the dirt_color values? or base them off the *most* common soil type/color?
Great info, man!

Resolute Kraken
Member
01/21/2021 4:54 am

Please note, for track particles – the correct values for “Soft Soil” = soilsoft
and “Compact Soil” = soilcompact