Shader HELP ....please....
by GI_JOEJK · in Technical Issues · 08/26/2008 (6:22 pm) · 1 replies
Can someone please tell me what code to use for a simple material.cs? I have tried to find it on this site but there seems to be a lot of different versions that people have made up for themselves.
This is not working for me... Please correct.
Texture names are;
greenhat_D
greenhat_N
greenhat_S
***********************************************************************
new Material(examplename)
{
mapTo = "examplename.jpg";
texture[0] = "examplename"; //the diffuse file is examplename.jpg
texture[1] = "examplename_NRM"; //the normal map is examplename_NRM.jpg
texture[2] = "examplename_SPEC"; //the specular map is examplename_SPEC.jpg
version = 2.0;
shader = SpecMap;
};
***********************************************************************
I also need to know how to implement the Specular image into the Diffuse texture, and what version of the Super-PNG Plugin to use. I currently am using the old one, and its creating an Alpha channel in the image which is being read by Torque as a transparency, and not as Specular....
I have also seen people use .Jpg textures that seemed to have the Specular in them. I thought that the .Jpg format could not support this...????
Many thanks!
This is not working for me... Please correct.
Texture names are;
greenhat_D
greenhat_N
greenhat_S
***********************************************************************
new Material(examplename)
{
mapTo = "examplename.jpg";
texture[0] = "examplename"; //the diffuse file is examplename.jpg
texture[1] = "examplename_NRM"; //the normal map is examplename_NRM.jpg
texture[2] = "examplename_SPEC"; //the specular map is examplename_SPEC.jpg
version = 2.0;
shader = SpecMap;
};
***********************************************************************
I also need to know how to implement the Specular image into the Diffuse texture, and what version of the Super-PNG Plugin to use. I currently am using the old one, and its creating an Alpha channel in the image which is being read by Torque as a transparency, and not as Specular....
I have also seen people use .Jpg textures that seemed to have the Specular in them. I thought that the .Jpg format could not support this...????
Many thanks!
About the author
Torque Owner Surge
MDNAMEDIA
--------------------
new Material(what_ever)
{
mapTo = "what_ever";
baseTex[0] = "what_ever";
bumpTex[0] = "what_ever_Bump";
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 22;
};
--------------------------
Most important to call your mapTo = "" whatever you called the exact material ""
I dont use TGA i use JPEG and PNG.
-My two Cents