Game Development Community

Normal Maps / Relief Maps

by Diogo Rios · in Torque Game Engine Advanced · 09/05/2008 (5:53 am) · 3 replies

Yeah, that was what i was thinking. i cant see what im doing wrong here, have you tried something similar or had any kind of problems like these?

#1
09/05/2008 (5:53 am)
tdn.garagegames.com/wiki/TSE/Materials/Mapping_Materials_to_Textures

The "MapTo" specifies what the material is mapped to - in this case, there is a texture named stonewall_d in the dif that this is being applied to. There is more information here, though some of it is out of date:

tdn.garagegames.com/wiki/TSE/Getting_Started/Materials
#2
09/05/2008 (6:57 am)
I don't use it that way -- I always name my materials the same as the texture and then no mapping is needed. I haven't gotten crazy with materials though, so ymmv.
#3
09/18/2008 (8:46 am)
The engine maps Materials to objects by the use of the "mapTo" field and the baseText field. Mapping has nothing to do with the Name of the Material.

There doesn't seem to be anything wrong with your code but I think you got bit by a nasty hidden "gotcha." I just looked at stock TGEA 1.7.1 and it appears that interiors/propertyMap.cs is never actually loaded. There is an exec call to it from data/init.cs, but data/init.cs is never loaded.

Try sticking your two Material definitions in the materials.cs file in the interiors folder instead. Make sure that you have put the textures for that cube where the Materials are pointing to:
basetex[0] = "~/data/interiors/stonewall_d";
bumpTex[0] = "~/data/interiors/stonewall_n";

If you put those textures somewhere different (like in a cube folder or something) then you'll need to change the paths.