Game Development Community

How to Use CustomMaterial??

by Mquaker · in Torque Game Engine Advanced · 02/10/2009 (4:17 pm) · 4 replies

i want apply multi-pass material to my character dts.
but did not apply material.
i don't understand custommaterial..

this my original material code.
new Material(test_mat)
{
   mapto = "test_mat";
   baseTex[0] = "test_mat";
   specular = "1.0 1.0 1.0 1.0";
   specularPower = 16.0;
   version = 2.0;   
};

and i changed material to custommaterial code.
new CustomMaterial(test_mat)
{
   mapto = "test_mat";
   texture[0] = "test_mat";
   texture[1] = "$reflectbuff";
   texture[2] = "$backbuff";
   texture[3] = "$fog";
   //texture[4] = "$cubemap";
   shader = Reflect;
   specular = "0.75 0.75 0.75 1.0";
   specularPower = 48.0;
   version = 2.0;   
};

what's wrong?

i need some help.. thanks.

#1
02/10/2009 (4:57 pm)
specularPower = 48.0;
Try changing that to a power of 2 (1,2,4,8,16,32,64)

#2
02/11/2009 (12:43 am)
thanks Steve..

But i have problem, yet..

i need help...
#3
02/26/2009 (8:20 pm)
http://tdn.garagegames.com/wiki/TSE/Getting_Started/Materials

#4
02/26/2009 (11:31 pm)
Thanks.
I already found.

some hlsl shader can apply dif object.

ex) relief, parallax.....

how to apply this shader to dts shape???