pics / bins / mail

Raytracing, maybe,

but Real time or not real time, that is the question.

It struck me one clear day there wasn't enough raytracers available on the net yet and i had to take my chance, but with one hand in the back and a blindfold.

With Heaven7 by Exceed in mind (no less), implementation numero uno ensued.
I learned a lot along the way and in particular that i was heading to a dead end at full speed.

Back to the drawing board.
The second incarnation is much simpler. It aims at doing only one thing, triangles, fast.
So far, so good.


Buzzword compliant techno blabberring:
V1 supported many primitives (planes, spheres etc) and that means more branching. It also lacked any spatial partitionning (scenes were suposed to be kept simple). A simple 3DDA was bolted on later on, with no effect whatsoever but an increased code complexity. It featured every standard tricks and cheats i knew of (this article by Lycium is a gem) yet i couldn't see how i could match the sphereflake scene found in Heaven7.

V2, *cough* will *cough*, shoots coherent rays (packet of  4 rays bundled together, SIMD friendly) through a BVH (Bounding Volume Hierarchy, more precisely aabb in array form) and only supports one primitive: triangles.
I've chosen BVH instead of the ever popular KD-tree for the sake of simplicity. I know Wald & al. would beg to differ.
While my shoddy BVH construction definitely ill behaves on some SPD scenes (rings etc...), i'm currently shooting 1.4M non coherent rays/s (2.2M/s for shadows) on my 2ghz opteron on large models (1M+ triangles) like the happy buddah.
There's some hope.

    tbp.

note: measuring performance in terms of ray/s is a bad idea, yet rays are about the only feature shared by raytracers... this is an attempt to to refine that notion (even if right now the measure is rigged by the ray generation, fix on the way).





If you're bold enough to give it a try, drop me a line as i'd like to know how it performs on other platforms (ie Intel).

A quick note about ray / box intersections.

W.I.P section.
2004-11-20:
2004-11-21:
2004-11-23:
2004-11-24:
2004-11-26:
2004-11-28:
compilation...
bvh::do_build: hang tight and fasten your seatbelt.
bvh::do_build: done in 334.905 seconds and 254 banks.
        nodes 5544029 leaves 2772014 splitters 2772015.
check: leaf found at lvl 10 largest 27  loners 0
bvh::store: purging a bit.
flat::flatten: allocated 169.190 M bvh, 438.492 M geometry

then...
bvh::disk_map: mapped 169.190 M copy-on-write.
bvh::disk_map: mapped 438.492 M read-only.
bvh::bvh_load: load+fixup in 0.423 seconds.

wicked i'd say.

2004-11-30:
2004-12-01:
2004-12-02: