Page MenuHome

Weight Paint Overlay
Closed, ResolvedPublicDESIGN

Description

Most of the issues originally described in this task have been resolved!

The only remaining problem is that the Weight Paint object is affected by shading options: lighting, material, textures, etc. It should always act as if the shading mode was set to Flat with a completely white color.
The colors of the weight paint overlay are meant to represent the value of those weights. If those colors are affected by anything else, the original information they were trying to convey is corrupted or lost. See T61486#702654 for illustration.

Hopefully this will be fixed as part of the Attribute Edit project.

Event Timeline

Demeter Dzadik (Mets) changed the subtype of this task from "Report" to "Design".

This is related to Attribute Edit. So will add @Pablo Dobarro (pablodp606) to the discussion. When we have attribute edit overlay this would most likely be solved.

Campbell Barton (campbellbarton) changed the task status from Needs Triage to Confirmed.Feb 12 2020, 8:24 AM

@Pablo Dobarro (pablodp606) Can you comment here on whether these issues really need to wait until Attribute Edit project progresses? To me it feels like that could be years - that's years of 7 extra actions to enter and leave weight paint mode. (On top of the already standard 3-5 actions.) This is a pretty severe regression in usability from 2.7. (And it is only the tip of the iceberg)

Also throwing @Julian Eisel (Severin) in here because he mentioned to me that at one point he fixed the weight paint overlay, and then it got unfixed, or something along those lines? Let's get it un-unfixed! :)

@Demeter Dzadik (Mets) last week I fixed several issues for vertex weight overlay including some issues addressed with this ticket. We should update this design and see what is still needed.

Demeter Dzadik (Mets) added a comment.EditedApr 6 2020, 3:09 PM

@Jeroen Bakker (jbakker) I noticed just yesterday that weights are now displayed nicely while in x-ray and wireframe view!! I was going to ask if that was you, but I guess I got my answer :D Many thanks!

I found somewhat of a corner case where weights are still not visible: When the object's display mode is set to Wire, and the viewport is NOT in X-Ray or Wireframe mode: F8452746

I also ran into some funky artifacts once, and although I was not able to reproduce a second time, I did get it on video: F8452731

Update: I'm no longer getting the above issues! (Hence disabled video embeds to reduce noise)

This was just mentioned in the Animation & Rigging module meeting as well, as a big issue also with newer Blender users.

Would it be possible to just let Weight Paint use the same drawing mode as Texture Paint, so that the weight painting colours are shown correctly?

Jeroen Bakker (jbakker) triaged this task as High priority.Aug 6 2021, 8:11 AM

Increased priority to check on impact next week.

Wont users want to see shading while weight painting in some cases?

Removing shading entirely can make it hard to see the shape of a deformation while painting.

With this patch, a solid-mode mesh has no shading at all.

Reducing opacity seems is also not very useful.

Why not make this an option as it's a significant change, with both behaviors having their uses.

The same option could make sense for texture paint as well.

I added a studio light preset in D8209 to fix a similar issue with texture/vertex paint. In those cases, it is also important to see the model volume a little bit while rendering the colors as accurately as possible (it is not flat shading). I don't know how important it is for weight paint/attribute edit to always force flat shading. If rendering color data over mesh surface is a common problem for all these modes, maybe we should consider adding a separate workbench shading mode/setting just focused on that instead of the not really accurate studio light preset (with an adjustable surface shape influence slider, for example).

Fair points. I usually paint with wireframe enabled so this didn't occur to me. But painting without wireframe overlay is a totally valid workflow too, especially at higher polycounts.

To me, the main goal is this: User should be able to enter weight paint mode and see their weights clearly regardless of their shading settings. So to me the "always force white flat shading" solution is already a big improvement that achieves this goal, but admittedly it could be a bit more elegant.

My naive suggestion then, is that when the user is in MatCap/Studio shading mode, force the weight paint object to use a white matcap, and when user is in Flat shading mode, force the weight paint object to use white Single Color. Is this possible? And is it too hacky, or acceptable?

