Skip to main content
gamedev.net
🔒 Locked

ray tracing beginner

Started by v71 5 replies 900+ views
Original Post
v71
v71
Hi , i''ve got some questions about ray tracing, i know the background math and physics behind light models, propagation, intersection and so on, but there is a question i was unable to fina an answer to : ray tracing involves tracing ray for every pixel of the screen, but what if an object is far away the projective screen , could it ''fall'' beetween rays and vanish ??? A i missing something important i should know ????
smart_idiot
smart_idiot
Ideally you will have several rays per pixel and average the results together. This is known as antialiasing.

Antialiasing and Raytracing

[edited by - smart_idiot on November 22, 2003 1:24:24 PM]
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other
Eelco
Eelco
if its that far away, its so small this is really not much of a problem anymore.

but AA is a solution to this, yes. but realize that raytracing is slow enough without AA enabled.

ive been thinking about beam-tracing myself (not a used term afaik, i made it up), where you cast a piramid shaped beam instead of a ray, and trace that. im not sure yet how that would work out though. the math would become quite more complex for sure.
Ilici
Ilici
quote:
Original post by Eelco
if its that far away, its so small this is really not much of a problem anymore.

but AA is a solution to this, yes. but realize that raytracing is slow enough without AA enabled.

ive been thinking about beam-tracing myself (not a used term afaik, i made it up), where you cast a piramid shaped beam instead of a ray, and trace that. im not sure yet how that would work out though. the math would become quite more complex for sure.


That''s an interesting ideea. The math of the tracing wouldn''t be so much more difficult, but the math for the collision would be. The piramyd could interect the corner of an object and would have to be split.
Eelco
Eelco
the way i had it in mind was to have a small imagebuffer, of say 16x16 pixels (powers of 2 in any case). then trace the beam. when it hits something, split up in four more beams until a beam is completely absorbed by a surface or the imagebuffer pixel level is reached. then do a normal ray.

this would do doable in logarithmic time, so if youd really like you could do 256x256 samples without too much speedloss.

the biggest problem i see with this though is, for example, how to reflect a piramid of a curved surface like a sphere. you can approximate ofcource but im rather sure there isnt an exact solution to such a problem.
v71
v71
Eelco this looks like an old algorithm for back culling called warnock culling. I don''t want to start another future of ray tracing, but maybe now with this powerfull cpu and gpu some algorithm thought to much lenghty might became a test filed for some new theory
P.S. sorry for my english i''m very tired this night :-))

Eelco
Eelco
i dont see what it was to do with back(-face i sopposed you mean) culling..

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.