• Stars
    star
    235
  • Rank 170,303 (Top 4 %)
  • Language
    C++
  • Created almost 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easy Ray Tracing, a lite renderer and tutorial from theory to implement, with OpenGL

EzRT

Easy Raytracing Tutorial (EzRT) is a lite code, simple tutorial for beginners to learn raytracing, with OpenGL and C++

OverView

This tutorial contains 5 chapters, each chapter include tutorial blog (provide .md & .pdf files) and example code.

part 1. basic ray tracing

In this part we will implement a basic ray tracing program with C++, then output each pixel as the result to png image.

part 2. BVH Accelerate Struct

We just using a for loop to travel meshes. But BVH will support us to tracing on a big mesh with lots of triangles, and accelerate the program.

part 3. OpenGL ray tracing

Using OpenGL's fragment shader to run accelerate program. Transfer BVH and triangles in texture buffer, then send to shader. Finally tracing each pixel progressively, then display the dynamic tracing process in screen.

part 4. disney principle's BRDF

Learning micro facet theory, using Disney principle's BRDF to rendering various of physical material.

image-20211023170631173

part 5. Importance Sampling & Low Discrepancy Sequence

Methods to denoise, accelerate fitting progress.

Low Discrepancy Sequence (Sobol) :

Importance Sampling, diffuse (left) and BRDF (right) :

Importance Sampling for HDR envmap :

Multi Importance Sampling with Heuristic power :

Requirement

environment:

  • Windows 10 x64
  • visual studio 2019
  • vcpkg
  • cmake

C++ lib:

  • GLUT (freeglut) >= 3.0.0
  • GLEW >= 2.1.0
  • GLM >= 0.9.9.5

Third part cpp lib:

  • hdrloader

Build

cd to source coce directory, then:

cmake ./

Other

  • building on x64
  • set project 'main' as 启动项目
  • running in Release mode

Bugs & TODO

  • fix error in chapter 1, it's right to multiply cosine wo in rendering equation, not wi
  • 摆烂了

Reference

[1] Brent Burley, Walt Disney Animation Studios 2012, "Physically-Based Shading at Disney"

[2] Stephen Joe and Frances Kuo, "Sobol sequence generator"

[3] Stephen Joe and Frances Y. Kuo, "Notes on generating Sobol sequences"

[4] cs184.eecs.berkeley.edu, "Project 3-2, Part 3: Environment Map Lights"

[5] blender (document), "Cycles Sampling Patterns, Sobol"

[6] Shih-Chin, "Implementing Disney Principled BRDF in Arnold"

[7] Matt Pharr, Wenzel Jakob, and Greg Humphreys, "Physically Based Rendering: From Theory To Implementation"

[8] knightcrawler25 (GitHub), "GLSL-PathTracer"

[9] 文刀秋二 (知乎), "低差异序列(一)- 常见序列的定义及性质"

[10] ksg fk (知乎), "【Nori】任务5:路径追踪,微表面模型和多重重要性采样"

[11] Image Synthesis (CS474 F16), "Assignment 4 -- Image-based Lighting"

[12] Dezeming (CSDN), "多重重要性采样(MIS)与光线追踪技术"

[13] lookof (博客园), "BVH with SAH (Bounding Volume Hierarchy with Surface Area Heuristic)"

[14] bluerose (知乎), "PBRT笔记(12)——蒙特卡洛积分"

[15] 孙小磊 (知乎), "计算机图形学十五:全局光照(蒙特卡洛路径追踪)"

[16] Atrix256 (twitter), "Casual Shadertoy Path Tracing"

More Repositories

1

ToyRenderPipeline

Custom deferred render pipeline with Unity SRP(Scriptable Render Pipeline)
C#
190
star
2

CasualPRT

Precomputed Radiance Transfer Global Illumination in Unity URP
C#
149
star
3

FFTConvolutionBloom

Bloom using FFT to accelerate convolution, with Unity URP
C#
89
star
4

Hello-Minecraft-Shaders

shaders tutorial for Minecraft, including Volume Cloud, Screen Space Reflection, Bloom
GLSL
82
star
5

RealTimeAtmosphere

real-time atmosphere rendering in Unity URP
C#
72
star
6

CasualBloom

Bloom Effect in Unity Build-in pipeline
ShaderLab
37
star
7

FlyingCtrl-C---keil-_SZU_OPTO

四轴无人机飞控软件层,需要底层支持,所有的调用均在时间表任务中完成(单位:毫秒),每一个.c文件中的函数都有对应的调用时间,入口参数需要使用单片机底层代码(如SPI IIC等,读传感器原始数据然后传入
C
4
star
8

SZU-DBSC-LAB3

深大数据库系统课程:实验3
HTML
3
star
9

Muelsyse

graphic playground
C++
2
star
10

Convolution-Neural-Network-Frame-only-based-on-Numpy-

Convolution Neural Network Frame only based on Numpy 纯Numpy写的卷积神经网络框架,非常垃圾,没有优化,bug多
Python
2
star
11

grapic-demo-of-XiaoXiaoLe-algorithm

a grapic demo of XiaoXiaoLe algorithm(dfs) 消消乐算法的图形演示,回溯法(深度优先搜索)
Python
2
star
12

AKGWSB

woshidashab
2
star
13

369DangerousBrowser

a browser prototype based on java.swing frame 一个基于java swing框架的简易原型浏览器
Java
2
star
14

graphic-demo-of-closest-point-pair-algorithm-

A graphic demo of the 'closest point pair' algorithm 最近点对算法的图形演示
Python
1
star