sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    [Plugin] TextureImporter = Batch images into material-textures, inc. PBR...

    Scheduled Pinned Locked Moved Extensions & Applications Discussions
    10 Posts 2 Posters 184 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TIGT
      TIG Moderator
      last edited by TIG

      https://sketchucation.com/pluginstore?pln=TextureImporter

      A new simple extension which imports all jpg/png files in a selected folder and make new materials in the model named after them, using them as textures.

      TIG

      1 Reply Last reply πŸ‘
      Reply Quote 4
      • Rich O BrienR
        Rich O Brien Moderator
        last edited by

        @tig is it possible that if the folder contains PBR images that the importer could create mats with normal, roughness etc assigned correctly?

        Example:

        asphalt-01_basecolor
        asphalt-01_basecolor
        asphalt-01_normal
        asphalt-01_roughness
        asphalt-01_metallic
        asphalt-01_opacity

        This would create asphalt-01 material in SketchUp with the PBR stack correctly linked?

        Download the free D'oh Book for SketchUp πŸ“–

        1 Reply Last reply
        Reply Quote 0
        • TIGT
          TIG Moderator
          last edited by

          I'll look into it...

          TIG

          1 Reply Last reply
          Reply Quote 0
          • TIGT
            TIG Moderator
            last edited by TIG

            Here's v1.1
            https://sketchucation.com/pluginstore?pln=TextureImporter
            It has added support for PBR data textures if available/relevant [>=v2025]. It also supports tiff files as well as jpg & png.
            Any non-relevant PBR stuff in the folder is ignored.
            Full report of processing on completion...

            TIG

            1 Reply Last reply
            Reply Quote 0
            • TIGT
              TIG Moderator
              last edited by

              Here's v1.2
              https://sketchucation.com/pluginstore?pln=TextureImporter
              It now simplifies the PBR file material-naming where possible [some authors add suffixes regarding image size etc],
              it reverts to previous current material after processing rather than the last imported one,
              it skips inappropriate types of image files, sometimes included for use by other apps,
              it now has status-bar reporting on its progress [1 of 3 ... etc]
              and it now offers the chance to process any image-files in nested subfolders [one level] if desired.

              TIG

              1 Reply Last reply
              Reply Quote 1
              • TIGT
                TIG Moderator
                last edited by

                @rich-o-brien
                I'm thinking of adding a closing option.
                'Save as Materials Collection...'
                That has 'Yes|No'
                Obviously 'No' does nothing.
                'Yes' exports the new textured-materials into a folder chosen from a dialog - the default folder is the Materials folder set up in users Preferences, with a suggested subfolder named after the folder-name where the seed-images were. The user can name another folder, pick another folder etc. If it's a new folder then it's made, otherwise the folder is chosen. The exported collection is separated into Materials and PBR-Materials subfolders...
                I'd appreciate your ideas before I start coding ??

                TIG

                1 Reply Last reply
                Reply Quote 2
                • Rich O BrienR
                  Rich O Brien Moderator
                  last edited by

                  Works great!
                  One thing I spotted is that if the term basecolor is missing from the color image TextImporter will apply a color value to the material but ignore the user's dimension and default to 2.5cm x 2.5cm.

                  Adding 'Save as Collection' would be a good addition.

                  Download the free D'oh Book for SketchUp πŸ“–

                  1 Reply Last reply
                  Reply Quote 0
                  • TIGT
                    TIG Moderator
                    last edited by TIG

                    I can import a PBR with the suffix '_Color' and the size stays fixed at say my setting of 1m x 1m ?
                    The current [case insensitive] suffixes processed in order are: xxx_???
                    basecolor base_color base-color albedo albedo_srgb color diffuse diff col col_srgb bc base
                    I thought this caught most...
                    So what is yours ?
                    Can you perhaps give me one example PBR set to test...

                    TIG

                    1 Reply Last reply
                    Reply Quote 0
                    • Rich O BrienR
                      Rich O Brien Moderator
                      last edited by

                      Maybe I didn't explain myself correctly.

                      In the outlier case where you have a folder with PBR textures but the basecolor, color, diffuse etc 'flag' is missing eg. asphalt-01.png

                      In this instance your extension still imports the other maps and assigns a dimension 2.5cm x 2.5cm despite the dialog calling for 100cm x 100cm.

                      It's not really an issue with the extension more a user issue. But it was something I noticed.

                      What interesting is that the material created gets a colour value that can't be changed because it expects an image in the texture slot. You get a greyed out panel.

                      Again, it's an observation rather than a bug. Extension works great when the user has the expected PBR maps.

                      Download the free D'oh Book for SketchUp πŸ“–

                      1 Reply Last reply
                      Reply Quote 0
                      • TIGT
                        TIG Moderator
                        last edited by TIG

                        Here's v1.3
                        https://sketchucation.com/pluginstore?pln=TextureImporter
                        It traps for missing 'xx_basecolor' file for PBR sets - using the unsuffixed 'xx' image if available.
                        Avoiding messing up selected image XY size.
                        It also offers the option to export the new materials into a collection - splitting SKMs into Material and PBR-Material subfolders as appropriate.

                        TIG

                        1 Reply Last reply
                        Reply Quote 1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better πŸ’—

                        Register Login
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement