View Full Version : Skinned meshes

10 October 2003, 04:15 PM

I've got 70 characters (so far) built for the game I'm working on at the moment these use one of three generic skeletons (small Medium or Large). We have just found out that all of these skeletons need their forearms lengthening to a greater or lesser extent.

I've written a tool to automate the lengthening process, by firstly scaling the relevant joints to the correct length, then duplicating the characters bodymesh. I then reset the skeletons scales back to 1 (the joints have to have scales of 1). I then duplicate the skeleton, translate the end joints on the arms to lengthen the arms to the correct length, then bind the duplicated mesh to this new skeleton and copy the weights from the old mesh to the new one.

This all works fine, but I've just realised that quite a few characters have ancillary pieces such as watches etc skinned to the skeleton whilst being seperate meshes. What I need to do therefore is find some way of picking all of the geometry which is skinned to our base skeleton on the chracter. However I'm screwed if I can work out how - heres where you guys come in - any ideas? Any help would save my ass!

10 October 2003, 07:23 PM
If you know the skinCluster, you can always do:
skinCluster -q -g $SKINCLUSTER;
Which will tell you all of the geometry for that skinCluster.


11 November 2003, 09:30 AM
Mattrne, I'm curious: how did this turn out for you? Did you learn anything that you care to share?

11 November 2003, 09:33 AM
Well, I've been away from it for a few days, but what I'm going to do is get the user to select all of the pieces of geometry manually, then use

string $selection[] = `ls -selection`;

to build a list of selected objects then do a for loop on each one, something along the lines of this;

for ($i = 0; $i <size ($selection); $i++)

select -r $selection[$i] ;
select -add Hips1 ;
newSkinCluster "-mi 3 -dr 8";



I'm pretty sure I'll need to tweak this a bit, but its basically the concept I'm going to go for...

CGTalk Moderation
01 January 2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.