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

    ImageProfile script almost ready

    Scheduled Pinned Locked Moved Plugins
    29 Posts 9 Posters 6.1k Views 9 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.
    • R Offline
      RickW
      last edited by

      Almost ready to release - I expect by 4 June 2007 😄
      http://www.smustard.com/script/ImageProfile

      I need to provide a lot of background information about this one.

      First off, the only good way I found to accomplish the goal of outlining an image (without a lot of difficulty for the end user) was to have server-side processing of the image. The image is uploaded, preprocessed, returned to SketchUp for tracing, and erased from the server. As a result, the plugin requires SU 6 and an active internet connection, and script speed will be related to internet connection speed. Sorry, but that's just how it worked out. The good news is that with a high-speed connection and moderate file sizes, turnaround time is generally under 2 minutes per image.

      Second, there is a lot of potential for commercial users of this plugin (selling components created by this plugin). To be fair to high-volume commercial users, low-volume users, and myself, I decided the best way to do the price structure was on a per-image basis. In my part of the world, it's not uncommon for skilled SketchUp users to charge $20+ per hour. An experienced SketchUpper can take 15-30 minutes for a good image tracing job. That results in an image-to-component cost of $5 to $10. Even if you found cheap labor (like $8 per hour), that would be a cost of $2 to $4 per image-to-component. I kept the pricing at $2 or less per image, and there will be special-price sales. 😄 If you find fast, quality labor at less than $8 per hour, skip the plugin and use them!

      Third, as noted on the script's page, the two lower quality settings can cut off parts of the image due to the current algorithm. I'm working on a revised algorithm that avoids these problems. Meanwhile, the two higher quality settings are very good, and with SketchUp 6's improved speed, the higher edge count isn't as much of a drawback as in v5.

      Next, transparent PNG images work the best. Period. Non-transparent PNG's can work if the background is pure white, but you'll inevitably have white areas around your image. Don't use any other file type. Again, sorry, but that's just how it is.

      Finally, the bulk-processing mechanism is not yet perfected, and will be added later. If you anticipate high-volume usage, contact me, and I'll work with you.

      RickW
      [www.smustard.com](http://www.smustard.com)

      1 Reply Last reply Reply Quote 0
      • D Offline
        dylan
        last edited by

        Not sure if I fully understand exactly what it will do.
        So if I have a photo of a tree for example saved as a png, can I use this script to upload it and imageprofile will trace the tree, cut it out and create a component?

        Dylan

        http://dmdarchitecture.co.uk/

        1 Reply Last reply Reply Quote 0
        • R Offline
          RickW
          last edited by

          That's it! Trees, people, shrubs, anything that's an image and would be a candidate for a component, this is the script. SketchUp handles transparency for display, but not for shadows, so a tree (for example) looks great in the model - until the shadows are turned on and you have a rectangular shadow behind it! This will take care of cutting around the image so the shadows match the form of the image.

          Now you do have to remove the background portions of the image before uploading (the script works by differentiating between pixels with and without transparency), but it does remove the (tedious) process of tracing, positioning, scaling, and saving.

          RickW
          [www.smustard.com](http://www.smustard.com)

          1 Reply Last reply Reply Quote 0
          • R Offline
            RickW
            last edited by

            Here's a screenshot. The upload-process-save elapsed time was about 2-3 minutes.
            Model Stats:
            852 edges (at "high" quality trace)
            597 edges (at "medium-high" quality trace)
            366 edges (at "medium-low" quality trace)
            232 edges (at "low" quality trace)

            http://www.sketchucation.com/forums/scf/sas/Ruby/IPscreenshot1.png

            RickW
            [www.smustard.com](http://www.smustard.com)

            1 Reply Last reply Reply Quote 0
            • Didier BurD Offline
              Didier Bur
              last edited by

              Hi Rick,

              @unknownuser said:

              SketchUp handles transparency for display, but not for shadows

               :astonished:  :astonished:  :astonished: 
              

              I don't understand the difference with the simple tree (attached), which is a PNG with transparency ?

              http://www.sketchucation.com/forums/scf/sas/Ruby/tree.gif

              DB

              1 Reply Last reply Reply Quote 0
              • R Offline
                RickW
                last edited by

                If you view hidden edges (or check Model Info>Statistics), I think you'll find that the tree has already been traced. A PNG with transparency will not show proper shadows on its own (see attached image) - it must be traced.

                Imported image, exploded it to get shadows - face with image is highlighted. It is clearly transparent (can see axes behind it), but the shadows don't understand transparent images

                http://www.sketchucation.com/forums/scf/sas/Ruby/IPscreenshot2.png

                RickW
                [www.smustard.com](http://www.smustard.com)

                1 Reply Last reply Reply Quote 0
                • jujuJ Offline
                  juju
                  last edited by

                  I think it's a script I could use, bring it on Rick! 😄

                  Save the Earth, it's the only planet with chocolate.

                  1 Reply Last reply Reply Quote 0
                  • Didier BurD Offline
                    Didier Bur
                    last edited by

                    Sorry Rick, I didn't even noticed that effect. Should be a very useful tool then !

                    DB

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      RickW
                      last edited by

                      No problem, Didier. 😄
                      I hope it is useful to people.

                      RickW
                      [www.smustard.com](http://www.smustard.com)

                      1 Reply Last reply Reply Quote 0
                      • EdsonE Offline
                        Edson
                        last edited by

                        rick,

                        yes, it makes it possible for virtually any image to be turned into a component. look fwd to it.

                        edson

                        edson mahfuz, architect| porto alegre • brasil
                        http://www.mahfuz.arq.br

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          RickW
                          last edited by

                          Here is one of the golf bag components, at low accuracy setting - let me know what you think of the quality. High accuracy only gets better 😄

                          Low accuracy setting
                          http://www.sketchucation.com/forums/scf/sas/Ruby/golfbag-4-low.skp

                          RickW
                          [www.smustard.com](http://www.smustard.com)

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            RickW
                            last edited by

                            One of the biggest factors in the trace quality will be the image quality. If the transparent background isn't tight against the image, the trace won't look that good, even though the script will be accurate with what it is given.

                            RickW
                            [www.smustard.com](http://www.smustard.com)

                            1 Reply Last reply Reply Quote 0
                            • EdsonE Offline
                              Edson
                              last edited by

                              @rickw said:

                              Here is one of the golf bag components, at low accuracy setting - let me know what you think of the quality. High accuracy only gets better 😄

                              amazing quality. I just cannot wait to be able to use it. congratulations.

                              regards.

                              edson

                              edson mahfuz, architect| porto alegre • brasil
                              http://www.mahfuz.arq.br

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                RickW
                                last edited by

                                Testing is nearly wrapped up. PC users have reported success so far, with only temporary issues relating to connections or firewalls, or issues dealing with the image quality and how it affects the resulting trace. Working out a Mac issue right now.

                                There was some confusion in that the plugin will save the traced image as an external file that can be used as a component. Some users were expecting the component to be created in the current model. While I understand the usefulness of this, it is not likely due to the potential conflicts with existing model geometry. If I can find a way to do it, believe me - I will 😄

                                RickW
                                [www.smustard.com](http://www.smustard.com)

                                1 Reply Last reply Reply Quote 0
                                • N Offline
                                  not registered yet
                                  last edited by

                                  This looks great! Even though I don't use 2D components very often, the times I have had to trace a picture have been quite exasperating, not to mention less precise than your script. If my 2D component usage goes up much, I'll definitely be getting this!

                                  [birchins]

                                  1 Reply Last reply Reply Quote 0
                                  • jujuJ Offline
                                    juju
                                    last edited by

                                    brichins, it seems like they intend on having the script available for a "pay per view" use. I have my reservations about this.

                                    Save the Earth, it's the only planet with chocolate.

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      RickW
                                      last edited by

                                      Update: In testing, I discovered a bug internal to SketchUp that prevents ImageProfile from working on Mac, but things are fine on the PC version of SketchUp.

                                      I'm in the process of getting the script from testing version to final release version. Once that's done, I'll post an update. Or you can subscribe to the Smustard RSS feeds:

                                      News http://www.smustard.com/rss/news
                                      Newest Script http://www.smustard.com/rss/newscript
                                      Recent Scripts http://www.smustard.com/rss/scripts

                                      RickW
                                      [www.smustard.com](http://www.smustard.com)

                                      1 Reply Last reply Reply Quote 0
                                      • EdsonE Offline
                                        Edson
                                        last edited by

                                        @rickw said:

                                        Update: In testing, I discovered a bug internal to SketchUp that prevents ImageProfile from working on Mac, but things are fine on the PC version of SketchUp.

                                        is this final or are you looking for a way around it?

                                        regards.

                                        edson

                                        edson mahfuz, architect| porto alegre • brasil
                                        http://www.mahfuz.arq.br

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          dtrarch
                                          last edited by

                                          Hi Rick

                                          Golf bag works as advertised.
                                          Looks super.

                                          A suggestion for distribution is to offer
                                          minimum package of say $10-20.

                                          Less cost on paypal and better cash flow to you.

                                          Just a thought.

                                          Dave

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            RickW
                                            last edited by

                                            Edson: I will try to find a workaround to the Mac problem. It might end up being a Mac-specific download (not my preference), but we will see...

                                            Dave: Thanks for the feedback and the suggestion. I want people to be able to "kick the tires" for a minimal cost. I might work that into the download (get a free process or two), and then go with the packages.

                                            RickW
                                            [www.smustard.com](http://www.smustard.com)

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

                                            Advertisement