Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)

rtcIntesect with tfar and unnormalized diection vector?

Sönke_P_
Beginner
339 Views

Hi,

I'd have a very basic question on how to use RTCRay with rtcIntesect: am I required to provide a normalized direction vector?

And if I don't: how is the value of "tfar" interpreted?
Is the endpoint: ray.tfar * ray.dir?

I'm trying to use a direction vector with the full length between two points p1 and p2:
ray.dir = p2 - p1;
Can I set ray.tfar = 1 now, assuming that it will travel the whole distance from p1 up to point p2?

Thanks for clarifying this,
Sönke


 

0 Kudos
1 Reply
SvenW_Intel
Moderator
339 Views

The ray endpoint is always  ray.tfar * ray.dir. Thus in your example using tfar=1 will create a ray from p1 to p2.

0 Kudos
Reply