Blender 3D: Noob to Pro/Creating Pixar-looking eyes in Blender
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Goal
Note: This tutorial uses the same modelling and texturing technique described in the well-known MAX tutorial by Adam Baroody (http://www.3dluvr.com/rogueldr/tutorials/eye/eyes.html). The sole purpose of my tutorial is to make this technique more popular among the Blender users by explaining how to achieve the same result with Blender.
The goal of this tutorial is to make a Pixar-looking eye. One of the main reasons that Pixar's characters really convey life is in their eyes. They have depth, you can see how the eye not only shines but it "collects" light. You may think that you can't achieve this effect without raytracing but you're wrong. The secret of this depth is in the modelling of the eye. Lets see how it works!
[edit] Parts of the Eye
In this picture you can see the "ingredients" of the eye model. The blue mesh at the left is the cornea. Its shape allows for a small spot of specular light to appear on it even if the light is in a far side position. The mesh next to it is the iris. Now notice how it's a bit concave. That's the tricky part - the shape of the iris allows for a wide soft specular light to appear at the opposite side of the lamp direction. This fakes refracted light from the cornea and makes the illusion of "collecting" light and creates depth. The next mesh is the eye pupil - a simple circle.The pupil size is the same size as the iris hole. You can position it close to the inner side of the iris. And finally - the eyeball. It's a simple sphere with a hole in it.
I won't go deep into modelling of each element - it uses Blender's subdivision surfaces and it's quite simple as you can see.

Below is a link to the diagram of the eye [1]
[edit] Materials
Now let's look at the materials.
[edit] Eye White
To make the eye white, press NUM3 to go into side view and add a UVsphere with 8 segments and 8 rings. To create the hole at the front of the eyeball, delete the 8 triangular faces that make up one end of the eyeball. Ctrl+Tab+3 to go into face select mode, B for border mode and select the middle 8 triangles as shown below, press Delete or the X button and LMB on Faces.
The resulting hole will be ringed by 8 vertices (which you could subsequently extrude and use to help you model the sections below - just a suggestion for those who feel capable)
The eye white has white color and high values for Spec and Hard (depends on the lighting). Optionally you can use a reflection map to make it look more wet but I usually don't do this.
(User: Make sure shadow buttons are off or it will black out the iris. Spec and Hard are located in the Shaders tab.)
after that jorge
[edit] Iris
~~ Note ~~ I did this tutorial, first the way they said here, and then my way. I inserted a circle, extruded (edges only), but I DIDN'T move anything. I then scaled what I had extruded towards the origin of the circle (middle). It had the same effect, and was much faster, but you had to get it roughly 1/4 of the way for the same proportion. ~~ End of Note ~~
The iris is built from a circle of 8 vertices.
- Select opposite vertices of the circle and join them using FKEY. While creating these lines, subdivide each new edge using subdivide multi with 2 cuts (WKEY then subdivide multi. Check number of cuts = 2. Press OK).
- Select the new vertices two at a time (adjacent ones) and join them using FKEY. This will form a ring which will become the pupil hole.
- Change to edge select (CTRL + TAB) and select the inner edges where the pupil will be. Delete these edges (XKEY then press Edges).
- Change back to vertex selection and select the inner vertices around the pupil hole. Change to a front view and pull the vertices back a little to form the concave shape. (Select vertices, then press G to "grab", and drag LMB away from cornea opening.)
- Scale the iris to the same size as the hole in the eyeball and position it behind the cornea. (Press S, then drag)
- Create a new material and add the iris texture (F6 or click the spotted wall tiny button, choose Image as the texture type and then press Load Image button). To create a material see the material tutorial at http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Quickie_Material.
The texture should be flat texturing (top button to right of preview) and flat in the Map Input tab. Occo coordinates work. All that is required now is a bit of tweeking of the texture size using the Xsize and Ysize values in the Map Input tab, and scaling the pupil hole size in Edit mode.
Here is the eye texture taken from the picture above 
You can tweak the RGB values and brightness/contrast of the image to achieve the appearance you want. Use a smaller value for Hard (about 50) otherwise you'll have a too shiny look instead of soft specular that fakes refracted light. The Spec value depends on the energy and distance of the light that illuminates it. Generally you'll need to take care that the refracted ligth on the iris should be no more than half as bright as the small specular spot on the cornea - otherwise you'll achieve the bad effect of two specular spots. Oh, another important thing - join the four meshes before tweaking the texture coordinates. Otherwise you'll have to do the job twice after you join them, because the texture space is changed. And activate shadeless button.
[edit] Pupil
The material for the pupil is a simple black color with the "shadeless" button on.
[edit] Cornea
The cornea uses a transparent material (alpha = 0.1) with Spec = .6, Hard = 255 and SpecTra = 1. "Ztransp" should also be turned on. The cornea is simply a piece that fits exactly in the middle of the hole in the eye white. Make sure that the 'Traceable' button, under Render Pipeline, in the Links and Pipelines tab, is switched off.
Noob question: I don't know where is the "SpecTra" Value. I'm working on 2.46. Thanks a lot. You can find "SpecTra" under "Mirror Transp"
[edit] Lighting
The lighting is simple - move the eye to a new layer, create a new lamp and make the lamp affect only this layer. Position the lamp at a good angle so you have a small shiny spot of specular light on one side of the iris and a soft spot of "refracted" light on the other side. You can use a backlight to prevent the eyeball from being too dark at the non-illuminated part.
To move the newly created lamp to a new layer, press SHIFT+M and select the second blue button and press OK. P
That's it! Now you're (almost) ready to start with character animation. You have a nice eye, now you only need a character for it!
[edit] Changing the Eye Color
You can change the color of the eye by either changing the cornea color, or by changing the iris color itself. Changing the cornea color might be like putting on colored contacts.
[edit] Changing the Cornea Color
To change the cornea color, do the following:
- In the mesh which is used to create Cornea set the value of the alpha slider to 0.2 (or more if you desire)
- Change the color of the mesh to whatever color you like
- Turn off traceble

- Render!
(and remenber to smooth out everything by selecting the particular mesh going to edit buttons and clicking on set smooth)
[edit] Changing the Iris Color
To change the iris color you can either edit the iris image external from blender or you can modify the RGB values of the image when imported into Blender.
[edit] Useful Links
For rigging an eyeball, (making it stay in one place while turning to look at something) and other eyeball stuff, you can visit this site. This tutorial assumes you already have the eyeball made above or one of your own. Click.



