Maniphest T97168

Attribute Edit Mode
Needs Triage, NormalDESIGN

Assigned To
None
Authored By
Julien Kaspar (JulienKaspar)
Apr 8 2022, 3:18 PM
Tags
  • Sculpt, Paint & Texture
Subscribers
AgentA1cr
Jan Kadeřábek (jendabek)
Julien Kaspar (JulienKaspar)
Scurest (scurest)

Description

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

Attribute Edit Mode

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.

Event Timeline

Julien Kaspar (JulienKaspar) created this task.Apr 8 2022, 3:18 PM
Julien Kaspar (JulienKaspar) changed the subtype of this task from "Report" to "Design".
Julien Kaspar (JulienKaspar) moved this task from Backlog to Long Term (Implementation) on the Sculpt, Paint & Texture board.
Jan Kadeřábek (jendabek) added a subscriber: Jan Kadeřábek (jendabek).Apr 9 2022, 5:15 PM
Scurest (scurest) added a subscriber: Scurest (scurest).Tue, Jan 10, 8:13 PM
AgentA1cr added a subscriber: AgentA1cr.Wed, Jan 11, 6:22 PM