Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 5 (modified by wiesep, 5 years ago) (diff)

Bump Mapping

To get detailed information about how to create a model with a bump map in blender and import it to Orxonox, take a look at tools/BlenderBumpMapTutorial.

To use a bump map in a material, you can create a new material script inheriting from the base bump map script. Replace both texture image files with your own files.

import * from "BumpMap.material"
// Any number of lights, diffuse
material Cube_Lava_Normal : BumpMap_Base
{
    technique
    {
        pass ambient
        {
        }
        // Now do the lighting pass
        // NB we don't do decal texture here because this is repeated per light
        pass perlight
        {
            // Base bump map
            texture_unit normalmap
            {
                texture Cube_Lava_NORM.jpg
                colour_op replace
            }
        }

        // Decal pass
        pass decal
        {
            texture_unit decalmap
            {
                texture Cube_Lava_COLOR.jpg
            }
        }
    }
}

The base bump map material script is located at [media_directory]/materials/BumpMapping/BumpMap.material

To get an idea what bump maps are capable of, start the test level BumpMap

Important Notes

During the implementation of the bump map functionality the problem of flickering flickering occurred.

Screenshot

New File L: Bump map only, M: Bump map with texture, R: Normal texture

Attachments (3)

Download all attachments as: .zip