Difference between revisions of "Texture Formats"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Created page with 'Textures in DAO are stored in DDS File Format. It is easily editable in many Grafic Packages. Or they can be made to with external tools, like Nvidia's DDS Tools. === Texturetyp...')
 
(Added link to list of textures page)
 
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Textures in DAO are stored in DDS File Format. It is easily editable in many Grafic Packages. Or they can be made to with external tools, like Nvidia's DDS Tools.
+
Textures in DAO are stored in the [[DDS]] format. Native support of this file type can be added to a graphics package such as Adobe Photoshop or GIMP via the use of plugins. Alternatively, a DDS can be converted into a more universal format such as TGA or JPG using 3rd party tools.
  
=== Texturetypes ===
+
== Texture Types ==
  
DAO uses different types of Textures, while they are all in DDS Format, have different purposes. The Filename Scheme differentiates those Types with a letter appendix. Most common is Models having 4 different Types of Textures. All these files are referenced by the [[MAO]] File when creating the Model.
+
Dragon Age uses a number of different texture types. While all are in the [[DDS]] format, they have different purposes. The filename scheme differentiates these types with a suffix. Typically, a texture set for a particular model consists of 4 different types. These are as follows, using the deer model as an example:
A list of Texture Types, taking the Deer Model as an example.
+
  
c_deera_0d.dds (Diffuse Texture "d" Appendix)
+
c_deera_0d.dds - Diffuse map (''d'' suffix)
c_deera_0n.dds (Normal Map "n" Appendix)
+
c_deera_0s.dds (Specular Map "s" Appendix)
+
c_deera_0t.dds (Tint Map "t" Appendix)
+
  
=== Quality Level ===
+
c_deera_0n.dds - Normal map (''n'' suffix)
  
Some Models also use multiple Quality Versions of Textures. For example a Model may use a Diffuse Texture with 3 different levels of Quality. This is the same Texture in multiple sizes ranging from small to big. A Diffuse texture at Level 2 may use a "dl2" Appendix. "d" for Diffuse, "l2" for Level 2.
+
c_deera_0s.dds - Specular map (''s'' suffix)
An Example on the Deer Models additional Quality Versions for Diffuse, Specular and Tint Map.
+
  
c_deera_0dl2.dds
+
c_deera_0t.dds - Tint map (''t'' suffix)
c_deera_0dl3.dds
+
c_deera_0sl2.dds
+
c_deera_0sl3.dds
+
c_deera_0tl2.dds
+
c_deera_0tl3.dds
+
  
---- (((Someone Needs to add knowledge how the game differentiates these, and how to add those to new Models)))
+
Additional texture types are used on some models. The most common type is a height map used on static objects like floors and walls, designated with the ''h'' suffix. Other types are emission (glow) maps designated with the ''e'' suffix, and fresnel maps utilized by some metallic materials, designated with the ''f'' suffix. There's also icon textures, prefixed with ''ico_''
  
=== Diffuse Texture
+
=== Diffuse Map ===
  
This Texture holds the "Color" Information. How the Model is colorized. However each Model can get tinted later on, so the colorization in game can be shifted into different color tones.
+
This texture holds the base colour information for the model. Diffuse maps are commonly referred to as "skins" in other games. Diffuse maps can be enhanced through the use of the [[Material Tint System|tint system]], which overlays a series of colours (defined by the [[TNT]] file) on the diffuse map in a pattern defined by the associated tint map.
However the Structure of the Paint applied the the Diffuse Texture stays.
+
  
Color Painting is done in the RGB Channel.
+
RGB channels - These hold the colour information, as with any standard image.
The Alpha Channel holds the Models Transparency. (???Need clarification here, as some textures like uh_har_0d.dds use transparency in the Blue channel???)
+
 
 +
Alpha channel - The alpha channel is multi-purpose. Typically it holds transparency information (black is 100% transparency, white is 100% opacity, shades of grey denote values in between), however in some cases, such as face textures, it holds the specular map instead. In these instances there is no separate specular map.
 +
 
 +
