Mesh: Move face shade smooth flag to a generic attribute #104422
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104422
Loading…
Reference in New Issue
No description provided.
Delete Branch "refactor-mesh-sharp-face-generic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the shade smooth status for mesh faces is stored as part of
MPoly::flag
. As described in #95967, this moves that informationto a separate boolean attribute. It also flips its status, so the
attribute is now called
sharp_face
, which mirrors the existingsharp_edge
attribute. The attribute doesn't need to be allocatedwhen all faces are smooth.Forward compatibility will be kept until 4.0
like the other mesh refactors.
This will reduce memory bandwidth requirements for some operations,
since the array of booleans uses 12 times less memory than
MPoly
.It also allows faces to be stored with less memory, since the flag
is now unused. It's also possible to use generic functions to process
the values. For example, finding whether there is a sharp faces is just
sharp_faces.contains(true)
.The
shade_smooth
attribute is no longer accessible with geometry nodes.Since there were dedicated accessor nodes for that data, that shouldn't
be a problem. That's difficult to version automatically since the named
attribute nodes could be used in arbitrary combinations.
Implementation notes:
sharp_faces
term, to be consistent with the user-facing "sharp faces" wording,
and to avoid requiring many renames when #101689 is implemented.
to avoid overhead.
make sure defaults are the same.
New nodes are added by versioning to propagate the attribute in its
old inverted state.
CustomData
API ratherthan the attribute API because of a few functions. That can be
cleaned up easily in the future.
single value for when all faces are sharp.
@blender-bot build
Please double check why one of the tests is failing.
@ -939,6 +940,134 @@ static void version_geometry_nodes_primitive_uv_maps(bNodeTree &ntree)
}
}
static void version_geometry_nodes_extrude_smooth_propagation(bNodeTree &ntree)
This could use a comment about what it is doing at a high level.
Do we have a regression test for this case to see if this code actually helps?
Yes, two or three of the extrude node tests require this. I added a comment.
The PLY tests were randomly failing in
main
for a while, which was fixed recently. But I found that the default sharp face value should probably be different too.@blender-bot build