Attribute Edit Mode #97168

Open
opened 2022-04-08 15:18:27 +02:00 by Julien Kaspar · 4 comments
Member

This is an extract from the now archived Vertex Color/Attribute Edit Design (#71947).
The design needs further investigation an discussion with the #geometry_nodes module.

Attribute Edit Mode

Attribute edit.png

Attribute Edit is intended to be a mode to modify and visualize any kind of data stored in mesh elements. Some use cases for it could be:

  • Editing IDs on face corners to modulate materials in a shader
  • Painting velocity vectors on vertices to guide a particle system
  • Editing the weights of a rig
  • Editing per face colors for low poly models without using textures
  • Setting custom values on edges for a motion graphics animation
  • Modifying mesh values for procedural modeling

Some of these task could use a brush, but they don’t need a brush with artistic painting functionality. It does not make sense to edit the weights of a rig with a brush with wet paint and density noise.

Furthermore, these task could take advantage of a mode with more control and precision tools than an artistic painting mode, like precise elements selection and data editing, controlled value interpolation…

The plan is to use the current Vertex Paint mode as a base implementation for this mode and start adding all necessary features during multiple releases. It already has quite some work done because most users were using it with these use cases in mind.

This task is not as detailed as the Sculpt/Paint mode, but it should be enough to have an idea of its purpose, use cases and design goal.

Tools

Simple brush tools

The current Blender brush functionality is enough to support this kind of painting, if we consider painting changing the values of elements that are inside the cursor radius. We can reuse the current brush code for that.

Value interpolation tool

This tool could produce controllable interpolations of an attribute between two mesh elements following the mesh topology. For example:

  • Select the base of a cone and assign the value of one
  • Select the top vertex of the cone and assign 0
  • Let the tool generate the rest of the values across the cone surface

Mesh elements selection

Attribute paint should provide tools for selecting mesh elements and assign values directly to them. This provides much more control than a brush. This could be useful when working with low poly models, where you want to assign values like armature weights in a precise way.

Mesh element masking

We can support a basic masking functionality for the brush that supports all mesh elements (not only vertices like the Sculpt/Paint mask). This can make easier some painting task.

Features

Data conversion operators

Attribute edit mode should provide a set of conversion tools to convert data between elements and other Blender data layers when possible. For example:

  • Convert a per vertex attribute to a per face corner attribute
  • Convert a per edge attribute to a vertex attribute averaging the
  values
  • Generate material slots from an ID attribute stored on faces
  • Generate an editable 2D vector attribute from an UV layer

Per face corner color data to sculpt/vertex color data

This is a specific case of a conversion operator. Other conversion operators can be added in the future as we support more attribute types.

Internal attribute conversion

We need to identify what element/attribute type conversion combinations are more frequent and design how they can work (usually averaging the values). For example

  • Converting an attribute from face corners to faces by averaging the
  values of all the face corners in the face
  • Converting from vertex to edges by averaging the value of the two
  vertices of the edge
  • Converting from vertex to face corners assigning the same vale of
  the vertex to all the face corners that use that vertex

Topology symmetry

We could support editing operations with symmetry based on the mesh topology instead of mirroring the XYZ axis.

Attribute data type selection

The use should be able to choose what kind of data he/she wants to edit and in which mesh element that data should be stored. For example

  • A float factor stored on faces
  • A vector stored on vertices
  • A color stored on face corners (Current supported MLoopCol)

All tools should be aware of the data type of the layer and behave accordingly.

Import/Export

It should be possible to import and export meshes with different attributes in mesh elements. We need to check format compatibility.

Rendering

Attribute edit overlay

As we can make assumptions that the attributes are colors, we need to render a configurable overlay to display the data in an appropriate way.

Attribute rendering mode selector

The attribute rendering overlay should provide and UI to choose which rendering mode the user wants to render the data. This should include tools like a gradient editor, rendering two attributes at the same time, render vectors and randomly generated ID maps.

EEVEE/Cycles attribute node

The current attribute nodes exposes MLoopCol and UVs to the render, which are both loop attributes. We need to investigate how to expose face, vertex and edge values.

This is an extract from the now archived Vertex Color/Attribute Edit Design (#71947). The design needs further investigation an discussion with the #geometry_nodes module. ## Attribute Edit Mode ![Attribute edit.png](https://archive.blender.org/developer/F8265012/Attribute_edit.png) Attribute Edit is intended to be a mode to modify and visualize any kind of data stored in mesh elements. Some use cases for it could be: - Editing IDs on face corners to modulate materials in a shader - Painting velocity vectors on vertices to guide a particle system - Editing the weights of a rig - Editing per face colors for low poly models without using textures - Setting custom values on edges for a motion graphics animation - Modifying mesh values for procedural modeling Some of these task could use a brush, but they don’t need a brush with artistic painting functionality. It does not make sense to edit the weights of a rig with a brush with wet paint and density noise. Furthermore, these task could take advantage of a mode with more control and precision tools than an artistic painting mode, like precise elements selection and data editing, controlled value interpolation… The plan is to use the current Vertex Paint mode as a base implementation for this mode and start adding all necessary features during multiple releases. It already has quite some work done because most users were using it with these use cases in mind. This task is not as detailed as the Sculpt/Paint mode, but it should be enough to have an idea of its purpose, use cases and design goal. ### Tools **Simple brush tools** The current Blender brush functionality is enough to support this kind of painting, if we consider painting changing the values of elements that are inside the cursor radius. We can reuse the current brush code for that. **Value interpolation tool** This tool could produce controllable interpolations of an attribute between two mesh elements following the mesh topology. For example: - Select the base of a cone and assign the value of one - Select the top vertex of the cone and assign 0 - Let the tool generate the rest of the values across the cone surface **Mesh elements selection** Attribute paint should provide tools for selecting mesh elements and assign values directly to them. This provides much more control than a brush. This could be useful when working with low poly models, where you want to assign values like armature weights in a precise way. **Mesh element masking** We can support a basic masking functionality for the brush that supports all mesh elements (not only vertices like the Sculpt/Paint mask). This can make easier some painting task. ### Features **Data conversion operators** Attribute edit mode should provide a set of conversion tools to convert data between elements and other Blender data layers when possible. For example: - Convert a per vertex attribute to a per face corner attribute - Convert a per edge attribute to a vertex attribute averaging the ``` values ``` - Generate material slots from an ID attribute stored on faces - Generate an editable 2D vector attribute from an UV layer **Per face corner color data to sculpt/vertex color data** This is a specific case of a conversion operator. Other conversion operators can be added in the future as we support more attribute types. **Internal attribute conversion** We need to identify what element/attribute type conversion combinations are more frequent and design how they can work (usually averaging the values). For example - Converting an attribute from face corners to faces by averaging the ``` values of all the face corners in the face ``` - Converting from vertex to edges by averaging the value of the two ``` vertices of the edge ``` - Converting from vertex to face corners assigning the same vale of ``` the vertex to all the face corners that use that vertex ``` **Topology symmetry** We could support editing operations with symmetry based on the mesh topology instead of mirroring the XYZ axis. **Attribute data type selection** The use should be able to choose what kind of data he/she wants to edit and in which mesh element that data should be stored. For example - A float factor stored on faces - A vector stored on vertices - A color stored on face corners (Current supported MLoopCol) All tools should be aware of the data type of the layer and behave accordingly. **Import/Export** It should be possible to import and export meshes with different attributes in mesh elements. We need to check format compatibility. ### Rendering **Attribute edit overlay** As we can make assumptions that the attributes are colors, we need to render a configurable overlay to display the data in an appropriate way. **Attribute rendering mode selector** The attribute rendering overlay should provide and UI to choose which rendering mode the user wants to render the data. This should include tools like a gradient editor, rendering two attributes at the same time, render vectors and randomly generated ID maps. **EEVEE/Cycles attribute node** The current attribute nodes exposes MLoopCol and UVs to the render, which are both loop attributes. We need to investigate how to expose face, vertex and edge values.
Author
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar

Added subscriber: @JanKaderabek

Added subscriber: @JanKaderabek
Contributor

Added subscriber: @scurest

Added subscriber: @scurest

Added subscriber: @AgentA1cr

Added subscriber: @AgentA1cr
Julien Kaspar added this to the Sculpt, Paint & Texture project 2023-02-08 10:20:48 +01:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:11:31 +01:00
Iliya Katushenock removed the
Status
Needs Triage
label 2023-08-24 17:39:09 +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 Assignees
4 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#97168
No description provided.