Apply a simple shader on a DTS model
by Cai Yundong · in Torque Game Engine Advanced · 10/21/2008 (11:37 pm) · 1 replies
Hi guys,
Okay, I am totally newbie. Currently I need to make a new material + shader and apply the material on a DTS model ( I named it as TSStatic(XYZ) ). Here is my Materials.cs :
========================================
new CustomMaterial(XYZ)
{
texture[0] = "VolcanoMap";
shader = Volcanoshader;
version = 3.0;
};
========================================
---> Alright and here is the error:
namespace:unlinkClass - cannot unlink namespace parent linkage for XYZ for CustomMaterial
Error: cannot change namespace parent linkage of XYZ from CustomMaterial to TSStatic
Guys please help !!! Great if any1 can give link to some tutorial about this ????
Okay, I am totally newbie. Currently I need to make a new material + shader and apply the material on a DTS model ( I named it as TSStatic(XYZ) ). Here is my Materials.cs :
========================================
new CustomMaterial(XYZ)
{
texture[0] = "VolcanoMap";
shader = Volcanoshader;
version = 3.0;
};
========================================
---> Alright and here is the error:
namespace:unlinkClass - cannot unlink namespace parent linkage for XYZ for CustomMaterial
Error: cannot change namespace parent linkage of XYZ from CustomMaterial to TSStatic
Guys please help !!! Great if any1 can give link to some tutorial about this ????
About the author
Torque Owner Andy Rollins
ZDay Game
For example:
You're DTS object stays being called XYZ and inside that DTS model I'm guessing you defined a number of textures to be used? including one called VolcanoMap by looking at your material definition? If so you'd define it like this
new CustomMaterial( [b]Any_Unique_name_goes_here[/b]) { [b]mapTo = "VolcanoMap";[/b] texture[0] = "VolcanoMap"; shader = Volcanoshader; version = 3.0; };The MapTo command explicity telsl TGEA that this material should be used when looking for the VolcanoMap texture.
Hope that helps