Painting normal maps to improve sculpting details

I’ve had exactly the same experience lately, ZombieJohn, and found the same solution. I wonder, though, if deselecting the Mipmaps option in the Image panel might help with bump map images? Haven’t had time to test that yet.

Hm I thinking about this… My idea is not bad!
Why?
When we paint the texture on the model, Blender don not turns the bursh depending on the face orientation. So the brush is always same orientation on the texture.
So my idea is good: it will works.

But we can not rotate the brush, this is true. But if coders make a code that turns a normalmap brush, recalculating it (from grayscale for example) it will be fast.

Endi, if a theoretical “normal map brush” is converting a grayscale mark to an internal normal map representation, brush rotation is not an issue. It only is a problem when the brush is “loaded” with a pre-produced TS normal map, similar to painting with a pattern in Photoshop. In that case, orientation of the mark would likely be affected by brush angle relative to the surface being painted, making it basically impossible to apply a continuous pattern of “normal map marks.”

Your originally-described idea might work, but would be so difficult to do properly it would not be practical, taking much more time than baking a 2D map from a sculpt and applying it, or using 2D art converted to a normal map (takes less than 2 minutes for a 4K image in Xnormal, other utilities may be faster).

So as of right now you can use Texture Paint to lay down marks on a model, bake that out as a Texture map, clean it up in an image editor, convert it to a normal map and apply it for display or rendering – a “normal map brush” that converts the painted marks would essentially just automate about 95% of that and keep everything internal to Blender. A laudable goal.

I noticed that too, it looks like the normal map lighting doesn’t get inverted
from the different UV orientations. I worked for a bit with the Panda3d engine
and that one every uv seam the normal map rendered backwards, sideways, or completely inverted.
The main things that would need to be worked out are the 3d texture paint uv seams,
(somebody already made a script for that.) a ‘brush turner’ for the brush,
and a softer alpha fade also, so things blend better. I think it would look ok if it blended better.
The only problem would be because you would have to switch between different brushes to invert
or get less of a bump when painting, because those brush thumbnails are really small. :smiley:
I haven’t checked, but if you can load 32 bit into the paint thing maybe it would be pretty sweet also.
I wish greyscale wasn’t so spindly looking, that norm button should go to 40 :smiley:

Endi - i made some tests, made myself several brushes from some simple models, and tested inside blender with normal mixing, and also in gimp with overlay
and

your idea is great, it simply works!

thanks alot for it. I hope somebody can really make the overlay mode for painting, I’ll try to look into it but I am no good coder in c…

here is a file with a little test object and the brushes which I have made it with. note that brushes which look correct are from gimp, while the incorrect ones are from blender.

http://plant.ffa.vutbr.cz/~novak/dwnflz/nmbrushes.blend

Pildanovak, I get a 404 trying to d/l your .blend file at that link, can you attach it to the post instead? Thanks

I’m sorry, the link is corrected.

Yeap, pildanovak is right, works. I think it’s thanks to the way that texture paint works right now, it’s not projection painting. So when you paint you just indicate a point in the UV map where the brush should act and it goes to the 2D map to paint. So the problem about brush changing orientation never happens. The normals are always aligned to the flat 2D mapped faces.

.

pildanovak,
wow it works but I dont understand how :slight_smile:

Use only 512x512, 1024x1024 etc textures… Now this example blends is very slow.

And I now understand it. You use simple blending mode with a brush that has alpha. :slight_smile: Tricky.
With overlay this will perfect for me to paint fine details with symmetrical brushes.

That’s pretty amazing how it reacts to different light :smiley:
It smears perfectly, the rgb!
‘Blender 2.5 features: Integrated RGB smearing ability!’

http://img293.imageshack.us/img293/3470/11189950ul2.jpg
http://img440.imageshack.us/img440/2722/99380958uh3.jpg

I’m testing it and this is huge, people should know about this. This with GLSL is already real-time normal painting in Blender. Although it needs the overlay blending to be just amazing. But right now some really nice things can be done.

