Hedgehog Engine - Textures: Difference between revisions
Justin113D (talk | contribs) base page added |
Justin113D (talk | contribs) Added images |
||
(One intermediate revision by the same user not shown) | |||
Line 57: | Line 57: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _dif | | suffix = <code>_dif</code> | ||
| composition = RGBA | | composition = RGBA | ||
| encoding = * <code>BC1_UNORM</code> when opaque, | | encoding = * <code>BC1_UNORM</code> when opaque, | ||
* <code>BC3_UNORM</code> when transparent | * <code>BC3_UNORM</code> when transparent | ||
}} | }} | ||
[[File:HE1 Textures dif.png|thumb|<code>chr_sonic_body01_dif_HD.dds</code> from Sonic Generations]] | |||
Diffuse textures are color-transparency textures that are sampled directly for the base color of a material. | Diffuse textures are color-transparency textures that are sampled directly for the base color of a material. | ||
Line 70: | Line 70: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _alp | | suffix = <code>_alp</code>, <code>_a</code>, often none at all | ||
| composition = Grayscale | | composition = Grayscale | ||
| encoding = <code>BC1_UNORM</code> | | encoding = <code>BC1_UNORM</code> | ||
}} | }} | ||
[[File:HE1 Textures alp.png|thumb|<code>csc_etc_ty1_wind01_alp.dds</code> from Sonic Generations]] | |||
Opacity textures determine the transparency of a material. | Opacity textures determine the transparency of a material. | ||
Line 84: | Line 84: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _fal | | suffix = <code>_fal</code> | ||
| composition = Color | | composition = Color | ||
| encoding = <code>BC1_UNORM</code> | | encoding = <code>BC1_UNORM</code> | ||
}} | }} | ||
[[File:HE1 Textures fal.png|thumb|<code>chr_sonic_body01_fal_HD.dds</code> from Sonic Generations]] | |||
[[File:Falloff animation.gif|thumb|A camera rotating around Suzanne with a raw falloff factor. The diffuse texture is black, and the falloff texture is white]] | |||
Falloff textures change the color of the diffuse texture based on the viewing angle: The greater the angle between the camera and the surface of the model, the greater the influence. | Falloff textures change the color of the diffuse texture based on the viewing angle: The greater the angle between the camera and the surface of the model, the greater the influence. | ||
Line 100: | Line 101: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _ref | | suffix = <code>_ref</code>, <code>_env</code>, <code>_cube</code> | ||
| composition = RGBA | | composition = RGBA | ||
| encoding = * <code>BC1_UNORM</code> when opaque, | | encoding = * <code>BC1_UNORM</code> when opaque, | ||
Line 113: | Line 114: | ||
==== Cubemap ==== | ==== Cubemap ==== | ||
[[File:HE1 Textures cm.png|thumb|<code>chr_sonic_white_ref.dds</code> from Sonic Unleashed]] | |||
The most detailed, and probably best known type of reflection map. Uses 6 square areas, one for each side of a cube, to represent reflections from each axis. | The most detailed, and probably best known type of reflection map. Uses 6 square areas, one for each side of a cube, to represent reflections from each axis. | ||
Line 119: | Line 120: | ||
==== Spherical environment map ==== | ==== Spherical environment map ==== | ||
[[File:HE1 Textures sem.png|thumb|<code>ghz_obj_kk1_giant_batabata_body_ref.dds</code> from Sonic Generations]] | |||
[[File:HE1 Textures sem animation.gif|thumb|A camera rotating '''around''' Suzanne with a spherical environment map]] | |||
The cheapest type of reflection, which always directly faces the camera. | The cheapest type of reflection, which always directly faces the camera. | ||
Line 127: | Line 129: | ||
==== Dual paraboloid environment map ==== | ==== Dual paraboloid environment map ==== | ||
[[File:HE1 Textures dpem.png|thumb|<code>ghz_metal_yy1_sky_ref.dds</code> from Sonic Generations]] | |||
Effectively a full skybox composed of 2 spherical environment maps that cover the front and back of an environment. | Effectively a full skybox composed of 2 spherical environment maps that cover the front and back of an environment. | ||
Line 137: | Line 139: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _ems | | suffix = <code>_ems</code>, <code>_lum</code> | ||
| composition = Color | | composition = Color | ||
| encoding = <code>BC1_UNORM</code> | | encoding = <code>BC1_UNORM</code> | ||
}} | }} | ||
[[File:HE1 Textures ems.png|thumb|<code>boss_timeeater_light_ems_HD.dds</code> from Sonic Generations]] | |||
Emission textures make parts of a model emit light. | Emission textures make parts of a model emit light. | ||
Line 149: | Line 151: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _spc | | suffix = <code>_spc</code> | ||
| composition = RGBA | | composition = RGBA | ||
| encoding = <code>BC3_UNORM</code> | | encoding = <code>BC3_UNORM</code> | ||
Line 158: | Line 160: | ||
* The [[wikipedia:Blinn–Phong_reflection_model|blinn phong lighting]] specular color in the RGB channels | * The [[wikipedia:Blinn–Phong_reflection_model|blinn phong lighting]] specular color in the RGB channels | ||
* The environment map (reflection) influence in the alpha channel | * The environment map (reflection) influence in the alpha channel | ||
[[File:HE1 Textures spc rgb.png|left|thumb|The color component of <code>chr_sonic_body01_spc_HD.dds</code> from Sonic Generations]] | |||
[[File:HE1 Textures spc a.png|thumb|The alpha component of <code>chr_sonic_body01_spc_HD.dds</code> from Sonic Generations]] | |||
<div style="clear: both"/> | <div style="clear: both"/> | ||
Line 164: | Line 169: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _pow | | suffix = <code>_pow</code> | ||
| composition = Grayscale | | composition = Grayscale | ||
| encoding = <code>BC1_UNORM</code> | | encoding = <code>BC1_UNORM</code> | ||
}} | }} | ||
[[File:HE1 Textures pow.png|thumb|<code>ghz_rock_sk1_wall01_pow.dds</code> from Sonic Generations]] | |||
Gloss textures determine the [[wikipedia:Blinn–Phong_reflection_model|blinn phong]] lighting specular power. | Gloss textures determine the [[wikipedia:Blinn–Phong_reflection_model|blinn phong]] lighting specular power. | ||
Line 181: | Line 186: | ||
{{Texture Overview | {{Texture Overview | ||
| suffix = _nrm | | suffix = <code>_nrm</code> (rarely <code>_norm</code>, <code>_nor</code>, <code>_nml</code>) | ||
| composition = Color | | composition = Color | ||
| encoding = <code>BC1_UNORM</code> | | encoding = <code>BC1_UNORM</code> | ||
}} | }} | ||
[[File:HE1 Textures nrm.png|thumb|<code>ghz_rock_sk1_wall01_nrm.dds</code> from Sonic Generations]] | |||
Normal map textures are used for faking bumps and dents on a model to affect lighting, falloff, environment maps and similar. | Normal map textures are used for faking bumps and dents on a model to affect lighting, falloff, environment maps and similar. | ||
Latest revision as of 09:13, 12 July 2025
Hedgehog Engine 1 games limit themselves to a few texture types (with exceptions), which can make configuring materials difficult, as many shaders use certain types differently than what their name suggests.
Here is a list of all texture types and how they are most commonly used:
Type | Primarily used with | Occasionally used with |
---|---|---|
diffuse | Diffuse | Emission |
opacity | Opacity | Diffuse |
reflection | Environment Map | / |
specular | Specular | Diffuse, Gloss |
gloss | Gloss | Diffuse, Specular |
normal | Normal map | / |
displacement | General use texture type | Falloff, Emission |
File formats and encodings
Textures are always stored in DDS files, of which the vast majority use some form of block-compression encoding. Only a handful are not compressed.
Since HE1 is programmed with Direct3D 9, the number of available block compression encodings is limited to BC1, BC2 and BC3.
More info on DDS block compression can be found here.
Kinds of textures
The majority of textures used by materials are one of the following kind of textures.
Diffuse
Texture overview | |
---|---|
File Suffix | _dif
|
Composition | RGBA
|
Recommended encoding |
|