My naive suggestion then, is that when the user is in MatCap/Studio shading mode, force the weight paint object to use a white matcap, and when user is in Flat shading mode, force the weight paint object to use white Single Color. Is this possible? And is it too hacky, or acceptable?

It seems like an overly spesific case where this behavior is introduced, although if this was extended to all shaded modes it might be OK.

Having said that, an option to toggle between shaded & flat-color has the advantage that it's useful in weight & texture paint modes.

It seems like an overly spesific case where this behavior is introduced

True, I can only comment on the user experience of weight paint mode, but I think this should make sense for texture and vertex painting also. Perhaps @Pablo Dobarro (pablodp606) can confirm?

Having said that, an option to toggle between shaded & flat-color has the advantage that it's useful in weight & texture paint modes.

Are you saying this would be a new checkbox in the Overlay settings, available in texture/vertex/weight paint? If so, that sounds useful, but I worry a bit about adding even more options into the Overlay settings since it's already a bit crowded I'd say. Not a major concern, but maybe something to keep in mind.

Having said that, an option to toggle between shaded & flat-color has the advantage that it's useful in weight & texture paint modes.

Are you saying this would be a new checkbox in the Overlay settings, available in texture/vertex/weight paint? If so, that sounds useful, but I worry a bit about adding even more options into the Overlay settings since it's already a bit crowded I'd say. Not a major concern, but maybe something to keep in mind.

It could be a shading checkbox or a two state enum [Shaded, Flat] - for all paint modes, while I'm not especially keen on adding new options, alternatives to this seem to be sacrificing functionality.

Are you saying this would be a new checkbox in the Overlay settings, available in texture/vertex/weight paint? If so, that sounds useful, but I worry a bit about adding even more options into the Overlay settings since it's already a bit crowded I'd say. Not a major concern, but maybe something to keep in mind.

Not an overlay, but maybe a different workbench shading mode or an option under flat shading.

Wont users want to see shading while weight painting in some cases?

Removing shading entirely can make it hard to see the shape of a deformation while painting.

With this patch, a solid-mode mesh has no shading at all.

Possible solutions: Flat shading combined with Cavity and/or Shadow.

L. Just Flat and R. World Cavity


L. Screen Cavity and R. Both World and Screen Cavity

L. Shadow, World, and Screen Cavity, and R. Shadow

Although I don't really ever weight paint, I typically use flat shading with both World and Screen Space Cavity when working in solid mode, so I am just offering up a possibility that perhaps had not been considered.

Another option is to change the transparency of the overlay based on the normal towards the viewer. Or change the saturation based on the normal. Those are easier to process than doing expensive cavity.

I've seen some of Jeroen's tests and it definitely seems promising. It seemed that a solution which would make everyone happy might be achievable:

  • Lets you see your weights clearly regardless of your shading settings.
  • Lets you see the geometry of the character at the same time. (Unless if you're in flat shaded mode.)
  • Gives you the option to see weights and textures at the same time, by reducing the opacity of the weight paint overlay. Obviously, you can't perfectly see your textures and perfectly see your weights in the same place at the same time, but this is as close as possible to that.
  • Does not add any new options for the user to worry about.

Would be much better than I was initially asking for, which is of course very welcome! ;)

Jeroen Bakker (jbakker) closed this task as Resolved.Aug 18 2021, 4:28 PM

I was just happily removing some code from my addon that I use for entering weight paint mode, which now no longer needs to mess with the shading settings, which is wonderful! Thanks so much for the patch, it's working really beautifully imo.

I did run into one thing which I should've thought of while this patch was still being worked on, sorry for being so late: If the object's viewport display type is set to Wire, the weights are not visible. And if it's set to Bounds, the mesh doesn't become visible.

To be fair, this could easily be argued to be a separate task, but I think it would be nice to tackle this while you're still fresh on the relevant code. I definitely think it would be useful, at least! :D