ucupaint icon indicating copy to clipboard operation
ucupaint copied to clipboard

Paint colour on colour texture while doing Object Space Normal Painting

Open MJacred opened this issue 11 months ago • 4 comments

Version 2.1.5 added Object Space Normal Painting. If I understand the video correctly, then you can sample the normal map at some point and then paint over the same area to flatten it: https://www.youtube.com/watch?v=tYLXYEnAE6Q

Can you add the option to change paint the base colour texture with a different colour at the same time?
In other words: allowing the user to paint two different colours on two different textures at the same time. See here: https://www.youtube.com/watch?v=s8N00rjil_4&t=398s

P.S.: thank you so much for enhancing Blender's workflow with textures!

MJacred avatar Jan 17 '25 11:01 MJacred

I don't think that's possible currently in Blender without using a hack. I saw someone do something like that in older Blender (https://github.com/kromar/blender_Material_Brush). I tried it before, but it never worked correctly. Maybe I did something wrong or used the wrong version of Blender.

ucupumar avatar Jan 17 '25 17:01 ucupumar

Thanks :)

Hm… I only skimmed over the code, but it looks doable. They basically track the mouse movements, build brush strokes, and apply them to images.
The performance might not be that good though… There seems to be an issue for that on Blender,, but dunno when that gets done

Currently, I don't have the time for this. Starting March this year I should have some more time, unless you want to tackle this?
If not, I can draft some design in March for you to check, before I attempt any integration into ucupaint


A hack I could think of earlier would be to make use of the normal map texture's alpha channel.
When painting to the normal map, we also write to the alpha channel, which will be used as a mask for the selected base colour to render on top of the current result. And when the user painted with that colour, and switches to another, flush the data in the alpha channel to the base colour texture. Then resetting the alpha channel.
That should bring about the same result with better performance

MJacred avatar Jan 17 '25 18:01 MJacred

Yeah, sure. I'm still focusing on the UI-redesign branch so any help on other things would be appreciated.

ucupumar avatar Jan 18 '25 09:01 ucupumar

Blender already has brushstroke color randomization for hue, saturation, and value. It would be awesome to be able to link or group layers together, paint on the primary, and have pre-set color and randomization settings for the other layers.

ErichCode avatar Aug 18 '25 16:08 ErichCode