Domain warping is a technique commonly used in creative coding to distort graphics and add visual interest to a work. The approach has the potential to be used in 3D art as mesh vertices can be efficiently warped using a vertex shader in a WebGL pipeline. However, 3D models packaged for the web typically come with baked-in normal vectors, and these need to be updated when vertex positions change for lighting calculations to work. This is typically done via finite differences, which requires parameter tuning to achieve optimal visual fidelity. We present a method for 3D domain warping that works with automatic differentiation, allowing exact normals to be used without any tuning while still benefiting from hardware acceleration.
翻译:域扭曲是创意编程中常用于图形变形以增强视觉效果的常见技术。该技术可在三维艺术创作中发挥潜力,因为通过WebGL渲染管线的顶点着色器能高效地对网格顶点进行扭曲。然而,为Web打包的三维模型通常包含预烘焙的法线向量,当顶点位置改变时需更新这些法线向量以支持光照计算。传统方法通过有限差分实现此更新,但需调整参数才能获得最佳视觉保真度。本文提出一种基于自动微分技术的三维域扭曲方法,可在无需参数调整的情况下精确计算法线,同时仍能受益于硬件加速。