chr_sonic_body01_dif_HD.dds
from Sonic GenerationsDiffuse textures are color-transparency textures that are sampled directly for the base color of a material.
Opacity
Texture overview | |
---|---|
File Suffix | _alp , _a , often none at all
|
Composition | Grayscale
|
Recommended encoding |
|

csc_etc_ty1_wind01_alp.dds
from Sonic GenerationsOpacity textures determine the transparency of a material.
Usually transparency is relayed to Diffuse textures, and actual opacity textures are only used when special alpha compositing happens.
Falloff
Texture overview | |
---|---|
File Suffix | _fal
|
Composition | Color
|
Recommended encoding |
|

chr_sonic_body01_fal_HD.dds
from Sonic Generations
Falloff textures change the color of the diffuse texture based on the viewing angle: The greater the angle between the camera and the surface of the model, the greater the influence.
Depending on the shader, the falloff color either gets mixed with the diffuse color or added to it.
Additionally, shaders with falloff colors or textures basically always come with a parameter that controls how the falloff factor gets calculated.
Environment map
Texture overview | |
---|---|
File Suffix | _ref , _env , _cube
|
Composition | RGBA
|
Recommended encoding |
|
Environment textures are used to project a fake reflection of the surroundings onto a model based on the viewing angle.
Some get layered on top of e.g. a diffuse texture, and have an alpha channel for their layer-transparency.
Depending on the shader, these have 3 different layouts:
Cubemap

