English 中文(简体)
Realtime raytracing -- Sult (Loonies, 4k Intro)
原标题:

I d like to know how were effects from Sult (link: http://www.youtube.com/watch?v=FWmv1ykGzis) achieved. How is it possible that this intro does realtime raytracing ?

最佳回答

It could be simple reflection cube mapping. Especially in fast moving scenes it s difficult to find the inaccuracies of cube maps instead of raytracing. However realtime raytracing in a intro is not unheared of: There s a 64k intro called "Heaven 7"

http://www.pouet.net/prod.php?which=5

And an article by the developer on the technical details:

http://www.exceed.hu/h7/subsample.htm

问题回答

Actually this production was written using a really nice algorithm similar to ray tracing... Ray marching signed distance fields.

Here s a 4k demo I made using the same techniques: http://www.youtube.com/watch?v=t7anicyRI3w

There is an excellent presentation on the algorithm here: http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf

As said before, there were even software rendered demos achieving realtime raytracing, like Heaven7 or Nature Suxx. I remember running them at decent speeds in a Pentium MMX at 200Mhz at the time, in 320*200 resolution. These worked so fast by subdividing the screen in tiles and doing the raytracing for the pixels in the corners of the tiles, and only if the values where much different subdivide and do more calculations in 4*4 tiles or 2*2 tiles, etc. Else, interpolate the values in between.

Nowadays it s much easier to optimize raytracing on the GPU with shader code and have per pixel raytracing of many spheres in HD resolution at good frame rates. Sult is just using another technique called raymarching, but essentially it s another way to raytrace (depending on how you define the terms) with it s advantages and disadvantages, for example it s very suitable for small size intros and specific twisted objects and repeatitions of objects in space that are not as easy or fast to achieve with traditional raytracing.

But based on the phrasing of your original question, I guess you might also be wondering, why these people do it and we haven t seen it in the mainstream? We have all heard from game industry developers that raytracing is something from the future and not achievable yet in gaming. So, how come some hobbyists from the demoscene make it possible, but industry veterans say the time is not yet? Technically we can already raytracing on 50 spheres or raymarch in repeatition of the same sphere and make it twist and distort. But, games are using polygons, hundreds of thousands or millions of them. To check a single ray against millions of polygons is an entirely different story. I know, there are methods like kd-tree subdivision of the space to only check a ray with few of the polygons locally, but it s still a very hard problem even with powerful GPUs. And maybe there is not much to gain, besides having perfect shadows and reflections for free (which in the polygon engines you have to achieve it with tedious ways) and a lot to lose. While the demoscene intros are mostly raytracing at scenes with abstract geometrical shapes, implicit functions or voxel data, which are all very abstract for real life 3d geometric scenes and video game characters. And most of the scenes are small, not gonna easily work in an open sandbox game.

So, while these intros really achieve realtime raytracing and we have done it even on the CPU since 2000, it s not really practical for game developing where polygon engines are still more efficient and useful in the real world. So, you ll hear professionals claiming the hardware is not ready for raytracing (in their million polygon scenes) yet see some hobbyist doing it on the GPU and in 4k sizes even.





相关问题
3D Engine for Driving Simulation [closed]

Is there any open-source 3D graphics and physics engine specialized in driving simulation? Something like a configurable game engine targeted at games that involve driving, or something more ...

How to rotate 3d object on Z axis only?

We used 3DTools (http://3dtools.codeplex.com) to draw a 3d line, it allows user rotate it by mouse. I have question, how to limit user can rotate it on Z axis only? or on X axis, Y axis only? <...

WPF 3d rotation animations

I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, ...

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I d like to be able to do some prototyping of creating new types of interfaces for navigating within data and ...

Using Unreal 3 Engine within a .NET application

Now that the Unreal Development Kit for Unreal 3 engine is free I am thinking about utilizing it for an appication. Do you think it is possible to emebedd a Unreal 3 powered 3D window into a .NET (WPF ...

WPF convert 2d mouse click into 3d space

I have several geometry meshes in my Viewport3D, these have bounds of (w:1800, h:500, d:25). When a user clicks in the middle of the mesh, I want the Point3D of (900, 500, 25)... How can I achieve ...

热门标签