This tutorial is a series of videos, aimed to kickstart people using the Procedural Content Generation plugin, introduced as experimental in 5.2, beta in 5.4.
More videos will come in the future, with the goal to have small videos focusing on a specific subject each time, to help people find exactly what they need.
https://dev.epicgames.com/community/learning/tutorials/j4xJ/unreal-engine-introduction-to-procedural-generation-plugin-in-ue5-4
neeeeed more lol
that was awesome!! cant wait for the next one
Great stuff, thanks for making this. Will sub to the channel
I would love to learn if it’s possible to:
— use the generation tools on bigger maps like 64 km² – 100 km² (8 by 8 kilometer and up) with one file per actor activated. The regular landscape tools can’t handle it and even get stuck on 4 by 4 km sized worlds.
— use custom spline shapes for generation.
— create bool like functions for let’s say two different forest biomes, having weighted transition from one biome to the next one.
— create overlap actors like a pre-build house blueprint which, once placed, cuts away points (trees, bushes) underneath and flattens out the landscape. (interconnection between BP’s, PCG’s and World Partition landscape)
— create micromanagement inside these systems for sub-biomes, similar to Far Cry 5’s world generation tool sets. (In detail: Viability – Species fighting for their ground and thrive, Viability Radius and Ecological succession. Which mushrooms, plants and fruits grow under special trees, generating younger trees on the outer edges of a spline/box volume while older and bigger trees appear in the middle, etc.)
— influence landscape underneath trees. Many trees with old and big roots tend to raise the underlying landscape. It would save a lot of time to drive and tweak this through the PCG nodes.
I am not looking for most detailed tutorials, but at least pointers if certain nodes already exist to assist on points mentioned above – or are in production.
Overall, looking for the bleeding edge here and how deep the rabbit hole goes at the current stage of PCG’s development.
Great work, thank you!
Was wondering the same thing - can it create dependencies between different types of actors/meshes. An oak tree spawning dead oak tree branches on the ground or a certain ground coverage plant only growing in a set radius around a tree.
I noticed the tool has other types of samples - MeshToSample, PointSampler, etc - will have to start experimenting.
That’s a lot of questions
- On PCG component, you can see the option “IsPartitioned”. Toggling this one will create an actor grid that will work well with one file per actor. Each actor that intersect with the PCG Volume will have a copy of the original PCG Component and will generate within its bounds. WP workflow is then supported, but a bit rough around the edges. Just for a proof of concept, I tried on a 20km*20km landscape, and it is SLOW but it managed to generate the debug boxes. Of course more complex rule will probably make your PC cry, and we plan at some point to have commandlets to support generation on very big maps.
- Yes splines are supported: You can create a spline and add a pcg component to it, then use the actor pin and “Spline Sampler”
- Probably playing with the density of the points and filtering by density would allow you to do that. There is PointFilter and DensityFilter
- You can tag actors and get them in PCG with “Get Actor Data” and then do a difference node. I will talk about the diff node in the episode 2. We can’t modify the landscape yet with PCG
- That’s way more advanced use, and I can’t really answer this one quickly, but PCG let you also spawn actors, that can contains PCG graphs too. You can perhaps combine some PCG logic with some Blueprint logic.
- And same answer, we can’t modify the landscape with PCG at the moment.
Hehe, I apologize!
Thank you for the in-depth response! I can wait until the weekend to test the new PG tools! Or how TwoMinutePaper would say: Waddatimetobealive!
Great response @AdrienLogut, very helpful.
I do have one question for anyone that knows, has anyone tried to use PCG with a Nanite Mesh “Terrain”? I have a small map with a bunch of Megascans meshes as the terrain and cannot for the life of me figure out how to “spawn” grass and bushes over it using the PCG volume (at least without having a mega-dense complex collison generated for the nanite ground mesh.
Is it possible to have more control on PCG generation parts? Like adding, changing, removing something at runtime? Right now I see only one option, to regenerate all of it (on load or on demand (no idea how demand works)).
Also I would like to see how combine procedural and Stored elements. Its a classic approach where at load time first you do the procedural generation and then override with the parts that player has influenced (i.e box has moved).
I plan to talk about it in episode 3 (episode 2 will be about excluding points), but you can try the “MeshToPoints” node, that will sample points on a given mesh.
PCG Component can be controlled with BPs, that’s what on demand means A BP can call “Generate” on the component, even at runtime.
We didn’t push a lot on runtime workflow, so this one is a big rougher around the edges, but you can either add exclusions zones where your player change stuff, or even spawn actors directly that could remember their states. And yeah for now we re-generate the full volume, at least in non-partitioned mode (in non WP maps).
I’ll have a video at some point on the partition mode, but it is a bit more complex and workflow is a bit less intuitive.
Hi. Can this be used to generate cities like in City Sample? That Houdini project is broken since launch an nobody has been able to create issue free city.
If we are able to use it for city generation would be nice to get some guidelines on that.
You are not limited with scattering with the PCG Graph. If you look at the tech talk given by my colleagues after the “State of Unreal”, there is a demo of a building generator with manipulators!
Hello,
How is it comparing to other existing procedural tools like Procedural Foliage or landscape material, is it planed to be the main solution for procedural mesh spawning?
You say PCG can’t modify landscapes yet, but are there any plans to generate or modify landscapes at runtime?
For anyone wondering like I was, there are a bunch of example PCG graphs and custom Blueprint nodes inside the plugin content directory.
Just make sure you have “Show Plugin Content” enabled in your content browser settings.
How well does PCG support LandscapeSplineActors? Or is it recommended to use normal Spline components instead? I have just been trying out Landscape Splines so I can paint different layer materials down as well as modifying PCG meshes.
I can get it to work fairly well, however there are log warnings and some nodes don’t act as expected when reading the Landscape Spline data (e.g. GetSplineData isn’t able to read from more than one Spline Actor placed in the world it seems)
Get Spline Data_4]: Output generated for pin Out does not have a compatible type: EPCGDataType::LandscapeSpline
Can get some awesome results though! Thanks for all the hard work setting up the system.
Hi Adrien - thanks for this tutorial series.
But the PCG plugin is not really NEW. For me it is included in UE5.1 with version 0.1. I have already tried a few things with it in UE5.1, but unfortunately there is no documentation at all.
Hopefully there will be documentation for the version in UE5.2.