[Addon] PBR painter

I’m working at new addon.
It’s a PBR painter, like substance painter.


I need your help to add featuring and find bugs.

2 Likes

That’s a lot of work for one person :slight_smile: Thanks for making this effort.

Looks interesting. It would be cool with more sliders for metallic, bump etc. Maybe you could generate math nodes automaticly and get it all from one image or even better automaticly generate groups for different principle materials and use a image as a mix between them :slight_smile:

All I was able to do for now was paint on photoshop-like layers in Cycles mode. That’s already a great addition to Blender’s texturing mode and should be a built-in feature of 2.8. (Though, it did crash for me while I was moving the roughness slider back and forth on a layer.)
However, if I just wanted that functionality I would just go with BPainter for now.

Generally speaking, I’m afraid I don’t see any point in even having a PBR painting addon in 2.79, since the display of PBR materials in Material mode is just crap. And nobody is going to switch to Render mode to be able to see what they’re actually doing. So it’s either 2.8 or nothing, right?
Another thing that Blender will never have and that is absolutely vital for PBR texturing are libraries of pre-made “substances” that every PBR painting application offers out of the box. Users want to be able to paint a scratched metallic surface with rusty edges with a single stroke of a brush. (That means painting with pre-made brush textures on at least four individual textures simultaneously.) And then switch brushes with a single click and start drawing shiny droplets of water with great-looking normal maps onto the metal. And eventually all has to be exported as a set of game-ready png files, also with just one or two clicks of the mouse.
How do you plan on doing this with Blender?
And if this isn’t your goal, what are you hoping to achieve?

Mille grazie, Anfeo, much appreciated! :slight_smile:

anfeo, you must to be in touch with this tread, Man:

Good luck for your job, Anfeo! :stuck_out_tongue:

Great work! Do not forget to put some good cavity masking features to it… one of the most important things Substance painter like apps have are their so successful cavity masking means! Blender still has a big void as to the sufficient cavity masking… you can not produce easily with it ‘dirt and grim’ in the various kinds of corners of the objects. The ‘pointiness’ feature in the shading node system is good but is far from being able to produce, sufficiently, such effects. So, there is a vast area that someone can work regarding the creation of such tools.

Thank you, it’s good ! The transparent option is fast and easy.
The possibility to put a layer under or above is really cool.

Except if it’s intended, I found a possible issue :
when you rename a layer in the addon tab, it does not rename the node and the image name itself.

Just some suggestions to improve your addon :

  • It could be quicker to have it in the tools panel, instead of its own tab. so, less go-back between tabs.
  • A percentage to control the opacity of each layer could be great.
  • Of course , It could be useful to deal with others kind of slots (normal, bump) for future versions.

https://imgur.com/gallery/M0WWN

i have been working on something similar . soon will add layer and generators too …
glad to see your progress keep it up man .

and any help needed then let me know

thanks

The script is for working on texture paint, you don’t need to see the image and the node editor.
One task for the future is to add an export setting for color, mask etc… like a bake.

Well, maybe I wasn’t clear enough.
Different names between the slots and filenames can lead to errors in big production batches, where operations are made automatically to handle a lot of files.

While I can understand your point of view for “do not need the node editor” , we can not forget that some users enhance the shader and add some things like emission to the principled shader.

Please, do not see this as a feature request or an attack, just like a possible issue that can not be hidden forever under the carpet.
If it’s a decision design to have different names between slot names and file names, fine, but users can be disoriented when they search their files.

Just my two cents, I’m thankful for your work.

PBR means physically based rendering, so you have created a new render engine for painters?

A way of painting textures for those engines.

Finally! I was waiting for someone writing something like this for Blender. I will test it out soon. Thanks for your effort!

I try to found a solution (I’ve one in reality, assign ID prop to each image, but is not elegant solution :D)

New version, I’m working on the images management, but in blender is very hard because a minimal change, lost the image data. So I need to save the image a lot of time.

Thanks for sharing

A great idea,
however I’m afraid this needs some crucial changes in blender’s C code structure.

Had to move this section up to below the import to enable V2 (I moved it to line 21-30)

def upgo(context,self):
context = bpy.context
obj= context.object
i = context.scene.paintPBR_index
if i>-1:
#print(“update!!!”)
mat = obj.active_material
nodes = mat.node_tree.nodes
links = mat.node_tree.links
refresh_node (context,nodes,links)

I deleted the old addon and installed the new one but when I activate the new addon this happens.


I had that too. I fixed it by moving the section

def upgo(context,self):    context = bpy.context
    obj= context.object
    i = context.scene.paintPBR_index
    if i>-1:
        #print("update!!!")
        mat = obj.active_material
        nodes = mat.node_tree.nodes
        links = mat.node_tree.links
        refresh_node (context,nodes,links)



up because you have to define upgo before you try to update it. Minor bug easily fixed.

I did discover that something is up with metallic though. The gold in this should be mirror polished gold. It looks like the mix node I selected is the correct input for that, but the metallic socket is using the same node as roughness to the left of it.