NodeSet: import Substance Painter textures into Blender

I recently bought Substance Painter because i really liked the product. But when i started working in ernest on a complex model with a large number of materials, the repetative work necessary to import the relevant textures quickly got tedious.

Of course with Node Wrangler you can import multiple textures at a time but i still had to switch most textures to non color data and the labels on the image texture nodes reflected the filenames which are too long to act as a readable label.

So i decided to create a small add-on that sort of does what Node Wrangler's multiple images does but in a neater way. The add-on is called NodeSet and when you select its menu entry from the node editor (Add->Texture->Set of images) it will:

  • open a file dialog where you can select a texture (you only have to select one from the set of textures)
  • add this texture as an image texture node
  • set the non color data flag if it is not a color texture (i.e. not a BaseColor nor a Diffuse map)
  • automatically try to load all other textures with the same base name (for example Roughness and Metallic). It will ignore textures that are not present
  • give all nodes a descriptive name (BaseColor, Normal, Specular, ...)
  • group all those nodes into a frame with a label that reflects the basename of the texture set
  • order the nodes alphabetically (BaseColor will always be located above Metallic, regardless of the number of textures in the set or the loading order)

The result looks neat and descriptive:


A small tutorial on how to use it is available as well:

This all works because textures exported by Substance Painter normally follow a strict naming convention where each texture in a set has the same basename (typically the meshname followed by the material name) and a different suffix depending on the type of texture (_Normal or _BaseColor for example)

You can change these suffixes when you export so although NodeSet is configured with the Substance Painter defaults for both the metal/roughness and glossiness workflows (i.e. in Substance Painter you can select Export Textures en select either PBR MetalRough or SpecGloss (non PBR)), you can configure the suffixes it will look for in the User preferences -> Addons . If you leave one empty it will not try to load it. There is of course nothing Substance Painter specific in this setup so it should work for every program that is able the produce texture sets with a common basename and a different suffix for each map.

Currently it will look for png, jpg/jpeg, hdr and exr textures.

Availability

The add-on is available from GitHub. Download it and then select it from File -> User preferences -> Add-ons -> install from file. Don't forget to check the enable checkbox.

I continue to publish free add-ons because I really like writing them and enjoy the feedback I get. I do have some commercial add-ons you might like to check and some e-books that might come in handy if you want to learn to create your own. Check out my BlenderMarket shop if you are interested. For a limited time all my products are marked down to celebrate that the e-books are now also available on Blender Market.

