[Bf-committers] Tool Stack with Tool Painter!

Tom M letterrip at gmail.com
Thu Feb 10 07:16:10 CET 2005


The third challenge is mirror support, again their are a few different
approaches, the best and most robust approach is to use object space
spherical coordinates.

To do this get the mouse local space coordinates, transform them to
spherical, here are the formulas

http://astronomy.swin.edu.au/~pbourke/projection/coords/

Now flip the coordinates based on how you want to mirror (x, y or z)
or if you want to do radial mirrors (ie have five symmetric
tentacles), you can do that as well.

Then you can either transform to local space cartesian coordinates, or
alternatively project a ray from the center of the object outward
along the new polar coordinate(s) and use those as your mirroring
locations.  The advantage of projecting is that non symmetrical mesh
can still have the mirroring used.  Also if you use projection based,
there is a possibility of working on the wrong layer of a mesh that
has folds and such.  (I have a few possible work arounds though, ie
check and make sure that the radial distance is close to that of the
original location...).

LetterRip


More information about the Bf-committers mailing list