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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user