RE: How do we achieve this in XSI?

Date : Fri, 24 Feb 2006 09:42:04 +0000
To : XSI(at)Softimage.COM
From : "brad" <brad(at)cg-soup.com>
Subject : RE: How do we achieve this in XSI?
I think the lattice technique is the way to go, as long as you set things up properly, which might not be obvious. Here are the steps:

1- Make sure nothing is selected in the scene, and Get>Primitive>Lattice. The lattice PPG should pop open.
2- Set the lattice Pre-Deformed Size parameters to scale your lattice down. Scaling its center or directly scaling the lattice points will ruin the effect.
3. Set the Subdivision to at least 5 on the X,Y,Z. Any deforming must be done using the points at the core of the lattice. We are going to need at least 2-rows of undisturbed points at the outside of the lattice. This will allow the deformation effect to taper away to nothing
4- Select the geometry you wish to deform with the lattice
5- Deform>by Lattice ... select the lattice, and the lattice deform op PPG should open.
6- Set the Deformation Scope parameter to "Falloff relative to Lattice's BBox"
7- Set the Scaling Mode to No Scaling
8- Position the center of the lattice with the surface you wish to nudge
9. Manipulate the points at the very center of the lattice until you get the dimple shape you are after
10. Animate the lattice, the dimple will follow

You can fade the dimple away by pulling the lattice away from the surface. You can also shape animate the lattice if you want an animated dimple shape.

Here's a jscript that will create a sample setup:

SetDisplayMode("Camera", "shaded");
CreatePrim("Grid", "MeshSurface", null, null);
SetValue("grid.polymsh.geom.subdivu", 24, null);
SetValue("grid.polymsh.geom.subdivv", 24, null);
DeselectAll();
GetPrimLattice(null, null, null, null, null);
SetValue("lattice.lattice.sizex", 2.488, null);
SetValue("lattice.lattice.sizey", 2.488, null);
SetValue("lattice.lattice.sizez", 2.488, null);
SelectObj("grid", null, true);
ApplyOp("Lattice", "grid;lattice", 3, siPersistentOperation, null, 0);
SetValue("grid.polymsh.lattice.scope", 2, null);
SetValue("grid.polymsh.lattice.sclmode", 0, null);
SelectObj("lattice", null, true);
ActivateVertexSelTool(null);
ActivateVertexSelTool(null);
SelectGeometryComponents("lattice.pnt[(2,2,2)]");
Translate(null, 0, 1.2, 0, siRelative, siView, siObj, siXYZ);
ActivateObjectSelTool(null);
Translate(null, -5, 0, 1, siRelative, siView, siObj, siXYZ);
SaveKey("lattice.kine.local.posx,lattice.kine.local.posy,lattice.kine.local.posz", 1, null, null);
SetValue("PlayControl.Key", 50, null);
SetValue("PlayControl.Current", 50, null);
Translate(null, 5, 0, -2, siRelative, siView, siObj, siXYZ);
SaveKey("lattice.kine.local.posx,lattice.kine.local.posy,lattice.kine.local.posz", 50, null, null);
SetValue("PlayControl.Key", 100, null);
SetValue("PlayControl.Current", 100, null);
Translate(null, -4, 0.2, -5, siRelative, siView, siObj, siXYZ);
SaveKey("lattice.kine.local.posx,lattice.kine.local.posy,lattice.kine.local.posz", 98, null, null);
 
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


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.