Page MenuHome

Geometry Component: add access to vertex creases
AbandonedPublic

Authored by Kévin Dietrich (kevindietrich) on Feb 8 2022, 2:02 AM.

Details

Summary

Vertex creases are stored as a CD_CREASE layer and as such require special
handling for accessing the attribute via the AttributeProvider. This adds
a builtin attribute accessor for it, and renames (in the code) the current
crease attribute to "edge_crease".

The name for both edge and vertex creases is simply "crease" as specifying
the domain in the name would be redundant.

Diff Detail

Repository
rB Blender
Branch
vertex_crease_attribute_access (branched from master)
Build Status
Buildable 20641
Build 20641: arc lint + arc unit

Event Timeline

Kévin Dietrich (kevindietrich) requested review of this revision.Feb 8 2022, 2:02 AM
Kévin Dietrich (kevindietrich) created this revision.

The name for both edge and vertex creases is simply "crease" as specifying
the domain in the name would be redundant.

This is problematic actually, since a geometry component is in an invalid state if the same name is used on two domains.

I'm also not sure about whether this should be added as a builtin attribute. Lately we were discussing whether crease should actually be a builtin attribute.
We thought it might make more sense as a "reserved name" attribute, meaning operators would expect to use a point domain float attribute with a specific name, but it wouldn't be otherwise guaranteed.
The general idea is limiting the number of built-in attributes, making the workflow more generic. Regrettably, the main reason we added crease as a builtin attribute is because "the spreadsheet looks too empty on the edge domain".

Somewhat related, the subdivision surface node should probably get a "Vertex Crease" input.

I tend to agree with Hans here. Although I wouldn't call it "reserved name" (which usually implies that the name can't be used for something else) but "naming convention".

Regrettably, the main reason we added crease as a builtin attribute is because "the spreadsheet looks too empty on the edge domain".

I don't remember that to be the reason tbh. We just wanted to be able to access that information with geometry nodes.

Name the vertex crease attribute "vertex_crease". Edge crease
remains "crease" as to not break existing files, although it
would make sense to rename it as well. Let me know what you
think.

Closing this as it was decided that this should rely on improvements to generic attribute editing.