PDA

View Full Version : ray tracing on the Cell CPU(not game related)


Saibo
07-11-2006, 08:18 PM
a new paper for Siggraph 2006:

http://www.sci.utah.edu/~wald/Publications/webgen/2006/Cell/download//cell.pdf

Arnaud_M
07-11-2006, 10:30 PM
Thanks, very interesting paper ! I am half way through it, and there is this beaaaauutiful sentence about real time raytracing (yep) on the Cell, in the context of a PS3:

Extract:

************************************************** ******
Once being able to trace rays, we have to shade the resulting intersection
points. Ideally, the CELL would be used as a ray tracing
processor only, with shading being done on a GPU. In a Playstation
3, for example, GPU and CELL have a high-bandwidth connection,
and sending rays back and forth would be feasible. In that
setup, the GPU could do what it’s best at—shading—and the CELL
would only trace rays. Since we currently do not have a Playstation
3, yet, we have to temporarily realize the shading on the CELL.
************************************************** ******

So, for some not too complex scenes, it would be possible to do real time raytracing on PS3 using both CELL and RSX (and not only CELL as IBM already demonstrated a year ago for a very simple scene). Very nice. And definitely not doable on another console :-)

Arnaud

yoshaw
07-12-2006, 04:32 AM
Arnaud, can you breakdown the gist of the pdf down to couple more bullet points or is it just that which is in your post above?

Thanks in advance. Not a techie here that's why laymen words required to understand all this jargon. And a CPI touch in this thread would be cool too!

Beenie Man
07-12-2006, 06:30 AM
What is ray tracing anyway?

Uzumaki
07-12-2006, 06:34 AM
What is ray tracing anyway?

I think it has something to do with this one guy named Ray who traces?

Insane Metal
07-12-2006, 07:25 AM
I think it has something to do with this one guy named Ray who traces?

:lol: :lol: :lol: :lol: :lol:

OMG I´m dying... :lol:

agentorange
07-12-2006, 07:57 AM
raytracing can be done but it will eat alot of the capabilities of PS3. It can be done only on those FMV

Applefiend
07-12-2006, 09:39 AM
What is ray tracing anyway?

Basically you bounce lines of light from your eye out to the world resprented in a computer and see what colour they end up as, but in reverse, put them all together, that's ray tracing. Tracing Rays baby. It's very different from the way games consoles build up images, by applying textures to 3D objects and drawing them to screen.

Texturing - hella fast!
Ray Tracing - Hella slow

Video game console doing ray tracing in real time = holy grail.

Problem is most of the effects ray tracing excells at (Mirrors, distortions, prisms, crystal balls,shadows etc) can be nicely generated by texture based rendering techniques these days. So maybe this is something for the PS4, or PS5. :D

But yeah, there are demos of Cell generating real time ray traced images, that's sick awesome. It might be possible to make a 480i ray traced game on Cell/RSX, just for the hell of it. But as you can tell from the Cell ray tracing demos, the game would be pretty limited. You could do pong with a glass ball perhaps.

Here's an early ray traced image from 1980

