I've had this idea for a while, so it's about time I finished it off.
I've started rendering a short animation that will simulate the growht of leaves on a tree. The method is realtively crude, but it should work reasonably well at medium distances from trees. It's fairly simple to implement, using a greyscale image map and a colour adjust shader used as an opacity function in addition to the existing leaf's opacity image. The tricky part is creating the "growth map". My first trial uses a crude combination of radial fills, scaled and masked to the leaves, and combined to accomodate overlapping leaves. I'll see how this one looks before even thinking of trying a more sophistacted growth map, as the extra effort may not be worth it.
[attachimg=#3]
The mask includes 3 growth sequences controlled by the greyscale values of the growth map.
- Final branch segment extends
- Leaf petioles extend
- Leaf expands from the tip of the petiole
Fingers crossed
A variant of this might be able to randomize the growth stages in populations.
That could easily be done by multiplying the Age node by an additional mask controlling the variation in age. This mask would also have to be animated to produce an end result of 100% coverage. In theory it's quite feasible. Rendering a few small key frames first before starting a proper series.
At the moment I'm populating my glen with forests. I'm thinking of ways to get a good mix of young, mature, dying, and dead trees. Could we use a fractal mask to blend a population among them for stills, that is, not animated but a one time calculation?
You may want to look at my post on creating multiple masks from a single image map. You can take the same approach with a PF as well.
One possible approach is to create a PF mask for the overall distribution distribution of trees/ clearings. From here you then need to make a number of different versions of the same mask using colour adjust nodes to isolate different ranges values and combine these using multiply/add/subtract scalars to build up density masks for each population.
Take it slowly... ;)
Younger trees are at a higher denity at the edges of the forest (lower values of mask)
Oldest trees are at a higher density at centre of the forest (high values of the mask)
Middle aged trees are in between these two populations.
I'll try and make up a simple demo mask for you.
Here are some intermediate keyframes of my leaf growth. The next series will be even closer to the tree to show a bit more of the detail changes.
Quote from: gregsandor on October 25, 2008, 02:55:17 AM
At the moment I'm populating my glen with forests. I'm thinking of ways to get a good mix of young, mature, dying, and dead trees. Could we use a fractal mask to blend a population among them for stills, that is, not animated but a one time calculation?
OK, here's a quick demo of a possible masking solution. I've fed them into surface layers to preview the distribution. One advantage of this setup is that it's highly configurable using the black and white levels and gamma adjustments.
Thanks! I'll test it now.
Could you post an image of your test. I haven't actually applied this to a population set yet ;)
Sure.
Result
Zoomed in to the 5m terrain
With trees? ;)
A little closer and higher quality. Detail 1, AA6.
The partial leaf shape is good enough for animation purposes at this distance. :)
Zooming in a bit more for the final sequence so you can see exactly what's going on. (Detail 0.5, AA3 in the sample below)
With trees? The renders I posted are the forest mask, now I'll put the trees on. By the way those shots you posted look good. I especially like the progression at top of thread.
Very interesting test!
I'd like to use this for my Genesis Project anim I'm working on currently.
Now I animate the size of the whole tree, first only hight and then width, with a litlle bounce, resulting in a sort of comical effect. I'll post an animated gif here when the anim is done rendering.
...
I'd say you would have to make the trees a lot smaller for good scale....
I'm taking a side track at the moment; I want to see if I can use my forest mask on the Y axis to control blending between the fully opaque leaf and bigben's gradient mask, so the trees in whitest areas will be fully opaques and at the grey-black areas will have thinner leaves.
Quote from: gregsandor on October 25, 2008, 06:11:00 PM
I'm taking a side track at the moment; I want to see if I can use my forest mask on the Y axis to control blending between the fully opaque leaf and bigben's gradient mask, so the trees in whitest areas will be fully opaques and at the grey-black areas will have thinner leaves.
This is a little more complicated, because you're trying to mask leaf surfaces at a tree level within a population. From memory you need to include something like a Voronoi 3D diff scalar to provide masking at this scale. Your garden variety PF is only useful at the leaf level for surfacing, or for controlling distribution of a population.
Another thing to take into consideration with the demo distribution mask in this post is that you may have to decrease the object spacing below what you think it should be because much of the mask will have values <1, which will decrease the density of trees. I've moved my leaf growing animation to my PC at work and am running a test on this one now.
Well, that explains my headache... I haven't been able to get a blend yet. Currently trying just to blend two colors in the color function. I'don't know how to use the 3d voronoi node, so I'll plug one in and see what happens.
...
I guess I'll go back to using separate populations using the mask you set up.
While I'm thinking of it it would be nice to be able to use the same method to vary the scale of the objects in a single population.
It may well be simpler to create an extra population for the dead/dying trees. It's relatively difficult getting good variation at the tree level of a population.
I've started another post where it might be more appropriate to move this offshoot from my original topic. http://forums.planetside.co.uk/index.php?topic=5049.msg52266#msg52266 (http://forums.planetside.co.uk/index.php?topic=5049.msg52266#msg52266) It might make easier reading when I get some more samples of growing leaves to add here.
...
Try decreasing the spacing in the populations.
Old x 0.7
Medium x 0.5
Young x 0.3
.. and post results in http://forums.planetside.co.uk/index.php?topic=5049.msg52266#msg52266 (http://forums.planetside.co.uk/index.php?topic=5049.msg52266#msg52266) ;)
OK. Back on topic... here are a few early frames from the up close animation showing the beginnings of the leaf stem. The model is the public XFrog birch.
Switching to a progressive render (updating my render management database)
into the prgressive render now. Here's frame 64 with a closeup of a partial leaf. Don't ask me where the small artefacts are coming from (look like flies around the leaves) I have no idea. I can't find anything in the mask images.
Detail 0.7, AA 3
You can clearly see the shape of the gradient used for the mask... an ellipse centred at the base of the leaf... but it gives a reasonable impression of a leaf from a small distance further away.
This looks great.
OK, here's a sequence that shows images from each stage.
1° stem > petioles > leaf blade.
Very nice! I wish that there was a way to do this from within TG2 without having to reload the models every frame.
This is all done within TG2! The only animation here is a single colour adjust node on an opacity function derived from an image map.
The models aren't being replaced. The opacity of the leaves is being changed.
Ah, yes, you're right, silly me. For some reason I was thinking of Bigben's age variations project, which I believe does require a separate model for each age, and if you wanted to have an animation of a tree growing, you would have to have one model per frame.
Quote from: old_blaggard on October 27, 2008, 09:09:19 PM
...For some reason I was thinking of Bigben's age variations project, which I believe does require a separate model for each age, and if you wanted to have an animation of a tree growing, you would have to have one model per frame.
That's my next project using Arbaro and multiple XML docs to generate an OBJ model on the fly.... more swaying in the wind than growing, although growing grass should be feasible. Growing trees would be a bit trickier as there would probably be a lot of jitter in the leaves as the branches grow, but it may still be very effective. It would partly depend on the grwoth rate.
OK, the 1/8th render pass is complete. Posted a 3 frames per second animation at http://podcast.bigben.id.au/channel0/leaf-growth/ (http://podcast.bigben.id.au/channel0/leaf-growth/) I'm starting a second sequence of a whole tree for comparison.
Quote from: bigben on October 28, 2008, 07:08:11 AM
OK, the 1/8th render pass is complete. Posted a 3 frames per second animation at http://podcast.bigben.id.au/channel0/leaf-growth/ (http://podcast.bigben.id.au/channel0/leaf-growth/) I'm starting a second sequence of a whole tree for comparison.
That's pretty awesome Ben....dunno how I missed this thread but now I gotta go back and read the whole thing...fortunately I'm just sittin waiting for the phone to ring...LOL.. ...
Thanks Bobby
Here's the partially rendered full tree animation. every 4th frame, 6fps. (Just play around with the slider once the movies loaded)
http://podcast.bigben.id.au/channel0/leaf-growth-2/ (http://podcast.bigben.id.au/channel0/leaf-growth-2/)
It will be interesting to see how this can be varied across a population.
You might want to adjust the speed of the changes toward the end. Suddenly the leaves grow super fast...
Yes it is a bit fast... but then this is the first test and it's not like a surface where you have a preview render to check.
I just used a few linear gradients for each stage and didn't actually calculate the change in density vs distance. Had I planned it a bit more I would have set a key frame for each (white level) of the animation stages. I also considered varying the mask for each leaf blade to have them start at different times. The effect would be subtle at this distance but it's easy to setup.
Key values for this mask image (now that I've looked it up)
Black level = white level
End of branch (1 -> 0.75), petiole (0.75 -> 0.56), leaf blade (0.56 -> 0.02)
The second animation is complete now.
http://podcast.bigben.id.au/channel0/leaf-growth-2/ (http://podcast.bigben.id.au/channel0/leaf-growth-2/)
Sorting out an issue with IE7 and the plugin. If you have this browser try http://podcast.bigben.id.au/files/leaf_growth2/ReadMe.html (http://podcast.bigben.id.au/files/leaf_growth2/ReadMe.html)
Once you got these leaves sorted, add a little animation in front of the tree itself grow from 0 to 1 size (or whatever you have it now). Could be a nice effect...