using geometry to deform geometry

203 views
Skip to first unread message

notanymike

unread,
Aug 10, 2011, 1:09:15 PM8/10/11
to python_inside_maya
It's not a new idea to deform a mesh using a transform riveted to that
mesh. However I was wondering if one could do the same without
transforms. That is to say, something that's a cross between a skin
cluster and a wrap deformer. I was thinking of using MItMeshFaceVertex
to build a transformation matrix using the position as the translation
value, and the normal and tangent for rotation. The question is then,
now that I have this array of matrices, how then do I make sure they
deform the right regions of the target mesh?

Chad Vernon

unread,
Aug 10, 2011, 1:13:16 PM8/10/11
to python_in...@googlegroups.com
You have to create the association.  You could use closest point or uvs, or any other association that you want.


notanymike

unread,
Aug 10, 2011, 1:59:19 PM8/10/11
to python_inside_maya
Thanks Chad, but which closetPoint function should I use? And what if
there are multiple matrices matching a certain distance to an array of
points? I guess I'm just confused as to how to manage all those arrays
with unequal lengths and kinds from within the MPxDeformerNode::deform
func which forces you to use MItGeometry to produce the final
deformation, though I'm not sure if using "compute" would be any
easier...

Viktoras

unread,
Aug 15, 2011, 3:14:45 PM8/15/11
to python_in...@googlegroups.com

Am I under right impression that you're trying to implement something
like control points over a deforming geometry? e.g., you've got head
with blend shapes, then skinned to head/neck, and then on top of that
deformation you want something additive like "raise brow corner" transform?

Marco D'Ambros

unread,
Aug 15, 2011, 8:17:38 PM8/15/11
to python_in...@googlegroups.com
How Chad says there is a different way to do it.

yes in your case maybe I'll use a deformer, you need to decide you is the deformer and  how is deformed...


but which closetPoint function should I use?

everythong depend on what you want to do, for example I used a ray intersaction ( because it's faster ;) and in my case the was not a difference with the closest )

And what if there are multiple matrices matching a certain distance to an array of
points?

the same depend what you are looking for, but in theory it's just a condition on the closest point, so just an loop on the multi point to determinate the closest point.

I hope that I'm usefull :)
this is a little example of one deformer that I made


http://vimeo.com/26828121
pw: test_01

--------------------------------
Marco D'Ambros
phone : (+61) 0431 830085



notanymike

unread,
Aug 15, 2011, 9:46:24 PM8/15/11
to python_inside_maya
Well, I suppose I should explain the situation without a deformer
plugin:
I'm trying out Jason Osipa's Facial setup, in which he takes the head
mesh and
uses a wrap deformer to drive lattices that deform the eyes, teeth,
etc to follow
the mesh. Well my wrap deformations weren't looking so hot for which
Jason recommends
corrective shapes but I'm not good a modeling so that would probably
make it worse.
So my idea was to attach follicles on the head that were close to the
lattice
and then use the follicles transformation matrix to drive a
skinCluster deforming
the lattice. Only follicles take a lot of time to set up and don't
offer any control
over rotation order. Using a riveted transform would have been even
more complicated. So
now I'm considering just taking the mesh itself and treat it's
components as transformation
matrices to create a vertex/normal driven skinCluster. I guess a
simpler way is to create
a compound attribute which specify the indicies for the deformer to
use. Now this brings
up another question, how do you create a deformer that works on
lattices? Can you pass
a lattice MObject to MItGeometry?

On Aug 15, 5:17 pm, "Marco D'Ambros" <dambros.ma...@gmail.com> wrote:
> How Chad says there is a different way to do it.
>
> yes in your case maybe I'll use a deformer, you need to decide you is the
> deformer and  how is deformed...
>
> but which closetPoint function should I use?
>
> everythong depend on what you want to do, for example I used a ray
> intersaction ( because it's faster ;) and in my case the was not a
> difference with the closest )
>
> And what if there are multiple matrices matching a certain distance to an
> array of
> points?
>
> the same depend what you are looking for, but in theory it's just a
> condition on the closest point, so just an loop on the multi point to
> determinate the closest point.
>
> I hope that I'm usefull :)
> this is a little example of one deformer that I made
>
> http://vimeo.com/26828121
> pw: test_01
>
> --------------------------------
> Marco D'Ambros
> phone : (+61) 0431 830085
> web    :www.marcodambros.com
> mail    : dambros.ma...@gmail.com
>
>
>
>
>
>
>
> On Tue, Aug 16, 2011 at 5:14 AM, Viktoras <ituden.ui...@gmail.com> wrote:
>
> > On 2011.08.10 20:09, notanymike wrote:
>
> >> It's not a new idea to deform a mesh using a transform riveted to that
> >> mesh. However I was wondering if one could do the same without
> >> transforms. That is to say, something that's a cross between a skin
> >> cluster and a wrap deformer. I was thinking of using MItMeshFaceVertex
> >> to build a transformation matrix using the position as the translation
> >> value, and the normal and tangent for rotation. The question is then,
> >> now that I have this array of matrices, how then do I make sure they
> >> deform the right regions of the target mesh?
>
> > Am I under right impression that you're trying to implement something like
> > control points over a deforming geometry? e.g., you've got head with blend
> > shapes, then skinned to head/neck, and then on top of that deformation you
> > want something additive like "raise brow corner" transform?
>
> > --
> > view archives:http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
> > change your subscription settings:http://groups.google.com/**
> > group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
Reply all
Reply to author
Forward
0 new messages