Jump to content

Any tree Generator?


NasimiAsl
 Share

Recommended Posts

This is how far I have got so far http://www.babylonjs-playground.com/#QNVMR#2. Am currently working on adding additional branches that are not forks. These will also be used for generating fir type trees. The boughs give the number of levels to the tree. Obviously generation gets slower with increased forks and boughs. Note the use of SPS for leaf branch building, tried using merge meshes but had memory problems. This was a way I tried to speed up generation, all the leaf branch sections are pre-generated and identical except for rotation. In the code I am working on currently I have dropped generating each half of the leaf separately (which allowed a bend in the middle of the leaf)  and just generate a leaf shape which cuts down on the number of facets. 

Link to comment
Share on other sites

@jerome 3.4 million vertices eh! and I am still trying to add branches. 

@NasimiAsl will have to look at lowering the quality or else nothing else will be able to be added to the scene! :)

Have an other idea for tree drawing but not sure how I will do  it, if it is possible or whether it would work. 

It would mean taking a panoramic image of the branches and leaves of a tree, ie tree at centre camera rotated 360 degrees around tree. In BJS draw trunk using ribbon plus texture then add a sphere (or hemi-sphere or cylinder) around top of trunk and use panoramic image for texture. Even better if could make background to tree in image transparent and set sphere to double sided. Wont be thinking about this until I have finished what I want to do with existing tree generation.

Link to comment
Share on other sites

  • 2 weeks later...

Have had view of Melyon and it is impressive. I am still a long way off generating trees that are realistic and do not take up too much memory or time. The image transparency on mesh issue was a different attempt but didn't work

. Your trees in Meylon do work but there is a clash of styles with the generated images. You seem to be using 2D images so for style consistency perhaps generate 2D trees and use the images of these instead of real images of trees.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...