How to get Landscape splines for PCG script?

I would like to use Landscape splines to remove the trees above the roads. Unfortunately I can’t find the selector settings in GetSplineData node to achieve this. (also those actors/splines doesn’t have tags)
Is there any solution for that?

1 Like

Hi,

I’m trying to do the same without success till now.
I’ve found that option : Filter by class / Landscape Spline Actor

maybe you’ll have more luck !

1 Like

Thanks, I found this yesterday. Unfortunately I can’t get it work either.
A temporary hacking solution is to draw a spline along the road, and use it in PCG.

I have got an answer from AdrienLogut.

“I plan to talk about it in episode 4, but in the mean time, you can get your spline by tagging it, and then use “Get Spline Data”. It will work with Splines and Landscape Splines”

thanks. I was able to find a way to tag Landscape Spline (even worst, i cannot select the Landscape Spline itself, I can only the LandscapeSpline Control Point or Landscape segments : never the spline itself).

So looking forward for Episode 4 to see what i’m doing wrong !

In Selection Mode
image

you can select Landscape Spline Actor
image

and add an actor tag.
image

Then use Get Spline Data
image

with All World Actors and By Tag
image

Debug View :

3 Likes

thanks but i cannot see those. Is there something special to do ?

How i create my splines (in landscape mode)

In selection mode, i cannot see the spline:

No right click option to expand Landscape

In Landscape mode, i can only see control points & segments


EDIT: Adding the correct pictures

You’re still in Landscape Mode, switch to the default Selection Mode on the top left :
image

[EDIT] : I did some testing, I think this only works if you have World Partition enabled.

1 Like

If you don’t want to use World Partition, just adding the tag to the Landscape Actor itself also works!

1 Like

sorry for that - I didn’t add the correct pictures. I’ve edited my post.
My problem was that the i will never see the Landscape actors in selection mode. So

I think i understand why now. I created a copy of SimpleForest provided in the example for PCG. That level seems to have some settinigs preventing Landscape actors to show

When i use another level (eg Third Person default level), and recreate my landscape spline, i can see it.

This might be due to World Partition disabled on the SimpleForest example: i was not able to activate it nor check if it’s active…

The cool thing is that my code which was not working on the Simple Forest level works now :slight_smile:

Thanks for the hint about level partition !

2 Likes

Thank you for the explanation. It is bad that we can see the missing puzzles only with world partitions for the splines. Hopefully it will be fixed in the next version.

1 Like

Does Anyone know how to make sure the PCG volume sticks to the ground while I deform the landscape?

Push down the bottom of the volume below the surface.
If that doesn`t help, click on the PCG component and clear, regenerate.

P.S.: this is a totally different subject.

The solution is the GetSpline node, but the selector class type should be “Landscape”

4 Likes

I tried the tutorial on my project and I find the road spline is not able to exclude trees and other stuff. The difference is my landscape is created from the Openworld template. (world partition) Not Basic map . I tried my PCG Graph it works on Basic. Is this a know issue?

I also tried use the by tag method but there is a warning and won’t generate content.

1 Like

Its weird I changed tag name to Road I can get the debug sample now, but still can not generate any trees.

I found an easy solution for a spline based PCG Forest.
Here is the tutorial I created with the snippet to paste into the PCG Graph:

1 Like

This. Somehow it selects the splines drawn from the Landscape Mode. I tried a lot of classes like LandscapeSplineActor and other but somehow, Landscape works.

1 Like