diff options
author | Stuart Broadfoot <gbroadfoot@hotmail.com> | 2013-04-16 01:38:31 +0400 |
---|---|---|
committer | Stuart Broadfoot <gbroadfoot@hotmail.com> | 2013-04-16 01:38:31 +0400 |
commit | 638b084f824bc345468bc8e02422b5da65a641a7 (patch) | |
tree | 0e5e9cd1bcdc09492ac6c5966dcc2b7c28b5f96b /intern/cycles/kernel/svm | |
parent | ceb61eb14d86132522e38c238bf249dbeb84b237 (diff) |
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.
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r-- | intern/cycles/kernel/svm/svm_geometry.h | 5 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_types.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_geometry.h b/intern/cycles/kernel/svm/svm_geometry.h index a04f4ea0fa7..a9e69c8e405 100644 --- a/intern/cycles/kernel/svm/svm_geometry.h +++ b/intern/cycles/kernel/svm/svm_geometry.h @@ -166,6 +166,11 @@ __device void svm_node_hair_info(KernelGlobals *kg, ShaderData *sd, float *stack stack_store_float(stack, out_offset, data); break; } + /*case NODE_INFO_CURVE_FADE: { + data = sd->curve_transparency; + stack_store_float(stack, out_offset, data); + break; + }*/ case NODE_INFO_CURVE_TANGENT_NORMAL: { data3 = curve_tangent_normal(kg, sd); stack_store_float3(stack, out_offset, data3); diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h index 70d73f98498..d89fde898dc 100644 --- a/intern/cycles/kernel/svm/svm_types.h +++ b/intern/cycles/kernel/svm/svm_types.h @@ -137,6 +137,8 @@ typedef enum NodeHairInfo { NODE_INFO_CURVE_IS_STRAND, NODE_INFO_CURVE_INTERCEPT, NODE_INFO_CURVE_THICKNESS, + /*fade for minimum hair width transpency*/ + /*NODE_INFO_CURVE_FADE,*/ NODE_INFO_CURVE_TANGENT_NORMAL } NodeHairInfo; |