Skip to content

Commit

Permalink
Merge pull request #227 from Walther/reflectance-fixes
Browse files Browse the repository at this point in the history
fix: various corrections to the emittance and reflectance
  • Loading branch information
Walther authored Dec 29, 2024
2 parents fa951a0 + e9d1259 commit c0b885f
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 87 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ resolver = "2"
members = ["clovers", "clovers-cli"]

[profile.release]
codegen-units = 1
lto = "fat"
# TODO: temporarily disabled due to slow build times during dev
# codegen-units = 1
# lto = "fat"

[profile.profiling]
inherits = "release"
Expand Down
12 changes: 7 additions & 5 deletions clovers-cli/src/draw_cpu.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! An opinionated method for drawing a scene using the CPU for rendering.
use clovers::wavelength::random_wavelength;
use clovers::wavelength::{random_wavelength, wavelength_into_xyz};
use clovers::Vec2;
use clovers::{ray::Ray, scenes::Scene, Float};
use indicatif::{ProgressBar, ProgressDrawTarget, ProgressStyle};
Expand All @@ -11,13 +11,13 @@ use rand::rngs::SmallRng;
use rand::{Rng, SeedableRng};
use rayon::prelude::*;

use crate::colorize::colorize;
use crate::debug_visualizations::{bvh_testcount, primitive_testcount};
use crate::normals::normal_map;
use crate::render::{RenderMode, RenderOptions};
use crate::sampler::blue::BlueSampler;
use crate::sampler::random::RandomSampler;
use crate::sampler::{Randomness, Sampler, SamplerTrait};
use crate::trace::trace;
use crate::GlobalOptions;

