Game Development Community

No material for DTS...?

by Chan Chi Kit · in Torque Game Engine Advanced · 09/24/2006 (11:30 am) · 2 replies

I export my model with no problem in 3DS Max. When I add the model to TSE, there is no texture for the dts (only "no material" shown on the dts).

But, the dts does include texture in ShowTool and TGE.

How can I add texture to dts in TSE...?

Please help... thanks ~~

#1
09/24/2006 (1:57 pm)
You need to make a material for it. Make a file called Material.cs in the directory of the DTS model and make it look something like this:

new Material(ComeUpWithMaterialName)
{
baseTex[0] = "texturemapname";
};

That will make it render a stock material with your texture. The documentation on TDN gives more details on other material options.
#2
09/27/2006 (10:50 pm)
Make sure you actually map the material to a texture:

new Material(materialName)
{
mapTo = myTexture;
baseTex[0] = "myTexture";
};

Also, maya and max export differently. If you export from max, then the above syntax should be fine. If you export from maya then you may have to use the texture extension (ie *.jpg) when you map the texture.