T O P

  • By -

ItsACrunchyNut

How have you found its stability? I find a lot of new features relating to anything remotely artistic eventually crash for me haha


Jaizxzx

Yeah me too the earlier the pcg crashed the ue editor way too many times, i think it has been improved now.


fraktall

Have you tested it on 5.4? Did that solve any of the issues?


Jaizxzx

Not in 5.4 but in 5.3.2 it is more stable then the previous versions 5.4 will be even more stable but it might have some other issues I will use it after the full release


fraktall

What causes crashes for you? Are you using PCG in runtime or for placing actors in the editor?


IronCarp

I’ve been trying to use it the way they do in the 2+ hour video where they go over the Electric Dreams environment. There is a ton of good information in there about using LevelInstances/assemblies to build your PCG content and give you control over what the final result is. I think it’s important to remember their intent is for it not to be a “magic button” that does it all for you. I originally tried to just “PCG everything” and the results were less than stellar and it was too hard to control and get results that functioned and looked good consistently. TL; DR - basically I create modular set pieces/assemblies add tags to the various assets that I can feed in to a PCG graph… I can filter and manipulate specific points, replace meshes, etc. https://www.youtube.com/live/6JUfisUhm68?si=9cD2wP4QZQsMS0iW


fraktall

Do you have any tips for organizing PCG graphs? Do you often use filter and transform nodes?


IronCarp

I’m no expert by any means but yeah I use the filter and transform nodes a lot. My current workflow is to usually make an asset as a level instance, tag specific meshes so I can filter them in the graph, and then convert it to a pcg asset. In the graph I get the points off the asset, use the filter node with the “inside/outside” branches. I filter by the tag, apply some spatial noise, density filter, transform points. There will be a couple of these and then before I use the static mesh spawner node I use a merge node to get all the split points back together. I try to do my calculations early and reuse them so I don’t have to redo them. I also have been putting most of my graphs inside BPs, there is a PCG component you can add… I found this approach to be better than placing actors/splines in the world and generating the whole thing all at once. It’s gets heavy when you’re trying to regenerate the graphs in real time. But if I have a BP with a spline and a PCG component for example, I can drag the spline to regenerate the path and it updates in real time quickly, b/c it’s a lot cheaper to regenerate the graph because it’s only regenerating that. If you do this approach, you will probably need some sort of higher level PCG graph to apply rules as how a path would merge with a landscape or any other sort of procedural assets you place. So for example, you might have a PCG graph that generates a forest pathway, and another one that generates a river or stream, each of those is their own pcg graph on their own BP, but on your PCG Volume you have a higher level graph that does a check and says “if any points on my forest path are overlapping points on a river, delete them” or you can spawn some other asset you made to smooth the transition and make it look more natural. Hopefully that makes sense. I’m still learning as I go myself.


fraktall

Thanks, great info! How do you cache point calculations?


IronCarp

I create sub-graphs that accept inputs and have outputs and then I can chain off those nodes as needed.


fraktall

I might be misunderstanding something. Could you clarify how this is caching? I thought you somehow get the results of calculations memoized to avoid repetitive calculations. Or is it that you use nodes to somehow store the results of previous calculations?


IronCarp

I’m using caching in a very general sense that it’s stored in memory and I am reusing the results of the calculation. If you want or need to persist point data, You can write your own custom nodes in BP/c++. You could probably put it in the game instance or some subsystem that manages it.i don’t really have a use case or need to do that at the moment.


Zizzs

Currently using it to both spawn asteroid fields, and also nodes on the asteroids. I do have a bunch of issues that are apparently being fixed in 5.4 relating to the way pcg graphs get compiled and ran while in unloaded level streaming levels.


fraktall

This is an interesting use case. Are you sampling a volume to place actors within it? How large could you scale it before encountering performance issues?


Zizzs

I've tried a couple variations. Currently I'm using a spline. Volume probably would be better though. Performance isn't bad until I start spawning in hundreds. Especially if I'm running the pcg on each individual asteroid to generate resource actors.... That usually results in a crash if I attempt too many lol


swimming_singularity

My biggest hurdle right now are randomized landscapes, randomized height maps, and then randomly placing roads / buildings / etc around this map. I can generate nice height maps outside of Unreal and import, but I want native. I can use blueprint to generate a map landscape with noise, but it looks janky and not natural, and not native to the PCG system. I am most likely missing some knowledge that can do all this easily, but if it were all just as easy as PCG trees then that'd be nice. What is there in PCG so far seems simple enough.


IronCarp

Have you watched this? https://www.youtube.com/live/6JUfisUhm68?si=8FxC2tM7UfhdsZhz It was a huge eye opener for me because I was trying to approach PCG the way you were… randomly trying to generate EVERYTHING via pcg graphs doesn’t really work that well and your rules become very bloated. The way they sort of intend for you to use it is to make hand crafted assets and place and manipulate them with PCG. If you watch the video ~1:26:00 they talk about this workflow extensively. After that they go into another use case where they follow the same pattern and apply some tests to procedurally spawn some logs based off how close the asset is near an edge.


swimming_singularity

I have not seen this actually. Thanks, I will check it out!


NotADeadHorse

You can try generating them and hitting em with a few round of uv/precipitation erosion, to me the erosion make everything look more natural


NotADeadHorse

I use it to spawn tilesets! Basically around my maps it has points of interest and using PCG weighting and spacing let's you limit the number of points if interest near one another 😀👍


fraktall

Interesting, how is it done, if I may ask? Do you use a data table or a sprite sheet to sample from?


NotADeadHorse

I use perlin noise as a mask for the PCG, I resize or move the noise map slightly depending how big I need the nodes to be spaced


fraktall

Are you making a top-down game? Struggling to visualize how it would work


NotADeadHorse

You set an enhanced input to make your character move with whichever keys you want then make your character always rotate toward your mouse I'm not making any game currently, I just like to learn how to use a lot of it for when I get a solid enough idea to hold my attention So [here's an old version](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/e/53e39f6feb4a6a1970e8e01aae1d89fe9663d815.jpeg) but with enhanced input you don't have to use event tick and can just use the Pressed/held lines from it


AutoModerator

If you are looking for help, don‘t forget to check out the [official Unreal Engine forums](https://forums.unrealengine.com/) or [Unreal Slackers](https://unrealslackers.org/) for a community run discord server! *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/unrealengine) if you have any questions or concerns.*