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!
    πŸ”Œ Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    [CityGen] User Selection of Building type

    Scheduled Pinned Locked Moved City Generator
    21 Posts 3 Posters 19.0k Views 3 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.
    • Chris FullmerC Offline
      Chris Fullmer
      last edited by

      I just tested color by layer and it does what I was hoping. It lets you quickly switch back and forth between the colors/materials assigned by the module and back into the color coded view.

      Can the layer color be controled through the API? I'll go check.

      I didn;t see it in the API. Is it possible in an attribute library attached to the layer object or something? I might only like this if it lets us change the colors through the API. Maybe its not the end of the world if we can't - as long as the user can change it in the layers menu maybe thats enough.

      Chris

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

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

        @chris fullmer said:

        Would it also be interesting to populate a global array (or not global if possible), maybe its an attribute library on the main model object. But populate arrays or libraries of say all blocks. So that instead of the core having to iterate over the entire model looking for "blocks", it already has a list that has been populated for it. Maybe that is redundant though because of all the coloring system. Maybe it just gets in the way. I haven't thought it through entirely (obviously).

        Since the DoubleCut plugin I'm very hesitant to keep references to SU elements. AdamB even warned me about that.

        We wouldn't have to loop through the whole model, we could just check the definition table.

        @chris fullmer said:

        Can the layer color be controled through the API? I'll go check.

        I didn;t see it in the API. Is it possible in an attribute library attached to the layer object or something? I might only like this if it lets us change the colors through the API. Maybe its not the end of the world if we can't - as long as the user can change it in the layers menu maybe thats enough.

        RenderingOptions['DisplayColorbyLayer']
        http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/renderingoptions.html

        I'm thinking a Toggle Construction mode could be useful to set up the Style correctly. Core feature?

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

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          When I think about buildings, I am beginning to think that they should be .skp files in the buildings folder. Then instead of drawing building using Ruby, you load the component, add the instance, rotate, and scale. They can still have custom attributes/contraints attached.

          Think of making them Dynamic Components which can then be manipulated via ruby after being placed. In fact, DC's are redrawn upon insertion in the model, and if it is programmed with some random methods, quite a lot of diversity can be obtained simply by inserting the same component.

          It would also make for a whole lot more building types because there are a lot more people who can draw a building than can program a ruby to draw one.

          Just a thought I had.

          Hi

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            @unknownuser said:

            RenderingOptions['DisplayColorbyLayer']

            I meant I was hoping to be able to control the color of each layer through the API so we could do it in our webdialogs. I don't think its possible though.

            @unknownuser said:

            I'm thinking a Toggle Construction mode could be useful to set up the Style correctly. Core feature

            Yeah, I think that would be nice. Could be a button in the toolbar.

            @unknownuser said:

            We wouldn't have to loop through the whole model

            Ok, as long as we don't do large loops through the model.

            And goodnight, its 1:26 here and I have been making Apricot Jam all night. I'm finally done and I'm going to bed!

            Chris

            Edit: Dude, Jim just posted. and its like 3:30 or 4:30 in the morning there. Are you just getting up or haven't been to bed yet?

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

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              I can't/don't sleep anymore.

              The down-side of color by layer is that the colors can not be set from a plugin.

              Hi

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

                @jim said:

                The down-side of color by layer is that the colors can not be set from a plugin.

                That's annoying... hm...

                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

                  @jim said:

                  I can't/don't sleep anymore.

                  Insomnia?

                  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

                    @jim said:

                    When I think about buildings, I am beginning to think that they should be .skp files in the buildings folder. Then instead of drawing building using Ruby, you load the component, add the instance, rotate, and scale. They can still have custom attributes/contraints attached.

                    That's an option. But that will limit their shape. If you have an irregular street layout you'll end up with irregular parcels and buildings. So some generation from scratch would be needed.

                    But if it's pre-fabricating buildings to they'll have more details then cut-out glue-to window/door and detailing components is also an option. That way you can generate the volumes and populate it with detail components.

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

                    1 Reply Last reply Reply Quote 0
                    • Chris FullmerC Offline
                      Chris Fullmer
                      last edited by

                      I see benefits both ways. What about leaving it so that its rubies that make the buildings, but what about one module that instead of making its own buildings, just loads building models from a directory. Or even multiple directories if people want to be able to subdivide that module into different building types.

                      Is that just overly - complex? I am imagining making it as simple as possible, but perhaps its just too much.

                      Chris

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

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

                        I had imagined that there's be building generator the made everything from scratch and then there's be ones that used Components to build buildings. All depending on what type of building you want.

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

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          Jim
                          last edited by

                          @chris fullmer said:

                          Is that just overly - complex? I am imagining making it as simple as possible, but perhaps its just too much.

                          I don't think it is overly complex. The control program would not have to know how the buildings are being added. What matters is that all Building types respond_to? a .build() method.

                          So the controller just calls the .build() method on any type of Building, and all Buildings must repond_to? the .build() call. But each type of Building will do something completely unique in its build method.

                          Hi

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

                            So building class should be based upon a Building class maybe?

                            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

                              Arg!!
                              You can't modify the material name via the API.
                              Nor can you delete a material.

                              With layers you can set the name. But then there's the problem of colour. Guess the user have to manage the colours completely. ...but I'd rather have different materials per street/building type than a layer...

                              I saw that VfSU uses some hack to work around renaming and deleting materials. They replace the existing with a new material and then apply all unused materials to a dummy group before they purge the materials. ...I don't want to use such a hack...

                              grumble

                              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

                                With the good quality selection of tiling building textures over at http://www.cgtextures.com/ it would be very cool to have a building generator that let you generate building with different textures.

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

                                1 Reply Last reply Reply Quote 0
                                • Chris FullmerC Offline
                                  Chris Fullmer
                                  last edited by

                                  Can we package those materials ourselves? Or are you thinking more like just make a generator that will place any specified material onto the walls?

                                  Chris

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

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

                                    Dunno if we can repackage it... but looking at them just reminded me of this project again and I had some ideas flying past.

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

                                    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