Special cases: Some diffuse maps, notably for hair, do not follow the standard arrangement and are instead what is known as a "packed texture". In these instances, the image is essentially a container for 4 separate greyscale texture maps, one in each channel. These are used in conjunction with the [[Material Tint System|tint system]] when full colour diffuse maps are not necessary. For example, the hair diffuse map is a packed texture that appears to have the normal map in the red channel, the specular map in the green channel, the alpha map in the blue channel, and the diffuse map in the alpha channel.
 +
 
 +
DDS Compression: [[DDS Export Settings]]
 +
 
 +
[[image:TexFor_Deer_Dif_Map.jpg|thumb|none|Deer diffuse map]]
  
 
=== Normal Map ===
 
=== Normal Map ===
  
This is a Bump Map Type, giving structure into otherwise flat Diffuse Paintings. Oftentimes this map is larger than the Diffuse Texture, due to the fact that fine Structure is benefitting more to the overall appearance, than a finer Color Map.  
+
Normal maps are an enhanced version of bump maps, and are used to fake the appearance of additional geometry on a low polygon mesh. They work by providing information on how light would be reflected from a polygon's surface normal (hence the name normal map) as if it were part of a more detailed model. This provides the optical illusion of extra height and depth to otherwise flat geometry. It is typically used to provide roughness to surfaces like rock, or intricate detail like raised filigree patterns on armour and weapons. It is a way of providing highly detailed models without the use of a large number of polygons.
  
 +
Normal maps used by Dragon Age differ from the typical tangent-space normal maps used in other games. A tangent-space normal map holds X information in the red channel, Y information in the green channel, and Z information in the blue channel. DA normal maps are RGBA with only X and Y information. Z information is interpolated on the fly.
 +
 +
R = Y (same as G channel in regular normal maps)
 +
 +
G = Y (same as G channel in regular normal maps)
 +
 +
B = Y (same as G channel in regular normal maps)
 +
 +
Alpha = X (same as R channel in regular normal maps)
 +
 +
DDS Compression: [[DDS Export Settings]]
 +
 +
[[image:TexFor_Deer_Nml_Map_DA.jpg|thumb|left|Deer normal map in DA format]]  [[image:TexFor_Deer_Nml_Map_Reg.jpg|thumb|none|Deer normal map converted to typical RGB format]]
  
 
=== Specular Map ===
 
=== Specular Map ===
  
This Texture holds Specular Information. How much the Model shines and reflects light at certain angles. Lips are Shiny, Cloth rather not.
+
Specular maps hold information on how an object reflects light. It is sometimes also referred to as a gloss map. Lighting is games does not reflect the true behaviour of light in the real world, thus specular highlights are used to give the illusion of light reflecting off a surface. In simplest terms, it denotes the size and intensity of bright spots on an object, places where light would reflect back in the real world. Objects that should appear very shiny, like polished metal, have high sharp specular highlights, objects that should appear fairly dull, like cloth, have low flat specular highlights.
  
R
+
Specular maps function in a manner not dissimilar to alpha masks, in that the closer to white an area it is, the brighter the highlight. This information is stored in alpha channel of the specular map. The RGB part of the map defines tint applied to the highlight, as not all materials reflect the light equally -- some can reflect the color of the light source, while for others this will be the color of the reflecting object. The tint helps to simulate the latter behavior.
G
+
 
B
+
DDS Compression: [[DDS Export Settings]]
Alpha
+
 
(((clarification anyone?)))
+
[[image:TexFor_Deer_Spec_Map_4ch.jpg|thumb|none|Deer specular map]]
  
 
=== Tint Map ===
 
=== Tint Map ===
  
 +
Tint maps are another container texture, holding a series of up to 4 greyscale images (RGBA). Each channel is actually an alpha mask. They denote areas of the associated diffuse texture that will be affected by the corresponding tint colour defined in the [[TNT]] file.
 +
 +
Commonly only the RGB Channels are used, where one given channel always masks a specific Surface (ie Metal). So that a tint like "Red Steel" can be reapplyable to the full range of armor models, which applies a red tint to only that mask.
 +
 +
Equally, the alpha channel is often only used for skin tints, where applicable.
 +
 +
DDS Compression: [[DDS Export Settings]]
 +
 +
[[image:TexFor_Deer_Tint_Map.jpg|thumb|none|RGB channels for deer tint map]]
 +
 +
== Material Object ==
 +
 +
A texture set for a model is defined in the model's material object or [[MAO]]. See the [[MAO]] page for more info.
 +
 +
