Fabric splice – push op
- September 1st, 2014
- Posted in Splice
- Write comment
Okay, let’s get this party started. Fabric Splice is freakin’ awesome and any studio can get 50 licenses for free.
Here’s the simplest possible deformer that i can possibly think of – the good old “push” operator from softimage. It moves vertices along the point normal.
require Math; require Geometry; operator doPushOp<<<index>>>(in Scalar amplitude, io PolygonMesh mesh0){ Vec3 pos = mesh0.getPointPosition(index); Vec3 n = mesh0.getPointNormal(index); Vec3 newPos = pos + (n * amplitude); mesh0.setPointPosition(index, newPos); } operator pushop(in Scalar amplitude, io PolygonMesh meshes[]) { for (Size i=0; i<meshes.size(); i++) { meshes[i].recomputePointNormals(); doPushOp<<<meshes[i].pointCount()>>>(amplitude, meshes[i]); } }