/// The main drawing function, returns a `Vec<Srgb>` as a pixelbuffer.
Expand Down Expand Up @@ -123,9 +123,11 @@ fn render_pixel(
let ray: Ray = scene
.camera
.get_ray(pixel_uv, lens_offset, time, wavelength);
let sample_color: Xyz<E> = colorize(&ray, scene, 0, max_depth, rng, sampler);
if sample_color.x.is_finite() && sample_color.y.is_finite() && sample_color.z.is_finite() {
pixel_color += sample_color;
let spectral_power: Float = trace(&ray, scene, 0, max_depth, rng, sampler);
// TODO: find and debug more sources of NaNs!
if spectral_power.is_normal() && spectral_power.is_sign_positive() {
let sample_color = wavelength_into_xyz(ray.wavelength);
pixel_color += sample_color * spectral_power;
}
}
pixel_color / opts.samples as Float
Expand Down
2 changes: 1 addition & 1 deletion clovers-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
use clap::Args;

pub mod colorize;
pub mod debug_visualizations;
pub mod draw_cpu;
pub mod json_scene;
pub mod normals;
pub mod render;
pub mod sampler;
pub mod scenefile;
pub mod trace;
pub mod write;

// TODO: move this into a better place - but keep rustc happy with the imports
Expand Down
13 changes: 7 additions & 6 deletions clovers-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use std::error::Error;
// Internal imports
use clovers::*;
#[doc(hidden)]
mod colorize;
#[doc(hidden)]
pub mod debug_visualizations;
#[doc(hidden)]
mod draw_cpu;
Expand All @@ -22,17 +20,20 @@ mod json_scene;
pub mod normals;
#[doc(hidden)]
mod render;
use render::render;
#[doc(hidden)]
mod sampler;
#[doc(hidden)]
mod validate;
use validate::{validate, ValidateParams};
#[doc(hidden)]
pub mod scenefile;
#[doc(hidden)]
mod trace;
#[doc(hidden)]
mod validate;
#[doc(hidden)]
mod write;

use render::render;
use validate::{validate, ValidateParams};

/// clovers 🍀 path tracing renderer
#[derive(Parser)]
pub struct Cli {
Expand Down
10 changes: 7 additions & 3 deletions clovers-cli/src/scenefile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use clovers::{
Float, Vec,
};

use palette::Srgb;
use palette::{
chromatic_adaptation::AdaptInto, convert::IntoColorUnclamped, white_point::E, Srgb, Xyz,
};
use tracing::info;

// TODO: better naming
Expand All @@ -37,7 +39,9 @@ impl SceneFile {
) -> Scene<'scene> {
let time_0 = scene_file.time_0;
let time_1 = scene_file.time_1;
let background_color = scene_file.background_color;

let background: Xyz = scene_file.background_color.into_color_unclamped();
let background: Xyz<E> = background.adapt_into();

#[allow(clippy::cast_precision_loss)]
let camera = Camera::new(
Expand Down Expand Up @@ -106,7 +110,7 @@ impl SceneFile {
camera,
bvh_root,
mis_bvh_root,
background_color,
background,
}
}
}
40 changes: 16 additions & 24 deletions clovers-cli/src/colorize.rs → clovers-cli/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,32 @@ use clovers::{
ray::Ray,
scenes::Scene,
spectrum::spectrum_xyz_to_p,
wavelength::wavelength_into_xyz,
Float, EPSILON_SHADOW_ACNE,
};
use nalgebra::Unit;
use palette::{
chromatic_adaptation::AdaptInto, convert::IntoColorUnclamped, white_point::E, Clamp, Xyz,
};
use palette::{white_point::E, Xyz};
use rand::rngs::SmallRng;

use crate::sampler::SamplerTrait;

/// The main coloring function. Sends a [`Ray`] to the [`Scene`], sees if it hits anything, and eventually returns a color. Taking into account the [Material](clovers::materials::Material) that is hit, the method recurses with various adjustments, with a new [`Ray`] started from the location that was hit.
/// The main path tracing function. Sends a [`Ray`] to the [`Scene`], sees if it hits anything, and eventually returns a spectral intensity. Taking into account the [Material](clovers::materials::Material) that is hit, the method recurses with various adjustments, with a new [`Ray`] started from the location that was hit.
#[must_use]
#[allow(clippy::only_used_in_recursion)] // TODO: use sampler in more places!
pub fn colorize(
pub fn trace(
ray: &Ray,
scene: &Scene,
depth: u32,
max_depth: u32,
rng: &mut SmallRng,
sampler: &dyn SamplerTrait,
) -> Xyz<E> {
let bg: Xyz = scene.background_color.into_color_unclamped();
let bg: Xyz<E> = bg.adapt_into();
) -> Float {
let wavelength = ray.wavelength;
let bg: Float = spectrum_xyz_to_p(wavelength, scene.background);

// Have we reached the maximum recursion i.e. ray bounce depth?
if depth > max_depth {
// Ray bounce limit reached, early return background_color
return bg;
// Ray bounce limit reached, early return zero emissivity
return 0.0;
}

// Send the ray to the scene, and see if it hits anything.
Expand All @@ -43,31 +41,27 @@ pub fn colorize(
.bvh_root
.hit(ray, EPSILON_SHADOW_ACNE, Float::MAX, rng)
else {
// If the ray hits nothing, early return the background color.
// If the ray hits nothing, early return the background color as emissivity
return bg;
};

// Get the emitted color from the surface that we just hit
// TODO: spectral light sources!
let emitted = hit_record.material.emit(ray, &hit_record);
let tint: Xyz<E> = wavelength_into_xyz(ray.wavelength);
let emitted = emitted * tint;
let emitted: Xyz<E> = hit_record.material.emit(ray, &hit_record);
let emitted: Float = spectrum_xyz_to_p(wavelength, emitted);

// Do we scatter?
let Some(scatter_record) = hit_record.material.scatter(ray, &hit_record, rng) else {
// No scatter, early return the emitted color only
return emitted;
};
// We have scattered, and received an attenuation from the material.
let wavelength = ray.wavelength;
let attenuation_factor = spectrum_xyz_to_p(wavelength, scatter_record.attenuation);
let attenuation = (scatter_record.attenuation * attenuation_factor).clamp();
// We have scattered, and received an attenuation from the material
let attenuation = spectrum_xyz_to_p(wavelength, scatter_record.attenuation);

// Check the material type and recurse accordingly:
match scatter_record.material_type {
MaterialType::Specular => {
// If we hit a specular material, generate a specular ray, and multiply it with the attenuation
let specular = colorize(
let specular = trace(
// a scatter_record from a specular material should always have this ray
&scatter_record.specular_ray.unwrap(),
scene,
Expand Down Expand Up @@ -119,11 +113,9 @@ pub fn colorize(
};

// Recurse for the scattering ray
let recurse = colorize(&scatter_ray, scene, depth + 1, max_depth, rng, sampler);
let recurse = trace(&scatter_ray, scene, depth + 1, max_depth, rng, sampler);
// Tint and weight it according to the PDF
let scattered = attenuation * scattering_pdf * recurse / pdf_val;
// Ensure positive color
// let scattered = scattered.non_negative();
// Blend it all together
emitted + scattered
}
Expand Down
2 changes: 1 addition & 1 deletion clovers/src/materials/dielectric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn default_index() -> Float {
}

fn default_color() -> Xyz<E> {
Xyz::new(100.0, 100.0, 100.0)
Xyz::new(1.0, 1.0, 1.0)
}

impl MaterialTrait for Dielectric {
Expand Down
4 changes: 2 additions & 2 deletions clovers/src/scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::{bvh::BVHNode, camera::Camera, hitable::Hitable};

use palette::Srgb;
use palette::{white_point::E, Xyz};

#[derive(Debug)]
/// A representation of the scene that is being rendered.
Expand All @@ -12,7 +12,7 @@ pub struct Scene<'scene> {
/// The camera object used for rendering the scene.
pub camera: Camera,
/// The background color to use when the rays do not hit anything in the scene.
pub background_color: Srgb, // TODO: make into Texture or something?
pub background: Xyz<E>, // TODO: add support for environment maps / HDRI / skyboxes
/// A [`BVHNode`] tree of priority objects - e.g. glass items or lights - for multiple importance sampling. Wrapped into a [Hitable] for convenience reasons (see various PDF functions).
pub mis_bvh_root: Hitable<'scene>,
}
37 changes: 37 additions & 0 deletions clovers/src/spectrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,40 @@ pub fn spectrum_xyz_to_p(lambda: Wavelength, xyz: Xyz<E>) -> Float {
let p = p as Float;
p
}

#[cfg(test)]
#[allow(clippy::float_cmp)]
mod unit {
use palette::{white_point::E, Xyz};

use super::spectrum_xyz_to_p;

#[test]
fn equal_energy() {
let lambda = 600;
let xyz: Xyz<E> = Xyz::new(1.0, 1.0, 1.0);
let p = spectrum_xyz_to_p(lambda, xyz);
// FIXME: floating point accuracy
assert_eq!(1.000_000_7, p);
}

#[test]
#[allow(clippy::float_cmp)]
fn zero() {
let lambda = 600;
let xyz: Xyz<E> = Xyz::new(0.0, 0.0, 0.0);
let p = spectrum_xyz_to_p(lambda, xyz);
// FIXME: floating point accuracy
assert_eq!(0.0, p);
}

#[test]
#[allow(clippy::float_cmp)]
fn two() {
let lambda = 600;
let xyz: Xyz<E> = Xyz::new(2.0, 2.0, 2.0);
let p = spectrum_xyz_to_p(lambda, xyz);
// FIXME: floating point accuracy
assert_eq!(2.000_001_4, p);
}
}
2 changes: 1 addition & 1 deletion scenes/bunny.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"kind": "DiffuseLight",
"emit": {
"kind": "SolidColor",
"color": [5, 5, 5]
"color": [4, 4, 4]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion scenes/colorchecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let scene = {
};

// Big light for smooth lighting of the entire scene
let brightness = 2.5;
let brightness = 2.0;
let lamp_material = {
name: "big lamp",
kind: "DiffuseLight",
Expand Down
2 changes: 1 addition & 1 deletion scenes/colorchecker.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time_0":0,"time_1":1,"camera":{"look_from":[0.000001,30,0],"look_at":[0,0,0],"up":[0,1,0],"vertical_fov":40,"aperture":0,"focus_distance":10},"background_color":[0,0,0],"objects":[{"kind":"Quad","priority":true,"q":[-100,80,-100],"u":[200,0,0],"v":[0,0,200],"material":"big lamp"},{"kind":"Quad","q":[-5.75,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Dark skin"},{"kind":"Quad","q":[-5.75,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Light skin"},{"kind":"Quad","q":[-5.75,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue sky"},{"kind":"Quad","q":[-5.75,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Foliage"},{"kind":"Quad","q":[-5.75,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue flower"},{"kind":"Quad","q":[-5.75,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Bluish green"},{"kind":"Quad","q":[-2.75,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Orange"},{"kind":"Quad","q":[-2.75,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Purplish blue"},{"kind":"Quad","q":[-2.75,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Moderate red"},{"kind":"Quad","q":[-2.75,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Purple"},{"kind":"Quad","q":[-2.75,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Yellow green"},{"kind":"Quad","q":[-2.75,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Orange yellow"},{"kind":"Quad","q":[0.25,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue"},{"kind":"Quad","q":[0.25,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Green"},{"kind":"Quad","q":[0.25,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Red"},{"kind":"Quad","q":[0.25,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Yellow"},{"kind":"Quad","q":[0.25,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Magenta"},{"kind":"Quad","q":[0.25,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Cyan"},{"kind":"Quad","q":[3.25,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"White"},{"kind":"Quad","q":[3.25,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 8"},{"kind":"Quad","q":[3.25,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 6.5"},{"kind":"Quad","q":[3.25,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 5"},{"kind":"Quad","q":[3.25,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 3.5"},{"kind":"Quad","q":[3.25,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Black"}],"materials":[{"name":"big lamp","kind":"DiffuseLight","emit":{"kind":"SolidColor","color":[2.5,2.5,2.5]}},{"name":"Dark skin","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#735244"}}},{"name":"Light skin","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c29682"}}},{"name":"Blue sky","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#627a9d"}}},{"name":"Foliage","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#576c43"}}},{"name":"Blue flower","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#8580b1"}}},{"name":"Bluish green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#67bdaa"}}},{"name":"Orange","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#d67e2c"}}},{"name":"Purplish blue","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#505ba6"}}},{"name":"Moderate red","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c15a63"}}},{"name":"Purple","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#5e3c6c"}}},{"name":"Yellow green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#9dbc40"}}},{"name":"Orange yellow","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#e0a32e"}}},{"name":"Blue","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#383d96"}}},{"name":"Green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#469449"}}},{"name":"Red","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#af363c"}}},{"name":"Yellow","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#e7c71f"}}},{"name":"Magenta","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#bb5695"}}},{"name":"Cyan","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#0885a1"}}},{"name":"White","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#f3f3f2"}}},{"name":"Neutral 8","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c8c8c8"}}},{"name":"Neutral 6.5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#a0a0a0"}}},{"name":"Neutral 5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#7a7a7a"}}},{"name":"Neutral 3.5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#555555"}}},{"name":"Black","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#343434"}}}]}
{"time_0":0,"time_1":1,"camera":{"look_from":[0.000001,30,0],"look_at":[0,0,0],"up":[0,1,0],"vertical_fov":40,"aperture":0,"focus_distance":10},"background_color":[0,0,0],"objects":[{"kind":"Quad","priority":true,"q":[-100,80,-100],"u":[200,0,0],"v":[0,0,200],"material":"big lamp"},{"kind":"Quad","q":[-5.75,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Dark skin"},{"kind":"Quad","q":[-5.75,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Light skin"},{"kind":"Quad","q":[-5.75,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue sky"},{"kind":"Quad","q":[-5.75,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Foliage"},{"kind":"Quad","q":[-5.75,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue flower"},{"kind":"Quad","q":[-5.75,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Bluish green"},{"kind":"Quad","q":[-2.75,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Orange"},{"kind":"Quad","q":[-2.75,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Purplish blue"},{"kind":"Quad","q":[-2.75,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Moderate red"},{"kind":"Quad","q":[-2.75,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Purple"},{"kind":"Quad","q":[-2.75,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Yellow green"},{"kind":"Quad","q":[-2.75,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Orange yellow"},{"kind":"Quad","q":[0.25,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Blue"},{"kind":"Quad","q":[0.25,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Green"},{"kind":"Quad","q":[0.25,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Red"},{"kind":"Quad","q":[0.25,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Yellow"},{"kind":"Quad","q":[0.25,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Magenta"},{"kind":"Quad","q":[0.25,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Cyan"},{"kind":"Quad","q":[3.25,2.5,6.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"White"},{"kind":"Quad","q":[3.25,2.5,3.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 8"},{"kind":"Quad","q":[3.25,2.5,0.25],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 6.5"},{"kind":"Quad","q":[3.25,2.5,-2.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 5"},{"kind":"Quad","q":[3.25,2.5,-5.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Neutral 3.5"},{"kind":"Quad","q":[3.25,2.5,-8.75],"u":[2.5,0,0],"v":[0,0,2.5],"material":"Black"}],"materials":[{"name":"big lamp","kind":"DiffuseLight","emit":{"kind":"SolidColor","color":[2,2,2]}},{"name":"Dark skin","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#735244"}}},{"name":"Light skin","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c29682"}}},{"name":"Blue sky","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#627a9d"}}},{"name":"Foliage","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#576c43"}}},{"name":"Blue flower","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#8580b1"}}},{"name":"Bluish green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#67bdaa"}}},{"name":"Orange","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#d67e2c"}}},{"name":"Purplish blue","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#505ba6"}}},{"name":"Moderate red","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c15a63"}}},{"name":"Purple","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#5e3c6c"}}},{"name":"Yellow green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#9dbc40"}}},{"name":"Orange yellow","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#e0a32e"}}},{"name":"Blue","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#383d96"}}},{"name":"Green","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#469449"}}},{"name":"Red","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#af363c"}}},{"name":"Yellow","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#e7c71f"}}},{"name":"Magenta","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#bb5695"}}},{"name":"Cyan","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#0885a1"}}},{"name":"White","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#f3f3f2"}}},{"name":"Neutral 8","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#c8c8c8"}}},{"name":"Neutral 6.5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#a0a0a0"}}},{"name":"Neutral 5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#7a7a7a"}}},{"name":"Neutral 3.5","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#555555"}}},{"name":"Black","kind":"Lambertian","albedo":{"kind":"SolidColor","color":{"hex":"#343434"}}}]}
2 changes: 1 addition & 1 deletion scenes/cornell.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"kind": "DiffuseLight",
"emit": {
"kind": "SolidColor",
"color": [7, 7, 7]
"color": [4, 4, 4]
}
},
{
Expand Down
Loading

0 comments on commit c0b885f

Please sign in to comment.