Community Tutorial: Introduction to Procedural Generation plugin in UE5.4

@AdrienLogut Is it possible at the moment to sample landscape physical materials in the PCG graph somehow? I have a single landscape material using “LandscapePhysicalMaterialOutput” with different noise masks plugged in to outline various zones on the landscape, ie snow, desert, grassland, etc… I can’t seem to figure out how to sample any of this from the PCG graph.

Open to any suggestions on how to get something like this working. I basically just need to target the masks setup in the materials which are being used to control the landscape materials and heightmap. What’s the best way to do this?

Hey @Riptor7241 :slight_smile:

What are you trying to achieve by using the Physical Material as opposed to the standard material?

How do I do math operations in PCG on new attributes? Am I limited to the existing attributes with the $ sign?

Hi there,

how can I use the “Actor Overrides” functionality to override an integer variable of the spawned actor, that is spawned via the “Spawn Actor” Node in PCG?

That’s what I have:

  • Blueprint with PCG Component. The BP has the variable A = 2
  • In the PCG graph I spawn an actor. This actor has the variable B = -1

I’d like to set the variable B of the spawned actor to the value of variable A (which is 2), so that the spawned actor’s variable B is equal to 2.

I tried to use the “Get Actor Property” node, and I was indeed able to at least debug print that value from the PCG graph. But I was not able to utilize the value in the “Actor Overrides” of the “Spawn Actor” node.

I’d be happy if someone can shed some light on that topic, thank you! :slight_smile:
(I’m on UE5.2)

image

Greetings. First of all thanks @AdrienLogut for the tutorial series.
Also, everybody if you don’t know, check out FreetimeCoder’s series as well - probably the most detailed atm.

My problem with the Spline is, that I can’t get the points to spread out evenly across the Spline width. So I thought maybe a mesh can “introduce a real surface” to the PCG component. None of the Spline sampler modes seem to have a way of doing things with an open spline like what the Interior mode does on the closed spline.

I tried to build a workaround with a mesh that gets scaled along with the spline width. Although I can’t seem to get the Surface Sampler to populate that mesh with points? Is it an issue because it makes a mesh instance? Is that even possible? I’m lost…

[EDIT]
Solved - FYI:
Setting the Point Scale Method of the Spline Sampler to Relative gives the expected result. Had to set the spline’s Scale Visualization Width from 100 to 50 so it’s the same size as the point width.


No you can create new attributes with “Add Attribute” and also store the result of an operation in a new Attribute. Just set the name you want in “OutputTarget”

1 Like

I really want to know How do I overrides parameters
I Want in the Instance Replace the StaticMesh



I tried Use the parameters in the GraphSettings But it doesn’t work
I don’t know which variable I should use

How to filter LandscapeLayer?
I didn’t find the right relevant node

Just wanted to say thanks for creating this tutorial series :slight_smile:

1 Like

Hello, I like to say how much I am enjoying your video series. I do have a question about EP4 with the use of the Get Spline Data node and the splines. I have followed the video to the letter, and I am unable to get the Spline Data to work. Any suggestions on what I may do to solve this issue? Thank you for your time and support.

1 Like

Hi, anyone else seeing changes on trying to get pointloopbody to run. Bypassing it works fine, and breakpoints inside it break so im not sure what the error is.
Also the locations of the functions have changed from under “execute” to:

image
The function/node that calls point loop body has also changed in name to “Point loop” instead of “loop on points”
Anyone have any suggestions?

I haven’t found much of an answer online for splines, so the tutorial was useful but i can’t make normal spline to exclude the other trees. it seems like the tag i am using isn’t working even if i made it the same way as tutorial or tried some different ways of doing it. is there other ways for the spline actors to work besides using tags?

I will bump this post, as I am looking into a similar thing. There is a Create Point, which is what I need, but would be great to pass an array of transforms into it from a BP that is referenced by either “Get Actor Property” or “Get Actor Data” nodes.

My main problem is trying to generate splines.


image

I just cant figure out how to get them into the right order to make a circular boundary.

In the above post I create a circle using distance and density filters but it just wont make a circle

EDIT:

I found a way but its clumsy and involves manually creating points, which i guess works for most use cases.


Order they go into spline is decided by the order they go into merge.

There is probably a cleaner way of doing it

EDIT2:

Weird thing where it only generates where you first place it, even if you move pcg.
Solution is to put the create point in a different graph and feed into subgraph with rest on.

1 Like

Hey guys hope you are doing well, I was hoping someone could help me with this, I want to have like a Boolean or a Branch, so I can switch between my preview mesh and final mesh, so it’s lets laggy and more easy to manipulate. Thanks you very much have a good day !

I keep double clicking pcg nodes by accident and having to wait 5 min for visual studio code to load in the background, can I disable that? or have a pop up that asks if I want to open studio code?

2 Likes

How do I get point index in a point loop body?


is it just me, or the “get actor data” + “copy to points” is not working properly anymore, it just copies so many points in the scene instead of one point

so here where we ask questions about PCG and we get answers? i just want to know if there is a way or any sort of work around for generating point on assemblys?
something like mesh sampler , but for assemblys or level instanses?

Hi @AdrienLogut could you please clarify a couple of advanced concepts for me?

  1. I saw that there is a PCGBlueprintElement class that allows you to create advanced nodes… however it doesn’t seem possible to input arrays of values. For example I have a custom structure, and I would like to input an array of values based on that structure. At the moment I have not found a solution.

  2. Is there a way to execute certain subgraphs only if a certain condition is true? A sort of blueprint Branch.

Thank you!