Retopology in Blender #95584

Open
opened 2022-02-07 17:43:31 +01:00 by jon denning · 16 comments
Member

This design task is the proposal of implementing settings, operators, and tools that are useful for retopology work.

The biggest driving reason behind this proposal is that retopology work in Blender involves either an ad-hoc set up or add-ons (whether purchased or free). This is due to the very specific nature of retopology work. In particular, retopo work involves the creation of new source geometry (similar to modeling) and pushing around source geometry to straighten edge loops or relax stretched or skewed faces (similar to smooth sculpting brush). However, through all of the manipulating operations, the source geometry needs to remain on the surface of target mesh(es). This means that the tools need to follow up their edit with a snap operation. Due to this closeness, though, the source geometry could be hidden by the target mesh, so care must be taken to ensure the target geometry is appropriately visible over the target(s).

This proposal aims to bring the following ideas into Blender:

  • Edited geometry of retopo mesh will automatically snap or project to the surface of another mesh
  • Retopo tools will aid artist by solving specific problems typical of retopology work (i.e., high-level tools)
  • Source geometry will render over targets (in most cases) without showing through (similar to x-ray or in-front)

The Retopology Mode design document goes into some details about retopology work along with arguments behind some of the design decisions I made.

Work Done


This section describes the work that has been done so far. Some of my work has already been committed, some is still under review, and some of my work has been abandoned for more generalized approaches.

