Collada plugin for After Effects

More info here
Plugins and Scripts > trueSpace > Modeling - Curves and Patches
curve node patch node

NURBS Curves and Patches for trueSpace7.61(workspace)

A collection of scripts for using NURBS curves and patches in the truespace workspace environment.

back to workspace nurbs

Anatomy of a workspace NURBS object:

NURBS objects are composed of 3 basic components. The control point mesh which holds the editable points of the mesh, the NURBS display mesh and a script node to create the NURBS display using the control point mesh.

  • During editing the control point mesh shows as points connected by lines. The points that touch the NURBS are the "Control Points" and the points at the ends of the edges are the "Control Handles".
  • A curve will have control points with 1 or 2 control handles
  • A patch will have control points with 2, 3 or 4 control handles
  • The first point of a curve or patch is the "Head"
  • The last point of a curve is the "Tail"
  • A curve has only 1 dimension so the direction from the head to the tail is the U direction
  • The curve is built from a cone primitive mesh. The top and bottom points of the mesh can be seen as a pair of floating vertices.
  • The patch is built from a plane primitive. The height translates to the U direction and the width is the V direction.

Usage:

  • Curve and Patch
    • Select CP Mesh select the NURBS control point mesh
    • Select LOD Mesh select the NURBS display mesh
  • Curve
    • Curve resolution slider controls the resolution of the display curve
    • Even Spacing makes the curve points have regular equal spacing between the points
    • Use Plugin Code uses the rsx plugin to generate the curve shape
    • Position on Curve used to output the position along the curve via the Position on curve matrix output
  • Curve controlPointMesh
    • Select Curve select the curve object
    • Select LOD Mesh select the NURBS display mesh
    • -- Curve Thickness --
    • Add/Remove - add or remove thickness to a curve. The ThicknessCylinder is a mesh that has been deformed to follow the curve. It has controls for radius and radial resolution. The resolution along the curve is controlled by the Curve Resolution.
    • Toggle Active - the curve thickness calculations can slow down point edit operations. This can be used to temporarily stop the calculations, then turn them back on when complete. The LODMesh will show automatically when the thickness calculations are suspended. When reactivated a dialog will give the option to hide the LODMesh.
    • Select Thickness Mesh select the thickness mesh to set the Radius and number of radial segments. The visibility and other render attribute settings of the thickness mesh can be controlled.
  • Patch
    • Double Sided mesh faces are double sided
    • U precision, V precision - display resolution
    • Smooth Angle autofacet angle

Notes/Tips:

  • Do NOT edit the curve or patch node directly. Edit the controlPointMesh node.
  • Use Select All Geometry not Select Visible. Some control points/edges can be on invisible back faces.
  • The object coordinate system may be better for editing curves since the x axis will align with the handles
  • Use rectangle or lasso selection with context mode. Do not use face selection mode.
  • Point selection mode may be best for patches.
  • The LODin is limited internally to even numbers to avoid spikes in the curve. For example a value of 73 would display as 74 segments to the curve.
  • workspace curves cannot be seen in modelspace
  • The curve thickness mesh does not have proper normals. Normals are added when freezing the curve.
  • UU AutoSelect: When a curve has thickness the curve needs to be selected twice in the 3D view to get to the controlPointMesh.
  • Use the Set Origin along with RDrag Rotation and Ctrl + RDrag Scale on points to get handle-like behavior.
December 13, 2020

Select Control Point Mesh

select cp mesh

Will convert members of the current selection from NURBS display selection to control point mesh selection.

Utilities

utilities

Open utilities panel.

Default / Info Panel tab

Info panel displays information about the selected NURBS object and has buttons for changing the direction of the NURBS structure.
A span is the section of a curve or patch between 2 control points.

NURBS Info

  • Toggle UV Indicators turn on or off the UV indicator for the selected NURBS object. The "Head" or start of the curve or patch is indicated by a yellow wireframe box. The U and V are indicated by a red U and a green V.
  • All UV Indicators Off
  • Reverse U reverse the direction of a curve or U direction of a patch
  • Reverse V reverse the V direction of a patch
  • Swap U and V swaps the U and V directions of a patch
  • Get Info read U and V information for the selected NURBS object
  • Active - will update with selection changes
  • Head indicator Size - not used
  • UV Indicator Size - not used
  • Indicator Scale sets the size of the select NURBS UV indicators

