Convexify is a standalone script which is part of FredoTools.
It performs the decomposition of 3D shapes into Convex shapes.
Convexify operates in 3 steps:
- Parameters, mainly whether you wish to generate the convex shapes on a specific layer or replace the original shapes, as well as the tolerance for concavity.
- Calculation of Convex shapes, including alignment of face orientations
- Post-view to Visual Inspection. This step allows examining the generated shapes.
You can either
- REPLACE the selection by its convex decomposition
- or put the Convex decomposition on a specified LAYER, leaving the original shapes untouched
Convexify proceeds with the decomposition of top level geometry and all embedded groups / components in the selection at any level. It also aligns the orientation of faces in order to detect correctly the concave edges.
Convexify is installed as part of FredoTools 2.6 and above.
See the main post for this plugin for Installation of FredoTools
(see also section Quick Start and Video below)
For developers only: There is service API to the Convexify functionality (which is actually implemented in LibFredo6).
- SU Versions: SU6, SU7, SU8, SU13, SU14, SU15 – works better with SU8 M1 and above
- Platforms: Windows and Mac
- Languages: English, French
- Menus: by default, Convexify is installed in Tools > FredoTools. There is also an entry in the Contextual menu.
- Icon toolbar: Fredo6 Tools. There is only a single icon. By default, it is not shown. You need to go to the Default Parameters… dialog of FredoTools to enable the icon.
- The plugin is free, for private and commercial usage.
Convexify Overview
Launching Convexify
Just launch Convexify on a selection. If there is no selection, Convexify proposes to apply the operation to the whole active model.
You will be presented a dialog box to indicate the parameters
Shape generation
This option allows to choose whether you wish
- to replace the original selection by its decomposition into convex shapes
- or put them on a specified layer (which will be created if it does not exist)
Note that in both cases, the hierarchy of groups / components is preserved, as well as the material and textures. Layers are also preserved if you replace the original components.
Tolerance Concavity
This parameter allows relaxing the constraint on strict concavity, which is the condition for splitting shapes into convex sub-shapes.
In the example below, the concave edge has a deviation of only 5 degree. If you set the tolerance to 5 degree or above, it will be considered convex and not split.
Animation Algorithm
This parameter is really just for illustration purpose of the algorithm. If you set the delay to 0 or more seconds, then you will see a jumping cut plane splitting the shapes. The algoithm is iterative and progressively cut the shapes along their concave edges. There is an example in the video.
Processing
The algorithm is iterative. Therefore, when it takes time, you will be shown a Visual Panel (not a progress bar).
The processing can be interrupted by a click or Escape (when the cursor is a green hourglass). However, when committing the operation, the processing cannot be interrupted (hourglass is red). On complex model, this step can take long, as the decomposition may generate a lot of new faces and groups.
Post-View - Visual Inspection of the Result
When the processing is complete, you are switched to an interactive tool that basically allows reviewing the result of the convex decomposition.
The button palette gives information on the original selection processed and the resulting number of convex shapes generated. It also includes some useful options for an interactive review of the convex shapes.
When you generate the convex shapes on a separate layer, there are a few additional buttons allowing to navigate between the Original view and the Convex view (showing only this layer)
By default, the convex shapes are shown with color. This is purely interactive painting. The shapes receive the original material and textures if any. You have a toggle button in the palette to activate / deactivate the colorization.
Shapes which were already convex are shown in a light beige color.
There are 2 utilities for visual inspection:
Explosion of Shapes
Click on the shape to explode it into the individual convex shapes. For convenience, only the selected shape is displayed. Click again to implode.
You can adjust the speed of explosion as well as its range (explosion factor) via the buttons in the palette.
Review of Non-Solid convex shapes
When the original shapes are not true solid themselves, the convex decomposition may not be able to generate true solid. In this mode, non-solid shapes are shown in Red and all others in White.
To finish, be aware that the result of a Convex decomposition may be complex too, especially when there are many concave edges. So Convexify will generally gives more aesthetical results on regular and boxy shapes. Below is a complex model (thanks to Pilou) with 320 concave edges. No miracle, the decomposition generates lot of small pieces.
Convexify 1.0a – 25 Feb 15: Initial public release in FredoTools 2.6a