Game Development Community

Adding Bump Mapping

by Roshan Kuriyan · in Torque Game Engine Advanced · 05/25/2006 (1:25 am) · 3 replies

Hai
i am trying to apply bump texture to a building.dif in my mission.
i have both base texture and bump texture.
and in my materials.cs file i ve written

new Material(solidmetal)
{
baseTex[0] = "256_BrickA.png";
bumpTex[0] = "256_BrickA_bump.png";

pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 0.1";
specularPower[0] = 32.0;
};

i ve placed the materials.cs file in same same path where my building.dif resides.
Then how should i proceed to get my building bump textured?
could anyone help me?
thanks in advance

Roshan

#1
05/25/2006 (7:26 am)
You need to add mapto="whatever the name was called in your map editor for that texture";

so if you used 256_BrickA then add


new Material(solidmetal)
{
mapto = "256_BrickA";

baseTex[0] = "256_BrickA.png";
bumpTex[0] = "256_BrickA_bump.png";

pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 0.1";
specularPower[0] = 32.0;
};
#2
05/25/2006 (11:47 am)
I dont think you have to add mapTo if the material.cs file is in the same folder as the textures.
#3
05/25/2006 (7:13 pm)
Andrew thats really great

i ve added
mapto = "256_BrickA";

and my building Shines with Bump

Thanks a lot

Roshan