// Textured Prince & Princess (glad) in a Castle Room #version 3.7; global_settings { assumed_gamma 0.7 max_trace_level 16 radiosity { pretrace_start 0.08 pretrace_end 0.01 count 200 nearest_count 10 error_bound 0.5 recursion_limit 2 low_error_factor 0.5 gray_threshold 0.0 } } background { color rgb <0.06, 0.07, 0.09> } // ---------------- Camera ---------------- camera { location <0, 6.2, -16.5> look_at <0, 3.2, 1.0> angle 38 } // ---------------- Lights ---------------- light_source { < -12, 15, -16> color rgb <1.00, 0.98, 0.92> adaptive 1 jitter fade_distance 12 fade_power 2 } light_source { < 14, 10, -7 > color rgb <0.55, 0.62, 0.80> adaptive 1 jitter fade_distance 12 fade_power 2 } light_source { < 0, 9, -2 > color rgb <0.25, 0.24, 0.28> adaptive 1 jitter fade_distance 12 fade_power 2 } // soft fill // ---------------- Utility ---------------- #declare F_Matte = finish { diffuse 0.9 specular 0.08 roughness 0.06 } #declare F_Soft = finish { diffuse 0.85 specular 0.12 roughness 0.05 } #declare F_Metal = finish { diffuse 0.35 specular 0.75 roughness 0.02 reflection 0.10 metallic } #declare C_Stone1 = <0.62,0.62,0.66>; #declare C_Stone2 = <0.40,0.40,0.46>; #declare C_Mortar = <0.25,0.25,0.28>; #declare C_Wood1 = <0.36,0.23,0.13>; #declare C_Wood2 = <0.24,0.15,0.09>; #declare C_Carpet1 = <0.55,0.12,0.14>; #declare C_Carpet2 = <0.38,0.07,0.09>; #declare C_Blue1 = <0.16,0.26,0.70>; #declare C_Blue2 = <0.10,0.18,0.48>; #declare C_Purple1 = <0.48,0.18,0.55>; #declare C_Purple2 = <0.30,0.10,0.36>; #declare C_Pink1 = <0.95,0.55,0.70>; #declare C_Pink2 = <0.75,0.34,0.54>; #declare C_White1 = <0.95,0.95,0.97>; #declare C_White2 = <0.86,0.86,0.90>; #declare C_Skin1 = <0.98,0.80,0.70>; #declare C_Skin2 = <0.86,0.66,0.58>; #declare C_Gold1 = <0.95,0.78,0.20>; #declare C_Gold2 = <0.72,0.55,0.10>; // ---------------- Textures (procedural, fast) ---------------- // Stone brick-ish: pigment with subtle noise + normal bumps #declare T_StoneFloor = texture{ pigment{ granite color_map{ [0.0 color rgb (C_Stone2*0.85)] [0.6 color rgb (C_Stone1*0.95)] [1.0 color rgb (C_Stone1*1.05)] } scale 1.3 } normal { bumps 0.35 scale 0.25 } finish { diffuse 0.9 specular 0.10 roughness 0.06 } } #declare T_StoneWall = texture{ pigment{ average pigment_map{ [1 brick color rgb (C_Stone2*0.95), color rgb (C_Mortar*0.85) brick_size <1.2,0.55,0.8> mortar 0.07 translate <0.2,0.05,0.1> ] [1 granite color_map{ [0.0 color rgb (C_Stone2*0.80)] [0.7 color rgb (C_Stone2*1.05)] [1.0 color rgb (C_Stone1*1.00)] } scale 1.8 ] } } normal { bumps 0.45 scale 0.35 } finish { diffuse 0.88 specular 0.06 roughness 0.08 } } #declare T_Wood = texture{ pigment{ wood color_map{ [0.00 color rgb (C_Wood2*0.90)] [0.45 color rgb (C_Wood1*1.05)] [1.00 color rgb (C_Wood2*1.10)] } turbulence 0.10 scale <0.20, 1, 0.20> } normal { bumps 0.25 scale 0.10 } finish { diffuse 0.80 specular 0.20 roughness 0.05 } } #declare T_Gold = texture{ pigment{ gradient y color_map{ [0.0 color rgb C_Gold2] [1.0 color rgb C_Gold1] } scale 0.6 } finish { F_Metal } } #declare T_Skin = texture{ pigment{ bozo color_map{ [0.0 color rgb (C_Skin1*1.00)] [0.6 color rgb (C_Skin1*0.97)] [1.0 color rgb (C_Skin2*1.00)] } scale 0.35 } normal { bumps 0.12 scale 0.07 } finish { diffuse 0.92 specular 0.12 roughness 0.06 } } #declare T_FabricRed = texture{ pigment{ checker color rgb C_Carpet1 color rgb C_Carpet2 scale <0.15, 1, 0.15> } normal { wrinkles 0.18 scale 0.22 } finish { diffuse 0.95 specular 0.06 roughness 0.10 } } #declare T_FabricBlue = texture{ pigment{ ripples color_map{ [0.0 color rgb C_Blue2] [0.6 color rgb C_Blue1] [1.0 color rgb (C_Blue1*1.05)] } scale 0.8 } normal { wrinkles 0.15 scale 0.18 } finish { diffuse 0.92 specular 0.10 roughness 0.08 } } #declare T_FabricPurple = texture{ pigment{ waves color_map{ [0.0 color rgb C_Purple2] [0.7 color rgb C_Purple1] [1.0 color rgb (C_Purple1*1.05)] } scale 0.9 } normal { wrinkles 0.16 scale 0.22 } finish { diffuse 0.92 specular 0.10 roughness 0.08 } } #declare T_FabricPink = texture{ pigment{ agate color_map{ [0.0 color rgb C_Pink2] [0.7 color rgb C_Pink1] [1.0 color rgb (C_Pink1*1.05)] } scale 0.65 } normal { wrinkles 0.14 scale 0.24 } finish { diffuse 0.93 specular 0.08 roughness 0.10 } } #declare T_ClothWhite = texture{ pigment{ granite color_map{ [0.0 color rgb (C_White2)] [0.7 color rgb (C_White1)] [1.0 color rgb (C_White1*1.02)] } scale 0.9 } normal { bumps 0.10 scale 0.15 } finish { diffuse 0.94 specular 0.10 roughness 0.08 } } #declare T_Shoe = texture{ pigment{ color rgb <0.12,0.12,0.14> } finish { diffuse 0.6 specular 0.25 roughness 0.04 reflection 0.02 } } // ---------------- Room ---------------- #declare Room_W = 18; #declare Room_D = 22; #declare Room_H = 10; #declare Wall_T = 0.6; union { // Floor box { <-Room_W/2, 0, -Room_D/2>, < Room_W/2, 0.2, Room_D/2> texture { T_StoneFloor } } // Back wall box { <-Room_W/2, 0, Room_D/2-Wall_T>, texture { T_StoneWall } } // Left wall box { <-Room_W/2, 0, -Room_D/2>, <-Room_W/2+Wall_T, Room_H, Room_D/2> texture { T_StoneWall } } // Right wall box { , texture { T_StoneWall } } // Arch alcove (decorative) carved into back wall difference { box { <-3.2, 0, Room_D/2-Wall_T-0.01>, <3.2, 6.6, Room_D/2-0.01> texture { T_StoneWall } } union { box { <-2.4, 0.8, Room_D/2-Wall_T-0.2>, <2.4, 5.8, Room_D/2+0.3> } cylinder { <-2.4, 5.8, Room_D/2-Wall_T-0.2>, <2.4, 5.8, Room_D/2-Wall_T-0.2>, 0.7 } } texture { T_StoneWall } } } // Carpet (slightly lifted above floor) box { <-2.25, 0.201, -6>, <2.25, 0.220, 7.6> texture { T_FabricRed } } // ---------------- Throne ---------------- #declare ThroneZ = 7.2; union { // Base platform box { <-2.2, 0.2, ThroneZ-1.4>, <2.2, 0.6, ThroneZ+0.6> texture { T_StoneFloor } } // Seat box { <-1.2, 0.6, ThroneZ-0.7>, <1.2, 1.2, ThroneZ+0.2> texture { T_Wood } } // Back box { <-1.2, 1.2, ThroneZ+0.0>, <1.2, 3.9, ThroneZ+0.4> texture { T_Wood } } // Gold trims box { <-1.25, 1.18, ThroneZ+0.38>, <1.25, 1.35, ThroneZ+0.45> texture { T_Gold } } box { <-1.25, 3.75, ThroneZ+0.38>, <1.25, 3.92, ThroneZ+0.45> texture { T_Gold } } // Arm rests box { <-1.35, 1.0, ThroneZ-0.7>, <-1.1, 1.55, ThroneZ+0.2> texture { T_Wood } } box { < 1.10, 1.0, ThroneZ-0.7>, < 1.35, 1.55, ThroneZ+0.2> texture { T_Wood } } // Crown ornament cone { <0, 4.05, ThroneZ+0.2>, 0.55, <0, 3.55, ThroneZ+0.2>, 0.10 texture { T_Gold } } } // ---------------- Characters ---------------- #declare PrincePos = <-1.0, 0.2, 1.2>; #declare PrincessPos = < 1.1, 0.2, 1.0>; // Prince (glad pose) #declare Prince = union { #declare LegH = 1.3; #declare TorsoH = 1.6; #declare NeckH = 0.15; #declare HeadR = 0.45; // Legs cylinder { <-0.22, 0, 0>, <-0.22, LegH, 0>, 0.18 texture { T_FabricBlue } } cylinder { < 0.22, 0, 0>, < 0.22, LegH, 0>, 0.18 texture { T_FabricBlue } } // Shoes (resting on floor at y=0 via union translated by PrincePos.y=0.2) sphere { <-0.22, 0.05, 0.05>, 0.22 texture { T_Shoe } } sphere { < 0.22, 0.05, 0.05>, 0.22 texture { T_Shoe } } // Torso cylinder { <0, LegH, 0>, <0, LegH+TorsoH, 0>, 0.48 texture { T_FabricBlue } } // Belt torus { 0.50, 0.06 rotate <90,0,0> translate <0, LegH+0.35, 0> texture { T_Gold } } // Cape box { <-0.65, LegH+0.15, -0.15>, <0.65, LegH+TorsoH+0.2, -0.85> texture { T_FabricPurple } } // Arms (raised) cylinder { <-0.55, LegH+1.15, 0>, <-1.15, LegH+1.55, 0.10>, 0.12 texture { T_Skin } } cylinder { < 0.55, LegH+1.15, 0>, < 1.15, LegH+1.55, 0.10>, 0.12 texture { T_Skin } } sphere { <-1.15, LegH+1.55, 0.10>, 0.15 texture { T_Skin } } sphere { < 1.15, LegH+1.55, 0.10>, 0.15 texture { T_Skin } } // Neck + head cylinder { <0, LegH+TorsoH, 0>, <0, LegH+TorsoH+NeckH, 0>, 0.16 texture { T_Skin } } sphere { <0, LegH+TorsoH+NeckH+HeadR, 0>, HeadR texture { T_Skin } } // Crown difference { cylinder { <0, LegH+TorsoH+NeckH+HeadR+0.20, 0>, <0, LegH+TorsoH+NeckH+HeadR+0.44, 0>, 0.32 } cylinder { <0, LegH+TorsoH+NeckH+HeadR+0.18, 0>, <0, LegH+TorsoH+NeckH+HeadR+0.50, 0>, 0.24 } texture { T_Gold } } cone { <0.00, LegH+TorsoH+NeckH+HeadR+0.44, 0.32>, 0.08, <0.00, LegH+TorsoH+NeckH+HeadR+0.64, 0.32>, 0.01 texture { T_Gold } } cone { <0.28, LegH+TorsoH+NeckH+HeadR+0.44, 0.12>, 0.08, <0.28, LegH+TorsoH+NeckH+HeadR+0.64, 0.12>, 0.01 texture { T_Gold } } cone { <-0.28, LegH+TorsoH+NeckH+HeadR+0.44, 0.12>, 0.08, <-0.28, LegH+TorsoH+NeckH+HeadR+0.64, 0.12>, 0.01 texture { T_Gold } } rotate <0, -8, 0> }; #declare Princess = union { #declare DressH = 2.6; #declare HeadR = 0.45; // Dress skirt cone { <0, 0, 0>, 0.95, <0, DressH, 0>, 0.45 texture { T_FabricPink } } // Bodice cylinder { <0, DressH, 0>, <0, DressH+1.0, 0>, 0.42 texture { T_ClothWhite } } // Arms (raised) cylinder { <-0.38, DressH+0.75, 0>, <-1.05, DressH+1.15, 0.10>, 0.11 texture { T_Skin } } cylinder { < 0.38, DressH+0.75, 0>, < 1.05, DressH+1.15, 0.10>, 0.11 texture { T_Skin } } sphere { <-1.05, DressH+1.15, 0.10>, 0.14 texture { T_Skin } } sphere { < 1.05, DressH+1.15, 0.10>, 0.14 texture { T_Skin } } // Neck + head cylinder { <0, DressH+1.0, 0>, <0, DressH+1.18, 0>, 0.15 texture { T_Skin } } sphere { <0, DressH+1.18+HeadR, 0>, HeadR texture { T_Skin } } // Tiara difference { cylinder { <0, DressH+1.18+HeadR+0.20, 0>, <0, DressH+1.18+HeadR+0.30, 0>, 0.30 } cylinder { <0, DressH+1.18+HeadR+0.18, 0>, <0, DressH+1.18+HeadR+0.34, 0>, 0.24 } texture { T_Gold } } cone { <0.00, DressH+1.18+HeadR+0.30, 0.26>, 0.06, <0.00, DressH+1.18+HeadR+0.46, 0.26>, 0.01 texture { T_Gold } } rotate <0, 10, 0> }; // Place characters object { Prince translate PrincePos } object { Princess translate PrincessPos } // Heart decoration above them union { #declare T_Heart = texture{ pigment{ radial color_map{ [0.0 color rgb <1.00,0.45,0.55>] [1.0 color rgb <0.75,0.18,0.30>] } frequency 1 } finish { diffuse 0.85 specular 0.35 roughness 0.03 reflection 0.03 } } sphere { <-0.18, 5.35, 1.0>, 0.18 texture { T_Heart } } sphere { < 0.18, 5.35, 1.0>, 0.18 texture { T_Heart } } cone { <0, 5.15, 1.0>, 0.28, <0, 4.85, 1.0>, 0.01 texture { T_Heart } } }