Wednesday, March 12, 2014

Putting it all together - so far

Although there are still many features currently under development (spoilers -- These include tone mapping for HDR images, the ability to import 3D mesh files, amongst others) Here are some images that combine many of the features already available in FancyRay. These features include

Glass
Mirrored and glossy mirrored surfaces
Perlin Noise
Anisotropic Reflection / Metallic Surfaces
Spectral Rendering
Iridescence
Fluorescence
Texture Mapping
Normal Mapping
Matrix Transformations of camera and scene objects
Spheres, triangles, boxes, and plane primitives
Motion blur
Global Illumination
Caustics
Point, Area, Sphere and directional lights
Soft shadows
Lens Distortion (Wide Angle, Fish Eye, etc)
Depth of Field
Bokeh

See which of these effects you spot in the images below!




Wednesday, March 5, 2014

Normal + Texture Mapping Combo

In this image I've combined normal mapping with texture mapping (see earlier posts) to create objects in the scene that are very high quality. In this image we see many of FancyRay's other effects including depth of field, lens distortion, orb lights and soft shadows.








Tuesday, March 4, 2014

Normal Mapping

After a bit of a hiatus I have implemented normal mapping! Normal mapping is a technique used for faking the lighting of bumps, dents, etc without having to actually modify any actual geometry. A "normal map" texture is applied to an object where each pixel in the texture represents a perturbation of a normal. These are used to modify the normals on the object's surface and are used when shading calculations are performed.


Sunday, December 15, 2013

Spectral Rendering Part II - UV Lighting and Fluorescence

My latest feature for FancyRay was the introduction of Fluorescent materials.  Fluorescent materials work by first absorbing the incoming frequencies of light at varying degrees based on its unique wavelength absorption function, and then modulates the absorbed frequencies by a predetermined mapping function from absorbed -> emitted. This mapping function, shifts the wavelengths towards higher values and modulates their intensities.


Scene rendered using normal daylight spectrum (CIE Standard Illuminant D65)


And here is the scene again rendered using a Black Light spectral power distribution


Thursday, December 12, 2013

Aperture Shape and Bokeh

Up until now the default aperture shape has been a simple disk, however now the aperture shape can be directly changed by the user. Some examples of possible shapes include triangle, diamond, pentagon and other higher order polynomials.

The main effect of this is that out of focus highlights in the scene will take on the shape of the aperture. This effect is known as "bokeh."

Here are some images demonstrating the effect.

Here is a heavily out of focus image with a triangular aperture. Notice the highlights on the bubble and the ball in the background appear triangular.


And here is the same scene with a diamond shaped aperture




Sunday, December 1, 2013

Filtering

This is a simple extension to FancyRay which allows the user to add in different filter types to the final image rendering. Here are some filters applied to a Cornell Box with two bubbles.

Original


     GrayScale

Sepia

Negative

Wednesday, November 27, 2013

Spectral Rendering and Iridescence Through Thin Film Interference

I really wanted to include iridescence as a feature for FancyRay and so in order to do that I had to include spectral rendering, which is where instead of using the conventional RGB model, light is treated as a combination of electromagnetic radiation at various wavelengths and intensities. Each wavelength of light interacts with the iridescent surface and depending on the thickness of the surface and the angle of view, the outgoing wavelength differs due to interference with other wavelengths.  The outgoing wavelengths are then converted to their XYZ tri-stimulus values using the CIE color matching functions and then finally the XYZ tri-stimulus values are converted using a matrix transformation into their RGB values in order to be displayed on the screen. The result is a nice rainbow effect. However, to avoid banding, Perlin Noise is used to get varying widths for the surface.

Below is a completed example of my iridescent bubble shader.



The image below is a semi-finished prototype. You can see the iridescence in place but the Fresnel term and specular highlight and refraction have not yet been added.