Difference between revisions of "Custom Decals"

From Wolfire Games Wiki
Jump to: navigation, search
m (Top: Added Image Decal_blood.jpg)
m (Removed all TODO's: '''TODO: is this necessary or are there fallback files?'''; '''TOOD: Confirm''' (x 3); Must have the same dimensions as the texture file. '''TODO: is this True?''')
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category: Tutorials]]
 +
[[Category: Modding]]
 +
[[Category: Overgrowth]]
 +
 
[[File:Decal blood.jpg|thumb|alt=Decal blood plats|Decal blood splats]]
 
[[File:Decal blood.jpg|thumb|alt=Decal blood plats|Decal blood splats]]
Decals are textures which can be mapped to environment objects & terrain in Edit Mode. Their main use is adding detail to the scenary; bloodsplats, [[Lighting#Shadow_decals|shadows]] and footprints use them too.
+
Decals are textures which can be mapped to environment objects & terrain. Their main use is adding detail and variation to the scenery. Blood splats, [[Lighting#Shadow_decals|ambient shadows]] and footprints use them too.
  
=Files=
+
== Files ==
 
To create a custom decal, the following files are needed:
 
To create a custom decal, the following files are needed:
  
 
* '''[[#XML_File|XML File]]''' - What you select when loading the decal
 
* '''[[#XML_File|XML File]]''' - What you select when loading the decal
** '''[[#Normal_Map_Image_File|Color Map File]]''' - The texture for the decal
+
* '''[[#ColorMap|ColorMap]]''' - The texture for the decal
** '''[[#Texture_File|Normal Map File]]''' - Has normal information for the decal '''TODO: is this necessary or are there fallback files?'''
+
* '''[[#NormalMap|NormalMap]]''' - Has normal information for the decal  
  
===XML File===
+
=== 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.
  
<pre style="white-space: pre-wrap;"><?xml version="2.0" ?>
+
<pre style="white-space: pre-wrap;">
 +
<?xml version="2.0" ?>
 
<Type>generic</Type>
 
<Type>generic</Type>
 
<DecalObject>
 
<DecalObject>
<ColorMap>Data/Textures/Decals/Rocky/black_dust_c.tga</ColorMap>
+
    <ColorMap>Data/Textures/Decals/Rocky/black_dust_c.tga</ColorMap>
<NormalMap>Data/Textures/diffusebump.tga</NormalMap>
+
    <NormalMap>Data/Textures/diffusebump.tga</NormalMap>
<ShaderName>decal</ShaderName>
+
    <ShaderName>decal</ShaderName>
 
</DecalObject>
 
</DecalObject>
 
</pre>
 
</pre>
  
<span style="color:#399c25">'''ColorMap'''</span><br/>
+
{| class="wikitable"
Path to the texture file.
+
|-
 
+
! Tag !! Example use !! Description
<span style="color:#399c25">'''NormalMap'''</span><br/>
+
|-
Path to the Normal map image file.
+
! ColorMap
 
+
| <ColorMap>Data/Textures/MyColorMap.tga</ColorMap> || path to the color texture file (.tga, .tif or .png)
===Texture File===
+
|-
Can be created with any image manipulation program. Has to be quadratic. '''TODO: is this True?'''
+
! NormalMap
The following file formats are supported:
+
| <NormalMap>Data/Textures/MyNormalMap.tga</NormalMap> || Path to the normal map texture file (.tga, .tif or .png)
* *.tga
+
|-
* *.png
+
! ShaderName
* *.jpeg '''TODO: is this True?'''
+
| <ShaderName>decal</ShaderName> || Name of shader to use from ../Overgrowth/Data/GLSL/ (.frag and .vert)
'''TODO: add the rest.'''
+
|-
 +
|}
 +
=== ColorMap ===
 +
Can be created with any image manipulation program. Should have sidelengths of a power of two pixels (e.g. 512px x 512px), else an error will appear.
  
===Normal Map Image File===
+
=== NormalMap ===
Can be created with any image manipulation program. Must have the same dimensions as the texture file. '''TODO: is this True?'''
+
Can be created with any image manipulation program. It's dimensions must be of a power of two pixels (e.g. 512px x 512px).
 
 
[[Category: Tutorials]]
 
[[Category: Modding]]
 
[[Category: Overgrowth]]
 

Latest revision as of 17:18, 10 March 2018

Decal blood plats
Decal blood splats

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

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)
NormalMap <NormalMap>Data/Textures/MyNormalMap.tga</NormalMap> Path to the normal map texture file (.tga, .tif or .png)
ShaderName <ShaderName>decal</ShaderName> Name of shader to use from ../Overgrowth/Data/GLSL/ (.frag and .vert)

ColorMap

Can be created with any image manipulation program. Should have sidelengths of a power of two pixels (e.g. 512px x 512px), else an error will appear.

NormalMap

Can be created with any image manipulation program. It's dimensions must be of a power of two pixels (e.g. 512px x 512px).