POV-Ray : Newsgroups : povray.text.scene-files : Land and Water: Differing Highlights Server Time
24 Dec 2024 12:14:36 EST (-0500)
  Land and Water: Differing Highlights (Message 1 to 1 of 1)  
From: Bob Hughes
Subject: Land and Water: Differing Highlights
Date: 31 Jan 2000 18:48:37
Message: <38961f55@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: landwaterhilights.pov
// Vers: MegaPov 0.4
// Desc: Example: division of land and water by differing specular highlights
// Date: 00.08
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene
// Note: you will need an image map of the Earth (or other)
// and adjust the image_pattern indices to correlate with image palette
// I have used a 24bit PNG and it does okay.
// Orient the spheres or camera so that the specular area is at edge of
water/land.

#version unofficial MegaPov 0.4;

camera {location <3,3,-3> angle 33 look_at 0}
light_source {<15,15,-15>,1}

sphere
{0,1 hollow
  pigment
  {
    gradient y
    color_map { [0.0 color rgb <.3,.65,.75>] [1.0 color rgb <.125,.35,.8>] }
  }
  finish {ambient 1}
  scale 10000
}

#declare ET1= // more highlighting (water)
texture {
        pigment {rgbf 1}
        finish {diffuse .3 specular .6 roughness .04 reflection .15}
}
#declare ET2= // less highlighting (land)
texture {
        pigment {rgbf 1}
        finish {diffuse .7 specular .09 roughness .03}
}

// Earth with more specular for water than land.
union {
sphere {0,1 // underlying map (use whatever image you have)
texture {pigment {image_map {png "earth.png" map_type 1}}}
}
sphere {0,1.001 // overlying specularity map (sorry, can't layer)
texture {
    image_pattern { png "earth.png" map_type 1} // use_alpha
      texture_map {
        [.33 ET1] // index number will need adjusting, color dependent
        [.33 ET2] // same index for sharp boundary
}}
} scale 1 rotate 360*clock*y
}

// omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.