Planetside Software Forums

General => Image Sharing => Topic started by: dandelO on April 24, 2011, 11:04:37 pm

Title: Blowing - Trees - 1280x720px page 6...
Post by: dandelO on April 24, 2011, 11:04:37 pm
I've been trying to make grass appear like it's blowing in a breeze, here's a quick 24 frames.

Built-in TG grass clump; 250 blades, 1m diameter, 1m blade length.

Did a lot of tests yesterday, which are now scrapped and won't be posted, mostly involving warping. When you reach a certain point with warp the textures begin to wind into themselves and there's no continuous method to keep it moving. I gave up on that.

Instead, I'm now using a smooth fractal(@0.25m) for the displacement function of the grass clump shader and just transforming it ever upwards on the Y axis, which gives a smooth and non-repeating movement.
Displacement amplitude here is '0.1'. Maybe a bit much, it looks kind of under-watery.

I'll carry on with this and post any updates if and when, I think I can limit the amount of displacement so there's more at the tips of the grassblades and less at the base...

[attachimg=#]

Notice the static shadows. The ray tracer doesn't seem to see displacement on objects. Oh well.

*And, of course, you can't use 'Ray trace objects' to render this either.
Title: Re: Blowing - WIP
Post by: dandelO on April 24, 2011, 11:08:56 pm
I can imagine a better tuned and not so extreme version of this used in a population. Don't know if I have the time to test render it, though!
Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 12:08:25 am
Tried to limit it a bit by the length of the grass, not great yet. :-\

* Image removed. Updated in next post.
Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 12:26:01 am
A little bit less snakes-in-a-hair-dryer-like now. And limited by height for more movement at the tips.

(https://sites.google.com/site/d4nd310/Animation5.gif?attredirects=0)
Title: Re: Blowing - WIP
Post by: Jack on April 25, 2011, 12:30:34 am
very cool!!!
again dandelo you continue to push the boundaries with terragen 2
Title: Re: Blowing - WIP
Post by: pfrancke on April 25, 2011, 12:32:46 am
very cool -- it looks exactly as I would expect if the grass was on top of a vent or some such, like the wind is coming from under it.  Rigging an object and doing this might be better than displacement though, if you have a way to step through an object, or if it were an object array.  Someday TG2 will do all that.  It looks amazing!!!
Title: Re: Blowing - WIP
Post by: Dune on April 25, 2011, 03:05:16 am
You amaze me again, Martin. I haven't even thought about this possibility. And regarding
QuoteWhen you reach a certain point with warp the textures begin to wind into themselves
; what if you add a sinus node in the warper?
Title: Re: Blowing - WIP
Post by: Oshyan on April 25, 2011, 04:08:34 am
Wow, very cool! Pretty impressive result even at this stage. I can only see the first image though, 2nd one seems broken. The reason the shadows aren't moving is probably the same reason displacement doesn't render on objects when raytrace objects is used - the raytracer doesn't handle displacement on object geometry yet.

- Oshyan
Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 10:58:44 am
Hi. The second one is hosted on my Google page and for some reason, you need to be logged into Google to be able to see it, when I log out of my Google Page I can't see it either. Need to find a better host for larger images, I tried a few but they were mostly either full of ad's or didn't let me link directly to it.

Anyway, I've put the second one at the start of this little video file so you'll see it here. It's the same grass clump and movement that is in the population that follows. Sorry about the Youtube stretching(it's only 240px square) and compression but I don't have half an hour to wait on Vimeo right now.  

http://www.youtube.com/watch?v=LBgJxPI0oNU

It translates quite well over the population don't you think?
I can imagine the small wind effect blended by a larger moving fractal over the population extents(like the colour adjustment variation we were playing with a while back), it'd look like patches of wind, If I can squeeze out the computer time to render something, I will. I've a lot of ideas.
Title: Re: Blowing - WIP
Post by: max_thehitman on April 25, 2011, 11:07:42 am


I have been roaming this forum and a few other places on the web looking for information
about Terragen-2 , so I too can join up on the great fun and start making some good artsy scenes like
you guys, and I have to tell you, your one of the best at this game. Your mini-tutorials have been a real great
help for a newcomer such as me and your art is very inspiring to us all. I have just begun making scenes
and your tutorials have been a real good help.
I thank you! I wish you all the best with your great art and amazing discoveries you have been doing with TG2...
your the Master-Artist DandelO!
Thanks!
Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 11:18:59 am
Thanks for the kind words, Max. I just enjoy playing with TG when I get some free time(Holiday season here so this's been my window of relaxation for a couple of weeks). If it helps anyone out, all the better.

Cheers! :)
Title: Re: Blowing - WIP
Post by: Kadri on April 25, 2011, 11:50:45 am

Looks cool , DandelO :)

Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 03:41:36 pm
Small update. I don't like the movement as much in this one, I'll revert to nearer what I had before, I think.

