[Bf-committers] Patch for constrain-to-plane
Bill Baxter
bf-committers@blender.org
Sun, 25 Jan 2004 23:17:56 -0500
Martin Poirier wrote:
>--- Bill Baxter <baxter@cs.unc.edu> wrote:
>
>Really nice patch. If you're interested on working on
>the transform function again, I'll be reworking in up
>in the next month, cleaning the functionnality,
>splitting in sub functions for cleaner code and add a
>lot more constraining (in relation to edges, vertices,
>faces, ...). Maybe you can help me.
>
>
>
>
Yes, perhaps. Let me know. I like working on little UI/usability things.
>
>
>>- I think there should be better smarts in
>>translating mouse motion for
>>GKEY and SKEY modes in the constrained case.
>>Currently it just projects
>>mouse motion onto the constraint axis/plane, but
>>that behaves poorly
>>when the axis is nearly perpendicular to the screen.
>> 3DSMAX and those
>>guys have a bit more complicated behavior to handle
>>those cases.
>>
>>
>
>Trivial fix for edit mode, you just need to insert a
>matrix multiplication before the snapping code call.
>
>
>
Yeh, but what matrix? It depends on the situation. In Maya I think
(it's been a while since I used it) if you're constraining to a plane
that's reasonably parallel to the screen then it tries to keep the
object under the mouse as much as possible (so 1-1 projective
tracking). But as the constraint plane goes more and more nearly
perpendicular to the viewplane, at some point that becomes silly,
because a tiny movement in X can give you a HUGE motion in Z, eg. So at
some point you want to switch to doing 1-to-1 absolute mapping, where
one unit of x motion gives you 1 unit of z motion. It's not as
difficult as remeshing, but still it's not totally trivial to get it to
feel just right.
--bb