Tyres

From PiBoSo Documentation
Jump to: navigation, search

Tyres need 2 textures, one for the tread and one for the sidewall.

Tread blur and wear

  • Create a text file with the same name of the tread texture and extension TXT, in the folder where the tread texture is located
  • Fill it with the filenames of the 11 textures for all the wear and blur combinations. It is also possible to add "blocks" of 12 textures to change the aspect based on the current tyre selection in the sim. Example with wet ( but filenames can change ):
tread_b1.tga
tread_b2.tga
tread_w1.tga
tread_w1_b1.tga
tread_w1_b2.tga
tread_w2.tga
tread_w2_b1.tga
tread_w2_b2.tga
tread_w3.tga
tread_w3_b1.tga
tread_w3_b2.tga
tread_wet.tga
tread_wet_b1.tga
tread_wet_b2.tga
tread_wet_w1.tga
tread_wet_w1_b1.tga
tread_wet_w1_b2.tga
tread_wet_w2.tga
tread_wet_w2_b1.tga
tread_wet_w2_b2.tga
tread_wet_w3.tga
tread_wet_w3_b1.tga
tread_wet_w3_b2.tga
  • Supported formats are TGA and BMP
  • Make sure that all textures exist in the same folder of the base texture, and that they have the same size

Shaders

Shaders work as usual, but it is possible to set the normal map for the additional textures. Example:

specular
{
shininess = 5
}
bump
{
map = tread_N.tga
frame1
{
map = tread_b1_N.tga
}
frame2
{
map = tread_b2_N.tga
}
frame3
{
map = tread_w1_N.tga
}
frame4
{
map = tread_w1_b1_N.tga
}
frame5
{
map = tread_w1_b2_N.tga
}
frame6
{
map = tread_w2_N.tga
}
frame7
{
map = tread_w2_b1_N.tga
}
frame8
{
map = tread_w2_b2_N.tga
}
frame9
{
map = tread_w3_N.tga
}
frame10
{
map = tread_w3_b1_N.tga
}
frame11
{
map = tread_w3_b2_N.tga
}
frame12
{
map = tread_wet_N.tga
}
frame13
{
map = tread_wet_b1_N.tga
}
frame14
{
map = tread_wet_b2_N.tga
}
frame15
{
map = tread_wet_w1_N.tga
}
frame16
{
map = tread_wet_w1_b1_N.tga
}
frame17
{
map = tread_wet_w1_b2_N.tga
}	
frame18
{
map = tread_wet_w2_N.tga
}
frame19
{
map = tread_wet_w2_b1_N.tga
}
frame20
{
map = tread_wet_w2_b2_N.tga
}
frame21
{
map = tread_wet_w3_N.tga
}
frame22
{
map = tread_wet_w3_b1_N.tga
}
frame23
{
map = tread_wet_w3_b2_N.tga
}
}

Dirt Layers

  • Create a text file named tread.lyr in the folder where the tread texture is located
  • Fill it with the filenames of the textures for all the marbles, grass and sand dirt and blur combinations:
numlayers=3
layer1
{
numframes = 6
map=nobase_marbles.tga
frame0=marbles1.tga
frame1=marbles1_b1.tga
frame2=marbles1_b2.tga
frame3=marbles2.tga
frame4=marbles2_b1.tga
frame5=marbles2_b2.tga
}
layer2
{
numframes = 6
frame0=grass1.tga
frame1=grass1_b1.tga
frame2=grass1_b2.tga
frame3=grass2.tga
frame4=grass2_b1.tga
frame5=grass2_b2.tga
}
layer3
{
numframes = 6
frame0=sand1.tga
frame1=sand1_b1.tga
frame2=sand1_b2.tga
frame3=sand2.tga
frame4=sand2_b1.tga
frame5=sand2_b2.tga
}
  • Please note that "nobase_marbles.tga" is just a workaround to be able to load the shader file nobase_marbles.shd; the "nobase_" prefix is used to skip the texture. If not skipped, the map will always be drawn on the tread.

Sidewall Blur

...TODO...

Integration

  • Export the EDF files of the tyres

...TODO...