sketchucation logo sketchucation
    • 登入
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    [Plugin] Blackout

    已排程 已置頂 已鎖定 已移動 Plugins
    23 貼文 15 Posters 23.4k 瀏覽 15 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • thomthomT 離線
      thomthom
      最後由 thomthom 編輯

      This plugin was made on request from Free Agent which wanted a script that turned all materials black so he could then make one material white and render out a material mask for post processing. Hence the name.

      I later added another function that picked the material of a selected and turned that white and the rest black, just to make it a little bit more quicker to set it up.

      [flash=600,338:1rfif4p5]http://www.youtube.com/v/VWs3zHMmX8Y[/flash:1rfif4p5]

      NOTE! Run this script on a backup file!!!
      This script removes all textures, and opacity and modifies the colour. While the operation is undoable it's all to easy to accidentally save the file. (I press Ctrl+S regularly as a habit.)

      Plugin is operated from the Plugin menu. "Blackout" and "Mask Material"

      Tested against SU6 & 7


      Update 1.2.0:
      Free Agent had a got idea: use the current material instead of the selected object's material. Added this new function.

      Link Preview Image
      SketchUp Plugins | PluginStore | SketchUcation

      SketchUp Plugin and Extension Store by SketchUcation provides free downloads of hundreds of SketchUp extensions and plugins

      favicon

      (sketchucation.com)

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

      1 條回覆 最後回覆 回覆 引用 0
      • StinkieS 離線
        Stinkie
        最後由 編輯

        Thanks alot!

        1 條回覆 最後回覆 回覆 引用 0
        • CadFatherC 離線
          CadFather
          最後由 編輯

          ThomThom you're rolling now!

          Thanks! 😄

          1 條回覆 最後回覆 回覆 引用 0
          • free agentF 離線
            free agent
            最後由 編輯

            👍 🤓

            http:i167.photobucket.comalbumsu143FreeAgent84bug.gif

            1 條回覆 最後回覆 回覆 引用 0
            • plot-parisP 離線
              plot-paris
              最後由 編輯

              sounds cool and useful 👍

              immediately the 'Greyscale' by Jim Foltz springs to my mind.
              the script turns all colours to greyscale. then you can one or several textures to be changed back to colour to make them stand out more clearly. somehow Jim managed to preserve all the colour information, the script lets you toggle between 'Greyscale-' and 'Colour-mode'.
              that would be the perfect thing to take your script to the next step - make the changes undoable...

              1 條回覆 最後回覆 回覆 引用 0
              • thomthomT 離線
                thomthom
                最後由 編輯

                The original colour could be stored in an attribute dictionary. But I'm not sure about textures. I didn't find a way to turn them off. Only remove them. Will have a look at Jim's script and see if he handles textures. I've not spent much time on this. Just quickly whipped it together while working on some other stuff.

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

                1 條回覆 最後回覆 回覆 引用 0
                • K 離線
                  kwistenbiebel
                  最後由 編輯

                  Cool script thomthom! 👍
                  Very useful. Thank you.

                  1 條回覆 最後回覆 回覆 引用 0
                  • B 離線
                    bianhai
                    最後由 編輯

                    👍
                    Thank you thomthom.

                    1 條回覆 最後回覆 回覆 引用 0
                    • GaieusG 離線
                      Gaieus
                      最後由 編輯

                      Tom,

                      In SU you can undo an operation after saving, too. Does it not work in this case?

                      Gai...

                      1 條回覆 最後回覆 回覆 引用 0
                      • thomthomT 離線
                        thomthom
                        最後由 編輯

                        I suppose so. But I make the warning just in case as there isn't any built in restore in the function. Also, with V-Ray for SketchUp I've experienced that it can some times interfere with the undo operations of scripts. Especially if it manipulates materials.
                        It's a better safe than sorry warning. 😉

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • S 離線
                          sepo
                          最後由 編輯

                          This is useful. Thanks.

                          1 條回覆 最後回覆 回覆 引用 0
                          • JClementsJ 離線
                            JClements
                            最後由 編輯

                            ThomThom:

                            I think this might have been discussed a year or two ago.

                            I make masks for postprocessing by turning all my layer colors to black and turn on Color By Layer in the Layer Manager. This eliminates messing with the material colors directly. I hardly ever organize my layers via a color scheme so this method is relatively fast to do and doesn't screw up the model. Also, SU shadows are exported with their greyscale value which can be interpreted in post processing as semi-transparent.

                            I often create a style for Color by Layer in my model and assign it Scene named "MASK" which only remembers style parameters. I can then use this scene to on toggle Color by Layer for any of the other scenes.

                            My workflow would be to click on any Camera view or Scene and select the "MASK" Scene, and export the current view as your mask for post processing.

                            Now IF Ruby can remember and store a model's existing Layer Colors and later restore them, then a script to temporarily change the model's layer colors to black, turn on Color by Layer, queue the File > Export > 2D Graphic dialog and then restore the layer colors after printing, might be pretty quick and handy.

                            John | Illustrator | Beaverton, Oregon

                            1 條回覆 最後回覆 回覆 引用 0
                            • thomthomT 離線
                              thomthom
                              最後由 編輯

                              Interesting.
                              I made this script very very quickly. I might revise it and implement some more stuff suggested. Appears that there was more use for this than I thought. And there's some good ideas here.

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

                              1 條回覆 最後回覆 回覆 引用 0
                              • MALAISEM 離線
                                MALAISE
                                最後由 編輯

                                THanks Thomthom

                                Back to the forum after a while and discovering new rubies 😄 😄

                                MALAISE

                                La Connaissance n'a de valeur que partagée

                                1 條回覆 最後回覆 回覆 引用 0
                                • M 離線
                                  me3mar
                                  最後由 編輯

                                  can you please show some pics on how to use, and what for ?
                                  that would be great
                                  thanks in advance

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • S 離線
                                    sepo
                                    最後由 編輯

                                    Would it be possible to include transparency of .png . Give you an example. If you for instance have a .png tree in front of the material than tree should go black instead of rectangle. It would make life much easieer if possible.
                                    Thanks

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • thomthomT 離線
                                      thomthom
                                      最後由 編輯

                                      Nope. Can't read transparency info. If I had access to the V-Ray maps I could have replaced the texture with the alpha texture - but I don't have access to that either.

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • S 離線
                                        sepo
                                        最後由 編輯

                                        Thanks for the reply.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • xiombargX 離線
                                          xiombarg
                                          最後由 編輯

                                          This is actually another really good plugin for character and product design and a standard feature of high end modelling programs. Animation modelling programs implement this feature to help the designer get a better idea of a characters posture and demeanor which subtly reflects their personality. Product designers also use it for similar purposes.

                                          Probably is a good idea to do a quick save before using it though, just in case.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • onzkiO 離線
                                            onzki
                                            最後由 編輯

                                            Hi I know it's an old thread. Is there a way to customize the color, instead of black maybe something else, like red or any RBG code? Thanks!


                                            [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement