CCG/Modelling: Bump Mapping Information

From TrainzOnline
< CCG(Difference between revisions)
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
 
==Bump Mapping Information==
 
==Bump Mapping Information==
  
Note: Bump mapped materials for TRS requires 3DSMmax 4 or later exporter. A GMax exporter supporting normal mapping is not available.
+
Note: Bump mapped materials for TRS requires 3DSMmax 4 or later exporter. A third-party GMax exporter supporting normal mapping is available from the [[Tools]] page.
  
  
Line 21: Line 21:
 
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).
 
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).
  
 +
 +
<table width="400">
 +
<tr><td width="100"></td>
 +
<td>QR Class PB 15</td></tr></table>
  
 
[[Image:CCG_QR_Class_PB15.jpg]]
 
[[Image:CCG_QR_Class_PB15.jpg]]
  
. . . . QR Class PB 15 . . . . . Figure 1
+
<table width="400">
 +
<tr><td width="125"></td>
 +
<td>Figure 1</td></tr></table>
  
  
  
. . . . . . .DIFFUSE TEXTURE 1024x512 24 bit .tga
+
 
 +
<table width="400">
 +
<tr><td width="150"></td>
 +
<td>DIFFUSE TEXTURE 1024x512 24 bit .tga</td></tr></table>
  
 
[[Image:CCG_Diffuse_Texture_PB_15.jpg]]
 
[[Image:CCG_Diffuse_Texture_PB_15.jpg]]
  
. . . . . . . . . . . Figure 2
+
<table width="400">
 +
<tr><td width="225"></td>
 +
<td>Figure 2</td></tr></table>
  
  
  
  
. . . . . .GREYSCALE HEIGHT MAP 1024x512
+
<table width="400">
 +
<tr><td width="150"></td>
 +
<td>GREYSCALE HEIGHT MAP 1024x512</td></tr></table>
  
 
[[Image:CCG_GreyScale_Bump_Map_PB_15.jpg]]
 
[[Image:CCG_GreyScale_Bump_Map_PB_15.jpg]]
  
. . . . . . . . . . . Figure 3
+
<table width="400">
 +
<tr><td width="225"></td>
 +
<td>Figure 3</td></tr></table>
  
  
  
. . . . . . . . RGB NORMAL MAP 1024x512
+
 
 +
<table width="400">
 +
<tr><td width="150"></td>
 +
<td>RGB NORMAL MAP 1024x512</td></tr></table>
  
 
[[Image:CCG_Normal_Map_PB_15.jpg]]
 
[[Image:CCG_Normal_Map_PB_15.jpg]]
  
. . . . . . . . . . . Figure 4
+
<table width="400">
 +
<tr><td width="225"></td>
 +
<td>Figure 4</td></tr></table>
  
  
Line 57: Line 77:
 
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 shown in figure 5 below.
 
+
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,
Line 67: Line 85:
  
  
. . . PHOTOSHOP NORMAL MAP GENERATION FILTER
+
<table width="400">
 +
<tr><td width="25"></td>
 +
<td>PHOTOSHOP NORMAL MAP GENERATION FILTER</td></tr></table>
  
 
[[Image:CCG_Nvidia_normal_map_filter.jpg]]
 
[[Image:CCG_Nvidia_normal_map_filter.jpg]]
  
. . . . . . . . . Figure 5
+
<table width="400">
 +
<tr><td width="150"></td>
 +
<td>Figure 5</td></tr></table>
 +
 
 +
 
 +
Other third party Trainz tools such as PEV's Images2TGA or Andi06's AssetX have normal map filters. See [[Tools|Third Party Tools]].
 +
 
 +
 
  
 
===Important Notes on 'Normal Maps'===
 
===Important Notes on 'Normal Maps'===
Line 141: Line 168:
  
  
[[Modelling: Locomotive Numbering|Previous Page]] . . . [[Modelling: Textures and Opacity Effects|Next Page]]
+
[[CCG/Modelling: Locomotive Numbering|Previous Page]] . . . [[CCG/Modelling: Textures and Opacity Effects|Next Page]]
  
 
==Return to CCG Index==
 
==Return to CCG Index==
 
[[Content Creator's Guide]]
 
[[Content Creator's Guide]]

Latest revision as of 04:49, 7 November 2012

Contents

[edit] Bump Mapping Information

Note: Bump mapped materials for TRS requires 3DSMmax 4 or later exporter. A third-party GMax exporter supporting normal mapping is available from the Tools page.


[edit] 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.


[edit] 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

CCG QR Class PB15.jpg

Figure 1



DIFFUSE TEXTURE 1024x512 24 bit .tga

CCG Diffuse Texture PB 15.jpg

Figure 2



GREYSCALE HEIGHT MAP 1024x512

CCG GreyScale Bump Map PB 15.jpg

Figure 3



RGB NORMAL MAP 1024x512

CCG Normal Map PB 15.jpg

Figure 4


[edit] '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 shown in figure 5 below.

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

CCG Nvidia normal map filter.jpg

Figure 5


Other third party Trainz tools such as PEV's Images2TGA or Andi06's AssetX have normal map filters. See Third Party Tools.


[edit] Important Notes on '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 grain 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!


[edit] 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.



[edit] 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 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]
       {
  
       }
   


[edit] Material Naming Conventions

This information, for TS2009 onwards, is better covered in Material Types.


[edit] Specular Values Representation

The specular setting is controlled by the whiteness slider in 3DSMax (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.. Trainz 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 a "m.tbumptex" material (a normal mapped texture), the specular level is mapped by the normal map alpha channel. Thus you can have per-pixel control over specular lighting.


Previous Page . . . Next Page

[edit] Return to CCG Index

Content Creator's Guide

Personal tools