Skip to content

Commit

Permalink
Merge pull request #4 from serhii-rieznik/dev
Browse files Browse the repository at this point in the history
Developer Preview 3
  • Loading branch information
serhii-rieznik authored May 15, 2022
2 parents cde081e + eb3d592 commit e994110
Show file tree
Hide file tree
Showing 529 changed files with 44,708 additions and 63,835 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.exe
*.pdb
*.dll
bin/options.json
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ cmake_policy(SET CMP0091 NEW)

project(etx-tracer VERSION 0.0.1)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Physically-based GPU and CPU ray-tracer emerging on a surface.

#### Features
* Vertex Connection and Merging algorithm (CPU and GPU);
* Full-spectral rendering in CPU integrators;
* Full-spectral rendering (by sampling single wavelength per ray);
* Heterogeneous and scattering medium rendering in path tracing integrators (CPU and GPU);
* Volumetric Bidirectional Path Tracing integrator;
* Variety of BSDFs:
Expand All @@ -18,19 +18,21 @@ Physically-based GPU and CPU ray-tracer emerging on a surface.
- directional emitter with finite angluar size;
- collimated area lights (lasers);
* Spectral representation of material's properties (colors, index of refractions, etc);
* Normal mapping (CPU only at the moment);
* Thin-film rendering;
* Normal mapping;
* Thin-film rendering over most of materials (including conductor materials);
* Using OptiX for GPU ray-tracing;
* Most of the code is reused for CPU and GPU integrators.
* Most of the code is reused for CPU and GPU integrators;
* Atmosphere integrator;

#### Samples
Several renderings from the ray-tracer. Samples contains showcase for materials, volumetric data rendering, spectral rendering, participating media rendering and SDS (specular-diffuse-specular paths), which are usually tricky thing to render. As well as thin film rendering, collimated emitters, depth of field, and other effects.

More renderings could be found in my [Twitter](https://twitter.com/serhii_rieznik):

[![Bubbles in Cornell Box](./docs/preview/bubble.png)](./docs/images/bubble.png)[![Volumetric cloud](./docs/preview/volumetric-cloud.png)](./docs/images/volumetric-cloud.png)[![Room](./docs/preview/room.png)](./docs/images/room.png)
[![Refractions](./docs/preview/volumetric-refractions.png)](./docs/images/volumetric-refractions.png)[![Laser](./docs/preview/laser.png)](./docs/images/laser.png)[![Ring](./docs/preview/ring.png)](./docs/images/ring.png)
[![Soap Bubbles](./docs/preview/soapbubbles.png)](./docs/imagessoapbubbles.png)[![Diamonds](./docs/preview/diamonds.png)](./docs/images/diamonds.png)[![SDS](./docs/preview/sds.png)](./docs/images/sds.png)
[![Refractions](./docs/preview/volumetric-refractions.png)](./docs/images/volumetric-refractions.png)[![Laser](./docs/preview/laser-2.png)](./docs/images/laser-2.png)[![Ring](./docs/preview/ring.png)](./docs/images/ring.png)
[![Soap Bubbles](./docs/preview/soapbubbles.png)](./docs/images/soapbubbles.png)[![Diamonds](./docs/preview/diamonds.png)](./docs/images/diamonds.png)[![SDS](./docs/preview/sds.png)](./docs/images/sds.png)
[![SDS](./docs/preview/spoons.png)](./docs/images/spoons.png)[![SDS](./docs/preview/sky.png)](./docs/images/sky.png)

#### Story behind this project

Expand All @@ -49,8 +51,9 @@ Order is a subject to change, but here are main things to do:
- [x] boilerplate code for window, input handling, etc;
- [x] basic boilerplate code for ray-tracing;
- [x] simplest CPU path-tracer;
- [ ] OptiX and GPU-related code basics;
- [x] OptiX and GPU-related code basics;
- [x] additional code for ray-tracing;
- [x] GPU path tracing;
- [ ] VCM integrators (CPU and GPU);
- [ ] cross-platform, cross-API support;
... maintaining code, adding new features.
Expand Down
8 changes: 8 additions & 0 deletions bin/assets/empty/empty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"geometry" : "empty.obj",
"camera" : {
"class" : "eq",
"viewport" : [1024, 512],
"origin" : [0.0, 6372010.0, 0.0]
}
}
8 changes: 8 additions & 0 deletions bin/assets/empty/empty.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Blender 3.1.0 MTL File: 'None'
# www.blender.org

newmtl et::dir
color nblackbody 5778.0 scale 16.0
direction 1.0 0.1 1.0
angular_diameter 0.52

3 changes: 3 additions & 0 deletions bin/assets/empty/empty.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Blender 3.1.0
# www.blender.org
mtllib empty.mtl
Binary file added bin/assets/feature-test/feature-test.blend
Binary file not shown.
10 changes: 10 additions & 0 deletions bin/assets/feature-test/feature-test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"geometry" : "feature-test.obj",
"materials" : "materials.mtl",
"camera" : {
"origin" : [0.0, 0.0, 11.0],
"target" : [0.0, 0.0, 0.0],
"viewport" : [1280, 640],
"fov" : 26.99
}
}
47 changes: 47 additions & 0 deletions bin/assets/feature-test/materials.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Blender MTL File: 'feature-test.blend'
# Material Count: 8

