20
\$\begingroup\$

Recently I programmed an L-system module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art just for fun and learn more.

Question: How should I approach the process of creating an artistic tree (2d perhaps with fixed camera/perspective) dynamically?

Ideally I would like to start with a plant (only a stem with a leaf) and grow it dynamically using some influence (input/user action) over its structure. These influences may result in different type of branching, curves in branches, its spread, location of fruits, color of flowers, etc. Want it to be really full of life/spirit. :)

Plants vs Zombies: Tree of wisdom It would be great to dynamically grow a similar tree, but with lot more variation and animations happening.

My Background: Programmer, have used few game engines (Ogre3d, cocos2d, unity). Haven't really programmed directly using openGL, trying to fix that :).

I am ready to spend considerable time, Please let me know about the APIs? and how would an expert like you would take on this problem?

Why 2D? I think it's easier to solve the problem only considering 2 dimensions.

Artistic inspirations:

Only the tree, with fruits and leaves, without the shrubs at the bottom

The large tree (visible branches, green leaves, flowers, fruits, etc) on the left, behind monkey.

PixelJunk's Eden (Art style inspiration).

Procedurally Generated Apple Tree using Fractals

Please let me know if it was easy for you to understand the question, I may elaborate further.

I hope a discussion of various approach would be helpful for everyone. You guys are awesome.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ I may not have an answer for you, but I'd definitely like to see where this goes. Awesome concept! \$\endgroup\$ Commented Mar 10, 2011 at 5:15
  • \$\begingroup\$ Great question, I've been interested in L-Systems for a while but haven't done anything with that interest :) \$\endgroup\$
    – Luther
    Commented Mar 10, 2011 at 11:58
  • \$\begingroup\$ One more reference art. jinsonathemes.com/demo3/wp-content/uploads/2011/02/… \$\endgroup\$
    – lal
    Commented Mar 31, 2011 at 23:58
  • 1
    \$\begingroup\$ @Stephen just so you know this question is from 2011 and got necro'd to the top by the user asking the question editing out Student/ from Student/Programmer \$\endgroup\$
    – PeterT
    Commented Sep 5, 2013 at 21:21
  • \$\begingroup\$ @lalan Please only make edits that are substantial to the question, the fact that you're not a student anymore is not a substantial change, or reason to edit. \$\endgroup\$
    – House
    Commented Sep 6, 2013 at 0:19

3 Answers 3

11
\$\begingroup\$

Do take a look at ABOP (Algorithmic Beauty of Plants):

http://algorithmicbotany.org/papers/#abop

Its free online now, and has a very in-depth view of L-systems and plants.

\$\endgroup\$
0
8
\$\begingroup\$

Some ideas for your "game":

  • Promt the user for a name for his tree first. Use that name to generate a seed for the algorithm. So every name will have it's unique tree. The seed could also influence the type of foliage and fruit of the tree.
  • You could implement some sort of "tree tamagotchi" where the tree grows bigger and nicer the more the user cares about it (fertilize, water, etc.)
  • Create a highscore list of the highest trees. Another idea would be to show heights and names of other users next to your tree. So you can compare your tree height directly to other users. See this video as an example. The clouds indicate the height other users have accomplished.

There are lots of algorithms and papers for procedural tree generation out there (this thread might be interesting). A difficult task is to nicely blend the branches. 2D is definitely going to be easier in that regard, since you can solve that with alpha-blending.

Since you're experienced with Ogre3D, Unitiy and cocos2d you can go right ahead and implement that thing (no need to start learning OpenGL now IMHO). Personally I'd choose cocos2d and release for iPad and/or iPhone, so that everybody can carry his tree around with his mobile device.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I'd by that game just to play with L-Systems in a social/competitive way. \$\endgroup\$
    – deft_code
    Commented Mar 10, 2011 at 15:44
  • 1
    \$\begingroup\$ Thanks for pointing me to gamedev thread.. Nice ideas, tamagotchi and goo-tower.. mobile application would be really cool. found a 3DS Max plugin video -- which is quite awesome link.. \$\endgroup\$
    – lal
    Commented Mar 10, 2011 at 18:42
5
\$\begingroup\$

Context-Free and it's 3D counterpart StructureSynth could be an excellent basis or inspiration.

Examples:

enter image description here enter image description here enter image description here etc...

These days you could write an online visualiser in WebGL!

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .