POV-Ray : Newsgroups : povray.text.scene-files : Need help with these clouds and fog Server Time
24 Dec 2024 11:56:57 EST (-0500)
  Need help with these clouds and fog (Message 1 to 2 of 2)  
From: Skelter
Subject: Need help with these clouds and fog
Date: 27 Dec 1999 15:49:25
Message: <3867d0d5@news.povray.org>
Man, I am having a devil of a time getting fog to work in this scene using
the clouds I stole from Jaime Piqueres.

I thought I had it figured out: the traditional fog and hollow-objects
problem, but nope.

Looking around, I don't see many people posting scene files to these groups,
so I'll post it to the text.scene-files.  Any help would definitely be
appreciated.

-s



// ************************************************
// *** NON-MEDIA CLOUDS (but almost so slow!!!) ***
// ************************************************

// Jaime Vives Piqueres, (?)1999.
// jai### [at] ctaves
// http://members.xoom.com/jaimevives

file://#version 3.1;
file://global_settings{
 file://max_trace_level 64          // keep higher than "num_planes"
file://}

#include "colors.inc"
#include "textures.inc"


// Problem Number : set to 1, to show Jaime's Clouds, but turn off fog
//                  set to 2, to turn on fog, which screws up the clouds,
even though they are hollow
#declare problem_num=3;

global_settings {
  adc_bailout 0.003922
  ambient_light <1.0,1.0,1.0>
  assumed_gamma 1.9
  hf_gray_16 off
  irid_wavelength <0.247059,0.176471,0.137255>
  max_intersections 64
  max_trace_level 64 file://64
  number_of_waves 10
  radiosity {
    brightness       3.3
    count            100
    distance_maximum 0.0
    error_bound      0.4
    gray_threshold   0.5
    low_error_factor 0.8
    minimum_reuse    0.015
    nearest_count    6
    recursion_limit  4
  }
}



#declare IslandWater = material {
  texture {
          pigment {
            rgbft <0.1, 0.3, .2, 0.99, 0.3>
          }
          normal {
            ripples 0.75
            frequency 10
            turbulence 0.1
          }
          finish {
            ambient 0.1
            diffuse 0.1
            reflection 0.3
            specular 0.2
            roughness 0.001
            file://refraction 0.5
          }
  }
  interior { ior 1.33}
}


#if (problem_num<=2)

#local __cloudysky_sky_color=SkyBlue;  // basic sky color
#local __cloudysky_clouds_height=5000; // first layer starts here
#local __cloudysky_clouds_height_floor=4000; // level of trimming of cloud
planes to allow fog
#local __cloudysky_plane_dist=40;      // distance between succesive planes
#local __cloudysky_textu_dist=40;      // distance between textures on
succesive planes
#local __cloudysky_num_planes=40;      // raise it for more "volume"
#local __cloudysky_cnt_planes=1;       // counter

  file://plane {-y, __cloudysky_clouds_height_floor no_shadow finish
{Luminous } pigment { Clear } }
  file://cylinder { <0, 3000, 20000> <0, 10000, 20000> 5000 no_shadow finish
{Luminous } pigment { Clear } hollow }
// place the planes
#while (__cloudysky_cnt_planes<=__cloudysky_num_planes)
file://#render  concat(str(__cloudysky_cnt_planes, 5, 0),"\n")

 // basic pigment for the lower plane
 #local __cloudysky_p=__cloudysky_sky_color*.5+White*.5;

 // two derived pigments to mix on each plane, more "white" each pass
 #local
__cloudysky_p1=__cloudysky_p*(1-(__cloudysky_cnt_planes/__cloudysky_num_plan
es))+White*(__cloudysky_cnt_planes/__cloudysky_num_planes);
 #local
__cloudysky_p2=__cloudysky_p*.9*(1-(__cloudysky_cnt_planes/__cloudysky_num_p
lanes))+White*.9*(__cloudysky_cnt_planes/__cloudysky_num_planes);

         plane{  y,0
         file://box { <-100000,0,-100000> <100000,1,100000>
                 texture{
                           pigment{
                                    granite           // try other
patterns...
                                    octaves 9
                                    lambda 3
                                    turbulence 4
                                    color_map{        // notice that each
plane has more transparency
                                     [0.0 Clear]
                                     [0.5 Clear]      // play with the
"cloud zone" entries
                                     [0.6 __cloudysky_p1 filter
0.7+0.1*(__cloudysky_cnt_planes/__cloudysky_num_planes)]
                                     [1.0 __cloudysky_p2 filter
0.7+0.1*(__cloudysky_cnt_planes/__cloudysky_num_planes)]
                                    }  // end color map
                            scale 1000000     // depends on the patern
                           } // end pigment
                   finish{Luminous}   // prevent shadows
                   translate
(__cloudysky_clouds_height+__cloudysky_textu_dist*__cloudysky_cnt_planes)*y
                  } // end texture
          translate
(__cloudysky_clouds_height+__cloudysky_plane_dist*__cloudysky_cnt_planes)*y
           hollow
         } // end plane // box
         #local __cloudysky_cnt_planes=__cloudysky_cnt_planes+1;
#end


// "container" sky
sky_sphere{
 pigment{__cloudysky_sky_color}
}

#end // end Jaime's clouds







light_source{ <10000,10000,-10000> White  }
light_source{ < 4000, 4000, -4000> White } // below clouds


#if (problem_num>=2)

         fog {
            distance 150
            file://color rgb<0.3, 0.3, 0.5, 1.0>
            color rgbf<0.3, 0.3, 0.5, 1.0>
            file://color rgbf<1, 0, 0, 1.0>
            file://color rgb<1, 0, 0>
            fog_type 2
            fog_offset 10
            fog_alt 10
            turbulence 0.2
            turb_depth 0.3
         }

#end


// This is the sea
union {
        // box {  <-1000, 0, 10000> < 1000, -4, -10>    }
        sphere  { <0, -100000, 0> 100000 }
        sphere { <20, 3, 100> 10       }
        material { IslandWater scale .1  translate < 0, 0, -10>}

}


// this is the sky

#if (problem_num=3)

        plane

          <0, -1, 0>, -20000
          pigment { Bright_Blue_Sky scale 100000}
          finish { ambient 1 }
          no_shadow
        }
        sky_sphere {pigment {Bright_Blue_Sky } }
#end





#declare C_horizoncam = camera {
    location <0.3,100, -4.>
    direction z
    up y
    look_at <-0.1,4.3,500>
}

camera { C_horizoncam }


Post a reply to this message

From: omniVERSE
Subject: Re: Need help with these clouds and fog
Date: 28 Dec 1999 02:39:55
Message: <3868694b@news.povray.org>
Um, what's wrong with it?  The lighter speckles scattered in places amongst
the fog on the sea?
Btw, there's a missing { in the "this is the sky" plane.
Using:

sphere  { <0, -100000, 0> 100000 hollow}

for the sea removes those artifacts, but also seems to remove the rest of
the characteristics.
So whatever made it look like a textured surface before wasn't a true
representation of the 'material' I guess and actually the fog instead.

Bob

"Skelter" <ske### [at] nospamfull-mooncom> wrote in message
news:3867d0d5@news.povray.org...
>
> I thought I had it figured out: the traditional fog and hollow-objects
> problem, but nope.
>


Post a reply to this message

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