Hey Janos,

sounds good, yaa i will try some results and see what i get. this is what I 
needed to know.

Going to try and see what I get and will keep posted.

Thanks.

D.

On Monday, April 27, 2015 at 12:57:03 PM UTC+2, Janos Hunyadi wrote:
>
> Hey Dilen,
>
> One thing I know for sure that the MMeshIntersector uses a different 
> algorithm (octree) than the ClosestIntersection method of the MFnMesh (just 
> comparing distances I guess). So its quite dependent on the size of the 
> object, and to this day I could`t figure it out how is it possible to set 
> the resolution of the octree. So if your object is too small, as I can see 
> it from the screenshot, than the voxels of the octree will be too big. Try 
> increasing your size of your object to see if you are getting a desirable 
> result. I would use the closestintersection with a MMeshIsectAccelParams 
> accelerator, gives a decent speed. That always gave me correct results, 
> with any size. Although its not thread-safe.
>
> Greets,
> Janos
>
>
>
> On Monday, April 27, 2015 at 8:46:13 AM UTC+2, Dilen Shah 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/0d89c40d-76c6-47aa-8985-b281f24a7a3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to