Texture Paint 'Bleed' is angled along UV edges #50831

Closed
opened 2017-03-02 01:38:49 +01:00 by Ryan Pocock · 35 comments

System Information
Windows 10
Nvidia GTX 970

Blender Version
Broken: 2.78a and 2.78c (tested on both of these)

Short description of error
When using the texture paint section of Blender, if the 'Bleed' setting is set to anything above 0, you will see that when painting along an edge of a UV in the 3D Texture Paint mode, the bleed works fine from the first vertex, but is angled towards the next vertex, meaning the bleed isn't consistent at all.

Exact steps for others to reproduce the error

  1. Start with default cube
  2. For quicker purposes, smart UV unwrap the cube with a margin (the error is with any unwrap)
  3. Move into Texture Paint mode
  4. Create a paint slot image texture of any size.
  5. Change the options, bleed setting to anything above 0. To see the bug clearly, use a large number like 8px
  6. Begin drawing along an edge of the cube.
  7. View the UV and texture in the 'UV/image editor' and zoom in, you will see the painted bleed is angled, and fading back to 0px bleed towards the edges of the vertices.
**System Information** Windows 10 Nvidia GTX 970 **Blender Version** Broken: 2.78a and 2.78c (tested on both of these) **Short description of error** When using the texture paint section of Blender, if the 'Bleed' setting is set to anything above 0, you will see that when painting along an edge of a UV in the 3D Texture Paint mode, the bleed works fine from the first vertex, but is angled towards the next vertex, meaning the bleed isn't consistent at all. **Exact steps for others to reproduce the error** 1. Start with default cube 2. For quicker purposes, smart UV unwrap the cube with a margin (the error is with any unwrap) 3. Move into Texture Paint mode 4. Create a paint slot image texture of any size. 5. Change the options, bleed setting to anything above 0. To see the bug clearly, use a large number like 8px 6. Begin drawing along an edge of the cube. 7. View the UV and texture in the 'UV/image editor' and zoom in, you will see the painted bleed is angled, and fading back to 0px bleed towards the edges of the vertices.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @autumnpioneer

Added subscriber: @autumnpioneer

#52453 was marked as duplicate of this issue

#52453 was marked as duplicate of this issue

Added subscriber: @biliogadafr

Added subscriber: @biliogadafr

I encountered the same problem, so I decided to add pictures
2017-05-04 22.45.40.png
This is especially a problem when I need to paint around holes in UV.
2017-05-04 22.42.20.png

