Thursday, 27 October 2011

Rendering a refraction UV pass for water droplets



I've been working on a shot with a swimming pool and some splashes and water droplets. There was no light probe so I needed to replicate the lighting and refraction within the droplets.
I used the UV pass method with Nuke's STmap node- here's how:

1. Once you have your droplets simulated and you are ready to render, assign your particles as Blobby Surface (s/w) type.

2. Create a Blinn shader with 100% transparency, switch on refractions in the raytrace options and assign that shader to your particle object.





3. create a poly plane that fills the frame and is behind the particles (i.e. you can see the particles in front of the place when looking through your camera). rename the plane to UVplane. In the UVplane's render options, set the primary visibility to be off but make sure it is visible in refractions.



4. create a surface shader and assign it to the UVplane

5. create a sampler info node and make the following connections:

samplerInfo.vCoord -> surfaceShader.outColorG

samplerInfo.uCoord -> surfaceShader.outColorR


6. Render.


7. In Nuke, get a STMap node and plug in the background plate into the src pipe and your render into the stmap pipe



You will see a refracted background in your droplets and you can composite this how you like.


In this example, you can see the original plate with the swimming pool and the person in the pool refracted through the water droplets (just...).

No comments:

Post a Comment