Tuesday 29 November 2011

Book Review

OpenGL 4.0 Shading Language Cookbook
Author: David Wolf
Publisher: Packt Publishing Ltd.
ISBN: 9781849514767
Pages: 340 
By Patrick Mount on 29th November 2011

Before delving into the brave new world of OpenGL 4.0 fragment shaders, make sure that your graphics card can support them. Supported Cards include:  Nvidia GeForce 400, 500 series and the ATI Radeon HD 5000, 6000 series

Essentially, this book is aimed at the intermediate to advanced C\C++ programmer, who also has experience with the implementation of fixed-function OpenGL applications, and who wishes to transition into the more direct GPU control-code, which shaders provide.

The book contains clear and concise examples of OpenGL code and it makes frequent reference to a couple of external libraries – GLEW and the GLM (mathematics library). The main IDE seems to be Nokia's Qt Creator, which is a strange choice, given that most professionals are probably using Visual Studio with GLUT.

If what I've just written makes no sense to you whatsoever, then this is not the book for you. It is very 'programmer-centric', covering not just the shaders, but how you bind and interface with them via your main application code. Although for artists like myself, who have a programming background, it is the ideal reference (or should I say recipe) book.

In chapter one, the author eases you into the subject by demonstrating how to create a basic OpenGL application with the additional libraries previously mentioned. I found this a bit tricky because I wasn't use to Qt Creator.

Chapter two introduces the reader to the fundamentals of the GLSL methodology, explaining the difference between vertex and fragment shaders and how they fit within the OpenGL pipeline. This section also refers to the basic shading algorithm of the old fixed-function model as a way of learning about the new shader-based model.

Subsequent chapters develop the simple application into more complex examples, covering topics like; Lighting and Shading Effects, Textures, Cube Mapping, Normal Maps, Screen Space Filters, Gaussian Blur, Bloom, Deferred Shading, Shadow Maps, Geometry and Tessellation Shaders.

Pros:
  1. Clear and concise example code 
  2. Very detailed written explanations, including the original mathematics
  3. The structure of the chapters eases you into the more advanced topics
  4. Impressive coverage of virtually every topic in shader-based real-time rendering
 Cons:
  1. Programmer-centric (not for the pure video game artist)
  2. Nokia's Qt Creator was probably not the best choice of IDE for the example code

Rating: 4 out of 5 stars

You definitely need this book in your library (whether it's home, college or business)

Direct Link:
http://www.packtpub.com/opengl-4-0-shading-language-cookbook/book


Tuesday 21 June 2011

Japanese Teahouse

This is a real-time animation using the Blender game engine.

The Teahouse is a low-polygon (game) model, consisting of:
- Ambient Occlusion Lightmap
- Tangent Space Normal Map
- Diffuse Texture Maps
- GLSL Fragment Shader to simulate the refraction of light through water
- Animated Normal Map to simulate the rippling of surface water
- Faux (non-RenderToTexture) reflection effect



Runs at 60 frames per second on the following spec:
- Pentium Duo-Core CPU 2.93GHz
- 3 GB RAM
- 32 bit OS
- nVidia GeForce 9500GTX Graphics Card

Friday 17 June 2011

SPY STORY: Sneak Peek

Here is a sneak peek of my game. It's called "Spy Story" - which is just a working title at the moment, although if enough people like it, I might keep the name.

I've coded a basic HUD system, which responds when the player passes over a pick-up-item. I can also send text messages directly to the player to relay mission objectives and other pertinent information.

Still early days ...