http://mywebpages.comcast.net/erniew/cghist/images/whitted80.jpg
(from http://mywebpages.comcast.net/erniew/juggler.html)

Took a big powerful (at the time) VAX 11/780($400,000 worth) 74 minutes to generate. It's a usual ray traced image, you can see shadows, the floor reflected in the ball, the floor distorted by the bubble. Keep in mind in 1980 displaying 40 columns of text in colour on a home computer was considered pretty neat.

Cell can do better than this realtime. To an old guy who messed around with ray tracing on his amiga that's mind boggling.

GodMachine_Iridius_Dio
07-12-2006, 10:02 AM
BeenieMan:

Raytracing is the tracing of light rays around a scene, atleast in the context we primarlily speak of here... and the accurate display of the scene as properly lit by those light rays. That's a very rough and primitive description, and I'm rusty as hell right now. Basically think of it like this... you have a cubic room with a mirror, a wooden ball, and a glass bunny rabbit. There is a white sky-light, a blue light coming from the left, a red light coming from the floor, and a lit sparkler showering sparks in the corner. A ray-tracer would accurately say how the scene should be lit, and consequently, shadowed. It would say how much light from each spark should be on every object, how bright each light in the scene should appear on every point it effects, what color the light would be, where it reflects, where it refracts, where it distorts, where it kind of feathers and dulls out, etc. It's all according to physics and in movies it's done as physically accurate and with as many light rays as is convenient.

The problem with realtime raytracing as it currently stands is speed and accuracy. To get speed up, accuracy/quality goes down. You can raytrace a simple scene, with a single ray source and a hand-full of bounds (think of this as points where the light hits and then roccochets), fairly easy, and fairly fast, but you get what you pay for. It's not going to be pretty, and it's not going to be movie-like.

Anyway... Accuracy... More rays and more bounds (calculate the light ray till it's visible contribution to the scene is non-existant).

You'll need a lot of power for this, and to do it right, you're going to need tonnes of RAM, too. Current rendering methodologies are incompatible with raytracing... raytracing accounts for every point in a scene (even parts behind objects) while current rendering systems cull invisible geometry and surfaces...

I need sleep guys. I've got to cut myself short.

Later

Dio

cpiasminc
07-12-2006, 07:39 PM
Texturing - hella fast!
Ray Tracing - Hella slow

Video game console doing ray tracing in real time = holy grail.
There is a crossover point between polygon rasterizers and raytracing, though, and there's also a point where rasterization is not at all feasible, and raycasting at minimum is a necessity. e.g. polygons get too small to rasterize. The reason it's the holy grail is not so much because of power, but because everything we try to do is measured against raytracing. Everything we try to do is really something that could always be done by some variety of raytracer.

As a family of algorithms (and not confined only to Whitted raytracing), it's basically the benchmark for all rendering as it is the algorithmic equivalent of an exhaustive search for an NP problem (the search is never complete in practice, but theoretically could be).

You'll need a lot of power for this, and to do it right, you're going to need tonnes of RAM, too.
Well, I don't know about the tonnes of RAM part... that's dependent on the scene itself. The main thing with the RAM is that you've got really incoherent memory access patterns going on, so the RAM has to be exceptionally low latency, and be massively multi-ported -- especially if you've got lots of execution contexts, which is a good thing for raytracing since it is pretty much the canonical example of something that's embarrasingly parallel.

while current rendering systems cull invisible geometry and surfaces...
...And all other surfaces in a sense. That's the main thing that keeps rasterizers from ever being able to emulate raytracing completely. A raytracer works with the entire scene -- that too, in its inner loop. With a rasterizer, every triangle is in a vacuum.

GodMachine_Iridius_Dio
07-13-2006, 01:21 AM
I kind of figured huge amounts of RAM would help here primarily because of large, complex scenes and storage/caching of scene data that while not seen by the user, has to be accounted for by in the process of raytracing and applied to the final output. Note I'm not talking about system RAM, I'm talking about a huge cache specifically for the raytracer. If it's picking up scene information from every point it hits and we're talking about a significan't number of rays, I'd assume it'd accumulate quite a bit of information per frame.

Right or wrong?

Later

Dio

cpiasminc
07-13-2006, 02:12 AM
Oh... well, if you meant cache, then yeah, it needs gobs if for no other reason than the fact that you'd otherwise end up bound by random memory accesses. And that's often the biggest problem with trying to do raytracing whether exercising a system of large computational power or not -- you end up bound by bandwidth and latency more so than compute resources.

Being able to cache segments of scene geometry by nodes of a BVH is certainly a way to keep things from getting too out of hand (which is one of the things they covered in the paper). Though they were also concerned with fitting this cache inside the SPE LS, so 256 entries per node was the limitation -- 17K per context got them a hit rate of 88% apparently. In practice, 99% is about what you want.

Large complex scenes anyway need lots of system RAM simply because the scene is large and complex, not so much because a raytracer demands it. But I can also imagine that scene complexity also demands larger node caches.

L3XO
07-13-2006, 11:27 AM
Keep in mind that this is a simplified version of rayracing.

True raytracing takes several hours to render per frame. We are not that close im afraid.

Beenie Man
07-13-2006, 07:23 PM
Hmm sounds cool. I think WarHawk uses it for its clouds or something.

cpiasminc
07-13-2006, 07:52 PM
Yep, basically the paper is a raycasting engine (basically the same, except it's only to the first hit). Same as IBM's terrain demo, except that this is actually specifically about dealing with multiple objects and complex scenery. In the TRE demo, there was only one plane being displacement mapped, and that was the only object in the scene(skyboxes aren't really scene members).

Warhawk's raycasting is surely not per-pixel, but it's a good way to get dynamic lighting on clouds.

sudzy
07-13-2006, 08:07 PM
Hmm sounds cool. I think WarHawk uses it for its clouds or something.
This is true. Warhawk does raytracing for their clouds in real time. Very cool development. Not HOLY CRAP!, but very cool.