Add operators to convert generic attributes into task specific data (UVLayers, etc) #91379

Closed
opened 2021-09-13 15:16:20 +02:00 by Simon Thommes · 21 comments
Member

There should be an operator to convert a generic attribute to a task-specific one.

Explanation
With the functionality to manage generic attributes on a geometry there is a need to edit this data manually. This is currently not yet possible and will be a longer standing goal for a while.
Combined with the fact that there are separate namespaces for the different legacy attribute types causing name collisions very easily, there is a need to convert generic attributes into task-specific attributes that Blender understands within their context.

Example
A geonodes modifier is applied on a bush scattering leaves

  • the UVs and vertex colors are now generic attributes and not editable with the respective editors

  • there are name collisions with newly created UV/vertex color layers

There should be an operator to convert a generic attribute to a task-specific one. **Explanation** With the functionality to manage generic attributes on a geometry there is a need to edit this data manually. This is currently not yet possible and will be a longer standing goal for a while. Combined with the fact that there are separate namespaces for the different legacy attribute types causing name collisions very easily, there is a need to convert generic attributes into task-specific attributes that Blender understands within their context. **Example** A geonodes modifier is applied on a bush scattering leaves - > the UVs and vertex colors are now generic attributes and not editable with the respective editors - > there are name collisions with newly created UV/vertex color layers
Author
Member

Added subscriber: @SimonThommes

Added subscriber: @SimonThommes
Hans Goudey changed title from Expose operators to convert generic attributes into task specific data (UVLayers, etc.) to Add operators to convert generic attributes into task specific data (UVLayers, etc) 2021-09-13 21:35:01 +02:00
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I like this idea. It means we can solve the generic attribute problem properly, but there would be a workaround in the meantime.
It would be helpful if this task defined a list of conversions that would be helpful. I'll start out with a guess maybe?

  • 2D Vector -> UV
  • Float -> vertex group

What are the other essential ones?

I like this idea. It means we can solve the generic attribute problem properly, but there would be a workaround in the meantime. It would be helpful if this task defined a list of conversions that would be helpful. I'll start out with a guess maybe? - 2D Vector -> UV - Float -> vertex group What are the other essential ones?
Author
Member

The only other one I'd consider essential would be:

  • Color -> Vertex Color Layer

Then nice to have would be:

  • 3D Vector -> Shapekey

Nice could also be conversion on the edge domain:

  • seam
  • crease
  • bevel weight

Might be personal preference, but I don't consider face maps as important.

But in general I don't think we should necessarily enforce specific data types or domains for the conversions.

The only other one I'd consider essential would be: - Color -> Vertex Color Layer Then nice to have would be: - 3D Vector -> Shapekey Nice could also be conversion on the edge domain: - seam - crease - bevel weight Might be personal preference, but I don't consider face maps as important. But in general I don't think we should necessarily enforce specific data types or domains for the conversions.

Added subscriber: @JanKaderabek

Added subscriber: @JanKaderabek

Added subscriber: @nick-nieuwoudt

Added subscriber: @nick-nieuwoudt

This sounds like a good solution I think It would address a majority of at least the dealbreakers i have been hitting with geo nodes.

This sounds like a good solution I think It would address a majority of at least the dealbreakers i have been hitting with geo nodes.

Added subscriber: @Limarest

Added subscriber: @Limarest

Does this design task also takes into consideration making it possible to output UVs and vertex colors from geo nodes?
For example, when exporting geo nodes meshes?

Does this design task also takes into consideration making it possible to output UVs and vertex colors from geo nodes? For example, when exporting geo nodes meshes?

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

Added subscriber: @Yuro

Added subscriber: @Yuro

Added subscriber: @qbicksan

Added subscriber: @qbicksan

Added subscriber: @davidnr

Added subscriber: @davidnr
Jacques Lucke was assigned by Hans Goudey 2022-01-20 17:54:40 +01:00

Tried building with diff and the conversion doesn't seem to work right now, newly created attribute is pitch black. Also, for some reason attribute disappears when converted to a vertex group, which doesn't happen in other cases
Please check the video:
blender_4Tfsg9lUOL.mp4

The file:
VertexColorTransferTest.blend

Tried building with diff and the conversion doesn't seem to work right now, newly created attribute is pitch black. Also, for some reason attribute disappears when converted to a vertex group, which doesn't happen in other cases Please check the video: [blender_4Tfsg9lUOL.mp4](https://archive.blender.org/developer/F12813597/blender_4Tfsg9lUOL.mp4) The file: [VertexColorTransferTest.blend](https://archive.blender.org/developer/F12813602/VertexColorTransferTest.blend)
Member

You'll probably have to apply the modifier in that case-- writing to a vertex color will still make it into a generic attribute, this patch doesn't change that.

You'll probably have to apply the modifier in that case-- writing to a vertex color will still make it into a generic attribute, this patch doesn't change that.

It's not shown in the video, but I also tried converting to a vertex group and a UV map, which also didn't work. Maybe I am doing something wrong, idk

It's not shown in the video, but I also tried converting to a vertex group and a UV map, which also didn't work. Maybe I am doing something wrong, idk
Member

The operator in the patch only works on "applied geometry". The modifier just overwrites the existing attribute. You can see that by applying the modifier again.

I did find that there are issues when sculpt vertex colors are enabled. That's because of how node_shader_gpu_vertex_color is implemented currently.

The operator in the patch only works on "applied geometry". The modifier just overwrites the existing attribute. You can see that by applying the modifier again. I did find that there are issues when sculpt vertex colors are enabled. That's because of how `node_shader_gpu_vertex_color` is implemented currently.

This issue was referenced by f6888b530a

This issue was referenced by f6888b530ac81abbe61755971449ad6b42b93c82

Added subscriber: @Mallta

Added subscriber: @Mallta
Member

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

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

Added subscriber: @Ezeon

Added subscriber: @Ezeon
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
13 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#91379
No description provided.