• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

[Plugin] Tree generator v0.2

Scheduled Pinned Locked Moved Plugins
36 Posts 20 Posters 86.4k Views
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.
  • A Offline
    a4chitect
    last edited by 13 Apr 2008, 16:42

    Because I haven't touched this for a long time, I release this for somebody to build upon and probably make it into something usable

    could be used as a starting point in developing a recursive growth script of any type

    lsystem.png

    ideas: the tree is not very realistic now (there have to be branchings without all branches going in different directions - the main branch should go on - gradually getting smaller)

    it should be fairly easy to make UI, there are few constants in the script now (number of branchings, generations, obstacle-avoiding toggle)

    another easy thing is to add thickness to the branches - someone eager to learn ruby could be able to achieve this as his first project?


    12.04.2008 v0.2

    1 Reply Last reply Reply Quote 0
    • I Offline
      ilay7k
      last edited by 13 Apr 2008, 17:04

      great! ๐Ÿ˜

      Similar http://www.algorithmicbotany.org/virtual_laboratory/

      1 Reply Last reply Reply Quote 0
      • A Offline
        a4chitect
        last edited by 13 Apr 2008, 17:24

        few more pictures (1 min job)

        1.draw line (root line - pointing upwards)
        2.run l-system
        3.select all top branches, run Qhull>Pointify [voronoi/convex hull script]
        4.select all created construction point, run Qhull>Export points
        5.run Qhull>Convex hull
        [sometimes this doesn't do a thing when running the second time, try opening command prompt, go to sketchup\plugins\qhull
        and type this 'qhull.exe TI points.txt Qj o TO qhull.txt' and press enter. then run Qhull>Convex hull in sketchup again]

        6.select convex hull, make it into a group, scale this group by 1.1 around center
        7.select all tree lines
        8.run didiers line2cyl script (precision used is 5)

        example2.png
        lsystem+lines2cyl+convexhull2.png
        lsystem+lines2cyl+convexhull.png

        1 Reply Last reply Reply Quote 0
        • K Offline
          kwistenbiebel
          last edited by 13 Apr 2008, 18:15

          Great idea ๐Ÿ˜„

          It would be great if those lines that are generated (the branches)could be components.
          In that way, people could perform a 'substitute component' and replace it by their custom made branch.
          The same goes for leaves....replace it with low poly clipmaps or full 3D leaves etc...

          I can imagine some people want low poly branches and other people want high poly ones for rendering.

          1 Reply Last reply Reply Quote 0
          • K Offline
            kwistenbiebel
            last edited by 13 Apr 2008, 18:26

            You also might want to check out this thread on the Podium forum about the sketchup 'Tree Factory'. I made some trees with it, but it works manually. It would be great if it was made into an automated script though ๐Ÿ˜‰.

            (scroll further down the page):

            301 Moved Permanently

            favicon

            (www.websitetoolbox.com)


            TREE FACTORY 2.skp


            TREE_FACTORY.pdf

            1 Reply Last reply Reply Quote 0
            • I Offline
              ilay7k
              last edited by 13 Apr 2008, 18:57

              also using applyto-script for changing
              then using displ.or bump map to branch in your favorite render.engine

              Konstantine(aka mentor) use lsystem(onyxtree4max and Houdini) made such http://www.3dmentor.ru/3dcenter/branch_grow_01.mov and http://www.3dmentor.ru/wip/dbm3_test_45.jpg, http://www.3dmentor.ru/wip/dbm3_test_36.jpg ....

              1 Reply Last reply Reply Quote 0
              • K Offline
                kwistenbiebel
                last edited by 14 Apr 2008, 06:38

                An example tree made with the Tree Factory:

                http://i140.photobucket.com/albums/r3/kwistenbiebel1/PART%202/treefactoryexample1.jpg

                (SU file see attachment)

                I am convinced that with a 'component substitution' method (branches and leaves as components), a Tree generator plugin could have the potential to make Xfrog quality trees easily.
                It would only involve modeling some nice branches and leaf clusters as components to load in a "L-system" plugin as A4chitect started .
                ...


                treefactoryexample.skp

                1 Reply Last reply Reply Quote 0
                • R Offline
                  Richard
                  last edited by 5 May 2008, 05:42

                  @kwistenbiebel said:

                  You also might want to check out this thread on the Podium forum about the sketchup 'Tree Factory'. I made some trees with it, but it works manually. It would be great if it was made into an automated script though ๐Ÿ˜‰.

                  (scroll further down the page):

                  301 Moved Permanently

                  favicon

                  (www.websitetoolbox.com)

                  Hey mate you did well to drag that up it's been around now for years, thanks for posting it it was one of the first things I ever did with sketchup and lost the tut somewhere in my system! I do remember some years ago working with one of the scripters Rick? who did get part way to making a script to automate variations of trees from those original camponents.

                  I'll see if I can dig it out and find who it was, might have his details in the script.

                  Must say with the quality of onyx's package - hard to beat that - though I would love to see someone write a script to find similar geometry within a component and make them nested replacing each instance of the similar geometry with a component.

                  Meaning say you have 2000 leaves each of similar geo but the location and orientation differs the script searches each instance of this similar geometry and replaces it with a copy of the first (component) and locates, rotates the new component to suit the geometry being replaced.

                  [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kwistenbiebel
                    last edited by 5 May 2008, 06:20

                    Hi Richard,

                    I did wonder which Richard it was who made that tutorial ๐Ÿ˜‰.
                    It turned out to be you....so Kudos to you for both the tut as the original tree factory SU file.
                    I had lots of fun with it and having an automated version would be awesome.
                    Hopefully one of those fine scripters sees something in it and develops it further.

                    1 Reply Last reply Reply Quote 0
                    • bigstickB Offline
                      bigstick
                      last edited by 5 May 2008, 19:01

                      @ilay7k said:

                      Konstantine(aka mentor) use lsystem(onyxtree4max and Houdini) made such http://www.3dmentor.ru/3dcenter/branch_grow_01.mov

                      This looks fantastic, but it doesn't look like they are for SketchUp. I'm sure someone could implement this sort of thing though. We have some spectacular complex plugins, it's a case of one of the ruby gurus getting inspired to write one which builds trees though I guess ๐Ÿ˜„

                      1 Reply Last reply Reply Quote 0
                      • JClementsJ Offline
                        JClements
                        last edited by 6 May 2008, 14:42

                        http://xaraxtv.at.tut.by/products.htm

                        The LSVG utility (fractal generator) type approach looks interesting. The author has already modified his spiral generator to produce DXF output for SU users.

                        It would nice if there was a way for Ruby to create these patterns and to do so using a similar interface.

                        John | Illustrator | Beaverton, Oregon

                        1 Reply Last reply Reply Quote 0
                        • E Offline
                          Ecuadorian
                          last edited by 12 Oct 2009, 17:32

                          I hereby bump this ancient thread as I think it contains really interesting ideas. ๐Ÿ‘

                          Perhaps a combination of...

                          • The fractal generator in this page
                          • Richard's Tree Factory techniques to place some branches in the generated lines
                          • Some nice .png clipmaps applied to low-poly elements for smaller branches and leaves

                          ...would be excellent. I mean, something like this:
                          http://sketchup.google.com/3dwarehouse/details?mid=eaf0e00f27efcd4746db4da39bd77ac3
                          but with more 3D elements and smaller clipmaps so they are less noticeable.

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

                          1 Reply Last reply Reply Quote 0
                          • soloS Offline
                            solo
                            last edited by 12 Oct 2009, 17:42

                            I hope I'm not speaking out of turn or raising unrealistic expectations but Tom (Tomsdesk) is busy with a few things that so far look very promising, I was fortunate to get a prototype of a realistic tree he made and must say it's frigging awesome and works great with SU, in fact It's a 2.8 tree (more than the normal 2.5, but not exactly 3, which can be massed and viewed from any angle including top, I had 200 in ascene without glitch.
                            Hopefully he will be done soon and post some images or samples.

                            http://www.solos-art.com

                            If you see a toilet in your dreams do not use it.

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              chango70
                              last edited by 13 Oct 2009, 02:07

                              That sounds great! Can't wait!

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Justo79
                                last edited by 13 Oct 2009, 06:33

                                Ditto

                                Cheers
                                Justin

                                1 Reply Last reply Reply Quote 0
                                • AdamBA Offline
                                  AdamB
                                  last edited by 13 Oct 2009, 10:15

                                  Good to hear.

                                  I got a model last month with a tree apparently authored by a well known poster in these parts..
                                  It has 18600 groups, 19000+ component instances and 260,000 triangles. For 1 tree. Ay Caramba!

                                  Procedurally generated stuff does tend to go nuts very quickly. I was wondering whether to write a tool that reports how "dense" each Component Definition you have in your model. Polygons / cubic meter type thing as I keep seeing models with an innocent chair or table in the corner with absolutely insane detail in comparison with the rest of the model.

                                  Adam

                                  Developer of LightUp Click for website

                                  1 Reply Last reply Reply Quote 0
                                  • PixeroP Offline
                                    Pixero
                                    last edited by 13 Oct 2009, 11:17

                                    Ouch, and I thought for a moment you would write a low poly tree script. Well, well. ๐Ÿ˜’

                                    Question: Would it be very difficult for someone to write a directx (filename.x) importer to SU?
                                    I have this great tree[d] software that might be useful if there was a way of getting the model into SU.

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      Richard
                                      last edited by 13 Oct 2009, 16:27

                                      I'm keen to see tom's trees.

                                      There has to be a good way to get trees working light weight for SU that will also work in renders! Large clips don't work so well for foliage as they tend to show an edge in renders.

                                      I started working on a few ideas and some where proving very light weight and worked well in depth when rendered but they soon ended up exactly in the same spot as my low poly cars - working well but left to be done one rainy day! I've got to order a new box to crank out faster tests then I'm on again!

                                      You have to say Pete the ones you see from your own work with Vue, full 3d trees are really required for rendering, watercolour renders are a different thing. Hopefully Toms new idea can break the back on this!

                                      [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

                                      1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        Richard
                                        last edited by 13 Oct 2009, 16:35

                                        @pixero said:

                                        Ouch, and I thought for a moment you would write a low poly tree script. Well, well. ๐Ÿ˜’

                                        Question: Would it be very difficult for someone to write a directx (filename.x) importer to SU?
                                        I have this great tree[d] software that might be useful if there was a way of getting the model into SU.

                                        Yeah I've got that and did that but cant remember how, I think pete had another way to do it too! I think I ended up getting it through to SU as an obj file with jim's plugin after another process.

                                        It was a really cool little application, I remember at the time emailing the developer and suggesting he was really on to something and to keep at it!

                                        [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

                                        1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          BTM
                                          last edited by 14 Oct 2009, 00:16

                                          This reminds me of a code I wrote at the start of the month ๐Ÿ˜ฎ
                                          It was originally just an idea( I have a lot of mostly-useless codes i've written), and didn't end up with very realistic results. I mostly based it on how to add thickness to branches, though they are all separate segments and not really attached, and not so much on the branch-generation (which was buggy).
                                          (Amount of 2nd and 3rd stages of branches can be set, as well as radius, amount of circle-segments of branches (detail), and length of branches.)
                                          Tree generator v0.2 vs. my tree gen thing.

                                          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