I encountered the same problem, so I decided to add pictures ![2017-05-04 22.45.40.png](https://archive.blender.org/developer/F587919/2017-05-04_22.45.40.png) This is especially a problem when I need to paint around holes in UV. ![2017-05-04 22.42.20.png](https://archive.blender.org/developer/F587921/2017-05-04_22.42.20.png)

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Please, as per the bug report guideline attach a file even if it's super simple.

Please, as per the bug report guideline attach a file even if it's super simple.

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-05-29 09:55:58 +02:00

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply. Due to the policy of the tracker archiving for until required info/data are provided.

I've prepared required scene:

BLEED_BUG.blend

Things to notice from this test scene:

Скриншот 2017-05-29 13.09.48.png

I've prepared required scene: [BLEED_BUG.blend](https://archive.blender.org/developer/F611936/BLEED_BUG.blend) Things to notice from this test scene: ![Скриншот 2017-05-29 13.09.48.png](https://archive.blender.org/developer/F611940/Скриншот_2017-05-29_13.09.48.png)

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Bastien Montagne removed their assignment 2017-05-29 12:31:30 +02:00

Thanks, reopening then.

Thanks, reopening then.
Author

Any update? This is pretty detrimental to my workflow and a lot of artists i know, haven't seen any changes in 5 months

Any update? This is pretty detrimental to my workflow and a lot of artists i know, haven't seen any changes in 5 months
Member

Added subscriber: @Stefan_Werner

Added subscriber: @Stefan_Werner

Added subscriber: @ChameleonScales

Added subscriber: @ChameleonScales

It's not a bug but the behavior of the feature is a bit cheap.
The way it extends the pixels is as shown in this image (according to my experiments) :
Texture Brush bleeding method.png

Even with quads, it extends around the hidden triangles with the same method, which explains the non parallelism with the edges. Of course the edge inside the quad (the diagonal) doesn't get extended, as don't all the edges inside a UV island.
You can see it more clearly on these 2 examples (I added yellow lines to show the hidden triangles) :
quad.png
island.png

The big question is : is this method the only possible one to allow fast enough responsiveness or can a better one be developed and work in real-time ?

Since this feature came out in 2.49 I'm guessing the modern computers can handle a better method.

What do you think b3d devs ?

It's not a bug but the behavior of the feature is a bit cheap. The way it extends the pixels is as shown in this image (according to my experiments) : ![Texture Brush bleeding method.png](https://archive.blender.org/developer/F702936/Texture_Brush_bleeding_method.png) Even with quads, it extends around the hidden triangles with the same method, which explains the non parallelism with the edges. Of course the edge inside the quad (the diagonal) doesn't get extended, as don't all the edges inside a UV island. You can see it more clearly on these 2 examples (I added yellow lines to show the hidden triangles) : ![quad.png](https://archive.blender.org/developer/F702951/quad.png) ![island.png](https://archive.blender.org/developer/F702953/island.png) **The big question is :** is this method the only possible one to allow fast enough responsiveness or can a better one be developed and work in real-time ? Since this feature [came out in 2.49 ](https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Projection_Paint) I'm **guessing** the modern computers can handle a better method. What do you think b3d devs ?
Antonis Ryakiotakis was assigned by ChameleonScales 2017-08-19 11:46:49 +02:00

I assigned you because you were assigned to this one https://developer.blender.org/T43709. It may be the same issue but I'd like to know if you have an answer to my question above.

I assigned you because you were assigned to this one https://developer.blender.org/T43709. It may be the same issue but I'd like to know if you have an answer to my question above.
Author

more information:

System Information
Linux Manjaro 64-bit
GeForce GT 640

Blender Version
Broken: 2.79 RC1 down to 2.76
Worked: 2.75a and previous versions

Short description of error

Up until 2.75a, the texture brush bleed performed on quads using the bisectors of the quads :

http://i.imgur.com/LVDLwXg.png

but since 2.76 up until 2.79 RC1, it performs on the triangles that compose the quads :

http://i.imgur.com/9kR3tpO.png

this brought undesirable results such as an uneven thickness of the bleeding :

http://i.imgur.com/8W2Ar3P.png

increasing the bleed value is not a good way to counteract this problem since it increases the chances of bleeding into another UV island or bleeding inside the very island we're painting in, as shown by the white arrows here (a texture stencil was used in the brush to make it visible everywhere) :

http://i.imgur.com/hEcBYFU.png

Exact steps for others to reproduce the error:

  • in 2.75a open this file and click on the cube to fill it with paint with the fill brush
  • observe the image

do the same in any later version

more information: System Information Linux Manjaro 64-bit GeForce GT 640 Blender Version Broken: 2.79 RC1 down to 2.76 Worked: 2.75a and previous versions Short description of error Up until 2.75a, the texture brush bleed performed on quads using the bisectors of the quads : [[http://i.imgur.com/LVDLwXg.png]] but since 2.76 up until 2.79 RC1, it performs on the triangles that compose the quads : [[http://i.imgur.com/9kR3tpO.png]] this brought undesirable results such as an uneven thickness of the bleeding : [[http://i.imgur.com/8W2Ar3P.png]] increasing the bleed value is not a good way to counteract this problem since it increases the chances of bleeding into another UV island or bleeding inside the very island we're painting in, as shown by the white arrows here (a texture stencil was used in the brush to make it visible everywhere) : [[http://i.imgur.com/hEcBYFU.png]] Exact steps for others to reproduce the error: - in 2.75a open this file and click on the cube to fill it with paint with the fill brush - observe the image # do the same in any later version

Added subscriber: @brecht

Added subscriber: @brecht
Antonis Ryakiotakis was unassigned by Bastien Montagne 2017-08-19 18:35:42 +02:00

Added subscriber: @Psy-Fi

Added subscriber: @Psy-Fi

No point in keeping twice the same report open…

Also, @ChameleonScales, please avoid doing triaging tasks yourself unless you know what you are doing, @Psy-Fi is not currently active and doubt he will handle bug reports currently!

No point in keeping twice the same report open… Also, @ChameleonScales, please avoid doing triaging tasks yourself unless you know what you are doing, @Psy-Fi is not currently active and doubt he will handle bug reports currently!

ok, sorry for that.

ok, sorry for that.

Added subscriber: @Jau

Added subscriber: @Jau

Hello,

Any news about this ? This functionality is useless this way, which is catastrophic when you need to paint a mask (ex : before exporting to Unreal Engine)

Hello, Any news about this ? This functionality is useless this way, which is catastrophic when you need to paint a mask (ex : before exporting to Unreal Engine)

Added subscribers: @ideasman42, @pk-nb

Added subscribers: @ideasman42, @pk-nb

Hi there—I wanted to let you know I took at a look at this bug. I ran into this issue originally when going through the blender cloud game asset tutorials. There are a couple things going on here in the latest blender. I was able to fix one miscalculation for tris but ran into a blocker with quads.

I believe the source of this bug is from the change to move to tri-data only within source/blender/editors/sculpt_paint/paint_image_proj.c. Specifically, this diff https://developer.blender.org/rBS416d164fecae8aeaa035c3bc2d47f7c07c970e48 from @campbellbarton.

For the miscalculation with tris: it appears the bleed calculation was incorrectly using the edge normal with an edge rather than using a point normal. You can compare the difference with the patch and blend file provided here. Both are set to a bleed of 16px.

uv_patch.patch
problem-bleed.blend

Screen Shot 2018-08-16 at 7.35.52 AM.png
Screen Shot 2018-08-16 at 7.38.11 AM.png

Note that I fixed the "sawtooth" and corrected the bleed amount by fixing the normal calculation. Unfortuantely, there is still tri overextension for quads as you can see with the following screenshots.

Screen Shot 2018-08-16 at 7.36.14 AM.png
Screen Shot 2018-08-16 at 7.38.51 AM.png

After this change I realized it seems impossible to calculate the proper bleed for quads with tri-data alone. It seems like the bleed calculation is just different for quads and tri. Unfortunately with the change made from that diff we no longer have the quad info. I'm hoping for context for the change but I fear to fix this will require a revert back to using special cases for quads or else find another way to calculate bleed. My guess is that this was a refactor. Thanks for looking at this, and hopefully this helps!

Hi there—I wanted to let you know I took at a look at this bug. I ran into this issue originally when going through the [blender cloud game asset tutorials](https://cloud.blender.org/p/game-asset-creation/56041551044a2a00d0d7e09a). There are a couple things going on here in the latest blender. I was able to fix one miscalculation for tris but ran into a blocker with quads. I believe the source of this bug is from the change to move to tri-data only within `source/blender/editors/sculpt_paint/paint_image_proj.c`. Specifically, this diff https://developer.blender.org/rBS416d164fecae8aeaa035c3bc2d47f7c07c970e48 from @campbellbarton. For the miscalculation with tris: it appears the bleed calculation was incorrectly using the edge normal with an edge rather than using a point normal. You can compare the difference with the patch and blend file provided here. Both are set to a bleed of 16px. [uv_patch.patch](https://archive.blender.org/developer/F4246417/uv_patch.patch) [problem-bleed.blend](https://archive.blender.org/developer/F4246632/problem-bleed.blend) ![Screen Shot 2018-08-16 at 7.35.52 AM.png](https://archive.blender.org/developer/F4246607/Screen_Shot_2018-08-16_at_7.35.52_AM.png) ![Screen Shot 2018-08-16 at 7.38.11 AM.png](https://archive.blender.org/developer/F4246610/Screen_Shot_2018-08-16_at_7.38.11_AM.png) Note that I fixed the "sawtooth" and corrected the bleed amount by fixing the normal calculation. Unfortuantely, there is still tri overextension for quads as you can see with the following screenshots. ![Screen Shot 2018-08-16 at 7.36.14 AM.png](https://archive.blender.org/developer/F4246618/Screen_Shot_2018-08-16_at_7.36.14_AM.png) ![Screen Shot 2018-08-16 at 7.38.51 AM.png](https://archive.blender.org/developer/F4246621/Screen_Shot_2018-08-16_at_7.38.51_AM.png) After this change I realized it seems impossible to calculate the proper bleed for quads with tri-data alone. It seems like the bleed calculation is just different for quads and tri. Unfortunately with the change made from that diff we no longer have the quad info. I'm hoping for context for the change but I fear to fix this will require a revert back to using special cases for quads or else find another way to calculate bleed. My guess is that this was a refactor. Thanks for looking at this, and hopefully this helps!

Added subscriber: @dacanizares

Added subscriber: @dacanizares

I don't know if this it's related with this kind of errors: https://imgur.com/a/3g9IuMe

Any news about this? :(

I don't know if this it's related with this kind of errors: https://imgur.com/a/3g9IuMe Any news about this? :(

@dacanizares it is related. Read my previous post explaining why this happens: https://developer.blender.org/T50831#450759

@dacanizares it is related. Read my previous post explaining why this happens: https://developer.blender.org/T50831#450759

@ChameleonScales Thanks! Any idea if this is going to be solved for 2.8?

@ChameleonScales Thanks! Any idea if this is going to be solved for 2.8?

@dacanizares no idea, sorry.

@dacanizares no idea, sorry.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Brecht Van Lommel self-assigned this 2019-03-04 17:36:07 +01:00

Added subscriber: @LucaRood-3

Added subscriber: @LucaRood-3

Solved by @LucaRood-3 in 871248a77d and 10d9a2494f.

Solved by @LucaRood-3 in 871248a77d and 10d9a2494f.
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
11 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#50831
No description provided.