--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f84c63ee-ce65-45a8-a5c6-3f9c2cf38ac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is this for practice/learning? Otherwise, you might be able to achieve what you're looking for using Transfer Attributes.
On 27 April 2015 at 07:46, Dilen Shah <dilen...@gmail.com> wrote:
Hey Guys,I am writing a script to transfer blendshape based on closest point algorithm, I am using the MMeshIntersector and getting the closest point and face id and also using triangle id getting the barycentric coordinates, with which I can get the new position of the blendshape.But I have run in some problem if the there is an offset, lets say for example I have a cube and i want to recreate the blendshape onto another cube which is smaller or bigger than it and so has an offset per vertex.So at the moment I get the distance vector between the vertices and multiply it to get the offset. But lets say I have extra edge loop on new cube and I want it to get the exact position using barycentric coordiantes from original mesh and also offset with it.When I apply the new blendshape position all works well but there is an offset on the extra vertices. I am attaching pics of what I exactly want.So first image is the original in white outline and target mesh in the green outline mesh. and I am getting the offsets.Second image, I apply the blendshape I extract using the closest point and barycentric coordinates. But when you see the extra vertices is not exactly in position ideal.Can anyone help me out with this, I know I need to multiply another vector position or is there a way to get the distance from the vertices to its closest edge and get the distance that I can calculate?Thank you.D.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f84c63ee-ce65-45a8-a5c6-3f9c2cf38ac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I suppose I still don’t understand. I tried recreating your example with a wrap deformer, but I can’t reproduce your results.
Have you tried using the wrap deformer for this? You could: