Page MenuHome

Texture Paint: New Cursor and Spherical 3D falloff
Needs RevisionPublic

Authored by Pablo Dobarro (pablodp606) on Dec 10 2019, 5:55 PM.
"Like" token, awarded by Constantina32."Burninate" token, awarded by iWaraxe."Love" token, awarded by roman13."Burninate" token, awarded by imad_mss."Like" token, awarded by xrg."Love" token, awarded by wo262."Mountain of Wealth" token, awarded by Brandon777."Love" token, awarded by RodDavis."Love" token, awarded by Zino."Love" token, awarded by andruxa696."100" token, awarded by Frozen_Death_Knight.



[Design Task, code is not final]
This is an attempt to add the new cursor and spherical falloff to Texture Paint, to match the behavior of the brushes and cursor of Sculpt Mode/Sculpt Vertex Colors.

I would say that this is the behavior most people expect from the default texture paint brushes. If we are going to merge UDIM texture painting in 2.82, it may be a good idea to have this and the brush parameters in D5697 working to avoid users running into the most obvious and anoying limitations of the system while trying UDIM painting for the first time.

This quick implementation is hacked on top of the UDIMs patch D3509. Painting with normal falloff, occlude and backface culling works, but:

  • It produces artifacts at the seams
  • Symmetry does not work
  • It still uses screen space units in a lot of places, so there may be other artifacts related to that.
  • It needs world spacing (like sculpt mode, can be easily enabled).

I've never worked with the texture paint projection code, so I don't have a global vision of the system. Is this approach valid or does it have other kinds of limitations/issues that cannot be fixed without bigger changes?

Diff Detail

Event Timeline

Jeroen Bakker (jbakker) requested changes to this revision.Jan 8 2020, 4:35 PM

Nice to see effort on this area.


Remove this file from the patch it is not related


align comment with depth field


empty code path.


use more descriptive names


is this intentional?


seems like debug code


seems like debug code

This revision now requires changes to proceed.Jan 8 2020, 4:35 PM

Before continuing with this implementation, are we sure that reusing the current texture paint mode are we going to be able to get a painting brush similar to this?

I'm not familiar with this area, so I would like to have an opinion if spending time trying to add all those feature and fixes on top of the current texture paint mode is a good solution and compatible with a painting system like the one described in T71947 or if it is better to try to fix some fundamental limitations first before continuing adding new things.

Just an idea, if we add Texture and UVs support to the PBVH (creating a PBVH_TEXTURE which is built using the 3D location of each texture element in 3D space) it may be possible to reuse all tools and brushes from the new vertex color implementation with the exact same behavior in texture paint instead of trying to replicate everything on a different system.