EMAIL: lakhia@yahoo.com NAME: Ali Lakhia TOPIC: Worship COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT. TITLE: The Pilgrimage to the Kaaba COUNTRY: USA WEBPAGE: http://www.geocities.com/lakhia/kaaba/ RENDERER USED: Povray 3.1g for Windows TOOLS USED: Photoshop 5.5 (splicing pieces together from output of 2 machines & conversion to jpg), Bryce 4.0 (height fields), CS-RCS 2.5.140 for Windows (version management) RENDER TIME: Approximately 3 days, 6 hours HARDWARE USED: AMD K6, 233 MHz, 64MB RAM & Pentium III, 550 MHz, 256 RAM IMAGE DESCRIPTION: My Motivation: End of last year, I went to Mecca, Saudi Arabia and visited the Holy Kaaba. It was a very enriching experience. I was most impressed with the Islamic architecture and wanted to capture it from my memory into something that would last. I thought this would be best done with a 3D rendering program. I was planning to use Bryce to create the scene. However, it is hard to manage a complex scene with a few thousand objects in Bryce. I had heard of POV-Ray and decided to give it a try. As I was browsing the POV-Ray site, I came across the IRTC competition site and noticed that the theme was worship. You may consider this to be a coincidence. I don't. I decided at that moment that I was going to take part in the competition. Also, having a deadline made me all the more determined to give this project a high priority rather than putting it in the back burner where it may have lingered for some time and then eventually forgotten. About The Kaaba: Every year, over 2 million Muslims from all over the world go to Mecca to perform the Hajj (or pilgrimage). The Hajj constitutes as one of the pillars of Islam and is obligatory for every Muslim who is financially and physically fit. One of the rites of Hajj is to circle the Kaaba, join in prayers and seek God's forgiveness. The sacred nature of the Kaaba, also known as the House of God, predates Islam. Tradition says that the Kaaba was built by Adam and was the first house that was built for humanity to worship God. It was rebuilt by Prophet Abraham and Ismail. After sustaining damage from a flash flood, it was reconstructed by Prophet Muhammad. The Hajj pilgrims wear very simple white clothing which erases any distinction between people's status, class and culture. All are equal when they face towards the Kaaba, crouch with their forehead touching the floor in submission, and worship their creator. DESCRIPTION OF HOW THIS IMAGE WAS CREATED: My Strategy: In any 3D scene, there is a trade off between realism and rendering time. Initially, my strategy was to go strive for realism without much attention to complexity. To achieve realism, my only resources were pictures of the Kaaba found on the internet. To my knowledge, measurements or blueprints of the Kaaba's architecture are not publicly available. Therefore, I printed the pictures of the Kaaba and took measurements of everything. Then I adjusted the measurements for perspective distortion and used those to size the objects. Soon, I realized that my scene was taking a long time to render. The walls were being rendered at 1 pixel/second without focus blur or area lights! With both of them turned on and adding a dozen lights, it took 2 days just to draw most of the sky. Consequently, I ditched the idea of adding objects inside the walls (like ceiling fans and chandeliers). Also, the walls are much wider but I chose to keep them down to four layers since they would not visually impact the scene as much. Furthermore, several objects on the roof of the walls were never added due to time constraints. Lastly, I rendered the final scene without area lights, focus blur and extra lights because I would have missed the deadline. Methodology: I extensively employed prisms for the minars. The arches for the upper walls section were created using a quadratic spline prism (cubic spline was too smooth and I needed the top of the arch to be sharp). The glow from the lamps, minars and walls were made using media emission. The orange haze in the sky was created with a ground fog. I tried using a surface of revolution to make the domes but preferred a dome made up of two cones and a cylinder. The building location, color, size and window configurations were all chosen at random. The glowing of the windows were done by simply differencing out a cube with a random diffuse color and a high ambient value, again chosen at random. The people, who are in a crouching position with their forehead touching the floor, consist of very simple primitive objects. The color of their clothes and their size are varied randomly by a small amount to add variance. The lighting for the entire scene was mainly generated from two lights. Both of these were behind the camera to prevent any shadows from falling towards the camera. This was done because the Kaaba is very well lit from all around so shadows fall away from the center rather than towards it. A third shadowless light ensured that nothing in the scene was pitch black. Other lights were positioned in the lamps on the floor and in the minars. The mountains were generated in Bryce. The mountain in the front and in the far back are the exact same mountain just scaled and translated differently. To achieve the effect of mountains getting darker as the distance progressed, I made all the lights fade with distance. Challenges: 1. I do have programming experience. But, I knew nothing about POV-Ray. I printed the whole POV-Ray manual and studied it for about a week to familiarize myself with it. 2. I have done 3D modeling before. Mostly, I have used Bryce to construct scenes with about a few dozen objects. This project, on the other hand uses over 15,000 objects. Luckily, I did not get overwhelmed because I soon realized that having everything in one file was not a good idea. 3. The minars are shaped like an octagon. However, they are not a perfect octagon since the size of the octagon increases or decreases as height varies. Therefore, instead of using a single prism for each segment, I utilized a prism for each side of each segment and rotated it 8 times. Also, the prisms had to be tilted at an angle so that each side aligned correctly and for the shape to look seamless. I spent 3 straight days working on the trigonometry. 4. The curving of the outer walls of the Kaaba was tricky. My plan was to clip the joining sides by the same angle using a plane. Then, I would position them so that no seam would be visible and the domes on top of the lower walls would not look awkward. My plan almost worked. The top wall section looked perfect and the back domes aligned well. However, the front dome was very small and looked like a convex disk. Another problem were the lower pillars. To conserve the number of objects, instead of using a half pillar on either side of each section of the wall, I used a full pillar on the left side and no pillar on the right side. This resulted in a slight misalignment. At the curvature were 1 full pillar and 1 half pillar with a half pillar gap separating them. Needless to say, these were major flaws and needed to be corrected. I tried various clipping angles for both sides but fixing one problem lead to others. I finally caved in and used a "difference hack" to delete the abnormalities. 5. I was tempted several times to use image maps. Instead, I experimented with normal maps, color maps, and textures, to achieve what I desired. The only place that I did use an image map was for the Kaaba itself since it had letterings in Arabic sewed in golden thread. 6. Obtaining the right glow for the wall sections was tough. I wanted a cone shaped glow that would taper off at the ends. I tried various media effects but none would possess the soft edges that I desired. I almost gave up. Then, I had an idea to reuse the spherical glow macro that I had used for the minars, difference out the bottom half, and stretch along the y-axis. This worked and is what you see in the final image. Acknowledgment: Referenced Gilles Tran's makelamp.pov file at: http://www.oyonale.com/ressources/english/sources03.htm to create glow effects. Pictures of the Kaaba used for sizing objects can be found at this address: http://islam.org/Culture/MOSQUES/Makkah/images.htm History of the Kaaba, used in part, to write "About The Kaaba" section in this file: http://islamicity.com/mosque/hajj/hajjintro.htm