Ştiri:

Vă rugăm să citiţi Regulamentul de utilizare a forumului Scientia în secţiunea intitulată "Regulamentul de utilizare a forumului. CITEŞTE-L!".

Main Menu

pov-ray

Creat de florin_try, Aprilie 16, 2010, 04:45:04 AM

« precedentul - următorul »

0 Membri şi 1 Vizitator vizualizează acest subiect.

florin_try


Din joaca postez un script pov-ray de generat planeta ... Pluto. Se poate descarca de la http://www.povray.org/download/ sin instala sub windows/OS/linux.

Pov-ray e un program de ray-tracing, absolut free.


-----


#include "colors.inc"
global_settings {ambient_light Yellow}
light_source{<20,35,-2> color White }         
//light_source{<-20,35,-2> color rgb <1,1,1> }   

background {color White} 
sky_sphere{ pigment { bozo color_map{
[0.0 White*3]
[0.2 Black]
[1.0 Black] }
scale 0.004
}}

camera { location < 0,2,-10> look_at<0,0,0>}

//sphere { <4,0,0> 2 pigment {color rgb <0.2,0.6,0.8>}  }                                                       
sphere { <0,0,0> 2 pigment {bozo
color_map {
[0.00 White]
[0.45 SkyBlue]
[0.55 SkyBlue]   
[0.70 White]
[1.00 White]}
warp { turbulence 0.5}
  } 
 
}
sphere { <6,0,0> 0.2  pigment {color Grey  }
rotate <0,200,27> 
normal { bumps 1.5 scale 0.1 }
  }                 

//plane {y,0 pigment{ color Gold} }           

         
difference{
///cylinder {<0,-0.01,0>,<0,0.01,0>,3.2 pigment {color Green} }   

cylinder {<0,-0.01,0>,<0,0.01,0>,1
pigment {cylindrical  frequency 8
color_map{[0.00 Magenta filter .5]
[0.30 Yellow filter .5]
[0.45 Green filter .5]
[0.60 Cyan filter .5]
[1.00 Blue filter 0.5]
[1.00 Gold filter 0.5]
}
warp {turbulence 0.05 }

scale <4.2, 1, 4.2> } 
cylinder {<0,-0.011,0>,<0,0.011,0>,2.8  }
rotate <0,0,30>
}           

florin_try

si inca un script povray cu care m-am amuzat un pic cu reflexiile in sfere...

Mi-a luat 15 minute la rendering pentru rezolutie 1200x800.

----------

global_settings { assumed_gamma 1.0 }   

global_settings {
  radiosity {
    pretrace_start 0.08
    pretrace_end   0.04
    count 35

    nearest_count 5
    error_bound 1.8
    recursion_limit 3

    low_error_factor .5
    gray_threshold 0.0
    minimum_reuse 0.015
    brightness 1

    adc_bailout 0.01/2

  }
}

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

camera {
  location  <5.0, -12.0, 2.0>
  up z sky z
  look_at   <0.0, 0.0, 0.5>
  angle 40
}

sky_sphere {
  pigment {
    gradient z
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.2 rgb <0.2,0.3,0.9>]
    }
  }
}

light_source {
  <3, 1, 2>*1000
  color rgb <2.2, 1.8, 1.5>
}   

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

plane {
  z, 0
  texture {
    pigment {
      checker
      color rgb 1, color rgb <0.1,0.0,1.8>
    }
  }
}

sphere {
  z*1.4, 1
  texture {
    pigment { color rgb 1 }
    finish{
      diffuse 0.3
      ambient 0.0
      specular 0.6
      reflection 0.8
    }
  }
}
   


#macro Sphere(Pos, Radius)
  sphere {
    <Pos.x, Pos.y, Radius*5.3>, Radius
    texture {
      pigment { color rgb 1 }
      finish{
        diffuse 0.3
        ambient 0.0
        specular 0.6
        reflection 0.8
      }
    }
  }
#end

#local Cnt=0;
#local Seed=seed(0);

#while (Cnt<10000)
  Sphere(
    -100+<rand(Seed), rand(Seed)>*200,
    0.3+pow(rand(Seed),2)*0.7
  ) 
  #local Cnt=Cnt+1;
#end