Productivity Corner: MicroStation's Rendering Capabilities15 Apr, 2005 By: James Dyer Cadalyst
Built-in functions make communicating your design intent more compelling than ever before
Over the past couple of months we have explored MicroStation's powerful 3D design capabilities (click here for archives). This month's Productivity Corner column will introduce MicroStation V8's rendering capabilities.
MicroStation's rendering capabilities are incredibly powerful. Whenever you wish to represent your 3D design as shaded surfaces, MicroStation is your best friend. MicroStation incorporates a variety of rendering options, from simple wireframe representations to photorealistic images. For today we'll focus on the various rendering options and a few of the associated settings.
Basic Image Rendering
With MicroStation you can produce wiremesh, hidden line and filled hidden line rendered images.
Wireframe representations. Wireframe representations take us back to the earliest days of computer-aided design and remain useful today for reviewing 3D models. Wireframe representations fall into a few different styles. The first style, which is similar to wireframe display, is that of wiremesh (figure 1), whereby all elements are transparent and do not obscure one another.
Figure 1. A wiremesh image in MicroStation.
Wiremesh differs from wireframe display in that curved surfaces are represented by a polygonal mesh, resulting in a more realistic representation of curved surfaces. Although wiremesh representations are useful, they present a lot of information on the screen, as the surfaces are presented as being transparent. For this reason, I use hidden line display options whenever possible.
Hidden line representation. When using the hidden line representation, MicroStation displays only those parts of elements that actually would be visible (figure 2). All the lines that would be hidden behind objects and surfaces are not displayed. Hidden line representation is a polygonal display wherein each element is first decomposed into polygons prior to the final display.
Figure 2. A hidden line image in MicroStation.
Filled hidden line representation. Filled hidden line representation is similar to hidden line display with one big exception: In addition to removing the hidden lines, the representation (of the polygons) is filled with the color of the rendered element. This mode is often referred to as filled polygon display.
With MicroStation you may simply remove the hidden lines on your display, or you can achieve a more realistic representation by applying shading to each element using the Constant, Smooth and Phong rendering options. The shading properties elements can be controlled at the individual element level. The amount of shading and its display representation depend on the type of shaded rendering you have chosen.
In recent years, ray trace rendering methodologies have received more notoriety than the traditional shading techniques. However, traditional shading techniques still have many appropriate uses. One example might be when you are using an OpenGL-enabled video system, wherein the graphic acceleration can handle only those rendering options up through Smooth.
Constant. When using the Constant shading representation option, surfaces will be displayed as one or more polygons (figure 3). Each polygon will be filled with a single constant color, as determined by the material definition of the surface and the lighting applied. With Constant shading, curved surfaces will be decomposed into a mesh of polygons, and have a distinctly tiled appearance.
Figure 3. The constant shading representation.
Smooth. When using the Smooth shading option, surfaces will be displayed as one or more polygons (figure 4). As a result, the appearance of curved surfaces will be more realistic than in constant shaded models. Colors in smooth shading are calculated at the individual vertices of the polygons, then blended across each polygon's surface to give curved surfaces a smooth appearance and thereby eliminating the tiled effect associated with the constant rendering method.
Figure 4. The smooth shading representation.
Phong. When quality is a greater concern than processing time, you should consider the Phong shading representation option. Unlike constant and smooth shading, phong shading processes the color of each individual pixel is separately. The time it takes to generate the phong image is longer than that of constant or smooth, but the result is well worth the wait.
When using phong shading, the resulting image (figure 5) will appear much more realistic than images produced with constant or smooth methods. As you incorporate light sources into the scene, the phong representation method will produce great results. In addition to materials and lighting, phong shading can include shadows, bump maps, material transparency and distance cueing effects.
Figure 5. The phong shading representation.
More Realism Still: Ray Tracing
As wonderful as phong images appear, there are times where phong-rendered images still are not realistic enough for your needs. In such cases you should embrace the next level of rendered representation, ray trace.
Ray trace images (figure 6) are produced by calculating the paths taken by rays of light entering the observer's eye at different angles. Ray trace images, with radiosity and particle tracing, are extremely realistic. Radiosity is a method for rendering a view of a three-dimensional scene that provides realistic lighting effects, such as interobject reflections and color bleeding. Light rays are generated from the light sources associated with the 3D model.
Figure 6. A ray trace image in MicroStation.
Radiosity methods are computationally intense, due to the use of linear systems of equations and the spatial complexity of large scenes. However, the production of such images is very computationally demanding. In addition to taking more time to produce, ray trace images will be exponentially larger in size. The time and space requirements are well worth the result.
Ray tracing when used in conjunction with Radiosity or Particle Tracing options can produce the spectacular highlights and reflections that these other processes do not display, such as diffused reflections. Both Radiosity and Particle Tracing have an option for ray tracing the final display.
When processing a ray trace image, the entire design will be examined to find the nearest of all the intersections along the light ray. Hidden surface removal is also performed as part of this procedure.
Once MicroStation has determined which light rays are visible, the illumination and shading of the visible objects will be computed.
It is important to remember that there are significant differences in how transparency is rendered in phong images versus the true transparency representation of a ray tracing. For example, in figure 5, the rubies in the ring used a material optimized for phong's limited transparency. In figure 6, the model includes a similar ring, but this time the ruby material in the gems has been created specifically with ray tracing in mind.
Creating the rendering solution will take a considerable amount of time. Therefore, being able to redisplay a previously generated solution in any view can be a significant time saver, particularly for rendering large projects. In previous versions of MicroStation, you had to enable Keep Database in Memory to save the ray trace solution in memory. MicroStation V8 always retains the solution in memory unless you use Create a New Solution.
MicroStation's built-in design visualization capabilities are absolutely incredible and make communicating your design intent more compelling than ever before. And, as stated last month, 3D modeling and design visualization make MicroStation a very cool place to express your creativity. We will explore more of the concepts and power related to design visualization with MicroStation in the future.
Until next time -- Enjoy MicroStation!
Cadalyst's MicroStation tips included in "Productivity Corner" are compiled by James Dyer and were tested using MicroStation V8 2004 Edition. Cadalyst welcomes MicroStation tips: E-mail them to email@example.com. By submitting a tip or code, you grant Cadalyst magazine the right to print and distribute your tip or code in print, digitally and by other means. Cadalyst magazine and the authors retain the rights to the tip or code, which are not to be downloaded or copied for commercial use.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!