PCG Select Points does not work as expected.

Hi there!

Select Points node description says: “Selects a stable random subset of the input points.”
It has two parameters: Ratio and Seed.
One would expect that Ratio 0.5 would mean that Output is half of the Input points. If input has 36 points ratio 0.5 would output 18 points.
It is not the case. It is random. Depending on the seed you may have more or less points. It is not strickly connected to Ration, it is not very deterministic.

There is more. If you take 36 points, pass it through Select Points node with ratio 0.5, you will Output something in between 16 and 21 points, lets say we got 20 this time. If you copy this node and connect them, so now your Input is 20 points, you Output of the second select node will be exactly the same 20 points. So second Select Points node does nothing with data. You have to change Seed to see any result.

It makes no sens to me.

How are you supposed to use it? Any ideas? Am I doing something wrong? Is there another node that can reduce the number of points in more controlled manner?

1 Like

I wish I knew…

I’m trying to do something as simple as spawn two different types of tree actors and can’t figure out how. I just need to get half the points to spawn one tree, then the other half to spawn the other.

So “Random Choice” is exactly what I was after. Took me a few hours. Everything in PCG works so different than what I’m used to. Its getting easier though.