🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

More trees

Published June 14, 2011
Advertisement
I wrote a marching cubes (or, rather, tetrahedrons) surface extractor for the procedural trees mentioned in the previous post. It works okay, but doesn't perform any compaction or decimation at the moment so I still have to import into Blender for that. Today I've been fiddling around with different things: canopy point cloud generation schemes, randomization of the final tree to get more variation, etc...

testtree.jpg


On the left is the tree of nodes, on the right is a representation of a tree generated from the nodes. The actual generation of the node-tree is, of course, highly parameterizable, but even once it is generated there are lots of ways to alter the appearance of the final tree. This example was generated by rendering each node of the node-tree into a density field using a max() operator; ie, a field value is written only if it is greater than the value already there. A variant is to use a sum() operation, which gives it a blobby, meta-ball appearance. Sum() works well for some cases, not so well for others.

This really is a cool method for generating trees. It lets you define areas where you want the tree to "grow into", and seed those areas with points. So if you have a scene where you have a tree growing against a cliff rock, for example, you can exclude the volume of the rock from being seeded with points, and the limbs of the tree will not grow into that area. Of course, this isn't a perfect system (limbs will cross empty space to get to the point clouds, after all) but it is great for allowing you to shape tree crowns and canopies that fall outside the near-perfect and too-tidy norms you usually see in procedural geometry done via things such as L-systems.

I am currently experimenting with thickness, pruning, and using the nodes of the node-tree to find likely places from which to grow leaves. I'm thinking that I can search the tree for leaf nodes and for nodes that are part of a non-branching chain that includes a leaf nodes, as these are the most likely places to find actual leaves. (Ugh. It's confusing talking about tree generation using trees comprised of branches and roots and leaves, in order to generate the roots and leaves and branches of trees. Trees. Lol, what a funny sounding word.)


In other news, I've finished writing a novel set in the universe of Goblinson Crusoe. It's in the proofreading and feedback from friends stage, and I am working on some higher-quality renders of various scenes for cover and promotional artwork before uploading it to Amazon. Kind of excited about that, I've done lots and lots of writing projects, started maybe a dozen novels, but this is my first finished one. GC itself is still under occasional production. Lately, I've been experimenting with a fork of it that converts it to a turn-based system. I like turn-based RPGs. A lot. And I'm finding that TB allows strategy and tactics that previously weren't convenient in the real-time version.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement