3D World

Render realistic water caustics

Discover how Johan Vikstrom worked with water, wet surfaces, and light reflection­s to create this realistic render

-

Johan Vikstrom shows us how to produce realistic-looking results with water and wet surfaces

This project was a journey for me to explore parts of the creation process I have very little experience with, namely caustics, water and wet surfaces. To increase the challenge even further, I didn’t want to use a reference; usually I like to work with a movie frame or a photo, which I try to mimic. I had made a digital human asset, Emily, before from the Wikihuman project files, and I had refined her shaders and textures through a few projects. So I thought she would be the perfect asset to use – she didn’t have a body or wet hair, but I could solve that later on.

My idea was to use caustics to light the character, as I felt that could be a unique approach. Over the next few pages I will go through the process I used to create this image.

01 BUILD THE POOL

The pool is a simple box with an edge around it. I used a tileable mosaic texture and a stone texture from cgtextures.com for the shaders. For the water I made a box with more subdivisio­ns on the top. The water needs to be a closed surface to work correctly with the shaders, and the water geometry needs to be clipping slightly outside of the pool geometry. I used a texture deformer with the ocean shader to make the larger water displaceme­nt.

02 FIGURING OUT CAUSTICS

There are two types of caustics: reflective caustics, which reflect off the surface to the face in my case, and refractive caustics, which are the rays going through the water and on the body.

For caustics you want to use a separate light that only casts caustics. So I made a copy of the main light in the scene and moved it slightly forward. You need to uncheck Affect Diffuse, Affect Specular and Affect Reflection­s in the light options. Directiona­l needs to be at 1, even .99 will make your caustics significan­tly softer. As you're going to have a very focused light, you need to make sure that the light covers exactly the area you want caustics in. But not more – the bigger area you cover the more samples you are going to need. All your other lights need the caustics multiplier to be set to 0 so they don't cast any caustics.

For caustics to work properly with your water shader you need to make sure the Affect Shadows checkbox is unchecked in the refraction settings. Also make sure your caustics light is set to Invisible so it doesn't block the light from your normal lights.

To prevent V-ray from crashing when using caustics you need to make an ‘auto save file’ that creates a cache for the caustics on render end. You can find these settings in the Caustics tab under GI.

03 CREATE A REALISTIC WATER SURFACE

This is an essential step when creating realistic caustics. I used three methods to displace the

water. First, the texture deformer with the ocean shader for the bigger waves in the water. Then I used a projection ramp with the type set to Circular Ramp to create the waves around the head. I also used just a tiny bit of noise to create some randomness.

For the third method I used a top-down image of water from cgtextures.com. I blurred the image and fitted the scale to suit my scene. This last step was the key to getting good caustics for me.

04 SET UP THE CAMERA AND LIGHTING

For the camera you want to make sure you use a Vrayphysic­alcamera. It adds a lot of realism and can simulate camera-related settings. I wanted to emulate an anamorphic camera in my project.

For the lighting I tried to create contrast areas in the picture. The pool behind her face to the left is bright, while that part of the face is in the shadow. The brighter right part of the face has a darker pool lighting behind it. The lower part of the face is brighter from the caustics, while the top is darker. I added a rim light to create some interestin­g reflection­s in the hair and water drops.

05 WET HAIR

I use Yeti for hair, which is a very pipeline-friendly hair solution.

When I started on my first pass

I had a lot of issues with the hair going over the ears. There were hair strands sticking in every direction, even though my guide hairs were straight. My solution was to make a copy of the head and let the hair grow from this mesh instead. I deleted all the faces of the ears, and I also changed the density map so the map only covered the longer hairs. Then I let the shorter hairs be separate hair systems. This proved to work much better as I was not getting all those weird hairs around the ears any more.

I used three more hair systems for the full groom. One to create hair strands around the edge of her hairline with different directions to create more breakup. One hair system to make the hair growing down the sides of her face and behind the ears go down to the neck. I made a hair system along the ear to create the effect that wet hair had gotten stuck there. I also added some droplets from spheres here and there in the hair.

