X3 Reunion graphics again. This time raytraced.

Everything else that doesn't fall into one of the other PB categories.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

what smoothing do you use?

the first example's triagle resolution is completely sufficent for my taste.
I mean, triangles per object or triangles per detail.
with that "resolution" one could create really complex scenes with under 1M triagles...
oh... and have a nice day.
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

Thanks! :)

With those two scenes, I just wanted to show that primitive count doesn't matter that much anymore, if you have a working acceleration structure. So even scenes with several million primitives shouldn't slow down the raytracer too much, unless memory access gets to random.

The smoothing is very simple. In most cases, the normal at the vertices of each triangle is computed by averaging the normals of all adjacent triangles. Those normals are just interpolated over the triangles. If your looking close at picture 1, especially the torus, you see that the normal should really be normalized. I think the lighting it's quite ugly, but that's an easy fix.
It just wasn't what I wanted to show. :wink: :D
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

Hi, me again! :D

I need your help!

Before coding any further, I'd like to get some feedback from you, so I've uploaded a small Demo (1.2MB, Windows).

It's nothing special, just that X3 Reunion ship again. But without shadows, and no bilinear filtering.


Does it run on your Rig? How fast (from start position)?

WSAD - Movement
Cursor keys - Rotation
1-7 - Resolution
Escape - End


Thanks!

Hades
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Nice work! Resolution 7 takes 218ms to render one frame. Resolution 1 to 3 takes 16ms because of vsync. Nice to see that your code uses all 4 cores!
The Human Code Machine / Masters' Design Group
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

File seems to be missing from the servers, just tried to get it from 3 places and it's not there.
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

@Derek

I've just downloaded it, and everything was fine. Strange...


@THCM

Great to hear! You've got a Kentsfield? How fast?

In theory the program should use any number of cores you throw at it. How high is your CPU utilization?

By the way, thanks for testing and reply! :D


PS: Resolution 7 is 2560x2048 rays, rendered to your desktop resolution. So if you've got 1280x1024 it's 4 rays per pixel. Doing this in 218 ms means 24 million rays per second. Damn, you've got a nice mashine! :shock:
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

My fault, I had getright turned on. :oops:

I get:
1 16ms
2 31
3 47
4 62
5 94
6 156
7 594

Details in my sig.
citystate
Enthusiast
Enthusiast
Posts: 638
Joined: Sun Feb 12, 2006 10:06 pm

Post by citystate »

MAN you've coded a nice demo there - well done

my speeds are much more modest than THCM's (but then again we can't ALL have supercomputers :) )

res 1: 30ms
res 2: 53ms
res 3: 77ms
res 4: 114ms
res 5: 171ms
res 6: 277ms
res 7: 1016ms

on a Celeron 3.33GHz with 2GB ram 1280x960 screen res

so when are we going to see X4 (powered by Hades StreamRay) - or failing that, a DLL for us mere-mortals :?:
there is no sig, only zuul (and the following disclaimer)

WARNING: may be talking out of his hat
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

@citystate

Thanks! :D
so when are we going to see X4 (powered by Hades StreamRay)
lol - I'd really LOVE to do something like that! It just may take some time... :wink:
or failing that, a DLL for us mere-mortals
That' a little more probable. :)

It's just... there is so many dependency everywhere. You can't just call one function and get a nice picture. I don't know how to do it to be usable for other people, and I'd hate to write a doc for it.
But I would like to share it, if you have ideas how!


@Derek

I suspect your C2D is at stock speed!?

You've got the same speed as my Athlon X2 @2,6 GHz.
Your C2D should be faster. But then... the code is hand optimized for AMD. Maybe I'm just missing something. I'll have to read that Intel optimization guide again...
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

@Hades I have a Q6600 running at stock 2,4 Ghz. Here are my scores:

ms / %
16/15
16/18
16/25
31/57
47/72
62/80
218/95

My desktop resolution is 1920x1200x32. I'll do some tests later using my overclocking setup (3,4 Ghz).
The Human Code Machine / Masters' Design Group
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

@THCM

Damn, I really don't like those numbers. :(
My rig runs at 88% for res 1, and 97-100% for all other resolutions. Without vsync it looks very ugly at low fps, but I should have removed it for this test. But there has to be another problem with my code on your machine... Ok, still a lot of work ahead. :roll:
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Yeah, stock speed so that's only 1.86 and my graphics card is VERY, VERY slow. :cry:

My %'s are 54,75,83,88,92,96 and finally 99 at resolution 7.
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

@Derek

Your graphics card shouldn't matter, because all the hard work is done by the CPU. The graphics card is only used to render a single quad with the raytraced picture as a texture. An AGP bus could be a bottleneck for high resolutions though. For resolution 7 that texture has more than 20 MB.

What really bugs me... your CPU utilization is to low, too. It would only make sense, if vsync works different on your rigs, than on mine. Very strange.




Edit: I've removed that vsync and another possible performance killer, and uploaded a new exe (removed, better one below) . Could you please replace the old one, and report the new performance numbers (especially THCM)?

Many thanks!

Hades

Edit2: I've just replaced the above exe for a more stable one (*hopefully* no more crashes when switching resolutions).
Last edited by Hades on Tue May 22, 2007 9:21 pm, edited 1 time in total.
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Here the scores for your latest exe (always 100% usage):

0-16ms
0-16ms
0-16ms
16-32ms
31-42ms
47-62ms
203-218ms

Numbers are hard to read, they are changing too often.
The Human Code Machine / Masters' Design Group
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Here's mine, 100% cpu usage as well.

1 0-16
2 16-31
3 31-47
4 47-63
5 74-96
6 140-170
7 578-594 and a massive jump in the size of the pagefile usage!
Post Reply