Blowing - Trees - 1280x720px page 6...

Started by dandelO, April 24, 2011, 11:04:37 pm

Previous topic - Next topic

Oshyan

I agree, share your magic! ;D

- Oshyan

dandelO

May 17, 2011, 02:32:12 pm #76 Last Edit: May 17, 2011, 02:37:05 pm by dandelO
A really simple way to do it is like this.

[attachimg=#]

Make a new power fractal inside the parts shader, or just inside the object if an old multi shader is used, like it is here.
Change all scales of the power fractal to '1'. Displacement doesn't need to be checked so, you can uncheck that now too, if you want, doesn't matter really.
After that, make a new transform shader. This is the scale and speed controls, plug the fractal into it's 'shader' input and the transform shader into the leaf shader's 'displacement function'. Set displacement amplitude to '1'.

Edit the 'translate Y' value by whatever speed the wind should move over the frame range.
At 30 frames per second, '2.5' in the Y input( = 2.5 metres per second, keyframed between f1=0 to f30=2.5) is just over a 5mph breeze.
If you have, say, 90 frames then keyframe from 0-90 with 'translate Y = 7.5m', for a solid movement throughout, or keyframe in between/outside of the frames to have gusts etc. It's up to you.
If you want to rescale the noise pattern, use the transform shader's scale fields to make the 1m fractal a multiplication of whatever you input.
The displacement multiplier in the main leaf shader will control how much the leaf gets bent by the noise. Here it is set to '1'.

This shader preview sequence is equal to 0.5 seconds of movement at the above settings;
[attachimg=#]

Much simpler than you'd think to look at the final results, isn't it? Two extra red shader nodes to create the basis of a wind system!
I've been playing with the redirecting and other things to move the tree trunks as well but the above shows how to blow leaves around with really not very much work at all. Pick any direction/scale/rotation to move the noise. Moving it along the 'Y' just means the noise will roll from the base to the tip of the leaf.

* Another way to shift noise along a leaf is to use Hetzen's constantly moving get frame animator setup, then you control exactly how much wind there is without worrying about the keyframe interpolation, although the interpolation can be very nice to break up consistency.

Tangled-Universe

I was just thinking:

With the new "use world space (final position)" key in the transform shader it should be possible to have trunks bend from half the tree till the top isn't it?
It would not apply anyway if you use size variation since you need to define a minimum altitude in the blendshader for the PF.

Hannes

Thank you so much for your explanation, dandelO! I tested your method with MGebhart's first pack of Generic Pines (Nr. One)
http://forums.planetside.co.uk/index.php?topic=8104.0
and it worked very well. This model has alpha mapped images of needles and twigs on quite large billboards which move nicely and natural.
I always thought I had to use a lot more noise octaves in the PF shader, but I did what you wrote and used the value 1 for all scales in the PF and finally had only two noise octaves and it worked!

It's a bit more difficult with models that have small single leaves to get the scale of the transform shader right. In this case you get more fluttering leaves, whereas the pine tree's little twigs seem to move too, because they are part of the billboards.

I attached the file I created for those who are interested (I hope you don't mind, dandelO!). You have to insert the pine from the link above.

Hannes

Btw, don't worry about the other missing objects. They were just for testing purposes, and I forgot to delete them.

gregsandor

June 21, 2011, 03:29:35 am #80 Last Edit: June 21, 2011, 03:31:10 am by gregsandor
Excellent and elegant solution.  Made a test, changed out the trees for my simple corn model, raised the displacement from .01 to .1 and it works perfectly.

Now to re-shade my cornfields for the country highway...

Thanks guys!

Tangled-Universe

Quote from: gregsandor on June 21, 2011, 03:29:35 am
Excellent and elegant solution.  Made a test, changed out the trees for my simple corn model, raised the displacement from .01 to .1 and it works perfectly.

Now to re-shade my cornfields for the country highway...

Thanks guys!


Sounds good :) Please, show us the result, if possible!

dandelO

Indeed, Greg, post your results in here when they're ready. We're moving TG up to the next level with all these recent experiments, population variation, wind, waves, roads, there is really no limit, I believe.
Who'd have thought a wind system was possible with just 2 red nodes(except the staff! I'm sure they know everything. ;)), one of them, the most commonly used node in Terragen, the other, just one that moves the most common node along in space. Brilliant!

I'm a member of the Power Fractal Shader Appreciation Society, are you? :D

gregsandor

I haven't had time to figure this out yet, but what I'd like to do is have a general overall wind-in-grass shading, then for the grasses near the road, have a moving mask that adds that extra wind they get when a car or truck passes.  Ideally it will all be 'general wind' then when the mask passes over it a stronger and directional wind adds to it.  That's as far as I've thought it through but I'm planning to free up some time soon to implement it.

dandelO

Great, sounds like a nice addition to your diner shot.

You could make a simple shape shader move along, with the same animated parameters as the object creating the disturbance. You get a nice falloff control in a simple shape(edge width) and it doesn't require any imported settings or files...

dandelO

I've uploaded a proper 1280x720px HD version of this to Youtube(Vimeo link also pending). The last one that was uploaded as  '720p' had actually been resized by my Quicktime player on export and this is the reason it didn't display in HD on Youtube.

There is nothing new here, simply a higher resolution video that I was supposed to have added before but didn't due to the above reason.

A light Breeze - HD 720px

Cheers! :)

TheBadger

I cant wait to try this stuff. Thanks Martin
It has been eaten.

dandelO

Cheers, TheBadger. :)

Here's the Vimeo link, it's probably not as compressed and mucked around with like Youtube always seems to do to my files.

http://vimeo.com/32110058

rcallicotte

Wow.  You guys were are doing great.

I have some fun to catch.
So this is Disney World.  Can we live here?

bla bla 2

Bonjour, j'ai essayé de faire comme vous avez dit mais je vois pas que ça bouge dans le rendu preview.

Hello, I tried to do as you said but I see that it moves in the report preview.