OpenCascade Ray Tracing Rendering
摘要Abstract:OpenCascade6.7.0中引入了光線跟蹤算法的實現。使用光線跟蹤算法可實現高質量的渲染效果,且可以使用GPU提升渲染效率。?
關鍵字Key Words:OpenCascade, Ray Tracing?
??
參考鏈接:Ray tracing as alternative rendering method for OCCT visualization component?
http://dev.opencascade.org/index.php?q=node/898
?
OpenCascade 6.7.0對顯示部分做了些重大改進,其中突破性的改變是使用OpenCL實現了光線跟蹤算法。作為庫TKOpenGl的一部分,光線跟蹤算法與標準的顯示模塊完全集成。從此,光線跟蹤也可以作為顯示的一種方法。與其他第三方庫的光線跟蹤庫的區別是,內置的光線跟蹤算法確保了實時渲染時的性能,性能與OpenGL的性能相近,在有大量模型時性能比OpenGL的還要好。?
光線跟蹤功能如下:?
l High-quality shading by interpolating normal across the triangle pixels and using advanced illumination model (Phong shading);?
l Depth-correct order-independent transparency for any number of overlapped objects;?
l Sharp shadows from isotropic point and directional lights without any approximation – greatly improve visual appearance;?
l Specular reflections and environment mapping – for high-quality rendering of metallic surfaces;?
l Low-cost adaptive anti-aliasing allows to improve image quality by removing jagged edges from the image;?
l Based on cross-platform OpenCL framework – runs on GPUs of major vendors (NVIDIA and AMD/ATI);?
l Makes the most of the mid-/top-range GPUs but also runs successfully on low-end GPUs that support OpenCL。?
只要OpenCascade編譯時啟用OpenCL支持,光線跟蹤的使用是相當簡單,只需要調用函數V3d_View::SetRaytracingMode()就可以把3D view切換成光線跟蹤渲染啦。參考V3d_View和文檔或者Draw Test Harness的vraytrace和vsetraytracemode命令實現的源程序去詳細了解如何設置光線跟蹤的一些選項。?
最簡單的測試光線跟蹤的方式是在Draw Test Harness中輸入如下命令:
生成效果如下圖所示:?
Figure 1.1 Render bottle and text with ray tracing?
Figure Render my email with Ray tracing
Figure 1.2 Render pipe and equipment models with ray tracing?
Figure 1.3 Render pipe and equipment models with ray tracing?
從上圖可知,使用光線跟蹤效果很不錯,可以看到鏡面效果,很Cool!
PDF Version: OpenCascade Ray Tracing Rendering
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
