# Tag Info

9

It's a geometric assumption like the other two. Consider a flat macrosurface. Its projected area in any direction $v$ is just $v\dot\ \hat N$ times its area (where $\hat N$ is the surface normal). In particular, the case where you're looking at it along the normal is simplest: the projected area is equal to the area of the surface. Now split the ...

7

Firstly, as @trichoplax correctly pointed out, your randomPoint function calculates a point in a cube, then uses rejection sampling to return all points that are inside a unit sphere. In order to return points on a sphere, you would need to change the greater than to an equals. That said, rejection sampling is very inefficient. A better way to sample a ...

6

I think that there is a bit of confusion in terminology. My understanding is that only the initially colored points, before step 1, are called seeds. Maybe this helps clarify the algorithm as well. When the a point $p$ with color $s$ finds a neighbor $q$ with color $s'$, he compares the distance $d(p,s)$ with $d(p,s')$ (not $d(p,q)$) to ...

5

I'm not sure I've correctly understood the question, but here goes. You're trying to sample directions uniformly, so you've got $p(\omega)$, which is the probability of getting a particular direction. But what is a direction? You actually need your probability distribution to produce numbers in some representation, and the easiest representation to deal ...

4

You can of course, as you suggested, map (u, v) to (φ, θ). Unfortunately, it does not solve the problem for 5 points: I've changed Holger Dammertz' code a bit (switched u and v), and you see that the problem still persists. For a higher number of points, it really doesn't seem to make a (visual) difference. The Hammersley point set is a way to very quickly ...

3

The general idea for sampling half vector based distributions is that you generate $H$ and then compute $w_i$ by reflecting $w_o$ about $H$. This is so $H$ will be the half vector of your $w_i$ and $w_o$ pair. It is standard reflection: $$w_i = -w_o + 2(w_o\cdot H)H$$ How you generate $H$ depends on the specific distribution. Generally, it is done in polar ...

3

Most normal distribution functions (NDFs) are parametrized by some variable (tipically $m$ or $\alpha$) that determines the "roughness" or "spikiness" of the NDF (this is often meant to be the rms slope of the surface). Here is an example of how a roughness parameter effects an NDF: https://www.desmos.com/calculator/kcevxp3wm0 we can think of the NDF as a ...

3

$D(\omega)$ is defined as the area ($m^2$ unit in the numerator) of the microsurface with normals pointing in the direction $\omega$. $\mathcal{M}'$ is defined as the portion of the microsurface with normals point in the direction $\omega \in \Omega'$. So it's natural that the integral of $D(\omega)$ over $\Omega'$ gives the area of $\mathcal{M}'$. ...

2

So for anyone who was interested - after studying the source material by Walter, I became convinced the error had to be in the rotation of the slopes back into "normal shading space". PBRT does this in a one-liner: "CosPhi(wiStretched) * slope_x - SinPhi(wiStretched) * slope_y;" etc etc. I had split it out into separate sinTheta, sinPhi, sinPhiX steps. ...

2

See the paper Computer Modelling of Fallen Snow published in SIGGRAPH 2000: In this paper, we present a new model of snow accumulation and stability for computer graphics. Our contribution is divided into two major components, each essential for modelling the appearance of a thick layer of snowfall on the ground. Our accumulation model determines how much ...

2

for each point $p$ in theory we have a 3D function that tells us the orientation in a given direction You have missunderstood this. $D$ is a Normal Distribution Function (or short NDF), so it doesn't really give you a single normal, but a distribution. In a (specular) BRDF you are always using the normal that is the half vector between the incoming and ...

1

Barycentric coordinates need to sum to 1.0, so pick two of them (say $u, v$) randomly from [0, 1] and then set the third as $w = 1 - u - v$. This will give you random points that are evenly distributed with respect to area, in a parallelogram consisting of two copies of the triangle. Then, you can reflect across the triangle edge to bring both copies of the ...

1

For sampling a uniform volume you use the mean free path of a photon: float dt = -logf(1.0f - Xi) / uT; where: Xi is a random variable in [0, 1] uT is the extinction coefficient (sum of out-scattering and absorption) The pdf of a raytime (t) in this uniform volume is given by: float pdf = uT * expf(-t * uT); In your case, you do not have a uniform volume, ...

1

The "Uniform Mapping" here is incorrect. It does not transform to a uniform distribution on the sphere. Very very bad me. I misread the equation AND I didn't even consult my own reference , if I had I would have seen my mistake. Still the method from  is interesting and is described below. Additional note: To map a uniform point set from ...

Only top voted, non community-wiki answers of a minimum length are eligible