9 Replies Latest reply on Sep 24, 2009 9:47 AM by Mylenium

    Replicating a broken mirror...but out of focus

    Arivl Level 1

      Hi guys... this one's got me stumped.  I'd love to hear how you'd go about doing it!


      I'm working on a shot where I need to break the mirror that we're looking into.  We see a girl in reflection (in a wide-ish medium shot— it's a large public bathroom mirror).  Now I've just got to create the texture and distortion for a broken mirror instead.  Not too challenging...right?


      The texture looks great, it's a photoshopped combination of several photos of cracked glass.



      Now for the distortion, Shatter or the Displacement Map are the obvious choices, both allow for custom maps to identify the "pieces" of the broken mirror and distort them as a whole.



      So, ordinarily, I would simply throw my custom map on there, distort the image to taste, drop the texture on top, throw in a bit of compositing fairy dust and call it a day.   Unfortuately, it's shot on 35mm, and the plane of focus is very, very obviously on the girl, rather than the surface of the mirror, which is quite out of focus.


      Which, it seems renders both Shatter and Displacement map virtually useless, the reason being that I don't want to blur the image being distorted, simply the edges of the distortion.


      If you're struggling to figure out what looking through a broken mirror looks like if the broken pieces themselves are out of focus, here's an example:



      The more OOF the mirror itself is, the more the pieces blend into eachother.  That said, the image is no less "distorted," that is, the different pieces will always be reflecting at different angles, but the edges between them increasingly blend into one another.


      So, since Shatter offers no options for having pieces with fuzzy edges (obviously) nor does it respect DOF, it seems pretty much out.  Displacement Map fares only slightly better.  You can have pieces with "fuzzy edges" but the result, of course, is varying amounts of distortion, rather than blending between the pieces, creating a useless liquidy effect.


      Obviously, the "right" way to do this would be to have a shatter plug-in that handles reflections and respects DOF (Trapcode?  You guys can do it, right?)  but short of that, or going to a 3D package, any ideas?






        • 1. Re: Replicating a broken mirror...but out of focus
          AntonyM6-sPksqC Level 1

          How about...


          Draw the lines of the cracks on another layer with a transparent background (or use alpha channel).


          Then use Lens Blur on that layer and combine.


          Should work.

          • 2. Re: Replicating a broken mirror...but out of focus
            Mylenium Most Valuable Participant

            Actually the question to me is what kind of displacment you use. Basically what you need is bidirectional displacment such as offered e.g. in RevisionFX' RE:Map package. This should give the desired level of control and, to go all fancy, those maps can then be used in SmoothKit from the same vendor to offer adaptive blur, similar to Lensblur or Compound Blur. You just need a Find Edges inbetween somewhere to treat the edges, not the vcontents of the shards...



            • 3. Re: Replicating a broken mirror...but out of focus
              Arivl Level 1

              Antony, while you're absolutely correct that this is the effective way of getting the broken glass *texture* to appear blurred, my question had more to do with getting the edges of the distorted pieces to blend into one another.  In the end, the texture itself is going to be out-of-focus enough that it will be fairly transparent.  Thus if there are hard edges in the distortion under it, they will be pretty obvious.


              Mylenium,  if I'm not mistaken, what you are suggesting is that I use the displacement map to create an in-focus distortion and then fix it by selectively blurring the edges of the pieces using smoothkit?


              If so, I can't imagine that will work, because it would require smoothkit to recreate image data that no longer exists.  


              I've whipped up a demonstration using only five pieces (the actual shot has hundreds) which allows me to try out the effect manually:




              So if we start with out displacement map and source image (A) we can quickly generate the in-focus distortion using a bidirectional displacement map as you suggested (B).  Unfortunately, where we're trying to go is (C) where the pieces smoothly blend into each-other, and I can't imagine a way of getting there if what you're working with is (A).


              The reason being that if you simply selectively blur the edges, you always end up with blurred edges.  I think the next image (D) is a pretty accurate representation of this approach.  Believe it or not, what it actually looks like when you photograph a broken mirror like this is (C).  I had to take a camera and try it before I would believe it.


              Anyway, the obvious problem with trying to get there from here is that (C) contains information that is no longer available in (B).   An example in this test is Bernake's left-most eyebrow (E).  You can see that the (C) version of it actually "extends" the boundaries of the piece past where they are in the in-focus region.


              Long story short, I'm trying to get to (C) with hundreds of pieces.  Any ideas?

              • 4. Re: Replicating a broken mirror...but out of focus
                AntonyM6-sPksqC Level 1

                Hi Arivl,


                Sorry, but I disagree.

                If you look at the sample mirror photo in your first post, it looks more like D than C.


                i.e. the different reflections are clear and "self-contained" in that they DON'T blur into each other.

                Only the border between them is blurred.



                • 5. Re: Replicating a broken mirror...but out of focus
                  Arivl Level 1

                  Sorry for the miscommunication Antony, we're actually totally on the same page, it's just that we're looking at different things.


                  This test that I mocked up is with respect to the distortion only, I'm ignoring an obviously important part of the effect (the texture of the breaks, that is, the non-reflective areas around the edges of the pieces) for the purpose of figuring out how to accomplish the distortion.


                  You are correct that the texture adds a blurry overlay to the edges of the  pieces, but, were that to be removed, the distortion would look like a less extreme version of C.


                  That said, the sample image in the first post is a LOT less OOF then image (C) in the Bernake test.  If the sample image were taken with a much wider aperture, the texture of the break would basically go away and it would end up looking exactly like (C).


                  Don't believe me?  No worries.  It's really counterintuitive.  Try this:  find a broken mirror, and stand about 4 feet in front of it with a camera with a large-ish sensor (APS-C, 35mm or larger) and a VERY wide aperture (f/1.8 or faster) and take a picture of your own reflection.  I did (with a split-section mirror rather than a broken one) and what I saw looked exactly like (C) on the Bernake test.


                  Anyway, just from a technical perspective... how would you go about making something that looked like (C) from a displacement map or something of that sort?

                  • 6. Re: Replicating a broken mirror...but out of focus
                    AntonyM6-sPksqC Level 1

                    Anyway, just from a technical perspective... how would you go about making something that looked like (C) from a displacement map or something of that sort?


                    Are the pieces of the mirror flying around or are they fixed? If they are fixed, then the way I would do that is to have each segment of the broken mirror in a separate comp, using a mask. Then feather the edges of the masks.


                    But that would be a LOT of work, unless you can automate it.

                    • 7. Re: Replicating a broken mirror...but out of focus
                      Arivl Level 1

                      I was afraid that sooner or later someone would say that.  They're basically fixed, but given the number of pieces (literally hundreds) and the fact that they have to shift and settle, the time involved in this approach would be prohibitive.  Not to mention the fact that any change I wanted to make would have to be applied individually to hundreds of comps.


                      Incidentally, I decided to try a taste of my own prescription and take the photo that I suggested earlier.  The result,





                      I'm sure there's a procedural way to get to this kind of effect.  It's just a REALLY tough nut to crack.

                      • 8. Re: Replicating a broken mirror...but out of focus
                        AntonyM6-sPksqC Level 1

                        Two thoughts which might make things easier for you:


                        1. Perhaps you don't need to make it CORRECT, in order for it to look GOOD ??i.e. cheat it a bit.


                        2. Thinking about Map Color Theory, perhaps you don't need 100 layers in your comp. Perhaps you only need 4 layers. Map Color Theory studies how many different colors you need on a map so that no 2 adjacent items have the same color. This can be applied here so that no 2 adjacent pieces of mirror are on the same layer. Simplifies things a lot.

                        • 9. Re: Replicating a broken mirror...but out of focus
                          Mylenium Most Valuable Participant

                          I think you are over-complicating matters. First, physical exactitude cannot be achieved in any way in just 2D. What you don't seem to realize is that all your artifacts are in fact dependent on angular phenomena, i.e. the way how the cracks actually extend from the center of force, canting towards it and ever so slightly tilting towards each other, being constrained by the collision of the edges. Furthermore, the reflections themselves are dependent on teh angle of viewing and placement of the item being reflected. Lastly, any attempt to capture such a thing photographically will further skew the result due to the lens curvature, essentially meaning that unlike "the real McCoy" the outer regions will always autoamtically be less sharp, complicating the process of projecting the result cleanly back onto the imaginary mirror. So in all fairness, you are just going mad about something that you cannot possibly create with any 2D technique, no matter how elaborate. Therefore, ultimately you are stuck with three options:


                          - film it real

                          - recreate it in a 3D program

                          - settle for a compromise in 2D that looks good


                          The rest is pretty much of limited relevance - for artistical reasons, you would never create a mirror with more than a few "hero" fragments (What good would the most real mirror do you, if people no longer are able to recognize the person?) and just fill the others with something that looks believeable, even if it isn't real. Just the otehr way around, if you ever creater all shards, then you'd only do so, if you realyl plan on doing something with them, like zooming in. That kinda contradicts the initial statement of trying to make it real. In any case, I think you simply need to re-evaluate your concept, then the solution will pretty much become a lot more obvious.