Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPUs.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
265 Discussions

rtcIntesect with tfar and unnormalized diection vector?

Sönke_P_
Beginner
160 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
160 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.

Reply