Documentation

RCTools Selection PluginRCTools Selection Plugin

V4.5 for Softimage 2010-2012 (Win32/64) / by Reinhard Claus, September 2010

 


Follow rray.de updates on Twitter @sitweets.

The RCTools plug-in is a collection of advanced selection tools and filters for Softimage. The supplied popup menu (Script command rc45Popup) gives you quick access to all the tools.


The RCTools popup menu

download links are at the bottom of the page.

1. New Features

Version 4.5: Updated rcCustomPointFilter with position and distance filtering. Subcomponent (poly/edge/point) clipboard commands: Copy / paste / boolean union, intersection, difference, subtract, swap. Removed Snapshot commands (Similar functionality is provided by subcomponent clipboard update). Accellerator keys update.

Version 4.4: Fill selection commands, "Peek" command for various aligment option of the camera to the selection, repeat command. Fixes to the custom filters, which were translated from C# to VBScript because of compatibility problems. (Note that VBScript also executes faster than C#). Rim Edge filter is now part of the Custom edge filter ("Sharp edges").

2. Installation

Start Softimage then drag-and-drop the RCTools45.xsiaddon file into the application in order to install it into the USER directory. In case you want to use a different directory for the installation, go to the File menu and select Addon->Install to install the provided .xsiaddon file into a directory of your choice.

3. Usage

Upon installation the addon registers the custom command "rc45Popup" which handles the RCTools popup menu. This command should be mapped to a hotkey for quick access to all RCTools commands. The hotkey assignment can be done through Softimage's keyboard settings dialog (File->Keyboard). Pick the "Custom Script Commands" category and scroll down to the "rc45Popup" command.

Also it's recommended to bind a key to the rcRepeatLast command which repeats the last command executed from the RCTools popup menu. This is useful for example for the walk select loop command.

Copy/paste this into a script editor and press "run" for an easy way to test the menu and the handlers. As you see, the Track() command only returns the hander string associated with the picked item. This string is executed as code using the JScript "eval" method. (Note that the VBScript equivalent of eval is "ExecuteGlobal", Python equivalent is "exec".)

Such a snippet of code would usually be wrapped inside a custom command, which would then be mapped to a hotkey using the keyboard mapping manager (preferably ALT key combos, just as a suggestion). For an instruction on how to do this, see section 8.

Three example commands, one for each scripting language, are included with the plugin distribution. These examples also demonstrate how to grey out menu items, use toggle menu items, dynamic icons and checkboxes.


4. RCTools function reference

Peek (Usage: Select polygons, edges or points. Invoke "Peek".)

Peek aligns the camera so it looks at the current poly/edge/point selection precisely from the normal direction. This is mainly meant as a modeling helper if you like to work in the camera plane. Note as a special case, for 1 edge or 2 points selected, peek will move the camera on the line that goes through those elements, basically looking "through" them.

4.1. Loop and ring selection

Complete all (Usage: Select polygons, edges or points. Invoke "Complete all".)

For an edge selection, "Complete all" will select edges along paths (a.k.a. "loops") originating from the initial selection of edges. A path will end when the boundary of the surface, or a point with an odd number of "fan" edges is hit.

This implements a different selection workflow than Softimage's built in loop selection (where you directly select loops using the ALT key). You might prefer this in situations where multiple loops have to be selected.

Note: The loop selection functions are C++ reimplementations of the old RCTools loop functions. They were optimized for speed and are now combined under 1 command.

The edgeloop function also selects edgeloops on the boundary of a surface. It stops at corners:

For polygon and point paths, pairs of two neighboring items have to be selected in order for the algorithm to be able to specify the direction of the paths:

Note: this command's name is rcCompleteAllLoops, in case you intend to tie it to a hotkey

Walk select (Usage: Select two neighboring polygons, points or edges, taking care to select in the order of the desired walk direction. Invoke "Walk select" repeatedly.)

"Walk select" extends the selection by one item into the direction of the last selected item. In order for that to work, it is required that the last selected item is connected to a previous selection.

Note: For repetetive steps, use the rcRepeatLast command, which is best tied to a hotkey using the keyboard settings dialog

Complete all (around corners) (Usage: Select edges or points. Invoke "Complete all (around corners)".)

Complete all (around corners)" works exactly like its non-corners couterpart (see above) with the one exception that for edge and point loops, it does not stop selecting at corners on the boundary of the mesh. The non-corners version stops there because selecting and extruding a corner-to-corner segment of the boundary is an essential workflow for poly-by-poly modelers:

Complete all Edgerings (Usage: Select edges. Invoke "Complete all Edgerings")

"Complete all Edgerings" selects all edge rings (paths of single parallel edges) originating from an initial selection of edges. Selection stops at triangles and when the boundary of the surface is hit.

Grow all Loops (Usage: Select polygons, edges or points. Invoke "Grow Loop".)

"Grow Loop" extends all open loops by one item on both ends. Like for the "walk loop" command, for polygon and point loops two adjacent items have to be selected.

Note: this command's name is rcLoopGrow, in case you intend to tie it to a hotkey

