Custom Decals: Difference between revisions
From Wolfire Games Wiki
Jump to navigationJump to search
Silverfish (talk | contribs) m →Files |
m Replaced tag desc with table |
||
| Line 26: | Line 26: | ||
</pre> | </pre> | ||
{| class="wikitable" | |||
Path to the texture file. | |- | ||
! Tag !! Example use !! Description | |||
|- | |||
! ColorMap | |||
| <ColorMap>Data/Textures/MyColorMap.tga</ColorMap> || path to the color texture file (.tga, .tif or .png)'''TOOD: Confirm''' | |||
|- | |||
! NormalMap | |||
| <NormalMap>Data/Textures/MyNormalMap.tga</NormalMap> || Path to the normal map texture file (.tga, .tif or .png)'''TOOD: Confirm''' | |||
|- | |||
! ShaderName | |||
| <ShaderName>decal</ShaderName> || Name of shader to use from ../Overgrowth/Data/GLSL/ (.frag and .vert)'''TOOD: Confirm''' | |||
|- | |||
|} | |||
=== ColorMap === | === ColorMap === | ||
Can be created with any image manipulation program. | Can be created with any image manipulation program. | ||
Revision as of 06:20, 10 March 2018

Decals are textures which can be mapped to environment objects & terrain. Their main use is adding detail and variation to the scenery. Blood splats, ambient shadows and footprints use them too.
Files
To create a custom decal, the following files are needed:
- XML File - What you select when loading the decal
- ColorMap - The texture for the decal
- NormalMap - Has normal information for the decal TODO: is this necessary or are there fallback files?
XML File
This file is what you load in the engine to make the decal show up. It links to a color texture and a normal texture that make up the decal. To avoid issues we recommend using .tga as texture format, though .png works most of the time as well.
<?xml version="2.0" ?>
<Type>generic</Type>
<DecalObject>
<ColorMap>Data/Textures/Decals/Rocky/black_dust_c.tga</ColorMap>
<NormalMap>Data/Textures/diffusebump.tga</NormalMap>
<ShaderName>decal</ShaderName>
</DecalObject>
| Tag | Example use | Description |
|---|---|---|
| ColorMap | <ColorMap>Data/Textures/MyColorMap.tga</ColorMap> | path to the color texture file (.tga, .tif or .png)TOOD: Confirm |
| NormalMap | <NormalMap>Data/Textures/MyNormalMap.tga</NormalMap> | Path to the normal map texture file (.tga, .tif or .png)TOOD: Confirm |
| ShaderName | <ShaderName>decal</ShaderName> | Name of shader to use from ../Overgrowth/Data/GLSL/ (.frag and .vert)TOOD: Confirm |
ColorMap
Can be created with any image manipulation program.
NormalMap
Can be created with any image manipulation program. Must have the same dimensions as the texture file. TODO: is this True?