Commit 85313cdb authored by Petter Sagvold's avatar Petter Sagvold
Browse files

All the files for rendering the inside scenes

parent cf5d4411
import sys
sys.path.append('.')
import layerlab as ll
albedo = [0.6, 0.6, 0.6]
eta = 1.5
alpha = 0.025 # Beckmann roughness
# Construct quadrature scheme suitable for the material
n, m = ll.parameterHeuristicMicrofacet(eta = eta, alpha = alpha)
mu, w = ll.quad.gaussLobatto(n)
print("# of nodes = %i, fourier orders = %i" % (n, m))
# Construct coating layer
print("Creating coating layer")
coating = ll.Layer(mu, w, m)
coating.setMicrofacet(eta = eta, alpha = alpha)
output = []
for channel in range(3):
# Construct diffuse bottom layer for each channel
print("Creating diffuse layer")
l = ll.Layer(mu, w, m)
l.setDiffuse(albedo[channel])
# Apply coating
print("Applying coating..")
l.addToTop(coating)
output.append(l)
# .. and write to disk
print("Writing to disk..")
storage = ll.BSDFStorage.fromLayerRGB("output.bsdf", output[0], output[1], output[2])
storage.close()
import sys
sys.path.append('.')
import layerlab as ll
albedo = [0.6, 0.6, 0.6]
eta = 1.5
alpha = 0.25 # Beckmann roughness
# Construct quadrature scheme suitable for the material
n, m = ll.parameterHeuristicMicrofacet(eta = eta, alpha = alpha)
mu, w = ll.quad.gaussLobatto(n)
print("# of nodes = %i, fourier orders = %i" % (n, m))
# Construct coating layer
print("Creating coating layer")
coating = ll.Layer(mu, w, m)
coating.setMicrofacet(eta = eta, alpha = alpha)
output = []
for channel in range(3):
# Construct diffuse bottom layer for each channel
print("Creating diffuse layer")
l = ll.Layer(mu, w, m)
l.setDiffuse(albedo[channel])
# Apply coating
print("Applying coating..")
l.addToTop(coating)
output.append(l)
# .. and write to disk
print("Writing to disk..")
storage = ll.BSDFStorage.fromLayerRGB("paint.bsdf", output[0], output[1], output[2])
storage.close()
# Main Scene File
Sampler "halton" "integer pixelsamples" [128]
Integrator "path"
LookAt -0.623726 -7.587055 1.204726 -0.623726 -6.587055 1.204728 0.000000 -0.000002 1.000000
# table view (teacups need smoothing, marble is lame)
#LookAt 2 -2 4 1.25 0 2.5 0 0 1
Camera "realistic"
# "string lensfile" "lenses/wide.22mm.dat"
"string lensfile" "lenses/fisheye.10mm.dat"
"float aperturediameter" 5.5
"float focusdistance" 0.55
#Camera "environment"
Film "image"
"integer xresolution" [1500]
"integer yresolution" [1500]
#PixelFilter "mitchell"
WorldBegin
Include "materials.pbrt"
Include "geometry.pbrt"
# through blinds
#LightSource "distant" "point from" [9 -4 9 ] "blackbody L" [5000 10]
# inside lamps
AttributeBegin
Translate .951 1.94 3.90
AreaLightSource "diffuse" "blackbody L" [5000 500]
Shape "sphere" "float radius" .1
AttributeEnd
AttributeBegin
Translate -2.191 1.944 3.90
AreaLightSource "diffuse" "blackbody L" [5000 500]
Shape "sphere" "float radius" .1
AttributeEnd
# extra walls
AttributeBegin
NamedMaterial "Paint - White Matt"
# right: x = -6.5 plane
Shape "trianglemesh" "integer indices" [0 1 2 0 2 3 ]
"point P" [ -6.5 -10 -2 -6.5 10 -2 -6.5 10 7 -6.5 -10 7 ]
# back: y = -9 plane
Shape "trianglemesh" "integer indices" [0 1 2 0 2 3]
"point P" [ -10 -9 -2 10 -9 -2 10 -9 7 -10 -9 7 ]
AttributeEnd
WorldEnd
# Geometry File
AttributeBegin # "Lampshade.001"
Transform [0.594083070755005 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.594083070755005 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.594083070755005 0.000000000000000 0.951433181762695 1.944540739059448 3.603615760803223 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Frosted Glass"
Shape "plymesh"
"string filename" ["geometry/Sphere_002_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Sphere_002_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Lampshade"
Transform [0.594083070755005 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.594083070755005 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.594083070755005 0.000000000000000 -2.191241502761841 1.944540739059448 3.603615760803223 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Frosted Glass"
Shape "plymesh"
"string filename" ["geometry/Sphere_001_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Sphere_001_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Venetian Blind"
Transform [2.343473911285400 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.242074131965637 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 5.146959781646729 0.613234817981720 1.960030198097229 1.000000000000000]
Shape "plymesh"
"string filename" ["geometry/Plane_006_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Table Legs"
Transform [1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 -0.642285108566284 1.903946638107300 0.224622368812561 1.000000000000000]
NamedMaterial "Paint - Black Satin"
Shape "plymesh"
"string filename" ["geometry/Cube_007_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Teacup.002"
Transform [0.960156738758087 -0.279462069272995 0.000000000000000 0.000000000000000 0.279462069272995 0.960156738758087 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 -2.945224523544312 1.932038784027100 0.916272580623627 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Ceramic.001"
Shape "plymesh"
"string filename" ["geometry/Circle_003_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Gold Paint"
Shape "plymesh"
"string filename" ["geometry/Circle_003_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Spoon.002"
Transform [0.035585343837738 -0.028537899255753 0.000000001224165 0.000000000000000 0.028350833803415 0.035352084785700 -0.001094039995223 0.000000000000000 0.000684458995238 0.000853487581480 0.045316010713577 0.000000000000000 -3.022971153259277 2.051548004150391 0.937468111515045 1.000000000000000]
NamedMaterial "Material.005"
Shape "plymesh"
"string filename" ["geometry/Plane_005_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Saucer.002"
Transform [0.626249969005585 0.780904650688171 0.000000009331852 0.000000000000000 -0.780904650688171 0.626249969005585 -0.000000011636386 0.000000000000000 0.000000000000000 0.000000000000000 1.001000046730042 0.000000000000000 -2.945224523544312 1.932038664817810 0.915794432163239 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Material.002"
Shape "plymesh"
"string filename" ["geometry/Circle_006_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Gold Paint"
Shape "plymesh"
"string filename" ["geometry/Circle_006_0000_m001.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Ceramic.001"
Shape "plymesh"
"string filename" ["geometry/Circle_006_0000_m002.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Teacup.001"
Transform [0.960156738758087 -0.279462069272995 0.000000000000000 0.000000000000000 0.279462069272995 0.960156738758087 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 -1.041076183319092 1.123968362808228 0.916766405105591 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Ceramic.001"
Shape "plymesh"
"string filename" ["geometry/Circle_002_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Gold Paint"
Shape "plymesh"
"string filename" ["geometry/Circle_002_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Saucer.001"
Transform [0.626250028610229 0.780904591083527 -0.000000055991109 0.000000000000000 -0.780904769897461 0.626250028610229 0.000000069818313 0.000000000000000 0.000000000000000 0.000000000000000 1.001000046730042 0.000000000000000 -1.041076302528381 1.123968482017517 0.916288375854492 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Material.002"
Shape "plymesh"
"string filename" ["geometry/Circle_000_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Gold Paint"
Shape "plymesh"
"string filename" ["geometry/Circle_000_0000_m001.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Ceramic.001"
Shape "plymesh"
"string filename" ["geometry/Circle_000_0000_m002.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Spoon.001"
Transform [0.035585347563028 -0.028537899255753 -0.000000002487675 0.000000000000000 0.028350839391351 0.035352084785700 -0.001094043022022 0.000000000000000 0.000684459053446 0.000853487523273 0.045316010713577 0.000000000000000 -1.118822932243347 1.243477940559387 0.937962055206299 1.000000000000000]
NamedMaterial "Material.005"
Shape "plymesh"
"string filename" ["geometry/Plane_004_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Teapot"
Transform [0.127103701233864 -0.095074273645878 0.000000000000000 0.000000000000000 0.095074273645878 0.127103701233864 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.158727645874023 0.000000000000000 -0.769057631492615 1.948741316795349 0.896298587322235 1.000000000000000]
NamedMaterial "Ceramic"
Shape "plymesh"
"string filename" ["geometry/Teapot_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair 05"
Transform [-0.000001026775749 1.352859258651733 0.000000000000000 0.000000000000000 -1.352859258651733 -0.000001026775749 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -4.177764415740967 1.992996692657471 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_006_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs.005"
Transform [-0.000001026775635 1.352859139442444 0.000000000000001 0.000000000000000 -1.352859258651733 -0.000001071740485 -0.000000006818131 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -3.780874729156494 1.992996811866760 -0.177929341793060 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_005_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_005_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Area Light"
#Transform [5.661653995513916 0.000000000000000 0.000000000000000 0.000000000000000 #0.000000000000000 3.000000000000000 0.000000000000000 0.000000000000000 #0.000000000000000 0.000000000000000 3.000000000000000 0.000000000000000 #-0.596747159957886 1.831382989883423 7.024957656860352 1.000000000000000]
#AreaLightSource "diffuse" #"color L" [2 2 2]
# "blackbody L" [5500 .25]
ReverseOrientation
#Shape "plymesh"
# "string filename" #["geometry/Plane_001_0000_m000.ply"]
# Shape "disk" "float height" 7 "float radius" 4
AttributeEnd # ""
AttributeBegin # "Chair 04"
Transform [-1.352859258651733 0.000002053551498 0.000000000000000 0.000000000000000 -0.000002053551498 -1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -1.835080862045288 -0.233733206987381 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_005_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs.004"
Transform [-1.352859258651733 0.000002041209427 0.000000013636263 0.000000000000000 -0.000002053551498 -1.352859258651733 -0.000000000000018 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -1.835080385208130 0.163156718015671 -0.177929341793060 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_004_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_004_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Chair 03"
Transform [-1.352859258651733 0.000002053551498 0.000000000000000 0.000000000000000 -0.000002053551498 -1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.601839542388916 -0.233733206987381 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_004_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs.003"
Transform [-1.352859258651733 0.000002053551498 0.000000000000000 0.000000000000000 -0.000002053551498 -1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.601839959621429 0.163156718015671 -0.177929326891899 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_003_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_003_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Chair 02"
Transform [-0.000000865502329 -1.352859258651733 0.000000000000000 0.000000000000000 1.352859258651733 -0.000000865502329 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 2.946556568145752 1.993371486663818 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_003_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs.002"
Transform [-0.000000865502273 -1.352859139442444 0.000000000000004 0.000000000000000 1.352859139442444 -0.000000967373808 -0.000000006818131 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 2.549666643142700 1.993371605873108 -0.177929341793060 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_002_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_002_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Chair 01"
Transform [1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -1.886224508285522 3.869214057922363 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_002_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs.001"
Transform [1.352859139442444 0.000000293490530 -0.000000015476948 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 -1.886224508285522 3.472323894500732 -0.177929341793060 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_000_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_000_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Table Top"
Transform [1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 -0.667227387428284 1.915051579475403 0.788318514823914 1.000000000000000]
NamedMaterial "White Marble"
Shape "plymesh"
"string filename" ["geometry/Cube_001_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Walls & Floor"
Transform [1.029811620712280 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 -0.586363077163696 -0.048330441117287 -1.419957637786865 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Floor Tiles"
Shape "plymesh"
"string filename" ["geometry/Plane_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Paint - White Matt"
Shape "plymesh"
"string filename" ["geometry/Plane_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Chair06"
Transform [1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.626897633075714 3.869214057922363 -0.191934317350388 1.000000000000000]
NamedMaterial "White Plastic"
Shape "plymesh"
"string filename" ["geometry/Cube_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Chair - Legs 006"
Transform [1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.352859258651733 0.000000000000000 0.626897633075714 3.472324132919312 -0.177929356694221 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Chrome"
Shape "plymesh"
"string filename" ["geometry/Cylinder_001_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Black Rubber"
Shape "plymesh"
"string filename" ["geometry/Cylinder_001_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""
AttributeBegin # "Pitcher"
Transform [-0.212506517767906 -0.124359227716923 0.000000000000000 0.000000000000000 0.124359227716923 -0.212506517767906 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.273847609758377 0.000000000000000 -0.190780073404312 2.390382289886475 0.898893952369690 1.000000000000000]
NamedMaterial "Ceramic"
Shape "plymesh"
"string filename" ["geometry/Plane_002_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # "Teacup 003"
Transform [-0.429397642612457 0.903115510940552 0.000000000000000 0.000000000000000 -0.903115510940552 -0.429397642612457 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 1.000000000000000 0.000000000000000 1.614856362342834 0.992693066596985 0.916766405105591 1.000000000000000]
AttributeBegin # ""
NamedMaterial "Ceramic.001"
Shape "plymesh"
"string filename" ["geometry/Circle_013_0000_m000.ply"]
AttributeEnd # ""
AttributeBegin # ""
NamedMaterial "Gold Paint"
Shape "plymesh"
"string filename" ["geometry/Circle_013_0000_m001.ply"]
AttributeEnd # ""
AttributeEnd # ""