Game Development Community

Materials questions.

by Vincent BILLET · in Torque 3D Professional · 12/19/2009 (5:11 pm) · 4 replies

There is a lot of thing, here, about material instances. It's a little confusing due to different versions of TGE / TGEA / T3D and the leak of efficiency of new GG search engine.
Let's plot :
I Have 2 orcs, 2 elves. The 2 orcs and the 2 elves uses the same meshes respectively, but not the same materials. The primary question is really simple : How can I change the material of each character in the scene?

I have seen a resource to change TSStatic individually. But this is not usable for T3D.
I have seen a resource to change meshes materials. But this is not usable to change individual orcs or elves.
I have seen a new button in T3D 1.1 alpha which suggest that we can clone materials like nodes. But it doesn't work.

Which is the best method, if any?
Does GG plan to develop a "per instance material" usable by script ?
Has anybody achieved a successful character customisation with T3D ?

#1
12/19/2009 (5:53 pm)
There is a method changeMaterial() in shapeBase,but i have not tested if it works..
#2
12/19/2009 (6:20 pm)
After reeading ShapeBase.cpp, this method seems to fit (not tested yet). But the following line of comment afraids me :
// Warning, right now this only sort of works. It doesn't do a live update like it should.

I'm going to take some hours to test this apparently undocumented method. Thanks for the reply.
#3
01/27/2010 (12:42 pm)
I'm removing the comment from the repository. The comment has lived on; but the functionality should work properly for the Material Editor's changeMaterial function.

However, this function should is not/is not meant be a per instance change. The changes should resonate with all of the shapes in the scene.

If it does not work this way, then it is a bug
#4
01/27/2010 (2:52 pm)
Thank's a lot Ivan... ChangeMaterial works properly with T3D 1.01.

@Steven : Comments are comments :)