雷三角形相交 [英] Ray-triangle intersection

查看:272
本文介绍了雷三角形相交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到<一href="http://www.cs.virginia.edu/~gfx/Courses/2003/ImageSynthesis/papers/Acceleration/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf">Fast最小存储雷/三角形相交由穆勒和Trumbore 是经常被推荐。

的事情是,我不介意pre-计算和存储数据的任何金额,只要它加快行动的交集。

The thing is, I don't mind pre-computing and storing any amounts of data, as long as it speeds-up the intersection.

我的问题是,不关心内存,什么是做光线三角形相交的最快方法?

So my question is, not caring about memory, what are the fastest methods of doing ray-triangle intersection?

编辑:我不会动的三角形,即它是一个静态场景

I wont move the triangles, i.e. it is a static scene.

推荐答案

正如其他人所提到的,要加快速度的最有效的方法是使用一个加速结构,以减少所需的光线 - 三角形交叉点的个数。这就是说,你还是希望自己的光线 - 三角形交点要快。如果你感到快乐,以precompute的东西,你可以尝试以下方法:

As others have mentioned, the most effective way to speed things up is to use an acceleration structure to reduce the number of ray-triangle intersections needed. That said, you still want your ray-triangle intersections to be fast. If you're happy to precompute stuff, you can try the following:

将您的线线和您的三角形边来普吕克坐标。这可以让你确定你的线线穿过一个三角形6乘法/每边加的。您仍然需要比较的三角平面的线的起点和终点(在4乘/每点增加的),以确保它实际上击中的三角形。

Convert your ray lines and your triangle edges to Plücker coordinates. This allows you to determine if your ray line passes through a triangle at 6 multiply/add's per edge. You will still need to compare your ray start and end points with the triangle plane (at 4 multiply/add's per point) to make sure it actually hits the triangle.

最坏情况运行费用为26乘/加总。另请注意,您只需要在每个光/边缘组合,一旦计算出光线/边缘的迹象,所以,如果你正在评估一个网格,您可以使用每个边缘评估的两倍。

Worst case runtime expense is 26 multiply/add's total. Also, note that you only need to compute the ray/edge sign once per ray/edge combination, so if you're evaluating a mesh, you may be able to use each edge evaluation twice.

此外,这些数字假设一切都在齐次坐标正在做。您可以通过一些时间提前正常化的东西,以减少乘法的次数。

Also, these numbers assume everything is being done in homogeneous coordinates. You may be able to reduce the number of multiplications some by normalizing things ahead of time.

这篇关于雷三角形相交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