Alfred Roettinger / Realtime Eye

Introduction
I’m Alfred Roettinger, currently working as Lead Character Artist at Starbreeze Studios in Stockholm.
I have been an artist in the games industry for a long time but have worked with characters more specifically for the last eight years.
In my role I am always looking for ways to push quality within the team without negatively impacting development time and TexturingXYZ plays an important role in how we do that. It allows us to push the fidelity in our characters easily and has become indispensable to our workflow.

In this tutorial I’m going to go over how to use the iris maps to create a convincing real-time eye in Marmoset Toolbag,using Maya and ZBrush.
As well as how to use different shaders effects like refraction, caustic and sub surface scattering for the final image.



Part 1- MODELING
Modeling the eye in Maya is a simple task but requires a few different components in order to create a realistic result.
For this we will need to make several meshes:
  • A sclera,
  • A cornea,
  • A retina
  • And an iris.
The sclera is the white part of the eye and will use an alpha to transition to the iris, the cornea is the clear part of the eye over the iris and the retina is just a bit of mesh behind the pupil.

I usually model the cornea mesh starting with a Sphere then using the Edge Flow options in Multi-Cut along with soft select to create the dimple. I use a polygon Torus primitive scaled to form a Disc for the iris mesh and the sclera is just a duplicate of the cornea mesh deflated a little using the Transform Tool under Edit mesh.






Part 2- UV / TEXTURING
UVing the meshes is pretty simple, just Planar Map the objects then use the Unfold Tool to relax them if needed.
Map the retina mesh onto the pupil part of the iris texture so it has a blackish color. It is important to UV map the sclera and cornea in a way that allows more resolution near the front of the eye as this is the part that will be seen most, a simple soft select and scale can create a nice soft transition.



For the cornea layer I like to create a height map from my sclera texture to generate a normal map so you can see the subtle breakup of veins on the sides of the eyes. You can sculpt this part in ZBrush but its such a slight effect I find using something like Knald or Quixel works well enough.



The next part involves creating a normal map from the iris displacement texture for Marmoset Toolbag to use. Import the XYZ MultiChannel Iris into ZBrush, then apply it to a square plane with 0-1 UVs. Crease the mesh and subdivide it until you have enough polygons to support displacing the surface. I tend to convert the texture to a mask using mask by color, then with that mask I use inflate under the deformation tab until it looks good. Once you have finished displacing the iris texture bake it to a normal map using whatever method you prefer.





Part 3- RENDER SETTINGS
For the best final result we are going to have to go into render settings in Marmoset Toolbag to turn some features on like:
 
  • Local reflections,
  • Enable GI,
  • Voxel Resolution: High,
  • Resolution: 2:1(double)
  • And Occlusion Detail: 2x.
Then you will have to go into the camera settings to play with the Exposure, Lens mm and Contrast.
I see a lot of artists cranking up the brightness on all their lights or HDR when what they really should be doing is looking at the exposure of their camera much like in real life.
Turning features on like GI, Local Reflection and increasing the Occlusion Detail will make certain shader features such as caustics more effective giving a more accurate result overall when it comes to the lighting in the scene.
The reason for doubling the Resolution is to improve the look of the alpha on the sclera material but isn't strictly necessary. Changing the lens mm to 50 gives a more traditional portrait look.





Part 4- LIGHTING
Now we have our settings done we can move onto importing our meshes into the scene to start setting up our lights.
I like to keep my setups very simple with a spotlight for the key and another spotlight for a backlight/rim.

This is similar to a traditional 3 point light setup but instead of a fill light we let the Sky do the rest.
I keep all the brightness settings on default except for the rim light which should be cranked to around 100.
Play with the spot angle and turn on contact refinement, this will be useful later when you will want the sclera to cast a shadow onto the iris creating the dark ring around it.





Part 5- MATERIALS
Now it’s time to start looking at our three materials for the scene!

  • Sclera : This material is quite simple just make sure to use Subsurface Scatter set quite high to soften the lighting and caustic on the material.
    Apply a soft dithered alpha to cut out where the iris and retina will be and reduce all reflection including fresnel to 0.
    Apply the normal map we created from the sclera texture to perturb the surface slightly simulating veins on the sides of the eye.

  • Iris : This material will use the normal map we baked with the Texturing XYZ height map for detail. Apply the iris texture to the albedo channel and use the heightmap as a Scatter Map to mask the Subsurface effect. Make sure this material also doesn’t have any reflections fresnel or otherwise.

  • Cornea : This material is where the magic happens bringing all the elements together using both refraction and caustic effects. Make sure to make it quite glossy achieving a wet look but not completely 0% roughness as this can look fake.
    Then apply a refraction function playing with the Index of Refraction value.
    In an offline renderer you would normally set this value to 1.336, however in Marmoset simply look at the eye from the side and play with the value until it bends the iris all the way to the edge of the cornea.
    The next step is adjusting the Caustics value, this is what focuses the light onto the iris giving it a feeling of being alive.
    I didn't use any real world values for this either just played with the slider until I was happy with the result.




  • Here is a breakdown of the values that worked for my scene:


    Alfred Roettinger's: ArtStation | Mail
    We would like to thank Alfred for his helpful contribution.
    If you're also interested to be featured here on a topic that might interest the community, feel free to contact us!