Page 1 of 2

real time ray tracer

Posted: Thu Apr 10, 2008 11:03 pm
by JonLT
I'm currently working on a ray tracer. Not real time at all (1 fps or so in a really boring scene).
Just wanted to hear you opinion on when you think the real time ray tracer will become reality? And if you think it would be a gain for 3d graphics?

I'm actually doing a project on the subject (studying computer science) so if any of you have some insider knowledge I'd be very happy to hear from you!

Thanks

Posted: Thu Apr 10, 2008 11:07 pm
by Halifax
Have you seen this:
Image

And really it depends. There is no straightforward answering to whether raytracing is the future. I recommend you go read some papers/interviews from Intel, nVidia, and John Carmack.

Posted: Sat Apr 12, 2008 3:02 am
by FlyingIsFun1217
I just read an interview with one of the Far Cry guys posted over at GameDev, and in it was the question as to whether or not Ray Tracing was the future of graphics technology. Simply put, the interviewee saw it as a method that would need too much computational power.

It's a cool technique to show advancements, but I don't see it to be practical in the mainstream.

My 2 Cents!
FlyingIsFun1217

Posted: Sat Apr 12, 2008 3:48 am
by Halifax
EDIT(replaced what is in quotes):
Alright, I will post my opinion as well. Personally, I see no reason at all to use raytracing('shaders'), there is only a need for better computational power. If it hasn't already been seen, the nVidia Real-time Skin Shader for GPU Gems 3 was ridiculously realistic, but not ready for real-time yet due to computational power.

Personally, I think graphics are fine as they are now. I have tried to think about it, but what would you do if when you played Madden 2010 it actually looked like a real game with real people. I just don't think it is possible, and I don't think I would even like to play it if it looked too realistic. That's just my opinion.

Posted: Sat Apr 12, 2008 7:26 pm
by hybrid
I think that you can already have RT raytracing on consumer hardware. The Quake Raytracing demo showed it. However, the interview with the FarCry guy also mentioned the opinion that it won't be in use before 2010, maybe even later. I guess it's an interesting opinion, maybe not for a full game, but for some scenes at least.

Posted: Sat Apr 12, 2008 7:43 pm
by omaremad
Ray tracing is not the futre. Even in commercial films its is used very sparsely.

What it can do:
-reflections
-simple shadows(increase ray count and add a random for soft shadows but perfomance will suffer badly)
-refractions to some extent but since ray tracing is done backwards it is not practical to use it for caustics(shiny white areas on surfaces recieving refracted light)
-Subsurface scatter


Its not good for everything and even the things its good at can be done much cheaper in other ways.

refractions can be faked to some degree on gpus using and last frame Rtt and some normals as the texcoords

Shadows are handled using shadow maps nicely


Sub surface scatter is emulated in games using backface lighting mixed with a thickness map or via Spherical harmonics, Guassianed lightmaps(resulted dynamic light of a shader captured and blurred then applied onto the model) also does SSS nicely(used by ati in their demos and even offline renderer's)

To get "cool" rendered graphics like offline render's you just need ray casting and shading, which is what todays fragment processors do.

Radiosity and indirect lighting is what makes an image Real, And with SSAO,prebaked directional lightmaps or even simple GI cube maps you can create render like images.

Ray tracing is one tool in the toolbox, its not everything. Its contribution to the scene is very subtle unless its a material less scene. So subtle that most movie studio dont use it, many great cg movies never used it either(Cars was the first pixar movie to contain raytracing, they used it since environment maps couldnt refelct the car's eyes onto the car itself)

Posted: Sun Apr 13, 2008 1:18 am
by Halifax
Very nicely put omaremad. So even movies like The Matrix didn't use raytracing?

Posted: Wed Jul 02, 2008 10:48 pm
by JonLT
http://igad.nhtv.nl/~bikker/

check that page. Some students of a master mind have created a game running in a real time ray tracing engine!

I really like raytracing because it makes accurate shadows and reflections without much coding effort.
You might even be able to trace light, sound and collision with the same rays??

Posted: Fri Jul 04, 2008 6:00 am
by BlindSide
I'm working on a realtime/semi-realtime raytracing video driver for Irrlicht (I wanted to keep it a secret until it was finished properly).

Currently it supports triangle meshes, texturing with bilinear filtering, per pixel lighting and soft shadows. I would release a demo but it's still a work in progress and I want to implement some essential optimizations like KD-Tree, SSE packet tracing and multi threading so everyone gets a good first impression of its speed.

I'll show you an offline render though (I used 32 random samples for the soft shadows):

Image
I think the shadow cast by his beard looks pretty nifty ^_^

@ JonLT: What kind of scene was it that you got 1 FPS with? Did you use any spatial subdivision schemes, threading or SIMD instructions?

Posted: Fri Jul 04, 2008 7:11 am
by JP
You're a feckin genius blindside!

Posted: Fri Jul 04, 2008 7:18 am
by Virion
wow coooool

Posted: Fri Jul 04, 2008 7:35 am
by BlindSide
JP wrote:You're a feckin genius blindside!
Slow down, that was an offline render. If it was at 60 FPS then I'll concede to being called a genius...

I only started it like a week ago so there is alot of room for optimization, namely the ones I mentioned earlier, so don't rule that possibility out yet. :P

Posted: Fri Jul 04, 2008 8:10 am
by JP
Shut up blindside, how dare you talk back to me like that! If i say you're a genius then you'll damned well sit back down and take it like a man!!

:lol:

You're just a bit of a genius in general i think, you seem to do a lot of really cool projects... not sure if you ever get many of them finished though... 8) :lol:

Posted: Fri Jul 04, 2008 9:26 pm
by christianclavet
That's great.

With some tricks we could save that as a sequence of frames and create cutscenes directly using the IRRlicht engine! :)

Posted: Tue Jul 22, 2008 7:46 am
by torleif
BlindSide: good work :)

I wrote a ray tracer in C, it took 3 mins to render a scene with about 20 objects. It had no optimizations but produced some cool looking images