chr_sonic_white_ref.dds
from Sonic UnleashedThe most detailed, and probably best known type of reflection map. Uses 6 square areas, one for each side of a cube, to represent reflections from each axis.
Spherical environment map

ghz_obj_kk1_giant_batabata_body_ref.dds
from Sonic Generations
The cheapest type of reflection, which always directly faces the camera.
Also known as MatCap textures.
Dual paraboloid environment map

ghz_metal_yy1_sky_ref.dds
from Sonic GenerationsEffectively a full skybox composed of 2 spherical environment maps that cover the front and back of an environment.
Covers the same area as a cubemap but with less detail.
Emission
Texture overview | |
---|---|
File Suffix | _ems , _lum
|
Composition | Color
|
Recommended encoding |
|

boss_timeeater_light_ems_HD.dds
from Sonic GenerationsEmission textures make parts of a model emit light.
Specular
Texture overview | |
---|---|
File Suffix | _spc
|
Composition | RGBA
|
Recommended encoding |
|
Specular textures contain 2 different maps:
- The blinn phong lighting specular color in the RGB channels
- The environment map (reflection) influence in the alpha channel

chr_sonic_body01_spc_HD.dds
from Sonic Generations
chr_sonic_body01_spc_HD.dds
from Sonic GenerationsGloss
Texture overview | |
---|---|
File Suffix | _pow
|
Composition | Grayscale
|
Recommended encoding |
|

ghz_rock_sk1_wall01_pow.dds
from Sonic GenerationsGloss textures determine the blinn phong lighting specular power.
Normal Map
Texture overview | |
---|---|
File Suffix | _nrm (rarely _norm , _nor , _nml )
|
Composition | Color
|
Recommended encoding |
|

ghz_rock_sk1_wall01_nrm.dds
from Sonic GenerationsNormal map textures are used for faking bumps and dents on a model to affect lighting, falloff, environment maps and similar.
See normal mapping for reference.