CCG/Modelling: Bump Mapping Information
(New page: ==Bump Mapping Information== Note: Bump mapped materials for TRS requires 3DSMmax 4 or later exporter. A GMax exporter supporting normal mapping is not available. ===Bump Mapping Backg...) |
|||
Line 8: | Line 8: | ||
For those new to this term, Bump mapping is used to add 3-dimensional detail to an image (using an applied RGB `Normal' map), without increasing the number of polygons. | For those new to this term, Bump mapping is used to add 3-dimensional detail to an image (using an applied RGB `Normal' map), without increasing the number of polygons. | ||
− | A | + | A 'normal' is a vector that points into the direction that a surface is facing (orthogonal to its surface). 'Normal' bump mapping applies 'false' normals to each '''pixel''' of a polygon, so that the reflection is not computed in accordance to the 'real' polygon surface, but according to the surface vectors of the normal map. |
− | This results in the bump mapping effect, giving the surface a 3D-appearance that is not | + | This results in the bump mapping effect, giving the surface a 3D-appearance that is not 'really' geometrically there. |
If the user's graphics card does not support '''per-pixel bump mapping''', then the bump mapping effect won't be seen. | If the user's graphics card does not support '''per-pixel bump mapping''', then the bump mapping effect won't be seen. | ||
Line 52: | Line 52: | ||
'Normal' Map Generation | 'Normal' Map Generation | ||
− | This | + | This 'normal' map was created from the greyscale height map above using a Photoshop Normal Map Generation Filter available for download from the Nvidia web site. The plug-in also includes a 3D preview with per-pixel lighting to view the generated normal map. |
− | + | ||
The plug-in generates the normal map by calculating the greyscale contrast. White is high, grey is flat, black is low. | The plug-in generates the normal map by calculating the greyscale contrast. White is high, grey is flat, black is low. | ||
The above normal map was generated using the settings displayed right (figure 5). | The above normal map was generated using the settings displayed right (figure 5). | ||
+ | |||
+ | Other third party Trainz tools such as PEV's Images2TGA or Andi06's AssetX also have normal map filters. | ||
Note: Bump map textures will need to be in a pixel ratio of `power of 2' for the filter to function. i.e. 512x512, | Note: Bump map textures will need to be in a pixel ratio of `power of 2' for the filter to function. i.e. 512x512, | ||
256x512, 512x1024 etc. Of course these are the same dimensions as TRS2004 so you shouldn't have a problem! | 256x512, 512x1024 etc. Of course these are the same dimensions as TRS2004 so you shouldn't have a problem! | ||
− | Refer to Important Notes: | + | Refer to Important Notes: 'Normal Maps' below. |
Line 70: | Line 71: | ||
Figure 5 | Figure 5 | ||
− | Important Notes: | + | Important Notes: 'Normal Maps' |
· Once the bump map has been converted to a RGB Normal Map, do not apply any changes to it like scale, blur sharpen etc. If you wish to alter the normal, apply the changes to the greyscale height map then re-generate. | · Once the bump map has been converted to a RGB Normal Map, do not apply any changes to it like scale, blur sharpen etc. If you wish to alter the normal, apply the changes to the greyscale height map then re-generate. | ||
· The normal map does not have to be the same dimensions as the diffuse map. Normal maps can be smaller to save texture space, larger for finer rain | · The normal map does not have to be the same dimensions as the diffuse map. Normal maps can be smaller to save texture space, larger for finer rain | ||
bumps but the later is not advisable at 1024x512. As above, do not apply changes to an already generated normal map. | bumps but the later is not advisable at 1024x512. As above, do not apply changes to an already generated normal map. | ||
− | · At no time should you save RGB normal maps in a | + | · At no time should you save RGB normal maps in a 'lossy' file format (i.e. jpg or other compression file format). This is due to the fact that compression de-normalises normals. Use only uncompressed 24 bit tga's. |
· Keep all mapping clean. i.e. Don't stretch your mapping co-ordinates. You can get some seriously undesirable effects! | · Keep all mapping clean. i.e. Don't stretch your mapping co-ordinates. You can get some seriously undesirable effects! | ||
Line 81: | Line 82: | ||
Note: | Note: | ||
+ | |||
These settings will also apply when specifying specular levels of non-bump mapped materials. Just remember to make the Diffuse and Ambient colour values pure white (unless you really know what you are doing!). | These settings will also apply when specifying specular levels of non-bump mapped materials. Just remember to make the Diffuse and Ambient colour values pure white (unless you really know what you are doing!). | ||
Line 86: | Line 88: | ||
Specific material naming conventions need not apply to non-bump mapped materials. | Specific material naming conventions need not apply to non-bump mapped materials. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 150: | Line 145: | ||
The specular setting is controlled by the whiteness slider (left). The whiter it is, the higher the value. | The specular setting is controlled by the whiteness slider (left). The whiter it is, the higher the value. | ||
- Ensure Specular Level is 100 | - Ensure Specular Level is 100 | ||
− | |||
· For bump mapped materials, the Glossiness value gives a visual representation in MAX only (as TRS forces this value to 32) | · For bump mapped materials, the Glossiness value gives a visual representation in MAX only (as TRS forces this value to 32) | ||
· For non-bump mapped materials the glossiness value WILL be exported, you should still use the whiteness slider to determine the specular level. | · For non-bump mapped materials the glossiness value WILL be exported, you should still use the whiteness slider to determine the specular level. | ||
− | + | The Glossiness value adjusts the width of the Specular. |
Revision as of 12:29, 14 June 2011
Bump Mapping Information
Note: Bump mapped materials for TRS requires 3DSMmax 4 or later exporter. A GMax exporter supporting normal mapping is not available.
Bump Mapping Background Theory
For those new to this term, Bump mapping is used to add 3-dimensional detail to an image (using an applied RGB `Normal' map), without increasing the number of polygons.
A 'normal' is a vector that points into the direction that a surface is facing (orthogonal to its surface). 'Normal' bump mapping applies 'false' normals to each pixel of a polygon, so that the reflection is not computed in accordance to the 'real' polygon surface, but according to the surface vectors of the normal map.
This results in the bump mapping effect, giving the surface a 3D-appearance that is not 'really' geometrically there.
If the user's graphics card does not support per-pixel bump mapping, then the bump mapping effect won't be seen.
DIFFUSE TEXTURE 1024x512 24 bit .tga
Bump Mapping in Trainz
TS2009 onwards supports bump mapping for most game objects. Used in conjunction with 'level of detail' mesh reduction it is a powerful tool to enhance the detailled appearance of the game. Refer to Level of Detail, Page 370.
Bump mapping can be used to simulate 3-dimensional detail to rivets, bolts, rust and joints for example. The following example is taken from Auran's steam locomotive the QR Class PB 15 (figure 1).
QR Class PB 15
Figure 1
Figure 2
GREYSCALE HEIGHT MAP 1024x512
Figure 3
RGB NORMAL MAP 1024x512
Figure 4
'Normal' Map Generation This 'normal' map was created from the greyscale height map above using a Photoshop Normal Map Generation Filter available for download from the Nvidia web site. The plug-in also includes a 3D preview with per-pixel lighting to view the generated normal map.
The plug-in generates the normal map by calculating the greyscale contrast. White is high, grey is flat, black is low.
The above normal map was generated using the settings displayed right (figure 5).
Other third party Trainz tools such as PEV's Images2TGA or Andi06's AssetX also have normal map filters.
Note: Bump map textures will need to be in a pixel ratio of `power of 2' for the filter to function. i.e. 512x512, 256x512, 512x1024 etc. Of course these are the same dimensions as TRS2004 so you shouldn't have a problem!
Refer to Important Notes: 'Normal Maps' below.
PHOTOSHOP NORMAL MAP GENERATION FILTER Figure 5
Important Notes: 'Normal Maps' · Once the bump map has been converted to a RGB Normal Map, do not apply any changes to it like scale, blur sharpen etc. If you wish to alter the normal, apply the changes to the greyscale height map then re-generate. · The normal map does not have to be the same dimensions as the diffuse map. Normal maps can be smaller to save texture space, larger for finer rain bumps but the later is not advisable at 1024x512. As above, do not apply changes to an already generated normal map.
· At no time should you save RGB normal maps in a 'lossy' file format (i.e. jpg or other compression file format). This is due to the fact that compression de-normalises normals. Use only uncompressed 24 bit tga's.
· Keep all mapping clean. i.e. Don't stretch your mapping co-ordinates. You can get some seriously undesirable effects!
Note:
These settings will also apply when specifying specular levels of non-bump mapped materials. Just remember to make the Diffuse and Ambient colour values pure white (unless you really know what you are doing!).
Emissive values (self-illumination) is also exportable using the above configuration.
Specific material naming conventions need not apply to non-bump mapped materials.
Bump Mapped Materials
3D Studio Max 4/4.2, 5.1 The setup has altered from previous exporters. This is to allow specular control of bump mapped surfaces (see notes on Page 354 for Specular Control).
After downloading and installing the new exporter, ensure the following configuration:
C:\3dsmax4\plugins\JetExporter\JetExporter.cfg
enablearnings = 1
[C:\3dsmax4\Plugins\JetExporter\IndexedMeshExport.dll] { buildNeighborArray = 0 forceTxtOverwrite = 0 defaultMaterialColor = 0 disableautobillboard = 1 } [C:\3dsmax4\Plugins\JetExporter\ProgressiveMeshExport.dll] { buildNeighborArray = 0 forceTxtOverwrite = 0 defaultMaterialColor = 0 disableautobillboard = 1 } [C:\3dsmax4\Plugins\JetExporter\AnimationExport.dll] {
}
Material Naming Conventions.
For straight bump mapped materials with or without alpha (no reflection allowed) = name.m.tbumptex For bump materials with reflection (or gloss) (no alpha allowed) = name.m.tbumpgloss
Specular Values:
The specular setting is controlled by the whiteness slider (left). The whiter it is, the higher the value.
- Ensure Specular Level is 100
· For bump mapped materials, the Glossiness value gives a visual representation in MAX only (as TRS forces this value to 32)
· For non-bump mapped materials the glossiness value WILL be exported, you should still use the whiteness slider to determine the specular level. The Glossiness value adjusts the width of the Specular.