- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys!
I initially developed this deformer in Python and was dreading having to port it to c++ and to make it GPU friendly, so I made myself a challenge to see if I could convert it fully to Bifrost.
And hot ****, I think it's actually working!
Here's a video of what it does with a cube and another quick test on a model's face.
In order to get it working I had to do lots of my own mini compounds.
Right now to detect if a point is inside a mesh I'm using rays. In a nutshell if the ray's total hits is odd then the point is inside the mesh, otherwise it's outside. Since Bifrost's native raycast only returns you the first hit I used a while loop to get all possible intersections, sort of like mimicking MFnMesh's allIntersections. Here's an example to check if a locator is in a mesh, and to display its first and last hits with red locators.
I also built my own smooth compound to average the collisions with adjacent verts. An attribute is exposed to bleed off the effect of the smooth, and has a toggle to visualize this (green area gets smoothed). Here's a demo of that here.
There's still much more that I can do to improve it and to increase its performance. Right now I'm trying to optimize the graph nodes as I got a few for loops in there that I'm embarrassed of. But hey, Bifrost is a beast to get this working!!
Solved! Go to Solution.