T&L? the L in T&L useless? think about Raytracing..

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
I was talking to a friend recently, and he brought a graphics feature back from my memory..

Raytracing. the ability to trace all light waves in an environment. that includes non mirror like surfaces.

I can't believe I totally forgot about this feature/idea. basically, you have a light source, and raytracing can figure out trillions of light beams (the more beams it simulates, the more accurate the scene).

so say a light is shining on a desk that is slightly shiny in a white room. you'll see the light reflected a little bit on the desk, at the same time, the light reflects off the walls and illuminates the part of the floor that is covered by the desk.

however this currently requires LOTS of CPU time to compute, so hardware acceleration is a must.

can anyone more knowledgeable add more to this? I might have made some mistakes...
 

Howard

Lifer
Oct 14, 1999
47,982
11
81
The rating for a T&L unit is polygons, right? How could you use polygons for raytracing?
 

Doomguy

Platinum Member
May 28, 2000
2,389
1
81
Wasent raytracing the 3d rendering method used for games such as wolf 3d, doom and other old games?
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
"The rating for a T&L unit is polygons, right? How could you use polygons for raytracing?"

heh, ok, I'm not talking about trying to show how fast a T&L engine is..

second, Ray tracing has nearly NOTHING to do with polygons (I guess not too many of you have heard of it).

it's not about drawing polygons. it's about having accurate lighting for every square inch of polygon.

"Wasent raytracing the 3d rendering method used for games such as wolf 3d, doom and other old games?"

it's possible that it was used in those engines (I don't know about that), but the thing is, as far as I know, for Ray Tracing to be anywhere near realistic, it needs MONSTER CPU time. my friend has a 3D modelling program that has Raytracing as a feature (this is what brought it up). it runs REALLY slow..

of course, Raytracing hasn't ever been done in Hardware as far as I know, so for it to be fast enough for current computers, you need a video card capable of doing raytracing in hardware for it to become a useful feature.
 

rahvin

Elite Member
Oct 10, 1999
8,475
1
0
Raytracing of light is a LONG ways off if ever in 3dgames, the calculations required to do raytracing in realtme on something like Q3a would probably take the processing power of something like a terraflop.
 

Vrangel

Golden Member
Jan 12, 2000
1,259
0
0
Current videocards can barely do antialiasing and cost $500.
Raytracing at reasonable price is probably 5 years away or so.

A3D 2.0 does sound equivalent of raytracing.
CPU hog of course, but sound is sweet indeed.
 

ex inferis

Banned
Jan 1, 2000
11
0
0
I have been tinkering around with raytracing since it was popular with the original Amiga 1000. Granted I'm no pro or anything but have read up on some things.

In order to realtime raytracing you can't think as small as you are, you must think HUGE! Think of a screen that is 320x240 which is 76,800 pixels. Now since raytracing is usually done by calculating each pixel you can take a computer with thousands of processors and assign each processor to do each pixel or several pixels. So basically to do realtime raytracing today you would need a CPU for EACH pixel, roughly. We are still pretty far away from doing any type realtime practical raytracing.
I have seen demos of supposed realtime raytracing but that was on the Amiga and its "demo scene" time. I haven't seen anything for the PC thats realtime raytracing but have heard that SGI created a couple of demos that I believe where raytracing.

ex
 

LiekOMG

Golden Member
Jul 5, 2000
1,362
0
0
Its bad enough we can barely do shadows in realtime, don't even think about raytracing in realtime! :)
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
yeah it depends on the amount of bounces that light will take (if you have 1 light source in a room and are looking in the mirror, the light could go from light source, to wall, to mirror, or you could increase the amount of bounces).

there are many things that you can do in RayTracing, and I think that will probably be one large thing that makes games look alot more real. anyway, we're still talking about doing Raytracing just using software running on a CPU, rather then having a chip that is HARD CODED to do it.

yeah Aureal's A3D 2.0 does wavetracing, it's alot more simple, becuase it doesn't need to be overly complex to sound realistic. even though it's that simple, it still hit the CPU pretty hard! Aureal was planning the SQ3500 to assign the wavetracing processing to the DSP chip (the basic difference between the 3500 and 2500 was the DSP).

as you can see, that'll be the ultimate in lighting, as it's simulating real life alot better then the current methods.

