Implicit surface rendering via ray tracing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
ZCWang aef02d7427 update README.md 2 years ago
3rdparty/nvpro_core Commit local directory 2 years ago
cmake Commit local directory 2 years ago
screenshot update README.md 2 years ago
src Commit local directory 2 years ago
test Commit local directory 2 years ago
.gitignore Initial commit 2 years ago
CMakeLists.txt update README.md 2 years ago
CMakeSettings.json Commit local directory 2 years ago
LICENSE Initial commit 2 years ago
README.md update README.md 2 years ago

README.md

SDFRT

Implicit surface rendering via ray tracing

Introduction

采用Ray Tracing(其实本质上是Ray Marching)解决隐式曲面的渲染问题,Backend为Vulkan,引入Nvidia的NVVK来简化各种资源的申请和初始化,输出可视实时渲染结果。目前仅支持硬编码隐式函数的渲染

Dependencies

  • cmake >= 3.15
  • VulkanSDK >= 1.3
  • Nvpro_cores

Project

  • implicit_surface_ray_tracing:主项目,输出带GUI的隐式曲面实时渲染程序,支持输出渲染结果为HDR、PNG、BMP格式
  • Sphere_Tracing_CPU_Test:在CPU上对Sphere Tracing的测试和同Adaptive Marching Points的对比(因为调试Compute Shader过于困难)

Build

经测试在Win10 + MSVC下构建顺利,按照Nvpro_cores库的说明应该在Linux下也能正常构建,但没有测试

构建完成后需要install来移动资源,从而实现Spirv格式的Shader Module的加载

Performance

以下测试中步进步数和其余项目是分开测试的,因为测试步进步数需要Atomic Operation,对实时性能影响较大

实际上用glslc对Shader做了控制,只有在Debug构建时才会测试步进步数

1024*1024分辨率、同屏渲染200*200*50个周期的TPMS时:

Adaptive Marching Points Sphere Tracing
frame time (ms) 12+ 0.6 ~ 0.7
fraps per second 80+ around 1400
rendering time per pixel (ns) <= 11.5 around 0.48
ray steps per pixel (approx.) 8 ~ 10 1.5 ~ 2.5
ray steps range (approx.) 10 ~ 400 0 ~ 240

目前来说,即便是使用Sphere Tracing也只能在保持微小结构可辩别的10倍基础分辨率(10240*10240)下达到30fps左右,建议实时渲染时以基础分辨率预览即可,需要输出高分辨率图像时再调高分辨率输出

Screenshot

Known issues

  • 目前Release模式构建出来无法正常渲染,推测是目前暴力将Output image直接Blit到Swapchain Framebuffer上的操作水土不服
  • 现在Adaptive Step Size Relaxation渲染模式还在施工,估计会比Sphere Tracing还要快一些