Page 1 of 2

The future for gaming: ray-tracing.

Posted: Mon Jan 26, 2009 1:38 pm
by Pangloss
We know the current tricks that graphic designers in games use to simulate a realistic environment... generate a 'shadow' for the player by using a few additional polygons on the floor, make water look rippled by adding bump-mapping to its 2D surface, make something look chrome by adding a texture that looks like it's reflecting something.

But some are experimenting with techniques that could make today's games look as cartoonish as the old Megadrive / Genesis version of Sonic The Hedgehog looks to our eyes today (used to seeing Sonic in full 3D).

And the future is to generate the graphics with realistic light sources, calculating each ray of in-game light as it bounces off reflective objects and passed through refractive objects in the game. That technique is called Ray Tracing.

There's a video here (71MB, you need the XviD codec to see it) that shows how some clever bastards in Germany have taken the Quake engine and added those realistic effects.

The video linked above is realtime speed for a virtual intel CPU running at 36 GHz (to be more precise: a cluster with 20 AMD XP1800 was used). Alternativly one slow PC (1 GHz) with a hardware raytrace graphics card that is 3 times more powerful then an actual prototpye could be used. Something that fast is needed, especially for the scene in the video where all the spheres are composed of around 1,000,000,000 triangles. Kind of blows Oolite's old limit away, huh!

Here are some screenshots from the ray-traced Quake 3 and Quake 4 engine. The first one shows a multi-player level from Quake 3, with the Quad Damage icon. As it's now a light source, it's throwing off a real-time shadow around the walls.

Image

Having real-time reflections means you can have things look like the T-1000 in Terminator 2. Or have ships that look like a shiny J-Type 327 Nubian (as seen in the Star Wars prequels).

Image

This might be handy for docking in a future release of Oolite... the witchspace dock looks like a mirror (or a ripply mirrored Stargate liquid surface). When you come in to dock, you see your own ship mirrored. And if you let loose a missile, you see it, shadow and all. Here's a Q4 example of where a missile passes over a jumping Strogg. You can see the missile, and the shadow, and the multiple version of both reflected in the spheres.

Image

Don't worry about how much work this will involve... we're still a year or two off from having this as a possibility for the average gamer.

Thoughts?

Posted: Mon Jan 26, 2009 2:10 pm
by another_commander
I don't know about the rest, but from 1.73 onwards we will have the ability to do T2-like effects in Oolite - OK, it's not actual ambient reflections there, but the effect is still very, very close (and you have to see it animated to appreciate it fully):
Image

Posted: Mon Jan 26, 2009 2:29 pm
by ZygoUgo
Promising, not sure if it's exactly necessary though but undoubtedly it will help sell hardware. Could lead to some completely different game concepts in the future, everything's a bit stuck in a rut at the moment, independant games are far more interesting.
Can't wait to see what people manage to squeeze out of Oolites shaders, it seems pretty pliable from the snippets we've seen so far.
Out of interest here's a demo of Blender's live rendering/bullet game engine: http://www.youtube.com/watch?v=pc9JWYuUa2o

Posted: Mon Jan 26, 2009 3:31 pm
by Pangloss
ZygoUgo wrote:
Promising, not sure if it's exactly necessary though but undoubtedly it will help sell hardware. Could lead to some completely different game concepts in the future, everything's a bit stuck in a rut at the moment, independant games are far more interesting.
Can't wait to see what people manage to squeeze out of Oolites shaders, it seems pretty pliable from the snippets we've seen so far.
Out of interest here's a demo of Blender's live rendering/bullet game engine: http://www.youtube.com/watch?v=pc9JWYuUa2o
...and if you want to look at it in even better resolution...

http://www.youtube.com/watch?v=pc9JWYuUa2o&fmt=18

(adding "&fmt=18" at the end of YouTube videos shows them at their original uploaded compression!)

Posted: Mon Jan 26, 2009 3:46 pm
by DaddyHoggy

Posted: Mon Jan 26, 2009 4:28 pm
by JensAyton
My opinion as an experienced graphics geek is: those German guys are idiots.

