Re: fixing normalised envelope weights.

Date : Mon, 2 Oct 2006 15:04:08 +0200
To : XSI(at)Softimage.COM
From : "guillaume laforge" <guillaume.laforge.3d(at)gmail.com>
Subject : Re: fixing normalised envelope weights.
>Thanks for the script, unfortunately my character is a bit wierd and as such is asymetrical,

I can't find more time at the moment than a simple copy/past of the symetrize command with a loop on points. A true "normalized weight" function doesn't look to complicate, I will try to write something soon if nothing is already available on the web ( I think a script already exist but I'm not sure...).

Cheers

Guillaume


On 10/2/06, Matt Lowery <matt(at)3dcharacter.co.za> wrote:
Hey Guillaume,
 
Thanks for the script, unfortunately my character is a bit wierd and as such is asymetrical, I did try running it on an old character and got this error:
 
Disabling a souce operator is denied
 
But it does seem to have helped so...Thanks again,
m(at)


From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of guillaume laforge
Sent: 02 October 2006 11:38 AM
To: XSI(at)Softimage.COM
Subject: Re: fixing normalised envelope weights.

Of course it is only a workaround for symmetrical object...

On 10/2/06, guillaume laforge <guillaume.laforge.3d(at)gmail.com > wrote:
A quick and dirty script.
Select your object and run ! It symmetrize the weight from x positive side. As this command normalize the weights it then re symmetrize from the x negative side.
Tell me if it works for you.

var oPenguin = Selection.item(0);
var osymTemplate = CreateSymmetryMappingTemplate(oPenguin, true, 0, true);

var oGeometry = oPenguin.activeprimitive.geometry;
var oPoints = oGeometry.Points;

var oHalfPointsPlus = new Array();
var oIncr = 0
oEnum = new Enumerator( oPoints ) ;
for (;!oEnum.atEnd();oEnum.moveNext() )
{
    var oPos = oEnum.item ().position;
    if(oPos.x >= 0)
    {
        oHalfPointsPlus[oIncr] = oEnum.item().index;
        oIncr = oIncr+1;
    }
}
SymEnvWeight(null, oPenguin+".pnt["+oHalfPointsPlus.toString()+"]", osymTemplate, 0);

var oHalfPointsMinus = new Array();
var oIncr = 0
oEnum = new Enumerator( oPoints ) ;
for (;!oEnum.atEnd();oEnum.moveNext() )
{
    var oPos = oEnum.item().position;
    if(oPos.x <= 0)
    {
        oHalfPointsMinus[oIncr] = oEnum.item().index;
        oIncr = oIncr+1;
    }
}
SymEnvWeight(null, oPenguin+".pnt["+oHalfPointsMinus.toString()+"]", osymTemplate, 0);


Cheers
--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/


On 10/2/06, Matt Lowery <matt(at)3dcharacter.co.za> wrote:
Hey gang,
 
this is something that has been bothering me for a while now, how can I fix points that don't have a combined envelope weight of 100 %? I ran the script that Homam Bahnassi wrote for checking weights (cool tool)... problem is that it ends up tagging almost all the points on my charaters head. Now usually I would forge ahead and fix the weighting by hand, but this must be a comon problem so I thought I'd ask if anyone out there had a trick ( read script) up their sleeve for dealing with this annoying problem?
 
m(at)
 
 

 


--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.6/453 - Release Date: 20/09/2006







--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/

--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.6/453 - Release Date: 20/09/2006


--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.6/453 - Release Date: 20/09/2006




--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.