http://www.youtube.com/watch?v=PD46KpWgKAw
Title: Re: Blowing - WIP
Post by: ndeewolfwood on April 25, 2011, 04:18:24 pm
very good idea.
Can be great to use this to  simulate a "physical" camera or helicopter travelling near meadow (just multiply animated displace with distant shader.)
well done
Title: Re: Blowing - WIP
Post by: Oshyan on April 25, 2011, 07:19:55 pm
That's pretty nice looking dandelO, very impressive. I agree the motion in the 2nd isn't as good. Are you using GI? I'm guessing not, so it will render faster. But it would be interesting to see how much better it would look with more balanced lighting (GI). I'd be happy to help you with some rendering if you want. :)

- Oshyan
Title: Re: Blowing - WIP
Post by: dandelO on April 25, 2011, 07:43:06 pm
I thought I'd try it on an imported object to see how it holds up. I think the motion looks even better on the tree.
The textures are a bit jaggy at the parts with dense leaves but that's due to my render detail of 0.5 and AA of only 2. The geometry holds up extremely well, I'm impressed.

Test on Walli's Pine01_1; http://www.youtube.com/watch?v=75TjVUD0MLI

The method can only be used on planar objects i.e. leaves, grass blades, flags, streamer paper etc. As soon as the effect is added to an object with 3 dimensions it just displaces outwards from the normal of the surface, it doesn't actually bend it. So when using it on a tree model, you'd only add the wind function to the leaf shaders. Otherwise, you just get branches getting thicker and thinner as the noise rolls over them.

Oshyan: Thanks for the offer. No, I'm not using any GI at the moment, my little computer would be here forever rendering animations with high enough detail and GI to stop lighting discrepancies over frames. If I get anything together that I'd like help to render I'll give you a shout, very gratefully. :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Oshyan on April 25, 2011, 08:14:27 pm
Yes, this a nice and subtle wind effect. Just the thing to liven up a heavily vegetated scene with a slow camera motion. Keep on experimenting!

- Oshyan
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Dune on April 26, 2011, 02:57:40 am
Great experiment, Martin. But... I wouldn't want to walk on your moving grass; it almost seems to attack you  :D. Not personally meant, of course. Have you tried a twist and shear or redirect shader to really bend the whole grass leaf/stem into one direction? Then you'd really have windblown grass. I might be tricky if the grass objects are rotated in 360 degrees, but there will be a way, I'm sure.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: inkydigit on April 26, 2011, 05:55:42 am
nice work D!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Tangled-Universe on April 26, 2011, 05:58:24 am
Fantastic experiments Martin :)
Too bad it can't be rendered with the raytracer!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Kadri on April 26, 2011, 07:28:30 am

Sweet  :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 11:40:36 am
A short tree population test update.

