PCG Points on Steep Landscape Slopes

As the title suggests, I would like to have a grid of points over my landscape, that stay uniform on both flat areas as well as very steep slopes, without the points “stretching” up the slope with large gaps in between points vertically. Thanks in advanced for any help.

Whats this got to do with PCG and what you instruct it to do?

Landscape is one thing - and its limited to 1 vert per meter in x/y at 100 x/y scale setting.

Pcg and how you define where stuff spwans is unrelated to landscape.


Perspective View Points in PCG Volume


Top View Points in PCG Volume

I believe this is the issue @Evohc is talking about. I am experiencing the same.
In my case, this PCG point data is being taken from a Surface Sampler using the Landscape as input, it has the Looseness set to 0.
The surfaces that are flatter (assuming a projection of points from above the landscape) form rows but as the points are generated up a slope they start to spread out or break ranks from the grid pattern.
Currently on 5.3.

After a bit of reading in the Documentation I found this in regards to surfaces:

" Surfaces are a type of spatial data that represents data that is 2D, such as Landscapes, which are mapped to the XY plane, or the Surface Sampler node that generates points on a 2D plane and projects them onto a 3D shape. "

That’ll likely be the culprit as to why the points creep up slopes. Only one plane of projection.

Guess the real question is: can you manipulate the projection plane? Or have multiple?

Thanks @DezCookies, that is what I was getting at as well. I was doing some looking, and was looking at what the “world hit ray query” node could do, but it doesn’t seem to like anything that isn’t straight up/down either. There is also a volumetric based hit ray query node, but that one doesn’t conform to the landscape (though can be used to “minecraft-ify” a landscape I suppose). Maybe there will be something better in a later update, as PCG is still very experimental right now.

[quote=“DezCookies., post:3, topic:2015062, username:DezCookies”]
I believe this is the issue… [/quote]

How would you expect a top view to render objects that are vertically stacked under other objects?
This is the same thing.

But it shouldn’t matter.
Your perspective view is fine - things should spawn based on that.

So, for what purpose do you need this?
Lets start with that.

Also, realize that whatever it is, you already have it - you just have to figure out a way to save the material’s texture, since that is already flat and represents exactly what you have in the perspective view.

If you just want to define a randomized spawn zone that covers the landscape, all you need to do is take the heightmap as a basis - 1px is one meter squared.

Again, not sure what the end purpose is here.

Hey @Evohc, you had something with your World Hit Ray Query idea.

I found this YouTube tutorial and it helped me work a solution I think I can use:

I haven’t done a lot of testing yet but the initial results were promising.

Perspective View:

Hopefully the tutorial can help you too :slightly_smiling_face:

Hey, sorry for the late reply @DezCookies. Yeah I saw that video. Though if you wanted to trace say in the x and y it could take a bit of extra setup. On the other hand, this video was just released:

Not sure how performant it is for something like a landscape, but I may have to give it a try. He also mentions 5.5 will possibly have built in traces, so waiting patiently for 5.5 might be another option!