Game Development Community

How to import the normal maps onto .DIF object via cs files?

by PJjerry · in Torque Game Engine Advanced · 01/22/2006 (7:48 am) · 3 replies

I successfully made the test here

Actually there are two further questions:

(1) I successfully generated the low-poly normal mapped object, looks good. But...
How do I export to a .DIF file?

(2) How do I load the .DIF file from .CS file?

I read the .CS files under the tse\example\demo\data\shapes\spaceOrc
and it just simply loaded the .DIF file without specifying any texture maps, so sounds like the secret is hidden
in exporting the .DIF file.

Thanks in advance!!

#1
01/23/2006 (6:14 pm)
Any suggestion?
#2
01/24/2006 (9:46 am)
1) For a DIF you need to use Quark, Cshop, or whatever you chose for a DIF mapping tool. You can learn about DIF over here.

Another option is to export it as a DTS shape. First Download and Install the Exporter then Create and Export a Simple Shape.

2) You don't technically load the DIF from a CS file. You use the mission editor to place the DIF/DTS into your mission. See World Building.
#3
02/07/2006 (8:50 am)
Thanks for the reply!

Finally I found what I wanted, the secret was written in the file 'materials.cs' under
example\demo\data\interiors\test

new Material(solidmetal)
{
   baseTex[0] = "solidmetal";
   bumpTex[0] = "solidmetal_bump";

   pixelSpecular[0] = true;
   specular[0] = "1.0 1.0 1.0 0.1";
   specularPower[0] = 32.0;
};

the solidmetal_bump is exactly the normal map I mentioned.

Another quick question is is the .png format used for the default format of texture?
'cuz I didn't see any .png written in the definiton above, and all the texture formats in the test folder are all in png format.