Wednesday, June 17, 2009

Edge Effects

I'm taking the Dispersion Test setup and applying it to a Second Life virtual reality room (my little spot).

In order to generate the images I use a Blender template consisting of 6 cameras, each aimed down an axis. The camera properties have been chosen carefully to basically provide non-overlapping, but abutting, images of the surrounding world. Then each camera position is rendered and the resultant image becomes one of the sides of the virtual reality room cube. I've done this before successfully with Blender's default renderer.

So ideally I could just move my dispersion test setup into the template, use LuxRender for each camera position and be done. However... Unseemly seams are something I can't seem to get rid of. Looks like the tone mapping phase is edge-variant. Hopefully there's a way around it or maybe I'm doing something wrong.

More here at the topic I posted at the LuxRender forum.

Update: jeanphi suggests it could be a filtering problem before the tone mapping phase. Not sure if I want to remove it even if I figure out how to. Might just have to calculate a slop factor and chop it off post-processing.

Update: it was the render filter. I changed it to 1x1 (effectively disabling the filter) and now the seams should line up nicely.

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...