<p>I am working on a procedural placement system on the GPU, inspired by the work done by Guerrilla Games in Horizon Zero Dawn:
<a href="https://www.guerrilla-games.com/read/gpu-based-procedural-placement-in-horizon-zero-dawn" rel="nofollow noreferrer">https://www.guerrilla-games.com/read/gpu-based-procedural-placement-in-horizon-zero-dawn</a></p>

<p>On slide 28 they are showing a sampling pattern, which they use to determine whether to place an object or not. The pattern consists of evenly distributed points, each with a threshold value, which they test a artist-authored density map against.</p>

<p>The threshold values are picked, such that they are evenly distributed and maximize the distance to neighboring sample points.</p>

<p>I have looked into circle packing on a unit square to generate the sampling points, and this seems fine.</p>

<p>The point I am having trouble with is how to create the threshold values with the specified requirement (even distribution between 0 and 1 and maximizing the distance to neighbors).
Can someone point me in the right direction, as to how to achieve this? Thanks in advance.</p>

CC BY-SA 4.0
2020-01-03T14:26:32.593Z
Looks like a blue noise point set. You can try Lloyd relaxation.
lightxbulb
CC BY-SA 4.0
2020-01-04T09:16:30.177Z
Thanks for your comment. As I said, the generation of the sampling parts is more or less clear to me. I am more having problems with the threshold values. Does Lloyd relaxation help with that? I guess it at least gives a more explicit notion of which points are neighbors (thanks to the voronoi graph).
Philipp
CC BY-SA 4.0
2020-01-04T09:42:11.640Z
I think that maximizing the distance to the neighbours is with respect to the sample locations. The values that the samples hold (threshold values) seem to be required to be evenly distributed. The problem is that this can mean too many things, and just from the slides it's not obvious which meaning exactly they have in mind. I would go with uniform random thresholds.
lightxbulb
CC BY-SA 4.0
2020-01-04T10:48:16.653Z
Sorry maybe I failed to describe this in much detail. A couple of slides earlier they speak about ordered dithering and that there the threshold values are picked such that they maximize the distance to neighboring values. In the speaker notes for this presentation they then say that they apply the same to their own sampling pattern.
Philipp
CC BY-SA 4.0
2020-01-04T11:11:41.527Z
Ordered dither is usually defined on a rectilinear grid however. My best guess would be blue noise on a blue noise distributed pointset: $\sum_k v_k\delta(x - v_k)$ having a blue noise spectrum, but I am nkt aware how to optimize this efficiently on the GPU. Some pseudo-Jacobi method for example. All in all, the slides simply do not provide enough details, look for papers.
lightxbulb
<mathematics><sampling><noise><distribution>
GPU Procedural placement - Creating evenly distributed sampling points
Philipp
# GPU Procedural placement - Creating evenly distributed sampling points

(Asked by: username_0 on 2020-01-03)

I am working on a procedural placement system on the GPU, inspired by the work done by Guerrilla Games in Horizon Zero Dawn:
<https://www.guerrilla-games.com/read/gpu-based-procedural-placement-in-horizon-zero-dawn>

On slide 28 they are showing a sampling pattern, which they use to determine whether to place an object or not. The pattern consists of evenly distributed points, each with a threshold value, which they test a artist-authored density map against.

The threshold values are picked, such that they are evenly distributed and maximize the distance to neighboring sample points.

I have looked into circle packing on a unit square to generate the sampling points, and this seems fine.

The point I am having trouble with is how to create the threshold values with the specified requirement (even distribution between 0 and 1 and maximizing the distance to neighbors).
Can someone point me in the right direction, as to how to achieve this? Thanks in advance.

**Tags:** mathematics, sampling, noise, distribution

> **Comments:**
> **username_1**: Looks like a blue noise point set. You can try Lloyd relaxation.  
> **username_0**: Thanks for your comment. As I said, the generation of the sampling parts is more or less clear to me. I am more having problems with the threshold values. Does Lloyd relaxation help with that? I guess it at least gives a more explicit notion of which points are neighbors (thanks to the voronoi graph).  
> **username_1**: I think that maximizing the distance to the neighbours is with respect to the sample locations. The values that the samples hold (threshold values) seem to be required to be evenly distributed. The problem is that this can mean too many things, and just from the slides it's not obvious which meaning exactly they have in mind. I would go with uniform random thresholds.  
> **username_0**: Sorry maybe I failed to describe this in much detail. A couple of slides earlier they speak about ordered dithering and that there the threshold values are picked such that they maximize the distance to neighboring values. In the speaker notes for this presentation they then say that they apply the same to their own sampling pattern.  
> **username_1**: Ordered dither is usually defined on a rectilinear grid however. My best guess would be blue noise on a blue noise distributed pointset: $\sum_k v_k\delta(x - v_k)$ having a blue noise spectrum, but I am nkt aware how to optimize this efficiently on the GPU. Some pseudo-Jacobi method for example. All in all, the slides simply do not provide enough details, look for papers.  

---

## 0 answers

