How to Changing Skin on a Model?
by foribiteu · in Torque 3D Professional · 04/05/2011 (8:34 pm) · 7 replies
OK this has to be something so simple and I am missing it. I have bought some mobs from different places. But the issue is I can not find a easy way to change the skin on a few models and not all. If I am stuck on this their are probability others. This has to be simple and I have looked in the forum and not found any thing that worked (then I could be doing it wrong to). What I am hopping for is a simple how to that does not require source code changes that any one can follow. I know that I can make dts files for each but I am hoping not to have to. Think of it as a challenge. lol OK lets take an example:
In art/shapes/players/skeleton
I have a skeleton that has jpg files of:
base.body.jpg
2.body.jpg
3.body.jpg
4.body.jpg
5.body.jpg
6.body.jpg
7.body.jpg
8.body.jpg
It has one dts fie and cs file.
skeleton.dts
skeleton01.cs
In the art/datablocks/players I also have a cs file.
skeleton01.cs
In the object editor for the dts in the Material tab it has base.body and I can not add, rename or del it.
What I would like to do is have a cs file for each skin type such as:
skeleton01a.cs for base.body.jpg
skeleton01b.cs for 2.body.jpg
skeleton01c.cs for 3.body.jpg
etc...
I have tried many things how ever I end up changing all of them or with no materials.
In art/shapes/players/skeleton
I have a skeleton that has jpg files of:
base.body.jpg
2.body.jpg
3.body.jpg
4.body.jpg
5.body.jpg
6.body.jpg
7.body.jpg
8.body.jpg
It has one dts fie and cs file.
skeleton.dts
skeleton01.cs
In the art/datablocks/players I also have a cs file.
skeleton01.cs
In the object editor for the dts in the Material tab it has base.body and I can not add, rename or del it.
What I would like to do is have a cs file for each skin type such as:
skeleton01a.cs for base.body.jpg
skeleton01b.cs for 2.body.jpg
skeleton01c.cs for 3.body.jpg
etc...
I have tried many things how ever I end up changing all of them or with no materials.
About the author
This is our current game -> tectuma.com
#2
11/28/2011 (2:21 pm)
setMeshHidden("meshName",true); ... is supposed to do the trick and be part of T3D 1.2 now
#3
player.cs
after line 44, I inserted this as line 45:
When I enter the mission, and look in 3rd Person!!! I see this:

In this image; you can NOT see the body mesh of the soldier, but do see the gun he is holding and the 'dazzle' geometry just inside the tire...kinda glowy.
There are 2 functions: onLoad in TSShapeConstructor that assembles the shapes for memory loading, and then the onAdd associated with the nameSpace.
Hope this helps demonstrate that the functionality is indeed in stock T3D!!
11/28/2011 (3:16 pm)
Okay, I just tried this with vanilla T3D Pro 1.2...it works.player.cs
after line 44, I inserted this as line 45:
%obj.setMeshHidden("soldier_LOD", true);When I enter the mission, and look in 3rd Person!!! I see this:

In this image; you can NOT see the body mesh of the soldier, but do see the gun he is holding and the 'dazzle' geometry just inside the tire...kinda glowy.
There are 2 functions: onLoad in TSShapeConstructor that assembles the shapes for memory loading, and then the onAdd associated with the nameSpace.
Hope this helps demonstrate that the functionality is indeed in stock T3D!!
#4
11/28/2011 (4:18 pm)
Also check out the offical docs on Material mapping and skinning in T3D (note that some features are new to T3D 1.2).
#5
It's all so easy now ... huzzar!
11/28/2011 (4:47 pm)
From (art)player.csQuote:
// available skins (see materials.cs in model folder)
availableSkins = "base DarkBlue DarkGreen LightGreen Orange Red Teal Violet Yellow";
%skin = "orange"; %playerName_or_ID.setSkinName(%skin);
It's all so easy now ... huzzar!
#6
11/30/2011 (1:18 pm)
As long as you have a skin named "orange" - lol
#7
11/30/2011 (2:17 pm)
<replied to wrong thread>
Torque Owner Jeff Yaskus
jy games
source:
www.garagegames.com/community/forums/viewthread/120875
no source:
www.garagegames.com/community/blogs/view/20935