User:Qmatillat/GSoC2019/FinalReport

GSoC 2019 Embree on GPU


This is the final report for the GSoC 2019 project: Embree on GPU.

All of the code can be found in this branch: soc-2019-embree-gpu, and in this diff. It contain a patch that summarize all the change to Embree. Those change can also be found in this repository : github.com/tinou98/embree.

Work done
The creation of all the BVH structure are extracted from Embree internal structure, and support the existing following traversal features :
 * instanced mesh
 * motion blur
 * curves (without motion blur)

Embree also support these new features that have been added to the traversal code :
 * node that are only valid for a range of time
 * linear interpolation of bounding box at traversal time

Remaining work
Embree has a BVH4 tree, but GPU expect a BVH2 tree, thus the conversion step create two inner node : The computation of the two bounding box for the inner node, can be optimized (especially with unaligned node), see bvh_shrink.
 * Support for motion blur on curves
 * The convert step is currently single threaded, and can benefit from multithreading.
 * Improvement to creation of leaf: Creation of leaf still require some access to blender object data, and thus is slow.
 * The shrink step can be optimized :

Try it yourself

 * Clone blender and checkout the `soc-2019-embree-gpu`.


 * Install dependencies, but force to build embree from source :
 * Install dependencies, but force to build embree from source :
 * Enable Embree converter from lit. 'Render panel' :
 * Then render

Benchmark
The converter shows the best performances on the scenes with a deformation motion blur, but on other scene, it is usually around 10% slower.