EDIT: “Blending Life” participants surely would make a good use.

.

Hey, I think I get it!!

So just to clear things up for me, with the Bump Map, Additive makes it so that white goes over black (or w/e), which is fiine, but not for normal maps. This is because if we make a bump map with that huge white spot, it will have a huge bump!! Instead of mixing ‘three dimensionally’, it only takes into account the colors. It doesn’t know better! I’m still unclear on the effects of overlay opposed to additive. May I see an example of an overlay blending mode on a bump map (black and white) please?

I think what he means is how the two brush samples mix together.
The paint tool is really touchy, it likes to fire off point to point lines if you paint too quickly :smiley:

Interesting, but there are problems using this process on non-contiguous UV unwraps:

http://www.cdupload.com/thumbs/small/36971_ofqmc/NmapOnSphere.jpg

used pildanovak’s file, cleared the test normal map that’s being painted to, then unwrapped a default UV sphere and applied the cleared map just as was done with the plane. Seams for the sphere were 3 “great circle” cuts at right angles to one another, making 8 sections, just a straight default unwrap. Then I used the brush in the example file to draw a “sculpted” feature across the UV seams.

Not very good results. This was with a fairly simple UV unwrap – models such as those use in the Blending Life event are likely a lot more complex. I know mine is.

For now, sculpting and baking gives much more reliable results.Or painting greyscale “height” maps and then converting them to normal maps in a 2D image process.

But painting over seams is a problem anyways as far as I see it. SO as long as you know no to draw over a seam it is a nice/cheap way of adding stuff.

chipmasque: as I stated, In blender it works, but wrong(as also endi said) because it’s just simple blending, and you can see the stroke can look completely different if you stroke it from left to right and then from right to left…

but if you try it in gimp, it already works.

I started to add all the blend modes present in material system also to painting system, but I’m quite an amateur, so give me time plese :slight_smile:

also drawing over seams is something else still. projection painting would be of course great for it…

HI guys, you´re doing a great research!

Wasn´t there a normal map converter node? I know I saw it in the patches section some time ago but I don´t seem to find it right now. Does anyone know what happened to this node patch?

@ musk – not being able to cross seams makes the process too limited for practical use as a general tool – with true sculpting there are no seams. For occasional spot details, hey, go nuts.

@ pildanovak – as I mentioned early on in the thread, compositing normal maps isn’t a new process, especially in 2D. That’s essentially what’s going on here – a tiny normal map image (the brush) is being continuously composited with the base image (the main UV mapped image). Photoshop, Gimp, whatever image editor used, it’s the same process. The main difference here is that it’s being done on a 3D surface via the Texture Paint process, which does provide for faster feedback on the effect via rendering or display, but which also has obvious limitations that make its use less efficient imo than existing means.

If the technical problems can be smacked down, this’d be a good item for the general toolbox, but as is, it has some serious drawbacks.

I made another test today, with an animated light, crazy considering it’s just that plane.
Good luck to you with building a blender with overlay.
I’m not sure if changing the opacity gives the correct results,
so maybe it might need extra brushes of different depth to simulate changing opacity?
I’ll try and bake some, last time I tried they turned out pretty horrible,
although I never tried to normal map bake a sphere to just a simple plane.

http://img135.imageshack.us/img135/8724/norm0001sm5.gif
I made this in gimp with full opacity clone overlay and it’s 100 times better than regular ‘mix’ :smiley:
Has anyone checked the svn? I just downloaded it, and I’m looking around in there :smiley:
There’s probably an easier solution than tracking down where the paint options are,
and building a blender for a measly overlay button though.
So far after 20 minutes of looking around, I’ve seen no instance of ‘texture paint’ in the svn,
but I think I can make it so the buttons say different, custom things in the ar.po file.
http://img159.imageshack.us/img159/6110/overlayjv7.jpg