Set particle size and density based on distance from camera

I have large pointcloud scene created using Visual Effect graph in 2019.3.3HDRP.
Object that is close to the camera looks good when the points are tiny and dense, lets say size 0.15 and capacity 70 000. However, the object that is further away from the camera dissapears with the same settings. The far-away object looks fine lets say with size 0.7 and capacity 20 000.

Is there a way to dynamically change these parameters based on the distance from the camera? Or is there another approch that might make the pointcloud look differently depending on the positon in scene?


You can measure the distance to the camera and scale your particles based on that value. In some situations that subpixel anti-alias can help too. Screen space size block allows you to set absolute particle size in pixels, regardless of the distance. Maybe you could adjust your spawn rate based on distance? Capacity controls the maximum amount of particles being shown in your system, while spawn rate is the amount particles being spawned every frame.

But in case of point clouds, you would probably have to do this on object by object basis somehow, If you got separate objects. Anyway that distance based particle scaling would help defining the look, I bet.

Hi, Maarja!
I have the same problem. Have you found a solution?