Animated Trees
#1
Posted 09 June 2012 - 05:29 PM
I recently played a game called Dear Esther, and instead of animating all of the plants, it had animated "detail" plants mixed in with non animated plants. The movement was enough that it looked like all the plants were animated. So for 0ad, animations could be assigned to a percentage of the trees, instead of all of them. It could even change which tree is being animated, so that every tree is animated, but never at the same time.
and the animations themselves could just be a rotation of the whole entity from side to side, and assigned procedurally.
Would something like this work in 0ad?
Quote
I do 3D modeling and map creation for an open source fps called xonotic
#2
Posted 09 June 2012 - 10:52 PM
Or what you can do is when ever a unit of some kind interacts with a vegetation of some kind, it will become animated. Like if you watch a character walk through grass, the grass will move and then stand back up again. If somebody is chopping down a tree, the tree will rock back and forth and eventually topple over.
Edited by Sighvatr, 09 June 2012 - 10:52 PM.
#3
Posted 12 June 2012 - 01:03 PM
it gives a sense of realistic environment
Edited by majapahit, 12 June 2012 - 01:11 PM.
Fried Banana, Steamed Banana, Banana Kolak, Nagasari, Banana Ceriping, and still many more delicious banana based cuisine.
#4
Posted 12 June 2012 - 04:34 PM
0 A.D. Gameplay and UI Developer
#5
Posted 13 June 2012 - 08:05 PM

If I understand correctly, it will actually generate a random (subject to input parameters) tree and give you a description of how each leaf and branch relate to each other. This would allow us to animate it with something like this. Later iterations could even do crazy things like animating individual leaves on high-end systems but to begin with it can just support basic low poly trees much like those already in the game:


(Screenshots from BlenderArtists.org)
#6
Posted 13 June 2012 - 09:16 PM
zoot, on 13 June 2012 - 08:05 PM, said:
That kind of thing has been around for a long time. What I wonder is how easy is it to find "good" parameters? I've always seen mentioned that it's quite difficult. And more practically, can it generate trees that work well with alpha testing rather than alpha blending, which I think will be our preferred method of rendering trees (lots of little leaves/branches would look ugly)?
About animated trees: can people link or make some videos showing animated trees in other games? I tried looking up AoE3, BFME2, and only saw very slight tree animation and not clearly on every map, understandably most people show off gameplay in their videos rather than graphic effects
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#7
Posted 13 June 2012 - 10:53 PM
historic_bruno, on 13 June 2012 - 09:16 PM, said:
"Our attention in designing the model was focused on allowing a general user to create trees that generally match images from books or photographs.The user needs no knowledge of botany or complex mathematical principles, only a basic understanding of geometry. We concentrated on the general structural appearance of a tree instead of the biological and biophysical principles that produced its structure."
Commercial packages like SpeedTree also seem to use some variation of this technique.
Furthermore, ngPlant comes with a "designer" application which allows you (or an artist) to model a base tree which can then be randomized within some specificed range. The model is exported as a special file which can be imported into the game using the C++ library and seeded at runtime.
So overall, it seems like a pretty controlled and professional solution.
As for alpha testing vs. alpha blending, I imagine that is entirely up to the user - the library only concerns itself with creating the basic tree model (the mesh, if you will). Texturing it would be done with whatever tools artists normally use.
Edited by zoot, 13 June 2012 - 11:24 PM.
#8
Posted 14 June 2012 - 02:42 AM
zoot, on 13 June 2012 - 10:53 PM, said:
Interesting, probably something for the art team to keep in mind when they focus on revamping the gaia assets, I wouldn't mind more varied tree models
Lion.Kanzen, on 14 June 2012 - 12:20 AM, said:
Thanks for the example! Maybe it's just me, but I hardly notice the subtle swaying of trees in that video? I mean when you focus on the tree and the camera isn't moving, you see it clearly, but most of the time during a game I'd be oblivious to such a minor effect. The fields were more apparent but only from being so ugly... What really stood out to me in that video were the effects surrounding naval combat, which are much lacking for 0 A.D.
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#9
Posted 14 June 2012 - 05:29 AM
Here's how I think it can be done (without even modifying the tree models):
- there's a global wind direction/intensity shared by all trees
- each tree vertex knows its height from the ground
- vertices higher up sway more (in the wind direction)
- swaying is done by adding a sin or cos wave to the vertex positions
- maybe there's some randomness to make different trees look unique
Edited by myconid, 14 June 2012 - 05:30 AM.
#10
Posted 14 June 2012 - 03:00 PM
Quote
I do 3D modeling and map creation for an open source fps called xonotic
#11
Posted 14 June 2012 - 03:15 PM
0 A.D. Gameplay and UI Developer
#13
Posted 14 June 2012 - 04:54 PM
Wildfire Games Art Department
Contact me: amish13@gmail.com
AIM handle: Mythgamer
MSN Account: amish13@live.com
"The fate of 0 AD is in the hands of those who have vision and perseverance." - Ken Wood
#14
Posted 14 June 2012 - 05:22 PM
#15
Posted 14 June 2012 - 05:27 PM
Pureon, on 14 June 2012 - 04:34 PM, said:
kosmo, on 14 June 2012 - 05:22 PM, said:
Edited by myconid, 14 June 2012 - 06:17 PM.
#16
Posted 14 June 2012 - 06:36 PM
"Using a hierarchical form of vertex displacement, [deformation and wind modelling] can be combined in a single vertex shader, fully leveraging the power of modern GPUs to realistically animate thousands of branches and ten thousands of leaves at practically no cost."
If tree animation has to be very low priority, myconid's solution seems a lot more straightforward, of course.
Edited by zoot, 14 June 2012 - 06:37 PM.
#17
Posted 14 June 2012 - 07:07 PM
zoot, on 14 June 2012 - 06:36 PM, said:
"Using a hierarchical form of vertex displacement, [deformation and wind modelling] can be combined in a single vertex shader, fully leveraging the power of modern GPUs to realistically animate thousands of branches and ten thousands of leaves at practically no cost."
If tree animation has to be very low priority, myconid's solution seems a lot more straightforward, of course.
#18
Posted 14 June 2012 - 07:32 PM
myconid, on 14 June 2012 - 05:27 PM, said:
Interesting. Am I right in thinking something like that would take a long time to implement in order to test performance impact?
0 A.D. Designer / Texturer / 3D Artist
Contact email: pureon{@}wildfiregames.com
#19
Posted 14 June 2012 - 08:02 PM
myconid, on 14 June 2012 - 07:07 PM, said:
#20
Posted 14 June 2012 - 08:17 PM
Pureon, on 14 June 2012 - 07:32 PM, said:
zoot, on 14 June 2012 - 08:02 PM, said:
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











