PDA

View Full Version : Compositing refraction from a 3D prog



Matt Grunau
07-18-2006, 06:21 PM
I'm thinking a mixture of Displacement and Compound blur could acieve something close, but I have NO idea what to output (multipass) or how it would actually be used in AE. Or, if a diplacement map would even work.

THoughts?

Steve_Arm
07-18-2006, 06:45 PM
A displacement map would work just fine. If you want water refraction you can take a water video or create one with fractal noise and use this as a map. For the video you can turn it to grayscale and use blur and contrast to make the different shade areas more amped and softer. If you don't want to reinvent the wheel here are some useful plugs:

http://www.profoundeffects.com/products/swim/
http://www.digi-element.com/aurorawater/index.htm

Matt Grunau
07-18-2006, 09:13 PM
I meant using an actual render pass from a 3D app (Maya, Lightwave, Max) and how that particular refraction pass would be used. Using Multipass for specular,diffuse, raw color, reflection, occlusion are all simple to implement. It was how to implement the refraction pass I was wondering about.

Thanks for the links though.

oneinfiniteloop
07-19-2006, 07:59 AM
Here is something I found searching the web, an old post from VFXtalk.com. This guy sounds like he was trying to do the same thing, and found a workaround in Shake. Obviously, you can port this technique over to After Effects fairly easily, just some Add's, over, and a displacement.


Thanks to Splin, I`ve managed to post some images on web.
I should underline that this is only a small explanation of refraction composing, but not a step-by-step tutorial. Thus in the end I posted a screenshot of my workspace, that can help to understand this tecnique better.

Here is some glass that I quickly made in 3d, and a plane thing, that I had stolen from some other project. First of all, I made a rough render of glass in 3d. Sorry, but I had no time to make, for you gays, really cool glass with reflections, speculars, etc., so I made a simple beauty render with alpha.

http://img92.echo.cx/img92/6481/glass6qv.jpg

http://img92.echo.cx/img92/4816/alpha9nd.jpg

And here is a simple compositing of that glass and back through the Over node

http://img92.echo.cx/img92/7822/default7zi.jpg

Not really amazing;)

Also as I’ve already said my glass had sharp edges, made with geometry. Here I tried to make the edges using additional textures. This is a simple falloff map that was repeated several times.

http://img92.echo.cx/img92/2347/falloffmask8hy.jpg

There should not be any edges on the upper border of the glass, but I was lazy to fix it:)

Next what I’ve done, I compose my edges map with my glass alpha map using iAdd. I also add some brightness nodes to make my map more contrast for iDisplace and to have some additional control over refractions.(you’ll see it later)

http://img92.echo.cx/img92/9037/falloffmaskcomplete0mf.jpg

It’s time to feed it to iDisplace node, and make some modifications. After a few minutes I’ve got this image:

http://img92.echo.cx/img92/1965/displace2jv.jpg

Here where, my additional brightness nodes helped me to make more realistic refractions. As you see, there are no edges on that flat thing on the top. When I used low values of xScale and yScale of the iDisplace node, I got quite nice edges on glass but less than good refractions on that flat thing. So I raised the values in iDisplace until I was pleased with refraction on the flat thing, but lower the values in my Brightness nodes connected to the masks to make my edges and other unwanted warps on the glass less obvious. So that’s almost done.

http://img92.echo.cx/img92/6577/almost5pe.jpg

After that, as I had no reflections, I made some, using RotoShapes and composed it with my glass.

http://img92.echo.cx/img92/9120/reflections5gd.jpg

Here I spend some time to get proper position of the background in reflections. And here is the result:

http://img92.echo.cx/img92/2391/final1ai.jpg

Of course, this refractions are not physically correct. But who matters?:)
This composition also needs some blurs, additional reflections, speculars and other cool things, but I was lazy to fix all that stuff. At the end, here is the screenshot of my workspace. It’s a bit dirty, but hope it would be usefull for someone.
http://img92.echo.cx/img92/1097/workspace4fo.jpg

P.S. I also thought about composing refractions through bentNormals but, as I rendered all the things in Max using Vray, I don’t know how to get the proper image of bentNormals here. I suppose that compositing through it can be more correct. Maybe someone would tell us about it?

Matt Grunau
07-19-2006, 06:28 PM
Awsome link One.

As I suspected, not easy workaround.

Damnit.

But I'll give it a whirl.