06 WATER DROPS ON THE FACE

I used a displaceme­nt map I hand painted in Mudbox for the water drops on the face. I made a copy of the head mesh and scaled it along the normals to make it slightly smaller. You do this so the drops will be inside the mesh you're rendering, otherwise you will not get correct refraction­s.

I then use a very small value of 0.001 for the Water Level in

the displaceme­nt options to cut away the mesh, so you only get the drops. I used the same water shader as the pool water.

I didn't like the water drops I had painted on her forehead, but I remembered that Substance can make a mask which mimics water running down a surface. So I put the mesh inside Substance Painter and exported the water mask. I refined the mask a bit further in Mudbox and removed drops I didn't like. The two masks were then combined in Nuke.

07 FINALISE THE SCENE

For the body I used Daz3d to get a basic female body mesh. I cut away half the neck and shoulders from my head and removed the head from the Daz model, and then attached them together. I added some water drops I made from spheres in a few selected places.

08 RENDERING

For the final image I ended up rendering three layers. I usually try to make only one render, but for this special situation there was no other way.

1. The first pass is the beauty with water drops on the face. For this pass I used 20% intensity on the caustics light. If I used 100% intensity the drops looked like they where glowing. You do need some caustics for this pass as the water drops looks very unnatural

without caustics. The caustic effect inside the drops adds a lot of realism.

2. The second pass was only to grab the hair. When the caustics were on, the hair shader behaved weirdly and gave me a darker render of the hair. To help solve this I opted to split this problem into a separate render.

3. For the third pass I was only interested in getting the caustics AOV. So this one has no water drops in the scene and 100% caustics intensity. I also changed the shader of the hairs to a normal Vraymateri­al as I was not getting any caustics on the hair with the Vraynext hair shader.

09 COMPOSITIN­G

For compositin­g I used Nukex. I split all the render AOVS so I could make adjustment­s to each layer separately and then add them together. I used Cryptomatt­e to composite the hair render on top of my beauty render. I added the caustics AOV from render pass 3 on top of render pass 1. I applied her makeup around the eyes with a paint node over the diffuse AOV.

The grade is made with a Colorlooku­p node. A trick you can use is to convert your colorspace to LOG with a ‘log2lin’ node before grading, and then convert it back to Linear after. This will give you better control of the colour curves using the Colorlooku­p. I went for a teal and orange grade for a pleasant skin tone; it also helps to create more colour contrast, as you have the warm tones of her skin verses the colder colours of the pool. I swapped her iris colour to blue for another contrastin­g element. To finish, I applied lens distortion with different settings for each RGB channel, as well as some grain and a vignetting effect. •

 ??  ??
 ??  ?? 02
02
 ??  ?? 01
01
 ??  ??
 ??  ?? 03
03
 ??  ?? VRAY PHYSICAL CAMERA 04 Water colour A common misconcept­ion is that your pool water needs to be refracting with a blue colour. The blue is actually the refraction­s from the blue walls of the pool. The water is always transparen­t and should never have a colour.
VRAY PHYSICAL CAMERA 04 Water colour A common misconcept­ion is that your pool water needs to be refracting with a blue colour. The blue is actually the refraction­s from the blue walls of the pool. The water is always transparen­t and should never have a colour.
 ??  ??
 ??  ?? 05
05
 ??  ??
 ??  ?? 06
06
 ??  ?? 07
07
 ?? Lighting tips For lights to look natural and behave realistica­lly, you want to attach an HDR image of a light to the 3D light. Always use real-world scale in your scene, as all light and shader calculatio­ns work more correctly this way. ?? 08
Lighting tips For lights to look natural and behave realistica­lly, you want to attach an HDR image of a light to the 3D light. Always use real-world scale in your scene, as all light and shader calculatio­ns work more correctly this way. 08
 ??  ?? 09
09
 ??  ??

Newspapers in English

Newspapers from Australia