Skip to content

Commit

Permalink
Add a render of the staircase scene
Browse files Browse the repository at this point in the history
Tweaked the material to use metal and glass materials where appropriate and switched to an area light so it would be less noisy.
  • Loading branch information
banga committed Jan 30, 2024
1 parent 493eb02 commit bbfd079
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ Model: https://www.blendswap.com/blend/13953
![dragon image](https://github.com/banga/craytracer/blob/main/images/dragon.png)

Source: [scenes/dragon.cry](https://github.com/banga/craytracer/blob/main/scenes/dragon.cry)

Model: https://github.com/alecjacobson/common-3d-test-models/blob/main/data/xyzrgb_dragon.obj

### Staircase

![staircase image](https://github.com/banga/craytracer/blob/main/images/staircase.png)

Source: [scenes/staircase.cry](https://github.com/banga/craytracer/blob/main/scenes/staircase.cry)
Model: https://blendswap.com/blend/14449

### Materials

![materials image](https://github.com/banga/craytracer/blob/main/images/materials.png)
Expand Down
Binary file added images/staircase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions scenes/staircase.cry
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
num_samples: 10,
max_depth: 20,
num_samples: 64,
camera: Perspective {
origin: Point(0, 2.2, -4.6),
origin: Point(0, 2.25, -4.2),
target: Point(0, 2.25, 0),
up: Vector(0, 1, 0),
lens_radius: 0.025,
focal_distance: 7,
fov: 40,
fov: 45,
film: {
width: 500,
height: 700,
width: 800,
height: 1200,
}
},
lights: [
Expand All @@ -19,8 +18,11 @@
default: Matte { reflectance: Color(1, 1, 1), sigma: 0 }
},
shapes: {
light: Disk { origin: Point(-3, 5.5, 2.5), rotate_x: 60, rotate_y: 0, radius: 1.5 }
},
primitives: [
Shape { shape: 'light', emittance: Color(10, 8, 4) },

// Model from https://blendswap.com/blend/14449. Exported from Blender
// and tweaked the material file to make the "Emission" material actually
// emissive
Expand Down

0 comments on commit bbfd079

Please sign in to comment.