Game Development Community

Bump mapping

by Rajot Eric · in Torque Game Engine Advanced · 11/07/2008 (4:54 pm) · 9 replies

Hello,
I have a little probleme with bump mapping,
He dont want work :s

The file =>
http://filebeam.com/2ba05d3a1b220ba1920acf9fde460c07

Thanks !

#1
11/07/2008 (6:28 pm)
Do you also have a materialMap.cs file ?
if not make one and add this to it below......save and make sure to exec it.

addMaterialMapping("arroway.de_tiles-24_d100", "material: arroway.de_tiles-24_d100");
#2
11/08/2008 (4:21 am)
Where i add this ? :o
Console ?
#3
11/08/2008 (9:19 am)
From what Ive found it takes two script files "materialMap.cs" and "material.cs"
you need to make sure the script executes somewhere init.cs seems to work

An example
material.cs

new Material(Material name here)
{
baseTex[0] = "Texture name here";
bumpTex[0] = "bump Texture name here";
pixelSpecular[0] = true;
specular[0] = "0.5 0.5 0.5 0.5";
specularPower[0] = 32.0;
};

materialMap.cs

addMaterialMapping("Texture name here", "material: Material name here");
#4
11/08/2008 (9:52 am)
Ive only ever used a material.cs file; put into the folder where my DTS, or DIF is with the material definition.
Ive never written a materialMap.cs for my textures to work.

Dave -
Can you explain your method, Searching the T3D demo I can find no instance of materialMap.cs
#5
11/08/2008 (10:59 am)
This seems like the place to ask this question:
When looking for textures I assume people generally grab any pre-made texture they can find.
Often it's just the PNG file.
I am wondering how important it is for Devs here to receive the Normal, Occlusion, Displacement, Specular files along with that PNG file ?.
#6
11/08/2008 (12:02 pm)
When i tried to make normal maps work like most here i looked over old docs and forum
posts/FAQ and the dev_network but how i found this looking over old fps kits the space ork setup
seemed to help me.

Surge
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5802
#7
11/09/2008 (11:02 am)
Thanks dave !
#8
12/29/2008 (11:33 pm)
Is this for DTS meshes exported from 3D Studiomax only???? I have read on this forum that Maya embeds info differently into DTS meshes then Max does. So my question is, will this method work for Maya generated DTS meshes as well?
#9
12/30/2008 (7:56 am)
Yes from Maya as well you need to add the texture type file extensions like .png .jpg Don't need to do this for the bump texture

new Material(Material name here)
{
baseTex[0] = "Texture.png";
bumpTex[0] = "bump Texture name here";
pixelSpecular[0] = true;
specular[0] = "0.5 0.5 0.5 0.5";
specularPower[0] = 32.0;
};