Assigning Materials to Textures (Bumpmapping)
by dsfsd · in Torque Game Engine Advanced · 06/03/2004 (2:38 pm) · 4 replies
Ok, real quick question:
How does TSE figure out which texture is the normal map assigned to a certain texture, etc?
In MaterialMap.cs I see this:
Now after looking in /interiors/test/ I see textures with the same names, i.e. wall_light.png with a wall_light_bump.png and so forth.
Does TSE assume that the texture with an extension "_bump" is the normal map? So say I create mytexture.png as my texture and create a normal map and save it as mytexture_bump.png and add the material mapping addMaterialMapping("mytexture", "material: mytexture"); ...then will TSE assume that mytexture_bump.png is the normal map? It looks like it's referring to a list of materials in the materialmapping ("material: wall_light") for example, but I can't find that list of materials...any ideas? I'm assuming maybe that's where these things such as normal maps or glow maps are defined?
How does TSE figure out which texture is the normal map assigned to a certain texture, etc?
In MaterialMap.cs I see this:
//---------------------------------------------------------------------------
// Interior materials
//---------------------------------------------------------------------------
//Alex's Textures
addMaterialMapping("wall_light", "material: wall_light");
addMaterialMapping("plating", "material: plating");
addMaterialMapping("t2plate", "material: t2plate");
addMaterialMapping("solidmetal", "material: solidmetal");
addMaterialMapping("solidrust", "material: solidrust");
addMaterialMapping("concrete", "material: concrete");
addMaterialMapping("ggsolidmetal", "material: ggsolidmetal");
addMaterialMapping("solidmetal_lights", "material: solidmetal_lights");
addMaterialMapping("metalgrate", "material: metalgrate");
addMaterialMapping("wall", "material: wall");
addMaterialMapping("wall_flat", "material: wall_flat");
addMaterialMapping("aquagrad", "material: aquagrad");
addMaterialMapping("corridor_trim", "material: corridor_trim");Now after looking in /interiors/test/ I see textures with the same names, i.e. wall_light.png with a wall_light_bump.png and so forth.
Does TSE assume that the texture with an extension "_bump" is the normal map? So say I create mytexture.png as my texture and create a normal map and save it as mytexture_bump.png and add the material mapping addMaterialMapping("mytexture", "material: mytexture"); ...then will TSE assume that mytexture_bump.png is the normal map? It looks like it's referring to a list of materials in the materialmapping ("material: wall_light") for example, but I can't find that list of materials...any ideas? I'm assuming maybe that's where these things such as normal maps or glow maps are defined?
About the author
#2
06/03/2004 (3:23 pm)
Material.cs? Im at uni now, but I think thats where I saw it...
#3
06/03/2004 (5:07 pm)
AH your right, I don't know how I overlooked that somehow. Thanks. :)
#4
The material mappings basically "replace" a texture on an interior or model with a material. The name specified as the material is that of a material block in materials.cs. The manual should adequately explain this. If not, let us know where it failed and we'll revise it.
06/04/2004 (9:40 am)
Ok, it's very simple.The material mappings basically "replace" a texture on an interior or model with a material. The name specified as the material is that of a material block in materials.cs. The manual should adequately explain this. If not, let us know where it failed and we'll revise it.
Torque 3D Owner dsfsd