Sunday 19 January 2014

Mirroring across a plane - Tutorial

Mirroring a point across a plane (ex. YZ plane) seems easy but it requires a couple of math tricks to make it work every time. The main tool for achieving this effect is the dot product. It gives us the projections of our point on Y and Z axes and with those values we have almost everything we need for our mirrored position. With a few Maya nodes we can implement this in a scene:

The completed node graph

Same calculations can be done to mirror any object, vertices, curves...
I go into more detail on how this works in the video:

Mirror across a plane - Tutorial from Armin Halac on Vimeo.

Edit:
This technique was more of a demonstration of some math tricks that could be more useful in many other cases. To do the same mirroring the easy way you can just take the world position of the first object and multiply the x value by -1 and you will get the mirrored position. That is what I would do in a real case scenario because it is faster and more efficient then doing all the math stuff.

No comments :

Post a Comment