Delete Geometry node does not preserve Vertex Crease data #100689

Closed
opened 2022-08-29 14:34:33 +02:00 by Rainer Trummer · 12 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: Quadro RTX 4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 513.29

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-08-29 07:47, hash: 613b6ad9e5
Worked: none afaik

Short description of error
When using Vertex Creases, the delete geometry node completely discards that crease data. You can see this in the demo file provided here:
DeleteGeoBug.blend
On one corner I used edge creases to harden the corner, on the other corner I used vertex creases. Edge creases remain intact after delete geometry, vertex creases are lost. The corner underneath should be sharp (and is so if you mute the delete geometry node in the the geometry nodes modifier):
delete_geometry.jpg

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: Quadro RTX 4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 513.29 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-08-29 07:47, hash: `613b6ad9e5` Worked: none afaik **Short description of error** When using Vertex Creases, the `delete geometry` node completely discards that crease data. You can see this in the demo file provided here: [DeleteGeoBug.blend](https://archive.blender.org/developer/F13430350/DeleteGeoBug.blend) On one corner I used edge creases to harden the corner, on the other corner I used vertex creases. Edge creases remain intact after `delete geometry`, vertex creases are lost. The corner underneath should be sharp (and is so if you mute the `delete geometry` node in the the geometry nodes modifier): ![delete_geometry.jpg](https://archive.blender.org/developer/F13430354/delete_geometry.jpg) **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)]
Author

Added subscriber: @RainerTrummer

Added subscriber: @RainerTrummer
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Seems there is a nameclash between two attributes (we a crease attribute on both ATTR_DOMAIN_POINT AND ATTR_DOMAIN_EDGE)

copy_attributes_based_on_map cant handle that (it earlies out when finding the crease attribute on the wrong domain -- even disabling that would then cause the GSpanAttributeWriter to write to the other domain).
Assume AttributeAccessor lookup/ lookup_or_add_for_write_only_span could be tweaked to take domain into account?
Will check...

Seems there is a nameclash between two attributes (we a `crease` attribute on both `ATTR_DOMAIN_POINT` AND `ATTR_DOMAIN_EDGE`) `copy_attributes_based_on_map` cant handle that (it earlies out when finding the `crease` attribute on the wrong domain -- even disabling that would then cause the GSpanAttributeWriter to write to the other domain). Assume `AttributeAccessor` `lookup`/ `lookup_or_add_for_write_only_span` could be tweaked to take domain into account? Will check...
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Didn't look into it in detail, but I think the main issue might be that the attribute system just doesn't know about vertex creases yet. That's mainly because it is not a generic custom data layer type (like CD_PROP_FLOAT), but uses CD_CREASE. For edge creases we already added special handling in create_attribute_providers_for_mesh.

Didn't look into it in detail, but I think the main issue might be that the attribute system just doesn't know about vertex creases yet. That's mainly because it is not a generic custom data layer type (like `CD_PROP_FLOAT`), but uses `CD_CREASE`. For edge creases we already added special handling in `create_attribute_providers_for_mesh`.
Member

In #100689#1410474, @JacquesLucke wrote:
Didn't look into it in detail, but I think the main issue might be that the attribute system just doesn't know about vertex creases yet. That's mainly because it is not a generic custom data layer type (like CD_PROP_FLOAT), but uses CD_CREASE. For edge creases we already added special handling in create_attribute_providers_for_mesh.

Seems the CD_CREASE attribute comes into copy_attributes_based_on_map just fine, so AttributeAccessor seems to handle it already?

> In #100689#1410474, @JacquesLucke wrote: > Didn't look into it in detail, but I think the main issue might be that the attribute system just doesn't know about vertex creases yet. That's mainly because it is not a generic custom data layer type (like `CD_PROP_FLOAT`), but uses `CD_CREASE`. For edge creases we already added special handling in `create_attribute_providers_for_mesh`. Seems the `CD_CREASE` attribute comes into `copy_attributes_based_on_map` just fine, so AttributeAccessor seems to handle it already?
Member

Maybe spoke too soon, seems like skipping copy_attributes_based_on_map alltogether does not really make a difference, so edge creases still survive without that...

Maybe spoke too soon, seems like skipping `copy_attributes_based_on_map` alltogether does not really make a difference, so edge creases still survive without that...
Member

Edge creases seem to survive because it still sits on the MEdge , vertex creases dont sit on the MVert though but in a custom data layer. MEdge & MVert get copied over 1:1 outside attribute handling.

See also

/**

  • Usage of #CD_CREASE depends on where on the Mesh the layer is added:
    • For vertex creasing, this is persistent data across all modes and is stored in the file.
    • For edge creasing, it is runtime data which is only used in edit-mode before being copied
  • to #MEdge when exiting edit-mode.
    */

This is probably no news to any dev involved, so will quit sinking in more time, this is probably handled better by @JacquesLucke

Edge creases seem to survive because it still sits on the `MEdge` , vertex creases dont sit on the `MVert` though but in a custom data layer. `MEdge` & `MVert` get copied over 1:1 outside attribute handling. See also > /** > * Usage of #CD_CREASE depends on where on the Mesh the layer is added: > * - For vertex creasing, this is persistent data across all modes and is stored in the file. > * - For edge creasing, it is runtime data which is only used in edit-mode before being copied > * to #MEdge when exiting edit-mode. > */ This is probably no news to any dev involved, so will quit sinking in more time, this is probably handled better by @JacquesLucke
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

For now I think this is a known issue.
IMO the best solution is to improve generic attribute editing and to make vertex and edge crease into generic attributes.

For now I think this is a known issue. IMO the best solution is to improve generic attribute editing and to make vertex and edge crease into generic attributes.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:43:46 +01:00
Author

As far as I can tell, this issue has been fixed in Blender 4.0 - at least with the version I compiled today, vertex creases are preserved now, and can also be read and stored as named attributes. Guess this can be closed!

As far as I can tell, this issue has been fixed in Blender 4.0 - at least with the version I compiled today, vertex creases are preserved now, and can also be read and stored as named attributes. Guess this can be closed!
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-08-29 10:30:55 +02:00
Sign in to join this conversation.
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
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100689
No description provided.