Unreal Engine 5.2 PCG Tutorial - Using a Height Filter to Place Trees on a Mountain

  Рет қаралды 15,609

Michael Royalty

Michael Royalty

Күн бұрын

Пікірлер: 76
@MostafaMohamed-bc9wh
@MostafaMohamed-bc9wh 11 ай бұрын
I've been searching and watching tutorials about PCG for weeks, This one is the best !!
@MichaelRoyalty
@MichaelRoyalty 11 ай бұрын
Thanks! I'm glad it's helped.
@FeatureBugEntertainment
@FeatureBugEntertainment 3 ай бұрын
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!
@danielnikolov1885
@danielnikolov1885 Жыл бұрын
That was one of the best tutorials I have ever seen
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
Wow, thanks! I'm glad you enjoyed it!
@tomtomkowski7653
@tomtomkowski7653 Жыл бұрын
Best tutorial about PCG so far! Great job!
@fluffybunnykins
@fluffybunnykins 11 ай бұрын
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
@MichaelRoyalty
@MichaelRoyalty 11 ай бұрын
You're welcome, I'm glad it helped!
@artemaung5274
@artemaung5274 6 ай бұрын
Learned a lot about PCG in a short time, thanks!
@seansanderson
@seansanderson Жыл бұрын
Very clear. Great explanations of why and how. Very useful. Thank you.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
You're welcome, I hope it helps!
@alexgomez-bi2bk
@alexgomez-bi2bk Жыл бұрын
That's a lot of nodes, still amazing explanation and not over complicating something that seems complex.
@sarpozsk1016
@sarpozsk1016 5 ай бұрын
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
@marcelenderle4904
@marcelenderle4904 Жыл бұрын
excellent job, solutions alot simplier and efficient than other tutorials, thank you
@DjSadhu
@DjSadhu Жыл бұрын
Lovely style of tutorial. Subscribed 👍
@legato3067
@legato3067 8 ай бұрын
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) ?
@GlassesAndCoffeeMugs
@GlassesAndCoffeeMugs Жыл бұрын
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.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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!
@GlassesAndCoffeeMugs
@GlassesAndCoffeeMugs Жыл бұрын
@@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 kzbin.info/www/bejne/iZ3Kfnl4mNiKgdU and the Auto landscape material by Unreal Sensei here kzbin.info/www/bejne/aZnQg4Ful72Ag5I I was able to get everything working
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
@@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!
@DefinitelyNotCIA
@DefinitelyNotCIA 8 ай бұрын
Amazing tutorial and presentation, thank you
@jorricktv9550
@jorricktv9550 3 ай бұрын
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)
@MichaelRoyalty
@MichaelRoyalty Ай бұрын
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.
@andrewswihart1011
@andrewswihart1011 Жыл бұрын
Very helpful! Thank you
@tariq0513
@tariq0513 9 ай бұрын
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.
@MichaelRoyalty
@MichaelRoyalty 9 ай бұрын
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
@FrancoSciaraffia
@FrancoSciaraffia 9 ай бұрын
Top tier video! Thanks for this!
@phantompickle6477
@phantompickle6477 Жыл бұрын
How did you manage to keep your trees generating straight up on a slant?
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
I set "Absolute Rotation" in the transform node. You can also uncheck "Project Rotations" in your projection / landscape sampler node.
@theone8625
@theone8625 Жыл бұрын
THANK YOU!!!🎯🤙😊😀
@gillgonzalez8479
@gillgonzalez8479 Жыл бұрын
Request: Can you show us how to exclude trees from spawning on landscape layers, such as rocks and gravel? Great video liked and subbed.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
You should check out this tutorial on that exact subject by FreetimeCoder. He explains it better than I'd be able to. kzbin.info/www/bejne/iZ3Kfnl4mNiKgdU
@gillgonzalez8479
@gillgonzalez8479 Жыл бұрын
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.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
@@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
@gillgonzalez8479 Жыл бұрын
​@@MichaelRoyaltycant wait until you figure it out. Ill be looking forward to the videos. Keep up the great work.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
​@@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.
@jeromecash3054
@jeromecash3054 Жыл бұрын
My density filter node doesn’t seem to be removing points located on any slopes. Any help?
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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.
@danielmiller2462
@danielmiller2462 2 ай бұрын
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!
@MichaelRoyalty
@MichaelRoyalty Ай бұрын
Can you tell me what the warning says and what version you're using?
@juiceLoosner
@juiceLoosner Жыл бұрын
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.
@juiceLoosner
@juiceLoosner Жыл бұрын
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 :)
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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?
@juiceLoosner
@juiceLoosner Жыл бұрын
​@@MichaelRoyaltyshoreline is not really defined by any geometry only by the intersection of terrain and water.
@juiceLoosner
@juiceLoosner Жыл бұрын
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
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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.
@gurrrgurrr8194
@gurrrgurrr8194 Жыл бұрын
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👍👍👍
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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!
@gurrrgurrr8194
@gurrrgurrr8194 Жыл бұрын
@@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☺☺
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
@@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
@gurrrgurrr8194 Жыл бұрын
@@MichaelRoyalty Hi, there is a Forest Pack example, cluster at 4:20. kzbin.info/www/bejne/l2nJlGBqhrmIqZI&ab_channel=ArchVizArtist
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
@@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!
@antoniosuarez7881
@antoniosuarez7881 Жыл бұрын
Thanks, grate tutorial
@MostafaMohamed-bc9wh
@MostafaMohamed-bc9wh 11 ай бұрын
Im getting an error with the point Filter node: Warning: Targetdata doesn't have target attribute/property $position Z
@MichaelRoyalty
@MichaelRoyalty 11 ай бұрын
Are you filtering on "$position Z" with a space? You need to be using "$position.Z" with a period.
@MostafaMohamed-bc9wh
@MostafaMohamed-bc9wh 11 ай бұрын
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
@MichaelRoyalty
@MichaelRoyalty 11 ай бұрын
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! kzbin.info/www/bejne/i5bEgqukdrtqhZI
@Yoremh
@Yoremh 10 ай бұрын
Thanks King@@MichaelRoyalty
@yeohjo
@yeohjo Жыл бұрын
hi i got a question, may i know what does the outside node of the point filter does?
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
It gives you any points that don't pass the filter. So if you combine inside and outside you still have every single point.
@yeohjo
@yeohjo Жыл бұрын
@@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)
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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.
@yeohjo
@yeohjo Жыл бұрын
@@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.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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?
@J-Pepi
@J-Pepi Жыл бұрын
Really good video :)
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
Hey, thanks! :)
@wpwscience4027
@wpwscience4027 Жыл бұрын
Anyone else having a weird flicker on foliage that has the world position offset pin in use??
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
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.
@wpwscience4027
@wpwscience4027 Жыл бұрын
@@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.
@MichaelRoyalty
@MichaelRoyalty Жыл бұрын
@@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".
Unreal Engine 5.2 PCG Tutorial - Sampling Landscape Auto Materials
29:45
Unreal Engine 5.2 PCG Tutorial - Landscape Material Sampling
14:32
Michael Royalty
Рет қаралды 18 М.
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 97 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 206 МЛН
You Should Start Using Data Assets in PCG | UE 5.4
20:14
Procedural Minds
Рет қаралды 7 М.
PCG Forest Tutorial in Unreal Engine 5.4 - Part 1
20:21
Paul Martin Eliasz
Рет қаралды 3,9 М.
How To Spawn Level Instance Assemblies With PCG - Unreal Engine 5.4 - Tutorial (part 1)
7:27
Yes, You Can Sculpt Landscape With PCG
17:19
BoroCG
Рет қаралды 60 М.
UE5.2: PCG - Apply TRUE Density Scaling
27:01
UnrealityBites
Рет қаралды 12 М.
How to Get Started with PCG Biomes in Unreal Engine 5.4
21:49
Procedural Minds
Рет қаралды 28 М.
Unreal Engine 5 PCG Landscape Tutorial - UE 5.4
11:59
Some Design Tutorials
Рет қаралды 1,1 М.
Unreal Engine 5 PCG Landscape and Spline Tutorial
21:00
Some Design Tutorials
Рет қаралды 18 М.
Unity vs Unreal: Which Engine Should You Choose As A Beginner
14:18
Awesome Tuts - Anyone Can Learn To Make Games
Рет қаралды 987 М.
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН