POV-Ray : Newsgroups : povray.general : Capriccio : Re: Capriccio Server Time
4 Aug 2024 16:15:01 EDT (-0400)
  Re: Capriccio  
From: Matti Karnaattu
Date: 26 Mar 2003 20:55:05
Message: <web.3e8257439c05b861bef0bd7d0@news.povray.org>
>I think that at this tough times it would be a good
>idea to unite POV-Ray users from different countries
>in one project.

Great idea!

I'm specialized for physically accurate modelling. Materials, lightning,
some mathematics, coding and other stuff. I can made physically accurate
water and other materials in scene.

Here is code for sky sphere and sunlight. I adjust sunlight little cooler
(-> yellow) from 6504K white point.

---

#declare SunLightSize = 5;                // Angle
#declare SunLightShadowMinimumDetail = 0; // 0 - 9
#declare SunLightShadowMaximumDetail = 0; // 0 - 9


// Sky
sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb 0]
      [0.5 rgb 0]
      [0.5 rgb <176, 226, 255> / 255]
      [1.0 rgb < 96, 123, 139> / 255]
    }
    scale <1,2,1>
    translate <0, 1, 0>
  }
}


// Sun
light_source {
  <0, 100000, 0>, rgb <1.14014, 0.97155, 0.86895>

  #if (SunLightShadowMaximumDetail)
    #if (SunLightShadowMaximumDetail = 1)
      #local SunLightArea = tan(radians(SunLightSize / 2)) * pi * 50000;
    #else
      #local SunLightArea = tan(radians(SunLightSize / 2)) * 200000;
    #end

    area_light <SunLightArea, 0, 0> , <0, 0, SunLightArea>,
      SunAreaLightSize, SunAreaLightSize

    adaptive SunLightShadowMinimumDetail - 1

    #if (SunLightShadowMaximumDetail > 1)
      circular
    #end
  #end

  media_attenuation on

  photons {
    refraction on
    reflection on
    area_light
  }
  rotate <20, 0, 0> // Zenith
  rotate <0, 60, 0> // Azimuth
}

---

And here is water. Absorbtion works one unit = 1m -scale. Highlight is
dependant on lightning so it probably need adjustment. This is pure water
so we probably have to add some dirt. We also have to add surface normal or
make isosurface to make ripples. These adjustments is difficult to make
until we have some objects in scene.

---

#declare WaterMaterial = material {
  texture {
    pigment { rgbf 1 quick_color rgb <0, 0.87058, 1> }
    finish {
      ambient 1/8
      diffuse 7/8
      specular 1
      roughness 0.0005
      //reflection 0.18813
      reflection { fresnel }
    }
  }
  interior {
    ior 1.33
    //caustics 1
    dispersion 1.007
    //dispersion_samples 7 * 255

    media {
      method 3
      intervals 1
      samples 1,1
      variance 1 / 255
      absorption rgb <0.11064, 0.01432, 0>
    }
  }
}

---

Matti


Post a reply to this message

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