Foliage Growth Effect in Unreal Engine 5.4! (Procedural)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] today we're back with another fun one which is this foliage growth effect using the new motion design mode in Unreal Engine 5.4 I'll go over how to have multiple cloners how to blend different effectors together how to get your shrubs and stuff to all look right I'll also have a few extra tips for animation as well as adding variation to the clones and I just want to give a shout out to all the other tutorials out there in Cinema 4 D and blender and Houdini that have this effect it's just so cool to be able to do a bit more of a basic version unreal but I'm sure we'll eventually get to that level one day and before people get mad at me I know this was possible before with Niagara but it's just a lot more fun to use with the new motion design tools let's jump in I don't know why I'm speaking in that Cadence n tools anyway that should be good okay so this is my pretty much empty scene in Unreal Engine 5.4.0 again this is like the early development build from GitHub I've just got a Studio background with like a super tiny light setup there first thing we'll want to do is download our tree bark asset from quickel bridge so once you have your Bridge open you can just type in bark and scroll down a bit where is it this guy so broken tree bark is the model that I chose to use for this and I've just downloaded it at a high quality and then you can just add it to your project once you've downloaded it just drag it into your scene and then you should have this guy and as you can see it comes in super small I just have this tiny light set up here let me move my bark over and because it's quite small and it kind of looks weird with the foliage at different sizes I'm just going to scale it up to three and that should work it's still actually quite small in real real world scale units but should be fine for this setup now the next asset we need to download is some of the grass I think it's like the Lily something let me see lily of the valley so if we open up our Bridge again just type in uh Lily Valley and it should pop up yeah this guy here so lily of the valley I've downloaded a high quality you probably don't need to but because this was the main uh thicker asset that I clone onto the tree bark I've decided to do the high quality one actually that's a lie I've used medium quality so feel free to use the medium quality if you want now I'm just going to drag these in from the content browser I think I'm just going to use these three for now maybe this guy as well actually no I'll just use the thicker bunches for now so just drag them into the scene as you can see they are huge or actually the tree bark is small but for now I'm just going to scale them down to a 3 should work maybe a15 that should be fine for now cool and I'm just going to spread them out a bit so these should be the three different assets you have in your viewport also quick note this Studio background I'm using uh was actually made using the modeling Tools in unreal so I think I have a video out about that or I'm about to release one on it so just if you do want to learn how to model it in unreal using the updated and new and improved beveling tools check out my video on that now the next thing we need to set up is our cloner and then our effector so I'm just going to hit start on this motion design mode and I'm actually going to change back to default viewport cuz I'm just not a huge fan of the motion design viewport and if you're wondering how I just zoomed into my object there you can just select whatever you want to focus on in the scene and then hit F and that'll uh Zoom to that object in the viewport so the first thing we'll want to get is go to actor and then click on our cloner actor and then click anywhere in the scene and that should make our cloner and then we also want an affector actor so click that and then also click somewhere on the scene now I'm just going to go back to my selection mode and then also drag my cloner or actually I'll just zero out the cloner coordinates and you can see here this is the default coordinates I mean the default cloner with the default Cube I don't know why I'm saying default so many times uh so let's just delete the cube and then hit yes and then grab our lily of the valley uh assets and then drag that onto the cloner and you'll see it has a red uh cross sign on it and the reason for that is cuz we need to make our lily of the valley assets movable so a cloner can only clone movable objects not static so drag that on to cloner and now you'll see these are our little lily of the valley um Lily why does my lily of the valley assets being cloned on a grid another thing you'll notice is the material breaks like it goes gray and that seems to only be happening to me with foliage materials and sometimes it does work but as soon as I hit render in movie render Q it'll go back to gray so for this example I'm actually just going to replace the top material with just a generic green material and you'll notice it hasn't updated yet so sometimes you just got to turn the cloner on and off and that'll update it or you hit force update cloner and then you'll see there it'll update the material so I'm just going to give it a generic green it really is just a green base color with a roughness of 0.3 nothing too special all right cool so now we have our foliage assets in our cloner and let's just rename this to cloner uncore Lily now the next thing we'll need to do is CL CL it onto our mesh so first let me save all because we could crash and if we just select our cloner here and then go to the details panel let's change our layout name I don't know why it's called this but this is the way it clones things let's change it from grid to mesh and then we will just need to grab this uh eye dropper and then pick our uh broken bark and now you'll see we have our we have our lies cloning onto the bark so let me also just move our bark a little more into the light if I can grab the Gizmo so now we've got our lies cloning onto the bark but you'll notice the rotation is off like it's following the rotation of the bark and not actually uh facing the normal of the bark again I'm not sure I explain it like that pretty much what we need to do is rotate our lies to be facing outwards and that is why I initially got this first effect Vector because currently there is no way that I know of at least to rotate each of the Clones individually within the cloner like maybe you would do in Cinema 4D so to change the rotation values we're just going to use this affector so I'm just going to call it affector undor base rotation and then actually go to the front affector uncore Lily actually no we can just leave it at base rotation cuz we can also use that for our next foliage assets that we'll use so first let's check our clone art go to the Plus in the effected and then let's add our new affector which is affector _ base rotation you can ignore these other guys I've just archived them in another folder so that's this guy that we've just added and now if we scroll down here to rotation we can now affect the rotation of our why is it not working oh I know why it's not working we' I've left the type on sphere instead of Unbound so right now it's only working within this sphere what we want to do is change it from sphere to Unbound so it covers our entire scene and now if I make this y value -90 y okay so 90 in the Y value of the rotation should work correctly as you can see here it is popping out and I'm actually going to make our clones a little smaller as well maybe 0.1 yeah that should be good and let's hit save on that now let's up the cloner count so I'll start off with 500 and that does cover it but if we want like a proper thick one let's try 5,000 maybe 7500 and that should cover it pretty nicely and it actually is already looking decent and not too repetitive however to break it up a little bit the good thing we can do is go into our clone and then scroll down and in this range uh tool we can just enable it and here we can now add a minimum and maximum value of our rotation and our scale so let's randomize the scale a little bit first so let's go from 1 to 1.5 no that's a bit too much 1.2 and then let me just add um 60 60 and 60 in the rotation just to get a bit of random rotation in there and that should help break up the repetitive nature of our foliage also nature quite a good pun all right what's next on the list um okay yeah nice so that's pretty much our basic cloner setup and one next kind of last thing for this part is this red or orangey bark material kind of Pops a little too much in the background for me or for my liking so I'm just going to go into the bark material go to the albo controls and just desaturate it to like A5 maybe a 75 yeah that seems a lot better so we're going from Super orange to a little less orange and yeah that's pretty much our first initial basic cloner setup now let's start adding in our affector and by affector I mean the animated affector I know we've already got one affector let's just move on okay so for our animated affector let's go back into our motion design mode and go down to actors effector actor and then let's just add another one and go back to selection mode find that effector we just made and like zero out the coordinates cool so this is that effector we just made let's make this a plain effector and what that is is if you have used Cinema 4D before let me scale them down to 2 or something this is that plane effector where we have two sides of a spline it's pretty much a linear effector that's what it is is it let me double check I should know this okay so I've just double checked this is pretty much like a linear field effector from Cinema 4D so you'll see in a second what that means let me just also reduce the visualizer thickness to a point2 just make it thinner and maybe maybe make this a 0.1 now I'm just going to rotate this guy 90° cool so just to show you what this does let's first go to our cloner and add that as an affector and of course let's name it so affector uncore plane uncore anim so animated effector I don't know why it's gone up in size okay cool back to our cloner let's add our plain anim and obviously nothing will happen yet cuz we haven't told it to do anything and now if we go into our plane effector and change the scale from 1 to zero you'll just see wherever this plane effector is it sort of uh controls the scale of our cloners that it is on so very cool super responsive as well and now another thing we can do is go into our plane affector and also change the plane spacing from 200 to maybe something like 500 so it's a bit of a smooth the fall off maybe 600 and now you'll see we get more of like a smoother fall off and things kind of grow a bit more gradually again you can go back down to 50 or something and it's like a lot more a lot more contrasty I think I like somewhere around a 4 450 450 there we go cool now the next thing we want to do is actually animate this in sequencer so let me just save all now I'm just going to go to my sequencer window here if it's not open for you already just go to window cinematics and sequencer now this is my old sequence so I'm just going to create a new one add and then foliage growth tutorial nice and let me get my plane effector wherever it is why is it resetting its size all the time whenever I save that's a weird bug let me rotate it the other way so I want to go from right to left so let me just move in here and in my timeline I'm just going to change the FPS from 60 to 30 and then go to frame 600 so 20 seconds press the right square bracket to set your out point and then just hit save and now I'm just going to drag in my plane effector into the track timeline area and now at the start I'm just going to add click this little plus button on our plane affector and then I'll add a transform track and then we can add a key frame at the current Place actually let me start it a little more to the left till it's all gone maybe somewhere there and then override that and then let's go to maybe frame I guess we can just go to 20 seconds all the way to the end drag our guide all the way here about there and then add another key frame and now we've got the basics I just went to game view there we've got the basics of our growth effect so really cool super smooth and now you could this is where you can start adding cameras and stuff to it it's a little slow for me let me try to make this like 12 seconds yeah this is a bit nicer and you can see our growth happening super nicely and organically I feel like the grow the growth movement is a bit too linear so as in the way the Clones scale up so what we can do is go to our plane affector again and then change the easing from linear to let's try cubic and now if we hit play you can see the way they grow they kind of slow down a bit and taper towards the end but they speed up in the middle so I just really like the way that sort of looks but definitely try out all of these and see which one fits you the best and then while you're in your sequencer this is where you could add your camera so C camera 3 and now you know start setting up some nice shots something like that and just sort of build out your whole cinematic okay now let's start adding the extra layers of foliage [Music] now let's start adding the extra shrubs and bits of foliage so open up your quickel Bridge go to 3D plants and then grass and then wild and I think I don't think it was that one it was one of these guys oh yeah it was this one wild grass so that's one of the assets that I use so you can download that and add it to your project and then I also added I know it had the word spindle in it this guy yeah European spindle so those are the two extra shrub assets that I added so once you've dragged in your extra shrubs into the viewport I've just chosen these three and then a few of these guys I don't know why it's changing its LOD oh I know why it's just changing its LOD because these aren't instance these are actually in the scene but once we drag them into the cloner they should change into instance foliage I hope because that's why this guy's in there also one thing to note with these guys is I have changed their scale to again like 0.1 and then I changed the European spindle to 08 so I've also had to scale them down a bunch and also sorry another thing to note is I've given them just some basic other green materials on them as well because they also turn gray once I put them in a cloner so I've just given them slightly different Hues of greens yellowy Green materials just so they show up in the final render now the great thing about this cloner setup or at least this motion design mode is luckily we can can just select our Lily our our original and then just hit contrl D to duplicate now you might want to actually disable the cloner first before doing that because it'll just clone and copy all those lies again onto your onto your bark so maybe just disable it first and then hit control D on it to duplicate and we can just delete these guys and then drag in our new shrubs so I'm just going to do the European spindles first and then also rename this to cloner spindle and I'm also going to delete or disable our Lily cloner now it's not showing up at the moment but if we enable it yeah there we go that should show up and if it doesn't again just force update cloner or turn it on and off now I don't want these many European spindles so let me just reduce the Clone amount to maybe 250 yeah that should be good that should be good and then let me also just turn on our lies again and maybe I actually want the size of these to be a bit bigger for them to stand out or what I'll do is reduce the size of my lies to let's say Z like 05 yeah that looks a little better scale-wise and then we'll just up the Clone amount let's try 15,000 20,000 25,000 ,000 that should be good and then maybe change the seed just so we fill up those gaps a bit yeah there we go let me try 30,000 yeah Okay cool so I like the size of our lies now our shrubs maybe there's a little too many of the spindles so I'm going to just turn that down to 150 maybe and I also think there are little too big at the moment so instead of 1 to 1.2 I might try point 5 to 1 or maybe .5 to 1.5 no 1.2 0.8 to 1.2 just keep playing around with the values until you like what you're seeing that should be pretty good for me and then I also think I'll again reduce the cloner amount to 75 maybe and then let me just find a seed that I like that should be good like a four yeah we've got a few sticking out the bottom we have a a few clumps here and I'm liking the look of this guy also if you're wondering how I'm going in and out of game mode I'm just hitting G on the keyboard cool so I'm just going to save all now let's do the exact same thing for our grass so again I'm just going to disable my spindle contrl D oh my my foot just nearly cramped contrl D rename it to wild grass delete our duplicated spindle and then let's just grabb all our grass and drag it onto this guy and then hit enable and then update let me turn off my lies okay so they are there they are there the rotation is just off let's just try adding in our effectors again cuz sometimes it doesn't apply to the clones we've just placed so I'm just going to delete oh I've just added it I've just deleted it off the wrong thing okay let's delete our effectors and then add them in again so plus base rotation there we go okay so sometimes you just got to read add your effector for it to work and now let me up the Clone count to maybe a 150 and then let's turn on our lies I do like the little hits we're getting here from the shrubs let's turn on our spindles as well yeah I don't mind it maybe it needs to be a little more visible so let's just change the range drag this up change the range to one and 1.5 yeah there we go now we're getting like these nice little thin threads popping out from our tree bark and then again I might up the Clones a little bit 200 yeah nice and let's just play with the seed a bit yeah cool we're getting like these little strands that are picking up specular highlights and I kind of really am digging this distribution yeah this is good let me just check that all our cloners have the correct effectors so our wild grass we just need to add that in again so the plane anim the spindle has it and the lies have it cool so I'm just going to quickly save all again go back to our sequencer and you'll see the plane effector now works on all of our clones so let me just hit play let me move in here and you can see all our clones growing and taking over this tree bu so a really cool effect something that we haven't really been able to do this easily and unreal before so super fun to play around [Music] with so the first thing that could be useful maybe some of you might not know is say you wanted to rotate this Branch or this tree bark but not mess up the movement of the plane affector uh what we can do is go up to this Plus menu up here oh no I forgot that crashes things I'll be right back I swear I crash in every tutorial now okay so the first thing you can do is go up to this plus menu hopefully you don't crash and then go to basic and then actor and then just drag an actor into the scene so it should look like this guy and what you can do is drag in your broken tree bark and the effector the plane effector and then just drag them onto the actor 2 and I realized I just got to make my tree bu movable to do this and then grab these two guys drag them onto actor 2 and now what you can do is use this actor 2 as a parent to rotate and animate things so if I go to the beginning here drag my actor 2 into sequencer add a transform track and then just key frame from here and then go to 20 seconds and then key frame there and then and add a key frame boom now you can see our plain effector and tree bark move at the same in the same axis CU it's all relative so this is pretty much the exact same thing as adding a empty null in Cinema 4D and then having children in that null and then animating that null to drive your animations so that way you don't mess anything up you don't need to worry about weird uh location and rotation values and you've got like a nice cool uh animation happening here just like that now let's also say you don't want the foliage to fully fill up the bark you can just go to your motion design mode actors affector actor and then just drag that in where is he fector to so this guy go back to selection mode let me scale him down to a point 2 maybe drag him here and then let's just change the scale from 1 to zero and then just call it effector scale zero and then select our three cloners so that's a cool thing you can do is select all three and then add another affector array and then in that just do affector scale zero and now you've kind of you can paint in where you want your blank or empty spots to be and you get this nice fall off and then you can play with that and now you can kind of just art direct where you would want these guys to be so I'm just copy another one go back to our cloners and then add another one this guy boom and now you'll see when it's animated because of the order of our effectors it'll skip those parts you could also make these noise Maps as well so mode noise field but then it does like weird things with scale and stuff I think it could still be bugged not completely sure sometimes it works for me sometimes it doesn't but I kind of like doing it this way and then we can kind of pick and choose where you want stuff to be whoa that was a weird what's going on there can we just update yeah okay so if we update our cloners that fixes it luckily hopefully that was fun and useful let me know in the comments if you have any other ideas that you want me to try out and I'll see you in the next one peace [Music]
Info
Channel: ali.3d
Views: 54,784
Rating: undefined out of 5
Keywords:
Id: emaspVua2uw
Channel Id: undefined
Length: 27min 14sec (1634 seconds)
Published: Tue Mar 19 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.