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

    [Plugin] Random Painter (Updated March 9th, 09)

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

      Very more confortable for the color choice! ☀

      About the greeble, there is now a message between each new generations: is that normal? ❓


      test.jpg

      Frenchy Pilou
      Is beautiful that please without concept!
      My Little site :)

      1 條回覆 最後回覆 回覆 引用 0
      • Chris FullmerC 離線
        Chris Fullmer
        最後由 編輯

        @thomthom said:

        With all these various plugins, it should be possible to make a City Generator script which automates the process you just did. What would be more interesting is if there was a script to generate streets in a non-rectangular pattern. Seeing how nearly every city is more organic laid out.

        THat's precisely what my plan is Thom. My decision to get into scripting came immediately after a marathon weekend of modeling the entire city of San Jose (in California). I thought there needs to be a better way to make filler buildings. Thats why I started with the greeble script. I'm hoping to grow it into more of a building generator.

        But I had not considered using the colors like this. Its really quite nice. I'm impressed with how everyone is using it! I wish I could get the custom colors to remember what they were set at. But that seems impossible at the moment.

        @Frenchy - sorry aboutt he greeble popping up a number message everytime you greeble. That was part of my testing and I thought I clread it out before uploading. So I uploaded another version of it to get rid of that annoying pop up if you'd like. Thanks for your patience!

        Chris

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

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

          @chris fullmer said:

          THat's precisely what my plan is Thom. My decision to get into scripting came immediately after a marathon weekend of modeling the entire city of San Jose (in California). I thought there needs to be a better way to make filler buildings. Thats why I started with the greeble script. I'm hoping to grow it into more of a building generator.

          I'm in particular interested in working out an algorithm to generate a streetmap. I'm thinking that a script would take a face and generate streets represented by single lines. Now it should be possible for the greeble script to split up the faces in between the streets and construct buildings. I hope to find some resources on the internet on creating procedural formulas, which a person without a math doctor degree can understand.

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

          1 條回覆 最後回覆 回覆 引用 0
          • Chris FullmerC 離線
            Chris Fullmer
            最後由 編輯

            @thomthom said:

            I hope to find some resources on the internet on creating procedural formulas, which a person without a math doctor degree can understand.

            Thats the key, isn't it?! I'm surprised at how complex some things are to do.

            Chris

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

            1 條回覆 最後回覆 回覆 引用 0
            • E 離線
              Ecuadorian
              最後由 編輯

              Ok, this is what I did with Random Painter + Random Push Pull + Greeble. As I just need Random Painter as a placeholder for different materials, I just entered sucessive values: Green 10, Green 20, Green 30, etc., and in the second example Red 20, Red 40, Red 80. Then I replaced those colors with materials I had prepared, and which I am attaching here.

              First, I made a 1Km x 1Km square, and divided it with SCF Toolbar's Greeble several times. Then I Protruded it 100m with offset 4-12m.
              High_rises03.jpg

              I copied the upper faces and deleted the rest. Then I divided those faces even more and again, protruded them 100m with offset 1-3m, again kept only the upper faces and procedded to "random paint" them with Green values from 10 through 110. Why Green? Because that's my favorite color.
              High_rises07.jpg

              I then proceeded to replace those colors with the 11 high-rise textures I had downloaded from cgtextures.com (I had resized them to 12 pixels height (EDIT: 120 pixels) to keep the file manageable). I just used the paint bucket + Shift. I am attaching that material library as a zip file so anyone can use it.
              High_rises08.jpg

              I then made three concentric groups of those faces. To make the groups, I changed to a Top view, rotated 45 degrees and used right-to-left marquee and Right click > select > all connected. For the outer ring, I used random push-pull 45/9m. I also re-pasted the faces from the first step and pushed them 20cm to act as sidewalks.
              High_rises11.jpg

              The middle ring was random pushed/pulled 90/18m, and after this graphic, the inner group was random PP 180/36m.
              High_rises12.jpg

              I then changed to Parallel projection > side view and carefully selected all the roof faces with a left-to-right marquee. After that, I "random painted" them with Red values 20, 40 and 80.
              High_rises13.jpg

              Finally, I replaced those red colors with roof textures. I then re-built the 1Km x 1Km square again to represent the streets. That's it! Greeble City made possible thanks to your "Random Painter"!
              High_rises14_b.jpg

              This exercise was inspired by a $4,000 program for "parametric" generation of cities I saw on the web. I just wanted to prove that you can "random generate" cities in SketchUp, too. Thank you a lot, Chris, for delivering the missing link to make this possible.


              SketchUp materials. Load them in the Material window.

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

              1 條回覆 最後回覆 回覆 引用 0
              • tbdT 離線
                tbd
                最後由 編輯

                some starting points - http://www.vision.ee.ethz.ch/~pmueller/wiki/CityEngine/Documents

                SketchUp Ruby Consultant | Podium 1.x developer
                http://plugins.ro

                1 條回覆 最後回覆 回覆 引用 0
                • E 離線
                  Ecuadorian
                  最後由 編輯

                  If someone has already worked on a "city generator" and makes it available for free, It wouldn't hurt to try and convince him to join the SketchUp Community and adapt those algorithms for SketchUp (either commercially or for free), share his source code, or provide an output in a 3D format SU can import. Check these efforts:

                  This guy wrote a city generator include file for POV Render. The zip download includes the city script (which you can peruse with any text editor), some pre-made buildings in .obj format, and some documentation in .txt format:
                  http://www.geocities.com/ccolefax/citygen.html

                  And here's a way more sophisticated free city generator, scripted for Softimage's XSI (Now part of Autodesk):
                  http://www.paoloemilioselva.it/citygenerator.html

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

                  1 條回覆 最後回覆 回覆 引用 0
                  • EarthMoverE 離線
                    EarthMover
                    最後由 編輯

                    My internet goes down for a week and so many great things happen on this site!

                    Thanks so much Chris. I've been using 3DS Max a lot this week and one of the things I was playing around with quite a bit is the "Material by Element" modifier. When a Multi/mixed material is applied to an object, the modifier will randomize the various sub materials among the different elements nested within the object. It also allows you to add a percentage of each sub material that the modifier will apply.

                    Max has material ID numbers which allow for the connection between materials and modifiers to be more fluid. I was wondering if there were a way via ruby to perhaps set the Random Painter script to call materials based on a naming function. Let's say I wanted to apply 5 random textures, or 5 variations of a single texture to group of faces. If those materials were named as Random_1, Random_2, etc, could the scripts be modified to called those textures and randomly apply them to the desired faces?

                    3D Artist at Clearstory 3D Imaging
                    Guide Tool at Winning With Sketchup
                    Content Creator at Skapeup

                    1 條回覆 最後回覆 回覆 引用 0
                    • Chris FullmerC 離線
                      Chris Fullmer
                      最後由 編輯

                      Hi Adam, just to clarify for my brain, you want essentially the same functionality but with image textures. Is that the idea? Or is it more in depth than just that?

                      BTW, I don't know how to work with textures, so it will take me a little while to figure it out. But it should be possible.

                      Chris

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

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

                        Chris, I think what he wants is to be able to use existing material instead of the plugin creating random new ones. You specify which materials you want the plugin to use, and the plugin will use them to paint faces randomly.

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • E 離線
                          Ecuadorian
                          最後由 編輯

                          That would be really cool... Just like Windowizer 3, where a drop-down menu lets you choose materials for each part!

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

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

                            You can also choose your colour values using this free utility from NOVOSIB:

                            http://www.linxexplorer.com/colorpicker.html

                            Visual Color Picker is very easy to use and powerful RGB-HSV-HSL-CMYK-HEX color selector. The program allows you to easily capture color value from any position of the screen even if program does not have input focus. The program has small screen capture preview area. By clicking associated button, you will get the associated RGB value in the dialog. The RGB color is automatically translated to RGB, HSV, CMYK and HTML HEX values. The program has standard and custom color tables. Text-background preview allows you to see how two colors will look next to each.

                            I use it all the time 🤓

                            1 條回覆 最後回覆 回覆 引用 0
                            • pilouP 離線
                              pilou
                              最後由 編輯

                              No Pantone/ RAL format? 😉

                              Frenchy Pilou
                              Is beautiful that please without concept!
                              My Little site :)

                              1 條回覆 最後回覆 回覆 引用 0
                              • Chris FullmerC 離線
                                Chris Fullmer
                                最後由 編輯

                                Hey, thats a great tool. I'll have to d/l it and play with it when I get home,

                                Chris

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

                                1 條回覆 最後回覆 回覆 引用 0
                                • EdsonE 離線
                                  Edson
                                  最後由 編輯

                                  chris,

                                  just for your information (i am not sure there is something you can do): having wxSU installed causes conflicts with windowizer4 (the dialogue appears blank) and immediate crashes after invoking it.

                                  regards.

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

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • Chris FullmerC 離線
                                    Chris Fullmer
                                    最後由 編輯

                                    Hi Edson, thanks for the note. I saw the post in Rick's windowizer script. Hopefully it gets worked out. I suppose I could also provide a version of random painter that does not require wxsu again.

                                    Chris

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

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • EdsonE 離線
                                      Edson
                                      最後由 編輯

                                      @chris fullmer said:

                                      Hi Edson, thanks for the note. I saw the post in Rick's windowizer script. Hopefully it gets worked out. I suppose I could also provide a version of random painter that does not require wxsu again.

                                      Chris

                                      i thought it would not work without it. 😕

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • Chris FullmerC 離線
                                        Chris Fullmer
                                        最後由 編輯

                                        Well, it is the nice User Interface that comes from wxsu. So I can remove wxSU and make pop up dialog boxes that require you to type in RGB values. Its more tedious than just clicking on the color you want. But it works fine. It is how the script worked at first. So if you'd like, I could re-write it and put the old inputbox version back. I'll just have 2 versions available for download. One with a nice GUI and one without.

                                        Chris

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

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • EdsonE 離線
                                          Edson
                                          最後由 編輯

                                          i think it is a good idea and i would thank you for that. but i suggest you wait a few days to see if rick comes up with a solution to this problem.

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

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • A 離線
                                            Alex Jenyon
                                            最後由 編輯

                                            Great idea for a script - thank you! Should come in very useful for a bit of mattepainting.

                                            I'm getting all kinds of errors with wxSU when sketchUP loads, which means that I haven't got 'randompainter' to run at all yet (though it's in the menu bar).

                                            Obviously me having problems with wxsu is nothing to do with you at all 😳 , but until I can work out what's happening a version that doesn't require wxSU to run would be brilliant.

                                            Thanks for all your work.

                                            AJ

                                            Concept artist / Matte painter
                                            www.aj-concepts.net

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

                                            Advertisement