Page MenuHome

Cycles: default to Embree for CPU ray tracing
Confirmed, NormalPublicTO DO



  • Verify performance and memory usage is close to existing CPU render
  • Disable compact BVH or make option (worse performance, only little memory usage reduction)
  • Fix Warning: pthread_setaffinity_np failed to set affinity to thread -1 printed in console on Linux

Differences in Render Tests

CYCLESTEST_ARGS="--python-expr \"import bpy; bpy.context.scene.cycles.use_bvh_embree = True\"" ctest -R cycles

Event Timeline

Brecht Van Lommel (brecht) changed the subtype of this task from "Report" to "To Do".Fri, Feb 14, 9:10 AM

It seems Embree does not have an equivalent of our Thick Line Segments. In the current patch they are rendered as Flat/Ribbons, which gives entirely different results for e.g. the principled hair BSDF.

We can either add our own line segment primitive, or hope the Embree curve rendering is fast enough and port it to the GPU.

From testing I think all the bad differences are due to the lack of support for thick line segments.

I ran the basic benchmark scenes with Embree, performance is improved in all cases. Mainly the hair is faster. These scenes don't test motion blur, where the biggest speedups will be.

AMD Ryzen 2990WX, Ubuntu Linux


Peak memory is cut in half in the hair scenes (did not investigate why, but not hard to imagine Embree BVH is better at this), and a couple % lower for other scenes. So in terms of performance and memory usage, everything seems to be fine.

Thick line segments could be emulated through spline primitives at the expense of wasted memory.

The main purpose of line segments is to have better performance. I'm not sure how expensive spline primitive intersections is compared to curves?

I'm hoping we can just remove line segments if the curve performance is good enough.