# realtime raytracing demo

This topic is 4146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have uploaded a demo of my realtime raytracer, Arauna: http://www.bik5.com/arauna_demo2.zip Instructions: 1. Unzip and run arauna_supersampling.exe to measure peak performance (~11M on my machine); 2. Open scene.txt and add '//' to the fifth line (speedtest); 3. Run arauna.exe to walk around the scene. Keys: A, S, D, W to walk forward/backward and strafe; cursor keys to rotate the camera; R and F to move down and up (reversed, sorry, forgot to fix). That's the basic stuff; there's more to try out using scene.txt, have a look at the file to see what's possible. The executables are optimized for architectural walkthroughs and perform bad for solo objects. Please post your timings! More info and ray tracing discussions: http://www.ompf.org/forum Greets Jacco Bikker EDIT: SSE2 required. Multiple cores supported.

##### Share on other sites
How strange, I went searching the web just the other day to see if there had been any developments in real-time raytracing, and came upon this project in my travels. Good to see you've realeased it, this is very very interesting stuff, and I'll be trying my hand at it sometime soon.

Anyway, the numbers:
Everything in default position, with speedtest active:
2.4 FPS Without supersampling
0.7 FPS With supersampling

Speedtest inactive:
8 - 25 FPS, depending on location

AMD 3500+
1GB RAM
Radeon X800XT (though I'm not sure if you're using the GPU at all)

##### Share on other sites
Can you post rays per second instead of fps? It's more accurate.

##### Share on other sites
Hi Jacco,

This is awesome! Performance on an Athlon 64 X2 4400+ @ 2.4 GHz: 15420K rays/s max.

The dual-core appears to add some shudder though, and the timings vary wildly. Would it be possible to add mouselook?

Cheers,

Nick

Edit: One more suggestion: with mipmapping the cache coherency is much higher and you could reach higher performance with little effort.

##### Share on other sites
Nick: That's pretty good performance, close to what Conroe does. I'm still wondering though where Intel gets it's 100M figure from:

http://www.intel.com/technology/itj/2005/volume09issue02/art01_ray_tracing/p06_rt_performance.htm

I suppose it's a 10 triangle scene rendered at insane resolutions with tons of shadow rays or so, and no normalization of primary rays. The best I can do right now is 20M on a Conroe for a 50k or so scene, with one or two lights.

By the way, before the discussion starts: Ray tracing dynamic scenes is now also possible. Recently, papers where released on alternative data structures (e.g., BIH) that allow real-time rebuilds. Traversal for these scenes is slower than for kd-trees, but finally we can ray trace a fully dynamic scene of ~10k triangles @ 20fps for 512x384 pixels or so. Recent developments also seem to allow realtime construction of kd-trees; that would allow for even more complex scenes to be rendered in real-time.

Anyway, my demo at least proves that scenes of reasonable complexity (this one is 89000 triangles) can be ray traced; this allows for effects that are not easily doable using rasterizing hardware, e.g. reflection and refraction. If you edit scene.txt you can easily add a reflective sphere (mesh included in the demo). Diffuse reflections are also available, but very slow. Refraction is currently broken. Check here for a shot with refraction (while it was still working):

Jacco.

##### Share on other sites
P4 3.4
1Gb

arauna.exe 5825.05K Max
arauna_supersampling.exe 6617.45K Max

##### Share on other sites
Hello,

Couldn't run (no SSE2 :-( ). But I would like to ask a question. Is it possible (or rather, worth it) to use the extra registers x86-64 adds to reschedule a function for packing more rays per call? (Ie. instead of packing 4 rays using SSE with 8 registers (x86), use the extra 8 registers in x86-64 to run the same code while the other code is running (organizing the instructions to use the extra logic units)). Sorry for hijacking thread. Thanks,

JVFF

##### Share on other sites
I don't see how you could do that. SSE2 operates on vectors of data, so one operation is applied to four data items. This is not the same as parallel code and cannot just be emulated using more registers.

##### Share on other sites
Why does it require SSE2 in the first place? As far as I know SSE and MMX are perfect for processing vectors and colors.

Anyway, the extra registers offered by x64 could definitely create some new possibilities. By working on larger batches of data it's easier to hide instruction latencies.

##### Share on other sites
I can see the render, but it wont respond to keyboard or mouse except for esc which quits the program.

##### Share on other sites
Quote:
 Original post by The C modest godI can see the render, but it wont respond to keyboard or mouse except for esc which quits the program.

You have to alter the scene.txt file as described in the original post.

##### Share on other sites
Quote:
 Original post by metimmeeP4 3.4Radeon X6001Gbarauna.exe 5825.05K Maxarauna_supersampling.exe 6617.45K Max

I have similar values with my 2.4 Ghz Athlon 64 (single core)

##### Share on other sites
11 million/sec on my Athlon 64 x 2 "3800+"

##### Share on other sites
Core 2 Duo E6700 (2.66Ghz)arauna.exe 19599.48K Maxarauna_supersampling.exe 23809.35K Max
Non optimized memory settings at the moment...

##### Share on other sites
pentium-m 1,7ghz =)

speedtest:
with supersampling ~5,0K rps 0,7fps
w/o supersamplimg ~4,1K rps 2,0fps

without speedtest: (default pos)
with supersampling ~5,2K rps 2,2fps
w/o supersamplimg ~4,5K rps 9,5fps

but it looks cool :)

##### Share on other sites

This topic is 4146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.