Search found 6 matches

by akalin
Wed Aug 26, 2015 8:27 am
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

Re: A better way to sample a sphere (w.r.t. solid angle)

One more thing. (Sorry, I haven't thought about this stuff for a while, so it's all coming back to me in pieces.) Your method *could* be made to work, by adjusting the pdf like so: you start with the uniform cone PDF based on the projected interior solid angle, then convert to a PDF over the visible...
by akalin
Wed Aug 26, 2015 7:33 am
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

Re: A better way to sample a sphere (w.r.t. solid angle)

Ahh. I had realized that this changes the distribution of rays, but thought that as long as the PDF was correct this wouldn't be a problem. Now that you explained it I can see why biasing towards the edges is incorrect: if, for example, an object is eclipsing the center of the light as seen from th...
by akalin
Wed Aug 26, 2015 4:06 am
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

Re: A better way to sample a sphere (w.r.t. solid angle)

Thanks for the reply akalin, With my method I propose turning the sampling "inside out", so rather than sampling the sphere from the ray origin, what I'm trying to do there is sample a direction from the cone inside the sphere that results in a point that's visible from our origin. So the tangent l...
by akalin
Tue Aug 25, 2015 9:33 pm
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

Re: A better way to sample a sphere (w.r.t. solid angle)

I've had a similar confusion while reading PBRT. I like to derive all algorithms myself from first principles, so while deriving the sphere sampling one I arrived at an (in my opinion) simpler solution, and couldn't find any drawbacks with it. This is the code and the rendered documentation for it:...
by akalin
Fri Jan 17, 2014 2:29 pm
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

Re: A better way to sample a sphere (w.r.t. solid angle)

I'd like to know how the conversion from θ to α is done. It seems to me this conversion is also prone to some inaccuracies, but then this probably doesn't matter as it should always yield a valid point on the sphere. However, this point may end up backfacing the original shading point, which is som...
by akalin
Thu Jan 16, 2014 5:23 pm
Forum: General Development
Topic: A better way to sample a sphere (w.r.t. solid angle)
Replies: 16
Views: 20610

A better way to sample a sphere (w.r.t. solid angle)

Hi all, The usual method for sampling a sphere from a point outside the sphere is to calculate the angle of the cone of the visible portion and uniformly sample within that cone, as described in Shirley/Wang . However, one detail that is glossed over is that you still need to map from the sampled di...