http://www.youtube.com/watch?v=pA5r0cviLoM
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Seth on April 26, 2011, 12:12:26 pm
nice
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Themodman101 on April 26, 2011, 12:44:07 pm
Definetly looking better thats for sure.. Does this add to render time?
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 12:45:48 pm
I'm in the middle of doubling the length of the trees and clouds animation. Another 60 frames = 2 more hours rendering so I'll update the video later once it's done. I'm on frame 90 of 120 just now...
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Zairyn Arsyn on April 26, 2011, 12:47:43 pm
a while back i came across a CG video kind of like this, showing tree branches and leaves moving in the wind, but i cant remember the name of it or what software they used.
(i thought it was TG2 at first, :) & was wondering if it was by somebody on the forums here)  
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 12:49:50 pm
Themodman, nope. The time per frame is pretty much exactly the same with or without the wind effect. It's just a smooth fractal which bends each leaf via the displacement channel. Since leaves are generally planar objects only bending occurs, no actual normal displacement is being calculated that would bulk the objects up and add to render time. Nice, eh? :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 12:58:12 pm
Vue does this with a simple checkbox and a wind speed/direction parameter. The thing is, Terragen can pretty much do everything Vue can(render wise, I mean, we don't have plant generation or unique instancing yet), you just need to tell it how to do it.
It's a shame that the model geometry can't be bent, maybe by altering the world position of the bending noise but, as soon as it's added to an object, the noise takes on the 'object normal' instead of the world coords.

Still, I think it looks very nice, for something that isn't an actual included feature of TG. Multiple objects all blowing gently in the wind would look fabulous, I think.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Themodman101 on April 26, 2011, 01:05:39 pm
well I have 2 PC's with I7's in them, one is 920 and one is a 970 Extreme. Would you like me to render any sequences?
I have TG2 Deep Edition.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Seth on April 26, 2011, 01:06:07 pm
Quote from: dandelO on April 26, 2011, 12:58:12 pm


Still, I think it looks very nice, for something that isn't an actual included feature of TG. Multiple objects all blowing gently in the wind would look fabulous, I think.


I agree with you on that
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 01:09:22 pm
If you have the animation capability then I might give you a shout at some point, man. :)
I only have a little dual core@2ghz to render on so things can get a little tedious sometimes if each frame takes any longer than a minute or two.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Themodman101 on April 26, 2011, 01:11:54 pm
Yeah I have everything, My school is awesome that way.. Well not everything, I have animation at least. XD

Okay well send your file when you want to, I generally am away at school 8 hours a day. so its not like its a problem.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 01:15:06 pm
Seth, imagine your test forest (http://www.youtube.com/watch?v=Pp_8o-8N5Ck) or, Ecoute ta Nature (http://www.youtube.com/watch?v=6XkKYLBCDOM&feature=channel_video_title)(with maybe a slower camera path in that one to see the blowing). Those would look even more amazing!

* Frame 105 now...
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 02:15:28 pm
Doubled the length. Excuse the Cinepak compression and the further Youtube degradation. I'll try and get the HQ one up on Vimeo later.

Render detail=0.75 AA=4.
http://www.youtube.com/watch?v=K63B7q-elUU

* This post will take away my current post count so I'll immortalize it here.

[attachimg=#]

;)

* HQ version uploading to Vimeo. Weirdly, the 30 minute waiting time for a free account upload seems to have been raised to 1 hour 20 minutes, gah! ...
Title: Re: Blowing - Trees update page 2 - WIP
Post by: RArcher on April 26, 2011, 02:45:08 pm
This is all really impressive.  Since the Raytracing objects became available I haven't messed around with the older style of rendering the objects.  Are these tests all done using the "Medium Quality" setting?  Have you tried anything using "Ultra Quality"?
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 03:09:59 pm
Hi, Ryan. These tree tests used medium quality, I forgot to change it here. Doh!

The grass ones used 'very high quality'. I didn't see much difference between that and ultra, to be honest.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 03:20:51 pm
Cool. I just ran a test on 'ultra' on an arbitrary frame... Turns out it was 1/4 faster to render. Work that one out.

[attachimg=#]
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 26, 2011, 03:30:03 pm
Vimeo link; http://vimeo.com/22905125

Still looks a bit dodgy because it's resized up to fit the window. It should be at the size of the frames above. Oh well.


View it at the correct size without stretching on my site.

https://sites.google.com/site/d4nd310/animations-1
Title: Re: Blowing - Trees update page 2 - WIP
Post by: inkydigit on April 26, 2011, 04:39:07 pm
I can smell the pine...super work!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: max_thehitman on April 26, 2011, 04:39:34 pm
Your an amazing and gifted artist! *Big Applause*  8)
That´s a really cool movie and extra cool special effects craftsmanship.
Amazing!


Title: Re: Blowing - Trees update page 2 - WIP
Post by: Matt on April 27, 2011, 07:53:14 am
dandelO,

Since when were displacements in TG limited to the normal? You can displace objects in any direction using a Redirect Shader ;) Go do your magic...
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 27, 2011, 07:58:28 am
Hi, Matt. I tried and found that the tree trunks just seemed to be getting thicker and thinner as the noise rolled over them. Maybe I just had the scales too small so it looked that way, I'll see if I have any temp files to show what I mean. Cheers. :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Matt on April 27, 2011, 08:05:06 am
Your noise scale would have to be much larger than the width of your trunks and branches, and then you won't notice much change in thickness. But, if you think about it, you need the scale to be much larger anyway, because trunks don't bend as much as leaves!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 27, 2011, 08:06:33 am
I don't have any now, the images are all overwritten. I'll try again after.
I must have just went with too small a scale for the tree trunks. Shame, I'm 70 frames into another 120 just now. :D
Title: Re: Blowing - Trees update page 2 - WIP
Post by: jo on April 27, 2011, 08:37:11 am
Awesome stuff dandelO :-).
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hetzen on April 27, 2011, 08:45:47 am
Awesome trail blazing DandelO. That redirect tip seems like something worth exploring too.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Kadri on April 27, 2011, 12:15:03 pm

