Trip To Vrindavan

for Rendering Competition-Computer Graphics 1

By
Devikalyan Das
Pranay Raj Kamuni

Group 8

The goal for the scene is to replicate our trip to Vrindavan, India (the abode of Lord Krishna) where we tried to show our boat trip on river Yamuna and capturing the beautiful scenic and serene beauty. To transform the idea into reality, we had brainstormed every idea possible and finally, decided to successfully recreate the scene based on whatever we learnt during our Computer Graphics course to achieve as much realism possible and also showcase different features of our ray-tracer. The scene was built around the statue and different features were added progressively to make it identical to the trip.

Scene Building

(using Blender)

Instead of arranging the objects blindly in the ray tracer, we used Blender to compose the scene. The scene composed of around 1.9 million faces. New obects were added progressively. All details can be found in scene_new_cp.obj file.

We observed that a few objects did not have enough details, so we performed mesh subdivision in blender to make the scene realistic. We also used a python script in blender to get the correct camera position and vectors such that they can be directly used in our ray tracer.

We enabled bump mapping on our objects by making changes to the obj.cpp file such that it takes in Textures library as a parameter similar to the Material library and apply bump mapping based on the name of the objects. We observed that a few objects displayed tessellation, so we selectively applied smooth triangles on it to remove this effect.

To give a realistic effect to our scene we used a Depth of field camera focusing on the statue which blurs the mountains in the background, used a spherical area light to produce soft shadows, and applied bump mapping on boat, rock, flowers and mountains.

To bring the effect of playing in the river to life we created waterdroplets using blender, and since we were using a pinhole camera instead of a camera with lens, we introduced a plane infront of the camera with water droplets on it and generated the image.

We did not implement any new concepts other than the one which we studied during our course.

./models/scene_new_cp.obj
./main/a_scene.cpp
./rt/loaders/obj.cpp

Highlights

Lights

In our scene we used one AreaLight and one point light. The lights are focussing from a very distant region with high intensity to give realistic effect. This part of the image denotes the soft shadows due to area light.

./rt/lights/arealight.h ./rt/lights/pointlight.h

Textures

We applied different image textures on to the objects based on triangle coordmappers which helped to enhance their realistic effect. The left and right part denotes without and with textures and mappers respectively.

./rt/textures/imagetex.h ./rt/coordmappers/tmapper.h

Smooth Triangles

We used them to correct the tessellation which result due to normal triangle mapping. The left part of the image is without smooth triangle and the right one is with. The difference of this effect on the legs of the statue and the surface of the river can be seen.

./solids/striangle.h

Image

Environment Maps
and
Perlin noise

It will be incomplete without environment maps, as these provide the background(sky) when the ray find no intersection. We used Perlin noise as the background colour for their ability to mimic cloud like effects.

./rt/coordmappers/environmental.h ./rt/textures/perlin.h

Bump Maps

We like the effects of bump maps and hence used them on more than one objects( stone, mountain, boat and flowers). We faced issues while implementing them hence, modified the obj.cpp such that it can be applied to the objects of our scene correctly.

./rt/loaders/obj.cpp ./rt/primmod/bmap.h

Materials

Different types of materials to achieve the desired effect in our scene. Glass material for river and water droplets on the camera lens. Cook torrance material for the statue. Remaining objects are made up of lambertian material.

./rt/materials/glass.h ./rt/materials/cooktor.h ./rt/materials/lambertian.h

Image

Performance Gains

To boost the speed of our renderer we used acceleration structure, BVH using the Surface Area Heuristic to load the primitives of our scene. Inaddition to this, we also implemented multi-threading using Open MP for parallelizing the renderer such that we reap the benefits of multi-cores in our cpu.

./rt/groups/bvh.h ./rt/renderer.cpp

DOF Camera

A Depth of Field (DOF) camera is placed near the boat which focusses on the statue and blurs all the background (mountain). We tried normal perspective camera, but DOF camera suits our scene description. The left side of the image is perspective camera while the right side is DOF camera.

./rt/cameras/dofperspective.h

Special Effects

We created water droplets as if they are sprinkled on the camera lens. These droplets are created using blender and they are put at random positions on a plane infront of the camera. These objects are made up of glass materials to mimic water droplet effects. This increased the number of faces for realistic effect.

Credits