POV-Ray : Newsgroups : povray.binaries.images : Cloud City II : Re: Cloud City II Server Time
21 May 2024 12:08:50 EDT (-0400)
  Re: Cloud City II  
From: And
Date: 30 Nov 2017 12:20:05
Message: <web.5a203d442231f8bad1252d9f0@news.povray.org>
"And" <49341109@ntnu.edu.tw> wrote:
> Media is easy to get not bad result, but still have some limit.
> This time I used the correct scattering color of cloud, and added some emission
> to simulate multiple scattering effect(emission strength should proportion to
> the sun power) , emission color I just guess.
>
> For this cloud size this simulation is not bad.

#version 3.7;



global_settings{
max_trace_level 3
assumed_gamma 1.0
adc_bailout 0.007
mm_per_unit 1000 //important for subsurface

radiosity{
 pretrace_start 64/image_width
 pretrace_end   4/image_width
 count 60
 nearest_count 6
 error_bound 0.64
 recursion_limit 8
 low_error_factor 0.5
 gray_threshold 0.0
 brightness 1
 media on
}

}

default{
texture{
    pigment {rgb<0.2,0.2,0.2>}
    finish{ambient 0 diffuse 0}
}
}
//---------------------background------------------------
background{rgb <0,0,0>}

//-------------------settings--------------------------------
//--------------------light source-----------------------------




light_source {
<-4, -2.5, 4>*100
color rgb <1.0, 0.88, 0.76>*1.75
parallel
point_at <0.0, 0.0, 0.0>
rotate <0,0,106>
}




sky_sphere{
    pigment {rgb <0.35,0.55,1>*0.6}
}


//------------------------------------------












//My render is z toward sky, xy horizon


camera{
location <0,0,24>+<4, 2.5, -4>*2+<1,0,0>
look_at <0, 0, 10>
right <-4/3,0,0>
sky <0,0,1>
angle 48
}
//----------------------------------------


//----------------ground------------------------
#declare t_soil1=
texture{
    pigment{rgb<0.2,0.164,0.1>*0.8}
    finish{ambient 0 diffuse 1}
}


plane{
<0,0,1>,0
texture{t_soil1}
}









//--------------------cloud----------------------

#include "functions.inc"

#declare f_test =
function(x,y,z) {
0.36*sum(i, 0, 4, pow(abs(f_noise3d(x*pow(2, i)/0.4, y*pow(2, i)/0.4, z*pow(2,
i)/0.4)), 2.5)/pow(2.0, i) )
}



#declare f_cloud_base =
function(x,y,z) {
0.5 - f_test(x,y,z)*3*3*z*exp(-3*z) - 0.32*3*3*z*exp(-3*z)
}


#declare dens_cloud =
density{
    function{0.5 - 0.2*f_cloud_base(x,y,z)}
    color_map{
        [0   rgb 0]
        [0.5 rgb 0]
        [0.6 rgb 1]
        [1   rgb 1]
    }
}






box{
<-2.0, -2.0, 0.0>, <2.0, 2.0, 1.0>
hollow

    material{
        texture{
            pigment{rgbt<0,0,0,1>}
            finish{ambient 0 diffuse 0}
        }
        interior {


            media{
                samples 16
                emission rgb<3.73, 2.92*0.75, 2.78*0.65 >*4.0

                scattering{
                3, rgb< 3.73, 2.92, 2.78 >*8.0
                extinction 0.8
                }
                density {
                dens_cloud
                }
            }
        }
    }
scale <1.6, 1.6, 1.3>
translate <0,0,10>

}















cylinder{
<0,0,-0.01>, <0,0,1.01>, 0.4

    texture{
        pigment{rgb<1,0,0>}
        finish{ambient 0 diffuse 1}
    }
translate <0,0,10>

}


Post a reply to this message

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