Game Development Community

during gameplay,how to change material of an specific part of player's shape?

by Ahsan Muzaheed · in Torque 3D Beginner · 02/16/2012 (10:58 am) · 3 replies

i want to change only player's face skin during game play?
i have read some old posts on that for t3d/tgea.
but each one looks different.
can anyone give me a specific link or direction,that works fine now?

i have seen this resource (T3D Networked Dynamic Skins and Materials Change)
"http://www.garagegames.com/community/resources/view/19623/".
but do not want to change source.


i have read material section of script manual.
but could not figure out any way.

will ShapeBase::setSkinName ( string name ) work?
how to set "string name"?

About the author

Torque 3D enthusiastic since 2010.Have been working in several T3D projects besides of Unreal Engine 4 and Unity 3D. NEED a hand with your project? SHoot me a mail. http://www.garagegames.com/community/forums /viewthread/138437/


#1
02/16/2012 (12:56 pm)
That will change the entire skin of the model, I believe. It is not designed to only change specific pieces of a texture.
#2
02/16/2012 (7:19 pm)
may be i was not able to clear what "specific" means to me?

here is a material datablock for gideon,it is mapped to head_d.
which will be textured with head_d.xxx [xxx=png/dds/....]

singleton Material( actor_gideon_head_material_dts )
{
mapTo = "head_d";
diffuseMap[0] = "head_d";
normalMap[0] = "head_n";
specularMap[0] = "head_s";
pixelSpecular[0] = true;
specular[0] = "0.99 0.91 0.81";
specularPower[0] = 16.0;
};


i want to change diffuseMap[0] head_d.xxx with anything else to get different gideon face.
may be it is clear now.

#3
02/16/2012 (7:41 pm)
to make it more clear here is a video: