• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

How do I find a problematic Sketchup Material?

Scheduled Pinned Locked Moved Developers' Forum
16 Posts 7 Posters 9.9k Views
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.
  • H Offline
    halroach
    last edited by 6 Apr 2009, 06:34

    Hello

    I am using Maxwell Render along with Sketchup. Every now and then I get the following type of error within Maxwell Render:

    ERROR; - File "D;/metal/metal-alucobond-white-r.jpg" has not been found. Render cannot continue.
    
    

    I am unable to continue rendering until the texture is either miraculously found, or if I delete the problematic material from Sketchup.

    The sketchup material is linking to a D drive (which is a DVD drive), meaning it is not a texture that I created. It is probably a material that came with one of the hundreds of components that I imported into my model.

    The Problem IS:
    I cannot find which sketchup material is causing the problem! I have a model with 40-50 materials in it. I have gone over each of the 40-50 materials to see if they are linked to a material by that name "metal-alucobond-white-r.jpg" but it doesn't appear anywhere!
    If I delete all the materials in the model the problem will be solved! but then I have to reassign materials... that is not a good solution!
    In the passed I have a problematic texture called grass.jpg. so I deleted all the green and grass materials until the problem was solved. But I can't seem to find a straight forward way to find the material.

    I tried generating a report to see if anything might be listed in there, but the model is too heavy, and the report just jams sketchup.
    generating a report with a simple model doesn't seem to fill in textures in any case.

    Anyone have a solution?
    Maybe there is a way through a ruby script, to list all materials and linked textures within a model?

    Good Day

    FlexTools - Super Quick Windows, Doors, Slats...

    1 Reply Last reply Reply Quote 0
    • E Offline
      Ecuadorian
      last edited by 6 Apr 2009, 07:24

      Have you tried purging the model?

      I don't use Maxwell, but perhaps this could work:

      Create a metal-alucobond-white-r.jpg file with MS Paint, and burn it to a CD inside a folder called metal.

      -Miguel Lescano
      Subscribe to my house plans YouTube channel! (30K+ subs)

      1 Reply Last reply Reply Quote 0
      • H Offline
        halroach
        last edited by 6 Apr 2009, 07:52

        @ecuadorian said:

        Have you tried purging the model?

        I don't use Maxwell, but perhaps this could work:

        Create a metal-alucobond-white-r.jpg file with MS Paint, and burn it to a CD inside a folder called metal.

        1. I've tired purging. It doesn't help
        2. That will work, but it's not worth the trouble, since errors like this happen quite often!

        The best solution is to find the problematic material, but how!?

        FlexTools - Super Quick Windows, Doors, Slats...

        1 Reply Last reply Reply Quote 0
        • E Offline
          Ecuadorian
          last edited by 6 Apr 2009, 08:26

          Just found this post... might give you a clue.

          301 Moved Permanently

          favicon

          (www.sketchucation.com)

          -Miguel Lescano
          Subscribe to my house plans YouTube channel! (30K+ subs)

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 6 Apr 2009, 09:00

            Open the Ruby Console, type in

            
            Sketchup.active_model.materials.each { |m| puts m.name + ' - ' m.texture.filename }
            
            

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

            1 Reply Last reply Reply Quote 0
            • H Offline
              halroach
              last edited by 6 Apr 2009, 09:14

              @thomthom said:

              Open the Ruby Console, type in

              
              > Sketchup.active_model.materials.each { |m| puts m.name + ' - ' m.texture.filename }
              > 
              

              I am not very familiar with Ruby Code. If I'm supposed to add something, substitue something let me know.
              Typing in the above code as is gives an error.

              
              Error; #<SyntaxError; (eval);131; compile error
              (eval);131; syntax error
              Sketchup.active_model.materials.each { |m| puts m.name + ' - ' m.texture.filename }
              

              What am I supposed to see after the code is executed?

              FlexTools - Super Quick Windows, Doors, Slats...

              1 Reply Last reply Reply Quote 0
              • T Offline
                thomthom
                last edited by 6 Apr 2009, 09:34

                Sorry, my bad. Didn't check the code first.
                This works:
                Sketchup.active_model.materials.each { |m| puts m.name + ' - ' + m.texture.filename if m.texture != nil }

                It will return a list of textured materials with their name and the filepath.

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

                1 Reply Last reply Reply Quote 0
                • H Offline
                  HPW
                  last edited by 6 Apr 2009, 09:49

                  Nice code snippet!

                  But why are there material names in different format:
                  <.....>
                  [.....]
                  .....

                  And is this the only possibility to see filepath?
                  In SU material editor I only see filename.
                  But when I get a SKP from other users there is a embedded material where the path does not exist on my PC.

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    thomthom
                    last edited by 6 Apr 2009, 10:09

                    < and [ are just some naming conventions. I think some of SU's default materials uses these characters.

                    I don't know of any other means to find out the file path.

                    Some times there isn't a filepath. It's just the name.

                    SU always embed the texture into SU. But some times stores the location of the original texture. Not sure why though. But render engines some times uses that path to load the textures. Since SU downsamples the images the original might be a higher resolution. But, as I've noticed with V-Ray, if the file doesn't exists it'll return an error instead of falling back to extracting the embedded image.

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

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      halroach
                      last edited by 16 Apr 2009, 06:22

                      Thank you Thomthom!
                      Your script worked very well and it helped me re diagnose my problem.
                      Apparently Sketchup wasn't the problem maker, all textures were well defined and linked.

                      For those who are interested, the problem was (and still is) as follows:
                      I had a material in my model named '<white>' - which when exporting to Maxwell - using 'Auto MXM conversion' - was pointing to a problematic MXM - a material within my Maxwell material libraries (which is apparently called '<white>'!?!?).
                      I went through a lot of trouble to find which material IN SKETCHUP was causing the problem, and I am currently in correspondence with the Maxwell Support Team to figure out a way to quickly find the problematic MXM in my libraries, since I don't have any MXM called white, but rather a bunch of MXMs that include white in their name.

                      So, a temporary solution to get the render going is to delete the material called <white> in the sketchup model, and redefine parts of the model that were affected. How to find that <white> (or any other texture for that matter) was making the problem, we have yet to discover...

                      FlexTools - Super Quick Windows, Doors, Slats...

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        silver_shadow
                        last edited by 16 Apr 2009, 11:13

                        hi there...nice script...any way to make a button for this, then we dont have to copy and paste every time, thanx

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by 16 Apr 2009, 11:24

                          @unknownuser said:

                          So, a temporary solution to get the render going is to delete the material called <white> in the sketchup model, and redefine parts of the model that were affected. How to find that <white> (or any other texture for that matter) was making the problem, we have yet to discover...

                          You could always go into the SUp material-browser, model-tab, pick the problem material's icon, edit and then rename <white> as <HALwhite> (or whatever) to avoid the glitch after export... That way the parts of the model aren't affected at all as their colour etc stays as it was - only that material's name has changed to protect the innocent/guilty...

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • H Offline
                            halroach
                            last edited by 16 Apr 2009, 11:45

                            @tig said:

                            You could always go into the SUp material-browser, model-tab, pick the problem material's icon, edit and then rename <white> as <HALwhite> (or whatever) to avoid the glitch after export... That way the parts of the model aren't affected at all as their colour etc stays as it was - only that material's name has changed to protect the innocent/guilty...

                            Yep, that works too - sometimes!
                            I have played around with changing the problematic material's name. Some times it works sometimes it doesn't. I tried renaming to other names which include the word white, like '<White>XXX', and it still failed intermitently. Either I did something wrong, or actually having the string 'White' in the material name calls the problematic material in Maxwell... haven't recreated the problem yet.

                            FlexTools - Super Quick Windows, Doors, Slats...

                            1 Reply Last reply Reply Quote 0
                            • S Offline
                              silver_shadow
                              last edited by 16 Apr 2009, 12:05

                              this happened to me too when i tried importing to maxwell part by part from sketchup, thought it was going to be easier. It was a nightmare. I couldnt bring it all at once into maxwell(preferable way to go) my model was too big. And it kept telling me this material is already there, ignore or replace it and i chose ignore it, because its alreday there.Kinda got the same error messages when i try to render and ends up rendering just checkerboards.So i dont know if your model may be the same result of importing just bits and pieces to make up a full model.

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                thomthom
                                last edited by 16 Apr 2009, 12:09

                                @silver_shadow said:

                                hi there...nice script...any way to make a button for this, then we dont have to copy and paste every time, thanx

                                Yea. I'll see when I can squeeze it in.

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

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  skateboardtshirt
                                  last edited by 16 Aug 2018, 17:38

                                  I had a similar problem where I are getting this message every time I tried to save: "*** Problems were found that could not be fixed! *** The name for CMaterial (290526) is not valid". It would still let me save the file though. I was able to solve the problem by opening the materials window and hovering over each material to look at the name. I found 3 materials that somehow had blank names. After renaming those materials the problem went away.

                                  I don't know how those blank named materials got there in the first place though, I tried to recreate the problem but SketchUp won't let you name a material with a blank name.

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

                                  Advertisement