Spawn vines on any mesh procedurally! - Unreal 5.2 PCG - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys and welcome to another PCG tutorial today we're going to take a look at how I made this PCG assets from scratch so we're going to spawn only the grass on top and we got some Vines hanging off the cliff here that only spawns underneath and we got some other kinds of Vines only spawning on flat surfaces so not on top or Not underneath and we're not spawning any flat vines on top here because uh it's more probable to spawn from the bottom up and you can see we got some Vines underneath here as well and we can easily remove them maybe in the next tutorial or something but yeah let's get started start with creating a PCG graph by right clicking in the content browser and then name it something amazing after you created your graph simply drag it into the world so here you can see the bounding box and you got your properties on the right here so on the left here we have our finished PCG asset and let's keep that so we can compare that to the work in progress when you drag your pcga asset into the world I usually set it to one so to my right here I got my PCG graph and you can get that by double clicking your PCG you just created and then you'll start with an input and an output node you can see that I got some other nodes here and that's because I prepared this tutorial so I think it's better for me to actually talk about how to get this done instead of like writing in numbers and so on so we'll go through exactly how I made this but I prepared some notes so you can see that I actually don't have anything connected to the input or the output nodes and that's because some of these nodes like the static mesh spawner can actually spawn stuff without being connected so the input output nodes we will mainly be using for sub graphs in future videos so I'll just disable these guys for now and let's talk about the first node so you can enable debug with d and you can enable the inspect with a now they changed it from earlier versions so we only have one point here and that's because I set the ACT to filter to self so it's getting the data from the world actor and the location in the world and you also have other options as well you can set it to include children and I set this to get single point the default I think is parse actor components so if I move the actor in the world you can see that the position changes so it's basically the actor position in the world so you also have e for enable so then I got a bounce modifier which you can see is pretty much the shape of the mega scans asset and I actually just set these values manually I think you can do it procedurally or I know you can do it procedurally but yeah I just said it manually for now so you can just copy these values and let's see what Mega scan assets I actually used so you can follow along yeah so if you just copy these wde ID and searching the bridge a quick sub Bridge up in tools and then you just search for it WWE my yes and then you download it and I set this to nanite as well as you can see here on the right it's nanite supported perfect also don't forget to set the bounce modifier mode to set so it overwrites the the previous value then we gotta transform points which sets the scale to 1 which is unnecessary so I don't really know why I have this but then we actually spawn the mesh so you can see here on the right that I got the static mesh from magnuscans in the mesh entry so just press this plus button so you can spawn vines on any mesh I forgot to mention that I think and if you're spawning multiple meshes make sure to use this PCG instance packed attribute thing because then it makes instances or in short it's good for performance and I would think it's better to have this enabled than not so now to the cool stuff so here here we have a mesh sampler which is connected to copied points and we're going to talk about both the mesh sampler spawns points basically on a mesh so we selected the same mesh here and you can see that we got poisson sampling as well but nothing happens when we enable this because this spawns the points at the origin so we have to move the points to the right location that's our static mesh spawner location so that's what we use the copper points for so when we enable the copy points you can see yeah points on our surface basically but if I enable the debug flag on the mesh sampler and go to the origin we can see the shape of our mesh at the origin but nothing here until we enable the debug flag on copy to points so we we simply move the points from the origin to our mesh so it aligns perfectly also worth mentioning I got this set to poisson sampling which is not the default and you can see my yeah sampling radius and my settings here so just yeah just copied or play around with it then we got a bounce modifier which extends each point so it creates overlapping with other points and we can simply remove them with the next node which is the self pruning node which we did in another tutorial if you look at my channel if you want the more basic
Info
Channel: HullaBulla
Views: 22,697
Rating: undefined out of 5
Keywords: unreal, unreal 5, ue5, pcg, procedural, procedural content generation, generation, houdini, unreal 5.2, spawn, points, nodes, node, graph, nature, foliage, keyboard shortcuts, quick, tips, tips and tricks, tricks, spline, vine, mesh, vines, splines
Id: ex5U0_WiJfc
Channel Id: undefined
Length: 5min 11sec (311 seconds)
Published: Tue Apr 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.