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/blender | |
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/blender')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 8 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index f0f7d24002f..ceaeda6e798 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -73,8 +73,8 @@ enum_panorama_types = ( ) enum_curve_shape = ( - ('RIBBONS', "Ribbons", "Ignore thickness of each hair"), - ('THICK', "Thick", "Use thickness of hair when rendering"), + ('RIBBONS', "Rounded Ribbons", "Render hair as flat ribbon with rounded normals, for fast rendering"), + ('THICK', "3D Curves", "Render hair as 3D curve, for accurate results when viewing hair close up"), ) enum_tile_order = ( @@ -1223,7 +1223,7 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup): name="Shape", description="Form of hair", items=enum_curve_shape, - default='THICK', + default='RIBBONS', ) use_curves: BoolProperty( name="Use Cycles Hair Rendering", @@ -1234,7 +1234,7 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup): name="Subdivisions", description="Number of subdivisions used in Cardinal curve intersection (power of 2)", min=0, max=24, - default=4, + default=2, ) @classmethod diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 0859a8a82b0..daab26d8ec0 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -407,7 +407,6 @@ class CYCLES_RENDER_PT_hair(CyclesButtonsPanel, Panel): col = layout.column() col.prop(ccscene, "shape", text="Shape") if ccscene.shape == 'RIBBONS': - # TODO: use for embree col.prop(ccscene, "subdivisions", text="Curve subdivisions") |