

论坛 三维建模与渲染软件 Pov-Ray (全球著名的免费三维渲染程序,高品质的照片级渲染效果。)
|
本版斑竹:SPAN |
| 帖子列表 | 原创作品 | 共享资源 |
带源代码的POV-Ray画廊(国外)很有创意的POV-Ray作品,并且附带源码,可以好好学习学习。下图来自该网站的一个POV-Ray源码,不过做了些许改动。
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions
#declare FrontCamera=camera {
location<0,5,-15>
look_at<0,0,0>
translate<0,0,-20>
}
#declare TopCamera=camera {
location<0,50,-20>
look_at<0,0,0>
//translate<0,0,-20>
}
#declare SphereCamera=camera {
location<0,0,-30>
look_at<0,0,0>
}
//camera { TopCamera }
//camera { FrontCamera }
//camera { SphereCamera rotate<0,-30,0> }
camera { SphereCamera }
background { color White }
//background { color Black }
light_source { <200,200,-200> color White }
light_source { <-200,200,-200> color White }
//light_source { <200,200,200> color White }
//light_source { <-200,200,200> color White }
//light_source { <0,200,0> color White }
// uses image color index as height, extends along X-Z axes
// from <0 0 0> to <1 1 1>
/*
height_field {
tga "c:\graphics\fractals\bk2.tga"
texture {
pigment {
image_map { tga "c:\graphics\fractals\bk2.tga" map_type 0 interpolate 2 once }
rotate x*90 // lay X-Y image map down onto X-Z height field plane
}
finish {
ambient 1
}
}
translate<-.5,0,-.5>
scale<100,2,100>
}
box { <-2000,-2000,-2000>,<2000,.6,2000> texture { Aluminum } }
*/
#declare R1=seed(1);
#declare BlueSphere=sphere { <0,0,0>,4
texture { Aluminum pigment { color NeonBlue } }
}
#declare PinkSphere=sphere { <0,0,0>,4
texture { Aluminum pigment { color NeonPink } }
}
#declare GreenSphere=sphere { <0,0,0>,4
texture { Aluminum pigment { color Green } }
}
#declare Obj=union {
sphere { <0,0,0>,10 }
//texture { Aluminum }
texture {Glass3}
}
#declare gSphere=union {
difference {
sphere { <0,0,0>,4 }
sphere { <0,0,0>,3.8 }
//texture { Glass3 }
//texture { Polished_Brass }
texture { Aluminum }
}
//light_source { <0,0,0> color NeonBlue }
}
/*
difference {
sphere { <0,0,0>,9.9 }
sphere { <0,0,0>,9.5 }
texture { Glass3 }
}
*/
#declare BlueTorus=torus { 8.5,.1 texture { Aluminum pigment { color NeonBlue } }}
//plane { z,20 texture { Aluminum } }
#declare Width=30;
#declare Depth=4;
object { Obj }
sphere { <0,0,0>,8.5 texture { Aluminum pigment { color NeonBlue } } }
#declare Count2=0; #while (Count2 < 100)
object { BlueSphere scale ((rand(R1)*75)/1000+.05) translate<8.5,0,0> rotate<rand(R1)*180,rand(R1)*360,rand(R1)*360> }
object { PinkSphere scale ((rand(R1)*75)/1000+.05) translate<8.5,0,0> rotate<rand(R1)*180,rand(R1)*360,rand(R1)*360> }
//object { GreenSphere scale ((rand(R1)*75)/1000+.05) translate<rand(R1)*1+8.25,0,0> rotate<rand(R1)*360,rand(R1)*360,rand(R1)*360> }
#declare Count2=Count2+1; #end
#declare Count2=0; #while (Count2 < 10)
object { BlueTorus rotate<rand(R1)*360,rand(R1)*360,rand(R1)*360> }
#declare Count2=Count2+1; #end
#declare Count=0; #while (Count < 50)
union {
object { Obj }
sphere { <0,0,0>,8.5 texture { Aluminum pigment { color NeonBlue } } }
#declare Count2=0; #while (Count2 < 100)
object { BlueSphere scale ((rand(R1)*75)/1000+.05) translate<8.5,0,0> rotate<rand(R1)*180,rand(R1)*360,rand(R1)*360> }
object { PinkSphere scale ((rand(R1)*75)/1000+.05) translate<8.5,0,0> rotate<rand(R1)*180,rand(R1)*360,rand(R1)*360> }
//object { GreenSphere scale ((rand(R1)*75)/1000+.05) translate<rand(R1)*1+8.25,0,0> rotate<rand(R1)*360,rand(R1)*360,rand(R1)*360> }
#declare Count2=Count2+1; #end
#declare Count2=0; #while (Count2 < 10)
object { BlueTorus rotate<rand(R1)*360,rand(R1)*360,rand(R1)*360> }
#declare Count2=Count2+1; #end
scale rand(R1)*25/100+.25
translate<(rand(R1)*Width)-(rand(R1)*Width),(rand(R1)*Width)-(rand(R1)*Width),0>
}
#declare Count=Count+1; #end
#declare Count=0; #while (Count < 20000)
object { gSphere scale ((rand(R1)*75)/1000+.05) translate<(rand(R1)*Width)-(rand(R1)*Width),(rand(R1)*Width)-(rand(R1)*Width),rand(R1)*Depth> }
#declare Count=Count+1; #end
/*
#declare Count=0 #while (Count < 500)
object {
cylinder { <0,-1000,0>,<0,1000,0>,.1 texture { Aluminum } }
rotate<0,0,rand(R1)*360>
translate<(rand(R1)*Width)-(rand(R1)*Width),(rand(R1)*Width)-(rand(R1)*Width),rand(R1)*Depth>
}
#declare Count=Count+1 #end
*/
| <<上一页 1 下一页>> | |||
![]() 注册: 2008-06-14 积分: 191 分 等级: ![]() 少壮不努力 老二徒伤悲 |
2008-06-18 21:45:07 #1
POV RAY太强大了 虽然不会用= =# 以前在下面这个网站看到过不少用POVRAY出的作品~ http://www.bugman123.com/index.html |
||
| <<上一页 1 下一页>> | |||