[D14035: Retopology Mode and Overlay ](https://developer.blender.org/D14035)
This patch has been abandoned, as Campbell thought a more general approach would be preferred. Note: left here to show extent of this work.

[D14591: Transform Snap: added nearest face snap mode, added snapping options, lightly refactored snapping code ](https://developer.blender.org/D14591)
This patch allows transformed source geometry to snap to the surface of target meshes, which is critical for retopology work. A few notes:

  • This method is different from the previous Face (now Face Raycast) snapping method, as the previous method snapped to the first visible surface under the mouse (raycast through mouse position from view). The new method allows the vertex to snap to the nearest surface, even if it is not visible.
  • This feature is cherry-picked from D14035.

[D15154: Expose option to support fallback tools keymap in GizmoGroup type ](https://developer.blender.org/D15154)
This patch allows a WorkSpaceTool to use the fallback tools (ex: Select Box) when the mouse is not hovering the active GizmoGroup. With this, a new tool can act similar to the built-in tools like Move.

[D15398: Expose snap options in transform operators ](https://developer.blender.org/D15398)
This patch allows a tool to set specific snapping options without having to alter the global ToolSettings. With this, each tool can use the snapping options that are appropriate for the given tool. For example:

  • A geometry pen tool would operate best when Face Raycast is enabled (with Face Nearest as a fallback), as it operates on only visible parts of the mesh.
  • But a circumference loop tool will likely work on geometry that wraps around a target, so having Face Raycast enabled is not ideal.

[D15406: Add Retopology Mode as Snapping Option ](https://developer.blender.org/D15406)
Retopology work involves the creation of new geometry (similar to modeling) but with snapping enabled by default. However, the potential snapping targets will depend on the snapping method under consideration. Specifically, source geometry should snap to the

  • surface of non-edited target meshes, but not to the surface of the edited source meshes, but it should snap to the
  • vertices of the edited source meshes, but usually not to the vertices of non-edited target meshes (exception might be CAD or certain hard surface retopo work)

Without this patch, there are only two options for achieve similar goals (listed below), but neither are ideal.

  • The user can make the deliberate change between snapping to target or snapping to source. This can be done before starting snapping through Tool Settings, or possibly through a keyboard action (but would require modifying Blender source)
  • Implement specific snapping routines for the tools to use rather than the built-in snapping methods.

Ongoing Work


This section describes the work that is still ongoing. Some of this work is dependent on a few patches still waiting to be committed into Blender.

Tool: GeoPen

I have a working prototype of a geometry pen. This tool is similar to Poly Build, but there are differences. Note: some of the differences are simply limitations in Poly Build and could be fixed.

  • GeoPen works with the current selection, while Poly Build uses nearest geometry.
    ** Nearest geometry is determined in screen space, and unfortunately does not account for occlusion.
  • GeoPen works with any geometry, while Poly Build extends only from boundary edges.
    Poly Build ignores loose edges and internal edges (edges between two faces). Poly Build cannot create new disconnected patch of geometry.
  • GeoPen allows for repositioning of more geometry than a single vertex.
    ** Nearest always has a result, so cannot use fallback Box Select with LeftMouse drag. Can use B+LeftMouse or switch tools...
  • GeoPen passes snapping options as arguments, where Poly Build requires user to set and enable manually (optionally use Ctrl while transforming).
  • GeoPen is written in Python as a proof of concept, where Poly Build is built into Blender.
    ** GeoPen does work around some limitations in bpy (see [Experiments: Retopo Translate ]] and [ https:*wiki.blender.org/wiki/User:Jon_Denning/Reports/2022/Experiments#geopen_hiccups | Experiments: geopen hiccups for more details), but this type of tool should be able to be implemented on either side of the API.

Out of all the differences, the first two are key differences in operating paradigm... how the tools operates. While a few of Blender's tools operate in a modal mode (e.g., Knife, Make Line), most of Blender's tools allow the user to change selection and operate on that selection via a Gizmo (e.g., Extrude Region, Inset Faces, Bevel, Smooth, Edge Slide, etc.). Valid arguments can be made for either approach.

The main argument behind using selection rather than nearest is: the tool does not make decisions on the behalf of the user. In other words, it is always clear what GeoPen will do next as the context is clear, while Poly Build depends on where the mouse is relative to the projected geometry (which comes with its own set of known quirks like rounding errors).

Blender Manual

I have started updating the Snapping Options of Blender Manual to reflect the work listed above.

A possible option is to add a subsection that discusses retopology-specific work, but this would better fit under a Retopology section, especially when more tools are ready.

Render

As the retopology mode patch was abandoned, this area of retopology might not get touched.

Although, I do have some ideas on a button / add-on that can adjust settings to be more ideal for retopo work.

This design task is the proposal of implementing settings, operators, and tools that are useful for retopology work. The biggest driving reason behind this proposal is that retopology work in Blender involves either an ad-hoc set up or add-ons (whether purchased or free). This is due to the very specific nature of retopology work. In particular, retopo work involves the creation of new source geometry (similar to modeling) and pushing around source geometry to straighten edge loops or relax stretched or skewed faces (similar to smooth sculpting brush). However, through all of the manipulating operations, the source geometry needs to remain on the surface of target mesh(es). This means that the tools need to follow up their edit with a snap operation. Due to this closeness, though, the source geometry could be hidden by the target mesh, so care must be taken to ensure the target geometry is appropriately visible over the target(s). This proposal aims to bring the following ideas into Blender: * Edited geometry of retopo mesh will automatically snap or project to the surface of another mesh * Retopo tools will aid artist by solving specific problems typical of retopology work (i.e., high-level tools) * Source geometry will render over targets (in most cases) without showing through (similar to x-ray or in-front) The [Retopology Mode ](https://wiki.blender.org/wiki/User:Jon_Denning/Projects/Retopology_Mode) design document goes into some details about retopology work along with arguments behind some of the design decisions I made. Work Done **** This section describes the work that has been done so far. Some of my work has already been committed, some is still under review, and some of my work has been abandoned for more generalized approaches. [[D14035](https://archive.blender.org/developer/D14035): Retopology Mode and Overlay ](https://developer.blender.org/D14035) This patch has been abandoned, as Campbell thought a more general approach would be preferred. Note: left here to show extent of this work. [[D14591](https://archive.blender.org/developer/D14591): Transform Snap: added nearest face snap mode, added snapping options, lightly refactored snapping code ](https://developer.blender.org/D14591) This patch allows transformed source geometry to snap to the surface of target meshes, which is critical for retopology work. A few notes: * This method is different from the previous `Face` (now `Face Raycast`) snapping method, as the previous method snapped to the first visible surface under the mouse (raycast through mouse position from view). The new method allows the vertex to snap to the nearest surface, even if it is not visible. * This feature is cherry-picked from [D14035](https://archive.blender.org/developer/D14035). [[D15154](https://archive.blender.org/developer/D15154): Expose option to support fallback tools keymap in GizmoGroup type ](https://developer.blender.org/D15154) This patch allows a `WorkSpaceTool` to use the fallback tools (ex: Select Box) when the mouse is not hovering the active `GizmoGroup`. With this, a new tool can act similar to the built-in tools like Move. [[D15398](https://archive.blender.org/developer/D15398): Expose snap options in transform operators ](https://developer.blender.org/D15398) This patch allows a tool to set specific snapping options without having to alter the global ToolSettings. With this, each tool can use the snapping options that are appropriate for the given tool. For example: * A geometry pen tool would operate best when Face Raycast is enabled (with Face Nearest as a fallback), as it operates on only visible parts of the mesh. * But a circumference loop tool will likely work on geometry that wraps around a target, so having Face Raycast enabled is not ideal. [[D15406](https://archive.blender.org/developer/D15406): Add Retopology Mode as Snapping Option ](https://developer.blender.org/D15406) Retopology work involves the creation of new geometry (similar to modeling) but with snapping enabled by default. However, the potential snapping targets will depend on the snapping method under consideration. Specifically, source geometry should snap to the * surface of non-edited target meshes, but not to the surface of the edited source meshes, but it should snap to the * vertices of the edited source meshes, but usually not to the vertices of non-edited target meshes (exception might be CAD or certain hard surface retopo work) Without this patch, there are only two options for achieve similar goals (listed below), but neither are ideal. * The user can make the deliberate change between snapping to target or snapping to source. This can be done before starting snapping through Tool Settings, or possibly through a keyboard action (but would require modifying Blender source) * Implement specific snapping routines for the tools to use rather than the built-in snapping methods. Ongoing Work **** This section describes the work that is still ongoing. Some of this work is dependent on a few patches still waiting to be committed into Blender. Tool: GeoPen ----------------- I have a working prototype of a geometry pen. This tool is similar to Poly Build, but there are differences. Note: some of the differences are simply limitations in Poly Build and could be fixed. * GeoPen works with the current selection, while Poly Build uses nearest geometry. ** Nearest geometry is determined in screen space, and *unfortunately* does not account for occlusion. * GeoPen works with any geometry, while Poly Build extends only from boundary edges. **Poly Build ignores loose edges and internal edges (edges between two faces).** Poly Build cannot create new disconnected patch of geometry. * GeoPen allows for repositioning of more geometry than a single vertex. ** Nearest always has a result, so cannot use fallback Box Select with `LeftMouse` drag. Can use `B`+`LeftMouse` or switch tools... * GeoPen passes snapping options as arguments, where Poly Build requires user to set and enable manually (optionally use `Ctrl` while transforming). * GeoPen is written in Python as a proof of concept, where Poly Build is built into Blender. ** GeoPen does work around some limitations in bpy (see [Experiments: Retopo Translate ]] and [[ https:*wiki.blender.org/wiki/User:Jon_Denning/Reports/2022/Experiments#geopen_hiccups | Experiments: geopen hiccups ](https:*wiki.blender.org/wiki/User:Jon_Denning/Reports/2022/Experiments#Retopo_Translate) for more details), but this type of tool should be able to be implemented on either side of the API. Out of all the differences, the first two are key differences in operating paradigm... how the tools operates. While a few of Blender's tools operate in a modal mode (e.g., Knife, Make Line), most of Blender's tools allow the user to change selection and operate on that selection via a Gizmo (e.g., Extrude Region, Inset Faces, Bevel, Smooth, Edge Slide, etc.). Valid arguments can be made for either approach. The main argument behind using selection rather than nearest is: the tool does not make decisions on the behalf of the user. In other words, it is always clear what GeoPen will do next as the context is clear, while Poly Build depends on where the mouse is relative to the projected geometry (which comes with its own set of known quirks like rounding errors). Blender Manual ------------------- I have started updating the [Snapping Options ](https://docs.blender.org/manual/en/latest/editors/3dview/controls/snapping.html) of Blender Manual to reflect the work listed above. A possible option is to add a subsection that discusses retopology-specific work, but this would better fit under a Retopology section, especially when more tools are ready. Render --------- As the retopology mode patch was abandoned, this area of retopology might not get touched. Although, I do have some ideas on a button / add-on that can adjust settings to be more ideal for retopo work.
jon denning self-assigned this 2022-02-07 17:43:31 +01:00
Author
Member

Added subscriber: @gfxcoder

Added subscriber: @gfxcoder

Added subscriber: @Dangry

Added subscriber: @Dangry

Added subscriber: @ErickNyanduKabongo

Added subscriber: @ErickNyanduKabongo

Added subscriber: @Andruxa696

Added subscriber: @Andruxa696
Member

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

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

Added subscriber: @Yuro

Added subscriber: @Yuro

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice

Added subscriber: @AlexeyAdamitsky

Added subscriber: @AlexeyAdamitsky

Added subscriber: @Aleks41-3

Added subscriber: @Aleks41-3

Added subscriber: @DARRINALDER

Added subscriber: @DARRINALDER

Added subscriber: @VupliDerts-2

Added subscriber: @VupliDerts-2

Added subscriber: @Emi_Martinez

Added subscriber: @Emi_Martinez

Added subscriber: @Doowah

Added subscriber: @Doowah

Added subscriber: @zNight

Added subscriber: @zNight

Added subscriber: @JonathanLampel-4

Added subscriber: @JonathanLampel-4
jon denning changed title from Retopology Mode in Blender to Retopology in Blender 2022-07-15 17:40:34 +02:00

Added subscriber: @VDC

Added subscriber: @VDC
Philipp Oeser removed the
Interest
EEVEE & Viewport
label 2023-02-09 15:12:53 +01: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
16 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#95584
No description provided.