Monday, 10 April 2017

Visibility Node v1.0

To kick off this blog I rooted out an old plugin just to remind myself how it worked. I had intended it to be use by the animation department to allow them to work with characters based inside objects but had instead left it to rot. It's pretty straightforward providing you have a prior knowledge of how to utilise MFnMesh::allIntersections to register mesh collisions. In the case of this node after registering a hit I would then colour the face vertex with an alpha value to render it transparent returning it to normal when it is no longer intersecting.
The only issue... it's quite slow when hitting over 10k polygons which renders this fairly useless even after compiling it with C++.
When speaking with Fevsy over at Constrain 'n Bake he suggested I use a polyModifier. The idea is to have the orig mesh connected into a poly modifier, deleteComponent for example, and also into the custom node. The deformer tracks intersection between a mesh and the deformed mesh and passes a list of the intersected points into the delete modifier. He pointed me to this video by Hans Godard which at 6 seconds in confirms the method somewhat so I think I shall give it a go with version two. For now, here is a short video of version one.

I have included the code for the Python version of this node in a later post available here.

Reveal Node from SBGrover on Vimeo.

0 comments:

Post a Comment