newmtl et::dir
direction 1 1 1
color nblackbody 6500.0

newmtl et::env
color nblackbody 12000.0

newmtl Light
emitter nblackbody 5800.0 scale 5.0
Ke 1 1 1

newmtl Box
xmaterial class translucent
Kd 1.000000 1.000000 1.000000

newmtl Right
xmaterial class translucent
Kd 0.000000 1.000000 0.000000

newmtl Left
xmaterial class translucent
Kd 1.000000 0.000000 0.000000

newmtl Sphere-1
material class msdielectric
int_ior water
map_Kt ../textures/planet-color.png
Pr 0.25

newmtl Sphere-2
material class diffuse
Kd 0.1 0.25 1.0
map_Kd ../textures/planet.png

newmtl Sphere-3
material class msconductor
int_ior silver
normalmap image ../textures/square_floor_nor_gl_4k.png scale 1.0
map_Ks ../textures/square_floor_diff_4k.png

newmtl Font
material class msconductor
Pr 0.25
int_ior gold
Binary file added bin/assets/feature-test/reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/assets/hdri/environment.exr
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Kd 0.1 0.8 0.1

newmtl bubble
material class thinfilm
thinfilm image ../textures/clouds.png range 180.0 840.0
thinfilm image ../textures/clouds.png range 100.0 1000.0 ior 1.76

newmtl curtain
material class translucent
Expand All @@ -37,11 +37,11 @@ int_ior osmium
Pr 0.3

newmtl emitter-left
emitter blackbody 12000.0 scale 0.00025 collimated 65536.0
emitter nblackbody 12000.0 scale 128.0 collimated 1024.0
Ke 1 1 1

newmtl emitter-right
emitter blackbody 2700.0 scale 0.25 collimated 65536.0
emitter nblackbody 2700.0 scale 128.0 collimated 1024.0
Ke 1 1 1

newmtl projector-box
Expand Down
26 changes: 26 additions & 0 deletions bin/assets/spoons/materials.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Blender MTL File: 'None'
# Material Count: 4

newmtl None
material class coating
Pr 0.25
Ks 0.08 0.08 0.08
map_Kd ../textures/square_floor_diff_4k.png
normalmap image ../textures/square_floor_nor_gl_4k.png scale 0.75

newmtl Golden_spoon
material class conductor
int_ior osmium
Pr 0.05
thinfilm range 1600.0 1860.0 ior 2.41 image ../textures/film.png

newmtl Metal_spoon
material class dielectric
int_ior plastic
Pr 0.025
thinfilm range 600.0 800.0 ior 1.76 image ../textures/film.png

newmtl Woonde_spoon
material class conductor
int_ior copper
thinfilm range 100.0 360.0 ior 2.41 image ../textures/film.png
6 changes: 6 additions & 0 deletions bin/assets/spoons/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Spoon model downloaded from
https://sketchfab.com/3d-models/spoon-pack-5637bb7c39d64af09149c9863be4b198
@shedmon

Wood texture
https://polyhaven.com/a/weathered_brown_planks
10 changes: 10 additions & 0 deletions bin/assets/spoons/spoons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"geometry" : "spoons.obj",
"materials" : "materials.mtl",
"camera" : {
"origin" : [3.5, 3.0, -1.75],
"target" : [0.75, 0.3333, 0.0],
"viewport" : [1080, 1080],
"fov" : 25.0
}
}
Binary file added bin/assets/textures/film.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/textures/planet-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/textures/planet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/textures/roughness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/textures/square_floor_diff_4k.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/textures/square_floor_nor_gl_4k.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bin/assets/ukraine/flag.blend
Binary file not shown.
11 changes: 11 additions & 0 deletions bin/assets/ukraine/flag.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"geometry" : "flag.obj",
"camera" : {
"viewport" : [1080.0, 1080.0],
"origin" : [0.0, 0.0, 5.1],
"target" : [0.0, 0.0, 0.0],
"up" : [0.0, 1.0, 0.0],
"fov" : 26.99,
"lens-radius" : 0.0
}
}
31 changes: 31 additions & 0 deletions bin/assets/ukraine/flag.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Blender 3.1.0 MTL File: 'flag.blend'
# www.blender.org

newmtl _box
material class coating
Ks 0.02 0.02 0.02
Kd 0.4 0.4 0.4
thinfilm range 180.0 800.0

newmtl emitter
emitter nblackbody 5800.0 scale 20.0
Ke 1 1 1

newmtl flag
material class translucent
map_Kd ukraine.png

newmtl left
material class coating
Ks 0.02 0.02 0.02
Kd 1 0 0

newmtl pole
material class msdielectric
int_ior chrome
Pr 0.25

newmtl right
material class coating
Ks 0.02 0.02 0.02
Kd 0 1 0
Loading

0 comments on commit e994110

Please sign in to comment.