Making trees

Sage
Posts: 1,199
Joined: 2004.10
Post: #76
That imposter stuff is *awesome*. I'm going to have to scope it out.

Regarding the GUI, it's complicated. I have done several gl guis where I sort of hacked them together and I got pissed off that it was so messy and not re-usable. So I sat down and identified the minumum set of functionality that would be good enough, and would be scalable, and then spent a month building it. It does layout management, event-queues for input handling, automatic sizing based on font metrics, nested views, scrollbars/panes, etc.
Quote this message in a reply
Moderator
Posts: 384
Joined: 2002.08
Post: #77
ThemsAllTook Wrote:Looking really good from the trunk up, but I think it would add a lot if you would do something to the ground around the trunk to make it more believable. A few roots visible here and there, transition from grass to dirt closer to the trunk, etc.

With this comment, and my earlier one about the ground/water interface (the transition from ground to water), I think the transitions are the place least looked at in computer graphics. If there was some upheaval of dirt around the tree, roots, etc. ... it makes it look like it came from underneath.

So maybe I can make a little rule: for really spectacular geography, pay attention to the transitions.

(of course, this is only applicable once you get to the level of TomorrowPlusX already is his an engine)

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #78
TomorrowPlusX Wrote:…
Regarding the GUI, it's complicated. I have done several gl guis where I sort of hacked them together and I got pissed off that it was so messy and not re-usable. So I sat down and identified the minumum set of functionality that would be good enough, and would be scalable, and then spent a month building it. It does layout management, event-queues for input handling, automatic sizing based on font metrics, nested views, scrollbars/panes, etc.

This is a little bit OT for trees, but what the heck: I was asking because I did write a GUI with window manager and whatnot in OpenGL/C++, in the past. It was less than stellar, to say the least. Yours beats it up and poops on it. Still, I think the idea of rolling your own GUI has a lot of potential, especially if you develop cross-platform.

Ok, I also have 2 specific questions:
1) Events: do you let your events propagate from subview to superview, or the other way around?
2) Fonts: What do you do for drawing glyphs, and text layout?
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #79
funkboy Wrote:With this comment, and my earlier one about the ground/water interface (the transition from ground to water), I think the transitions are the place least looked at in computer graphics. If there was some upheaval of dirt around the tree, roots, etc. ... it makes it look like it came from underneath.

So maybe I can make a little rule: for really spectacular geography, pay attention to the transitions.

(of course, this is only applicable once you get to the level of TomorrowPlusX already is his an engine)

I would love to pursue this -- since I'm in 100% agreement -- but this is a complex topic. Worth thinking about, but a complex topic. I'd probably have to identify the polys of the terrain which intersect the trees bases and have a separate pass render a disruption.

Fortunately, I already have the code from my last game for applying scorch marks. All I'd have to do is apply the same code but use a different texture.

Thinking about this a little more, I bet I could have each tree create a mostly flattened sphere at its origin ( on the ground ) with rough perturbation and a nice dirt/rock texture. This shere would be placed at the bottom of the tree and be rotated to match the normal of the surface the tree is on. This could be really simple, actually. It might not necessarily even have to be randomly generated. I could just model a few of these in wings, texture them, and randomly select one for each tree. Obviously, I'd only display it when the tree's close...
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #80
DoG Wrote:This is a little bit OT for trees, but what the heck: I was asking because I did write a GUI with window manager and whatnot in OpenGL/C++, in the past. It was less than stellar, to say the least. Yours beats it up and poops on it. Still, I think the idea of rolling your own GUI has a lot of potential, especially if you develop cross-platform.

Thanks! But it might not be quite so good it poops on yours. Maybe it farts in yours' general direction. But no pooping, I'm certain.

Quote:Ok, I also have 2 specific questions:
1) Events: do you let your events propagate from subview to superview, or the other way around?

Actually, I have two kinds of event. Events like mouse movement, clicks, resizing, painting -- e.g. window system type events -- propagate from the window root recursively to leaf children. These are processed synchronously.

However, events like what happens when you click a button, or drag a slider, or select an option in a combobox -- those are "Notifications", and they're enqueued with the app's "notification pump". Each "NotificationSource" ( e.g. a button or whatnot ) has a list of listeners ( like Java ) and those listeners are set as targets for the notifications to be sent to. The notification pump processes the FIFO queue of notifications and lets the targets act as they will based on the notifications they receive.

The important part is that enqueuing a Notification doesn't result in its immediate execution -- instead it will be executed at the end of the current timestep. So if you have the hypothetical situation where a window is closed and deleted by clicking "OK" or "Cancel", this will work safely, since the window's button's posting of the notification returns immediately, and the listener's call to delete the window happens later, after control has returned from the window's button's posting of the notification.

Quote:2) Fonts: What do you do for drawing glyphs, and text layout?

I use FTGL, but I'm thinking of migrating to a glyph matrix, since FTGL's font metrics are *invariably* wrong, specifically the ascender and descender, making vertical centering of text in a button a black art based only on luck and frustrating "magic" numbers. For actual text layout I wrote my own line-run algorithm for doing line wrapping automatically. It's not as fast as ATSUI, but it's good enough, and only expensive when dimensions change, since it caches the layout.
Quote this message in a reply
staigerman
Unregistered
 
Post: #81
not sure if I postred on this thread ye, if you're still looking for a tree/plant generator, Carrara Studio 3 and higher comes to (my) mind.

http://www.thebest3d.com/carrara/plants

the old version 3 of Carrara Studio installs and works on OS 8, 9 and 10
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  3d trees for game spinner 5 7,163 Oct 25, 2006 06:34 AM
Last Post: spinner