为提高光线跟踪算法中的求交速度,缩短场景渲染时间,提出一种效率更高的基于八叉树空间编码邻域搜索的光线跟踪算法.通过存储的初始节点空间编码、所在层次及与邻域节点的层次差,快速求出光线在某一方向上的下一个领域节点,避免邻域层次判断及大量的递归运算,加快光线与空间节点的求交速度.采用该算法进行光线与空间节点的求交测试,将仿真结果与其它算法进行比较,验证了该算法的速度比文中引用算法提高约2-3倍.%To improve the speed of light-crossing calculation and shorten the time of rendering,a kind of ray tracing algorithm based on the neighbor finding of Octrees spatial encoding was proposed.After knowing the pre-stored node spatial encode,node level and the level differences of neighborhood node,its next neighbor node in given direction was calculated quickly,thus reducing the recursive times and accelerating the computing speed.According to the light-crossing calculation using the proposed ray tracing algorithm and by comparing the results with others,it shows that the speed of ray tracing is improved by two or three times after using the proposed method to carry on the light-cross calculation.
展开▼