Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RELEASE CANDIDATE: v0.1.5 #73

Merged
merged 171 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
5adaed2
CA-51 both texture and color constructors for emissive materials
connortbot Mar 18, 2024
7541c90
CA-90 simple scattering pdf and cosine random sampling
connortbot Mar 18, 2024
7df78f7
Merge branch 'CA-102-embree-week' into CA-90
connortbot Mar 18, 2024
8319abf
CA-58 add include guards
connortbot Mar 22, 2024
588746a
CA-91 basic BRDF sampling in new render function with lambertians
connortbot Mar 22, 2024
e617c16
CA-93 orthonormal basis class
connortbot Mar 22, 2024
b7a2945
CA-91 cosine sampling lambertian
connortbot Mar 22, 2024
642af9b
CA-91 moving files into includes and introducing light ptr vectors
connortbot Mar 23, 2024
9475dae
CA-91 direct light sampling (only impl. quad lights and physical lights)
connortbot Mar 25, 2024
14b649c
CA-91 sample and pdf for SpherePrimitives
connortbot Mar 26, 2024
d187e4f
CA-91 supporting physical lights in CSR by checking emitted fvalue
connortbot Mar 26, 2024
6737cb7
Update main.cc
connortbot Mar 27, 2024
453ca26
CA-95 simple metal BRDF
connortbot Mar 28, 2024
e55e6ac
CA-95 clean up BRDF foundation, cos_theta unique to lambertians.
connortbot Mar 30, 2024
daf5d08
CA-95 OrenNayar BRDF material
connortbot Mar 30, 2024
a95a783
CA-95 finally corrected rendering equation and proper diffuse and pdf…
connortbot Apr 1, 2024
ed9ae73
CA-95 unfinished Cook-Torrance
connortbot Apr 1, 2024
f21caca
Testing func for BRDFs
connortbot Apr 1, 2024
2e2f2cd
Update render.h
connortbot Apr 1, 2024
3ed2511
CA-95 account for exiting mediums instead of entering
connortbot Apr 2, 2024
c2a5b07
update BRDF testing func
connortbot Apr 2, 2024
45e0c40
CA-95 corrected GGX MDF, scatter function and Cook Torrance BRDF. Add…
connortbot Apr 2, 2024
5266337
CA-95 remove CookTorrance unnecessary fields
connortbot Apr 2, 2024
942fa94
CA-95 implemented complex CookTorrance variant with refraction and ab…
connortbot Apr 2, 2024
49775c7
CA-95 minimum roughness value to avoid singularities
connortbot Apr 2, 2024
575d567
CA-95 fully modular ctrs for CookTorrance, + microfacet classes used
connortbot Apr 2, 2024
e621da0
CA-95 move light sampling after weight calculation
connortbot Apr 3, 2024
93579ae
CA-91 use BSDFSample objects for the rendering equation
connortbot Apr 3, 2024
755881f
CA-95 not working dielectric
connortbot Apr 5, 2024
46d4b97
CA-95
connortbot Apr 7, 2024
718b0db
CA-95 add albedo to cook torrance dielectric
connortbot Apr 7, 2024
752419d
CA-95 remove render warning
connortbot Apr 7, 2024
0ac27f1
Merge pull request #59 from cypraeno/CA-91
connortbot Apr 9, 2024
f9d1ba7
Merge branch 'CA-89-casino' into CA-90
connortbot Apr 9, 2024
e88d65e
Update main.cc
connortbot Apr 9, 2024
1f1409b
Update main.cc
connortbot Apr 9, 2024
2b05e2e
Merge pull request #60 from cypraeno/CA-90
connortbot Apr 9, 2024
86f0803
CA-89 uncaught wrong scatter signature in emissive
connortbot Apr 9, 2024
9114f8c
CA-89 update switch codes
connortbot Apr 9, 2024
8101bf8
CA-89 fix switch codes
connortbot Apr 9, 2024
cb758e8
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 9, 2024
32bac35
CA-89 change default render func
connortbot Apr 9, 2024
8ea781a
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 18, 2024
db9c0d6
CA-89 merge errors missing end }
connortbot Apr 18, 2024
ed7470a
CA-89 updated trace_ray function supporting instancing IDs
connortbot Apr 18, 2024
6d6bcaf
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 18, 2024
988f2d6
CA-89 change default image format output
connortbot Apr 18, 2024
7e5fd08
CA-89 divide into src and includes
connortbot Apr 18, 2024
05354ab
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 18, 2024
10fa504
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 22, 2024
d8ef2d1
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 22, 2024
d6c37d3
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 23, 2024
fd9682b
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 24, 2024
4671c35
CA-89 split sample and pdf into cc file
connortbot Apr 24, 2024
7e18ac8
Merge branch 'CA-102-embree-week' into CA-89-casino
connortbot Apr 24, 2024
50cf507
CA-89 merge from 0.1.3 header splits
connortbot Apr 24, 2024
b12e8de
Merge branch 'test' into CA-89-casino
connortbot Apr 25, 2024
d4adac7
CA-89 updated BRDF hardcoded test function
connortbot Apr 29, 2024
72f2439
CA-89 updatre
connortbot Apr 29, 2024
73d655c
CA-89 add BSDF types to BSDFSample, update information in sample mate…
connortbot Apr 29, 2024
0062f58
CA-89 power heuristic implementation for MIS
connortbot Apr 29, 2024
f4fba34
CA-89 working direct light sampling with transmission, glossy, diffus…
connortbot Apr 29, 2024
9abb04f
CA-90 stratified samples in render_scanlines only
connortbot Apr 29, 2024
7e11e52
CA-120 isotropic phase function as material
connortbot Apr 30, 2024
0ff9334
CA-89 only apply direct light sampling to diffuse surfaces
connortbot Apr 30, 2024
a48945a
CA-89 individual scatter, generate, pdf functions for CookTorranceDie…
connortbot Apr 30, 2024
d206680
Merge branch 'CA-89-casino' into CA-120
connortbot Apr 30, 2024
4e8dbf1
CA-120 compil fixes isotropic
connortbot Apr 30, 2024
7706837
Merge branch 'CA-122' into CA-89-casino
connortbot Apr 30, 2024
29c9aeb
Merge branch 'CA-122' into CA-120
connortbot May 1, 2024
cac6856
CA-120 new constructor to copy over a Geometry object that only retai…
connortbot May 3, 2024
f420389
CA-120 track if the hit object is a medium or not, defaults to false
connortbot May 3, 2024
4034e22
Update material.h
connortbot May 3, 2024
1f411fd
CA-120 basic base medium class that is a constant medium, and an inte…
connortbot May 3, 2024
21b451f
CA-120 volume object built from a medium and a geometry object to cop…
connortbot May 3, 2024
67bce6f
CA-120 add volume
connortbot May 3, 2024
e80e33c
CA-120 updated render function to track mediums
connortbot May 3, 2024
e46c6e8
CA-120 updated test scene with volumes
connortbot May 3, 2024
19ba345
CA-120 Intersect function that finds up to a given max intersections …
connortbot May 8, 2024
6c51ae7
CA-120 euler for transmittance calculation
connortbot May 8, 2024
5df4d47
CA-120 basic transmittance for Mediums
connortbot May 8, 2024
9bd7639
Merge branch 'test' into CA-89-casino
connortbot May 10, 2024
9e4b3d6
Update csr-schema
connortbot May 10, 2024
b7ecdad
Merge branch 'CA-89-casino' into CA-120
connortbot May 12, 2024
d52d092
CA-120 fix MultiIntersect to rely on original ray length
connortbot May 12, 2024
db8fa9e
CA-120 MediumRecord class for maintaining residing mediums and transm…
connortbot May 12, 2024
79df51e
CA-120 make internal scene for Volumes for isolated checks if we are …
connortbot May 12, 2024
c2f4976
CA-120 vector of volumes to iterate through for initial volumes we ar…
connortbot May 12, 2024
2f368c2
CA-120 tested and updated trace ray function for volumes (ray marchin…
connortbot May 12, 2024
9f5bd02
Update main.cc
connortbot May 12, 2024
9ecde81
Update main.cc
connortbot May 12, 2024
60485f6
Merge pull request #65 from cypraeno/CA-120
connortbot May 13, 2024
a7e74d9
Merge branch 'test' into CA-89-casino
connortbot May 14, 2024
6dd4706
Update render.cc
connortbot May 14, 2024
630a521
split headers
connortbot May 14, 2024
2ad3665
Merge branch 'test' into CA-89-casino
connortbot May 16, 2024
c277713
Update hit_info.hh
connortbot May 16, 2024
bf6fdce
Merge branch 'test' into CA-89-casino
connortbot May 17, 2024
b4bc4b9
Update csr-schema
connortbot May 17, 2024
abdcd93
Update material.h
connortbot May 18, 2024
0d1c428
CA-95 MixtureBSDFs
connortbot Aug 4, 2024
2a5a125
CA-124 generate and scatter samplers for LayeredBSDF
connortbot Aug 27, 2024
ffe122e
Update material.h
connortbot Aug 27, 2024
8646a08
CA-124 over absorbing sampler for layeredbsdf
connortbot Aug 29, 2024
34cecbb
CA-124 functional LayeredBxDF (with black specks)
connortbot Sep 18, 2024
2d3fb9b
CA-124 less scaled GGX D factor
connortbot Sep 19, 2024
23ce785
Merge branch 'CA-124' of https://github.com/cypraeno/caitlyn into CA-124
connortbot Sep 19, 2024
50dd892
CA-124 fixed black specs with russian roulette biasing, and notes on …
connortbot Sep 19, 2024
367afe2
CA-124 schlick approximation to CookTorranceDielectric
connortbot Sep 19, 2024
0c4d8bc
Update main.cc
connortbot Sep 19, 2024
4bb5091
CA-124 reclean main for casino
connortbot Sep 19, 2024
86b3b5b
Merge branch 'CA-124' of https://github.com/cypraeno/caitlyn into CA-124
connortbot Sep 19, 2024
1c5127c
CA-124 LayeredSample with intermittent medium
connortbot Sep 19, 2024
00b3ca9
Merge branch 'CA-124' of https://github.com/cypraeno/caitlyn into CA-124
connortbot Sep 19, 2024
e59cfc8
Update main.cc
connortbot Sep 19, 2024
26a1b79
CA-124 note on black artifacts
connortbot Sep 20, 2024
4399d9d
CA-124 fix incorerct front face swtich in layered
connortbot Sep 20, 2024
dfb572c
Merge pull request #69 from cypraeno/CA-124
connortbot Sep 20, 2024
0e37fb2
CA-89 splitting into cc + documentation
connortbot Sep 20, 2024
f38cfc9
CA-89 docs for future deprecated materials
connortbot Sep 20, 2024
e75ea6d
Update README.md
connortbot Sep 20, 2024
34a5b76
CA-89 splitting material header
connortbot Sep 20, 2024
431e3f2
CA-89 split of all non deprecated materials header
connortbot Sep 20, 2024
1102c40
CA-89 change version to 0.1.5
connortbot Sep 25, 2024
cfcfd65
CA-89 new Dielectric with CookTorranceDielectric!
connortbot Sep 25, 2024
ed43707
Update material.h
connortbot Sep 25, 2024
26493e9
change testing scene
connortbot Sep 25, 2024
5b790bb
CA-89 internal CSR support for CooKTorrance/OrenNayar
connortbot Sep 25, 2024
79b3b27
CA-116 restore boxes
connortbot Sep 25, 2024
7f1bdfb
CA-89 global illumination if direct light sampling is disabled
connortbot Sep 25, 2024
f754d37
CA-89 catch nullptr geomhit in direct sampling
connortbot Sep 25, 2024
c876738
CA-89 updated tests with Better materials
connortbot Sep 25, 2024
9609da3
CA-89 direct light sampling CSR support spheres+quads
connortbot Sep 25, 2024
eee2ecc
CA-89 quad importance sample bug possible fix
connortbot Sep 26, 2024
c7d71b7
Update render.cc
connortbot Sep 26, 2024
e8d7f68
CA-89 disable direct
connortbot Sep 26, 2024
a2ae2d1
CA-89 CSR MixtureBSDF support
connortbot Sep 26, 2024
c013c07
CA-89 disable CSR importance
connortbot Sep 26, 2024
6efe69c
Update csr_parser.cc
connortbot Sep 26, 2024
e10e736
CA-89 sky colours in Scene
connortbot Sep 26, 2024
8b735b5
CA-89 change sky colour based on Scene
connortbot Sep 26, 2024
212ade1
CA-89 Mediums/Volumes, Sky colours
connortbot Sep 26, 2024
9d91069
Create 0.1.5-showcase.csr
connortbot Sep 26, 2024
25962b9
CA-89 update csr-schema validator submodule
connortbot Sep 27, 2024
223a6f7
Update 0.1.5-showcase.csr
connortbot Sep 27, 2024
53467e0
CA-89 update validator with new changes
connortbot Sep 27, 2024
59b0edb
CA-89 reposition showcase Mixture
connortbot Sep 27, 2024
18844d1
CA-89 restore main to no-hardcode
connortbot Sep 27, 2024
34ea51f
Merge branch 'test' into CA-89-casino
connortbot Sep 27, 2024
a90df5b
CA-89 better tests running script
connortbot Sep 27, 2024
5ebe910
CA-89 updated tests CSR
connortbot Sep 28, 2024
5ac6155
CA-89 skies in test csr
connortbot Sep 28, 2024
5c0ade7
CA-89 fixed lambert term
connortbot Sep 29, 2024
c23348e
CA-89 black artifacts fix when sample pdf is 0
connortbot Sep 29, 2024
db5dbac
CA-89 correct cos term in LayeredBSDF
connortbot Sep 29, 2024
03c4db2
Update material.h
connortbot Sep 29, 2024
82be8b7
CA-124 CSR Support for Layered
connortbot Sep 30, 2024
41b0c29
CA-89 Updated showcase with Layered
connortbot Sep 30, 2024
c822aa1
CA-89 Finite checks for samples and bug note
connortbot Sep 30, 2024
1a3f1f4
Update csr-schema
connortbot Sep 30, 2024
6af7d97
CA-89 Fix OrenNayar pdf to depend on outgoing
connortbot Sep 30, 2024
ae8b72f
CA-89 Correct Lambert law in LayeredBSDF sampler
connortbot Sep 30, 2024
54db406
CA-89 correct Lambert Law in integrator
connortbot Sep 30, 2024
720f195
Unix line endings for sh files
pranavbedi Sep 30, 2024
b3dea6b
Update .gitattributes
pranavbedi Sep 30, 2024
720b34d
CA-89 dielectric grid test
connortbot Sep 30, 2024
25b030c
Merge branch 'CA-89-casino' of https://github.com/cypraeno/caitlyn in…
connortbot Sep 30, 2024
ccc2059
CA-89 new tests
connortbot Oct 1, 2024
6ca46fc
v0.1.5
connortbot Oct 1, 2024
b6ec12b
CA-89 temporarily deprecate SIMD
connortbot Oct 1, 2024
614b7f0
Update README.md
connortbot Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.csr eol=lf
*.csr eol=lf
*.sh text eol=lf
36 changes: 23 additions & 13 deletions README.md
connortbot marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<h1 align="center">The Caitlyn Renderer :camera:</h1>
<p align="center"><img width="600" alt="Render1" src="https://github.com/cypraeno/caitlyn/assets/25397938/9f93e7a7-37d0-43e4-bea1-e81859f75f00"></p>
<p align="center"><img width="600" alt="Render1" src="https://github.com/user-attachments/assets/a61be07b-fab8-4af2-a34e-0a4faac66713"></p>


Caitlyn is an in-development Monte Carlo ray tracer built in C++ by a team of students from the University of Waterloo and Wilfrid Laurier University. Caitlyn is actively working towards being a beautiful tool for bridging the accuracy and lighting of raytracing and the breathtaking visuals of pixel art (see our [portfolio](#our-portfolio) and Odd Tales' "The Last Night"!)
Caitlyn is an reverse path tracer built for implementing raytracing lighting to 'pixellax' 3D visuals. It is built in C++ by a team of students from the University of Waterloo and Wilfrid Laurier University.

'Pixellax' is an art style with a focus on using 2D pixel art in 3D environments with an emphasis on beautiful, colourful lighting. (see our [portfolio](#our-portfolio) and Odd Tales' "The Last Night"!)

_Interested in getting involved? Contact [Connor Loi]([email protected]) or [Samuel Bai]([email protected])._

Expand All @@ -20,24 +22,24 @@ Caitlyn MCRT is built on Debian 12. It may work on other distros, but we recomme
### Setup
Before continuing:
- Install `Docker Desktop`.
- Pull the latest `docker pull connortbot/caitlyn-mcrt:base-vX.X.X`
- Pull the latest `docker pull connortbot/caitlyn-mcrt:base-v0.2.1`

### Build
You may pull the repository from within the container or mount a volume. Either works!
Run `cmake -B build/ -S .` to create files in the `build` folder. `cd build`, and `make`. Don't forget to initialize the submodules.
Run `cmake -B build/ -S .` to create files in the `build` folder. `cd build`, and `make`. _Don't forget to initialize the submodules!_

### Basic Rendering
Caitlyn renders scenes from our custom filetype `.csr`. By default, the `caitlyn` executable will read the scene from a `scene.csr` file, so you need to have one before running. In this guide, we'll just run the `example.csr`, which you can copy from [here](https://github.com/cypraeno/csr-schema/blob/main/examples/example.csr).
Caitlyn renders scenes from our custom filetype `.csr`. By default, the `caitlyn` executable will read the scene from a `scene.csr` file, so you need to have one before running. In this guide, we'll just run the `0.1.5-showcase.csr`, which you can copy from the `tests` folder.

To learn how to write CSR files, check out the [Basic Guide](https://github.com/cypraeno/csr-schema/blob/main/docs/basic-guide.md).

Caitlyn has a user-friendly command line interface, allowing you to customize samples, depth, type of multithreading, and more. Once you have the executable, you can run `./caitlyn --help` to see all the options at your disposal.
Caitlyn has a user-friendly command line interface, allowing you to customize samples, depth, use multithreading, and more. Once you have the executable, you can run `./caitlyn --help` to see all the options at your disposal.

Let's render a PNG file of the example scene! Ensure that you have your CSR file in the same directory.
```
./caitlyn -i example.csr -t png -r 600 600
./caitlyn -i 0.1.5-showcase.csr -o 0.1.5-showcase.png -t png -s 50
```
This will read the scene from `example.csr` and output as a `png`.
This will read the scene from `0.1.5-showcase.csr` and output as a `png`.
And now you have your first caitlyn-rendered scene!

## Our Portfolio
Expand All @@ -57,13 +59,10 @@ Flags like `--samples` and `--depth` control the amount of time spent on the ren

Sometimes, CSR files will have features not supported in your version of `caitlyn`. You can check this with the version indicator at the top of the CSR file and with `./caitlyn --version`.

For users who have a better understanding of their computer's resources, the `--threads` and `--vectorization` flags control the use of more efficient architecture. While `threads` dictate the amount of CPU threads to split the workloads on, the `vectorization` flag will dictate the type of SIMD batching. `[NONE|SSE|AVX|AVX512]`.


## Contribute
For contribution or general inquiries, please email one of us at [Connor Loi]([email protected]) or [Samuel Bai]([email protected]).

The people the made it happen:
Acknowledgements:

<div align="center">
<a href="https://github.com/connortbot">Connor Loi</a>,
Expand All @@ -73,5 +72,16 @@ The people the made it happen:
<a href="https://github.com/ASharpMarble">Jonathan Wang</a>,
<a href="https://github.com/18gen">Gen Ichihashi</a>,
<a href="https://github.com/maxtan84">Max Tan</a>,
<a href="https://github.com/rickyhuangjh">Ricky Huang</a>,
<a href="https://github.com/rickyhuangjh">Ricky Huang</a>
</div>

Citation:
```bibtex
@software{Caitlyn,
title = {Caitlyn MCRT},
author = {Connor Loi and Samuel Bai},
note = {https://github.com/cypraeno/caitlyn},
version = {0.1.5},
year = 2024
}
```
6 changes: 6 additions & 0 deletions include/intersection/hit_info.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
struct HitInfo {
point3 pos;
vec3 normal;
vec3 microfacet_normal;
bool front_face;
float t;
double u;
double v;
bool transparent = false;

bool medium = false;

float rand = 0.5; // used in MixtureBSDF

/** @brief Given a face's outward normal and the initial ray, sets front_face to represent
if collision hits it from the front or not. */
Expand Down
5 changes: 5 additions & 0 deletions include/intersection/intersects.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ void setupRayHit8(struct RTCRayHit8& rayhit, std::vector<ray>& rays);
/** @brief modifies given RTCRayHit object to be ready for rtcIntersect16 usage*/
void setupRayHit16(struct RTCRayHit16& rayhit, std::vector<ray>& rays);

/**
* @brief In a given scene, fires a continuous ray and fills information for multiple hits.
*/
void MultiIntersect(int max, ray r_in, RTCScene& rtc_scene, std::vector<int>& ids, std::vector<float>& tfars);

#endif
Loading