Struct of Arrays Refactor for Mesh Edges #95966
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#95966
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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,
MEdge
stores quite a bit of data:For the reasons described in #95965, this is an inefficient way to organize data.
This task describes how
MEdge
should be changed to only store the two vertex indices.In the end, edges should just store two vertex index integers. Everything else should be optionally stored elsewhere.
Bevel Weight
In the longer term, this should be stored as an optional named generic float attribute (see #89054).
In the shorter term, this can be stored as
CD_BWEIGHT
. This means slightly increased memory usage when this data is used,but it also gives increased precision, and it doesn't have to be allocated when it isn't used.
291c313f80
Flag
In the flag is:
Selection
12becbf0df
It's not clear to me how selection interacts with
mselect
(MSelect
), but perhaps it can be moved there.It can also be moved to a separate boolean custom data layer with a name that keeps it from being displayed in the UI.
ME_SEAM
cccf91ff83
Ideally this would move to a completely generic boolean attribute, since only having one seam layer is limiting.
ME_HIDE
2480b55f21
This can be moved to a separate boolean custom data layer, likely with a reserved name.
ME_EDGEDRAW
7ca651d182
ME_EDGERENDER
10131a6f62
As far as I can tell, these are always used together, like
ME_EDGEDRAW | ME_EDGERENDER
. It looks like they are only runtime data.They should be stored in
Mesh_Runtime
as a bitmask or an array of booleans. This way they can only be allocated when they are actually needed,like drawing a mesh after a subdivision surface modifier.
ME_LOOSEEDGE
1ea169d90e
This is also runtime data, so it should be stored in
Mesh_Runtime
, with some special API like mesh normals have now.ME_EDGE_TMP_TAG
17567c235a
Can be easily removed, it's only used in one place.
ME_SHARP
dd9e1eded0
Should be moved to a separate boolean layer and exposed as a builtin attribute.
Added subscriber: @HooglyBoogly
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @ideasman42
edit replied to #95965.
This issue was referenced by
17567c235a
This issue was referenced by
2480b55f21
This issue was referenced by
291c313f80
This issue was referenced by
a8a454287a
This issue was referenced by
12becbf0df
ME_EDGEDRAW Flag
Currently the
ME_EDGEDRAW
flag is only ever set to false for the "optimal display" feature of the subdivision surface modifier.When applying the modifier back to the original mesh this is turned off though.
Blender only produces original (in Main) meshes with every
ME_EDGEDRAW
flag set.So, moving forward it makes sense to remove the
BM_ELEM_DRAW
flag from edges completely.If that functionality is needed, disabling drawing of certain edges should be a viewport/overlay feature rather than being stored in the original mesh.
ME_EDGEDRAW
should become runtime data-- a bitmap just likeMeshRuntime::subsurf_face_dot_tags
.This issue was referenced by
1ea169d90e
Added subscriber: @JamellMoore
@HooglyBoogly I' currently working with a patched build where I've exposed CD_BWEIGHT as a built-in named CD_PROP_FLOAT attribute (bevel_weight) as it allows controlling bevels using a bevel modifier. Would you welcome this in the short term?
The bevel node seems to be a community project that may take many releases to complete. This may be useful to other users until the node is complete or/and the bevel modifier allows generic attributes.
That is tempting, personally I don't think it's a great approach though. It's hard to add that sort of temporary feature, because people start to depend on it, and then it becomes somewhat permanent because we try hard to keep backwards compatibility for new releases. I would like to avoid that sort of temporary compromise becoming part of the permanent design.
It's not procedural, but would adding a "Bevel Weight" option to the convert attribute operator be helpful, so at least you could apply the modifier and convert an edge float attribute to bevel weights?
I can't foresee any issues myself with regards to backwards compatibility other than ones you would have to deal with when transitioning to generic attributes, but that's fair enough though. I'm sure I've overseen something and it's better to be safer than cause issues down line.
Adding a "Bevel Weight" option to the Convert Attribute Operator wouldn't help for my use because I'm making procedural assets. It could be useful for other contexts though where the final output is non-procedural.
This issue was referenced by
dd9e1eded0