Eyeball - Iris with procedural Texture - Question

Blenderors,

I have been experimenting with creating a Pixar like eyeball using procedural texture for the iris. I was successful at coming up with a texture using “cloud” and mapping it to the the color using the normals of the iris (i.e. Map Input = Normals)
.



The iris looks great as a still image, however, when animating the eyeball (see avi ), the iris texture changes based on the a camera view. I am not sure what is causing this phenomenon. It could be the fact that the cloud texture is mapped using the normals of the iris. I used two textures as follows:



and mapped the cloud texture as such using the normals as input:


Here’s the avi clip again to see the undesired effect.

Any ideas on how to use the procedural (not image) texture while at the same time maintain a still texture?

TiGER

It’s because you are using the normals I would assume. Have you tried something besides normals?

The normal’s “dot product” is based on the normal of the face and the direction to the camera. So moving the camera causes changes in the texture. You might try using texture mapped to an object (like an empty) and parent the object to the eyeball so the texture space moves along with the iris.

The still does look great. Hope you get this to work.

Orinoco,

Thanks for the suggestion. I have done that but I don’t think I got the desired effect I was hopping for. If you notice in my still images from the previous post, when mapping using the normals, the cloud texture turns into lines pointing inwards. When using an object and the input map I get the following results, which is similar to using global or UV as input coordinates.


Any other suggestions?!

TiGER

I personally would only use procedural textures for a few select things. You should be able to make an image of the texture and save it if you don’t want to use an existing eye image texture.

Is there a way to capture an image from the current model, and use it as a UV texture? Any ideas on how to accomplish that?

I don’t see anything wrong with using procedurals. The problem you are experiencing is that you are using the Nor mapping. You typically want to use Nor for environment mapping.

I’ve been toying with the idea of a procedural iris as follows:

  1. Unwrap the iris as a cylinder from top view. One edge is used as a seam so it unwraps cleanly to a rectangle.
  2. Then scale the rectangle to fill the entire 256x256 area in the uv editor. Too small and the texture will shrink along the width of the strip.
  3. Map any procedural texture (clouds works fine) and make the Y-scale factor really small compared to the X-scale factor.

See images below; its a quick hack so it doesn’t look nice but it should give you an idea. Its basically doing a radial/cylinderical mapping on the iris.



Here’s a thread where Ammusionist used procedurals for his eyeball.

[EDIT] There is one drawback to the method above. Since the procedural texture is not repetitive/seamless, you might notice a sharp edge where the edge-seam is located. So if you’re using this with a color map it might not look good.

Wizard,

Thanks a lot for the pointing me in the right direction, that definitely works great. I followed your suggestion and unwrapped the Iris from the top view. It required a little more work, but the results were great.


TiGER

Just one crit: adjust you blend texture so the clouds texture doesn’t extend to the outer edge of the iris so much; similar to what you have in your first post. You should also be able to warp (IWarp settings) this texture with another one so that the radial lines are not too straight.

Other than that, it looks very nice. Maybe you can PM Ammusionist with your blend file (if you don’t mind). I think he would be interested in your procedural approach.

I am and I’ve been watching this thread!

I don’t mind at all!

tiger: I hope you don’t mind my post here. I took the suggestions and applied it to get close to the original post (not quite there). Here’s what it looks like with a texture to warp the clouds texture and a blend texture that uses the UV map.

Render + Material Preview




Order of textures + Clouds texture for warping




Clouds texture for radial lines


Blend texture to control color (same as yours except for color band settings and linear blend).


Ammusionist & tiger: The mesh & materials probably don’t make sense because this is more just a proof-of-concept and hopefully this can be applied in general. If you are interested in looking at the blend file, let me know and I can e-mail it to you.

Thanks for everyone who contributed to this post. I have finalized the eyeball using the procedural texture discussed in this thread. I tried to make the eye look as realistic as possible. Using the suggestions, I came up with the following


I am pleased with the results, however, the only downside is the distortion of the specular highlight on the tip of the lens.

The reason for the distortion is the subsurf modifier that I am using for the mesh. Notice the difference in the specular highlight between the first and the second image. Changing the subsurf level does not make a difference. Any other suggestion are welcome.

TiGER

Wow. That actually looks very nice. I’m not sure why the specular highlights are causing the problem. How did you get the radial lines wavy and soft?

Wizard,
Good question! I was able to make the radial lines wavy by following your previous suggestion. I used the lWrap to wrap a cloud texture to the iris lines.


To make the lines smooth, I reduced the amount the “lines” texture affects the color amount to .25. Once I resolve the distortion issue I will post the finished blend file. Thanks for the nice remark.

TiGER

This is so cool! I used a small IWarp setting earlier because the clouds texture I used had a higher noise depth and lower noise size. So I switched those around and the distortion works like yours. That helped me a lot. I can’t wait to plug this into my characters :smiley:

I’ll post my blend file in the thread I created. Thanks.

It’s the reflection of the other eye that is causing that blemish.

Have you tried applying just a hint (say 0.3 or so) of normal (bump mapping) to the lines texture?

thedaemon, I removed the other eye to eliminate that possibility, and it didn’t seem to make any difference, the reflection of the other eye is not causing that phenomenon.

Ammusionist, I tried applying a hint of bump mapping to the line texture, no changes there either.

It seems that I was not clear enough on my previous post, the problem is in the mesh of the lens. Since the lens is completely transparent, it’s hard to see that in the rendered image, but here is what it looks like in Blender.


Notice the flower looking thing on the tip of the lens, if I increase the subsurf level it gets worse. I hope this brings you all closer to the solution. Thanks again to everyone’s collaboration.

TiGER

Check to see if you have duplicate vertices (not likely). You can select the vertices around that area and smooth it (WKEY + Smooth). But it may or may not work. The only other solution I can think of is to rebuild that part of the eye from another UV sphere that matches the dimensions; shouldn’t be too hard. If you post your blend file, someone may be able to pinpoint the source of the problem.

Sorry for the confusion tiger - The normal mapping suggestion was to create a touch more realism, not to deal with the reflection artifact problem. Try adding a bit more until the lines stand out slightly.

I’ll have a look at the reflection artifacts now to see if I can come up with anything.