Archive for September, 2008

Side² Project (+ research)

September 18th, 2008

Since I’m currently working (as part of my research) on some special optimizations of n-Body problems I don’t have a lot of time for the raytracer. Here’s a screenshot of the framework I’ve written to test my ideas. You see a non-parallel all-pairs simulation of 10 Bodies:

(click for a bigger image)
Probably I’ll find more time [...]

Procedural textures

September 10th, 2008

Prozedural textures were easier to implement than I thought. But without antialiasing it looks quite ugly:

It’s a bit better when the resolution is much higher:

(Click on the image for a version in 1600×1000)

Multiball…!

September 10th, 2008

Doing some stress tests at the moment…

Shading

September 10th, 2008

Not quite Phong-Shading, but at least my spheres are shaded now. Implemented the possibility for multiple light soures, different light intensities, switchable shadows and especially shading (based on the simple Lambertian-Model):

A video showing how changing the light intensity alters the scene is here:

PS: While I was developing, I played a bit with the colouring. One [...]

Bug hunting

September 10th, 2008

It seems there was an error in the formula for the ray-sphere intersection calculation — after calculating a few samples and the general formula manually, I found them. This was quite surprising, because — lazy as I am — I took the formulae from a book about graphic programming. Anyway, everything seems to work now:

Next [...]

Shadows working

September 9th, 2008

Finally, shadow functionality implemented. The code is still a bit messy (but I love refactoring anyways). Two screenshots as a proof (using the new floor object, too):

And because I like youtube, I also generated a small animation, where the y-coordinate of the light source is raised step by step:

Next on the todo list is, after [...]

Correct z-Ordering

September 9th, 2008

Approaching the next step: handling multiple objects and the correct ordering of the depth buffer. Exemplary output image with three spheres, ordered at different depths:

Additionally, we have a new object: the floor. This allows me to control and test dropshadows much better:

(This looks like the flag of a strange country…)

The first image

September 9th, 2008

I proudly present the first raytraced image — currently without correct lightning or other advanced features. That means, that generating the rays, calculation of the image position in the plane and the ray-sphere collision detection work.

Next small pet project

September 7th, 2008

After a bit of thinking, my next side project will be a very simple but fully functional raytracer for spheres and — if time allows — other geometric shapes. Planned features:

Reflections
Phong Shading
Shadows
Multithreading

Nice to have, but not necessary:

Small GUI with iterative rendering
Antialiasing
Procedural textures

This will keep me working for a few days…

Tetris … finished

September 7th, 2008

My little tetris game is finally finished and now I can enjoy playing it and thinking about my next little, maybe more serious, side project.The obligationary screenshot

You can play it using Java WebStart by clicking here. Controls are quite obvious:

Down, Left, Right moves the block
Up rotates
Space drops
P pauses the game
Escape closes the game

The game accelerates [...]