[Plugin] Tree generator v0.2

[Plugin] Tree generator v0.2

Postby a4chitect » Sun Apr 13, 2008 5:42 pm

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?
1

a4chitect 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Tree generator v0.2

Postby ilay7k » Sun Apr 13, 2008 6:04 pm

0

ilay7k 
 

Re: [Plugin] Tree generator v0.2

Postby a4chitect » Sun Apr 13, 2008 6:24 pm

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
0

a4chitect 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Tree generator v0.2

Postby kwistenbiebel » Sun Apr 13, 2008 7:15 pm

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

kwistenbiebel 
 

Re: [Plugin] Tree generator v0.2

Postby kwistenbiebel » Sun Apr 13, 2008 7:26 pm

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):

http://www.websitetoolbox.com/tool/post/supodiumforum/vpost?id=2046893
0

kwistenbiebel 
 

Re: [Plugin] Tree generator v0.2

Postby kwistenbiebel » Sun Apr 13, 2008 7:41 pm

An example tree made with the Tree Factory:

(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 .
...
1
Last edited by kwistenbiebel on Mon Apr 14, 2008 7:38 am, edited 1 time in total.

kwistenbiebel 
 

Re: [Plugin] Tree generator v0.2

Postby ilay7k » Sun Apr 13, 2008 7:57 pm

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 ....
0

ilay7k 
 

Re: [Plugin] Tree generator v0.2

Postby Richard » Mon May 05, 2008 6:42 am

kwistenbiebel wrote: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):

http://www.websitetoolbox.com/tool/post/supodiumforum/vpost?id=2046893


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.
0
User avatar
Richard 
 

Re: [Plugin] Tree generator v0.2

Postby kwistenbiebel » Mon May 05, 2008 7:20 am

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.
0

kwistenbiebel 
 

Re: [Plugin] Tree generator v0.2

Postby bigstick » Mon May 05, 2008 8:01 pm

ilay7k wrote: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 :)
0
User avatar
bigstick 
 

Re: [Plugin] Tree generator v0.2

Postby JClements » Tue May 06, 2008 3:42 pm

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.
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] Tree generator v0.2

Postby Ecuadorian » Mon Oct 12, 2009 6:32 pm

I hereby bump this ancient thread as I think it contains really interesting ideas. :thumb:

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/ ... a39bd77ac3
but with more 3D elements and smaller clipmaps so they are less noticeable.
0

Ecuadorian 
 

Re: [Plugin] Tree generator v0.2

Postby solo » Mon Oct 12, 2009 6:42 pm

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.
0
www.solos-art.com

I'm a social vegan, I avoid meet.
User avatar
solo 
Global Moderator
 

Re: [Plugin] Tree generator v0.2

Postby chango70 » Tue Oct 13, 2009 3:07 am

That sounds great! Can't wait!
0

chango70 
 

Re: [Plugin] Tree generator v0.2

Postby Justo79 » Tue Oct 13, 2009 7:33 am

Ditto
0
Cheers
Justin

Justo79 
Premium Member
Premium Member
 

Re: [Plugin] Tree generator v0.2

Postby AdamB » Tue Oct 13, 2009 11:15 am

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
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

Re: [Plugin] Tree generator v0.2

Postby Pixero » Tue Oct 13, 2009 12:17 pm

Ouch, and I thought for a moment you would write a low poly tree script. Well, well. :roll:

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.
0
User avatar
Pixero 
 

Re: [Plugin] Tree generator v0.2

Postby Richard » Tue Oct 13, 2009 5:27 pm

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!
0
User avatar
Richard 
 

Re: [Plugin] Tree generator v0.2

Postby Richard » Tue Oct 13, 2009 5:35 pm

Pixero wrote:Ouch, and I thought for a moment you would write a low poly tree script. Well, well. :roll:

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!
0
User avatar
Richard 
 

Re: [Plugin] Tree generator v0.2

Postby •BTM » Wed Oct 14, 2009 1:16 am

This reminds me of a code I wrote at the start of the month :o
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.)
trees.jpg
0

•BTM 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Tree generator v0.2

Postby elteja » Mon Nov 16, 2009 6:52 pm

It's a research project that analyses how to design fractal objects


http://www.ideascad.es/project.php?id=4
0

elteja 
 

Re: [Plugin] Tree generator v0.2

Postby majid » Mon Nov 16, 2009 8:35 pm

I am still waiting for a more advanced tree-generator ruby, hope to see it soon.
0
User avatar
majid 
Top SketchUcator
 

Re: [Plugin] Tree generator v0.2

Postby thomthom » Fri Aug 13, 2010 9:54 am

This plugin - and the Tree Factory looks very interesting. Was there any plugin made to automate the Tree Factory method?



Richard wrote: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.

And that plugin is on it's way. ;)
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Tree generator v0.2

Postby thomthom » Fri Aug 13, 2010 2:17 pm

This fractal tree generation is great. :thumb:
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Tree generator v0.2

Postby Pixero » Sat Aug 14, 2010 9:43 am

thomthom wrote:This fractal tree generation is great. :thumb:


If you need some inspiration:
http://www.frecle.net/index.php?show=treed.about
tree[d] is the best tree creation app I've ever tried. And its free! (outputs to .x)

And by the same author, the Tree editor in the coming Unity 3 (tree[d] on steroids).
http://hometime.net/tree%20edit/tree%20edit.html

Note the yellow circle and squares. With them you can move and modify branches manually.
0
User avatar
Pixero 
 

Re: [Plugin] Tree generator v0.2

Postby pibuz » Thu Aug 19, 2010 3:23 pm

Following this with HUGE curiosity.
Can't wait to see to what spectacular plugin this will lead..
0

pibuz 
 

Re: [Plugin] Tree generator v0.2

Postby archigrafix » Tue Aug 31, 2010 1:59 pm

I too. Of course biggest challenges are:
1) go Low or High poly depending on the user need....
2) Use of component intensively for SU memory management and for fast modifications
3) UV mapping of the parts at creation time...cause after that it's almost impossible job to do with SU tools
0
Agir comme un homme de pensée, et penser comme un homme d'action...

archigrafix 
 

Re: [Plugin] Tree generator v0.2

Postby Richard » Tue Sep 21, 2010 10:33 am

Wow that unity generator looks sweet! Looks to have some funky real time functionality though the example video leaves a bit to be desired!

I'm still keen to see Tom's new creations! Any idea where he is at with them! We so need a better tree option for SU use!

As for my own developments (and a far cry from the first shitty job like ten years ago), I've worked out how to cut the poly count WAY down and still get good leaf grouping at little poly cost, yet as Archigrafix hints, once I get to the bark mapping to the trunk and branches I'm stuffed and all fell in a heap!
0
User avatar
Richard 
 

Re: [Plugin] Tree generator v0.2

Postby bmike » Tue Sep 21, 2010 1:43 pm

How does one get a tree[d] tree into SketchUp?
I'm running Pro 7.? or 8...
0
User avatar
bmike 
 

Re: [Plugin] Tree generator v0.2

Postby Richard » Tue Sep 28, 2010 3:48 am

Hmmm? Still trying to get a workflow happening, this mapping is looking a little better!
0
User avatar
Richard 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

cron

Who is online

Users browsing this forum: layercero and 18 guests

Visit our sponsors: