|
the gloaming
by cyrus jam
my homepage: http://graphics.ucsd.edu/~cjam introduction I believe one of the best things about computer graphics is the ability to create objects and worlds that only exist in our minds, and the ability to tweak any parameter we want, from where the sun is positioned to how the cracks on a surface are carved out. With that said, I decided I wanted to create a world from scratch which would portray a sense of depth and a specific, unified mood. To render this scene, I used a renderer called ScatterBrain which I wrote almost entirely from the ground up. concept / construction At the beginning I toyed around with a few different ideas. One of the first ideas was to create a world based in a city. I thought it might be cool to play around with street lights down a long, lonely road between large, sterile buildings. Here are a few of my first attempts:
I thought the idea was promising, but I decided to go for a more organic feel. From there, I decided on building a lost city in the mountains. I felt it would be a good opportunity to make a scene which was ambiguous enough that the viewer of the image would wonder why the city existed and why it was empty. However, I also wanted the picture to be thought out enough so that it was clear what type of mood I was trying to convey. Construction of this city began with Maya, a great tool for modeling. Though I was familiar with Maya basics, I had never gotten a chance to use it extensively, and therefore, it was quite a learning experience. I first started with the buildings. I wanted to keep them simple, to avoid distracting from the lighting in the scene, but I also wanted to build something that had similarity with the real world. I wanted the buildings to have the same feel as the ancient Incan ruins and the old castles in Japan.
I carved out windows by using a basic boolean operation on the surface of the wall to give opportunity for light to bounce around inside, giving a soft natural look.
Here are a few pictures of the final scene built in Maya:
Next, I needed to construct the mountain range that this city was built into. For this, I implemented a terrain generator which would let me experiment with different height fields and export to the .obj file format. Siggraph course notes "Simulating Nature: From Theory to Application" was very useful for this. I ended up using the HybridMultiFractal terrain model presented by Ken "Doc Mojo" Musgrave:
Lastly, I wanted to have a focal point in my image, something that the eye would be led to. I decided to create a drape of some sort, hanging outside a window. I thought it would work as a way to bring the viewer to ask why only the drape was left in an otherwise empty city. Again, for this I used Maya. I created a mesh tagged as cloth. Then, I constrained the cloth to a fixed object. After that, I let Maya apply gravity to the mesh. Once I got the look that I wanted, I froze the simulation and exported the mesh:
color palette - shading Next, I created a color palette for the scene which portrayed the mood that I wanted. For this, I searched around on the web for some inspiration:
I used a nifty color picker to get the color choices directly off of the above images. For the city floor, I implemented Worley's cellular texturing combined with a dirty/mossy texture map, plus an extra bumpmap for realism:
technology Some of the capabilities of the ScatterBrain Renderer: Full Global Illumination using Photon Mapping Gathering Participating Media Depth of Field Soft Shadows Area/Directional/Point Lights Fresnel Refraction Shaders Scene Parser Supersampling Bumpmapping Multitexturing Export pfm/ppm/raw Import obj Bounding Volume Hierarchy / BSP Tree Acceleration Structure Interactive OpenGL ViewerFor this scene I first wanted to create sunlight. I wanted to make strong beams of light coming right over the tops of the buildings, so I used a directional light right over the side of the mountain. In addition to this, Photon Mapping was used to light the scene indirectly. I shot nearly 2 million photons into the scene to make sure that I got all of the boolean openings on the buildings In this case, the directional and indirect illumination make a substantial difference (left: direct only, right: direct+indirect):
Here's a few shots of the photonmap from my OpenGL viewer: (1st image: photon tracedepth 3, 2nd image: same - no geometry displayed, 3rd image: Just 1st hit photons.) Note: Directional Light, 20000 photons
To smooth the indirect lighting over a surface, gathering was used to average the indirect contribution. The image on the left just uses a direct visualization of the photon map. Notice the blotchy walls. The image on the right uses gathering, producing a smoother result:
To achieve the effect of streaming light. I used my implementation of participating media. Again, this achieves quite a dramatic effect. (note, gathering is not enabled for this test):
Another essential part of this project was the implementation of an acceleration structure. The ScatterBrain renderer supports both a bounding box hierarchy and BSP trees. For this scene I used BVH, below are a few shots of the hierarchy in my GL previewer:
For the ground I implemented Worley's Cellular Texturing. His algorithm produced a very nice effect. I played around with various parameters giving a variety of results: (top left: 2F[3] - F[2] - F[1], top right: F[2] - F[1], bottom left F [2], bottom right F[1])
At the end, I settled with a standard basis F[2] - F[1]. Then, I multitextured this with a mossy texturemap. I played around with my shader to increase the moss where the cracks were located.
Additionally, I attempted to get moss crawling up the building walls. It actually looked pretty cool, but I decided to leave it out of the final render for simplicities sake:
On top of this, nearly everything in the scene was bumpmapped to give it a little bit more "life." A final feature that I wanted to include into my final render was the Depth of Field effect. This gave very nice results but just took entirely too long to render at the moment.
For the terrain, I implemented a variety of different fractal landscapes. fbm, hetero terrain, hybrid multi-fractal, ridged multi-fractal and warped fbm. Implementation details can be found in the book "Texturing and Modeling" 3rd edition. It's a very nice book to own.
Because the landscape was only in the background, I exported it at a fairly low resolution. - The Gloaming
|