Need materials help
by Johnathan Moore · in Torque Game Engine Advanced · 10/29/2006 (11:18 am) · 5 replies
Hey, im having a problem with materials. I define my material and run the engine but it keeps appearing with the no material sign or the object completly dissapears and just leaves a shadow. The material diffinition is as follows.
the two files in the directry are SwampGrass01.dts & SwampGrass01.png
I dont know anything about the materials and cant find whats wrong on TDN so its probably simple.
thanks!
new Material(SwampGrass01)
{
mapTo = "SwampGrass01.png";
baseTex[0] = "~/data/shapes/terrain/SwampGrass01";
};the two files in the directry are SwampGrass01.dts & SwampGrass01.png
I dont know anything about the materials and cant find whats wrong on TDN so its probably simple.
thanks!
About the author
Been tinkering with this since I was young.
#2
but it still doesnt work
10/29/2006 (11:42 am)
It is from maya and i changed it to thisnew Material(SwampGrass01)
{
mapTo = "SwampGrass01.png";
baseTex[0] = "SwampGrass01.png";
};but it still doesnt work
#3
10/29/2006 (2:48 pm)
Try putting the materials.cs file in the same directory as the texture if you have no path specified.
#4
It is from maya
the files are
SwampGrass01.dts
SwampGrass01.png
The materials.cs is in the same folder
this is the material defenition
Edit:
OOOOOOOOOOOPS IT IS FROM MAX
11/26/2006 (5:36 am)
OK, I have the latest http download version of TSE with 1.5. But it doesnt workIt is from maya
the files are
SwampGrass01.dts
SwampGrass01.png
The materials.cs is in the same folder
this is the material defenition
new Material(SwampGrass01)
{
mapTo = "SwampGrass01.png";
baseTex[0] = "SwampGrass01.png";
pixelSpecular[0] = true;
specular[0] = "0.1 0.1 0.1 0.1";
specularPower[0] = "8.0";
};Edit:
OOOOOOOOOOOPS IT IS FROM MAX
#5
http://garagegames.com/mg/forums/result.thread.php?qt=53968
I think it was due to having multiple names for materials and objects. HTH
11/26/2006 (7:47 am)
I was having a similar problem with Blenderhttp://garagegames.com/mg/forums/result.thread.php?qt=53968
I think it was due to having multiple names for materials and objects. HTH
Torque Owner Sixth World Games Team
// where texture is MyMaterial.png and in the same folder as the DTS model new Material( MyMaterial ) { mapTo = MyMaterial; baseTex[0] = MyMaterial; };If you were exporting from Maya then it would look like this:
// where texture is MyMaterial.png and in the same folder as the DTS model new Material( MyMaterial ) { mapTo = "MyMaterial.png"; baseTex = "MyMaterial.png"; };There is also this TDN post which explains materials in detail. Hope that helps.