Skip to main content
gamedev.net
🔒 Locked

Ray Tracing

Started by Snyper 2 replies 250+ views
Original Post
Snyper
Snyper
How do you trace a ray?
=============================Where's the 'any' key?=============================
VyvyanBasterd
VyvyanBasterd
A ray is merely a line with a starting point. You can think of it as u + tp, where u is the starting location, and p is a vector describing the direction of the ray. t is a scalar. At t = 0, the function evaluates to u. At t = 1, it''s one step along the path of the line. So, to trace a ray:

For each object in the scene:
if ray does not intersect object, skip to the next object.
If it DOES intersect the object, find the t value.

The object with the lowest POSITIVE t value is the first object hit by the ray.

There you go...
Dark
Dark
First get some information about Math... specifically VECTOR math... and it will all be very clear and simple

It is simple!!
ICQ: 130925152Email: e.j.folkertsma@student.utwente.nl
Snyper
Snyper
I didnt say i didnt know what a ray was. I just dont know what people mean by tracing a ray in a 3d engine. I should have been more descriptive in my 1st post.

Edited by - Snyper on June 28, 2000 7:19:43 PM
=============================Where's the 'any' key?=============================

Topic Locked

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

Sign in to reply to this topic.