36 comments:

  1. Hi!

    Thanks for the add-on - it works perfectly - but - did you get the PBR shader from somewhere else or did you make it yourself?

    Many thanks,

    Adam

    ReplyDelete
    Replies
    1. the PBR node group that is visible in the video is from Blackheart Films: http://www.blackhartfilms.com/blog/a-simple-pbr-shader-nodegroup-in-blender-3d

      Delete
    2. Many thanks for the link and for the node group - I've been holding back on working the painter textures back into Blender - but tomorrow I will have a good play with it all.

      Thanks also for Weight Lifter - I'm a big fan!

      Delete
    3. @Adam: always nice to hear from a fan :-)

      Delete
  2. this addon is excellent, will it have emissive materials someday?

    ReplyDelete
  3. emissive textures should already be loaded: the default suffix is _Emissive in Substance and it checks if that one is checked. However, Blackheats shader that is used in the tutorial does not do anything with Emissive or Opacity. he does offer a better shader on BlenderMarket though.

    ReplyDelete
  4. I made an addon similar to this, except mine load the images by folder selection. Yours is much cleaner and intuitive. Thanks. (also you're first name is my last name :) ).

    ReplyDelete
  5. Replies
    1. Hi Георгий,

      'Not work on 2.7' is not enough information fro me to work with I am afraid (and 2.7 is not a recent version of Blender)

      Can you be a bit more specific? (I tested it with Blender 2.77 2.77a and 2.78RC1, and Substance Painter 2.2 ) Are there specific error messages?

      regards,

      -- Michel.

      Delete
    2. In the video, in part with the blender immediately visible node "Substance PBR" where he was to take to connect.

      Delete
    3. I am not sure if I understand you correctly, but if you cannot select Add -> Texture -> Set of images
      then make sure you actually have the add-on enabled (installing an add-in in Blender will NOT enable it automatically) and make sure you are in the Material Nodes (not in the compositor nodes)

      regards,

      -- Michel.

      Delete
    4. I think he means the hide you plugged the textures intomfrom blender-he means it's not showing the node (which I assume is not part of the adddon, although it looks really convenient)

      Delete
  6. dosen't work it only add base color image ignoring the rest of the image

    ReplyDelete
    Replies
    1. can you give me an example? What are all the images called exactly? What export settings did you choose in substance painter? What texturing mode did you use (metal roughness, or specular glossiness, or something else entirely)?

      Delete
  7. Just discovered this and what a life saver. I have a project with dozens of different objects and this has drastically reduced the time and effort it takes to get them into Blender.
    One question. Do you know of any way of getting an AO map into the mix using this method?
    Thanks again.
    Mike.

    ReplyDelete
    Replies
    1. Hi Mike,

      A quick workaround would be to fill the distintive part of an AO's mapname (i.e. AmbientOcclusion) in one of the configuration settings of an unused map (say specular if you use metalrough). the configuration settings are the ones in file->user preferences->add-ons in the info of the add-on. I'll try to add a more permanent fix to the add-on as soon as possible. (I left out AO because i personally never use it in a map and let Cycles do it's thing but that is of course not a good excuse :-)

      Delete
    2. check: http://blog.michelanders.nl/2016/12/nodeset-support-for-ambient-occlusion.html

      let me know what you think

      Delete
    3. Works like a charm:)))
      I am using it with Blender Brit's 'Substance2Blender and the combination is perfect.
      Thank you so much.
      Michael.

      Delete
  8. This comment has been removed by the author.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Thanks a lot, Michel,your great add-on saves my life!!!
    As a concept artist, I can't program at all,but I found the add-on had a little flaw:
    When I click “set of the images”,the filter options are turned on by default,it makes many files will be filtered out.( we can turn it off ,manually,each times)

    In you "nodeset.py." There it is.:

    filter_glob = StringProperty(
    default="*Color*",
    options={'HIDDEN'},
    maxlen=255, # Max internal buffer length, longer would be clamped.
    )

    For my custom edtion ,I just replace the "*Color*" to "*.*",
    then the filter is gone.I think it will be better to use.for lazy people

    ReplyDelete
    Replies
    1. @Packsod 百草头: Laziness is exactly while I created this little add-on :-)
      But the idea to restrict the list to texture starting with Color* was to make it easier to pick the right set of textures from large collections of textures (because I figured that all texture sets had at least a color map and any other textures with about the same name are loaded anyway).

      I could add something like a global preset (so that people who want to have this filter disabled can do this once in the add-on config settings in the user preferences) but just for my information: do you use texture sets without a color map? Or does the name of the color map not start with Color?

      regards,

      -- Michel.

      Delete
    2. Thanks for your reply,Mike.
      you are right, I’m using the Spec/Gloss workflow(such as Quixel Suite).
      the texture naming are different from Substance Suite.
      There have colormaps but didn’t named with“color”Usually colormaps stored in ”_dif ”(diffuse)/”_alb”(albedo)//etc ,so I have to turn off the filter,or change the keyword, otherwise,I can't find any textures.
      So,In my humble opinion,If we can custom the keyword for the fiter in the add-on settings,it were be more general applicability for different users.
      regards,
      --Packsod 百草头

      Delete
    3. Mmm you sort of can configure already what is used as a prefix in the global settings of the add-on but I guess that will fail with the suffix labeling scheme you mention ... I will see what I can come up with to make that configurable :-) But thanks for your feedback!

      Delete
    4. Check this if you like:

      http://blog.michelanders.nl/2017/02/nodeset-more-flexibility.html

      cheers,

      -- Michel.

      Delete
  11. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  12. Very helpful Addon - just wanted to tried with "RD-Textures.com" set on 2.79. The first try came only with "Color". They use 4K or 8K in suffix ("SOIL-13_COLOR_4k.jpg") so I tried erased this "_4k" part in file names or add "_4k" in addon pref as shown in a screen, but it helped bring only the "DEPTH". Is there something obvious I mossed or version mismatch, bug? Thanks for help.
    http://pasteall.org/pic/index.php?id=120658

    ReplyDelete
    Replies
    1. your config looks ok ... i'll try to reproduce it and see what I can find out

      Delete
    2. If you add jpg to the list of extensions (the option 'File extension support' in the configuration settings) it will work.
      Apart from the file you actively select any .jpg files are not loaded because we do not look for them, just for .jpeg

      I will add this as an extra default, for now please add it to the setting.

      (I never tested this very well with jpg files because sometimes jpgs give artefact, especially in height/bump maps so .png or .exr is often better)

      Delete
  13. ah, right :) I saw JPEG, I just didn't realised the "E" is missing. It confused me that "COLOR" as JPG format too was loaded, so I didn't pay attention to to this small difference in extension. Probably color is not filtered by the same as others? Nevermind it works now. Thank you for help.

    I also prefer exr or png, but as I wrote, I got textures in this format (only depth was PNG or TIFF in 16 bit as seen in the screen. Specially NORMAL texture I would expect in exr 32 bit.

    For some reason normal texture gets material totally black - with Adaptive subdivision modifier. It does micro displacement, but it ruins material in render.
    But this is something to discuss somewhere else I don't thing its node tree related, right?

    ReplyDelete
  14. you might have to play with the texture mapping, see also http://blog.michelanders.nl/2017/08/nodeset-additional-features-and-clean-up.html

    (and sometimes the strength of the normal map is just to big)

    ReplyDelete
  15. I was a bit shame to ask, but you again solved my issue. Default Tangent Space of NormalMap node was the issue. Thanks for the link :) Probably could be helpful let addon generate node with Object / World space setup?

    ReplyDelete
    Replies
    1. it already does that :-) if you select the add textures + principled shader it creates a noodle that has a normal map node. In the preferences you can configure it to use object space by default.

      Meanwhile I added .jpg to the default list of extensions: http://blog.michelanders.nl/2017/12/nodeset-tiny-enhancement.html

      Enjoy!

      Delete
  16. ah, I see, sorry, great, thanks :)

    ReplyDelete