NURBS Misc

  • Auto CP Mesh Select - a NURBS selection will automatically change to it's control point mesh selection for editing and transformations. This is only active while the panel is open.
  • Double Sided Patch - makes the NURBS display meshes double sided. Set to apply the change to the scene and default patch creation. A single sided patch has a better polygon mesh conversion result and is better for editing. Double sided is better for viewing and selecting a patch in the 3D view.
  • Protect NURBS etc activate the Unofficial Update script for protecting or guarding lights, cameras and NURBS from inappropriate changes. Set to apply the change
  • Fix Handles - if a process is exited prematurely or mesh edit triangulation is active during patch editing, the triangle indices of the control point mesh can get messed up. This fixes that problem.
  • Fix Curve Mesh BB - fix the curve mesh bounding box so that the top and bottom of the base control point mesh cone is centered in the curve.
  • Fix Floaters Floaters are what I call the control points that are not part of a control handle. This tool will place them so the result matches the modelspace handle manipulations.
    The points are adjusted so that they form a parallelogram with their associated control handles.
  • Fix Render Attributes - Show Object Attribs button can ruin the appearance of NURBS objects, this fixes it.
  • Hide All CP Meshes set all control point meshes in the scene to invisible
  • Show All CP Meshes set all control point meshes in the scene to visible
  • Freeze Curve as Polygon will make a polygon face when freezing curve objects
  • Freeze NURBS - convert NURBS to polygon meshes. A double sided patch will freeze as a 2 sided mesh. An option is presented to opt out of welding coincident vertices. If a curve has thickness then the ThicknessCylinder mesh will be the frozen mesh and autofacet normals (80 degrees) will be applied to it. Automatic grouping and parenting on freeze will not work if the NURBS object has both parenting and group relationships.
  • Toggle Position on Curve - the Position on Curve is used to output the position along the curve via the "PositionMatrix" output. If the curve is moved the connected object will not follow. Pressing this button will make the object follow the curve when it moves. This is inefficient because the curve is continuously rebuilt. If the curve does not move or is not animated press the button again to disable it.
  • Dimension Parented - will create a text object dimension that is parented to the curve, instead of creating the text object inside the curve object
  • Location - where on the curve the dimension will be created. Middle, Origin, Start, End and Custom Middle is the midpoint of the curve and Custom will maintain the manually set position of the dimension when updating.
  • Add/Remove Dimension - add and remove the length dimension with each subsequent press
  • Update Dimension - update the length value after point edit or scaling the curve. If the location is not Custom the position of the dimension will also update.
  • Fix Concave Face, Flip Face: 2 utility buttons for fixing curve based concave polygons and for flipping the normals of mesh faces. The fix polygon is set to work in object mode, not point edit mode. These 2 buttons were added to deal with SVG import problems. These may be obsolete scripts as the svg import has been improved in the latest release.

Bizarre dev note: Node.Delete(deleteNode) line of the freezePatch2 script causes loss of undo somehow. Even removing the line and manual delete later causes the same problem. Maybe add clear history to freeze patches with warning question. If do add clear history also change code back to normal format since 1 undo form not working because of delete and the 1 undo format is more difficult to maintain. Also calls the UU FixNURBSORA script which also clears history.

NURBS Colors

  • Curve Display NURBS display color
  • Curve Handle edge color
  • Curve Point
  • Set Curve Colors apply the curve colors to the default and scene curves
  • Patch Handle edge color
  • Patch Point
  • Set Patch Colors apply the patch colors to the default and scene patches

NURBS Prep for Modeling

Settings that make editing easier to see.

  • Not Selected Color
  • Auto Triangulation - None best for NURBS editing
  • Select All Geometry
  • Set Mesh Editor for NURBS
  • Reset Mesh Editor Settings
  • OutlineSelect - Objects best for selection highlighting
  • Set Selection Highlight for NURBS
  • Reset Selection Highlight
  • below is for the currently selected patch
  • IgnoreLayerAttributes true
  • SurfaceOpacity 0.5
  • Set Transparent Patch
  • Set Solid Patch

NURBS Draw Plane

solid display with edges and points opacity set to 1 to show the potential snapping points
grid multiplier was set to 4

Plane mesh created to resemble the tS grid. Useful for the Draw Curve and Circle tools

Surface

  • Tile Colors
  • Opacity

Grid

  • Grid Colors - edge and point colors
  • Edge Opacity
  • Point Opacity

Presets

  • D3D Presets
    • Solid - match tS default solid grid colors
    • Wire - similar to tS grid wire display
    • Points - grid of visible points with the color taken from the Grid Color
    • Invisible - grid is transparent but can still be snapped to

