Your online Softimage Educational Resource

The blog has been online for more than 4 years and there’s still not a single post even remotely related to the delicious brew called coffee… Perhaps it will someday, but in the meantime you can read the articles about Softimage. Most of the material are tutorials and Q&As I’ve written for 3D World Magazine sometime between today and 2003. If you have any questions please don’t hesitate sending me an email.


Thanks to Letterbox Animation Studios for hosting all the scene files.

Make sure you visit their Redi-Vivus.com for 100s of hours of free XSI video tutorials.

Thursday, September 15, 2011

Surface constraint and transformation

While constraining an object to a surface as such is a straightforward task and won’t require more than a few mouse clicks, it may still leave you with a sensation of not being quite satisfied. Once you add the constraint you loose the option to freely move the object with the standard translate tool and are left with two (somewhat less intuitive) sliders within a PPG. By adding an extra dummy object to the mix, you’ll effectively manage to get the most out of both approaches.

The project files used in this tutorial can be found at:http://dl.dropbox.com/u/3834689/CaffeineAbuse/Surface_cns.zip

Add Surface Constraint
Start by position the Null object in the lower right corner of the Surface (X:-4, Y:0 Z:4). Select the Box and click the Constrain button in the Main Command Panel and choose Surface (Param) from the menu. Pick the Surface when prompted. In the Surface Cns PPG click the Lock icon to pin it to the screen. Activate both the Tangency and the Normal by checking the checkbox under there respective tab. Return to the Surface tab. Make sure both the U and V Location are set to 0 [zero]. Right click on the U Location’s animation icon (the green divot) and choose Link with… from the menu to open the Parameter Connection Editor.


Link the parameters
In a viewport, select the Null object and (if neeed) then click the Refresh button for the Driving Source to update the explorer. The Driving Source is the object used to control or drive the parameter whereas the Driven target is the parameter that will end up being affected. Click the Driven Target button in the menu and change the Filter to All Nodes to display the proper parameters. In the Target explorer, expand the kine.Constraints node and select the surfcns.posu parameter. Select the posx parameter in the Driving Source explorer. Click the Link button to create the connection and the Set Relative Value button.

Change the interpolation
Move the Null object to the Surface’s lower right corner and change the U Location value to 1 in the Surface Cns PPG. Click the Set Relative Values button in Parameter Connection Editor. Continue by selecting the surfcns.posv and the Nulls posy parameter. Click Link button followed by the Set Relative Value. Position the Null in the upper right corner of the Surface. Change the V Location in the Surface Cns PPG to 1 and set a new Relative Value. Select the Box and click 0 [zero] to open an Animation Editor. Select the Fcurves for the surfcns.posu and surfcns.posv and from the Curves menu choose Linear Interpolation. Move the Null to translate the Box over the surface.

4 comments:

Alan said...

Before ICE made our lives (mostly) easier, a really good, stable/proven "cheat" alternative to your approach was to use the classic Shrink Wrap deformer to "project" a poly square from which to derive transforms.


The "long" version:
1. Make a 1x1 grid object roughly of the desired sample size, then place it relatively close to the target surface. (If you scaled the grid, do Transform-Freeze Scaling before proceeding.)
2. Swith to Animation Construction Mode for this step and with the grid selected, do Deform->Shrink Wrap then pick your surface. Set the wrap mode to "Closest Smoothed Surface".
3. Make a cluster of all (4) points of our square.
4. Make a null and do Constrain->Object-To-Cluster, then click on the cluster from the previous step. (Be sure to check "Active" in both the Tangency and Normal tabs of the constraint.)
5. That's all. Now whenever you translate the grid object, your null will reliably slide along the surface.

This trick is easy, super stable, requires no ICE/scripting/expressions/math knowledge and works with NURBS, polymeshes and even curves.

It's how I rigged the projected eyeballs of the Excel Donut character featured in my 2010 rigging reel at http://darkvertex.com

Love this blog of yours, by the way. Been a silent lurker for a long time. ;)

salenayoungs said...

Your content is shows potential, m gona add this to my bookmarks.

vector free

Unknown said...

I have been leeching your knowledge and I dont recall ever posting in here. Im sorry for that, and at the same time, thank you for sharing tutorials with us all this time. Also, thank you for your tutorials in 3d World magazine.

Ola Madsen said...

Hi Luis

Please feel free to post as much as you like :)

cheers
ola