PDA

View Full Version : Jiggle deformer


xzof
04-30-2008, 11:18 AM
Hello, is there any equivalent of the "Jiggle" of Maya in XSI ? Or is it only by soft bodies ?

Cheers.

SebasProulx
04-30-2008, 02:27 PM
You might want to try Quick Stretch ...

xzof
04-30-2008, 06:31 PM
Yeah, it's pretty easy and adjustable. One more time, Xsi is more powerful than maya ! (Not a troll but my opinion :-D)

3DQUAKERS
05-08-2008, 04:42 AM
Quickstretch does not provide "jiggling", although with some workarounds you can get decent results.

I will be releasing a new bone dynamics plugin soon, part of a training DVD series. Here is a small sample:3DQUAKERS Dynamic Bones (http://submodel.com/demos/dynamic_Bones.mov) (right-click & Save As)

xzof
05-08-2008, 05:13 AM
Oh it's really cool ! Looks like jelly !

Toonafish
05-12-2008, 06:41 AM
Check out Helge Mathee's alternative tail spring opp: http://www.xsi-blog.com/archives/259

vince
05-15-2008, 04:09 AM
here is something i wrote some time ago

just use it on low-poly objekts!!!!!!

makes a duplicate of the selected mesh an pins it on every point by a spring operator

ceck it out :)

cheers,
vince


ActivateObjectSelTool(null);

var sObj = selection(0);

if (!Dictionary.GetObject(sObj.Name+"_SpringCacheSource",false))
{
sObj.Model.AddActionSource(sObj.Name+"_SpringCacheSource");
}


if (!Dictionary.GetObject(sObj.Name+"_SpringOverallControl",false))
{
var cProperty = sObj.Model.AddCustomProperty();
cProperty.Name=sObj.Name+"_SpringOverallControl";

SIAddCustomParameter(cProperty.FullName, "mute", siBool, 0, 0, 1, null, 5, 0, 1, null, null);
SIAddCustomParameter(cProperty.FullName, "inner_Stiffness", siDouble, 100, 0.001, 1000, null, 5, null, 1000, null, null);
SIAddCustomParameter(cProperty.FullName, "outer_Stiffness", siDouble, 10, 0.001, 1000, null, 5, null, 1000, null, null);
SIAddCustomParameter(cProperty.FullName, "Falloff", siDouble, 0.1, 0, 1, null, 5, null, 1000, null, null);
SIAddCustomParameter(cProperty.FullName, "Damping", siDouble, 25, 0.001, 1000, null, 5, null, 1000, null, null);
}
//__________________MAKE_Control_Shpere_____________ __

var vba = new VBArray( sObj.ActivePrimitive.Geometry.GetBoundingSphere() ) ;
var jsa = vba.toArray() ;

var cSphere = GetPrim("Sphere", null, null, null);
CopyPaste(cSphere,null,sObj, 1);


cSphere.Name="StiffnessSphere";
cSphere.Kinematics.Local.Parameters("posx").value = jsa[0];
cSphere.Kinematics.Local.Parameters("posy").value = jsa[1];
cSphere.Kinematics.Local.Parameters("posz").value = jsa[2];
cSphere.radius.value = jsa[3];


var cSphereControl = cSphere.AddCustomProperty();

cSphereControl.Name="ControlParameters";

CopyPaste(cSphere+".sphere.radius", null, cProperty, 3);

//__________________

var newObj = Duplicate(sObj, null, 0, 1, 1, 0, 1, 1, 0, 1, null, null, null, null, null, null, null, null, null, null, 0);
SetValue(newObj+".Name", sObj.Name+"_follow_mesh", null);

var sPoints = sObj.activeprimitive.geometry.points;
var newGroup = CreateGroup(sObj+"_Control_Nulls", null, null);
for (i=0;i<sPoints.count;i++)
{
newNull = GetPrim("Null", "O2C_null", null, null);
SetValue(newNull+".null.size", 0.1, null);
ApplyCns("ObjectToCluster", newNull, sObj+".pnt["+i+"]", null);
SetValue(newNull+".kine.objclscns.upvct_active", true, null);
SetValue(newNull+".kine.objclscns.tangent", true, null);
CopyPaste(newNull, null, sObj, 1);
AddToGroup(newGroup,newNull);

CreateClusterCenterWithNull(newObj+".pnt["+i+"]", 0);
followNull = selection(0);
SetValue(followNull+".null.size", 0.1, null);
SetValue(followNull+".null.primary_icon", 4, null);


ApplySpringOp(followNull+","+newNull, null, null, null, "Sources.Animation."+sObj.Model+"."+sObj.Name+"_SpringCacheSource", null);

CopyPaste(sObj.FullName+"_SpringOverallControl.mute", null, followNull.FullName+".kine.global.Spring.Mute", 1);
SetExpr(followNull.FullName+".kine.global.Spring.LinearStiffness", "cond( ctr_dist( "+cSphere.fullname+"., "+followNull.FullName+". ) > "+cSphere.fullname+".sphere.radius, "+cProperty+".outer_Stiffness, ( cond( ( ( "+cSphere.fullname+".sphere.radius - ctr_dist( "+cSphere.fullname+"., "+followNull.FullName+". ) ) / "+cProperty+".Falloff ) < "+cProperty+".inner_Stiffness, ( ("+cSphere.fullname+".sphere.radius - ctr_dist( "+cSphere+"., "+followNull.FullName+". ) ) / "+cProperty+".Falloff)+"+cProperty+".outer_Stiffness, "+cProperty+".inner_Stiffness +"+cProperty+".outer_Stiffness) ) )", null);
CopyPaste(sObj.FullName+"_SpringOverallControl.Damping", null, followNull.FullName+".kine.global.Spring.LinearDamping", 1);

}
RemoveFromGroup(null, newObj);

Simon Pickard
05-15-2008, 05:27 AM
" Yeah, it's pretty easy and adjustable. One more time, Xsi is more powerful than maya ! (Not a troll but my opinion :-D)"

Have you used Jiggle in Maya?


Regards,
Simon

vince
05-15-2008, 04:11 PM
thanks - i saw the maya jiggle on a presentation and i wanted to have something similar in xsi - i am sure it will be much easier to achieve in the upcoming xsi version :)

csaez
05-20-2008, 03:53 AM
Or just use softconstraints, are not physically correct but can do the job really well :)

wailingmonkey
05-21-2008, 03:40 PM
Hi vince...thanks very much for sharing that! As an animation newbie, is there
any chance you could go over some tips to best utilize your script in combination
with a character (belly jiggle, for instance)?