lisyarus,
@lisyarus@mastodon.gamedev.place avatar

New blog post: Demystifying multiple importance sampling

It is a simple thing that turns out to be confusing to a lot of us rendering engineers. I try to explain it in detail here with path-tracing examples!

https://lisyarus.github.io/blog/posts/multiple-importance-sampling.html

theWarhelm,

@lisyarus Thanks for the writeup! One thing I always struggle with (MIS, ReSTIR, etc.) is how do you compute the probability p(i)? Is it just a matter of looking it up for a given function? Or can it be derived given your function? For instance, for a uniform distribution, I assume p(i) is 1 because each sample has the same probability of being picked? Or is it 1/interval? Maybe I just need to brush up on probability theory :)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@theWarhelm Usually you explicitly compute it, yep! For a uniform distribution on a set with "size" A, the probability is 1/A (e.g. 1/(b-a) for an interval [a,b], or 1/(2*pi) for a hemisphere). For more complicated distributions like VNDF there's just a formula for the actual probability.

theWarhelm,

@lisyarus That finally makes sense, thanks!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@theWarhelm I'll add that sometimes the probability isn't actually known, and in this case you can't use the method for Monte-Carlo. E.g. in smth called "sampling importance resampling" they generate N samples with distribution P and select one of them with some weights to approximate some other distribution Q. When N=1, you get the original distribution P. When N -> infinity, you get Q. In the middle, you get some distribution with pretty much unknown probability.

alfredbaudisch,

@lisyarus nice surprise seeing a new post from you popping up in my RSS reader.

The math fried my brain. 🙈 Rendering math is really not for me. But nice read, as always!

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar

@lisyarus I am biased by years of working in optics, but using ω as a direction feels cursed.

lesley,
@lesley@mastodon.gamedev.place avatar

@j_bertolotti @lisyarus It is very common in graphics literature though. It is indeed cursed as some people using it as directions while other people use it for angles

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar

@lesley Beside, if one uses it as a direction, there should be some visual indication you are talking about a unit vector, e.g. r̂.
@lisyarus

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@j_bertolotti @lesley Tbh I don't like this practice - it clutters formulas way too much. From my experience, this is rarely done in in math literature.

You still have to remember which variable means what, so remembering what is a vector and what isn't doesn't seem like it changes that much.

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar

@lisyarus Hard disagree. Together with using standard symbols for standard quantities (in Physics&co the same quantities keep turning up over and over), it helps parsing an otherwise complex equation at a glance.
@lesley

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@j_bertolotti Well, as @lesley said above, the notation is actually standard in graphics literature.

lesley,
@lesley@mastodon.gamedev.place avatar

@lisyarus @j_bertolotti I always find working memory overload to be one of the major obstacles when reading math-heavy literature, so I definitely appreciate whatever notations that alleviate this cognitive burden

j_bertolotti,
@j_bertolotti@mathstodon.xyz avatar

@lisyarus Well, as I said in my first comment, I am biased 🙂 @lesley

demofox,
@demofox@mastodon.gamedev.place avatar

@lisyarus I was about to share this at work, but then saw @andrewhelmer47 beat me to it haha

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox @andrewhelmer47 Ohhh wow, thank you both! ^_^

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ethstaker
  • DreamBathrooms
  • cubers
  • osvaldo12
  • mdbf
  • magazineikmin
  • normalnudes
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • JUstTest
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • thenastyranch
  • Durango
  • tester
  • GTA5RPClips
  • modclub
  • megavids
  • provamag3
  • Leos
  • lostlight
  • All magazines