real time ray tracer

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

real time ray tracer

Post 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
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post 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.
TheQuestion = 2B || !2B
FlyingIsFun1217
Posts: 219
Joined: Fri Apr 13, 2007 8:29 pm
Location: Illinois
Contact:

Post 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
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post 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.
Last edited by Halifax on Sun Apr 13, 2008 1:16 am, edited 1 time in total.
TheQuestion = 2B || !2B
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post 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)
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Very nicely put omaremad. So even movies like The Matrix didn't use raytracing?
TheQuestion = 2B || !2B
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post 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??
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

You're a feckin genius blindside!
Image Image Image
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

wow coooool
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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:
Image Image Image
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post 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! :)
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post 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
Post Reply