您还没有登陆到CGPAD.COM   现在登录   注册新用户
搜索 CGPAD.COM
 
 
 
 浏览论坛    搜索论坛    规章制度    帮助  
社区成员: 23570   主题总数: 1374   回复总数: 3307   帖子总数: 4681   论坛跳转:  
Persistence of Vision Raytracer (POV-Ray™)是一个高品质的、完全免费的跨平台三维渲染软件, 它可以生成照片级的图像。它使用一种自定义的场景描述语言来定义三维场景并据此进行渲染,生成的作品可以非常的惊人。

 
 
论坛 三维建模与渲染软件 Pov-Ray (全球著名的免费三维渲染程序,高品质的照片级渲染效果。) 本版斑竹:SPAN
 
   帖子列表  原创作品  共享资源  
 
语言     代码     建模     渲染     动画    
发表新主题
帖子搜索:  
 
带源代码的POV-Ray画廊(国外)
查看:1892  |  回复:1  |  创建:2008-05-17 21:34:05  |  更新:2008-09-17 23:51:40
 
SPAN (张友邦)
注册: 2008-04-24
积分: 12335 分
等级:
尘世如潮人如水 只叹江湖几人回

网址:http://www.c0d3m0nk3y.com/

很有创意的POV-Ray作品,并且附带源码,可以好好学习学习。下图来自该网站的一个POV-Ray源码,不过做了些许改动。

alt

#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
  */





删除
 
编辑
 
标签:源代码  
 
附件:请登陆后查看附件内容!
 
声明:CGPAD文章版权属于作者,受法律保护。没有作者书面许可不得转载。
 
 <<上一页 1 下一页>>   

 注册: 2008-06-14
 积分: 191 分
 等级:
 少壮不努力 老二徒伤悲


  2008-06-18 21:45:07 #1

POV RAY太强大了 虽然不会用= =# 以前在下面这个网站看到过不少用POVRAY出的作品~

http://www.bugman123.com/index.html






 
 <<上一页 1 下一页>>   
 
 
版权所有 © 2005-2008 CGPAD.COM,湘ICP备07500998号,兼容浏览器:IE6IE7FireFoxOperaSafariChrome
Total Requests: 5275834, Total Visits: 3085042, Processing Time: 30ms,