blender/intern/cycles/cmake
Hans Goudey 048d17e6dd Mesh: Use Embree for triangles BVH tree
This PR begins to replace the use of Blender's "BLI_kdopbvh" BVH tree
for meshes with Embree. Embree is a much newer implementation and and
has much better performance characteristics. In particular, building
the BVH is over 5 times faster. Raycasting against the BVH and closest
point sampling is faster as well.

With the extensive usage of the old BVH API across Blender, it's
unrealistic to do a complete replacement in a single PR. This change
focuses on the triangle surface BVH, in cases where the replacement
is relatively obvious. The idea is that enough uses are covered so
that in most use cases only the Embree BVH will be needed.

Because Embree is an optional dependency, there also needs to be a
fallback to use the old API. If we ever wanted to remove the old BVH
implementation we could discuss making it a mandatory dependency.

Test results are different in a few cases because Embree chooses a
different triangle for the arbitrary choice of closest triangle on
either side of an edge. I also had to increase the threshold for the
hair dynamics test, where small differences in any intermediate values
are chaotically amplified.

Next steps are described in #161529.

This was investigated before in !108148.

Pull Request: https://projects.blender.org/blender/blender/pulls/156408
2026-08-12 17:26:03 +02:00
..
external_libs.cmake Build: Cycles: Migrate Cycles Standalone from SDL2 to SDL3 2026-05-13 14:42:42 +02:00
macros.cmake Mesh: Use Embree for triangles BVH tree 2026-08-12 17:26:03 +02:00
msvc_arch_flags.c
zstd_compress.cpp