Daqi's Blog


A CS geek, a travel enthusiast, a music arranger
News: I've uploaded the demo for my GPU Path Tracer to YouTube. Check it out! I've also uploaded the slides and the paper of the project to my website. Enjoy!
[slides] [paper]
News: I've put my series on Real-time GPU Path Tracing (the continuation of GPU accelerated Path Tracing) online! Try this demo out!
Real-time Path Tracing on GPU [demo (requires Nvidia graphics cards)]
News: I have put my two original technical series online, click to check out what I was/am researching on:
Physically-based Rendering Project [demo]
GPU Accelerated Path Tracing Project [demo (requires Nvidia graphics cards)]

[GAPT Series - 8] Spatial Acceleration Structure (Cont.)


[GAPT Series - 7] Overview of Software Workflow


[GAPT Series - 6] Real-time Path Tracing on GPU - Introduction


[GAPT Series - 5] Current Progress & Research Plan


[GAPT Series - 4] SIMD Optimization


[GAPT Series - 13] Final Remarks

...


[GAPT Series - 12] Benchmarking

...


[GAPT Series - 11] SIMD Optimization (cont.)

As mentioned half a year ago, apart from data structure rearrangement, thread divergence reduction, we can also optimize the SIMD performance by doing thread compaction. The first section below will introduce how I figure it out using the CUDA Thrust API, followed by a proposition of a new method for parallel construction of kd-tree on GPU.

...


[GAPT Series - 10] Rendering Effects

Before going to the discussion of SIMD optimization, we present this chapter to briefly introduce the rendering effects supported by the path tracer, the importance of which comes from the fact that it is the direct application of the sampling methods discussed before.

...


[GAPT Series - 9] Sampling Algorithms (Cont.)

This post corrects some misconception in the former section [GAPT Series - 3] Path Tracing Algorithm as well as introduces some new rendering methods.

...


[GAPT Series - 8] Spatial Acceleration Structure (Cont.)

Now we’ve added BVH as an alternative choice of SAS! It is necessary for real-time ray tracing against dynamic scene geometry with complex moving meshes as it maintains the interior hierarchy of the mesh and only updates exterior hierarchy which is usually much simpler to do.

...


[GAPT Series - 7] Overview of Software Workflow

...


[GAPT Series - 6] Real-time Path Tracing on GPU - Introduction

Hello, it’s been half a year since last update and now I’m back! I’ve finally finished the project and renamed it to Real-time Path Tracing on GPU. As I told you before, the second part will try to push the boundary of GPU accelerated path tracing to approach real-time performance. I want to clarify here that by “real-time” I don’t mean that you can get same image quality of mainstream game graphics with a speed comparative with rasterized graphics using a ray-tracing technique. However, with proper constraints (limitation of BRDF types, resolution and model complexity) you can actually get a pretty close real-time performance which must be implemented with tons of texture tricks in a rasterization setting (e.g. the 512x512 Cornell box, as I will show below). Besides introducing optimizations I’ve used for such a great leap in speed, I will analyze the gap between current performance and the ideal performance we want to have in future and try provide some suggestions what we can do for the improvement of this technique.

...


[GAPT Series - 5] Current Progress & Research Plan

Currently, I have implemented a Monte Carlo path tracer (demo) with full range of surface-to-surface lighting effects including specular reflection on anisotropic material simulated by GGX-based Ward model. A scene definition text file is read from the user, whose format is modified from the popular Wavefront OBJ format by adding material description and camera parameters. I use triangle as the only primitive due to simplicity and generality. Integrated with OpenGL and using a successive refinement method, the path tracer can display the rendering result in real time. Optimization methods include algorithm-based methods: SAH based kd-tree, short stack kd-tree traversal, ray-triangle intersection in “unit triangle space”, next event estimation (explicit light sampling); and hardware-based methods: adoption of GPU-friendly data structure which has a more coalesced memory access and better cache use, reduction of thread divergence which boosts warp efficiency, etc.

...


[GAPT Series - 4] SIMD Optimization

With each thread rendering a screen pixel, the problem of path tracing can be solved in an embarrassingly parallel way, without the need of inter-thread communication. However, it is hard to exploit the full capability of single-instruction-multiple-data (SIMD). There is very little locality in the memory access pattern due to generally inconsistent scene geometry, which means almost all scene data needs to be stored in global memory or texture memory. Even when the first ray hit has congruent pattern, the consequent bounces can be as divergent as possible. Moreover, sampling by Russian roulette method cannot avoid branching, which implies thread divergence. However, two types of optimization based on CUDA architecture – data structure rearrangement and thread divergence reduction can be achieved to reduce the overall rendering time.

...


[GAPT Series - 3] Path Tracing Algorithm

...


[GAPT Series - 2] Spatial Acceleration Structure

...


[GAPT Series - 1] Introduction to GPU Accelerated Path Tracing

This series records the progress of my final year paper - GPU Accelerated Path Tracing. It will be divided into 6 chapters.

  • 1 Introduction
  • 2 Spatial Acceleration Structure
  • 3 Path Tracing Algorithm
  • 4 SIMD Optimization
  • 5 Current Progress & Research Plan
...


[PBR Series - 6] Improvement of PBR

...


[PBR Series - 5] Real-time Skin Translucency

...


[PBR Series - 4] High Dynamic Range Imaging and PBR

...


[PBR Series - 3] Subsurface Scattering – Human Skin as Example

...


[PBR Series - 2] Image Based Lighting

...


[PBR Series - 1] Introduction to PBR

This series introduces you to the implementation of physically based rendering in light-weight game engines by GLSL shaders and precomputed textures. With our techniques, most phsically based surface-to-surface reflection can be simulated across a variety of material ranging from metals to dielectrics in HDR lighting and subsurface scattering can be simulated as well with human skin as an example, so that you can achieve high fidelity of game objects with fewest resources. Most of the contents are collected from my project report as an intern R&D engineer in a game company from May to Nov 2015. I want to share what I learned of, what I thought about and what I have done in this topic so that it makes easier for more people trying to dig into this topic. There are 6 episodes.

...


山西游记之一 (A Travel in Shanxi: Part 1)