Shrink all Loops (Usage: Select polygons, edges or points. Invoke "Shrink Loop".)

"Shrink Loop" removes one item on either end of the selected loops/edge rings.

Note: this command's name is rcLoopShrink, in case you intend to tie it to a hotkey

Grow to Island

Select a polygon, invoke "Grow to Island" to select the whole polygon island (all connected polygons). "Grow to Island" also works for point and edge selections.

Loop patterns

This allows you to set a global selection ON-OFF pattern for all loop (and ring) selections. Select e.g. X.X.X.X to have the loop commands (Complete all loops, complete all loops (around corners), complete all edgerings) select only every other element of a loop. XXXXXX is the default behavior (every item selected). To create custom patterns, pick "custom" and inside the preferences (loop tab), use the "Bit Pattern" Value to set a bit pattern for the loop (A XXX-X-XXX-X-XXX-X pattern would translate into a bit pattern of 111010 (58 decimal). So use 58 for the "Bit Pattern" value and 6 for the "Bit Pattern Length" value.

4.2. Polygon Selection

Fill

Given a polygonal selection, this tool selects the inside of the selection:

Hold shift to fill multiple areas. MMB to end. It also works with an initial edge selection:

Fill (removing original selection)

Works just like the previous command Fill Polygon Selection, but removes the original outline selection, which can be useful sometimes:

Polygon outline

Given a polygonal selection, this tool selects the outlining edges of the selection:

If you want to select the boundaries of your object, select all polygons then execute the tool (this is useful for finding holes in complex surfaces. Use the cap marked holes function afterwards to fill all holes of a polygon mesh):

Cap marked holes

Fills holes marked previously with the "edgeloop around corners" or the "polygon outline" functions:

4.3. Subcomponent Clipboard

The subcomponent clipboard offers a quick method to store one selection per object for each of the subcomponents (polygons/edges/points). The following examples show only polygon selections but this also works for point and edge selections.

Copy Selection

Copies the current subcomponent selection into the subcomponent selection clipboard (Which is an annotation property stored under the object):

Paste Selection

Replaces the current subcomponent selection with the clipboard:

Union:

Intersection:

Difference:

Subtract:

Swap:

Note: To achieve the same functionality as the Snapshot selection functions from the previous versions (selecting the polygons that are created by a bevel operation) do the following: Select all polygons. Copy selection. Apply bevel. Paste selection. Invert selection. The snapshot selection function has been deprecated in RCTools 4.5 in favor of a cleaner interface.

Note: Since the subcomponent clipboard is stored as a property under the object, it's possible to move or copy it between objects that have the same topology. This way you could recreate an existing selection on a different object.

Note: When trying to paste on an object that has fewer components than it had at the time when the components were being copied, the paste operation might fail.

5. RCTools filter function reference

Filter operations: Select All, Keep, Add, Subtract

This allows for a finer control than "select all using filter". For instance if you have a random edge selection on the mesh and you want to keep from this only the edges that are on the border of the mesh, you could do the following: Select Softimage's Border_edge filter, then select RCTools->Filter ops->Keep.

Similarily, "Add" adds all components to the selection that match the specified filter, and "Subtract" removes all component from the selection that match the filter. The "Select All" is the same function as the built-in "Select all using Filter", it was just added for completeness here.

This is particularily useful for the custom filters:

Custom Filters

RCTool's "Custom Filters" are 4 customizable filters for polygon meshes, polygons, edges and points. You can filter items by a number of criteria such as minimum and maximum edge length, polygon size, orientation or adjacency properties.

You'll be able to specify combined filter criteria for polygons, edges, point or objects such as "only 4-sided polygons that have a minimum area of 2 sq SI units and are located on a concave area of the mesh" (This example did probably not make too much sense, but should make the point clear). Criteria also include Random component selection

Customization is done inside the Softimage preferences dialog, under the "Custom->Custom Filters" category, but it's probably easier to use the provided property page directly (RCTools->Open Custom Filter PPG) and do all selection there, using the buttons at the top.)

Quick Usage: Configure the custom filter, then activate it using the MCP, then apply the filter to your current selection using either the Softimage built-in filter commands ("Select All using Filter", "Deselect All using Filter") or one of the new RCTools filter commands (Keep, Add, Subtract).

Detailed Usage: Configure the custom filters either by entering the preferences (File->Preferences), then activating the "Custom->Custom Filters" category, or directly by invoking the preferences dialog through the RCTools menu (RCTools->Open Custom Filter PPG)


Filter property page, note this is a screenshot of an older version

You'll be able to configure the four custom filters (Polygon mesh/polygon/edge/point) from the four tabs here. Every group of filter parameters has an "apply" button that will activate that group of parameters for the filter. When no apply button is activated in a filter/tab, the filter when applied will keep everything selected. The groups will be evaluated top-to-bottom, although the sequence should not play a role.

The parameter groups are inclusive: If you for instance activate the "Polygon area" group, then only those polygons will remain selected which areas fall within the min-max range.

Every parameter field has a "from selection" button next to it that will evaluate the parameter for the currently selected object/components, and copy that value into the input field. Note that this can be used for measuring purposes also (especially polygon area/polygon orientation/deviation/edge length/angle).

There's also a "pick" button if you don't want to erase the current selection.

5.1. Settings for the Custom Polygon Mesh filter

Polygon Count: If the polygon count group is active, only those objects are kept selected which polygon counts fall within the specified min-max range. The "from selection" button will sample the polygon count from the currently selected object.

BBox Volume:keep only obects selected that have a Bounding box volume that is inside the min-max range. The "from selection" button will sample the Bbox volume from the currently selected object.

Random Factor/selection propability:This will randomly select objects. This makes sense only when selecting multiple objects at once. A typical case might be you have a grid of 10 * 10 buildings, and you intend to scale up a random 25% of these. To achieve that, you could set the "selection propability" parameter to 0.25 and rectangle select all buildings with the custom Polymesh filter active. You will end up with a random 25% of the buildings selected.

5.2. Settings for the Custom Polygon filter

Polygon Area: Filter polygons by area. The area is measured in square SI Units, supposed you have a square polygon that is 2*2 SI units wide, the area value will be 4. The "from selection" button will sample the total area of the selected polygons. ("From Sel" from min will use minimum polygon area if multiple polygons are selected, "From sel" in max will use maximum area)

Polygon Aspect ratio: Filter polygons by the polygon's aspect ratio (works best for 4-sided polygons). The aspect ratio is measured long side/short side, thus it will always be >1. You can use this for example in situations where you want to have only the long polygons of an object selected. The "from selection" button will sample one polygon only.

Polygon Sides: Filter by number of polygon sides. If you wanted only 4 and 5 sided polygons selected, set min to 4 and max to 5 here.

Orientation Vector/max deviation: Use this to add orientation detection to the filter. Only those polygons are kept in the selection that have an orientation (or "normal vector") that at most deviates by the specified deviation value from the orientation vector. For setting the orientation vector/deviation value it is suggested to sample the current selection. The "from selection" button will compute the average orientation/deviation of all selected polygons.

Approx. Surface Curvature: Filter by local curvature of the surface: For example if you set min to 0°(zero) and max to 180°, you would end up with only those polygons selected that are located on convex areas of your object. The "from selection" button will compute the average value for the selected polygons.

Random Factor/selection propability: This computes a random number per polygon. It then filters out all polygons that have a number higher than the "selection propability" setting. The higher the number, the more polygons are kept selected.

5.3. Settings for the Custom Edge filter

Edge Length: Filter by edge length. The length is measured in SI Units. The "from selection" button samples the total lenght of the selected edges.

Total adjacent Edges: Filters by the total number of edges directly adjacent to the to-be-filtered edge. For quad-structured meshes this number will be 6 for most of the edges. The "from selection" button will sample one edge only.

Angle of adjacent Polygons: Filters by the angle of the edge's adjacent Polygons. For example in a cube, this angle will be 90° for all edges. If you want to select all concave edges, use -180° for min, 0° for max. The "from selection" button will compute the average value for the selected edges.

Sharp Edges: Selection of edges that are "sharp" by the automatic discontinuity setting in the object's geometry approximation properties. This can be used to find edges that qualify for a bevel operation... Usage: Adjust the automatic discontinuity setting until the object's rounded/angled parts looks right. Activate the Rim Edge Filter and call Softimage's Select All using Filter command. Now apply a bevel to the selected edges.

Random Factor/selection propability: This computes a random number per edge. It then filters out all edges that have a number higher than the "selection propability" setting. The higher the number, the more edges are kept selected.

5.4. Settings for the Custom Point filter

Global position: Filters by the distance to a position in global space. The "from selection" button will average the position of a selection of points.

Total adjacent Edges: Filters by the total number of edges that are directly adjacent to the to-be-filtered point. For quad-structured meshes this will be 4 for most points. The "from selection" button will sample one point only.

Average Length adjacent Edges: Filters by the average length of the point's directly adjacent edges. The "from selection" button will sample one point only.

Approx. Surface Curvature: Filter by local curvature of the surface: For example if you set min to 0°(zero) and max to 180°, you would end up with only those points selected that are located on convex areas of your object. The "from selection" button will compute the average value for the selected points

Random Factor/selection propability: This computes a random number per point. It then filters out all points that have a number higher than the "selection propability" setting. The higher the number, the more points are kept selected.

6. Misc commands

Repeat last command: Offers a shortcut to repeat most of RCTool's popup menu commands. This doesn't make sense really to have as a menu entry, so this serves more as a reminder to bind the rcRepeatLast command to a hotkey.

Edit this popup: You can customize the RCTools popup menu here. Just add a line following the scheme popup.AddItem("[MENU NAME]", "[JAVASCRIPT COMMANDS]");

Help: Displays this help file in a Softimage Netview

 

 

     Downloadables:


      rcTools45.xsiaddon  756k win32/64 plugin (python/VBScript/JS/C++)

      rcTools45cppsrc.zip  Source code for the C++ part of the plugin (Loop selection functions)

 

 

 

 

This site and (non external) contents are ©2000-2010 rray.de