diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-18 22:54:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-22 14:28:01 +0300 |
commit | 207338bb58b1a44c531e6d78fad68672c6d3b2e1 (patch) | |
tree | 960d346de6f1e28f6778655a6330ba36404546bb /intern/cycles/render/session.cpp | |
parent | d1ef5146d72d40f97fdcbf28e96da49193c21dea (diff) |
Cycles: port curve-ray intersection from Embree for use in Cycles GPU
This keeps render results compatible for combined CPU + GPU rendering.
Peformance and quality primitives is quite different than before. There
are now two options:
* Rounded Ribbon: render hair as flat ribbon with (fake) rounded normals, for
fast rendering. Hair curves are subdivided with a fixed number of user
specified subdivisions.
This gives relatively good results, especially when used with the Principled
Hair BSDF and hair viewed from a typical distance. There are artifacts when
viewed closed up, though this was also the case with all previous primitives
(but different ones).
* 3D Curve: render hair as 3D curve, for accurate results when viewing hair
close up. This automatically subdivides the curve until it is smooth.
This gives higher quality than any of the previous primitives, but does come
at a performance cost and is somewhat slower than our previous Thick curves.
The main problem here is performance. For CPU and OpenCL rendering performance
seems usually quite close or better for similar quality results.
However for CUDA and Optix, performance of 3D curve intersection is problematic,
with e.g. 1.45x longer render time in Koro (though there is no equivalent quality
and rounded ribbons seem fine for that scene). Any help or ideas to optimize this
are welcome.
Ref T73778
Depends on D8012
Maniphest Tasks: T73778
Differential Revision: https://developer.blender.org/D8013
Diffstat (limited to 'intern/cycles/render/session.cpp')
-rw-r--r-- | intern/cycles/render/session.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index f5bfebbaf78..6caa686847e 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -21,6 +21,7 @@ #include "render/bake.h" #include "render/buffers.h" #include "render/camera.h" +#include "render/curves.h" #include "render/graph.h" #include "render/integrator.h" #include "render/light.h" @@ -773,6 +774,7 @@ DeviceRequestedFeatures Session::get_requested_device_features() */ bool use_motion = scene->need_motion() == Scene::MotionType::MOTION_BLUR; requested_features.use_hair = false; + requested_features.use_hair_thick = (scene->curve_system_manager->curve_shape == CURVE_THICK); requested_features.use_object_motion = false; requested_features.use_camera_motion = use_motion && scene->camera->use_motion(); foreach (Object *object, scene->objects) { |