sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Exporting a texture from a material

    Scheduled Pinned Locked Moved Plugins
    29 Posts 15 Posters 37.9k Views 15 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.
    • Al HartA Offline
      Al Hart
      last edited by

      Did you try the texture_writer ruby script in this thread?

      I would expect it to work on the mac.

      • Also, have you tried reading the texture from the .skm file. You can open the file with WinZip and see the texture stored in the file.

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

      1 Reply Last reply Reply Quote 0
      • T Offline
        troyhome
        last edited by

        I tried the file in this thread- maybe it's not playing nice with some of the other ruby's i've got.
        I'll try looking at the .skm which i assume is somewhere on my computer 😄
        Thanks!

        IOviz.com
        SU Pro 2024 PC

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          Here is a carpet.skm file - located in the SketchUp Materials folder.

          carpet-skm.png

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • T Offline
            troyhome
            last edited by

            Thank you, Al- this will help tremendously!
            One thing i should note about the script is that when i do run it to export all materials, it appears as though something happens- as though there might be a window hiding that shows a save location or somethings- but then there is nothing. All i mean is- i wonder if the materials are saving to some hidden location?
            Oh well- i like the .skm approach- thanks again!

            IOviz.com
            SU Pro 2024 PC

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              Whats the matter with exportingas a 3ds file to get all the images out? I saw you said you didn't want to do that, but I didn't catch why? What do you mean by manually relinking?

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • T Offline
                troyhome
                last edited by

                Hi Chris,
                I just mean having to export the file on which i'm working just so i get the maps... manually relinking? I don't know what i was thinking about when i typed that... I've been linking maps to Maxwell materials for the last couple days- i imagine that made it into my post somehow- how embarrassing.

                IOviz.com
                SU Pro 2024 PC

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Artz_ab
                  last edited by

                  thank you, i will try it

                  1 Reply Last reply Reply Quote 0
                  • IneshtineI Offline
                    Ineshtine
                    last edited by

                    I'm a year an a half off on this topic, but if anyone cares, I have written a plugin to export all of the textures from your models. It's very fast and not coded in Ruby. It's freeware and you can get it from http://Raylectron.com

                    Please let me know how it works for you?

                    What? you haven't tried Raylectron yet?

                    1 Reply Last reply Reply Quote 0
                    • eidam655E Offline
                      eidam655
                      last edited by

                      hi, the raylecton exporter looks good, however, i would like to retain the plugin's functionality inside sketchup.

                      so far the mass-export does not work because of this:

                      Error; #<ArgumentError; wrong number of arguments (2 for 3)>
                      C;/PROGRA~1/Google/Google SketchUp 8/Plugins/rps_texturewrite.rb;25;in `export_texture'
                      C;/PROGRA~1/Google/Google SketchUp 8/Plugins/rps_texturewrite.rb;25;in `exportTextures'
                      C;/PROGRA~1/Google/Google SketchUp 8/Plugins/rps_texturewrite.rb;24;in `each'
                      C;/PROGRA~1/Google/Google SketchUp 8/Plugins/rps_texturewrite.rb;24;in `exportTextures'
                      C;/PROGRA~1/Google/Google SketchUp 8/Plugins/rps_texturewrite.rb;216
                      

                      i would love to fix this, but i'm not familiar with Ruby, let alone Ruby inside Sketchup. if anyone could have a look at this issue, i'd be very very glad...

                      I'm using SketchUp 2017, V-Ray 3.4

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

                        OR there's Didier's "Very Fast Texture Writer" http://forums.sketchucation.com/viewtopic.php?t=6386

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • IneshtineI Offline
                          Ineshtine
                          last edited by

                          rps_texturewrite.rb is not part of Raylectron, it's from Renderplus, so you may want to contact them.

                          The Raylectron texture exporter is very fast, and, you can select the format you want to save the images as, and where to save them, and, it's easier to use, with a nice GUI.

                          What? you haven't tried Raylectron yet?

                          1 Reply Last reply Reply Quote 0
                          • Al HartA Offline
                            Al Hart
                            last edited by

                            I got the same errors when trying to use rps_texturewrite.rb.

                            I fixed it and uploaded a new version into the first post in this thread.

                            Al Hart

                            http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                            IRender nXt from Render Plus

                            1 Reply Last reply Reply Quote 0
                            • Al HartA Offline
                              Al Hart
                              last edited by

                              @troyhome said:

                              Thank you, Al- this will help tremendously!
                              One thing i should note about the script is that when i do run it to export all materials, it appears as though something happens- as though there might be a window hiding that shows a save location or somethings- but then there is nothing. All i mean is- i wonder if the materials are saving to some hidden location?
                              Oh well- i like the .skm approach- thanks again!

                              In the newest version, I added a display of the file names of all textures saved, which will appear in the Ruby Console. That should help:

                              e.g.

                              Writing: c:\tmp/texture_test/F0.jpg

                              Al Hart

                              http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                              IRender nXt from Render Plus

                              1 Reply Last reply Reply Quote 0
                              • eidam655E Offline
                                eidam655
                                last edited by

                                thanks for the fix, but in the meantime i also found the plugin TIG linked, so it's settled...

                                i might download the new version of this plugin, just to see the difference in source code; might come handy 😄

                                I'm using SketchUp 2017, V-Ray 3.4

                                1 Reply Last reply Reply Quote 0
                                • dramachik27D Offline
                                  dramachik27
                                  last edited by

                                  Hello, I am new to sketchup and I am trying to use the program to create 3D models for a game. The issue I am having is when I export the model into Torque. We see all the colors I have applied but as for textures, they are all gone. Is there a way to change this outcome? 😄
                                  ~G

                                  1 Reply Last reply Reply Quote 0
                                  • thomthomT Offline
                                    thomthom
                                    last edited by

                                    What format are you exporting to?

                                    Thomas Thomassen — SketchUp Monkey & Coding addict
                                    List of my plugins and link to the CookieWare fund

                                    1 Reply Last reply Reply Quote 0
                                    • deaneauD Offline
                                      deaneau
                                      last edited by

                                      hi Al Hart, i would love if you change your plugin by reading the color name and than naming the textures. this would be cool

                                      thank you

                                      MADE, BORN AND LIVING IN BERLIN
                                      Big Thank You to all Programmers
                                      Some German words are so long that they have a perspective. M.Twain

                                      1 Reply Last reply Reply Quote 0
                                      • Al HartA Offline
                                        Al Hart
                                        last edited by

                                        Would you like to rename color only materials in SketchUp (not materials with textures) so the name matches the color (eg. RGB 255,0,0 becomes red), for common colors and the hex color for non-standard colors (e.g. RGB 100,200,100 becomes #64c864)

                                        One "problem" we found recently is that people don't call RGB 0,255,0 green - but rather call it lime- and call 0,128,0 green

                                        as in this chart:

                                        https://s-media-cache-ak0.pinimg.com/236x/f9/47/82/f94782af2fff3cdb9bef53556d989852.jpg

                                        Al Hart

                                        http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                        IRender nXt from Render Plus

                                        1 Reply Last reply Reply Quote 0
                                        • Al HartA Offline
                                          Al Hart
                                          last edited by

                                          or did you mean that you wanted to rename the material itself to match the texture name included in the material?

                                          Al Hart

                                          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                          IRender nXt from Render Plus

                                          1 Reply Last reply Reply Quote 0
                                          • Al HartA Offline
                                            Al Hart
                                            last edited by

                                            or did you want to automatically rename the textures stored in the material to match the name of the material itself.

                                            This gets tricky because the SketchUp material can have names like: a'b/c, while a'b/c would not be a legal name for the texture itself.

                                            Al Hart

                                            http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
                                            IRender nXt from Render Plus

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement