Hi there. I have moved to a new website at I'm no longer updating this one, but I'm keeping it around so the Internet wouldn't break. See you there.

An Update to the Geometry Constraint Plug-In

The feedback on the Geometry Constraint plug-in has been overwhelmingly positive. To everyone on the Softimage forum on CGTalk: I can’t thank you enough for all the thank-yous.

But already there are a few requests for enhancements. One of the most obvious and logical ones is blending.

Unfortunately, the implementation is far from obvious. The problem is that once the constraint is applied to an object, the object’s original position and orientation information are lost. So blending between those and the new constrained position is not possible. In theory, it could be possible to store the original position and orientation in the scripted operator, and then update those when the object is moved along the surface. But the logic gets ugly real quick. The position and orientation deltas are dependent on the object’s current position, which in turn would be dependent on the blend weight value. Meaning that updating the original position will yield different values for the same deltas based on the blend weight.

I’ll stop writing in Klingon now. Reading into the intended usage of the blending functionality, I think a better solution would be a new constraint. Something¬† like the following:

I think this is far more predictable and definitely more intuitive to use.

Here’s how this new Blended Geometry Constraint works: This new Blended Geometry Constraint takes a polygon mesh (constraining mesh) and another object (constraining object) as constraining parameters. The constraining object can be a null, a light, a camera, another polygon mesh, or any object that has a kinematic state. The constraint will then compute the closest surface location on the constraining mesh from the position of the constraining object (closest position). Then the constraint will blend the location of the constrained object between the closest position and the constraining objects position.

You can grab the plug-in from the Geometry Constraint plug-in page. If you have a previous version of this plug-in, then make sure to overwrite the file with the new version. Any objects using the old constraint should continue to function correctly.

Please note that the Blended Geometry Constraint is not meant to replace the Geometry Constraint. Both have their uses depending on what you’re trying to achieve.

Enjoy, and remember that your feedback is always appreciated.

No Comments

Powered by: