Today I discovered a rather cool project via Reddit. MiniLight is a “minimal global illumination renderer” (it draws 3D scenes) with implementations in various languages.

Cornell Box

The Cornell Box, rendered with Minilight

The Python version is a lot slower than the compiled languages – which is to be expected, number crunching like this is not Python's forte. All the same, I had a go at optimizing it. Using similar techniques I wrote about in a previous blog post I reduced the run-time for the test scene from 61.4 seconds to 53.2 seconds. Hardly stellar, and it's not going to change the comparisons, but it was an interesting exercise.

It may be possible to optimize it further without resorting to a different Python implementation, but that is an exercise for another day. See the following link for my micro-optimized version:

Download minilight_wm.zip

This blog post was posted to It's All Geek to Me on Tuesday March 24th, 2009 at 9:07PM
 

1 Response to "Micro-optimizing Minilight"

  • April 15th, 2009, 2:18 p.m.

    More to the point, what were you doing on Reddit, you traitor :P

Leave a Comment

You can use bbcode in the comment: e.g. [b]This is bold[/b], [url]http://www.willmcgugan.com[/url], [code python]import this[/code]
Preview Posting...
Previewing comment, please wait a moment...

My Tweets

Will McGugan

My name is Will McGugan. I am an unabashed geek, an author, a hacker and a Python expert – amongst other things!

Search for Posts
Possibly related posts
Tags
Popular Tags
 
Archives
2009
 
Recent Comments
Hi Will, I brought your book from Amazon. I think its a great book. It has given me everything i ...
- P K on A bad review
yeah! red hair looks good!! thanks 4 your help in our project in science under maam b.
you have a nice decision.
@ Anatoliy But this is, hopefully, what you're looking for. His library is extensive enough that it provide the features ...
Thanks for this. I started writing my own and was starting to get a little frustrated when a friend pointed ...
- Ahlywog on BBCode Python Module
 
© 2008 Will McGugan.

A technoblog blog, design by Will McGugan