This was lacking in the old TG2 animations . Very nice DandelO !
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Matt on April 27, 2011, 01:57:04 pm
When you try the Redirect method (which you should), I would apply it to the whole model, but continue using your existing method for the leaves because it gives each leaf a different direction which is probably more interesting for leaves that are very close together. So for the leaves I would have the existing method followed by a Redirect shader with the overall tree motion. For the trunk, just the Redirect shader with overall tree motion.

Or you can put the Redirect shader after the Parts Shader, so it applies to everything.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on April 27, 2011, 02:58:50 pm
Cheers, folks. When I get back to it I'll keep all these suggestions in mind. We'll have a complete weather system before long! :)

Meantime, here's another little video with a small pan and zoom movement and wind over 4 populations. I couldn't render it any bigger or higher. 576x360px, Detail=0.5, AA=3, GI=0, Detail blending=0.

http://www.youtube.com/watch?v=c1BScGDO-5E

Cheers for looking! :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Oshyan on April 27, 2011, 03:08:07 pm
Looks pretty good. Can't wait to see what comes of the whole tree variation...

- Oshyan
Title: Re: Blowing - Trees update page 2 - WIP
Post by: reck on April 27, 2011, 04:04:49 pm
This is a very exciting thread to follow, loving the results so far.

Only disappointment! Just wish dandelO had a top of the range sandy bridge computer with loads of ram so we could could see higher quality results and more more more.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Oshyan on April 27, 2011, 04:16:35 pm
This is one of those times where an easy to use distributed rendering network would be very nice. I'm sure there are lots of people here who would gladly contribute compute time to these sort of projects (myself included).

- Oshyan
Title: Re: Blowing - Trees update page 2 - WIP
Post by: reck on April 27, 2011, 04:33:08 pm
Quote from: Oshyan on April 27, 2011, 04:16:35 pm
This is one of those times where an easy to use distributed rendering network would be very nice. I'm sure there are lots of people here who would gladly contribute compute time to these sort of projects (myself included).

- Oshyan


Absolutely. I don't have dandelO's knowledge or skill but would gladly give some cpu cycles to help get some results out faster.

I do wish planetside could package up these exciting techniques that people like dandelO (wind) and dune (waves) have created into easy to control and understand gui controls (buttons\sliders) so thicko's like me could use them without having to understand maths nodes.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Dune on April 28, 2011, 02:29:20 am
I'm pretty sure the guys at Planetside inhale all the stuff that's being done, and use the knowledge to improve TG2. It would indeed be very handy to have it like ready made nodes, as the network is sometimes getting to complicated to understand what I've done myself, if I wouldn't work on it regularly. The future of TG2 will be awesome, no doubt!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Gannaingh on April 28, 2011, 11:17:13 am
Dang! I'm gone for a could days and dandelO decides to invent the wind ;D Awesome work dude, this is the sort of thing that really will bump up the realism in terragen animations!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Floating.Point on May 04, 2011, 09:14:22 am
You are so Awesome!  :D
Title: Re: Blowing - Trees update page 2 - WIP
Post by: JimB on May 05, 2011, 07:10:08 am
Bloody Nora!!!!

