Selasa, 02 Maret 2010

Good lighting and shading

1.

a. Phong/Blinn Lighting

Lighting models are not a new aspect of computer graphics and research has been on-going for several decades. The model proposed by Phong Bui-Tuong is possibly one of the oldest and arguably the most classic model still in use today. Whilst not as sophisticated as the models described in the following chapters it is very simple to implement, has good performance characteristics and generates acceptable results.

This chapter covers a modification to the original model – that proposed by James Blinn. He put forward a simplified version of Phong’s original equation that has even better performance yet minimal effect on the final result. Several sources will claim James Blinn’s modifications as an approximation to Phong Bui-Tuong’s but a recently published paper ([Ngan et al. 04]) claims otherwise: James Blinn’s modifications match measured data more accurately than Phong Bui-Tuong’s model.

These simplifications along with equivalent or better quality have effectively made the Blinn-Phong form the baseline lighting model for three decades.

Developers familiar with the fixed-function lighting pipeline from previous versions of Direct3D will be familiar with the results as the Blinn-Phong model is. Obviously the fixed-function pipeline has now been removed, but the SDK ships with the “FixedFuncEmu” sample that implements the entire functionality of this legacy pipeline in terms of the Direct3D 10’s shader model 4. Looking through this SDK sample it is possible to find an implementation of the Blinn-Phong lighting model in the CalcLighting() function inside FixedFuncEMU.fx.


b. Phong shading models

Phong shading refers to a set of techniques in 3D Computer Graphics. Phong shading includes a model for the reflection of light from surfaces and a compatible method of estimating pixel colors by interpolating surface normals across rasterized polygons.

The model of reflection may also be referred to as the Phong reflection model, Phong illumination or Phong lighting. It may be called Phong shading in the context of pixel shaders or other places where a lighting calculation can be referred to as "shading". The interpolation method may also be called Phong interpolation, which is usually referred to by "per-pixel lighting". Typically it is called "shading" when contrasted with other interpolation methods such as Gouraud shading or flat shading. The Phong reflection model may be used in conjunction with any of these interpolation methods.

These methods were developed byBui Tuong Phong at the University of Utah, who published them in his 1973 Ph.D. dissertation.



2. Tons of texturing, must filter quickly and anisotropically by using mipmaps.

In 3D computer graphics texture filtering, MIP Maps (also mipmas) are pre-calculated, optimized collections of images that accompany a main texture, intended to increase rendering speed and reduce aliasing artifacts. They are widely used in 3D computer games, fight simulators and other 3D imaging systems.

Tidak ada komentar:

Posting Komentar