etsavの日記: コメントとして書こうとしたらフィルタに引っ掛かる背景ソース
日記 by
etsav
// GLOBAL SETTINGS /////////////////////////////////////////////////////
#version 3.5;
#declare Radiosity=on;
global_settings {
assumed_gamma 1.0
max_trace_level 25
#if (Radiosity)
radiosity {
pretrace_start 0.08
pretrace_end 0.04
count 35
nearest_count 5
error_bound 1.8
recursion_limit 3
low_error_factor .5
gray_threshold 0.0
minimum_reuse 0.015
brightness 0.3
adc_bailout 0.01 / 2
normal on
// media on
//always_sample off
//max_sample 1.0
}
#end
}
// INCLUDE FILES ///////////////////////////////////////////////////////
#include "colors.inc"
#include "stones.inc"
#include "woods.inc"
#include "glass.inc"
#include "metals.inc"
// CONSTANT VALUES FOR GEOMETRY ////////////////////////////////////////
#declare CeilingHeight = 4.0; // Height of the ceiling.
#declare FloorHeight = 0.0; // Height of the floor.
#declare CorridorWidth = 7.0; // Width of the corridor.
#declare LightHeight = CeilingHeight - 0.1;
// Height of the ceiling lights.
#declare LengthCorridor = 500; // Length of the corridor.
// TEXTURES ////////////////////////////////////////////////////////////
// Quilted wallpaper.
#declare T_Wall = texture {
quilted
texture_map {
[0.3 pigment { White } ]
[0.6 pigment { rgb <0.7, 0.8, 0.4> } ]
}
scale 0.02
}
// Red rug.
#declare T_RedV = texture {
pigment { Red }
normal { gradient x frequency 30 turbulence .03 }
normal { gradient z frequency 50 turbulence .03 }
finish {
specular 0.1
diffuse 0.6
reflection 0
}
}
// CAMERAS /////////////////////////////////////////////////////////////
#declare DebugCamera = 0;
#switch (DebugCamera)
#case (0)
// The main camera.
camera {
right x * image_width / image_height
rotate <17, 6, 0>
translate <1, 1.5, -1.5>
}
#break
#case (1)
// View along the corridor.
camera {
right x * image_width / image_height
rotate y * 90
translate <-10, 2, 0>
}
#break
#case (2)
// View whole the alcove.
camera {
right x * image_width / image_height
translate <0, 1.5, -2.5>
}
#break
#else
#error "Debug camera index out of range."
#break
#end
// CEILING LIGHTS //////////////////////////////////////////////////////
#declare Lt = -15;
#while (Lt <= 12)
light_source {
<Lt, LightHeight, 0>
color White * 0.35
area_light x z 4 4
adaptive 1.0
jitter
}
#declare Lt = Lt + 9;
#end
// OBJECTS /////////////////////////////////////////////////////////////
// Floor
plane {
y, FloorHeight
texture {
brick
texture { T_Stone16 }
texture { T_Stone15 }
mortar 0.2
scale 0.1
}
}
// Ceiling
plane {
y, CeilingHeight
texture {
hexagon
texture { T_Stone8 }
texture { T_Stone11 }
texture { T_Stone19 }
scale 0.1
}
}
// Corridor
#declare CorrS = -LengthCorridor / 2; // Start X coord. of the corridor.
#declare CorrE = +LengthCorridor / 2; // End X coord. of the corridor.
#declare CorrF = +CorridorWidth / 2; // Z coord. of the wall in front of the camera.
#declare CorrB = -CorridorWidth / 2; // Z coord. of the wall behind the camera.
#declare AlcvH = CeilingHeight - 0.5; // Alcove height;
#declare AlcvW = 2.0; // Alcove Width;
#declare AlcvD = 1.0; // Alcove depth.
#declare ConsW = 1.4; // Width of the console;
#declare ConsB = 1.3; // Bottom of the console;
#declare ConsT = 2.0; // Top of the console;
#declare ConsD = 0.3; // Depth of the console;
difference {
// The total body of the corridor wall.
box {
<CorrS, FloorHeight - 1.0, CorrF + AlcvD + 1.0>
<CorrE, CeilingHeight + 1, CorrB - AlcvD - 1.0>
texture { T_Wall }
}
// Tunnel
union
{
#declare ArchR = 2.0; // Arch radius.
#declare ArchB = CeilingHeight - ArchR;
// The bottom height of the arch.
#declare St = CorrS - 1.0;
#declare Ed = CorrE + 1.0;
box { <St, FloorHeight, CorrF>
<Ed, ArchB, CorrB> }
box { <St, ArchB, CorrF - ArchR>
<Ed, CeilingHeight, CorrB + ArchR> }
cylinder { <St, ArchB, CorrF - ArchR>
<Ed, ArchB, CorrF - ArchR> ArchR }
cylinder { <St, ArchB, CorrB + ArchR>
<Ed, ArchB, CorrB + ArchR> ArchR }
texture { T_Wall }
}
// Alcove
union
{
#declare W1 = -AlcvW / 2;
#declare W2 = +AlcvW / 2;
#declare D1 = CorrB - AlcvD;
#declare D2 = CorrF + AlcvD;
#declare ArchR1 = 0.5;
#declare ArchR2 = 0.2;
#declare ArchB1 = AlcvH - ArchR1 * 2;
#declare ArchB2 = AlcvH - ArchR1;
box { <W1, FloorHeight, D1>, <W2, ArchB1, D2> }
cylinder { < 0.0, ArchB2, D1>, < 0.0, ArchB2, D2>, ArchR1 }
cylinder { <-ArchR1, ArchB1, D1>, <-ArchR1, ArchB1, D2>, ArchR1 }
cylinder { <+ArchR1, ArchB1, D1>, <+ArchR1, ArchB1, D2>, ArchR1 }
cylinder { <-ArchR1, ArchB2, D1>, <-ArchR1, ArchB2, D2>, ArchR2 }
cylinder { <+ArchR1, ArchB2, D1>, <+ArchR1, ArchB2, D2>, ArchR2 }
// Console
#declare W3 = -ConsW / 2;
#declare W4 = +ConsW / 2;
box { <W3, ConsB, CorrF>, <W4, ConsT, D2 + ConsD> }
texture { T_Wall rotate y * 90 }
}
}
// Floor beam
difference {
// body
box {
<CorrS, FloorHeight, CorrF + AlcvD + 1.0>
<CorrE, FloorHeight + 0.2, CorrB - AlcvD - 1.0>
}
// tunnel
box {
<CorrS, FloorHeight - 0.1, CorrF - 0.05>
<CorrE, FloorHeight + 0.3, CorrB + 0.05> }
// alcove
box {
<-AlcvW / 2 + 0.05, FloorHeight - 0.1, CorrF + AlcvD - 0.05>
<+AlcvW / 2 - 0.05, FloorHeight + 0.3, CorrB - AlcvD + 0.05> }
texture { T_Wood23 rotate y*90 scale 0.7 }
}
// Console plate
box {
<-ConsW / 2, ConsB - 0.04, CorrF + AlcvD>
<+ConsW / 2, ConsB, CorrF + AlcvD - 0.7>
texture { T_Wood23 }
}
// Console chains
#declare crdX = -0.698;
#while (crdX <= 0.698)
cylinder {
<crdX, ConsB, CorrF + AlcvD - 0.7> <crdX, ConsT, CorrF + AlcvD> 0.002
material {
texture {
T_Silver_2A
finish { F_MetalC }
}
}
}
#declare ch = 0.0;
#while (ch <= 0.7)
sphere {
<crdX, ConsB + ch, CorrF + AlcvD - 0.7 + ch> 0.004
material {
texture {
T_Brass_2A
finish { F_MetalC }
}
}
}
#declare ch = ch + 0.007;
#end
#declare crdX = crdX + 0.698 * 2;
#end
// Light glass
union {
// Sphere glass
difference {
sphere { <0, 0, 0>, 1.00 }
sphere { <0, 0, 0>, 0.98 }
box {<-1, 0.5, -1>, <1, 1.1, 1> }
texture { T_Glass3 }
normal {
bumps 0.4
scale 0.05
}
interior {
caustics 0.7
ior 1.5
}
finish { reflection 0.3 }
}
// Water
difference {
sphere { <0, 0, 0>, 0.98 }
box { <-1, 0.0, -1> <1, 1.1, 1> }
texture {
pigment { color rgbt <0.6, 0.5, 0.5, 0.7> }
}
normal {
bumps 0.8
scale 0.1
}
interior {
caustics 1.0
ior 1.2
}
finish { reflection { 0.03, 1 } }
}
// Place it on the console plate.
scale 0.1
translate <0.45, ConsB + 0.1, CorrF + 0.53>
}
light_source {
0 * x
color rgb <0.3,0.2,0>
translate <0.45, ConsB + 0.105, CorrF + 0.5>
}
// Red rug
box {
<-0.77, 0, CorrF - 0.3> <0.77, 0.01, CorrF + 0.8>
texture { T_RedV }
}
// Rug border
box {
<-0.81, 0, CorrF -0.31> < 0.81, 0.009, CorrF + 0.81>
texture {
pigment { Black }
normal { gradient z frequency 50 turbulence .01 }
finish {
specular 0.4
diffuse 0.7
reflection 0.0
}
}
}
// Stool
union {
// Body
lathe {
cubic_spline 9,
<0, 0> <.3, 0> <.3, .1> <.1, .13> <0.07, .4>
<.11, .6> <.35, .7> <.35, .8> <0, .8>
texture { T_Wood23 rotate x * 90 }
}
// Cushion
sphere {
<0, 0, 0>, 0.32
scale <1, 0.15, 1>
translate y * 0.8
texture { T_RedV }
}
translate <-0.3, 0, CorrF + 0.2>
}
#version 3.5;
#declare Radiosity=on;
global_settings {
assumed_gamma 1.0
max_trace_level 25
#if (Radiosity)
radiosity {
pretrace_start 0.08
pretrace_end 0.04
count 35
nearest_count 5
error_bound 1.8
recursion_limit 3
low_error_factor .5
gray_threshold 0.0
minimum_reuse 0.015
brightness 0.3
adc_bailout 0.01 / 2
normal on
// media on
//always_sample off
//max_sample 1.0
}
#end
}
// INCLUDE FILES ///////////////////////////////////////////////////////
#include "colors.inc"
#include "stones.inc"
#include "woods.inc"
#include "glass.inc"
#include "metals.inc"
// CONSTANT VALUES FOR GEOMETRY ////////////////////////////////////////
#declare CeilingHeight = 4.0; // Height of the ceiling.
#declare FloorHeight = 0.0; // Height of the floor.
#declare CorridorWidth = 7.0; // Width of the corridor.
#declare LightHeight = CeilingHeight - 0.1;
// Height of the ceiling lights.
#declare LengthCorridor = 500; // Length of the corridor.
// TEXTURES ////////////////////////////////////////////////////////////
// Quilted wallpaper.
#declare T_Wall = texture {
quilted
texture_map {
[0.3 pigment { White } ]
[0.6 pigment { rgb <0.7, 0.8, 0.4> } ]
}
scale 0.02
}
// Red rug.
#declare T_RedV = texture {
pigment { Red }
normal { gradient x frequency 30 turbulence .03 }
normal { gradient z frequency 50 turbulence .03 }
finish {
specular 0.1
diffuse 0.6
reflection 0
}
}
// CAMERAS /////////////////////////////////////////////////////////////
#declare DebugCamera = 0;
#switch (DebugCamera)
#case (0)
// The main camera.
camera {
right x * image_width / image_height
rotate <17, 6, 0>
translate <1, 1.5, -1.5>
}
#break
#case (1)
// View along the corridor.
camera {
right x * image_width / image_height
rotate y * 90
translate <-10, 2, 0>
}
#break
#case (2)
// View whole the alcove.
camera {
right x * image_width / image_height
translate <0, 1.5, -2.5>
}
#break
#else
#error "Debug camera index out of range."
#break
#end
// CEILING LIGHTS //////////////////////////////////////////////////////
#declare Lt = -15;
#while (Lt <= 12)
light_source {
<Lt, LightHeight, 0>
color White * 0.35
area_light x z 4 4
adaptive 1.0
jitter
}
#declare Lt = Lt + 9;
#end
// OBJECTS /////////////////////////////////////////////////////////////
// Floor
plane {
y, FloorHeight
texture {
brick
texture { T_Stone16 }
texture { T_Stone15 }
mortar 0.2
scale 0.1
}
}
// Ceiling
plane {
y, CeilingHeight
texture {
hexagon
texture { T_Stone8 }
texture { T_Stone11 }
texture { T_Stone19 }
scale 0.1
}
}
// Corridor
#declare CorrS = -LengthCorridor / 2; // Start X coord. of the corridor.
#declare CorrE = +LengthCorridor / 2; // End X coord. of the corridor.
#declare CorrF = +CorridorWidth / 2; // Z coord. of the wall in front of the camera.
#declare CorrB = -CorridorWidth / 2; // Z coord. of the wall behind the camera.
#declare AlcvH = CeilingHeight - 0.5; // Alcove height;
#declare AlcvW = 2.0; // Alcove Width;
#declare AlcvD = 1.0; // Alcove depth.
#declare ConsW = 1.4; // Width of the console;
#declare ConsB = 1.3; // Bottom of the console;
#declare ConsT = 2.0; // Top of the console;
#declare ConsD = 0.3; // Depth of the console;
difference {
// The total body of the corridor wall.
box {
<CorrS, FloorHeight - 1.0, CorrF + AlcvD + 1.0>
<CorrE, CeilingHeight + 1, CorrB - AlcvD - 1.0>
texture { T_Wall }
}
// Tunnel
union
{
#declare ArchR = 2.0; // Arch radius.
#declare ArchB = CeilingHeight - ArchR;
// The bottom height of the arch.
#declare St = CorrS - 1.0;
#declare Ed = CorrE + 1.0;
box { <St, FloorHeight, CorrF>
<Ed, ArchB, CorrB> }
box { <St, ArchB, CorrF - ArchR>
<Ed, CeilingHeight, CorrB + ArchR> }
cylinder { <St, ArchB, CorrF - ArchR>
<Ed, ArchB, CorrF - ArchR> ArchR }
cylinder { <St, ArchB, CorrB + ArchR>
<Ed, ArchB, CorrB + ArchR> ArchR }
texture { T_Wall }
}
// Alcove
union
{
#declare W1 = -AlcvW / 2;
#declare W2 = +AlcvW / 2;
#declare D1 = CorrB - AlcvD;
#declare D2 = CorrF + AlcvD;
#declare ArchR1 = 0.5;
#declare ArchR2 = 0.2;
#declare ArchB1 = AlcvH - ArchR1 * 2;
#declare ArchB2 = AlcvH - ArchR1;
box { <W1, FloorHeight, D1>, <W2, ArchB1, D2> }
cylinder { < 0.0, ArchB2, D1>, < 0.0, ArchB2, D2>, ArchR1 }
cylinder { <-ArchR1, ArchB1, D1>, <-ArchR1, ArchB1, D2>, ArchR1 }
cylinder { <+ArchR1, ArchB1, D1>, <+ArchR1, ArchB1, D2>, ArchR1 }
cylinder { <-ArchR1, ArchB2, D1>, <-ArchR1, ArchB2, D2>, ArchR2 }
cylinder { <+ArchR1, ArchB2, D1>, <+ArchR1, ArchB2, D2>, ArchR2 }
// Console
#declare W3 = -ConsW / 2;
#declare W4 = +ConsW / 2;
box { <W3, ConsB, CorrF>, <W4, ConsT, D2 + ConsD> }
texture { T_Wall rotate y * 90 }
}
}
// Floor beam
difference {
// body
box {
<CorrS, FloorHeight, CorrF + AlcvD + 1.0>
<CorrE, FloorHeight + 0.2, CorrB - AlcvD - 1.0>
}
// tunnel
box {
<CorrS, FloorHeight - 0.1, CorrF - 0.05>
<CorrE, FloorHeight + 0.3, CorrB + 0.05> }
// alcove
box {
<-AlcvW / 2 + 0.05, FloorHeight - 0.1, CorrF + AlcvD - 0.05>
<+AlcvW / 2 - 0.05, FloorHeight + 0.3, CorrB - AlcvD + 0.05> }
texture { T_Wood23 rotate y*90 scale 0.7 }
}
// Console plate
box {
<-ConsW / 2, ConsB - 0.04, CorrF + AlcvD>
<+ConsW / 2, ConsB, CorrF + AlcvD - 0.7>
texture { T_Wood23 }
}
// Console chains
#declare crdX = -0.698;
#while (crdX <= 0.698)
cylinder {
<crdX, ConsB, CorrF + AlcvD - 0.7> <crdX, ConsT, CorrF + AlcvD> 0.002
material {
texture {
T_Silver_2A
finish { F_MetalC }
}
}
}
#declare ch = 0.0;
#while (ch <= 0.7)
sphere {
<crdX, ConsB + ch, CorrF + AlcvD - 0.7 + ch> 0.004
material {
texture {
T_Brass_2A
finish { F_MetalC }
}
}
}
#declare ch = ch + 0.007;
#end
#declare crdX = crdX + 0.698 * 2;
#end
// Light glass
union {
// Sphere glass
difference {
sphere { <0, 0, 0>, 1.00 }
sphere { <0, 0, 0>, 0.98 }
box {<-1, 0.5, -1>, <1, 1.1, 1> }
texture { T_Glass3 }
normal {
bumps 0.4
scale 0.05
}
interior {
caustics 0.7
ior 1.5
}
finish { reflection 0.3 }
}
// Water
difference {
sphere { <0, 0, 0>, 0.98 }
box { <-1, 0.0, -1> <1, 1.1, 1> }
texture {
pigment { color rgbt <0.6, 0.5, 0.5, 0.7> }
}
normal {
bumps 0.8
scale 0.1
}
interior {
caustics 1.0
ior 1.2
}
finish { reflection { 0.03, 1 } }
}
// Place it on the console plate.
scale 0.1
translate <0.45, ConsB + 0.1, CorrF + 0.53>
}
light_source {
0 * x
color rgb <0.3,0.2,0>
translate <0.45, ConsB + 0.105, CorrF + 0.5>
}
// Red rug
box {
<-0.77, 0, CorrF - 0.3> <0.77, 0.01, CorrF + 0.8>
texture { T_RedV }
}
// Rug border
box {
<-0.81, 0, CorrF -0.31> < 0.81, 0.009, CorrF + 0.81>
texture {
pigment { Black }
normal { gradient z frequency 50 turbulence .01 }
finish {
specular 0.4
diffuse 0.7
reflection 0.0
}
}
}
// Stool
union {
// Body
lathe {
cubic_spline 9,
<0, 0> <.3, 0> <.3, .1> <.1, .13> <0.07, .4>
<.11, .6> <.35, .7> <.35, .8> <0, .8>
texture { T_Wood23 rotate x * 90 }
}
// Cushion
sphere {
<0, 0, 0>, 0.32
scale <1, 0.15, 1>
translate y * 0.8
texture { T_RedV }
}
translate <-0.3, 0, CorrF + 0.2>
}
コメントとして書こうとしたらフィルタに引っ掛かる背景ソース More ログイン