Thursday, June 11, 2009

Dispersion Test

I've been playing around with LuxRender and Blender... particularly I've been tweaking materials and angles to get rainbow caustics for a scene. I rendered a whole mess of bad attempts and eventually I decided to analyze the situation very closely. So I set up an experiment of sorts.

For the final scene I only want rainbows from this effect... I don't want white light at all. That means I want only parallel light rays going into the ball. To do that I put a light source inside a long tube with the light at one end and the glass ball at the other. The tube is cylindrical. The light source is circular but... also inside the tube is a "choke" of sorts that turns that light source into a thin circular ring. To keep the camera from seeing the icosahedron the light tube incorporates a "back mask".

The target of the light is an icosahedron (d20 for those in the know) subdivided twice. Its material is completely transparent with an index of refraction of around 1.8 and a Cauchy B coefficient (at least what LuxRender calls it) of somewhere around 0.4. I forgot to record the specific numbers for this picture (duh) but these are high relative to normal glass; they were chosen to enhance the dispersion.

On the other side of the light tube is a white matte surface used to record the "splatter pattern". In early tests I noticed that the incident white light that made it straight through to the matte surface with very few bounces (basically coming straight through) washed out the rest of the pattern. So to combat that I placed a circular black hole right in front of the icosahedron to capture and cancel it... Here's a shot of the dispersiontest.blend setup in Blender.

Ok, so here's what came out... The only real suprise here is just how incredibly dense this is. I expected to see a few rainbows but wow. As an image in and of itself it isn't all that artisically interesting. However it's pretty amazing from a technical standpoint.

This picture took approximately 60 hours worth of CPU time to generate. Ugh... I hope LuxRender gets CUDA/OpenCL acceleration soon.

I played with changing the shape of the incident light a bit too. More on that later...

Update: This got a mention on the LuxRender forums :) Thanks guys!

Update 2009/6/16: I created a short animation with the ball rotating...

1 comment: