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!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    [Plugin] Export 2d with Alpha

    Scheduled Pinned Locked Moved Plugins
    148 Posts 42 Posters 118.7k Views 42 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.
    • thomthomT Offline
      thomthom
      last edited by

      That baffles me. I have no idea why this happens. Exactly the same works for me... ❓ πŸ˜• ❓


      test1.zip

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

      1 Reply Last reply Reply Quote 0
      • GaieusG Offline
        Gaieus
        last edited by

        Well, sigh... I can always use LO for exporting png's with transparent background...

        Maybe it's an XP thing?

        Gai...

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

          I don't know. Haven't got an XP machine at hand right now. Could be an SketchUp bug...

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

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            Well, you know where to report it (and who has all sorts of machines). I have no clue about the ins and outs of ruby. I could never make a proper bug report on plugins!
            πŸ˜„

            Gai...

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

              Just to narrow it down to a simple test case - can you try this one-liner?

              <span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_view</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">write_image</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">{</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">filename</span><span class="syntaxkeyword">=></span><span class="syntaxstring">'C;\test.png'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">width</span><span class="syntaxkeyword">=></span><span class="syntaxdefault">640</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">height</span><span class="syntaxkeyword">=></span><span class="syntaxdefault">480</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">antialias</span><span class="syntaxkeyword">=></span><span class="syntaxdefault">false</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">transparent</span><span class="syntaxkeyword">=></span><span class="syntaxdefault">trueΒ </span><span class="syntaxkeyword">}</span><span class="syntaxdefault">Β </span><span class="syntaxkeyword">)</span><span class="syntaxdefault">Β </span>
              

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

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                Try what? Enter the ruby console? I get this:


                test.png

                Gai...

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

                  If you set the background color to be 0,0,0 [pure-black] then the image will export with a transparent background in place of the 'pure-black', when you open it in Gimp or a web-browser etc you will see there is no background... πŸ€“test.png

                  TIG

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

                    @tig said:

                    If you set the background color to be 0,0,0 [pure-black]

                    Should not need to do this - I export with the default SketchUp Sky - still I get transparency.

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

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

                      @thomthom said:

                      @tig said:

                      If you set the background color to be 0,0,0 [pure-black]

                      Should not need to do this - I export with the default SketchUp Sky - still I get transparency.

                      That's not entirely correct... iIF you have a Sky and/or Ground ticked in your Style you will not get a transparent background to the png for the areas that these parts 'cover'.
                      BUT if you have the Sky AND Ground un-ticked in your Style then I agree - the color of the Background itself is irrelevant because whatever it is when the have the png export transparency set 'on' that background is made 'transparent' - no matter what color it is - white, black, magenta or anything else!

                      TIG

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

                        I get Transparency with Sky on. But not with Ground.

                        ...Gaieus... do you have the Ground on?

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

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

                          Correction: Sky do appear when exporting. I just always tried with a view looking down so no sky was visible.

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

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

                            @thomthom said:

                            I get Transparency with Sky on. But not with Ground.

                            ...Gaieus... do you have the Ground on?

                            I find that both sky and ground obscure my png's background transparency ?
                            I need to have sky and ground both off to have a fully transparent background in the png, BUT even then shadows on the ground-pane will show up floating is space so you need to have that option off too...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • FrederikF Offline
                              Frederik
                              last edited by

                              Don't know why I haven't seen this gem before today... 😳

                              Awesome, Thomas...!
                              Thank you SO much...!!

                              Cheers
                              Kim Frederik

                              1 Reply Last reply Reply Quote 0
                              • GaieusG Offline
                                Gaieus
                                last edited by

                                Hi Thom and TIG; you are right, when I turn ground and sky off, I can export with transparency.

                                And now I am banging my head to the wall (where is that smiley?
                                http://twilightrender.com/phpBB3/images/smilies/wall.gif
                                )

                                This is exactly the way you need to set your style to be able to export your png with transparency!

                                Gai...

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

                                  Yea - we need that smiley.

                                  This has been one for my Duh! list as well.

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

                                  1 Reply Last reply Reply Quote 0
                                  • GaieusG Offline
                                    Gaieus
                                    last edited by

                                    Thanks anyway (and again) for the plug however. I do not know if there is a solution in ruby but if not, I guess you have already updated the info on the first page.

                                    Maybe a solution to temporarily disable ground and sky?

                                    Gai...

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

                                      @gaieus said:

                                      Maybe a solution to temporarily disable ground and sky?

                                      Maybe the user want either one on/off...

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

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

                                        Thom,

                                        This is exporting for me? Ground/Sky off, BG is White and adding .png to file name when exporting but no joy! I know i've missed something here but re-reading the thread i can't pin it down?

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

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

                                          Can you post this joyless model? And/or screenshot?

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

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

                                            test.png

                                            Just a warehouse model for testing before you know what πŸ˜‰

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

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 3 / 8
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement