Monday, February 9, 2015

Thinking about tutorials

So... I was thinking about doing tutorials, and create a new page to put them. 

No, they will not be about tools and shortcuts and interfaces of manipulation/creation programs. There's a lot of them all over the immense internet!
I was thinking about doing some "how to" tutorials. This type of tutorial must become wider and better!

The legend of the perfect eye

Well... all started because I was trying to make a realistic 3D eye in Blender...
As I always do, instead of searching for a "how to do an eye in Blender" tutorial, I searched a lot of tutorials about sculpting tools, mesh editing, cycles render. And the ones about rendering made me lose my fear of nodes and search for help in "nodes editor". 
After learning all this, I tried to make the eye.

First, starting from a sphere, obviously. But I didn't know which one to chose, the ICO sphere or the UV sphere.
The ICO seemed the perfect one, because when subdivided, there's no apparent poles. The problem was when painting the vertices. Since there's no symmetry, it's hard to centralize things, something that I just discovered as priori for doing eyes...
Then I started another project, this time with the symmetric UV sphere. All was going fine, I was even able to make such realistic painting as you saw, but was there that I discovered an important point was missed:
If I did used one of the poles as the middle of the pupil, there would be a lot more vertices to paint the iris, and I could add more details!
Then, reluctantly, I erased this project and started another anew... this time with an UVsphere rotated 90 degrees for the front, like this, making one of the poles the center of the pupil, and the other, the backs of the eye.
Another problem appeared when painting: Some faces are not painted even when the mouse hover above them with a paint tool set. Struggling to  solve the problem I discovered that: 
Painting tools in Blender are dependent of your view. So, the faces that are not visible, will not be painted. Same goes for faces that are very tiny. As the ones in the sphere's poles.
This problem can be solved taking care not to let the paint tool reach the object's borders and zooming-in to paint little faces.Well, I was able to make another good looking eye. This time I needed to discover how to make it resemble an eye.
 I tried to make it shine as a real eye, so I first used the glass shader. No good, it makes the eye transparent... then I tried the glossy. No good again, as it make the eye shine too much. Then I had the idea to add diffuse shader... no good again, as it now looks firm but does not shine.Then I had the idea to add diffuse to the white part of the eye and the glossy shader for pupil and iris. Worked nicely, but then I discovered that 
Colors are differently affected by the shader's shining effect. And black is not affected at all, giving the impression of emptiness
Then I stopped to try shaders and searched real eyes through internet. I discovered an interesting effect 
No matter were you are looking at the eye, the pupil always seems to be at the middle of the iris 
Obviously I tried to imitate this effect. I came to the idea that if the pupil is plane, no matter where you look at the plane, the middle is always visible.But, the eye is round. There's no plane parts in the eye. So I had the idea to add a lent. No good. Then I had the idea to let the painted faces plane, then extrude a lent directly from the original mesh. Seemed genius, but I had problems with folds and to subdivide. Then I realized that I had to  
make a new sphere, but a little bigger and with glass shader, surrounding the painted sphere 
Worked properly. but I noticed that Real eyes have a bulge in the front of the pupil.
I made this bulge with the sculpting tools on the bigger sphere with glass shader, but then the bulge did not work well to let us see the pupil in the smaller sphere. Struggling for almost an entire week I discovered that we need to transform the iris area into an inside-out round bowl. 
All worked perfectly, now I had a real eye!!!!But... the pupil was unproportionally big for a real eye, so I had to struggle to find the perfect ratio 
The perfect ratio is: For the sphere diameter, the "bowl" must have 1/12 of depth and a diameter ratio of -2.6 in the edge. Same goes for the bulge in the bigger sphere.
My experience works to any 3D creation program with support for shaders and transparency, not only Blender. So, it's the recipe for a perfect closed-object eye.

No comments:

Post a Comment