当前位置:网站首页>Project training of Software College of Shandong University rendering engine system basic renderer (V)
Project training of Software College of Shandong University rendering engine system basic renderer (V)
2022-06-12 15:51:00 【chenxiang_ two hundred thousand one hundred and eight】
< Project training of Software College of Shandong University > Rendering engine system —— Base renderer ( 5、 ... and )
- Preface
- One 、 Basic logic
- Two 、 Main function code
- 1、 Body tracking framework
- 2、 about Diffuse and Glossy Object sampling direct light
- 3、 Generate Glossy Scattered light
- 4、 Generate Diffuse Scattered light
- 5、 Generate Glass Scattered light
- 6、 Generate Mirror Scattered light
- 7、 Tracking scattered light
- 8、Gloosy Scattered light hits an object
- 9、Gloosy The scattered light missed the object
- 10、Diffuse The scattered light missed the object
- 11、Specular Scattered light hits an object
- 12、Specular The scattered light missed the object
- summary
Preface
This project hopes to implement a basic renderer , At the same time, it can support the use of precomputing . This article focuses on PathTracer Specific path tracking process code .
Project address
One 、 Basic logic
Same as the previous article , To calculate the contribution of the path corresponding to each pixel , We first initialize the path . Depending on the corresponding pixel from VBuffer After reading the hit point information in , For this hit point , We first calculate the contribution of direct illumination . Because we support multiple importance sampling , So we need to sample the light source when calculating the direct illumination contribution , For different light sources , We distinguish between different ways of calculating contributions , This contribution is then superimposed on this ray result . Of course , If the sampled light source does not actually contribute to the hit point , Then we will ignore it .
After calculating the contribution of direct illumination , We generate and track scattered rays , The direction of the light is determined by BRDF Sampling acquisition of . For tracking the hit results , We saved it . If we don't hit the object in the scene , Then we sample the ambient light directly and add its contribution to the path . If we hit , Then update the current path throughput, After that, take the new hit point as the starting point to continue the tracking similar to the above .
Two 、 Main function code
1、 Body tracking framework

2、 about Diffuse and Glossy Object sampling direct light

3、 Generate Glossy Scattered light

4、 Generate Diffuse Scattered light

5、 Generate Glass Scattered light

6、 Generate Mirror Scattered light

7、 Tracking scattered light

8、Gloosy Scattered light hits an object

9、Gloosy The scattered light missed the object

10、Diffuse The scattered light missed the object

11、Specular Scattered light hits an object

12、Specular The scattered light missed the object

summary
It mainly shows PathTracer The main code for the specific implementation of the function , That is, the relevant code of the specific path tracking process .
边栏推荐
猜你喜欢

< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(七)

redis String类型常见命令

Servlet knowledge explanation (2)

How to use grafana to easily realize OVL data visualization

【光源实用案例】 UV-LED固化创新,让产线变得更丝滑

Understanding of dart typedef

Redis string type common commands

Change according to the situation, the road to promotion in the second half of 2022

Acwing暑期每日一题(6月10日性感素数)

jupyter notebook新环境快捷方式
随机推荐
ER diagram made by StarUML based on the last student achievement management system
Increase the maximum number of MySQL connections
Codeforces Round 797 (Div. 3,CF1690)全题解
Idea大全(转载)
Redis General Command
Job submission instructions upload jobs to network disk
Tensorflow function: tf nn. in_ top_ k()
IGMP报文(TCP/IP详解卷1/卷2)
Servlet知识详解(2)
Conversion between sparse array and array and file reading and writing
PHP builds a high-performance API architecture based on sw-x framework (II)
Introduction to resttemplate
VIM installation and common commands
2022.02.28 - SX11-05. The largest rectangle in the histogram
一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤
Two implementation methods of generic interface
Dart typedef的理解
Using the CSDN markdown editor
redis String类型常见命令
Instructions de soumission des tâches télécharger les tâches sur le disque réseau