That's the most impressively awesomely useful much needed thing ever, ever!

Don't you dare stop  ;)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: freelancah on May 05, 2011, 03:38:42 pm
Very impressive! It looks like you pushing the boundaries once again! *clap*
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 05, 2011, 04:39:34 pm
Cheers, folks! :)
Been absent for a wee while, having a little break, only cracked open TG for a quick blast at the Pitlochry image that I added earlier. I'll get back to this windy thing, with a fresh outlook, in a bit. That's usually how it works...

It's far from rocket science, just the TG procedurals that you all have on your desktops as well. Get busy, you lot!

* Reck; If you'd like to aid with my Sandy Bridge fund, I'd be more than grateful. I joke! ;)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 08, 2011, 09:29:50 am
dandelO, this looks awesome!! Any chances to show us your settings? How do I have to use and place the redirect shader?
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 08, 2011, 09:46:40 am
Thanks, Hannes. I'm not sure where this one is headed at the moment so no settings will be posted until it's finalized and made a bit more comprehensive for use in other scenes, which I will post back to this thread with any details. It might not actually be posted to the forums after all but, like I said, I'll update here with any news...
As it is, there is no redirect shader used so far.

:)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 08, 2011, 10:07:19 am
Thank you, dandelO, so I'll give it a try to achieve some similar results (hopefully!)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 11, 2011, 03:44:15 pm
Update, 4x longer. (http://www.youtube.com/watch?v=go58vFmryN8)

Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 11, 2011, 04:40:36 pm
This looks so natural! During the last days I tried to make something similar, but no matter what I tried, it looked weird. Either the leaves weren't moving at all, or they were exploding. I tried a lot of scale settings, but with no success. What kind of power fractal are you using, and are there any other secrets?
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Seth on May 11, 2011, 06:27:35 pm
Awesome mate !!! awesome !
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Kadri on May 11, 2011, 06:39:16 pm
Quote from: Hannes on May 11, 2011, 04:40:36 pm
This looks so natural! ...


Yes and i couldn't see weird cropped grass in this close shot !
Title: Re: Blowing - Trees update page 2 - WIP
Post by: max_thehitman on May 11, 2011, 07:21:13 pm


Looking great! Your pushing the limits and boundaries on this TG2 gadget,
DandelO is THE Man!  8) *Big Applause*
Congratulations on a fine job !

I wonder if it´s possible to add rotating moon(s) and planets to a scene? I guess its possible
with TG2.

I few years back some dude (TheFakingHoaxer) on YouTube was posting some interesting scenes
made with CGI and photoshop, and one of the scenes was a rotating Moon.  ;) 
Everyone knows our moon does not rotate, but he made a short film of how things would look
like if our Moon would rotate as it crossed the skies.
Check out some videos for some interesting ideas that might also work using TG2.
http://www.youtube.com/watch?v=4N51qlqQ9iY&feature=channel_video_title
http://www.youtube.com/user/TheFakingHoaxer

Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 11, 2011, 08:45:33 pm
Cheers, all.

Kadri, there were 30-something frames of 480 that I had to manually edit. There was no chopping of grass close to the camera, though, so that part was OK. The problem was the sun's disc, which was visible through single blades that passed over it, if no other blades were in front of them. It was fine when more than one blade passed over the disc of the sun. So, if there's more than one object in front of the sun then that might be something to keep in mind to make use of, instead of the render-heavy 'receive shadows from surfaces', in problematic scenes... don't know.

