4
$\begingroup$

I am currently reading the awesome paper by Jorge Jimenez about Character rendering : Next Generation Character Rendering

In the part about multi-sampled transmittance he uses some Poisson offsets and a jitter texture which contains [cos(x), sin(x)] and is used to rotate the the Poisson disk samples.

But I am wondering how do you generate such texture ?

Here is the part of the ppt which talks about this.

enter image description here

$\endgroup$
6
$\begingroup$

The texture is probably generated by picking a random angle per pixel, and populating the image with its sine and cosine, remapped into [0, 1]:

$$\theta \sim [0, 2\pi] \quad \to \quad \begin{bmatrix} \tfrac{1}{2} \cos \theta + \tfrac{1}{2} \\ \tfrac{1}{2} \sin \theta + \tfrac{1}{2} \\ 0 \end{bmatrix}$$

I did a quick test and generated something that looks pretty similar (enlarged 4x):

enter image description here

If you want to be extra fancy, then instead of picking independent random angles for every pixel, you might try stratified sampling or a low-discrepancy sequence. That may give better final results for whatever effect you're using the jitter texture for, due to better local sample distribution.

$\endgroup$
  • $\begingroup$ Thank you very much for your answer, could you tell me more about stratified sampling and low-discrepancy sequence ? $\endgroup$ – MaT Feb 17 '16 at 18:38
  • $\begingroup$ For reference, here is the source for a low discrepancy sample (blue noise) generator github.com/bartwronski/BlueNoiseGenerator $\endgroup$ – Mikkel Gjoel Oct 5 '16 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.