Since the late eighties, the trend in high-end graphics has been away from ray tracing and towards more efficient object-space techniques. Ray tracing is only used when necessary – mostly for refraction – and the cases in which it is necessary are constantly reduced as new, smarter techniques are discovered for various effects. Ray tracing is simply an inefficient waste of time for most objects.

That aside, there’s absolutely no chance of Oolite being rewritten with ray tracing, so I’m moving this to Outworld.

Posted: Mon Jan 26, 2009 5:06 pm
by JensAyton
Side note: actually, Oolite already has a ray tracer in it. It’s used to work out what the laser is hitting. :-)

Posted: Mon Jan 26, 2009 5:37 pm
by ZygoUgo
@pangloss, thanks!
Yeah see, E/Oolite is still cutting edge!
:oops:

Posted: Tue Jan 27, 2009 1:28 pm
by Pangloss
Ahruman wrote:
Side note: actually, Oolite already has a ray tracer in it. It’s used to work out what the laser is hitting. :-)
Yeah! Lasers are rays too! :lol:

It's certainly inefficient compared to other methods, but as Moore's Law marches ever onwards and game programmers and hardware makers find new and unnecessary ways to justify spending X million on game development to help push new technologies, it's something we might see as a marketing point for new games in future. In a future where the computer could ray-trace water at 120 fps as easily as we can bump-map the surface today, companies will find a way to put it as a feature in their games. Gamers will brag, as they do now, that they can run their games with the setting for OpenRT set on maximum. And the march from Gourard to Phong to real-time ray tracing to who-the-hell-knows-what-else continues.

I was watching this video...

http://www.youtube.com/watch?v=fSXhoCCggB8

...which briefly details the use of CGI in films. I remember when Jurassic Park came out, and how they talked about the complexities of rendering a T-Rex. Then the PlayStation came out, and it had a demo of a T-Rex that you could move around in 3D ( http://www.youtube.com/watch?v=NkEVKzZNQDY ). Less than 2 years later. Whatever you see in films, rendered in software like Maya, will eventually be the graphics you'll see in console and computer games.

Posted: Tue Jan 27, 2009 2:20 pm
by Disembodied
But, of course, donning my cynical hat, a bog-standard Bald Space Marine simulator, no matter how photorealistic, still won't be as much fun to play as wireframe Elite...

Great graphics can turn a great game into a superb one (or a religious experience, in the case of Griff's Cobra III) – but they can't make a lousy game into anything more than a lousy game with great graphics. If games companies concentrated a bit more on making good games, rather than pursuing bleeding-edge gee-whizzery, maybe there wouldn't be so few genuine high points when we look back over 25 years of computer games...

Posted: Tue Jan 27, 2009 4:55 pm
by DaddyHoggy
Disembodied wrote:
But, of course, donning my cynical hat, a bog-standard Bald Space Marine simulator, no matter how photorealistic, still won't be as much fun to play as wireframe Elite...

Great graphics can turn a great game into a superb one (or a religious experience, in the case of Griff's Cobra III) – but they can't make a lousy game into anything more than a lousy game with great graphics. If games companies concentrated a bit more on making good games, rather than pursuing bleeding-edge gee-whizzery, maybe there wouldn't be so few genuine high points when we look back over 25 years of computer games...
Andrew Braybrook - creator of some of the finest 8-bit games ever - Paradroid and Uridium to name but two had a simple philosopy - his games had no sound and were only B&W - when they were brilliant and addictive like that, then he added colour and sound...

Posted: Wed Jan 28, 2009 7:26 pm
by wackyman465
The Sims 2 already has some fairly good reflections, just not realistic angling, I believe...

Posted: Wed Jan 28, 2009 8:48 pm
by DaddyHoggy
wackyman465 wrote:
The Sims 2 already has some fairly good reflections, just not realistic angling, I believe...
You can go fishing - why would you want to? :wink:

Posted: Wed Jan 28, 2009 9:11 pm
by wackyman465
by angling, of course, I mean the angle at which reflections occur...

Posted: Wed Jan 28, 2009 10:47 pm
by DaddyHoggy
:roll: I know....

and hence the :wink: