Friday, March 28, 2014

Sneak Peak - Texturing Meshes and New Lighting types

Here's a sneak peak of some new features I've been working on.

1) Diffuse, Specular and Normal mapping for polygonal meshes

UV indices are parsed from the mesh file (in this case a .obj wavefront file) and stored for use during the rendering pass. When a point on a triangle is hit, barycentric interpolation is used based on the UV texture coordinates of the triangle's vertices to find the correct texture value to apply to that point. This technique can be used for texture, diffuse and normal mapping.

2) Spot lighting and Directional lighting

Below we can see two spot lights shining on Mario (with global illumination).  A spot-light is much like a point light except that it emits radiance within a cone (the solid angle and direction of which are set by the user). Any object outside of this cone of light receives no direct illumination.



And here's Mario and Luigi :-)


Saturday, March 22, 2014

Chess

Here's an image of a chessboard I rendered with shallow depth of field. The pinkish hue is due to diffuse inter-reflection (color bleed) due to the (unseen) pink wall behind the camera. 




Here is the same scene rendered in perfect focus with a pinhole camera





Thursday, March 20, 2014

Meshing!

It's been a long time in the making but finally FancyRay is capable of rendering triangle meshes. As of right now, only .obj files are supported but it is my goal to extend this in the future to other formats as well (.max, .3ds, etc). Stay tuned for some cool new scenes!

In this image here, we have a blue matte bunny, a ruby dragon, marble floor, tiled walls, normal-mapped plaster ceiling all complete with global illumination and caustics.


And here is the same scene but with different materials


And here is the Venus de Milo :-)




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.