Game Development Community

how do you exec materials.cs of an object

by Tarkna Johnson · in Torque Game Engine Advanced · 05/13/2009 (11:33 am) · 5 replies

I just recently messed around with TGEA, and notice that the their example station had a materials.cs. I was wondering were did they put/or should put the exec code for it. So I can do same thing with my models. Plus will I need any special program to export from Max to work with a materials.cs?

#1
05/13/2009 (12:01 pm)
TGEA material files get auto-read. It's best to have the material.cs in the same folder as the textures they are related to. Nothing fancy required, you can just type the info in. You can have multiple material.cs files in seperate folders, but don't put them in folders lower than each other.
#2
05/13/2009 (12:19 pm)
Just make sure you have a materials.cs in the same directory/folder as your shape and it's textures -- it's automatic. Of course you have to write the materials.csyourself.
#3
05/13/2009 (12:22 pm)
And Steve beat me too it! Must remember to hit refresh before posting

About the 3d Studio Max question: not sure that I understand what you mean. I don't use Max, but so long as you use the proper DTS exporter and your material definitions are correct in the materials.cs file then you should be good to go.
#4
05/13/2009 (1:01 pm)
thank for the information
#5
01/31/2010 (7:56 pm)
@Steve - I'm having all kinds of weird problems as I bring new model packs into my game and am wondering what exactly you mean by:

"but don't put them in folders lower than each other."

I'm using T3D 1.1a btw, any difference here?