# SBC Capture SOP

## Overview

This sop is a deformer that works with SBC deform and SBC transfer.  SBC stands for Spherical Barycentric Coordinates.  SBC coordinates allow any arbitary closed geometry to define a coordinate system for the points inside it. The number of points in the control cage that define the SBC also define the dimension of the coordinate system.  The normal coordinate system XYZ is 3 dimensional, a cube used as a SBC control cage is 8 dimensional.  Points inside the control cage are assigned a weight where points closer to the cage have higher weights than those further away.  To completely define the position of any point inside the cage a weight is assigned for every point, so for a cube each point requires 8 weights.  To save on memory in storing these weights values that are very small can be ignored and not stored, however when this is done the accuracy of the solution suffers.

## Usage

Deformations done with this method happen in 2 stages, capture and then deform or transfer.  This is the capture sop and is used first to calculate all the weights and store them on the geometry as attributes.  Once the capture is performed the deform or transfer sop reads these attributes and applies them.
There are 2 inputs, input 1 is the geometry to deform and input 2 is the control cage.  The control cage should be polygons and completely closed with no holes. In theory all the polygons need to be planar, the more non-planar they are the less accurate the capture.

## Parameters

 Pre convex Pre convex the control cage - internally it uses the same method as the divide sop with maximum edges set to 100.  Using this helps with non-planar polygons but in general shouldn't be required.  Note you can always use the divide sop set to triangulate non planar polys for extreme casesbut triangles don't produce the smoothest deformations. Use threshold Turning this on can reduce the storage required for the calculated weights but at the expense of accuracy. If not used wisely it can actually increase the storage required since it stores a weight and the assiociated point number.  This option is best used for large control meshes where at less some of the captured points lie close to the control cage. Threshold The threshold below which weights will be culled from the stored attributes.  If set too high the capture will be inaccurate, if set to low nothing will be culled and the number of stored attributes will go up.