// Prince vs Dragon in the Mountains // Single-file POV-Ray SDL (fast iteration) - corrected height_field function #version 3.7; // ---------- Global ---------- //global_settings { // assumed_gamma 1.0 // max_trace_level 8 //} global_settings { assumed_gamma 1.8 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.62, 0.80, 1.0> } // sky // ---------- Camera ---------- camera { location <0, 7.0, -18.0> look_at <0, 3.2, 0> angle 42 } // ---------- Lights ---------- light_source { <30, 40, -25> color rgb <1.0, 0.98, 0.92> } light_source { <-25, 25, -10> color rgb <0.35, 0.4, 0.5> } // ---------- Atmosphere ---------- fog { distance 55 color rgb <0.70, 0.82, 1.0> fog_type 2 fog_offset 0.2 fog_alt 3.0 turbulence 0.6 } // ---------- Textures ---------- // Everything below is procedural (no external image maps), but with a bit more material detail // (micro-bumps, roughness variation, and slightly more believable metals/fabric). #declare T_Ground = texture { pigment { crackle turbulence 0.55 color_map { [0.00 color rgb <0.12,0.11,0.10>] // cracks / darkest soil [0.10 color rgb <0.22,0.20,0.18>] [0.45 color rgb <0.34,0.31,0.28>] [0.70 color rgb <0.18,0.28,0.18>] // mossy tint [1.00 color rgb <0.32,0.34,0.24>] } scale 0.9 } normal { bumps 0.55 scale 0.18 turbulence 0.7 } finish { diffuse 0.95 specular 0.06 roughness 0.12 } }; #declare T_Rock = texture { pigment { granite color_map { [0.00 color rgb <0.20,0.20,0.22>] [0.45 color rgb <0.33,0.33,0.36>] [0.75 color rgb <0.46,0.46,0.49>] [1.00 color rgb <0.62,0.62,0.65>] } scale 0.55 } normal { granite 0.85 scale 0.25 turbulence 0.5 } finish { diffuse 0.93 specular 0.10 roughness 0.10 reflection 0.03 } }; #declare T_Snow = texture { pigment { color rgb <0.94,0.96,1.00> } normal { bumps 0.25 scale 0.07 turbulence 0.45 } finish { diffuse 0.95 specular 0.20 roughness 0.035 reflection 0.04 } }; #declare T_Skin = texture { pigment { bozo color_map { [0.00 color rgb <0.90,0.76,0.65>] [0.60 color rgb <0.94,0.80,0.68>] [1.00 color rgb <0.88,0.73,0.62>] } scale 0.22 } normal { bumps 0.12 scale 0.03 turbulence 0.3 } finish { diffuse 0.85 specular 0.18 roughness 0.10 } }; #declare T_ClothBlue = texture { pigment { color rgb <0.12,0.18,0.55> } normal { wrinkles 0.70 scale 0.08 turbulence 0.2 } finish { diffuse 0.95 specular 0.06 roughness 0.22 } }; #declare T_RedCape = texture { pigment { color rgb <0.55,0.10,0.12> } normal { wrinkles 0.80 scale 0.10 turbulence 0.25 } finish { diffuse 0.92 specular 0.08 roughness 0.18 } }; #declare T_Gold = texture { pigment { color rgb <0.95,0.78,0.22> } normal { bumps 0.10 scale 0.02 turbulence 0.15 } finish { diffuse 0.15 specular 0.95 roughness 0.008 metallic reflection { 0.20 0.48 fresnel on } conserve_energy } }; #declare T_Steel = texture { pigment { color rgb <0.70,0.74,0.80> } normal { ripples 0.12 scale 0.045 turbulence 0.15 } finish { diffuse 0.10 specular 0.98 roughness 0.006 metallic reflection { 0.18 0.42 fresnel on } conserve_energy } }; #declare T_Dragon = texture { pigment { bozo turbulence 0.35 color_map { [0.00 color rgb <0.07,0.22,0.11>] [0.55 color rgb <0.14,0.38,0.20>] [1.00 color rgb <0.26,0.54,0.28>] } scale 0.55 } normal { crackle 0.55 // scale-ish breakup scale 0.14 turbulence 0.35 } finish { diffuse 0.85 specular 0.28 roughness 0.055 reflection 0.05 } }; #declare T_WingMembrane = texture { pigment { marble turbulence 0.9 color_map { [0.00 color rgbt <0.14,0.40,0.20,0.55>] [0.55 color rgbt <0.18,0.55,0.28,0.50>] [1.00 color rgbt <0.22,0.62,0.32,0.55>] } scale 0.35 } normal { wrinkles 0.35 scale 0.20 turbulence 0.25 } finish { diffuse 0.80 specular 0.12 roughness 0.14 } }; // ---------- Ground ---------- plane { y, 0 texture { T_Ground } } // A slightly raised rocky mound so the fight has a "stage" //difference { // sphere { <0,0.8,0>, 4.2 } // plane { y, 0 } // texture { T_Rock } // translate <0,0,0> //} // ---------- Mountains (simple heightfields) ---------- // NOTE: Replaced f_ridged_mf() (parameter mismatch) with a built-in bozo-based function. // This keeps it self-contained and fast, with no external include dependencies. #declare HF_Mount = height_field { function 250, 250 { pigment { bozo turbulence 0.85 octaves 5 omega 0.55 lambda 2.0 scale 0.55 } } smooth translate <-0.5, 0, -0.5> scale <18, 7.5, 18> texture { pigment { gradient y turbulence 0.35 octaves 4 omega 0.55 lambda 2.0 color_map { [0.00 color rgb <0.26,0.25,0.26>] [0.45 color rgb <0.40,0.40,0.43>] [0.70 color rgb <0.62,0.62,0.66>] [0.85 color rgb <0.92,0.94,0.98>] [1.00 color rgb <0.92,0.94,0.98>] } } normal { granite 0.70 scale 0.40 turbulence 0.35 } finish { diffuse 0.95 specular 0.10 roughness 0.10 reflection 0.02 } } }; object { HF_Mount translate <-18, 0, 22> rotate <0, 25, 0> } object { HF_Mount translate < 16, 0, 26> rotate <0,-20, 0> } object { HF_Mount translate < 0, 0, 34> rotate <0, 0, 0> scale <1.2,1.1,1.2> } // ---------- Prince (stylized) ---------- #declare Prince = union { // Torso cylinder { <0,1.2,0>, <0,2.7,0>, 0.55 texture { T_ClothBlue } } // Belt torus { 0.56, 0.08 rotate <90,0,0> translate <0,1.55,0> texture { T_Gold } } // Head + neck cylinder { <0,2.7,0>, <0,2.95,0>, 0.22 texture { T_Skin } } sphere { <0,3.35,0>, 0.48 texture { T_Skin } } // Crown union { torus { 0.36, 0.05 rotate <90,0,0> translate <0,3.70,0> } cone { <0,3.70,0.36>, 0.06, <0,3.92,0.36>, 0.0 } cone { <0.31,3.70,0.18>, 0.06, <0.31,3.92,0.18>, 0.0 } cone { <-0.31,3.70,0.18>, 0.06, <-0.31,3.92,0.18>, 0.0 } cone { <0.31,3.70,-0.18>, 0.06, <0.31,3.92,-0.18>, 0.0 } cone { <-0.31,3.70,-0.18>, 0.06, <-0.31,3.92,-0.18>, 0.0 } texture { T_Gold } } // Legs cylinder { <-0.20,0.0,0>, <-0.20,1.2,0>, 0.18 texture { T_ClothBlue } } cylinder { < 0.20,0.0,0>, < 0.20,1.2,0>, 0.18 texture { T_ClothBlue } } // Boots cone { <-0.20,0.0,0.05>, 0.20, <-0.20,0.0,-0.35>, 0.10 texture { T_Rock } } cone { < 0.20,0.0,0.05>, 0.20, < 0.20,0.0,-0.35>, 0.10 texture { T_Rock } } // Arms (posed forward toward dragon) // Left arm (holding shield-ish forearm forward) cylinder { <-0.58,2.45,0>, <-1.25,2.10,0.30>, 0.14 texture { T_ClothBlue } } cylinder { <-1.25,2.10,0.30>, <-1.55,1.85,0.55>, 0.12 texture { T_Skin } } // Right arm (sword arm) cylinder { <0.58,2.45,0>, <1.30,2.20,0.15>, 0.14 texture { T_ClothBlue } } cylinder { <1.30,2.20,0.15>, <1.70,2.00,0.45>, 0.12 texture { T_Skin } } // Cape (simple sheet-like box) box { <-0.70,1.30,-0.15>, <0.70,3.00,-0.95> texture { T_RedCape } rotate <8,0,0> translate <0,0.0,-0.05> } // Sword (in right hand) union { cylinder { <1.70,2.00,0.45>, <2.55,2.55,0.95>, 0.05 texture { T_Steel } } // blade cone { <2.55,2.55,0.95>, 0.05, <2.95,2.80,1.15>, 0.00 texture { T_Steel } } torus { 0.12, 0.03 rotate <0,90,0> translate <1.66,2.02,0.43> texture { T_Gold } } // guard cylinder { <1.58,1.95,0.39>, <1.70,2.00,0.45>, 0.035 texture { T_Gold } } // grip } // Small shield (on left forearm) union { sphere { <-1.55,1.85,0.55>, 0.28 } box { <-1.83,1.57,0.42>, <-1.27,2.13,0.70> } texture { T_Steel } } }; object { Prince translate <-4.2, 0.0, 0.3> rotate <0, 22, 0> } // ---------- Dragon (stylized) ---------- #declare Dragon = union { // Body sphere { <0,2.0,0>, 1.35 texture { T_Dragon } } sphere { <1.4,2.1,0.2>, 1.10 texture { T_Dragon } } // chest/shoulder mass // Neck + head cylinder { <2.3,2.35,0.30>, <3.2,2.60,0.55>, 0.42 texture { T_Dragon } } sphere { <3.55,2.70,0.65>, 0.55 texture { T_Dragon } } // Snout cone { <3.55,2.70,0.65>, 0.42, <4.25,2.78,0.78>, 0.10 texture { T_Dragon } } // Horns cone { <3.45,3.10,0.55>, 0.10, <3.75,3.45,0.35>, 0.00 texture { T_Rock } } cone { <3.55,3.10,0.85>, 0.10, <3.85,3.45,1.05>, 0.00 texture { T_Rock } } // Tail (segmented for speed) cylinder { <-1.10,1.85,-0.10>, <-2.30,1.55,-0.45>, 0.33 texture { T_Dragon } } cylinder { <-2.30,1.55,-0.45>, <-3.35,1.25,-0.95>, 0.24 texture { T_Dragon } } cylinder { <-3.35,1.25,-0.95>, <-4.10,1.05,-1.35>, 0.16 texture { T_Dragon } } // Legs (4) // Front right (near camera) cylinder { <1.85,1.55,0.85>, <1.55,0.75,1.05>, 0.22 texture { T_Dragon } } cylinder { <1.55,0.75,1.05>, <1.55,0.10,1.10>, 0.18 texture { T_Dragon } } // Front left cylinder { <1.90,1.55,-0.40>, <1.65,0.80,-0.60>, 0.22 texture { T_Dragon } } cylinder { <1.65,0.80,-0.60>, <1.65,0.10,-0.70>, 0.18 texture { T_Dragon } } // Back right cylinder { <-0.55,1.35,0.85>, <-0.85,0.70,1.00>, 0.24 texture { T_Dragon } } cylinder { <-0.85,0.70,1.00>, <-0.95,0.10,1.05>, 0.18 texture { T_Dragon } } // Back left cylinder { <-0.60,1.35,-0.55>, <-0.95,0.70,-0.70>, 0.24 texture { T_Dragon } } cylinder { <-0.95,0.70,-0.70>, <-1.05,0.10,-0.80>, 0.18 texture { T_Dragon } } // Wings (simple: bone cylinders + membrane triangles) // Left wing union { cylinder { <1.20,2.70,-0.10>, <2.60,3.65,-2.10>, 0.12 texture { T_Dragon } } // main bone cylinder { <2.60,3.65,-2.10>, <3.80,3.15,-3.40>, 0.09 texture { T_Dragon } } // tip triangle { <1.20,2.70,-0.10>, <2.60,3.65,-2.10>, <3.80,3.15,-3.40> texture { T_WingMembrane } } triangle { <1.20,2.70,-0.10>, <2.10,2.55,-2.35>, <3.80,3.15,-3.40> texture { T_WingMembrane } } } // Right wing union { cylinder { <1.10,2.65,0.55>, <2.40,3.50,2.45>, 0.12 texture { T_Dragon } } cylinder { <2.40,3.50,2.45>, <3.55,3.00,3.55>, 0.09 texture { T_Dragon } } triangle { <1.10,2.65,0.55>, <2.40,3.50,2.45>, <3.55,3.00,3.55> texture { T_WingMembrane } } triangle { <1.10,2.65,0.55>, <2.00,2.45,2.70>, <3.55,3.00,3.55> texture { T_WingMembrane } } } // Fire breath (simple cone, translucent) cone { <4.30,2.80,0.80>, 0.12, <5.70,2.40,0.65>, 1.00 texture { pigment { color rgbt <1.0,0.55,0.10,0.70> } finish { emission 0.7 diffuse 0.1 } } } }; object { Dragon translate <-4.0, 0, 0.0> rotate <0, -180, 0> } // ---------- Contact shadows helper (small dark patch under characters) ---------- #declare ShadowPatch = texture { pigment { color rgbt <0.0,0.0,0.0,0.75> } finish { diffuse 0 } }; disc { <-4.2,0.01,0.3>, y, 1.6, 0.0 texture { ShadowPatch } } disc { < 4.0,0.01,1.0>, y, 2.4, 0.0 texture { ShadowPatch } }