2007-04-24

Using mia_roundcorners to render eyes....

On Jeremy Birn's "lighting challenge" the discussion came to the trouble of rendering the little "glint" at the bottom of an eye, where the surface tension causes the tear fluid to form a little arc, which tends to catch the highlight, and is an important cue for us judging the "mental state" of the person we are viewing (since more fluid creates an arc with a larger radius, and hence a more pronounced highlight, and hence a more "teary eyed" look).

I immediately realized one could use the mia_roundcorners shader to acheive this effect:



Note that to get an arc between two different surfaces, the "allow_different_materials" switch must be ON. Also note that to create a "concave" arc, the surfaces must actually intersect, AND have their normals oriented "outwards" correctly (click image for detailed view):



Have fun with this tip ;)

/Z

2 comments:

Unknown said...

very cool.

Unknown said...

what does the allow_different_materials switch actually do? ie how are you finding the edge of the other material? raytracing? Or does it split up the UV's cleverly?