Hannes. A flat-scaled fractal or noise pattern enters the leaf shader's 'displacement function'. The amount of actual geometry movement by that noise function is controlled by the displacement amplitude. This is varied over the frame range by shifting the noise pattern continually along whatever axis you choose the wind to be blowing.
If any of your scales in the noise function or amplitude are smaller than the object you're applying it to then you'll likely find stretching, tearing, exploding, etc.

Practice on a TG grass clump. Set 'number of blades' to '1' and get nice and close with the camera, you'll see exactly what's happening that way, over just two or three really quick test frames... ;)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 11, 2011, 08:50:25 pm
Max. You can rotate planets in TG2.3.

You can even force them to rotate with their textures and atmospheres in 2.3 but, that's not an enabled feature yet so, I'll let you work out how to do that last part yourself. ;)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Kadri on May 11, 2011, 09:09:38 pm

Thanks , DandelO  :)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 12, 2011, 02:08:30 am
Thanks dandelO, I'll give it a try!!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Dune on May 12, 2011, 04:15:59 am
I tried this as well, but the only glitch I see is that the shadow of the grass remains at the old spot. Not a big issue I'd say, though. Very well thought out, Martin.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 12, 2011, 06:39:02 am
OK, I got it so far. As you suggested I tried it with the grass clump. It's moving quite natural. When I transfer this displacement to the material of a tree's leaves (which is in the same scene, so the scale of the objects is OK), I see something's happening, but it's not very remarkable. Should I increase the displacement multiplier or should I play with the displacement amplitude of the PF? What does this amplitude actually do? Must I increase or decrease it to get more motion?
Sorry for my dumb questions, but all this theoretical stuff is quite complicated (for me! :-[)
Title: Re: Blowing - Trees update page 2 - WIP
Post by: inkydigit on May 12, 2011, 09:21:27 am
I echo Seth....wickedly cool!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 17, 2011, 03:25:28 am
Are you still working on this? How on earth did you achieve this incredibly natural movement? I'm quite desperate :(
No matter what I tried, it looked completely artificial. I tried all combinations of scale and amplitude, but either the leaves were all moving in sync or they were exploding. I'd really appreciate some help!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Oshyan on May 17, 2011, 03:31:54 am
I agree, share your magic! ;D

- Oshyan
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on May 17, 2011, 02:32:12 pm
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.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Tangled-Universe on May 17, 2011, 02:40:03 pm
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.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 18, 2011, 02:56:34 am
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.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Hannes on May 18, 2011, 06:01:22 am
Btw, don't worry about the other missing objects. They were just for testing purposes, and I forgot to delete them.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: 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!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: Tangled-Universe on June 21, 2011, 04:23:19 am
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!
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on June 23, 2011, 05:42:19 pm
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
Title: Re: Blowing - Trees update page 2 - WIP
Post by: gregsandor on June 23, 2011, 05:45:40 pm
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.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on June 23, 2011, 06:02:49 pm
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...
Title: Re: Blowing - Trees update page 2 - WIP
Post by: dandelO on November 14, 2011, 04:11:11 pm
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 (http://www.youtube.com/watch?v=QFsdnokwOjE)

Cheers! :)
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: TheBadger on November 14, 2011, 07:27:33 pm
I cant wait to try this stuff. Thanks Martin
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: dandelO on November 14, 2011, 07:42:57 pm
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
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: rcallicotte on March 03, 2012, 11:25:22 pm
Wow.  You guys were are doing great.

I have some fun to catch.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: bla bla 2 on March 14, 2012, 05:21:24 am
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.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: ajcgi on March 14, 2012, 06:59:27 am
Wow there have really been some interesting experiments on these forums of late!
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: otakar on March 14, 2012, 11:45:34 am
Very impressive work, Martin.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: bla bla 2 on March 16, 2012, 01:43:29 pm
Ca ne marche pas chez moi, je vois juste que ca change de vert plus clair au foncer. Je voudrais bien faire du vent.


It does not work at home, I just see that it will change from green light to darken. I would love to wind.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: TheBadger on March 16, 2012, 09:59:36 pm
lol

Since this tread is up front again... I'm not to proud to beg, yet again.
Martin, Do you think there is a way to make your effect fit into a few nodes that anyone could just plug into their own network and get wind? Something like your grass and sand, where the user can make simple changes, in this case wind direction and speed? With the new partnership between planetside and the render farm I think doing animations with wind may be more practical now. What do you think?
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: dandelO on March 17, 2012, 12:39:19 pm
I don't think I can make it any easier to explain than I have here: http://forums.planetside.co.uk/index.php?topic=12191.msg124055#msg124055

As for making it into a few nodes that anyone can fit into a scene, really it is only 2 nodes that require pretty minimal editing. Simply add a power fractal, add a transform shader. Done.
Make sure the fractal is flat-scaled(2 octave) to suit the leaves of the tree(this is why you can't really make it fit all scenes, not everyone scales their scenes the same and a real scale wind effect wouldn't work on a(say) 10x model scale, that some packages export). I always use real scales and I'd encourage everyone else to as well. With all features of the fractal now being of randomly equal size, you now have a smooth noise to transform over time on any axis.

Really, once the fractal is created and the scales adjusted to all be '1', you never need to touch it again. The transform shader does everything. If you have a 10x scale tree, just enter '10' in the scale of the transform shader to rescale the wind to fit.
Scaling up by 10 means you should also scale up the wind speed, controlled by any of the 'translate' parameters, just multiply the translate value by 10.

MOST IMPORTANTLY: You can't use 'ray trace objects'.

I'll make a small example with a grass clump and upload later, busy just now.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: bla bla 2 on March 19, 2012, 03:58:55 pm
Peut-on voir dans le preview l'effet de vent ? Je pense que oui.  :-\

Can we see in the preview the effect of wind? I think so.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: dandelO on March 22, 2012, 02:38:29 pm
No, you won't see the wind in the 3D preview window, Bastien, it won't affect your wireframes.
You will see it in the 'shader preview' window for the leaf shader. To see it, set the projection method to 'through camera'. Remember to set it back to 'object UV' before rendering, though. You can see how it looks in the shader preview .gif that I added to the explanation on the previous page.

* I forgot to come back here with a grass clump example file, I'll do it shortly...
Title: Re: Blowing wind + Grass.tgd
Post by: dandelO on March 22, 2012, 04:33:31 pm
Sorry for not getting back to this thread with an example sooner, I forgot.

I'm attaching the .tgd for this image;

(http://img607.imageshack.us/img607/3947/grasswind.gif)

I have left all the shaders in the main node network view for ease of access, if you make a new grass clump, the shader will be inside it and you should set the wind shader to it with a right-click on the 'displacement function and selecting the transform shader from the node list menu. (or, just create the shaders inside the grass clump node but you might want to use the wind nodes for more than one object, leaving it in the main node network makes it easier to find and apply to each model you like).

The power fractal is set to scales='1', you don't need to apply any displacement here, it won't have any effect.
The transform shader moves the fractal colour upwards(Y) by 5m over 50 frames.
The 'default shader' uses the transformed fractal colour as its 'displacement function'(value='1')

* To see the effect of the wind, open the 'shader preview' window for 'default shader 1'. I've set it to around 3m so we are quite close to the shader. Move the camera and then just advance through the frames, you will see the shader preview update in real time.

Download .tgd[attachimg=#]
Title: Re: Blowing wind + Grass.tgd
Post by: dandelO on March 22, 2012, 04:36:40 pm
* You'll notice that the shadows don't react, there's nothing I can do about that, sorry, it's just the way of the program.
Title: Re: Blowing - Trees update page 2 - WIP
Post by: PabloMack on December 29, 2013, 03:39:45 pm
Quote from: Hannes on May 18, 2011, 02:56:34 amThank you so much for your explanation, dandelO! I tested your method with MGebhart's first pack of Generic Pines (Nr. One)...and it worked very well. This model has alpha mapped images of needles and twigs on quite large billboards which move nicely and natural.


Hannes, I copied your two nodes into a scene where I am using XFrog's Adult Sequoia giganteum. I am not an Apple user so I did not pull down the generic pine. I scaled the X&Y Transforms so that the change per unit time is the same as what you have. The model I am using only has one needle part so I applied the Transform Shader to its displacement input. My trees are doing absolutely nothing detectable over time. I have spent most of the day on it and I am frustrated. But I have the water and clouds moving fine. I don't know why my Sequoia leaf parts are not moving.

One thing I noticed that was not talked about is that the color low (black) and color high (white) seem to define the range for the Power Fractal Output. Also, it would seem that the interpolation method should be set to Linear instead of TCB in the Transform Shader since any point you begin "observing" the clip is an arbitrary point in a continuous process.

[attach=1]
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: Oshyan on December 29, 2013, 03:45:29 pm
Are you either A: disabling Raytrace Objects (RTO), OR using the new (in Terragen 3) Mesh Displacer Input?

- Oshyan
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: PabloMack on December 29, 2013, 04:38:14 pm
Quote from: Oshyan on December 29, 2013, 03:45:29 pmAre you either A: disabling Raytrace Objects (RTO), OR using the new (in Terragen 3) Mesh Displacer Input?


I disabled the RTO in the Render Panel and Whaaaaooooooh.....The tree looks burned to a crisp and three buckets are rendered such that they look zoomed in on some foliage. But the foliage now moves.

[attach=1]

Is this Mesh Displacer a new input to an existing node or is it a new node type? I do not see such an input on the Sequoia Needle part node. Where is it supposed to be?
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: Oshyan on December 29, 2013, 04:41:46 pm
So now your displacement is probably too extreme (with RTO off), but at least it's getting results now. :D Raytrace Objects does *not* allow displacement at present, and since the technique described in this thread relies on displacing objects to work, you have to turn off RTO to get it to work.

The new Mesh Displacer is an input on each *Object* node (not in the internal shader network/parts shader/etc.). Because it is an input to the Object, it operates on the object as a whole, so you can't only move 1 part, for example leaves animated without trunk being oddly distorted. But it *does* work with RTO turned on. Look in an Object node on the Mesh tab...

- Oshyan
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: PabloMack on December 29, 2013, 05:32:04 pm
I have copied the two nodes that were plugged into the Displacement Input on the Needle Part node and these are now input to the Object Population Mesh Displacement Input (which is the only input to that node type). I am now rendering the second frame with Ray Trace enabled. It looks very promising. There is a noticable difference between frame 1 and frame 31. I plan to set up an animation render while I'm off to visit with family. Thanks so much for the help.

I can see the challenge that TG is going to experience in creating a "Wind Input" into Object nodes if they ever decide to do one. Starting at the root, the further from the root the part is the more it can sway and twist. There is a sort of continuous Parent-Child relationship along the connection of a plant from the root to the distal-most parts (leaves). Without an explicit skeleton, each model will have to be analyzed for its skeletal structure. Its not going to be easy.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: PabloMack on December 30, 2013, 10:14:28 am
In case anyone is interested, I achieved close to the subtle look I was shooting for. I used the Mesh Displacement input of the population node that Oshyan was suggesting. Since it works with Ray-tracing, I think it is the way to go. I have yet to test it with shadows, though, but it should work.

http://www.youtube.com/watch?v=7Z7V_orPbIA
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: Dune on December 30, 2013, 10:23:27 am
Subtle indeed, nice and interesting test.
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: Oshyan on December 30, 2013, 02:41:10 pm
Not bad. As long as the camera is not in close-up on vegetation it should be just fine. And yes, since it's raytracing the mesh deformation, the shadows will be correct, unlike displacement with RTO off.

- Oshyan
Title: Re: Blowing - Trees - 1280x720px page 6...
Post by: PabloMack on December 30, 2013, 05:18:05 pm
I had to do something to lower the amount of motion with the original settings because the tree looked comical like it was doing calisthenics. My mistake was to turn down the scale (using the Power Fractal Node) when I mainly needed to slow down the speed (using the Transform Shader) and the Amplitude. The movement was too much so I have lowered the Displacement Amplitude in the Power Fractal Node and, hopefully, this will keep the scale where dandelO and Hannes have it but the motion will not be too much.

I have verified that the shadows do reflect the motion. Now I think it just needs some fine tuning.