so, combine insane polygon counts, with great raytracing, and good textures, and you get very good realizm..

you still need T&L, I don't know how the L in T&L would be used (if at all) if you were running an app with ray tracing.. perhaps we will be renaming the T&L unit the T&R unit? hehe.. we will see!
 

KarlHungus

Senior member
Nov 16, 1999
638
0
0
Soccerman -

I hate to break it to you, but I really doubt we'll see Raytracing anytime in the near future. There are just too many computations necessary for it to be practical in real time. Current T&L with per-pixel shading gives most of the benefits of raytracing without incurring the extremely large overhead.
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
"I hate to break it to you"

heh, break it to me anyway you want..

raytracing is the future of lighting. you can't accomplish a goal of realizm without good lighting. therefor, you must strive towards making Raytracing a reality.
 

KarlHungus

Senior member
Nov 16, 1999
638
0
0
Nah, that's what ambient light is for. It's all about diminishing returns - would you like to calculate the 999th bounce of a photon, or would you rather add more AI, more lights, etc.?

While I don't doubt it's possible in the future, I am saying that it's a real far way off.
 

Remedy

Diamond Member
Dec 1, 1999
3,981
0
0
If raytracing takes an impact on cpu timing, couldn't a Hybrid of Raytracing be implemented to substitute the complexity on the cpu and the gpu or game coding itslef?

Edit: With discussions like this, its no wonder we have Elite Members.
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
heh, I don't quite understand what you're saying..

are you saying, use BOTH the CPU and whatever you have on your video card to run raytracing?
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
oh, well it's most likely that you'll need a seperate unit to do any raytracing in the form that we're talking about. becuase it sucks alot of power, and the only way to get that (other than buying a 1thz computer!) would be to have a chip that is DEDICATED, ie HARDWIRED to do that, and only that task.

This issimilar to how T&L chips can do alot more polygons/second then a CPU, becuase it's hard wired for that one task.
 

Remedy

Diamond Member
Dec 1, 1999
3,981
0
0
But having SMP GPU's to do that would be something too. Seeing that it needs to be hardwired just to raytracing is already a burden when you think about that. So that is why i said before like couldn't they do some form of hyrid or fake the raytracing? (Like how some companies i think it was nvidia who faked trilinear filtering but matrox g400 was the only one to actually perform it.)
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
I don't know.. I'm not a programmer, I just come up with ideas from what I know!

