Ray Dream Designer's G-buffer


Ray Dream Designer's G-buffer: Your Intelligent 3D Imaging System

by Kathy Englar, Vice President, Marketing, Ray Dream Inc.

For additional information, please contact Ray Dream Technical Support..

Until recently, the ability to easily create 3D graphics rich with accurate detail like shiny chrome, grainy wood, and true shadows was restricted to a small user base of dedicated professionals using high-powered, expensive graphic workstations. Thanks to advances in the power of desktop hardware and to new software techniques migrating to the desktop, producing 3D images can be easily accomplished by even the most budget-minded Mac or Windows graphic user.

Integrating 3D into the Graphics Studio

As more graphic artists experiment with 3D illustration, they are enjoying substantial productivity gains, thanks to features like automatic lighting and perspective and the ability to produce multiple images from one composition. Now, these budding 3D artists are looking for ways to integrate 3D techniques more closely into the drawing and painting applications that they use daily, reaping the benefits of 3D while enhancing, but not altering, their individual graphic styles. For example, Ray Dream Designer customers often create 2D artwork in their drawing programs and import it into Designer to add 3D depth. Also, textures that are applied to these 3D objects might originate from scans or images created in paint or special effects programs. These textures can be wrapped around 3D shapes or tiled across floors and walls. Once an image has been "rendered," or calculated, by the 3D software, it is frequently exported to another graphics program for post processing, depending upon the particular commercial requirement. If the 3D image is part of a print advertisement, it may be placed in a page layout package where text is added. As part of a complex montage, a 3D image may be brought into an image editing program to be composited with other source material. Or, preparations for 4 color printing may require color conversion in a pre-press application.

The Ray Dream Designer G-buffer

Ray Dream Designer 3 incorporates a revolutionary G-buffer that facilitates tasks such as these, providing unheard of integration of 3D illustration and image editing. The G-buffer, or geometry buffer, was first presented at the 1990 SIGGRAPH Conference by Japanese researchers Takafuni Saito and Tokiichiro Takahashi. The original concept of the G-buffer proposal was that geometric information about objects in 3D images can be calculated and used by image processing programs. SIGGRAPH, or the Association for Computing Machinery's Special Interest Group on Computer Graphics, is well known as the place to debut cutting edge graphics technology. At the yearly conference, papers are presented that inspire the next generation in graphics technology, and at the exhibitions, customers are treated to the latest and greatest commercial applications. Ray Dream's implementation of the G-Buffer marries Designer to image editing via multiple channels of geometry and lighting information. The ability to manipulate channels of information associated with an image has been embraced by savvy Adobe Photoshop users who recognize the power of this feature within Photoshop. With Ray Dream Designer and Photoshop available on both Macintosh and Windows platforms, this intelligent 3D compositing system is available to all desktop graphic users. In both programs, images are composed of multiple channels. All full-color images created in Ray Dream Designer incorporate a minimum of 3 channels: the red, green, and blue color data.

The G-Buffer Channels

Eleven additional channels of information can be built at rendering time at the request of the artist. Almost every 3D image is accompanied by a mask, or alpha channel, for easy compositing. The next G-buffer channel, distance, shows how far each pixel in the final image is from the camera. Distance information is invaluable for creating accurate fog or blurring effects based on depth of field. Anyone who has struggled to create a mask with paths or the magic wand in Photoshop will appreciate how the object index makes it easy to select individual 3D objects in the final bitmapped image. In this channel, each 3D object has a different grayscale value, so that any object can be selected with one click of the magic wand. The normal vector creates 3 channels describing the direction that each object faces. This information can be used after rendering to simulate additional light sources. For example, it's possible to add directional lighting or glows in Photoshop by loading the normal channel to select all the surfaces that face in a given direction, complete with information about how those facings fall off. In contrast to the distance channel, which shows position relative to the camera, the 3 position channels contain the 3D coordinates for each object. While the thought of using this channel may elicit bad memories of junior high geometry class, this information on where each pixel lies in an XYZ coordinate system is very useful. Imagine the ability to add low hanging clouds to a 3D image. Simply access the Z, or height, channel. Finally, the surface coordinate describes each object's surface coordinate system. This is 2D information which allows adding, replacing, or repositioning texture maps on 3D objects in an image editing program as part of post-processing, without needing to re-render the image.

Using the G-Buffers in Adobe Photoshop - A Step-by-Step Example

In this example, an image is created in Ray Dream Designer with a mask, distance channel, and object index. The distance channel is accessed as the basis for applying the cloud filter in Adobe Photoshop 3 to create a striking image.

#1: A scene is created in Ray Dream Designer. Objects are built and arranged, colors and textures are applied, and lights are placed. The scene is ready for rendering the final 3D image. [FIG.1] (99K JPG)
#2: The Artwork Settings Dialog is where G-buffers are requested. In this case, a mask, distance channel, and object index will be calculated, in addition to the full-color bitmapped image. [FIG.2] (27K JPG)
#3: The rendered image is opened in Adobe Photoshop 3 where the mask, distance, and index channels are accessible. [FIG.3] (83K JPG)
#4: The mask, also known as the Photoshop alpha channel, can be used for easy compositing of the rendered 3D image with other material, perhaps a background. [FIG.4] (33K JPG)
#5: Every individual object in the original 3D composition has a different grayscale value in the object index. [FIG.5] (38K JPG)
#6 Individual objects can be instantly selected with Photoshop's magic wand using the object index. [FIG.6] (65K JPG)
#7: The distance channel contains grayscale data showing how close each pixel is to the camera, or viewpoint. Dark objects are close to the camera and will be most heavily masked when any filter or fill is applied in Photoshop. Light objects are farther from the camera. Depth of field can be adjusted by Photoshop's levels or curves commands. [FIG.7] (39K JPG)
#8: When the distance channel is loaded, the "marching ants" indicating a selection area appear at the 50% gray level. [FIG.8] (76K JPG)
#9: The clouds filter is applied while the distance channel is loaded. Objects closest to the camera are masked, while the filter is more heavily applied to objects that are far from the camera. The farthest objects and the background are totally obscured by the clouds. The result is a dreamy, fog-like effect. [FIG.9] (53K JPG)
#10: Note the contrast between the two images. In this image, the clouds were composited as a background with the 3D image using the mask. Because the clouds are not integrated with the image, the result has less of a 3D appearance. [FIG.10] (63K JPG)


Return to Ray Dream Designer
RDD G-buffer / David Ramirez / dram@netcom.com / 11 September 1995