Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Create Posts “2024-03-03-bsdf中的重要性采样的相关推导与思考”
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultcrt committed Mar 3, 2024
1 parent 264527e commit 7a9feeb
Showing 1 changed file with 93 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: BSDF中的重要性采样的相关推导与思考
date: 2024-03-03T09:44:37.443Z
last_modified_at: 2024-03-03T09:44:37.444Z
excerpt: 针对BSDF中的重要性采样的推导与相关思考
categories:
- 图形学
tags:
- BSRF
- 路径追踪
- 数学
header:
overlay_image: https://picsum.photos/1920/640
caption: "来源: [**Lorem Picsum**](https://picsum.photos/)"
teaser: https://ultcrt.github.io/UltBlog/assets/images/site/default-teaser.png
---
这里的重要性采样指的是蒙特卡洛积分过程中,使用特定的PDF(概率密度函数),使随机变量的分布更符合被积函数,从而提高结果的准确度。

这里首先给出蒙特卡洛积分的公式:

$$
\int_a^b f(x)dx\approx\frac 1 N \sum_{n=1}^N \frac {f(x_n)} {p(x_n)}
$$

其中,$$N$$为采样数量,$$p$$为PDF。

可以看到,如果PDF满足:

$$
p(x)=\frac {f(x)} {\int_a^b f(x) dx}
$$

那么此时蒙特卡洛积分能够严格等于原积分,其实上述这种情况就是最理想的重要性采样。

如果要将重要性积分运用到BSDF上,那么就需要确定两件事:
1. 怎么采样
2. 怎么求PDF

首先来看


参考文献:

[1] [Some Notes on
Importance Sampling of a Hemisphere](https://www.mathematik.uni-marburg.de/%7Ethormae/lectures/graphics1/code/ImportanceSampling/importance_sampling_notes.pdf)

[2] [Spherical coordinate system](https://en.wikipedia.org/wiki/Spherical_coordinate_system)














































0 comments on commit 7a9feeb

Please sign in to comment.