From 638b084f824bc345468bc8e02422b5da65a641a7 Mon Sep 17 00:00:00 2001 From: Stuart Broadfoot Date: Mon, 15 Apr 2013 21:38:31 +0000 Subject: Cycles Hair: Strand Minimum Pixel Size Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays. The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling. --- intern/cycles/render/curves.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/render/curves.cpp') diff --git a/intern/cycles/render/curves.cpp b/intern/cycles/render/curves.cpp index 9fa867ae723..3fcd78b0152 100644 --- a/intern/cycles/render/curves.cpp +++ b/intern/cycles/render/curves.cpp @@ -89,6 +89,8 @@ CurveSystemManager::CurveSystemManager() normalmix = 1.0f; encasing_ratio = 1.01f; + minimum_width = 0.0f; + maximum_width = 0.0f; use_curves = true; use_smooth = true; @@ -149,6 +151,8 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen kcurve->normalmix = normalmix; kcurve->encasing_ratio = encasing_ratio; + kcurve->minimum_width = minimum_width; + kcurve->maximum_width = maximum_width; kcurve->subdivisions = subdivisions; } @@ -172,6 +176,8 @@ bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager) use_tangent_normal_correction == CurveSystemManager.use_tangent_normal_correction && use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry && encasing_ratio == CurveSystemManager.encasing_ratio && + minimum_width == CurveSystemManager.minimum_width && + maximum_width == CurveSystemManager.maximum_width && use_backfacing == CurveSystemManager.use_backfacing && normalmix == CurveSystemManager.normalmix && use_smooth == CurveSystemManager.use_smooth && -- cgit v1.2.3