Maya C++ / Python API: Collision Deformer

I first saw this deformer in famous reel Cenk by Ozgur Aydogdu. I loved what it does and became instantly curious about achieving it. Apparently he used Collision Deformer by Jan Lachauer. Then I found out that there is a thing called API. It looked scary and I thought I should learn this later.

When I saw this post, I messaged him and he (thankfully)simply explained the steps of building a collision deformer. At this time I just started to learn API and written some basic nodes, also had Wei Wang’s Thesis on my pocket so I straight dived into it. It took a little bit more than 2 months to have everything working properly. OpenMaya’s learning curve is very hard compared to cmds. It has lots of gotchas, one should be ready to scavenge through Maya documentations and Google to learn a very simple thing. It was very intense project to learn API, had lots of fun solving all the problems.

Supports multi collider, weight painting. Has bulging effect and post-deformation smoothing.

https://github.com/nazmiprinter/ny_collisionDeformer

I took notes and screenshots when developing. I’ll briefly share the process:

Finding intersecting vertices with ray casting
Managed to have collision effect with script testing
Properly working realtime within node
Custom Attribute Editor added, starting of bulging effect
Wave effect created with bulge
Post-deformation smoothing

From the blog

About the author

Sophia Bennett is an art historian and freelance writer with a passion for exploring the intersections between nature, symbolism, and artistic expression. With a background in Renaissance and modern art, Sophia enjoys uncovering the hidden meanings behind iconic works and sharing her insights with art lovers of all levels. When she’s not visiting museums or researching the latest trends in contemporary art, you can find her hiking in the countryside, always chasing the next rainbow.