Shaders

A Selection of Shader Tasks

The following list is a selection of shader tasks, in no particular order, I completed while working at Mimic Technologies, Inc.
List items with active links will take you directly to additional sample material on this page showing intermediate or final results.

Materials and Shaders

When I first arrived at Mimic, the simulator was largely using fixed-function materials and a great deal of "programmer" art. My first mandate was to develop a pipeline to get artist generated content from Maya into the simulator. I also began the process of converting the simulator to a modern shader-driven material system. With few exceptions, I have developed all the materials and shaders in the simulator. Below you will find some "before-and-after" comparison images.

Layered Shaders

In order to achieve tissue effects such as sub-surface scattering, translucency, and varying thickness, I designed a layered shader material. The following video was created during the development of this material. Notice the embryonic pulsations visible in the lighter colored top right area of the sphere. This effect is created by animating the distance between layers and adjusting the visual parallax.

Tone-mapping / Auto-exposure shader

The next video demonstrates an auto-exposure effect created with tone-mapping. A surgical endoscope contains lights pointed in the direction of the camera view. When a reflective instrument is drawn near the camera, the intense light will cause the instrument to bloom and the auto-exposure will reduce the camera's sensitivity to the light. When the instrument is cleared the camera exposure will return to normal.

Ray-cast Reflections with Proxy Objects

Because of it's organic nature and constantly changing convexity and concavity, generating reflections inside of a human body is challenging. Traditionally simple methods, such as planar and cube map reflections, break-down in this environment. To meet this challenge I developed a method of generating reflections using ray-casts against simple render proxy objects. This has the advantage of generating correct reflections regardless of the complexity of the receiving surface.

The following set of images were taken during development and demonstrate this technique. Simple spheroid shapes are attached to the reflecting objects (in this case, the surgical instruments) and are used to approximate the reflecting surface. A debug visualization shows the positioning of these render proxy objects in the images below, however, they are not normally rendered as they are simply implicit surfaces represented mathematically in the shader.

Images of the approximated surface are projected onto the render proxy objects, then unwrapped and exported as texture maps. When rendering the reflections, surface elements receiving the reflections will cast a ray to each render proxy shape to determine if the reflection should be applied to the surface. If so, the contact point of the ray on the render proxy object is projected back into texture space and used to sample the texture map for the reflection.

The final two images show the generated texture maps (inset) and the instrument reflections applied to a surface. The next to last image shows the render proxy objects at full intensity to demonstrate the simplicity of the shape approximations. The last image shows a more realistic subtle application.

Real-time Reflections

The following images were taken during development of traditional planar reflections and cube-map reflections.