1
$\begingroup$

When importing images as planes the default material has specularity of 50%.

I want to import a lot of images, but with specularity of 0%. Or in some other projects I need all the images to be emission maps.

Is there a way to prepare a Principled node, (or even shader nodes) to be used by default when importing Images as Planes?

$\endgroup$
1
  • $\begingroup$ can be done using blenders python API $\endgroup$
    – kemplerart
    Jun 11, 2022 at 16:19

2 Answers 2

1
$\begingroup$

Making them use an emission shader can be set under the import settings:
enter image description here

To edit principled bsdf for all images, here is what you need to do:

  1. Import images with Principled option set
  2. Select all images you want to edit with Principled material
  3. Go to Scripting tab
    enter image description here
  4. Set the text file name to be (.py):
    enter image description here
  5. paste the following code:
    import bpy
    
    for obj in bpy.context.selected_objects:
        mat = obj.data.materials[0]
        nodes = mat.node_tree.nodes
        nodes["Principled BSDF"].inputs[5].default_value = 0.0 #specify your specular value here
  1. Run the code (make sure all images are selected):
    enter image description here

  2. Check out your image planes materials, specular should be the one you specified

$\endgroup$
1
  • $\begingroup$ Nice. I will take a look and make some tests later. $\endgroup$
    – Rafael
    Jun 11, 2022 at 17:32
1
$\begingroup$

Specularity - You can edit add-on for you ... navigate to addons folder inside Blender (according to your OS)

  • open io_import_images_as_planes.py file in some Text Editor
  • copy line 1005 core_shader.inputs['Specular'].default_value = 0.0
  • and paste after line 998 ... save and reopen Blender.

... if you need more default adjustments of shader you can easily replicate similar to other values of BSDF, seems to me self-descriptive even without scripting knowledge ... like me :)

Emission - already pointed by @kemplerart :)

$\endgroup$

You must log in to answer this question.

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