Csillámtrace - my new graphics engine

Practical and theoretical implementation discussion.
jbikker
Posts: 224
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: Csillámtrace - my new graphics engine

Post by jbikker » Thu Apr 12, 2012 7:05 pm

Arauna? Ow, Arauna. Long time ago. I did some measurements for you, see attachement. Three scenes, three cameras, 12 cores (24 when counting HT), 3.4Ghz, 1280x704 (because 720 is not a multiple of 32), CPU-only. First scene has 12 lights that all illuminate the full scene (hence the huge average number of rays per pixel). Second scene has more lights, but they are smaller. Third scene is many polygons (600k), and 4 lights, all affecting all scene surfaces. Up to 550M rays/s. 8-)
arauna_performance.png
arauna_performance.png (309.84 KiB) Viewed 5940 times

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Thu Apr 12, 2012 8:16 pm

thank you for sharing these results.
based on your raw ray/sec rate, i can compare it with my own rate too.

the performance of my code is the folowing:
on a 6 core AMD machine, i got 75 fps in res 256x128, with a simple shadow (1 light).

this means:
fps * x * y * lights
75*256*128*2 = ~ 5 million ray per second. (this means a pixel costs 2400 clock)

so your code is actually ~100x faster :D (so your code eats around 24(!) clock per pixel)

btw, i hope the speed of my code will also be improved soon (the speed of effects mainly), but first i must fix the bugs in the rendering.
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Thu Apr 12, 2012 8:51 pm

the songoku scene in 512x256:
~38 fps with 6 core on the same cpu ~ 10 million ray per second
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Thu Apr 12, 2012 10:37 pm

i disabled the light in my scene
5% speed up

so i now laugh. something is very fucked in my code, somewhere. but not in the scene tree *sigh*
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

jbikker
Posts: 224
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: Csillámtrace - my new graphics engine

Post by jbikker » Fri Apr 13, 2012 11:48 am

Your calculations are wrong.

Let's start with the 550M = 24cycles:
At 3.4Ghz, 12 cores do 12 * 3.4 * 10^9 cycles = 4.8e10. Divided by 5.5e7 is 872.7, *per ray*, which seems reasonable.

Then, your code:
256 * 128 with one shadow ray, at 75fps = 4.9M rays/s.
Assuming your AMD machine can do 3.6Ghz (I did a quick google), it does 6 * 3.6e10 = 2.16e10 cycles/s.
Each of your rays thus eats 4408 cycles.

Your code is currently roughly 5 times slower, which is reasonable, considering that I spent basically the past decade optimizing mine.

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Fri Apr 13, 2012 11:58 am

jbikker:

that AMD machine isnt mine, and i dont remember, how many mhz it was. but i am happy to hear that my code is ,,just'' 5x slower, since i develop ecsactly this algorythms since 4 months. thankfully i can forge around 5% performance up in my code in every day. this means that i have luck, i maybe can reach arauna performance after a month (wich will never happen i think :D). but the image quality of your code is *mutch* better.
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Vilem Otte
Posts: 24
Joined: Sun Dec 25, 2011 12:42 am

Re: Csillámtrace - my new graphics engine

Post by Vilem Otte » Fri Apr 13, 2012 11:59 pm

Just a little note...

Arauna is still open-source and you can learn a lot from going through it ;) (I did, thanks jbikker - but still Arauna is faster (in Sponza a lot faster) ... "What kind of sorcery is this" :mrgreen: ).

The image quality is heavily based on models/textures quality ;) You can try some Sponza or such models, or I have some usable models on my HDD (even some scenes will be ready soon) created for really small "semestral" game project - so if someone would be interested in ... I could post model or two (and the scenes when ready).

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Sat Apr 14, 2012 7:41 am

Vilem Otte:
Arauna is still open-source and you can learn a lot from going through it
well, i have downloaded its source code days before, and investigated it. The principles behind the code are not compatible. Its very different from inside. So i cant stole jbikker's tricks from arauna.

and i also dont want to use/rely on any thirdparty code/codesnippets/solutions/principles, becouse it would be a pain in the butt to fix if somethings gets broken in the middle of the code, somewhere, somehow...
Sponza
i didnt knewd whats a sponza is. http://hdri.cgtechniques.com/~sponza/files/ you meant this? ^^
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Sat Apr 14, 2012 7:51 am

Image
i made a minibenchmark, so i can detect the bottlenecks more efficently
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Geri
Posts: 146
Joined: Fri Mar 02, 2012 7:01 pm

Re: Csillámtrace - my new graphics engine

Post by Geri » Sat Apr 14, 2012 10:49 am

(i got some requests from people to share this minibenchmark in standalone version. if somebody wants, can get it here: http://gamegirls.no-ip.org/forum/viewth ... ibenchmark )
Csontos kezünkbe a nyomor
Ezer év rúnáit véste

Post Reply