Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9
      Miscellaneous

Focus On Photon Mapping
Author: Marlon John
Publisher: Premier Press
ISBN: 1-59200-008-8
Purchasing: [Amazon.Com] - RRP US$23.99
Reviewed: 9th February 2004

Front Cover Shot:

Overview

Photon Mapping is one of the new-breed of global illumination techniques; that is - lighting/rendering algorithms that generate extremely realistic results. They aren't overly new (many of the algorithms have been around for a decade or more), but they are increasing in popularity due to the advent of faster and faster desktop computers - it is now possible to render a photon mapped scene in under an hour!

The subject of global illumination is an interesting target for a 'Focus-On' book, as they are often fairly light-weight book giving an applied-to-the-point spin on a larger topic. Photon Mapping is no simple topic... so this concept of an applied-to-the-point text is going to be interesting.

For reference, 3 other books have been reviewed by this website covering aspects of global illumination:
 - Advanced Global Illumination
 - Realistic Ray Tracing (first edition)
 - Realistic Ray Tracing (second edition)

Refreshingly accessible

As previously stressed, Photon Mapping is not trivial - yet having read through this book I have found it to be amazingly accessible. By comparison to the three books referenced above, this book can be read and understood with very little effort.

The first half of this book is pretty much dedicated to theory - yet there is no mathematical derivations, proofs or theories. All explanation is done in plain text with a significant number of supporting diagrams. Even the diagrams have a friendly, if slightly childish (reminds me of my 'GCSE' (ages 15-16 education in the UK) text books ), feel to them. Given that the physics of light transport is a core theory for global illumination, seeing it explained with relatively simple diagrams makes for a refreshing change to the vector mathematics employed by many other text books.

However, this simplicity will become a weakness after the first couple of attempts at implementing the features in this book, or more importantly, it will not take you much further than this book. Extending the ideas to make a more comprehensive engine, or just altering the code to use more complex functions will require that you read through various online white papers - and believe me, that won't be a pleasant jump from this book.

Static Imagery

The applied half of this book is pretty much focused on the generation of static images from a static scene. For a book of this size it would be unfair to expect it to be too general - focusing on a particular aspect of photon mapping and demonstrating it clearly is the aim here; you'll want one of the bigger text books if you want a complete discussion of the entire field of photon mapping.

Whilst static imagery is one of the key areas of photon mapping (used by programs such as 3DSMax to generate ultra realistic images), it is not that useful when it comes to games development.

Games that use photon mapping need to pre-process the light received by each surface in an environment, traditionally storing it in a 2D texture called a 'light map'. This light map can then be rendered in real-time, and as long as the objects/lights don't move it will look perfectly realistic.

This book generates a single image from a cameras point of view - whilst the light received by each surface is calculated at an intermediary step, it isn't actually outputted. What is outputted is the final image... great if you want a single frame image, but not so great if you want to map it to a 3D world and use it in a real-time environment. To do this you need all of those intermediary surface values. The last chapters of the book do explain this, but not in a detailed enough way to make it immediately usable - it's up to you to write the code, or work out just how this is done..

Platform independent

In it's favor, this book is platform independent. The programming language of choice is C++, as is standard with almost all programming/game-development books, but C++ is not platform specific really.

The book presents, what is essentially, a software rasterizer that outputs a single image given a scene and a view point. The actual graphical output (be it Win32, DirectX, OpenGL...) is not specified, and is relatively trivial to implement on any of these API's. 

The CD contains a complete library of the source code discussed in each chapter, so it is possible to see the code in action, even if you do have to wait a while (30mins for one of the samples on a 900mhz Laptop according to the author)!

In Conclusion

This book provides a good overview, and is a great introductory text to photon mapping - but unfortunately, it's nothing more than that. With a reasonable dose of intelligence, you can take the lessons learnt here and a few advanced articles online and come up with a perfectly acceptable photon-mapping renderer.

However, from a game development perspective, it is quite limited.. The last couple of chapters that deal with converting the algorithm for use in a game environment is a bit too vague. It discusses per-vertex photon mapping - which is interesting, but only in a general sense, and even then per-pixel (through light maps) photon mapping is almost skipped entirely.

Good Things Bad Things
• Clear and intelligent writing style • Limited scope due to little mathematical theory or applied light-mapping section
• Important theory covered without too much mathematics/physics • More suited to general computer graphics than to game development.
• Not API dependent  
• Good CD included with all examples and sample images  
• Lots of tips from the author throughout the text  

 

DirectX 4 VB © 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster