Archived

This topic is now archived and is closed to further replies.

Render a Tree?

This topic is 5505 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Could anyone give me a suggestion for rendering a fairly simple tree for my game? It is a very simple game that needs something that dosen't slow it down. Or maybe point out a tutorial or resource I could reference? Dosen't have to be too realistic (hopefully something better than a sphere or cone).... aluv4ballin [edited by - ematting on November 18, 2002 2:08:03 AM]

Share this post


Link to post
Share on other sites
Um... how about making it into a 3d model and loading it? I would build it up in milkshape or max or something, and just render it. Otherwise, there''s a program I found somewhere called TNA, can''t find where I got it from, you might be able to get something.

-ReK

Share this post


Link to post
Share on other sites
What about using a "l-system 3" code and extending it to a third dimension? Where each branch is a cylinder...Will this be slow and hard to implement?

Thanks,

aluv4ballin

Share this post


Link to post
Share on other sites
a few games use the simple 2 perpendicular texture mapped quads. it definitely looks a bit jenky but it''s incrediably easy.

2 perpendicualr quads.
tex map onto each an image of a tree.
make the non-colored pixels of the mapped image transparent

-me

Share this post


Link to post
Share on other sites
or, if it doesn''t have to be a 3d tree, you might try billboarding a picture of one.

My Homepage
How many Microsoft employees does it take to screw in a light bulb?
None, they just declare drakness as a new standard.

Share this post


Link to post
Share on other sites
If you wanted to be _really_ fancy, you could use the method suggested by Palidine, 2 texture mapped quads that intersect each other, but expand on it.

- 6 or 8 instead of four for added depth
- have horizontal quads with approprate textures as well

or even cooler:

Do the main trunk and perhaps a few major branches as low poly cylinders, then use several sets of three texture mapped quads (like my second idea) rotated and translated to the correct position.

Anyway, with trees, low poly - better texture, is your best bet.



Do not meddle in the affairs of moderators, for they are subtle and quick to anger.


ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Go FAQ yourself ]

Share this post


Link to post
Share on other sites
Or you can create a simple fractal tree like this one:
http://www.scorchedearth3d.net/tree_images/new_tree6.jpg

Every branch has 3 branches coming out of it at random angles. And each of those branches has 3 branches... etc... etc...

Nitzan

-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------

Share this post


Link to post
Share on other sites
Andrew Russell : But rendering a lot of big (alpha-blended)faces is going to burn ALOT of fillrate. Personaly I would go for gractal generation or L-System stored in display list or with using some kind of LOD.

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
After a think about this.

I suppose it would really depend on the graphics card and how you implement it. Display list or vertex buffer may indeed be faster.

How about a combo like I suggested before? Major branches as low poly cylinders with alpha blended polys for smaller braches and leaves.

Do not meddle in the affairs of moderators, for they are subtle and quick to anger.


ANDREW RUSSELL STUDIOS
Cool Links :: [ GD | TG | MS | NeHe | PA | SA | M&S | TA | LiT | H*R ]
Got Clue? :: [ Start Here! | Google | MSDN | GameDev.net Reference | OGL v D3D | File Formats | Go FAQ yourself ]

Share this post


Link to post
Share on other sites