|
|
|
Objects are constructed in Pov-Ray using geometric shape primitives such as spheres, boxes, and cylinders.
These shape primitives are combined using set operations (union, intersection, difference, etc.) to create
a desired object shape. In Pov-Ray, this is called Constructive Solid Geometry (CSG).
The images above demonstrate how CSG was used to create "framing stock" for a picture frame. These cross-section illustrations show that the stock was constructed by rounding off a box (shown in blue) with two cylinders (in red). This basic framing stock is further ornamented by the addition of another raised box (green), and two raised flutes (cylinders in yellow). The illustration on the left shows cross sections of the actual shape primitives and how they are combined together. The second illustration shows the Object resulting from a CSG Union of these primitives. This virtual "framing stock" Object can now be manipulated as a whole without concern for the individual components from which it is constructed. It can be moved, rotated, stretched, and even used as if it were a shape primitive to create other, more complex objects. |
|
|
|
|
In the first illustration above, the framing stock has been mitered, cutting it at a 45-degree angle on
each end. This was done using a CSG difference operation using an infinitely thin Plane object
as a virtual saw blade (details not show).
The second illustration demonstrates the real magic of ray tracing. Objects can be assigned very realistic textures. A texture mimics a real a world material such as wood, glass, stone, metal, etc. There are hundreds of predefined textures available in Pov-Ray or any quality ray tracing software. These textures can be customized or created from scratch and refined by the artist in order to achieve the desired effect (much like mixing oil paints to get "just the right" color for a painting). In this case I have created a warm, heavily grained wood texture for the framing stock. |
|
|
| The image above shows the completed picture frame object constructed using four individual pieces of the previously constructed framing stock. This CSG union is now an object of it's own. It can be moved, rotated, stretched, and used as a component of more complex objects. |
|
|
| The pedestal was composed of a cylinder as the base (blue) and another squashed cylinder as the top (green). For aesthetic value and realism the edge of the pedestal top was rounded using a torus shape primitive (yellow). | |
|
|
|
The two images above illustrate how a CSG difference was used to "cut" flutes into the pedestal
base.
The first image shows the objects use to cut the flutes (in red). These were differenced (subtracted) from the pedestal base (blue) resulting in the object on the right. |
|
|
|
| The pedestal was further ornamented by the addition of a tapered set of rings around the top of the pedestal base. Each ring was created using a series of individual sphere objects. For each ring, Pov-Ray's programming language was used to repeat a single sphere object 360 degrees around a central axis. | |
|
| Here, the pedestal is shown rendered in a white marble texture. The ornamental rings are rendered in gold. |
|
| In the illustration above, the pedestal object and the picture frame object are shown together. The picture frame has been picked up off the floor and set on top of the pedestal. |
|
| The central theme of "Emmy's World" is a play on dimensions; worlds nested within worlds. As an interesting reversal on this theme I wanted to take something from WITHIN the photo and bring it OUTWARD into the scene. In the photo of Emily, she is wearing a little necklace made of white heart shapes. This necklace was the ideal element to recreate. The heart object above was constructed as a union of two superellipsoid shape primitives. |
|
| The heart necklace is draped over the top of the picture frame in front and back and then again over the edge of the pedestal top. There are three main sweeping curves involved. The first curve, in front of the picture frame, goes from the top of frame to the top of the pedestal (shown in red). The second curve goes from the top of the frame to the top of the pedestal in back (green). The third curve joins the bottom of the other two curves (in blue). |
|
|
|
To join the curves smoothly it was necessary to leave a break in a couple of places and fill with a
carefully placed filler heart (shown in yellow).
I spent several days attempting to individually place each heart bead in the necklace in order to achieve a realistic draping effect. I was not at all happy with the result. What I really needed was a mathematical formula, which could be used to calculate the slope of each of the three sweeping curves and programmatically place the heart objects along points in each slope. I am a software engineer by trade, not a mathematician so the solution was a bit over my head. After much research and several attempts at programming this formula myself I found an existing formula developed for especially Pov-Ray by Chris Colefax. |
|
|
|
|
Here is the result. The white necklace Emily is wearing in the photograph is recreated in the outside world.
The illustration on the right shows the photograph inside the picture frame. This was accomplished by placing a paper-thin box object inside the frame and assigning the digital image of Emily as its texture. This can best be described as "projecting" an image onto an object. |
|
|
|
|
|
| The snow globe was used to contain the "inner worlds". It was constructed as illustrated above. The base was created using a squashed cone shape primitive (blue). The decorative rings (green) around the base were created using torus shapes. | |
|
|
|
|
| The dome itself was created using a sphere object. The illustrations above show this sphere textured first in red. Next it is rendered with a glass texture filled with air, and finally as glass filled with water. The water effect was achieved by use of Pov-Ray's Index of Refraction (IOR) texture modifier. This is a powerful demonstration of the amazing depth of this software and the flexibility it provides the artist creating just the right effect. | |
|
|
| Here, the snow globe is shown with its final texture assignments. Then, it is added to the scene along with the framed picture and pedestal. | |
|
|
| For the photo prints on the floor and "snowing" from the sky I wanted to mimic the subtle curve that is present on any 4 x 6 print received from a photo developer. To achieve this I started with a large cylinder object. I then cut a pie sliced wedge out of the cylinder using two plane objects (not shown). This cut was done so that the end of the resulting wedge had the proper aspect ratio (height vs. width) for the image that would be projected upon it. | |
|
|
| Photo prints don't come on pie shaped wedges so I used another large cylinder (just slightly smaller in diameter than the first) to cut the majority of the wedge away leaving just a paper thin curved surface. In the first illustration above the thickness of this slice is exaggerated for clarity. The second illustration shows the actual object created by this CSG difference. | |
|
| Above is the final photo print object. The digital image of Emily has been assigned as its texture. |
|
| Here, a couple of photo print objects are strategically placed into the scene, one on top of the pedestal and another at its base. Although this was not the final image in my mind's eye, I seriously considered stopping here. Properly cropped, this image has a fine balance and simplicity. |
|
|
|
This set of illustrations show how the floor was covered with photo prints. This was done in multiple layers so
that the final result would appear as natural and random as possible. I wanted to simulate the way the
ground would look if it "snowed" photo prints from the sky. I used four layers in all. The first two layers were used
to cover the floor. This prevented the floor from showing through any gaps between the prints in the subsequent layers.
The second two layers provided the "snow" look.
The first layer (in blue) consists of 27 rows of 27 photo prints in each row. The print objects were created using programming logic (a loop) to repeat the same object and place it into row and columns. If it were not possible to program the ray tracer it would have been necessary to individually create and place each of the 729 objects manually. The problem here is that the prints do not look randomly placed. |
|
|
| In the first illustration above, I have added a random amount of rotation around the vertical axis of each print. This looks a little more natural but still leaves large gaps between each print and the prints adjacent to it. In the second illustration another layer of prints is added (in green). This layer sits slightly above the first. It is shifted to the right so that it covers many of the gaps left in the first layer. Also notice that this second layer is not as large as the first. I knew I would be using a very low camera angle for this scene so I was only concerned about visible gaps in the immediate foreground of the final scene. It pays to be somewhat conservative with the number of objects in a scene because each object adds time to the final rendering process. | |
|
|
| Shown above are the next two layers, layer three (yellow) and four (red). These are the "snow" layers. Layer three is the same size as the first layer. Recall that objects in the first layer were randomly rotated around the vertical axis so that they would remain flat on the floor. The layer three objects were rotated randomly in all three dimensions. This provided the "snow" effect I was looking for. Just as layer two was used to cover the gaps in layer one; layer four objects were used to cover gaps in layer three. | |
|
|
| As mentioned previously, this floor of photo prints was designed to be viewed from a very low camera angle. The images above show the desired angle. In the first image, the colors of the various layers have been retained in order to illustrate the role each layer plays in the overall effect. As you can see very little of the first two layers are visible through the layers above them. The second image shows the same photo print objects with their final textures, the photograph of Emily. | |
|
|
| Horizons often present a problem in ray tracing because the floor is an infinitely large plane. If you want to create an environment of objects on the floor, which extend all the way to the horizon you will always come up short because there is no end to the floor. The secret is to assign a mirror texture to the floor. This way the floor simply reflects the sky at any distance beyond the objects on it. The image on the left illustrates this concept using a plain white texture for the sky. On the right I have assigned a realistic texture to the sky. Pov-Ray implements the sky as a huge dome covering the scene. This sky dome can be assigned any texture. I choose one of the example textures delivered with the software. I did not change it a bit because I felt it was already a perfect match for the mood I was trying to achieve. | |
|
| Here are the previously constructed objects placed into a scene with the floor of photo prints just constructed. Notice how the top of the snow globe now reflects the hundreds of photo print objects on the floor below it. This was not something that needed to be explicitly added to this image. The software does its job well here and realizes the reflection in a photo-realistic manner without any additional instructions. |
|
|
| These images illustrate the method used to create the photo print objects falling from the sky. The first image shows sphere objects (red) programmatically arranged into a spiral shape. In the second image the spheres are replaced with photo print objects. | |
|
|
| Here, I have lowered the camera angle so that it is looking up into the spiral. Its actual arrangement is no longer apparent. The image on the right combines the low angle view of the falling prints along with the floor of photo prints constructed previously. | |
|
| Above, the pedestal, framed picture, and snow globe have been added. This is very near to the final image. The only aspect missing is the world within the snow globe, which includes another snow globe with another world within it. Those features exist in the final image. |
|
|
|
This illustration shows the scene setup in terms of the lighting, camera position, and background. The Area Light
is shown in yellow, the camera in red. The camera and lights
are actually invisible objects. For the purpose of illustration, I have created visible objects to represent them
in their exact locations.
There are many lighting options in Pov-Ray. A Point Light is non-directional and casts sharp shadows much like an uncovered incandescent light bulb. A Spot Light is directional in nature and also casts hard shadows. For the final rendering I used an Area Light, which is non-directional and casts very soft natural shadows, much like a photographer's soft-box studio strobe. Area Lights can be very "expensive" to use in terms of rendering time. (All of the images in this construction story were rendered using a point light in order to save time.) The camera location is shown above using a red dot. As you can see, the camera was placed low and close to the subject, giving the impression of an endless plane of photo prints and taking the viewer into the scene. In order to reduce perspective distortion the camera was placed back a bit and then the focal length was increased. This has the same effect as using long focal length lens for portraiture in order to reduce distortion in the portrait. Most of the people that have seen the finished image notice the interesting pastel color gradients in the background but do not look closely enough to notice that much the effect comes from reflections of photo print objects on the surface of the background. This was accomplished by placing a hollow hemisphere (half buried in the floor) behind the scene. This hemisphere object is shown above in blue. My intention was to "photograph" the scene from within a snow globe, adding yet another world and dimension to the scene. While this effect was not accomplished as clearly as I had hoped, I was very pleased with the resultant effect on the background colors. |
|
|
| Above, I have changed the texture of the background hemisphere to glass. The glass texture reflects the photo prints adding the desired interesting effect. In the illustration on the right the sky sphere has been assigned a realistic texture and the floor has been assigned a mirror texture. Here the effect is fully realized. | |
|
|
|
Above is the final, uncropped image. This is a resized version of the original. Unlike similar images
in the preceding construction story, this image was rendered using area lights so the shadows are
soft and natural. The image is in square format, giving me maximum flexibility in cropping.
I spent a lot of time inside my own little world while creating "Emmy's World". That is the point, I think, of a creative process such as this. To get away for a while and relax, and to create something meaningful in the process. So... that's it. That's how I created "Emmy's World". I hope that you have found this construction story interesting. If you have actually taken the time to read all of this then you must have a great interest in ray tracing. You should give it a try. If you have any questions or comments please feel free to contact me at: awj_web@yahoo.com |