I can’t wait for the European release of Cars 2! From the screens that I have seen and the amazing Cars 2 Artworks, I really can’t wait to check it out. I haven’t watched any Cars 2 Trailers cause I really don’t wanna to ruin my experience when I’m gonna watch it!
Anyhow, let’s get back to the Tutorial; I have been planning to do a version of my 1950 Vickylane as a Cars character for a while now. I thought this is going to be so easy to do, how hard it can be, right? It’s just a plane with simple eyes!
Well, I wanted to be able to pose the Cars eyes in different poses and facial cars expressions (if you can call them that), so painted textures were out of the question. I really wanted to do this using procedural texturing cause I’m sure I can get a nice level of control and tweaks without going back and forth between Photoshop and Maya, trying to get that looks just right.
So I created a couple of setups, some of them using 2d ramps within ramps but nothing was working exactly as I wanted! I was so close to giving up on the procedural textures way and just do the Pixar Cars eyes texture in Photoshop. I had one more trick up my sleeve, an idea which I thought that it has to work, well at least I hoped it will.
So the Idea is pretty simple, I used the same concept that you would use to create texture for regular eyes texture, but with a twist
So let’s start! First of all, let’s define the parts of the cars eyes.
A. The windshield is the eye white;
B. We create a nurbs sphere which will act as our iris and pupil and we modify it by squishing one of the sides of the sphere as flat as you can. You might need to add an isoparm to hold the middle edge of the sphere. Feel free to use a polygon sphere. I just like using nurbs sphere for eyes texturing cause they are easier to handle and to modify without worrying if the sphere will hold its spherical shape.
C. Give it a name like Right_iris_pupilSphere, cause we will have a couple of spheres to create and this way we won’t end up with an outliner that has nurbssphere1, nurbs sphere2 and so on.
D. Duplicate the already created nurbs sphere for the iris and pupil, this new nurbs sphere will act as our cornea on which we will have that nice highlight, sparkle in the eyes. Don’t forget to resize the cornea nurbs sphere just so it’s slightly bigger than the iris and pupil nurbs sphere.
duplicated-nurbs.png
E. Before we start working on the Textures select each of the nurbs sphere we just created, and in the Attribute Editor under the nurbsSphereShape tab scroll to Render stats and uncheck Casts Shadows.
Now let’s build the Cars eyes procedural textures. I will be using VRay for Maya for the shading and rendering Tutorial
1. Let’s start with the pupil and iris eye texture, we start with a VRayLightMtl and call it something like VRayLightIris it’s the same as Maya’s Surface Shader. I’m using this type of texture cause I don’t want light to have a diffuse and specular effect on it, I just want to see the texture without light effecting it.
2. Next we create a 2d texture Ramp, call it RampIris middle click drag and drop it on the VRaylightMtl VRayLightIrisThat we just created earlier and link it to the color slot.
3. let’s work on the color of the Cars eyes Iris. Double click on the Ramp RampIris. Make sure that the Ramp Type is a U Ramp.
Here are all the colors and position that I have used for each color, feel free to experiment with any colors you want and please feel free to share your setup. I would love to see what you guys come up with… back to the colors:
color 1: Selected Position 0.870; Black Color
color 2: Selected Position 0.830; R:61; G:133; B:148
color 3: Selected Position 0.690; R:109; G:228; B:255
color 4: Selected Position 0.575; R:44; G:67; B:108
4. The colors of the Iris look good now, but we still need the Iris Texture, the lines we see in the Iris, and we will create that using a 2d Ramp as-well. Just call it IrisTextureRamp this time make sure it’s a V Ramp Type. Now for the colors, with this one we will use only 3 colors. Again, feel free to experiment.
5. Once we have the Ramp colors set, we just have to do some tweaks to the V Wave, Noise and Noise Freq to get the desired effect.
V Wave: 0.328
Noise: 0.305
Noise Freq: 0.570
you should have something that looks like this:
6. I almost forgot this important step, double click on the place2dTexture that is linked to the IrisTextureRamp that we where working on in step 5. Make sure to have Repeat UV 1.000 and 35.000
7. Still in the place2dTexture we just have to make one more small change, if you look up in the same window you will see Translate Frame. If you keep it to 0.000; 0.000 as it is now, the lines will look just too regular and we want those lines to look irregular and crazy. To fix that just change the first input box of the Translate Frame to 0.700 (which translates/moves the ramp in U) and leave the second one 0.000 (which translates/moves the ramp in V).
8. Now double click on the RampIris we created earlier, click on the 2nd circle top down to select color 2 from the Ramp, now in the Hypershade window middle click and hold the IrisTextureRamp. Now just drag and drop that ramp on the selected color slot, this way the ramp will replace the color we had there just to add more texture to the eye’s iris.
9. Select IrisTextureRamp still in the Hypershade window go to Edit > Duplicate > Shading Network, this way we duplicate the Ramp and the place2dTexture linked to it so we don’t have to go over steps 6 and 7. Now we should have a new ramp called IrisTextureRamp1 or whatever you decided to name your ramp :).
10. Double click on the IrisTextureRamp1, scroll down to Color Balance, double click on the white box where it says Color Gain, it should open up the color window. Make sure to have HSV selected and your Numeric Input. Now in the window you should see:
H: 0
S: 0.000
V:1.000
Now just type in the V input box: 1.5 and hit Enter, you should see the ramp become a bit lighter than the other one, we will use that to have some color variation in the eye iris texture.
11. Double click on the RampIris we created earlier, click on the 3rd circle top down to select color 3 from the Ramp. In the Hypershade window middle click and hold the IrisTextureRamp1, now just drag and drop that ramp on the selected color slot, this way the ramp will replace the color we had there just to add more texture to the eye’s iris.
Iris Texture color is done WOOOOHOOOOO!!! I know it feels like a long process but I really want to make sure you guys understand the procedure.
Ok then! Let’s start working on making this eye look believable! cause if we add this texture on the Eyes that we already have created we will get something like this.
As you can see although the iris texture is looking really nice, the Cars Eyes look dull and lifeless, so let’s do something about that!
12. We start by creating a VRay Blend Material name something like EyesVRayBlendMtl double click on the VrayBlendMaterial and the Attribute Editor should look like this.
13. Now with the VRayBlendMaterial still selected, middle click drag and drop the VrayLightMtl VRayLightIris into the Base Material slot of the VRayBlendMaterial
14. Create a new VRay Light Material and name it FakeDepth and change its color to black.
15. With the VRayBlendMaterial still selected, middle click Drag and drop the new VrayLightMtl FakeDepth into the Coat Material 0 slot of the VRayBlendMaterial
16. The Vray Blend Material looks a bit dark now, but we only want it to be dark only a part of the eye just to give it that inner shadow feel which gives it that depth feel, so we do that by creating a new Ramp. Call it something like rampFakeDepth which has only 2 colors, a light Grey and Black we will use this Ramp as mask to mask the black VrayLightMtl FakeDepth that we created and linked earlier.
Ramp Type : Circular Ramp
Interpolation: Exponential Down
Grey Color: Selected position 0.675
Black Color: Selected position 0.400
17. Now with the VRayBlendMaterial selected, middle click Drag and drop the new rampFakeDepth into the Blend Amount of Coat Material 0 slot of the VRayBlendMaterial
18. Select the Eyes and assign the VRay Blend Material to replace the old one we had there, the result is looking far much better. You can see that the fake depth makes that sphere look like it has depth.
19. We are almost there! Just a few tweaks and we are ready to go. Create a new VRay Material and call it ShinyLayer, this material will act like, as the name implies, a shiny reflective layer and also will add some extra depth to the eyes by doing some tweaks to the index of Refraction of the shader.
20. Double click on the new VRay Material ShinyLayer and let’s tweak it, so it looks exactly as we want it. As you can see, I used an IOR (index of refraction) under the value 1.0 just to get that reverse magnifier glass look, which will add a bit of depth to the Cars Eyes Texture, here are the settings
21. Now, with the VRayBlendMaterial selected, middle click Drag and drop the new ShinyLayer into the Coat Material 1 slot of the VRayBlendMaterial
22. If we do a test render, we will see that the VRay Blend Material will be all shiny and refractive/transparent, which makes the eyes look too dark and foggy. We don’t want that, we just want it a bit shiny and a bit refractive. So we have to find a way to make the eyes just a bit shiny while at the same time using that refractive and IOR to our advantage to add some depth to the eyes.
23. And we will start by creating one of my favorite utilities nodes in Maya, the Sampler Info which can be found under Utilities.
24. Create a new Ramp, select the Sampler info that we just created, middle click Drag and drop it on the newly created Ramp, and select other from the menu box that appears.
25. The Connection Editor will open up, click facingRatio on the left side box and click the plus icon next to uvCoord to open it up, once that is open select both uCoord and vCoord.
26. Tweak the Ramp that we just connected to the Sampler Info node, again a 2 colors Ramp.
Ramp Type: V Ramp
Interpolation: Exponential Down
Dark grey: Selected position 0.735
Black : Selected position 0.165
27. Now with the VRayBlendMaterial selected, middle click Drag and drop the new Ramp into the Blend Amount of the Coat Material 1 slot of the VRayBlendMaterial
This creates a Fresnel-like reflection where the reflection is more visible around the sides of the object and is less visible head on.
You can try to get the same effect by using the VRay Fresnel node, but I do like this technique more cause you have so much control on over how much or less reflection you want.
Guess what! The Texture is done! Now let’s have a look at our texture, with all its inputs and outputs!
Here is the render of what we have so far! As you can see, the eyes have some nice Fresnel reflections on the sides and the IOR (index of refraction) squeezes the pupil area and gives it a more depth look.
But the eyes still look dead, what is missing? The specular highlight shine, of course which makes those eyes look shiny and alive!
How to create Pixar-like specular Highlight for the eyes:
This can be done in different ways, you can either do it by having a light source that shines only specular with the diffuse checked off. But in VRay for Maya Light linking is still not working as it should be, maybe they will fix that soon. (haven’t tried VRay 2.0 yet, maybe that fixed it. I’ll keep you updated once I try VRay 2.0)
So this is one of the reasons why I’m using this other technique, cause it works great in both Maya’s Mental Ray and VRay.
So let’s do this!
If you are following the How to create Pixar Cars style eyes, make sure to clear your Hypershade by going to Graph > Clear Graph
A. We start by Duplicating the eye’s sphere or we create another one and try to fit it on top of the eye texture.
B. Create a VRay Material and name it EyesHighlight, make sure the Diffuse Color is white and you can make that white color even more white, double click on the white box where it says Diffuse Color. It should open up the color window. Make sure to have HSV selected and your Numeric Input, now in the window you should see:
H: 0
S: 0.000
V:1.000
Now just type in the V input box: 1.5 or even 2 and hit Enter, it will make the white color look even shinier.
C. Create a new Ramp, but this time we have to make sure that the Ramp is a 2D projection we can do that by going into the Hypershade window: Create > 2D Textures > and check 2D Projection instead of 2D normal. This will create a controller that we can move around and place/project the highlight wherever we want.
D. Now just create a new Ramp. You will notice that this ramp is different than the 2D normal map, it has an extra 2D projection node linked into it and a place 3dTexture node linked into the Projection node
E. Now that we have our 2D projection Ramp created, we can start tweaking the ramp; double click on the ramp to open up the Attribute Editor. We should have a 2 colors Ramp black and white:
Ramp Type: Circular Ramp
Interpolation: Linear
Black Color: Selected position 0.070
White Color: Selected position 0.030
F. In the Hypershade, select the created projection node Now with the EyesHighlight selected, middle click drag and drop the Projection node into the OpacityMap.
G. Now let’s assign the material to the outer sphere that we created at the start of the cars eyes tutorial.
H. Before we hit render, we just have to do one more thing: select the place3dTexure node that is linked to the Projection node. Press w to select the move tool and in the perspective panel just move the controller in front of the eye. Just move the controller in front of the eye until you have it placed exactly where you want it.
Now just hit render!
You can Tweak how big or small you want the highlight to be by tweaking the Ramp that we created. If you make the white area bigger in the Ramp, the highlights will be bigger.
If you move the black color farther than the white color, you will get softer edges on the highlight.
Note you can’t add the same material to both eyes cause each eye has to have its own 2D projection locator.
So, after you finished creating this texture for one eye, just duplicate the material in the Hypershade by going to Edit > Duplicate > Shading Network
Don’t just select the VRay Material and hit Ctrl+D or Cmd+D cause it will only duplicate the VRay material without all the inputs and outputs linked to that material.
After you apply the material, just move the newly Duplicated place3dTexure node in front of the 2nd eye.
Feel free to create 3-4 highlight to the eyes, maybe something more Anime like! Hmm… maybe I’ll even try that.
I really can’t wait to see what you guys are going to come-up with! Feel free to send me some of your renders and I will have a couple added to the end of this tutorial as examples!
hehe I was sharing your post on Twitter when I realised it was your website 😉
thanks Oasim, I am learning Vray at the moment so this post is great!
Hey Olivier! Thank you so much mate, really glad that you found this helpful means a lot! VRay for Maya is great mate, I love using it! I’m planning to write a couple of VRay Lighting tutorials soon, just gotta find the time.
Amazing! You make this look so easy, but as a non-designer this is simply a masterpiece. Great work Oasim.
Thank you so much Reza, well I tried to explain this as clear as possible cause it is really easy to do :), and so glad that you like it so much really means a lot!
Superb Tutorial man……………….. It’s really hard to find tutorials like this with everything explained…………… Thank you very much……………. If possible post about particles and shaders………………………. Seeking reply……………………
Thank you so much, really means a lot that you enjoyed it, I hope you found it helpful. I will def be adding some new tutorials soon, so make sure to check out the website!
[…] 6 How to create Pixar Cars style Eyes using Procedural Texturing in VRay for Maya: […]
Wonderful really like the pixar rendering, any video tutorial?
Thank you so much! Really glad you like it. Well I’m planing to do a couple of video tutorials soon.
Hello Oasim how are you, I like this tutorial so much and I want ask you if I can make approve to copy this tutorial on : http://www.cornerofart.com under your name, or I want create user for you and you copy this tutorial and you can create posts anytime.
Waiting for your replay.
Thank you.
Thank you so much for the offer, but for now I’m not interested in writing on other websites mainly because I want to grow Pixelophy and to focus on my art. You can share a Brief presentation of the tutorial like the first paragraph of the tutorial and then with a link that says read more on Pixelophy, but you can’t copy the tutorial to your website.
Thank you.
You welcome pro.
Ok I want take the some paragraph and read more to pixelophy.com, I think that is great.
Thanks my friend.
Yeah you can take one paragraph and a photo with a link to read the rest of the tutorial on Pixelophy.com also don’t forget to add my name Oasim Karmieh, Let me know when you have it on your website, would love to check it out.
Welcome mate!
thank you very much sir….
this is what i am searching for a long time…..
thanxx once again
Pleasure is all mine, I hope you found it helpful.
Oasim Hey you should do a studio lighting setup for vray and maya .That would be awesome man .
Hey Shaun I’m working on the studio lighting setup tutorial for vray and maya, hopefully I’ll have it up by next month.
Hey Oasim thanks allot .Once you publish it just email me or something .I am sure you remember me from DT as fusedgore
[…] CG artist Oasim Karmieh using procedural texturing in VRay for Maya. Check out the tutorial HERE.Artist – Oasim Karmieh www.oasim.com- Image used with the permission of the artist […]
nice tutorial thank you for the detailed explanation,i used to work with mental ray, but your renders in vray encourage me to give it a tray.
Pleasure is all mine! Well this tutorial works perfectly with Mental Ray as-well. You should def give V-Ray a try as-well it’s never a bad idea to know more than one rendering system.
Great work and nice tutorials. I have to ask, how did you get your ‘selected color’ swatches to appear so big. Mine are thin in comparison!
Hey Lee,
So glad you enjoyed the tutorial it really means a lot! By swatches do you mean the color wheel?
Hi i am new to maya and still trying to learn this stuff. I find this tutorial very useful thank you so much for making this very informative!! I followed through with this using mental ray and was able to achieve almost the same results the only thing i was still hoping to do is to duplicate the specular highlight thing on the eyes. like i wanted it to have 2 for each eye instead of just one. I am hoping you can shed some more light on this part. Thanks so much!
Hey Lance,
really glad that you found the tutorial helpful, you can create the 2nd specular highlight using the same technique using the VrayBlendMaterial, first duplicate the highlight shader and then add both to the blend materials and then using the place3dtexture to resize and move the 2nd highlight let me know if this is helpful.
Hi oasim,
Like Lance I’m trying to reproduce your technique in Maya using Mental Ray using Blend Colors and Layered Texture as a substitute for VRay Blend Material. The Blend Colors seem to be working fine but the ramps aren’t behaving as expected.
I’ve checked to make sure that I’m using spheres with the front half flattened and not any other geometry. I’m testing this with different lighting such as area lights and point lights but my results are still the same for steps 17, 27, and F from your guide. Ask for some help, please?
Step 17: the ramp created for the blend amount returns a value of 0.89 producing a large moon shaped black crescent across the eye texture.
Step 27: after attaching sampler info’s u and v cords in facing ratio to the ramp, this ramp seems to return a value of 0.00 for blend amount producing completely black texture.
Step F: when attaching the projectile node to the opacity map, the resulting texture is completely white.
Hi awesome to tutorial. I am wondering how do you rig such eyes or animate them in maya. I am trying to make this kind of character for work and the eyes is kinda of a challenge coz the eyeball doesn’t move just the pupils.
images
hello,pixar Cars model structure of the eye is that right
[…] awesome stories. Google (no pun intended) the phrase “Pixar eyes” and you will find scores of tutorials, white papers, literary criticisms, journal articles, and Masters theses — all dealing with […]