Compositing glass and other refractive objects with live action.

Hi Blenderartists

How would I go about rendering and compositing a 3d glass cup on a live action plate so the glass cup reflects and refracts the surrounding environment accordingly?

Preferably there would be a way to render the cup to be composited in a separate compositing package. (fusion)

For my particular shot I need a detailed close up shot of the glass, with a shatter animation with flying fluid. The glass and fluid would only need to refract elements behind it.

Background about me:
I have searched the depths of the internet to find an answer to this question, but without finding satisfying results. I made an account on this forum specifically for this question. I’m reasonably experienced with blender, but not so much in the rendering and compositing side of things.

I have a way to do it, but it may not be 100% correct, so I’ll wait a little bit to see if someone else chimes in. It will give you true refractions, and an alpha overlay of just the cup with refractions from your plate, which would be the most modular output. Couple preliminary questions:

  1. Does the footage need to be tracked (is the camera moving).
  2. If yes, is it already tracked?
  3. Have you already created the cup and shattering animation?

Hi
I have done the cup animation and fluid sim. The camera motion is a simple slider shot, which I have tracked using recreate camera motion. I have not set up materials and lighting.
It seems obvious, but it’s worth mentioning I’m using cycles.

I’ll outline the broadest steps I used, but state that I feel like there may be a better way. My thinking is this: unlike compositing a simple shadow pass onto a plane representing the ground, the refractions off of the modeled glass will actually need a real object with color data in the scene to bounce off to get refractions that appear to match the background plate.

  1. On frame 1, I added a plane to scene, unwrapped it, scaled to match the video aspect ratio, and added the video (just like an image) to the plane. The material is a 50/50 mix of diffuse and emission (strengtht 1)
    1a) I added an hdri image that roughly matched the main colors in the plate, and turned off ray visibility for it.
  2. Moved, rotated and scaled the movie plane so it is parallel with the camera and filling the frame perfectly, some distance behind the glass.
  3. I parented the movie plane to the camera, so it remains fixed in the frame. The glass refracts believably now.
  4. I have the glass on layer 1, the movie plane on layer 2. and some lights on layer 3.
  5. I created two render layers, one of everything, and and one just to get the alpha of the glass shards
  6. I composited the layers so you are left only with the shards with refraction.

You would either just render out just stills and use your other non linear editor to combine the original plate with the shards, or you could definitely use blender video editing to do it as well.

You could do it without any render layers, by just turning off ray visibility for the movie plane (and anything else) and turning on transparency.

Thank you very much. That solution, although not ideal, will suffice for my needs.

Dunno, Kewel, it probably is “ideal,” at least from a workflow point-of-view, because it lets you simplify the workload and to keep, and adjust, what you have instead of constantly re-doing it from scratch.

If you attempted to do a “literally, physically-correct” approach here, you would not only have a rather extraordinary number of calculations to do, but they would be inter-dependent. If you don’t like where the shard is or how it’s moving, and/or you don’t like the refraction (-effect) that you “see” in it, then you would be obliged to re-do “the whole schmeer.” And-d-d… at the end of however-many hours or days of recalculation, you might not like what you got this time, any more than what you got last time or the time before. And when the audience actually watched the show, they might not even notice the refraction-effect at all. (At least, not enough to object to it … and, not enough for you to have spent so much time in the pursuit of perfection.)

It’s always better, I think, to break a shot down … to “fake it, Ingrid,” knowing that the result really isn’t “fake” at all. Do it in steps so that you don’t have to re-do that step, and so that you can adjust the work-products together downstream.