== Level of Detail ==
 +
 +
Most complex models (such as NPCs and creatures) have a scaling level of detail (LOD). As a player moves further away from an object, the LOD is progressively scaled down to reduce system overhead. Both the geometry and textures of a model may have LOD variants. DA uses three LOD levels, denoted by the suffix. The three levels are 0 (highest), 2 and 3 (lowest). For LOD0, the suffix is simply _0''x'' (where ''x'' denotes texture type). For LOD2, the suffix is _0''x''l2 and for LOD3, it is _0''x''l3. For example, c_deera_0d.dds is a diffuse texture at the highest LOD, c_deera_0dl2.dds and c_deera_0dl3.dds are the LOD2 and LOD3 diffuse textures, respectively. Each LOD texture level is generally 25% the size of the preceding level. For instance, for a LOD0 texture that is 1024x1024, the LOD2 texture will be 512x512 and the LOD3 texture will be 256x256. As well as diffuse maps, LOD is also used for specular and tint maps. Normal maps have no scaling LOD, as they are only used for LOD0.
 +
 +
[[image:TexFor_Deer_LOD.jpg|thumb|none|Scaling LOD for deer diffuse map]]
 +
 +
== Related Links ==
 +
 +
[[Reskinning an item tutorial]]
 +
 +
[[Material editor|Material Editor]]
 +
 +
[[Material Tint System]]
 +
 +
[[List of textures]]
  
 
=== External Links ===
 
=== External Links ===
  
Nvidia DDS Plugin  
+
nVidia DDS Plugin for Adobe Photoshop (32bit only)
 
http://developer.nvidia.com/object/photoshop_dds_plugins.html
 
http://developer.nvidia.com/object/photoshop_dds_plugins.html
 +
 +
DDS Plugin for GIMP
 +
http://nifelheim.dyndns.org/~cocidius/dds/
 +
 +
DDS Converter v2.1 (DDS conversion tool)
 +
http://eliteforce2.filefront.com/file/DDS_Converter;29412
 +
 +
nVidia DDS Utilities (includes DDS conversion tool)
 +
http://developer.nvidia.com/object/dds_utilities_legacy.html
 +
 +
[[Category:Textures]]

Latest revision as of 10:52, 17 August 2022

Textures in DAO are stored in the DDS format. Native support of this file type can be added to a graphics package such as Adobe Photoshop or GIMP via the use of plugins. Alternatively, a DDS can be converted into a more universal format such as TGA or JPG using 3rd party tools.

Texture Types

Dragon Age uses a number of different texture types. While all are in the DDS format, they have different purposes. The filename scheme differentiates these types with a suffix. Typically, a texture set for a particular model consists of 4 different types. These are as follows, using the deer model as an example:

c_deera_0d.dds - Diffuse map (d suffix)

c_deera_0n.dds - Normal map (n suffix)

c_deera_0s.dds - Specular map (s suffix)

c_deera_0t.dds - Tint map (t suffix)

Additional texture types are used on some models. The most common type is a height map used on static objects like floors and walls, designated with the h suffix. Other types are emission (glow) maps designated with the e suffix, and fresnel maps utilized by some metallic materials, designated with the f suffix. There's also icon textures, prefixed with ico_

Diffuse Map

This texture holds the base colour information for the model. Diffuse maps are commonly referred to as "skins" in other games. Diffuse maps can be enhanced through the use of the tint system, which overlays a series of colours (defined by the TNT file) on the diffuse map in a pattern defined by the associated tint map.

RGB channels - These hold the colour information, as with any standard image.

Alpha channel - The alpha channel is multi-purpose. Typically it holds transparency information (black is 100% transparency, white is 100% opacity, shades of grey denote values in between), however in some cases, such as face textures, it holds the specular map instead. In these instances there is no separate specular map.

Special cases: Some diffuse maps, notably for hair, do not follow the standard arrangement and are instead what is known as a "packed texture". In these instances, the image is essentially a container for 4 separate greyscale texture maps, one in each channel. These are used in conjunction with the tint system when full colour diffuse maps are not necessary. For example, the hair diffuse map is a packed texture that appears to have the normal map in the red channel, the specular map in the green channel, the alpha map in the blue channel, and the diffuse map in the alpha channel.

