Hi,
As far as I know NW has the most easier and flexible way to load a PBR texture in one step, and it’s keyword filtering is really helpful with different naming conventions.
I did a small modification to the NW addon, Add Principled Setup functionality so it can load more maps that I frequently use:
I’ve made it work with the green maps but my programming skills being close to zero, the AO map is broken.
Ideally I would like to load it as an unconnected node along with the others because this one has more possible use cases and it’s missing it’s own socket in the principled shader.
Right now if a AO file is selected it will break the execution when checking for it’s corresponding socket in the shader. But I don’t know how to make it a separate case and here I would ask for some help.
Hi dude my bad , its working now all i has to do is disable default node wrangler and then restart blender and then install new one. sorry for the bad feedback.
Hey, I tried adding the extra case to handle the ambient occlusion node as you mentioned. I also took the freedom and changed the “AO” label to “Ambient Occlusion”, but choose whatever you prefer
You can maybe also further look into the alignment of the nodes, as sometimes the AO node seems to overlap some of the links…
If you get some positive feedback that this is something that would be desirable to add to the add-on (I personally do think so), I would encourage you to look into submitting a patch on developer.blender.org. New contributors are always welcome!
Hey this is so great! Thanks a bunch! I see it links it to an ao generator which is not even working with evee. Is it necessary? or I can comment the section below # add ambient…? I have at least 3 use cases for AO: as a mask, as an abbedo multiplier or linked to a glTF group so it’s better to have it free just to polish it a bit.
Oh, now that I think about it, the Ambient Occlusion node doesn’t really make sense, does it…
Yeah, you can just get rid of the parts dealing with the ao_node
Edit: I quickly did it, since I didn’t include all my changes in the previous post. node_wrangler_extra_v3.py (232.4 KB)
Thanks again! this is excellent. I tested a bit more and the only tiny detail remaining would be to align it on top as the first use case is probably to multiply with base color. I tried and is not that obvious But don’t worry, it’s already good as it is.
I had actually thought the same thing, so I already looked into it.
Instead of appending the ao_texture inserting it at the beginning of the texture_nodes list seems to work fine. I haven’t tested it extensively.
Changing the if-block at line 3412 to something like this does the trick:
if ao_texture:
# We want the ambient occlusion texture to be the top most texture node
texture_nodes.insert(0, ao_texture)
That worked like a charm! When I saw “append” I thought “insert” would be nice to have but didn’t search for it. I also declared the ao_texture because it was giving an error if you didn’t pick an AO file. I am almost convinced to learn python for blender.
Anyway, here it is with AO above base color. node_wrangler_extra_v4.py (232.5 KB)