After the grass animation, next step is a tree.
Left is animated. Quality is a poor for the 1st render.
Thanks a lot to Martin and Hannesfor their precious help.
Larger render on Youtube website : https://youtu.be/m6vyZKNJVW8
I also noticed that animation is not applied to shadow.
I got the idea then not to cast shadow of the animated tree. And cast shadow of an invisble animated tree (just by some rotation).
Not sure it could work.
David
If you're using the Mesh Displacer, the shadow will change as it should. But if using a displacement shader, it won't with the current renderer.
Matt
Unless you maybe force displacement? Which is not the solution of course.
I had a test of my idea "not to cast shadow of the animated tree. And cast shadow of an invisble animated tree (just by some rotation)"
it does not work. in fact it works on ground but it affects the visible tree also and gives weird animated shadows on it.
So it is not the solution.
I keep for now the displacement shader as I am not able to find the good parameters with mesh displacer (no result on animation).
David
David not sure what the problem is but don't hesitate to use some very high numbers.
When i am not sure sometimes if the feature is adding anything or not i put very extreme numbers and work my way from there.
My problem with mesh displacer was in a topic I opened for it.
http://www.planetside.co.uk/forums/index.php/topic,20334.0.html
In fact, I see an effect but anything else when animated.
That's why I followed the useful explanations of Dandel0 and Hannes about displacement shader.
I could not find any example of working animated mesh displacer to study or any shared file about it
David
I did not understand the problem in your other thread.
Just curious.If i have time i will have a look too David.
I tried it David.
Not sure what way you used in the Mesh displacer.
*If you animate the object with a powerfractal with the Scale tab it worked.
*If you put a transform input node (not sure about "world space") between the powerfractal node and the object and change the position in time it works.
*But i could not animate with the "Animation" tab in the Powerfractal node.
I will have a closer look on the last part.Maybe it was too slow?
Just to see the animation easier i used a basic high poly ball object.
It might be harder to see in a tree object maybe with small displacements?
Edit: No i could not animate with the Animation tab (4D noise).
Other then this, Mesh displacing should work mostly.The shadows are correct too.
Quote from: kaedorg on August 04, 2015, 03:51:19 AM
My problem with mesh displacer was in a topic I opened for it.
http://www.planetside.co.uk/forums/index.php/topic,20334.0.html
...
If you could put a link to this thread others who might see it later could find this thread more easily David.
Thanks for your help Kadri
I use a transform input shader and I animate it.
I am testing it again, if it doesn't work, ill post the tgd
David
OK.If you want i can post my TGD too. But it is really very basic.
please do it, i could check it while mine is rendering
David
Here is it.
Thanks Kadri
I had a look. I don't animate anything in the PF as I thought that would deform the object and I just want a motion.
I connect the transform input shader and animate as you did.
I don't know if the problem comes from this.
Update : my render still working but with the first 13 bmp, it seems to work (both object and shadow). It just seems that I'll have to make several test to find the good parameters for simulating a wind. It seems moving too much.
I'll post the test when done.
David
Quote from: kaedorg on August 04, 2015, 09:54:16 AM
... I don't animate anything in the PF as I thought that would deform the object and I just want a motion.
I connect the transform input shader and animate as you did.
...
Actually each of the two different approaches does deform the object.
It is only a different kind of deforming.
You are moving the 3D powerfractal structure in world space.
The animation of the scales are deforming the object as the Powerfractal changes structure in time so to speak.
You get different looks of course. For wind your approach might be better probably. Use whatever works or you like in the end :)
Curious why the 4D noise option doesn't seems to work.
Here is the result.
It works but it is awful ::). Specially for the trunk.
I still have no idea to reduce the effect.
Do I have to reduce or raise the values in the transform input shader ?
Do I have to reduce or raise the values in the PF ?
At least, I need to study that and try more tests. I just feel that I'm on the right road.
Thanks again Kadri for the help
David
The important thing is that you got it to work :)
I can't say much without trying myself.
What if you use much bigger values for the PF, maybe the smallest size like 25% of the tree height? Then perhaps the whole tree will bend and sway, instead of the small scale jittering.
I don't know when the displacement is getting its shape in the object or parts, but perhaps if you add a surface shader after the default for the trunk and set that to smooth, you could eliminate the former displacement. But perhaps (likely) it works differently. And you'll loose the bark displacement.
Another option is to make trees as two objects; trunks and leaves separately, populated by the same specs, but that's a hassle too.
But with far less displacement in this setup you might get quite far. Or 2 displacemnt PF's, one for the whole tree, as said with all big patches/sizes, and another with all small sizes, but very little displacement (2cm). Too bad it takes so long to render a sequence...
And speaking about render times...
David don't use any atmosphere,maybe GI and ground even. Crop the camera close to the tree etc.
Use only the tree with so much low settings you can use for tests like this.
Thanks for your comments and advices.
Ulco : interesting idea to separate the tree in 2 objects. But I thought that you need 3 displacement PF. 1 for the tree. 1 exact copy for the leaves (that one should allow leaves to follow the tree) and 1 for the small displacement of the leaves. Not sure of it.
I am doing another reducing the value in the transform input shader. It seems better except a very bad twist at the base of the trunk.
I will add the sequence
David
You need to do a lot of test renderings before you get the settings right.
Change your animation from TCB to linear to give it the constant speed all the time. Animate your transform shader upwards and to one side as well. Don't move it too fast. I'd say the size of the PF is OK, maybe a little bit too small.
The wobbling trunk is indeed a problem. You could restrict the mesh displacer by a distribution shader with an altitude constraint (using an additional transform shader with "world scale" checked), which works for a single tree and keeps the lower part rigid. Not exact, but working somehow.
Or you could refine Ulco's idea: copy the tree, make the trunk of the mesh displaced one invisible by using an opacity of "0", and delete the mesh displacer of the copied one and make it's foliage invisible. The downside is: even the smaller branches are rigid although the leaves are moving. But maybe from a distance it works?
With the mesh displacer you'll have the correctly moving shadows. I think for animated trees it's the best choice.
Anyone tried it with the Twist and shear shader ? For especially the trunk it could be better maybe in theory.
Cool idea. Never tried it.
Good idea. For populations on slopes that's harder as the pivot is set for the whole pop (default at Y=0). I don't know if that can be changed somehow.
Yeah that looks a little problematic.
If there is a way to twist every object related to its pivot point or relative to the ground it would be easy.
If the "Lean to terrain/object normal" setting in the Rotation could be altered with other nodes it would be enough too (maybe it is the same as i said above).
Maybe if a hidden second exact same terrain is used and is displaced just a little bit in time with Lean to terrain?
Not sure if you have to populate every frame for this to work?
If the terrain changes the number of objects and position would change too?
Anyone have time to try this? :D
Thinking loud...
With only lean to terrain the tree would change from bottom to the top the same way.
There is still need for some powerfractal or Twist and shear that changes in the Y axis.
You can mask the T&S by a PF. Better use not the hard B&W, but grey and white.
Yes and maybe together with constrained by altitude?
I feel like always in Terragen there are more then one ways for this.
I got curious and are rendering a small test just now. Without masks etc. just for the lean effect.
Displacing the hidden ground a little brings too much wobbling to the object.
Might work maybe but did not like it so much for trees.
For objects that are on water it might work better probably. Because there is a small Y displacement too.
Just changing the leaning effect in time is nice but doesn't look random like a wind effect.
Animating at the same time the Y rotation might be useful for objects that are not uniformly straight.
For trees it could be added maybe just for a little different motion.
If we could change the leaning effect with other nodes that would be nice.
But it would still need different displacement like David is trying here probably.
Here is the next try. Better but as I said previously, the twist at the base of the trunk is really bad.
I reduced a lot the values in the transform input shader.
No change on the PF for this one.
I think that the twist happens because I animate the 3 values. So next one will be with 2 animated values.
David
Much better.
Just because i like GIF's :)
Both nice. It's funny to watch the individual leaves of your tree, David. They rotate and go up and down, kind of. The best of course, would be to keep the stem of the leaf in place, wiggle the leaftop/end a little AND the whole tree and branches with their leaves. But that's awfully complicated; you'd need a mask based on the individual UV'd leaf (like the opacity map) to make a gradient for each leaf's movement (base black, tip white). But then the branches, pff...
I like your gif too, Kadri, fascinating. So that's the strength of the rotation (by normal) animated? I have asked before if it's possible to have different bases for 'sitting on' and angle/normal. So you could add a displacement, but only the normal would be used to give an object another angle on the ground it's sitting on. I recall even as issue in the alpha forum, but I guess that's far from being a possibility. Rare use also, I guess. I wanted it to get trees to fall by wind, all in more or less one direction, but without needing to restrict the rotation of the instances from 0-360 to say 0-60. I did that another way (which worked).
Not sure what you exactly mean Ulco.
The GIF version is only animated with the "Lean effect".
I tried the "Minimum and Maximum Y rotation" too as i tried to explain in my above post.
But it rotates only in the Y axis. I think you mean this?
If a grass object -for example- does have a bended shape it could help to sell a little more variance in motion maybe.
The leaning effect could still be used with more then one populations
in the same space (masked) with different timing and-or values to break the similarity in the motion.
The effect in that GIF is pretty cool!
kaedorg, I think for one thing your displacement is too *strong* (too high a value for Displacement Amplitude and/or multiplier). It also is moving in perhaps too many dimensions. I think 2 dimensions is probably fine, although of course a real tree moves in 3. But I would guess, for example, there is more side-to-side movement than up-and-down movement in real life...
- Oshyan
When you use a Mesh Displacer, it's important to think about the direction of the displacement. For a wind effect, you want to displace in all 3 directions. I would use a Redirect Shader with 3 differently-seeded fractals plugged into X, Y and Z inputs. That way you will have random 3D deformation.
Displacement shaders displace along what they think is the surface normal. But for a wind effect you don't want to displace along the surface normal. Even if you did, with mesh displacement in current versions the surface normal isn't available anyway, so it just displaces along a vector pointing outwards from the object's origin, and that's why you see it bulging in and out at the base of the trunk. Either way, surface normal or vector pointing away from the origin, neither of those are going to look much like wind. Using the Redirect Shader you control the direction of the displacement.
Matt
Another small test.
This time with a transformed powerfractal that is restricted in altitude with a surface layer and an animated leaning effect.
Looks like it works (the restriction) but i have not looked closer.
If anyone wants to play more the file is below. There are many more possibilities.
Looks like you have something on your mind for the future Matt? ::) :)
Quote from: Kadri on August 05, 2015, 04:53:01 PM
Looks like you have something on your mind for the future Matt? ::) :)
Always :) This particular technique has been done by members of this forum before, so you don't have to wait for me to add something to make it happen. But truly realistic wind animation that considers the structure of the tree is another story that we will get to in future...
Matt
Yes, i was just having fun the first time myself :)
For this test, i followed Hannes' idea.
2 exact copies of the tree.
First one has the mesh displacer. Opacity set to 0 for the bark.
Second one has opacity set to 0 for the leaves.
I agree with Matt. Displacement is too strong for leaves. But now I get a method and it is just a question of time (and render time :P) to find the good values.
I'll also study Ulco and Kadri ideas.
David
@ Kadri; your setup is exactly what I meant. Interesting to see where you get this, David.
Quote from: Dune on August 06, 2015, 01:54:33 AM
@ Kadri; your setup is exactly what I meant...
:)
David that is close.Depends on the look you want.
I have more smaller moves in my mind for example.
Edit: One thing i would change is the animation seems to stop in the middle for all the leaves.
Stop is probably because the transformation is reversed.
Kadri : ulco is right, the transformation is reversed at frame 100 (middle).
values go from 0 (frame 0) to 1 (frame 100) then to 0 (frame 200).
I could try something like 0 (-1) 100 (0) 200 (1) to see if this stop disappear.
I think that for longer animation, i would need to reverse it.
Also, with a wind effect, the motion is a way go and back anyway.
David
I'd recommend not to reverse it. Go from 0 to a value that gives you a natural speed. At the moment I'm testing a combination of mesh displacer and an animated lean factor as Kadri did.
@Kadri: you checked repopulate every frame, didn't you?
Just did a quick test with the mentioned combination. It looks very promising. The animated lean factor makes the trees sway gently in the wind and the mesh displacer simulates the smaller movements of the smaller branches and twigs and the fluttering leaves.
Of course the trunks move accordingly, but from certain perspective you won't notice it. Or you'll have to use my double population advice hoping that you won't notice the rigid twigs.
I'll show my results asap if you don't mind (it's your thread! ;))
I think you don't need a reverse too David.
Without merged with another powerfractal animation it doesn't look natural if you ask me.
I understand what you mean but just lowering or changing the speed sometimes in the time line would be better to get the look you want.
Or maybe even better as i said merged two or more fractals.
Yes, repopulate every frame was checked Hannes.
Thanks, Kadri.
David, the back and forth motion created by the wind will be simulated by the black and white values of the PF. So reversing the speed won't look natural.
Hannes, thanks again for your precious advices.
Next try will include this.
And please share anything you want. If I start this post, all the contributions make this topic very useful for many people.
David
Here is the next try.
Still with Hannes method. Adding his advice, the values in the transform input shader are not reversed at half of the sequence.
Displacement amplitude has been reduced too.
The impression is better but not perfect. IMO, as there is no other focus on sequence, the impression that all leaves are turning around is too strong.
That would probably be reduced if the view have details everywhere and some other animated objects.
I'll continue to test but I guess I'll start to complete the view to check this.
Before that, I gonna try the Kadri method now. To continued... ;)
David
I think exactly the same as you about the video.Needs more tests to get it right probably.
But it is much better.
I have 2 last tests too.Will post later. Mine needs more tests too :)
This is my last try on the leaves.
It needs much much more tests.And i will leave it at this for now.
When i saw this a different thing came to my mind. That is in the other post :)
*I used leaning effect,powerfractal displacement restricted with a surface layer and a animated transform input.
*I made the tree in 3 parts. It does have a separate trunk,branches and one high poly leaf that is populated on the branches.
The leaf is only populated on the upper side of the branches.
*The populated leaf and the branches are displaced with different nodes and values.The trunk is not animated(not much seen anyway).
The vanishing of some leaves is much less then i anticipated.
The thing about the outward displacing when mesh displacement is used that Matt explaned is to me much more clear here.
The leaves doesn't displace in the normal directions.They look like they are growing smaller and bigger mostly.
I think when this kinda same setup would be used with real displacement (Raytrace OFF) the look might be at least on the leaves much better then this.
This was the accidentally fun part.
The same setup as above with just a second population more of the leaves for the underside of the tree branches.
I changed only the size of all the objects in time.
With more appropriate displacements and maybe even an animated object sequence it might look much better.
I always wanted to make a classic growing tree animation.
Thanks to you even just as a test and by accident i made one David ;)
Here is my attempt of combining a lean factor animation with the mesh displacer.
It's a bit exaggerated, but you may get the impression of how it may look like. There could also be two populations with differently animated lean factors to make the trees sway less uniformly.
The animation of the lean factor only works if the instances are on an uneven terrain of course, so some trees sway more than others, but that's a quite nice side effect.
...and of course there is this ugly pulsating tree trunk to the lower right... ;) :(
Wow.... Great stuff Hannes. Not far from my objectif but still a long road for me ;)
Agree with tree trunk to the lower right.
I'm testing Kadri's lean effect then I'll try to add the transform input shader for leaves.
And Kadri : nice growing tree. Accidental discoveries can give great stuff.
David
Hannes that wind effect would be enough in most cases for me.Nice :)
All very interesting!
The Version in Reply #54 seems one of the most natural for me.
I walked thousands of miles to find this reference tree for this discussion 8) :
[attachurl=1]
Hope it's helpful...
I think, until I have more time, I will keep my planned story on a windless day... There would be too many populations I would have to animate. ;)
Hannes, that animation is super! I only looked at it just now. Very natural windgust. Would you care to share the tgd? Or settings you used?
Unfortunately the scale settings in my file are way too high. If you put in another object and scale it up accordingly the scale of the transforming PF and the speed of the transform shader won't work.
I'll have to create another scene with correct scale settings from scratch. Once more I've learned that I have to use the right scale right from the beginning... :(
Here is the Kadri method. I used his file and just replaced his obect by a tree.
I wanted to see his method on trees.
I think the result is nice (normal I would say with Kadri's work) but leaves need to be animated too.
So now I'll try this. Huge step here.
Hannes, i'm used to not keeping the right scale too. And so many times, problems appear.
David
Looks great so far! Now use two populations (less dense each) and animate the lean factor of each population differently, so that there is more variety in the movement.
I created a new file to explore from scratch (with correct scale settings!!):
http://www.planetside.co.uk/forums/index.php/topic,20353.new.html#new
Thanks very much, Hannes. I will explore for sure and hope to get into the discussion... some day.
Here is another test. I used Hannes method.
In fact, it is a population of 1 tree and not a single object.
It looks very windy but can be like that with winds over 100km/h.
there is no more twist on trunk. that's the good point.
Angle of rotation can be reduced to reduce the speed effect
David
Looks good.
Looks great!
Looks fantastic!!
Indeed, that looks really good!
- Oshyan
Hey guys, what setup did you use? I'm doing a test right now with this line of nodes. But I don't yet know if the T&S will work like this; 2 T&S directions masked by a moving PF. Renders should be done shortly...
Looking at your nodes Ulco, i don't know how they work, so I'll wait for your render...
Busy right now. But tomorrow i'll give a message about my last test.
David
Thanks, David. This is not working, but I got another idea, which seems rather interesting......
Rather than an explanation, i put here the tgd file as I got so much help from Hannes and Kadri.
Most of the idea come from them.
And it could help and be interesting for others.
If you think to better ideas, feel free to share.
Edit : this tgd file gives this render
David
Thanks David! Interesting to compare. I have good faith I'm onto something, but will post tomorrow.
Amazing result, David! Sometimes I really wish I had the animation version, but then again, I don't even have the time to render still scenes these days...
I thought I was on to something, but stumbled on the previously mentioned inability to separate location from angle coming through a last node. So for my method to work it would be necessary that a normal can be calculated from another (extra) node than the one the pop is sitting on. Would be good to make fallen trees (all more or less to one side) as well, without having to resort to a decreased rotation of instances.
The idea was to rotate the normal (or move it, change it by function, setup-2), but the height of the instance location would remain the same. But all you do with rotating is rotate/change all, so also the underlying heights. The trees work like pistons, coming out of the ground, no good.
So animating the amount of rotation to normal is all atm., which is what I did here. But that's a tedious job. I must check your file still, see if you use a different method.
The only other thing I can think of right now is have the population sit on (anchor to) a second planet with the same heights, but somehow derive the normal from the first planet, I'll do a test.
Main problem right for me is that I have to put Limit rotation both at 0.
So If there are several trees in the population, they would be all oriented the same way. And this is bad.
The idea could be to put some single tree populations with different rotations (min and max must be the same) on the foreground.
Then add populations of several varieties with several trees after that with limit rotation both at 0.
The problem could come from memory taken by the number of populations.
David
Ulco my mind works more visually i think and the second language thing isn't helping too.
I can not understand what kind of method you are trying to do really.
To be honest, me neither... :-[
If you sit the population on the ground every instance location has a height (or XYZ) and a normal. If you could somehow keep the height constant, but move the normal, you can keep the rotation angle in the population constant and variation in T&S will be from the variation in normal (by a moving fractal for instance). Hard to explain.
If you add a displaced fractal to the last node (or the compute terrain) and have the population sit on that, and animate that PF, you'll see what happens (with a constant rotation in the pop of course). But it will change the XYZ as well, thus the height the instance sits on, but a nice variation in tilt will also happen. And we only need the latter.
I haven't tested this setup, but I will later. Merely made it to show what I ws thinking.
Do you mean basically holding the same high of the terrain but changing the normals of it Ulco?
Yes.
I see.
Ulco, is it normal or why do your objects jump ?
David
"The trees work like pistons, coming out of the ground, no good."
David that was what he mean probably.
;D Yes, that's the problem. We need only the normal to change, not the height. I might put something like this up at the alpha forum as feature request, as it's far easier to animate swaying trees this way, IMHO...... if it works ;)
EDIT: I see that I've already requested this at alpha, but I've added the file as well. Hope Matt can do something (in due time).