Sampling lights

Practical and theoretical implementation discussion.
jbikker
Posts: 186
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: Sampling lights

Postby jbikker » Wed Dec 28, 2011 5:09 pm

ingenious wrote:Hm, looks similar indeed. Though I cannot understand Jacco's reply.


Hm, indeed, it's the same thing. Sorry for the confusion.

voidcycles wrote:What if you have more light sources than you can fit in memory? Would you still use a discrete sample table?


That would be an interesting scene. :) I target interactive rendering, so everything will definitely be in-core.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Sampling lights

Postby spectral » Thu Dec 29, 2011 7:00 am

How a scene cannot fit all the light sources in memory ?

You can play with 2 arrays :
1 - A array for the lights source, N lights mean an array of size N
2 - An array of indices that point to the first array

This way you can have a lot of lights...

Of course, it is still possible to do some out-of-core rendering if you really have a hughe scene !
Spectral
OMPF 2 global moderator

franz
Posts: 12
Joined: Thu Dec 29, 2011 5:38 pm

Re: Sampling lights

Postby franz » Thu Dec 29, 2011 5:43 pm

Here's an article of interest about efficiently sampling discrete distributions: http://www.keithschwarz.com/darts-dice-coins/. Of particular interest is the Alias method which can sample in O(1) with O(n) memory. If I'm not mistaking, Jacco's technique is described in "Simulating a Loaded Die with a Fair Die".

Cheers,
Franz


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 16 guests