PDA

View Full Version : Maya Python API - deformer, moving vertex along normals


sabungero
11-22-2011, 07:24 AM
Hello, i need to make a deformer that moves vertices along a selected axis( NORMAL axis). Is there a way where MPxDeformerNode or geomIter will allow me to do this? is there a functionality that i have to know or should i use another class? please give me directions as i cannot find anything on the net that tackles it. thank you very much.

djx
11-22-2011, 12:12 PM
If you have written a plugin before you should have no trouble with the MPxDeformerNode. Just iterate through the verts (MItMeshVertex) and get normal vectors (getNormal), iterate through the geometry do the math (envelope and strength etc) on each point and setPosition.

I'd say this would be quite difficult if you've never written a plugin though.
You could have a look at the SOuP peak node if you want one thats ready to go.

David

edit: I cant share the push deformer, but you might want to check out this simple noise deformer
http://area.autodesk.com/forum/autodesk-maya/python/simple-noise-deformer-node (as an example, or a start point for your deformer)

sabungero
11-22-2011, 01:23 PM
Thank you, David.

This will be my first Maya deformer. I was studying the included scipted examples for reference. The simple noise deformer is also one of my references. Thank you very much, I shall look into this and I will update you after a few nights of studying, Thank you very much.

CGTalk Moderation
11-22-2011, 01:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.