{"id":162,"date":"2012-05-07T12:30:34","date_gmt":"2012-05-07T12:30:34","guid":{"rendered":"http:\/\/blog.daft-ideas.co.uk\/?p=162"},"modified":"2012-05-07T12:34:16","modified_gmt":"2012-05-07T12:34:16","slug":"raytracer-update","status":"publish","type":"post","link":"https:\/\/blog.daft-ideas.co.uk\/2012\/05\/07\/raytracer-update\/","title":{"rendered":"Raytracer update"},"content":{"rendered":"

When I started this blog, it was intended to be a way to do some write ups of what I’m doing, and to easily share some of the cool stuff with my friends. I don’t like just sending images and builds over skype file transfer, and I like a record. Unfortunatly, my laziness gets in the way a lot.<\/p>\n

I’ve made massive amounts of progress with the Ray Tracer, but not put up any images here. Here’s one:<\/p>\n

\"\"<\/a>

Stanford bunny and dragon. Render time: 60 seconds.<\/p><\/div>\n

This image here is the payoff. I’ve implemented reflections, OBJ loading, KD trees, diffuse lighting. There’s still a lot to do, though.<\/p>\n

The KDtree is what makes all the difference. The Dragon is a very, very expensive model, containing\u00a0871414 polygons.<\/p>\n

Without any kind of acceleration structure, it takes well over 24 hours to render. (I tried, as a test, to see how long, but gave up after a day.).<\/p>\n

Unfortunately, I won’t be able to get much more speed out of Java.<\/p>\n

I ported the Raytracer to Java in the first place because I needed to do a complete rebuild, and I’m better at rapid prototyping in Java than I am in C++. It would have been a better learning exercise to do it in C++, but I’m frequently impatient, and I wanted to see cool stuff without having to fumble too much with the language.<\/p>\n

Now, I’m probably going to port it back at some point, and eventually use OpenCL to get my GPU to do more of the hard work, but in the meantime there are some more things I’d like to try out.<\/p>\n

Partial list:<\/p>\n