Download Version 1.0.0: jj_catmull 1.0.0

Introduction

JJ_Catmull is a rudimentary Catmull-Rom curve tool for XSI. Unlike the built in curve types, this plugin constructs a curve from selected Nulls and ensures that the curve passes through each null directly - unlike the control points of regular cubic and quadratic beziers. A Catmull-Rom spline has local control. This means that modifying one control point only affects the part of the curve near that control point. It can't possibly match the functionality of in-built curve types but in certain circumstances it can be useful for rigging where you need a smooth, simple curve that always passes through specific points. For modeling tasks, the operator can evenly space points along the curve (unlike the parametric placement of points on the in-built curve types) which makes it useful for extrusions etc. where you might need regular spaced polygons.
Benefits:

  • Create a smooth curve that passes through all control points
  • Tangent controls for the start and end points
  • 'Live', even spacing of control points - by length or by no. of segments


There's a screen capture of the plugin in action on Vimeo here



Curve From Nulls
Select any number of nulls in the order the curve should travel


Nulls Are Control Points
Moving the nulls will alter the shape of the curve just like a regular control point but no matter where you position them the curve will always 'hit' the null. In extreme circumstances this can cause bobbles in your curve if a curve has to make radical direction changes between knots/Nulls.

Adding Knot Points with Nulls
You can add additional knot points at any point on the curve. The PPG for the operator has a Pick Additional Knot button. With this a pick session starts where you first pick the null 'before which' (MMB) you want to insert the new null or 'after which' (LMB) you want to insert the new null.The second pick operation lets you pick the null you want to insert. This works for any points including the start and end points.


Removing Knot Points
You can remove knots by hitting the Remove Knot button and selecting the knot to be removed. Again this works on any point including the start and end points.


Tangents
Catmull Rom curves have tangent handles at the start and end points of the curves. By default those handles are hidden (in fact the tangents are automatically located at the start and end points). You can manually turn on manipulators for the tangents and move them to alter the shape of the start and end sections of the curve.



Tangent Toggle
You can toggle between using the manipulated tangent handles or the 'default' handles that sit automatically at the start and end points of the curve.

Extrusions
If you extrude the spline you can manipulate the number of divisions by increasing/decreasing the step of the curve in the PPG. In itself that's no big deal...

Even Spaced Extrusions
..however, if you enable the even spaced option you can then control either the exact number of segments your extrusion has (all of which are spaced uniformly) or you can specify the segment length for each 'knot' point i.e. you can ensure your extruded polys each have exactly the same specified width.

Even Spaced Extrusions (cont.)
..so, with even lengths enabled, if you manipulate your curve the extrusion will add or remove polys to ensure the extrusion contains polys of the same width. You can see on the adjacent .gif that the very last segment is 'uneven' in size - this is because if the width you specify doesn't divide into the curve length exactly there's always going to be some remainder. There's a button in the interface called 'Adjust' which compensates for this by tweaking the specified length to divide equally into the curve length so that all segments 'are' equal (but not precisely the length you requested!).


How to Use jj_catmull

When you place jj_catmull into your plugins directory and either restart XSi or Update Plugins, the plugin creates a command 'ApplyCatmull', which you can either drag on to a toolbar or use via keymapping.

Notes on Usage

I think that most of the options on the PPG are self-explanatory but it's probably worth picking some out for special attention:



1. The Step/Accuracy parameter controls the number of curve points generated. The more you generate the more 'accurate' the curve is and the less angular corners you see. Obviously, the higher this figure becomes the slower the operator is to evaluate so keep it at the minimum acceptable value. Interestingly, a value of 1 will give you a linear curve between nulls.

When you turn on Even spacing, this parameter no longer controls the number of points on the curve but it does control the underlying 'accuracy' of the curve shape.

2. The 'Pick Additional Knot' button launches a pick session where the first pick controls the location (i.e. before/after the picked null) that you want to insert the new null. This pick is modulated by the Left and Middle Mouse buttons.

3. The Adjust button compensates for a length that won't divide evenly into the curve length.

4. The Clean Up button is fairly important and one of the clunkiest bits of this implementation - if you try and remove the curve with a conventional delete in the interface you'll get a slew of error messages because of all the interdependencies between the control nulls and tangent handles. If you want to delete the curve and those dependencies it's much cleaner to hit this button. It removes the operator and any linked ports.

5. The curve itself is a drawn using a conventional linear curve so all of the usual properties and methods associated with linear curves are still available as part of the ActivePrimitive.



6. There's a tab for controlling the look and feel of the relevant control attributes.

How to Install jj_catmull


jj_catmull is a Python script which means that you'll need a copy of Python installed on your machine and a copy of the PyWin32 extensions.

Installing Python takes a couple of minutes. Full instructions are at the top of the Autodesk Softimage wiki Python page

Once you've installed Python you just need to drag jj_catmull.py into your plugin directory.

C:\users\xxxxx\Softimage\XSI_x.xx\Application\Plugins

Then, go to File: Plugin Manager and hit 'Update All'. The command should now be available.

Versions

Version 1.0.0: jj_catmull 1.0.0

Julian Johnson

julian@exch.demon.co.uk