Details

  • Axis - create plane in XY, XZ or YZ orientation
  • Grid Size - total size of the grid
  • Tile Count - number of grid squares
  • Grid Mult - grid multiplier increases grid density
  • Auto Close - auto delete the plane after a circle or draw curve run (maybe a bad idea, remove in future?)
  • Size Presets
    • Full - 80x80 to match the full size tS grid
    • Default - 8x8
    • Small - 2x2 with 10 snap points between each grid line
    • Very Small - 1x1 with 50 snap points in between

There is no point size control because a good size value depends on how dense the grid is and on the zoom level of the view.

Copy Delete

copy erase

Special copy and delete buttons for NURBS. Will copy or delete the entire NURBS object no matter what element of the NURBS is selected.

These also work with non-NURBS objects.

Extract Curve from Patch

insert cp

Creates a curve from a patch selection.

Usage

Select 2 vertices or a control edge and press to create a curve from the correpsonding isocurve the selection is a part of.

Selection must be part of the control handles. The floating control points cannot be used.

The selected points do not have to be part of the same handle

Rebuild NURBS

rebuild nurbs

Change the detail or resolution of a NURBS object.

Bottom curve with span count of 147 rebuilt to a span count of 16

  • U Span, V Span, update - refresh display for the current selection
  • Keep Original keep a copy of the original NURBS object before the rebuild
  • Tolerance measure of how close a rebuilt control point can be to an existing control point
  • UV, U, V rebuild in one or both U and V directions
  • U inputs new span value in U direction
  • V inputs new span value in V direction
  • Rebuild rebuild the NURBS object structure

The purpose of rebuilding is to reduce unnecessary detail, smooth out a NURBS object, add detail for a future modeling step, match the spans for patch modeling tools.

Align Handles

smooth align sharp align

Align the handles of a NURBS object to there connected handles or neighbor handles or control points creating a smooth or sharp appearance at the control point.

The tool behaves differently depending on what is selected, the control point or the control point handle.

The vertices that touch the visible curve are the control points and the 1 or 2 points connected to them through edges are the control point handles.

Smooth

  • if a control point is selected then it's handles will form a straight line parallel to a line formed by it's neighbor control points.
  • if a control point at the start or end of the NURBS is selected then the handle points will point to their immeditate neighbor handles
  • if a handle is selected then it will rotate to form a straight line with it's control points other handle
  • if a handle at the start or end of a curve is selected it will point towards it's closest neighbor handle point

Sharp

  • if a control point is selected then it's handles will point towards the neighboring control point
  • if a handle is selected then it will point towards the neighboring control point

Usage:

If smooth doesn't give the desired result on a control point, select the control point then press sharp then repeat but press smooth the second time through.

If control and handle points are both selected it will have less predictable results for smoothing.

Set Origin

set origin

Sets the mesh origin to the control point of the selection. If a control handle edge or point is selected the origin will be placed at its control point. This enables a more NURBS handle type workflow.

Once the origin has been set the handles can be rotated around the control point using the RDrag on the widget arcs.
The handles can be scaled from the origin using the Ctrl + RDrag on the scale boxes.

Split

extend curve

Splits a NURBS object into 2 distinct objects.

Usage

  • To split a curve select the base control point to split then press the button
  • To split a patch choose 2 points or an edge and press the button to split along that selection.

RMB panel, Keep Original

Weld

sweep path

Join 2 NURBS objects together as one.

RMB panel

  • Keep Original a copy of the original 2 patches will be kept
  • Automatic Curve Flip - no need to align the head and tail of the curve

Top left is welded to the top right with the result below.

U directions of both patches are parallel and the head of the first patch is close to the V indicator of the second patch.

Patches must have the same number of spans in the U direction.

Usage

  • To weld a curve select 2 curves then press the button
  • To force a specific weld curve direction disable the Automatic Curve Flip option.
  • To weld 2 patches first line them up and arrange their structure so the head of the first patch is close to the tail of the second patch. Then make sure both patches U and V are in the same direction and press the button.
  • In patches the U directions will be parallel and the order will be V then head of the first then V then head of the second patch.

Grow Handle Selection

grow selection

Grow a selection and restrict it to the handles.

RMB panel. The quantize option is good for easily maintaining the shape of the selected handles.

nurbs curve grow panel

Quantize Curve Selection - will grow the selection limited to the handles and set the weights of the whole handle to the same value. This will keep the handles orientation and Soft selection moves will not sharpen the handles. When off the selection will grow a distance of 1 point at a time. When on it will immediatly grow to include the whole handle with the maximum current selection weight.

September 19, 2009