X3 Reunion graphics again. This time raytraced.

Everything else that doesn't fall into one of the other PB categories.
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

X3 Reunion graphics again. This time raytraced.

Post by Hades »

After some time without coding, I've started working on a raytracer again.
ATM it's just a pile of unorganized procedures, but at least it is starting to create recognizable pictures. :D


Image
Image

Features:

10k+ triangles
diffuse texture
light texture
specular texture
bilinear filtering
acceleration structure (BIH) is rebuild every frame
4-5 fps


Ok, that's several hundred times slower than my rasterized version, but at least it has self shadowing and that nice feeling, that every point on screen is calculated by my code, not by some API + GPU. :D
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Looks pretty nice to me.
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

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

Post by THCM »

Looks good! How fast is your computer and is your renderer multithreaded?
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 »

Thanks!

It's an Athlon X2 @2,6 GHz

The code is partly multithreaded, but only uses 80% CPU time ATM.
The only part really optimized is the ray traversal and the ray/triangle intersection code, but it's mono ray, FPU only.
With SSE, packet tracing, first hit and shadow ray optimization and all those other little optimizations a 5 - 10 fold speed increase should still be possible.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Thats pretty awesome
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

nice textures.
how many polygons does the model have?
200ms is pretty fast for raytracing, but maybe not fast enough for ingame-grafix....
oh... and have a nice day.
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Kaeru Gaman wrote:nice textures.
how many polygons does the model have?
200ms is pretty fast for raytracing, but maybe not fast enough for ingame-grafix....
Polycount: 10k+ (As he said)
Afaik you know, raytracing is not for ingame (maybe in the future).
bye,
Daniel
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

> Polycount: 10k+ (As he said)

he said:
> Features:
> 10k+ triangles

I interpreted that as naming the possibilities of the engine, not stating how much triangles that model has that needs ~200ms to render.

> Afaik you know, raytracing is not for ingame
posting such threads implies trying to make it usable for ingame-grafix.

what's up Didi? did I sit on your tie?
oh... and have a nice day.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

That looks really nice! with some optimizations you could get a damn decent speed :)
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

Cool down, people. My first post wasn't that clear. :)

The model is made of 11302 triangles. I've already had 700k+ triangles on screen. That's only slightly slower (about half the fps? Not sure. Edit: Only without rebuilding the BIH in both cases)

Even with that 10 fold speed increase it would be to slow for a game. :(
Resolution is only 600x400.
@800x600 with a closeup of the model I am already down to 1 fps now.
But hopefully I'll have a PC with 8 cores at the end of the year... ;) :D
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

It is certainly fast enough for movie rendering :!:
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Kaeru Gaman wrote:> Polycount: 10k+ (As he said)

he said:
> Features:
> 10k+ triangles

I interpreted that as naming the possibilities of the engine, not stating how much triangles that model has that needs ~200ms to render.

> Afaik you know, raytracing is not for ingame
posting such threads implies trying to make it usable for ingame-grafix.

what's up Didi? did I sit on your tie?
No, it was well meant. I just thought 10k+ was for the ship triangles. :-)

>> Afaik you know, raytracing is not for ingame
>posting such threads implies trying to make it usable for ingame-grafix.

Hum, I think at the moment it's better to stay at quality with raytracers instead of performance. ;-) :-)
bye,
Daniel
User avatar
Hades
Enthusiast
Enthusiast
Posts: 188
Joined: Tue May 17, 2005 8:39 pm

Post by Hades »

DarkDragon wrote: Hum, I think at the moment it's better to stay at quality with raytracers instead of performance. ;-) :-)
I'd like to have both. :D
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

...and it is a good approach for sure. :D

ingame-grafix can also mean a on-the-fly rendering of still pictures.

needing 1 second for a 800x600 picture would be fair enough to write an adventure that creates it's backgrounds at runtime. ;)
oh... and have a nice day.
Post Reply