Home Technical Talk

cman2k's eyeShader

polycounter lvl 17
Offline / Send Message
cman2k polycounter lvl 17
Sup polycounters!

I've been trying to learn how to write my own shaders, and in the process I decided to work on a 3ds Max shader for the community. I didn't want to make another Do-it-all shader, we seem to have plenty of awesome versions of that, so I decided to do something more specialized.

It's been a great learning experience for me. I hope some people find it useful. Feel free to ask questions, and please post your results!


eyeShader_preview.jpg


Features:
  • Diffuse maps: Separated Cornea and Iris Diffuse and Normal maps with seperate texture coordinates
  • Normal maps: Separate Cornea and Iris Specular controls
  • Parallax Offset Mapping (POM): used to simulate Iris Indentation and Cornea Refraction. Hard to 'see' in still image.
  • Pupil Dilation: Similar in concept to Valve's pupil dilation, this is done entirely through UV math!
  • Cubemap Reflections: Cubemap-based reflections with Strength, Contrast and Fresnel Falloff controls
  • Image-based Ambient: Cubemap-based Ambient lighting
  • Hemispherical Ambient: Hemispherical ambient lighting in UV-space.
  • Shadow Map: Shadow map used to simulate eyelid-shadowing.
  • 3-Light support!

Possible Future Features:
  • "bounced" specular for iris interior
  • Specular "Shape" mask? What if we can mask specular to a shape, to fake a light source?
  • "negative" fresnel strength support (for flipped fresnel calculation) per Pior's suggestions
  • "hemisphere shadowing", as an alternative to shadow-mapping. might be more flexible and overall better.
  • Investigate adding fake chromatic abberation to pupil specular, maybe with a texture?
  • optional second cubemap for ambient
  • Tint masking: 3 color mask texture (Iris outer, iris inner, pupil)?
  • 1D tint masking?: what if we just map a black&white iris to a 1D ramp? more color range and control? harder to author?

**DOWNLOAD HERE!**
eyeShader_buildup.gif

Replies

Sign In or Register to comment.