Welcome

This blog represents a common area where we can share ideas, thoughts and other verbose information with others - While giving a little more insight into the inner workings/minds of our team.

Though there might be overlap in places, the content here differs from that of the main Aqsis website and is intended to be complimentary while still acting as a useful resource for those interested in the world of 3D graphics and rendering.

So... sit back, relax, and have fun... we will !!! ;-)

Saturday, 30 December 2006

Image-based Lighting

I recently thought I'd have a go at writing an IBL shader to compliment a new 'Howto' currently underway for Aqsis... in a similar vein to my previous 'Armageddon' work.

Though shader authoring isn't my forte I was willing to have a go, plus had a free weekend, so armed with Google and the RISpec (3.2) I proceeded to create a simple 'light' (not 'surface') shader which uses a texture within its lighting calculations...

/* Simple image-based lighting shader */

light
imagelight(float intensity = 1.0;
color lightcolor = 1;
string texturename = "";
float blur = 0.5,
__nondiffuse = 0,
__nonspecular = 0;)
{
solar()
if (texturename != "")
Cl = intensity * (lightcolor * color environment(texturename, -L, "blur", blur));
else
Cl = 0;
}



Though not perfect, even after much trial-and-error (always a good way to learn), I now have a better understanding of some aspects of the RenderMan shading language and a base shader which offers me a good starting point to continue my work.

Interestingly, and something that's important to note, this shader actually highlighted an issue within Aqsis 1.2.0 (alpha 1) which was fixed the following day by one of the developers... further demonstrating the importance of submitting bug reports, irrespective of your experience/knowledge - http://sf.net/projects/aqsis