DDS Compression: DDS Export Settings

Deer diffuse map

Normal Map

Normal maps are an enhanced version of bump maps, and are used to fake the appearance of additional geometry on a low polygon mesh. They work by providing information on how light would be reflected from a polygon's surface normal (hence the name normal map) as if it were part of a more detailed model. This provides the optical illusion of extra height and depth to otherwise flat geometry. It is typically used to provide roughness to surfaces like rock, or intricate detail like raised filigree patterns on armour and weapons. It is a way of providing highly detailed models without the use of a large number of polygons.

Normal maps used by Dragon Age differ from the typical tangent-space normal maps used in other games. A tangent-space normal map holds X information in the red channel, Y information in the green channel, and Z information in the blue channel. DA normal maps are RGBA with only X and Y information. Z information is interpolated on the fly.

R = Y (same as G channel in regular normal maps)

G = Y (same as G channel in regular normal maps)

B = Y (same as G channel in regular normal maps)

Alpha = X (same as R channel in regular normal maps)

DDS Compression: DDS Export Settings

Deer normal map in DA format
Deer normal map converted to typical RGB format

Specular Map

Specular maps hold information on how an object reflects light. It is sometimes also referred to as a gloss map. Lighting is games does not reflect the true behaviour of light in the real world, thus specular highlights are used to give the illusion of light reflecting off a surface. In simplest terms, it denotes the size and intensity of bright spots on an object, places where light would reflect back in the real world. Objects that should appear very shiny, like polished metal, have high sharp specular highlights, objects that should appear fairly dull, like cloth, have low flat specular highlights.

Specular maps function in a manner not dissimilar to alpha masks, in that the closer to white an area it is, the brighter the highlight. This information is stored in alpha channel of the specular map. The RGB part of the map defines tint applied to the highlight, as not all materials reflect the light equally -- some can reflect the color of the light source, while for others this will be the color of the reflecting object. The tint helps to simulate the latter behavior.

DDS Compression: DDS Export Settings

Deer specular map

Tint Map

Tint maps are another container texture, holding a series of up to 4 greyscale images (RGBA). Each channel is actually an alpha mask. They denote areas of the associated diffuse texture that will be affected by the corresponding tint colour defined in the TNT file.

Commonly only the RGB Channels are used, where one given channel always masks a specific Surface (ie Metal). So that a tint like "Red Steel" can be reapplyable to the full range of armor models, which applies a red tint to only that mask.

Equally, the alpha channel is often only used for skin tints, where applicable.

DDS Compression: DDS Export Settings

RGB channels for deer tint map

Material Object

A texture set for a model is defined in the model's material object or MAO. See the MAO page for more info.

Level of Detail

Most complex models (such as NPCs and creatures) have a scaling level of detail (LOD). As a player moves further away from an object, the LOD is progressively scaled down to reduce system overhead. Both the geometry and textures of a model may have LOD variants. DA uses three LOD levels, denoted by the suffix. The three levels are 0 (highest), 2 and 3 (lowest). For LOD0, the suffix is simply _0x (where x denotes texture type). For LOD2, the suffix is _0xl2 and for LOD3, it is _0xl3. For example, c_deera_0d.dds is a diffuse texture at the highest LOD, c_deera_0dl2.dds and c_deera_0dl3.dds are the LOD2 and LOD3 diffuse textures, respectively. Each LOD texture level is generally 25% the size of the preceding level. For instance, for a LOD0 texture that is 1024x1024, the LOD2 texture will be 512x512 and the LOD3 texture will be 256x256. As well as diffuse maps, LOD is also used for specular and tint maps. Normal maps have no scaling LOD, as they are only used for LOD0.

Scaling LOD for deer diffuse map

Related Links

Reskinning an item tutorial

Material Editor

Material Tint System

List of textures

External Links

nVidia DDS Plugin for Adobe Photoshop (32bit only) http://developer.nvidia.com/object/photoshop_dds_plugins.html

DDS Plugin for GIMP http://nifelheim.dyndns.org/~cocidius/dds/

DDS Converter v2.1 (DDS conversion tool) http://eliteforce2.filefront.com/file/DDS_Converter;29412

nVidia DDS Utilities (includes DDS conversion tool) http://developer.nvidia.com/object/dds_utilities_legacy.html