|
|
I place this code here, it's from the second image of my first post at
http://news.povray.org/povray.binaries.images/thread/%3Cweb.42a313e0399508494f17dd8d0%40news.povray.org%3E/?ttop=214794
&toff=50
The drops scene uses a ping image that's made with the following code:
//First step: save this as drops2.pov:
// to be rendered in 1024 x 1024 !
// and output file = ping,
// so command line = Output_File_Type=N +w1024 +h1024 and run it.
global_settings {
assumed_gamma 2
hf_gray_16 // high resolution grey scale
}
camera {
orthographic
location <0.0, 0.0, -1.0>
look_at <0.0, 0.0, 0.0>
right 50*x
up 50*y
}
#declare drop =
sphere {
0,
0.4
// a gradient from black to white facing camera
pigment {
marble
color_map {
[0, color rgb 0]
[1, color rgb 1]
}
scale 1
}
finish {ambient 0.7}
scale <0.6, 1.1, 0.6>
rotate 90*y
no_shadow
}
// 100 big drops
#declare a = seed(42);
#declare b = seed(46);
#declare c = seed(15);
#declare i = 0;
#while (i < 100)
object {
drop
translate <rand(a)*50-25, rand(b)*50-25, rand(c)*10+ 40>
}
#declare i = i + 1;
#end
// 10000 small drops
#declare a = seed(42);
#declare b = seed(46);
#declare c = seed(15);
#declare i = 0;
#while (i < 10000)
object {
drop
scale 1/15
translate <rand(a)*50-25, rand(b)*50-25, rand(c)*10+ 40>
}
#declare i = i + 1;
#end
// From the high numbers of drops you can see that the code is far from
// being perfect, but it works. Will render in a few seconds.
//////////////////////////////////////////////////////////////////// End of
file drops2.pov ////////////////////////////////////////////////
/////// you won't see much here when runned
/*
Now for the real scene press new and insert the scene template "checkered
floor"
Insert the following line in the camera statement:
normal { bump_map { png "drops2.png" map_type 0 interpolate 2 bump_size 2}
scale 2 translate -1 }
.... and perhaps translate the sphere 2*z.
Clear the command line and choose your favourite resolution. Renders in a
few seconds.
*/
Post a reply to this message
|
|