Grease pencil automatic weight is off #104077

Open
opened 2023-01-23 02:51:19 +01:00 by Gaku · 15 comments

Hi
Automatic weights for GP seems off from geometry auto weight. I am assuming this should be same as geo so the drawing I did on surface should move together with geo?

cheers
Gaku

System Information
Windows 10

Blender Version
Blender 3.4

image.png

AUTOweight.blend).

Hi Automatic weights for GP seems off from geometry auto weight. I am assuming this should be same as geo so the drawing I did on surface should move together with geo? cheers Gaku **System Information** Windows 10 **Blender Version** Blender 3.4 ![image.png](https://archive.blender.org/developer/F14185655/image.png) [AUTOweight.blend](https://archive.blender.org/developer/F14185657/AUTOweight.blend)).
Author

Added subscriber: @GAKUTADA

Added subscriber: @GAKUTADA
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Opposed to meshes, the distance plays a bigger role here it seems.
If I move the grease pencil points closer to the armature prior to parenting with automatic weights, it works properly.

Seems strange though, would assume the distances/weights to be approximately the same for greasepencil and meshes.
Will confirm for now

Opposed to meshes, the distance plays a bigger role here it seems. If I move the grease pencil points closer to the armature prior to parenting with automatic weights, it works properly. Seems strange though, would assume the distances/weights to be approximately the same for greasepencil and meshes. Will confirm for now
Member

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'
Member

Added subscriber: @antoniov

Added subscriber: @antoniov
Member

OK, so after a bit of digging, here are more findings:

  • the behavior of generating weights is dependent on a Ratio & Decay
  • when first parenting to the armature with Automatic Weights, these are not really exposed to the user (@antoniov : maybe this should show immediately? otherwise this does not seem very obvious... or at least elaborate on this in the manual )
  • you can however tweak this afterwards:
    • with your file, select the Pencil object
    • enter weightpaint mode
    • Weights > Generate Weights > With Automatic Weights
    • here you can tweak Ratio & Decay
      • increase Ratio a whole bunch (it goes up to 1.0 as soft limit, but you can type in 2.0 manually)

{F14192520 size=full}
This way, you can get better influence on the stroke:
{F14192526 size=full}

So in the (while not obvious for me either), this does not really look like a bug to me.
@GAKUTADA: does this work for you?

OK, so after a bit of digging, here are more findings: - the behavior of generating weights is dependent on a `Ratio` & `Decay` - when first parenting to the armature with Automatic Weights, these are not really exposed to the user (@antoniov : maybe this should show immediately? otherwise this does not seem very obvious... or at least elaborate on this in the [manual ](https://docs.blender.org/manual/en/3.5/grease_pencil/modifiers/deform/armature.html)) - you can however tweak this afterwards: - with your file, select the `Pencil` object - enter weightpaint mode - `Weights` > `Generate Weights` > `With Automatic Weights` - here you can tweak `Ratio` & `Decay` - increase `Ratio` a whole bunch (it goes up to 1.0 as soft limit, but you can type in 2.0 manually) {[F14192520](https://archive.blender.org/developer/F14192520/image.png) size=full} This way, you can get better influence on the stroke: {[F14192526](https://archive.blender.org/developer/F14192526/image.png) size=full} So in the (while not obvious for me either), this does not really look like a bug to me. @GAKUTADA: does this work for you?

@lichtwerk The parent operator is the same for Meshes or Grease Pencil, as you can see in the image below, and this operator never expose the Ratio and Decay.

image.png

Not sure if would be good to expose these values for this operator for any object type.

@lichtwerk The parent operator is the same for Meshes or Grease Pencil, as you can see in the image below, and this operator never expose the `Ratio` and `Decay`. ![image.png](https://archive.blender.org/developer/F14196333/image.png) Not sure if would be good to expose these values for this operator for any object type.
Member

In #104077#1479535, @antoniov wrote:
@lichtwerk The parent operator is the same for Meshes or Grease Pencil, as you can see in the image below, and this operator never expose the Ratio and Decay.
Not sure if would be good to expose these values for this operator for any object type.

I think it would be possible to conditionally use this only for greasepencil (and only show it in that case)

> In #104077#1479535, @antoniov wrote: > @lichtwerk The parent operator is the same for Meshes or Grease Pencil, as you can see in the image below, and this operator never expose the `Ratio` and `Decay`. > Not sure if would be good to expose these values for this operator for any object type. I think it would be possible to conditionally use this only for greasepencil (and only show it in that case)

Sure, we can define a UI callback...let me check.

Sure, we can define a UI callback...let me check.
Antonio Vazquez self-assigned this 2023-01-25 10:54:37 +01:00

@lichtwerk These values are not defined as parameters in OBJECT_OT_parent_set. Looking at the code, it needs to pass the values to different functions that actually are not using it to finally pass to ED_gpencil_add_armature_weights I'm not sure add these parameters is good idea...there are a lot of places that are using ED_object_parent_set that calls gpencil parent weight function.

@lichtwerk These values are not defined as parameters in `OBJECT_OT_parent_set`. Looking at the code, it needs to pass the values to different functions that actually are not using it to finally pass to `ED_gpencil_add_armature_weights` I'm not sure add these parameters is good idea...there are a lot of places that are using `ED_object_parent_set` that calls gpencil parent weight function.
Author

Changing weight tweak ratio helps!
I was expecting this (ratio 2) should be default as it seems same as geo's behavior but really good to know I can fix by this. thanks!

Changing weight tweak ratio helps! I was expecting this (ratio 2) should be default as it seems same as geo's behavior but really good to know I can fix by this. thanks!
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

In #104077#1479571, @antoniov wrote:
I'm not sure add these parameters is good idea...there are a lot of places ...

Understood. To prevent future confusion, maybe this should be mentioned in the to the documentation though?
https://docs.blender.org/manual/en/3.5/animation/armatures/skinning/parenting.html#with-automatic-weights
https://docs.blender.org/manual/en/3.5/grease_pencil/modifiers/deform/armature.html

CC @Blendify

> In #104077#1479571, @antoniov wrote: > I'm not sure add these parameters is good idea...there are a lot of places ... Understood. To prevent future confusion, maybe this should be mentioned in the to the documentation though? https://docs.blender.org/manual/en/3.5/animation/armatures/skinning/parenting.html#with-automatic-weights https://docs.blender.org/manual/en/3.5/grease_pencil/modifiers/deform/armature.html CC @Blendify
Antonio Vazquez removed their assignment 2023-01-27 19:25:59 +01:00
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:05 +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
3 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#104077
No description provided.