Simple assignment
by Spencer Alexander · in Torque Game Engine Advanced · 06/19/2006 (11:54 pm) · 3 replies
Okay, I've seen this tackled multiple times on other threads, but it still doesn't work for me.
I just want to test normal mapping.
I had a material called "face" in maya that was assigned to my object called head.
I load the staticShape using the World Editor Creator within the starter.fps demo after launching tse.
The material in maya has 2 maps, a diffuse color called diffuseColor.png and a bump map called sampledNormals.png.
The bump map is a normal map just assigned as a bump to the maya material.
The normal map does not show up in TSE.
So, I made a material.cs file in the same directory as my dts and images.
...data/shapes/head/materials.cs
I called the material the same name as in maya "face".
I see from other threads that you have to include the .png if you exported your dts from maya.
Tried it with and without.
The object still gets the same material in tse that it had before the material.cs was created.
No normal map, just a diffuse flat looking textured material.
I also tried putting the following commands(separately) at the end of the materials.cs to no evail.
addMaterialMapping();
reloadMaterials();
There was mention of a materialsMap.cs, which must be old, because I don't have such a file in my
demo/data/ directory.
I'm not seeing errors in the console either, and no materials.cs.dso is showing up in the directory, so I don't think it's even trying to compile it.
Here's my material.cs
Is there something else I need to do to get it assigned.
new Material(face)
{
baseTex[0] = "diffuseColor.png";
bumpTex[0] = "sampledNormals.png";
}
I just want to test normal mapping.
I had a material called "face" in maya that was assigned to my object called head.
I load the staticShape using the World Editor Creator within the starter.fps demo after launching tse.
The material in maya has 2 maps, a diffuse color called diffuseColor.png and a bump map called sampledNormals.png.
The bump map is a normal map just assigned as a bump to the maya material.
The normal map does not show up in TSE.
So, I made a material.cs file in the same directory as my dts and images.
...data/shapes/head/materials.cs
I called the material the same name as in maya "face".
I see from other threads that you have to include the .png if you exported your dts from maya.
Tried it with and without.
The object still gets the same material in tse that it had before the material.cs was created.
No normal map, just a diffuse flat looking textured material.
I also tried putting the following commands(separately) at the end of the materials.cs to no evail.
addMaterialMapping();
reloadMaterials();
There was mention of a materialsMap.cs, which must be old, because I don't have such a file in my
demo/data/ directory.
I'm not seeing errors in the console either, and no materials.cs.dso is showing up in the directory, so I don't think it's even trying to compile it.
Here's my material.cs
Is there something else I need to do to get it assigned.
new Material(face)
{
baseTex[0] = "diffuseColor.png";
bumpTex[0] = "sampledNormals.png";
}
About the author
Torque Owner Kevin Johnson
new Material(face)
{
baseTex[0] = "diffuseColor";
bumpTex[0] = "sampledNormals";
mapTo = "diffuseColor" ;
}