1
$\begingroup$

I'm trying to apply PBR texture (for instance from Polyhaven) to my properly subdivided plane. The usual way is creating new material and Ctrl + ⇧ Shift + T having Principled BSDF active, so all maps are connected automatically into the nodes. And I'm always getting this flat result, even having displacement map connected

enter image description here

I found that by default there is Bump Only in my Principled BSDF settings

enter image description here

Changing it to Displacement Only or Displacement and Bump gives me this weird result

enter image description here

So I need to adjust my Displacement scale to an adequate value in order to get proper texture look

enter image description here

I have to do this every time with every new texture. Is there any way to get the proper result instantly? Is my texturing workflow wrong in any way? Or at least is there any way to change the defaults of Principled BSDF from Bump Only to Displacement and Bump?

$\endgroup$
1
  • $\begingroup$ AFAIK the displacement map contains value ranging from 0 to 1 because it can be applied to pretty much any form of geometry so you do have to indicate a range of values that corresponds to your actual project. The process in itself can be automated by python scripting but you won't be able to change this default behaviour without a bit of coding I'm afraid. Some settings are hardcoded and can't even be scripted. $\endgroup$
    – Gorgious
    Commented Jul 26, 2022 at 9:47

1 Answer 1

0
$\begingroup$

Open node_wrangler.py from your distributive (on Windows: C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\node_wrangler.py) If you are doing it in Blender, you should run it as administrator to edit script file

Scroll to row 3297, it should contain "# TODO Turn on true displacement in the material"

After this row add:

               # TODO Turn on true displacement in the material
               # Too complicated for now

               disp_node.inputs["Scale"].default_value = 0.1
               if context.scene.render.engine == 'CYCLES':
                  context.object.active_material.cycles.displacement_method = 'BOTH'

Note that line offset is important, This should look like exactly like this:

enter image description here

Save the node_wrangler.py and restart Blender

UPD: I've found that it is really "Too complicated for now". Displacement method is set but isn't applied on object.

$\endgroup$
3
  • $\begingroup$ This just made my node wrangler stop to work. Neither Ctrl+T nor Ctrl+Shift+T work after adding that code $\endgroup$
    – Pimpit
    Commented Jul 26, 2022 at 11:09
  • $\begingroup$ I suppose that you have broke something share the screenshot of the code $\endgroup$
    – Crantisz
    Commented Jul 26, 2022 at 11:10
  • $\begingroup$ I dont know how to attach the screenshot in comments, but I've double checked the code and its the exact copy of your one with the proper line offsets. Something just doesn't work $\endgroup$
    – Pimpit
    Commented Jul 26, 2022 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .