Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-02-06 10:35:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-02-10 18:33:41 +0300
commit227a94077f508a47fe7595b9091ab86aecde4ad5 (patch)
tree6101fc2c6d11f2e732f866b515782df1f8da4e92 /intern/cycles/render/attribute.cpp
parent1ebf95bfd7502c27f33a9325f88118bde4239607 (diff)
Cycles: implement pointiness geometry attribute
This attribute means how "pointy" the geometry surface is, which allows to do effects like dirt maps and wear-off effects on render geometry. This means the attribute is calculated for the final mesh which means no baking (which implies UV unwrap) is needed. Apart from this the behavior is quite close to how vertex dirty colors works. The new attribute is available as an output socket of Geometry node. There's no penalty for the render time, only some delay on scene preparation (the delay is linear of the mesh complexity). Reviewers: brecht, juicyfruit Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D1086
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r--intern/cycles/render/attribute.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index bf83c970bf8..656420f5dbc 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -230,6 +230,8 @@ const char *Attribute::standard_name(AttributeStandard std)
return "heat";
case ATTR_STD_VOLUME_VELOCITY:
return "velocity";
+ case ATTR_STD_POINTINESS:
+ return "pointiness";
case ATTR_STD_NOT_FOUND:
case ATTR_STD_NONE:
case ATTR_STD_NUM:
@@ -375,6 +377,9 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
case ATTR_STD_VOLUME_VELOCITY:
attr = add(name, TypeDesc::TypeVector, ATTR_ELEMENT_VOXEL);
break;
+ case ATTR_STD_POINTINESS:
+ attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_VERTEX);
+ break;
default:
assert(0);
break;
@@ -395,6 +400,9 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
case ATTR_STD_GENERATED_TRANSFORM:
attr = add(name, TypeDesc::TypeMatrix, ATTR_ELEMENT_MESH);
break;
+ case ATTR_STD_POINTINESS:
+ attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_VERTEX);
+ break;
default:
assert(0);
break;