Contents |
NormalTexture is a normal perturbation texture, a bump mapping texture, also known as Dot3 bump mapping. NormalTexture creates bump from sub-texture whose color range matches the normal map definition. The source for the normals in normal mapping is usually a multichannel image (x, y and z channels) derived from a set of more detailed versions of the objects. The values of each channel usually represent the xyz coordinates of the normal in the point corresponding to that texel.
NormalTexture has 2 textures as dependencies, normal_map and bump_map.
NormalTexture can be created and applied from the Control Panel Materials Page.
The SceneEngine factory NormalTexture creates a new NormalTexture that can be linked to a material:
normals_bitmap_texture = sceng.BitmapTexture( { file_path="skull_normals.tga" } ) normal_texture = sceng.NormalTexture( { normal_texture=normals_bitmap_texture } ) shader_material = sceng.ShaderMaterial( { diffuse_color=gmt.Color(1,0,1), diffuse_texture=normal_texture, bump_texture=normal_texture } )
NormalTexture is implemented in the ScEngMaterials project, and is part of SceneEngine's core libraries.
Add options to define the space (tangent or local) and the normal definition (green up, ...)