decreasing the complexity to tracing a ray of light to 2 or 3 bounces off of objects would be one way of decreasing the amount of processing time (unless you are in a room of mirrors, you won't need much more then that in a normal game).

2 or 3 bouces would automatically do soft shadows on its own (don't need a T-Buffer or anything like that), and would increase the overall lighting realism.

then of course, you have to manage the amount of rays that come from a single light source. multiple hardwired cores would be quite useful to increase the amount of light rays coming from a single light..
 

BenSkywalker

Diamond Member
Oct 9, 1999
9,140
67
91
Realtime raytracing is already available in one game that I know of, DX Ball 2.0. It is a breakout style game and only the ball is raytraced, but it is currently available and it does work silky smooth on my machine.

Far more complex then raytracing is radiosity, raytracing by comparison is simplistic and is't too far off from the power levels we currently have(two years possibly), we just need the dedicated hardware to handle it.

The GF2 is pushing in the 75GFLOPS range already, about 37 times faster in theoretical peak then my Athlon, I can spit out one frame of 640x480 32bit 4x4 raytraced in about 45seconds-1 minute depending on the environment(can be much longer) running FPU, adding radiosity can push this number up close to the half hour mark(same complexity, can take many hours depending on scene complexity and bounces).

The NV20 will likely be in the 200GFLOPS range, well within the realm of power to handle it, but as of yet I haven't seen anything that has support listed, it would definately require a dedicated processing unit, possibly even a seperate chip on board.

In terms of raw power, it could be done right now though the level of quality wouldn't be too great and it would be slow if you wanted something better then what we have now. If you are talking about "MentalRay" caliber raytracing then we are probably five or ten years off, with something in between and significantly better then what we have now being seen about two years from now.

BTW- Quake2 used radiosity for its' lighting, and it can be accelerated by current hardware(just not reasonably with higher levels of quality). If you keep the number of ray refractions down(bounces tend to indicate radiosity) then it is possible today. OK, I dug up a link to DXBall 2, check it out here. It is only a 2MB download, and only the ball is raytraced, but it displays the technique being used today.
 

jpprod

Platinum Member
Nov 18, 1999
2,373
0
0
Wasent raytracing the 3d rendering method used for games such as wolf 3d, doom and other old games?

You're thinking of raycasting. It's a similar technique, but simpler. Essentially it meant that for each pixel the engine casted a ray, checked what it hit and drew the pixel accordingly. It was really all done in 2D, some newer implementations such as Doom, Dark Forces and Duke3D (Build engine) just cleverly faked it :)

About raytracing, I really hope that at least in some point, raytracing display hardware will be introduced. Thanks to paraller nature of graphics data, a powerful RISC CPU, perhaps with an easy and 100% legacy-free SIMD instruction set (I'm thinking 8-16 way, at least) would be ideal for the task.
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
3dStudio Max doesnt use raytracing, because it takes so bloody long to render a single frame.

Raytracing is the highest quality rendering developed, that I know of. We will have to wait 10 years untill we see real time raytracing.
 

xtreme2k

Diamond Member
Jun 3, 2000
3,078
0
0
I tried renderin the same scenes in Microstation/J (a CAD program i think is more technical than autocad)

weird though, i have got the same time to RAY TRACE and to Radiosity

Raytrace - 27sec
Radiosity - 27sec
Phong - 4sec
Phong Anti-aliased - 15sec
Smooth - 2sec

anyone got any idea?

i am wondering also, why when rendering with raytrace and radiosity, the output comes out line by line, from the top of the screen, each lines get drawn on until it reaches the bottom of the screen, while Phong, Smooth, both render on a 'per polygon' basis, each polygon is redrawed instead
 

Soccerman

Elite Member
Oct 9, 1999
6,378
0
0
"Far more complex then raytracing is radiosity"

oh? I haven't a clue what that is! can you please enlighten us Benskywalker? BTW, what DO you do for a living? make movies? hehe...
 

BenSkywalker

Diamond Member
Oct 9, 1999
9,140
67
91
Soccerman-

BTW, what DO you do for a living?

Marketing and merchandising I guess you could call it. My job is to get people to buy stuff:)

Radiosity-

"The idea underlying the radiosity technique is to model the distribution of all light energy in an environment. This is in contrast to the ray tracing technique, where only the light entering the camera is modeled and diffuse light transport is ignored.

Radiosity is important in the quest for realism because many surfaces in an interior environment are lit by no direct illumination at all, and are visible only by light reflected diffusely from other surfaces. Also, a surface that is illuminated indirectly may appear to be a different color than it would appear to be if lit directly, since color from one surface can ?bleed? onto another. With radiosity, all the light in the image is taken into account, instead of just part of it."


Link here.

If you have no direct light and are relying on reflections to give a dramatic appearance then Ray Tracing doesn't cut it, you need to use Radiosity or spend a great deal of time working on significantly more difficult light setups. You can reproduce the same effects with Ray Tracing, or extremely close results, it just requires a lot more time to build the scene and tends to result in multiple pre renders and adjustments before you can output a final render to file. This can be a huge pain in the @ss when you are trying to render an avi clip, at times you may need to rotate your lights frame by frame to compensate for the camera movement. Another problem with this setup is you need to use multiple light sources, three or four most of the time, for each single light source you could use with radiosity.

xtreme2K-

"weird though, i have got the same time to RAY TRACE and to Radiosity"

Are you rendering with a single object on screen? If so, radiosity shouldn't have much of an impact. The problems come with something like an outdoor mountain scene with a pond and many trees around. You could easily have two to three hundred bounces using Radiosity if you are trying to use the "moon" as a light source which isn't viewable on the screen but is on the reflection on the water.

If you have say one model of a car in the "scene" and render that with a single infinite light then radiosity will make little to no difference.

"i am wondering also, why when rendering with raytrace and radiosity, the output comes out line by line, from the top of the screen, each lines get drawn on until it reaches the bottom of the screen, while Phong, Smooth, both render on a 'per polygon' basis, each polygon is redrawed instead"

Per pixel versus per polygon. Obviously, per pixel is superior, it is more in depth then that, but that is an easy way to think of it.