POV-Ray : Newsgroups : povray.binaries.images : snow subsurface file : snow subsurface file Server Time
6 Nov 2024 22:13:03 EST (-0500)
  snow subsurface file  
From: And
Date: 1 Dec 2017 00:10:01
Message: <web.5a20e35f56f808c27e12b7e70@news.povray.org>
I slightly revised my file, then post here. In fact I'm not sure its scale is
right or not. I haven't seen snow in real life. It's a box with 3.2 meter side
lengths.


#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
}
    subsurface{
        samples 10, 10
        radiosity off
    }
}

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>*0.80
parallel
point_at <0.0, 0.0, 0.0>
rotate <0,0,-56>
}





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


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












//My render is z toward sky, xy horizon


camera{
location <8,4,4>
look_at <0, 0, 0>
right <-4/3,0,0>
sky <0,0,1>
angle 24
}
//----------------------------------------


#declare material_snow =
material{
    texture{
        pigment{
        rgb<0.93,0.93,0.93>
        }
        finish{
            diffuse 1.0
            subsurface{translucency rgb<1,1,1>*6}
        }
    }
}


//----------------ground------------------------







#declare t_soil1=
texture{
    pigment{rgb<0.2,0.164,0.1>*0.9}
    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.20*sum(i, 0, 3, pow(abs(f_noise3d(x*pow(2, i)/0.3, y*pow(2, i)/0.3,
z*pow(2, i)/0.3)), 2.5)/pow(2.0, i) )


}

isosurface {
    function {0.5 - f_test(x,y,z)*3.5*3.5*z*exp(-3.5*z) -
0.32*3.5*3.5*z*exp(-3.5*z)}
    contained_by { box { <-1.0, -1.0, 0.0>, <1.0, 1.0, 1.0> } }
threshold 0.0
accuracy 0.001
max_gradient 2
//all_intersections
//open

    material{
    material_snow
    }


    scale <1.6, 1.6, 0.8>
    translate<0,0,0>

}






#declare t_soil2=
texture{
    pigment{
        function{0.5 + 0.2* (0.5 - f_test(x,y,z)*3.5*3.5*z*exp(-3.5*z) -
0.32*3.5*3.5*z*exp(-3.5*z))}
        color_map{
            [0.0 rgb<0.2,0.164,0.1>*0.03]
            [0.504 rgb<0.2,0.164,0.1>*0.03]
            [0.533 rgb<0.2,0.164,0.1>*0.9]
            [1.0 rgb<0.2,0.164,0.1>*0.9]


        }
        scale <1.6, 1.6, 0.8>
    }
    finish{ambient 0 diffuse 1}
}

box{
<-1.601, -1.601, 0.0>, <1.601, 1.601, 0.20>
texture{t_soil2}


}


Post a reply to this message


Attachments:
Download 'snow.png' (303 KB)

Preview of image 'snow.png'
snow.png


 

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