Nice man. Between the height filter and being able to spawn foliage on only a certain material layer, this seems like a suitable replacement for the Landscape Grass Type stuff.
I think you're right. My ideal workflow would be to create almost everything procedurally, then paint a few touch ups as necessary. Once someone figures out a way to spawn foliage based on auto landscape materials, that'll make everything very easy!
@@MichaelRoyalty I posted a response to this earlier but I'm not sure if it actually posted due to Yt being weird This works with auto landscape materials. Using your guide, and the material layers guide here th-cam.com/video/SlgMFBcsWKs/w-d-xo.html and the Auto landscape material by Unreal Sensei here th-cam.com/video/3hmRN8bXMM0/w-d-xo.html I was able to get everything working
@@GlassesAndCoffeeMugs I've only been able to get a value when the auto landscape material is in use, not the individual textures within it. I'll have to try again!
wow the best ever. thx you so much for this...By any chance is there a node that remove point if it collide with a static mesh in the world ( rocks-cliff) ?
You should check out this tutorial on that exact subject by FreetimeCoder. He explains it better than I'd be able to. th-cam.com/video/SlgMFBcsWKs/w-d-xo.html
Thanks man. I watched it but I couldn't understand what he was doing. Still too green I guess. I wish he had begun that video from scratch instead of showing the already created code.
@@gillgonzalez8479 I had the same problem. Once I sit down and figure out what magic he's worked I'll try to make a step-by-step tutorial on the process.
@@gillgonzalez8479 Good news and bad news -- You can get the landscape layers from a Landscape node or a Surface Sampler node, then it's easy to filter based on them! The bad news is, depending on your landscape setup, the layer data sampled might be offset incorrectly.
1:00 - i don't have the drop down arrow icon that you have on your 'Input' and 'Surface Sampler' node. How can i expand the nodes? i have tried with UE 5.1 - 5.3. Right-clicking does not have any such option either. Thank you for any help in advance.
thank you for the tutorial. could you please make another tutorial about density and scale size falloff in PCG. something like closer to cliff the smaller size and density, the higher the altitude the smaller density and scale. thank you very much👍👍👍
Those are fun ideas! I'll see what I can do. Altitude to density should be pretty easy. For distance to the cliff I may be able to use a DistanceToNeighbors node, which I haven't looked at yet. This is a great chance to do that!
@@MichaelRoyalty Thank you very much~ I just started to use UE5. Also I would like to ask if there is a way to make plant cluster like using Forest pack in 3Ds max☺☺
@@gurrrgurrr8194 Nice, I've only been working in UE for a few months, I find it very easy to work with. I haven't used 3ds Max, do you have an example of plant clustering I can check out?
@@gurrrgurrr8194 Sorry, I missed your reply! I think I understand, the plants should spawn in patches. You should be able to do that with two levels of randomness, one creating large points that define the plant clusters, and one creating the individual plants that fall within those clusters. I'll play around with a couple methods of doing it and see which works!
hey.. i have a wierd question, regarding pcg .... say you have a pcg set up for your map, and create a massive open world. When you export the project, or launch the finished game. Is every tree saved as actor, or is the pcg graph saved and the actors placed on runtime (somewhat like a seed)
I'd approach it from spawning them in when the player gets close, and despawning them when the player leaves. But you can also use world partition in addition to the hierarchical generation features in later versions of PCG to smoothly load in objects as players get close to them.
Hello. Love your videos. I have learned alot. Is there a way to orient spawned meshes to align to a face normal they are sitting on? I have a bay that has rocks spawned on the shore line but i want the rocks to align to the terrain face normals around the z axis. ie so that the rocks align to the shore line but only rotated around the z axis. I have played around with the normal to density but seems to only filter out certain orientations or levels of grading.
If i put a transform points node after a normal density then i can get the desired effect by unchecking "absolute rotation" but this rotates the x and y so that the spawned meshes align to face normal. ie I wish all the spawned meshes to only rotate about the z axis so as to align to the shore but remain un altered in x and y. Hope this makes sense :)
Hm, yeah I was hoping you had a spline or something that you could base your rotation off of. It sounds like you need to translate the xy axis of rotation.up into the rotation you'll actually use. That's difficult but not impossible.
I am not sure what I am doing wrong, but I keep getting a warning error on the initial Point Filter node connected to Landscape Height. Can anyone help? Much appreciated!
Can't Thank you enough! I couldn't find out how to solve this by my own, really much appreciated. Im sorry If Im bothering you but Is it possible to drive my points spawning in the PCG using a mask? I mean texture mask. I've an arboreal mask generted by the software I used to generte my landscape -Gaea- that specifies exactly where my trees should grow and where not to. Can I filter my points using this mask?@@MichaelRoyalty
Yeah I think so! I made this tutorial with that in mind, but I haven't really worked with masks much. Let me know if it helps! th-cam.com/video/UeaQxnAV7O0/w-d-xo.html
Are you in 5.2 or 5.3? If it's 5.2, I'd check to make sure your points are rotating with the slope (Use landscape on your projection, instead of landscape height), and that you have a Normal to Density node before your Density Filter. If it's 5.3 it's possible the workflow has changed, but I'd still check the above first.
@@MichaelRoyalty if i want to use the point filter on my spline for example i want to use the outer part of the spline instead of the interior can i use the outside filter for that ? or do i need to create a mask ( with a different spline and difference it)
Are you using a closed spline or an open spline? With a closed spline it's pretty easy, there are tutorials out there showing how to scale objects by distance inside the spline. For an open spline I'm not exactly sure, I'll have to look into it.
@@MichaelRoyalty using a close spline , but i was trying to ask if its possible to use the splines outer bound to spawn the meshes instead of the interior. Cause there is a setting in the spline sampler for you to choose the interior section but not the outer section.
That sounds like you want to set your spline sampler to sample on spline, set to distance, instead of sampling on interior. Or are you asking something else?
What foliage are you seeing this on? I've had an issue with megascans trees where it looks like they stretch up and down instead of swaying in the wind. There's a blueprint you can edit if you're experiencing that.
@@MichaelRoyalty I have a combination of the wind, simple grass wind, and a sine based foliage sway function. I was able to rule out the simple grass wind, by plugging that up by itself. The bug for me looks a bit like a dither that smears like paint rushing towards you constantly. I almost left it because it kind of looks cool when a whole forest does it, but I needed that offset culling otherwise my frames are garbage.
@@wpwscience4027 That sounds a bit like the problem with the MF_SimpleWind function, which is caused by the function referring to local space at one point. It doesn't cause issues when the static meshes are separate, but when they're generated with a PCG graph they need to use world space. If you like it keep it, weird stylized graphics effects are great. But if you want to update it, try going to one of the material instances that has this issue, find the parent material, and open its blueprint. Find the MF_SimpleWind node and drill into it. Inside SimpleWind, near the center, there should be a "Main Rotator" comment with an "ObjectPivotPoint" node inside of it. Drill into the ObjectPivotPoint node. There should be two TransformPosition nodes, one or both of them may be set to the destination "Local Space", change them to "Absolute World Space".
I've been searching and watching tutorials about PCG for weeks, This one is the best !!
Thanks! I'm glad it's helped.
Thank you! The "Get Height Only" checkbox in 5.4 was making "Normal To Density" not work in my project, and you set me on the right path!
That was one of the best tutorials I have ever seen
Wow, thanks! I'm glad you enjoyed it!
Best tutorial about PCG so far! Great job!
Straight to the point and very clear. Very helpful.
Amazing tutorial! I couldn't figure how to get my trees to not spawn in my water and what you taught here enabled me to fix it! Thank you so much
You're welcome, I'm glad it helped!
Lovely style of tutorial. Subscribed 👍
Learned a lot about PCG in a short time, thanks!
excellent job, solutions alot simplier and efficient than other tutorials, thank you
Very clear. Great explanations of why and how. Very useful. Thank you.
You're welcome, I hope it helps!
Nice man. Between the height filter and being able to spawn foliage on only a certain material layer, this seems like a suitable replacement for the Landscape Grass Type stuff.
I think you're right. My ideal workflow would be to create almost everything procedurally, then paint a few touch ups as necessary.
Once someone figures out a way to spawn foliage based on auto landscape materials, that'll make everything very easy!
@@MichaelRoyalty I posted a response to this earlier but I'm not sure if it actually posted due to Yt being weird
This works with auto landscape materials. Using your guide, and the material layers guide here th-cam.com/video/SlgMFBcsWKs/w-d-xo.html and the Auto landscape material by Unreal Sensei here th-cam.com/video/3hmRN8bXMM0/w-d-xo.html I was able to get everything working
@@GlassesAndCoffeeMugs I've only been able to get a value when the auto landscape material is in use, not the individual textures within it. I'll have to try again!
That's a lot of nodes, still amazing explanation and not over complicating something that seems complex.
Amazing tutorial and presentation, thank you
Top tier video! Thanks for this!
Hi! Great tutorial thank you. I have a question have you ever used steepness instead of position? I couldn't figure out how to make it work
Very helpful! Thank you
wow the best ever. thx you so much for this...By any chance is there a node that remove point if it collide with a static mesh in the world ( rocks-cliff) ?
Request: Can you show us how to exclude trees from spawning on landscape layers, such as rocks and gravel? Great video liked and subbed.
You should check out this tutorial on that exact subject by FreetimeCoder. He explains it better than I'd be able to. th-cam.com/video/SlgMFBcsWKs/w-d-xo.html
Thanks man. I watched it but I couldn't understand what he was doing. Still too green I guess. I wish he had begun that video from scratch instead of showing the already created code.
@@gillgonzalez8479 I had the same problem. Once I sit down and figure out what magic he's worked I'll try to make a step-by-step tutorial on the process.
@@MichaelRoyaltycant wait until you figure it out. Ill be looking forward to the videos. Keep up the great work.
@@gillgonzalez8479 Good news and bad news -- You can get the landscape layers from a Landscape node or a Surface Sampler node, then it's easy to filter based on them! The bad news is, depending on your landscape setup, the layer data sampled might be offset incorrectly.
1:00 - i don't have the drop down arrow icon that you have on your 'Input' and 'Surface Sampler' node. How can i expand the nodes? i have tried with UE 5.1 - 5.3.
Right-clicking does not have any such option either. Thank you for any help in advance.
In 5.3 you'll want to use the landscape node instead of the input node. I think the landscape node is in 5.2 as well
Really good video :)
Hey, thanks! :)
Thanks, grate tutorial
thank you for the tutorial. could you please make another tutorial about density and scale size falloff in PCG. something like closer to cliff the smaller size and density, the higher the altitude the smaller density and scale. thank you very much👍👍👍
Those are fun ideas! I'll see what I can do. Altitude to density should be pretty easy. For distance to the cliff I may be able to use a DistanceToNeighbors node, which I haven't looked at yet. This is a great chance to do that!
@@MichaelRoyalty Thank you very much~ I just started to use UE5. Also I would like to ask if there is a way to make plant cluster like using Forest pack in 3Ds max☺☺
@@gurrrgurrr8194 Nice, I've only been working in UE for a few months, I find it very easy to work with. I haven't used 3ds Max, do you have an example of plant clustering I can check out?
@@MichaelRoyalty Hi, there is a Forest Pack example, cluster at 4:20. th-cam.com/video/a8fc-4QTUs0/w-d-xo.html&ab_channel=ArchVizArtist
@@gurrrgurrr8194 Sorry, I missed your reply! I think I understand, the plants should spawn in patches. You should be able to do that with two levels of randomness, one creating large points that define the plant clusters, and one creating the individual plants that fall within those clusters. I'll play around with a couple methods of doing it and see which works!
THANK YOU!!!🎯🤙😊😀
hey.. i have a wierd question, regarding pcg .... say you have a pcg set up for your map, and create a massive open world. When you export the project, or launch the finished game. Is every tree saved as actor, or is the pcg graph saved and the actors placed on runtime (somewhat like a seed)
I'd approach it from spawning them in when the player gets close, and despawning them when the player leaves. But you can also use world partition in addition to the hierarchical generation features in later versions of PCG to smoothly load in objects as players get close to them.
Hello. Love your videos. I have learned alot. Is there a way to orient spawned meshes to align to a face normal they are sitting on? I have a bay that has rocks spawned on the shore line but i want the rocks to align to the terrain face normals around the z axis. ie so that the rocks align to the shore line but only rotated around the z axis. I have played around with the normal to density but seems to only filter out certain orientations or levels of grading.
If i put a transform points node after a normal density then i can get the desired effect by unchecking "absolute rotation" but this rotates the x and y so that the spawned meshes align to face normal. ie I wish all the spawned meshes to only rotate about the z axis so as to align to the shore but remain un altered in x and y. Hope this makes sense :)
So it's like a line of rocks facing outwards? You might be able to approach the problem from a different direction. How is your shore line defined?
@@MichaelRoyaltyshoreline is not really defined by any geometry only by the intersection of terrain and water.
And yes i want to place rocks facing out from shoreline but they are scans so only one side has vertical geometry which i need to face the water
Hm, yeah I was hoping you had a spline or something that you could base your rotation off of. It sounds like you need to translate the xy axis of rotation.up into the rotation you'll actually use. That's difficult but not impossible.
I am not sure what I am doing wrong, but I keep getting a warning error on the initial Point Filter node connected to Landscape Height. Can anyone help? Much appreciated!
Can you tell me what the warning says and what version you're using?
Im getting an error with the point Filter node: Warning: Targetdata doesn't have target attribute/property $position Z
Are you filtering on "$position Z" with a space? You need to be using "$position.Z" with a period.
Can't Thank you enough! I couldn't find out how to solve this by my own, really much appreciated. Im sorry If Im bothering you but Is it possible to drive my points spawning in the PCG using a mask? I mean texture mask. I've an arboreal mask generted by the software I used to generte my landscape -Gaea- that specifies exactly where my trees should grow and where not to. Can I filter my points using this mask?@@MichaelRoyalty
Yeah I think so! I made this tutorial with that in mind, but I haven't really worked with masks much. Let me know if it helps! th-cam.com/video/UeaQxnAV7O0/w-d-xo.html
Thanks King@@MichaelRoyalty
How did you manage to keep your trees generating straight up on a slant?
I set "Absolute Rotation" in the transform node. You can also uncheck "Project Rotations" in your projection / landscape sampler node.
My density filter node doesn’t seem to be removing points located on any slopes. Any help?
Are you in 5.2 or 5.3? If it's 5.2, I'd check to make sure your points are rotating with the slope (Use landscape on your projection, instead of landscape height), and that you have a Normal to Density node before your Density Filter.
If it's 5.3 it's possible the workflow has changed, but I'd still check the above first.
hi i got a question, may i know what does the outside node of the point filter does?
It gives you any points that don't pass the filter. So if you combine inside and outside you still have every single point.
@@MichaelRoyalty if i want to use the point filter on my spline for example i want to use the outer part of the spline instead of the interior can i use the outside filter for that ? or do i need to create a mask ( with a different spline and difference it)
Are you using a closed spline or an open spline? With a closed spline it's pretty easy, there are tutorials out there showing how to scale objects by distance inside the spline. For an open spline I'm not exactly sure, I'll have to look into it.
@@MichaelRoyalty using a close spline , but i was trying to ask if its possible to use the splines outer bound to spawn the meshes instead of the interior. Cause there is a setting in the spline sampler for you to choose the interior section but not the outer section.
That sounds like you want to set your spline sampler to sample on spline, set to distance, instead of sampling on interior. Or are you asking something else?
Anyone else having a weird flicker on foliage that has the world position offset pin in use??
What foliage are you seeing this on? I've had an issue with megascans trees where it looks like they stretch up and down instead of swaying in the wind. There's a blueprint you can edit if you're experiencing that.
@@MichaelRoyalty I have a combination of the wind, simple grass wind, and a sine based foliage sway function. I was able to rule out the simple grass wind, by plugging that up by itself. The bug for me looks a bit like a dither that smears like paint rushing towards you constantly. I almost left it because it kind of looks cool when a whole forest does it, but I needed that offset culling otherwise my frames are garbage.
@@wpwscience4027 That sounds a bit like the problem with the MF_SimpleWind function, which is caused by the function referring to local space at one point. It doesn't cause issues when the static meshes are separate, but when they're generated with a PCG graph they need to use world space.
If you like it keep it, weird stylized graphics effects are great.
But if you want to update it, try going to one of the material instances that has this issue, find the parent material, and open its blueprint. Find the MF_SimpleWind node and drill into it. Inside SimpleWind, near the center, there should be a "Main Rotator" comment with an "ObjectPivotPoint" node inside of it. Drill into the ObjectPivotPoint node. There should be two TransformPosition nodes, one or both of them may be set to the destination "Local Space", change them to "Absolute World Space".