Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Collider Deformer Test & Demo

labbejason
Advocate

Collider Deformer Test & Demo

labbejason
Advocate
Advocate

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!!

Reply
Accepted solutions (1)
12,247 Views
28 Replies
Replies (28)

Anonymous
Not applicable

Working. Thank you 🙂

labbejason
Advocate
Advocate

I took a bit of a hiatus to work on some side projects, but have time today to share a little update.

 

Right now it's able to handle a very dense topology because the actual deformation is being done on a low poly proxy mesh. Afterwards the high-res foot steals the deformation from the proxy, making it lightweight for manipulation and playback. All of this is being done directly inside Bifrost. I also finally fixed the normals so it's easier to make out the bulge!

 

Here's a demo of that in action:

Anonymous
Not applicable

Very cool Jason! Thanks for sharing too!

labbejason
Advocate
Advocate

Thanks ShihMing! Loving your self-collision deformer as well 😄

0 Likes

Anonymous
Not applicable

Just wanted to say great work on this!

Had a quick play and found that you can make a hacky tracer as well with feedback ports.


0 Likes

Anonymous
Not applicable

Capture.PNGtemp.PNG

labbejason
Advocate
Advocate

Wow that's really cool! I was wondering how to go about something like that to make it act like a sim. Thanks for showing that! It makes for a neat cheap snow effect.

 

feedback_loop.gif

pivotgeeks
Contributor
Contributor

Wow, that's quite neat..

0 Likes

Anonymous
Not applicable

Thanks for great examples but unfortuantly example does not seem to be working due to missing node definition on one of subgraph. "update_point_neighbors" May I ask if there is any custom compound need to be prepared? or is there any related built in operators I can replace to fix the issue? it would be awesome if you can share your thought!

 

Thanks in advance

 

 

0 Likes