[pov-ray]各类不同光源的表达和效果[图片]

news/2024/7/1 20:44:43

I:point lights (点光源,不会突出显示特定对象)

 light_source {  
 <2, 10, -3>
    color White
  }

效果如下图:
图片描述

II:spot lights(聚光灯光源,由于point_at的作用,所以光的方向会有选择性)

聚光灯的作用就是为了给object加上聚焦的作用,让对象看起来更炫,而弱化不被聚光灯照射的背景,spotlights的光源发射的形状为cone形状,这一点对于理解聚光灯的参数很重要。

light_source {
<0, 10, 0>
color White  //白色聚光灯
spotlight
radius 30
falloff 20
tightness 10
point_at <0, 0, 0>
}


light_source {
<10, 10, -1>
color Red   //红色聚光灯
spotlight
radius 12
falloff 14
tightness 10
point_at <2, 0, 0>
}
light_source {
<-12, 10, -1>
color Blue   //蓝色聚光灯
spotlight
radius 12
falloff 14
tightness 10
  point_at <-2, 0, 0>
}

效果如下图:
图片描述

III:聚光灯(spotlight)和ambient搭配起来使用,可以更明显的看到效果,如下图:

注意:如果我们没有对ambient_light进行设置(系统会默认设置为rgb <1,1,1>
舞台上的焦点感,就是通过设置暗的ambient_light和spotlight实现的

global_settings { ambient_light rgb<0, 0.1, 0.1> }
  light_source {
    <2, 10, -3>
    color White
    spotlight
    radius 23
    falloff 18
    tightness 10
    area_light <1, 0, 0>, <0, 0, 1>, 2, 2
    adaptive 1
    jitter
    point_at <.5, 0, 1>
  }

图片描述

IV:两个spotlight的效果

global_settings { ambient_light rgb<0, 0, 0> }
  light_source {
    <2, 10, -3>
    color <1,.0,0>
    spotlight
    radius 20
    falloff 1
    tightness 5
   // area_light <1, 0, 0>, <0, 0, 1>, 2, 2
    adaptive 1
    jitter
    point_at <.5, 0, 5>
  }
  
  light_source {
    <2,30, -2>
    color Gray
    spotlight
    radius 4
     falloff 0
    tightness 10
  //  area_light <1, 0, 0>, <0, 0, 1>, 2, 2
    adaptive 1
    jitter
    point_at <2, 0, -2>
  }

图片描述

V:无影,有影灯效果[如下图]

light_source {
<5,5,0> White
shadowless   // 不会产生影子的灯
}

图片描述

VI:给光源赋予不同的形状和颜色(如现实中的灯泡,给光源加上looks_like选项)

如下图,三个不同颜色的光源

//blue bulb
  #declare BLightbulb = union {
    merge {
      sphere { <0,0,0>,1  pigment { color <0,1,1> filter .9} finish {phong 1} }

      cylinder {
        <0,0,1>, <0,0,0>, 1
        scale <0.35, 0.35, 1.0>
        translate  0.5*z
      }

      texture {
        pigment {color rgb <1, 1, 1>}
        finish {ambient .8 diffuse .6}
      }
    } //end of merge

    cylinder {
      <0,0,1>, <0,0,0>, 1
      scale <0.4, 0.4, 0.5>
      texture { Brass_Texture }
      //pigment {color Gold}
      translate  1.5*z

    }
    rotate -90*x
    scale .5
    scale y*.25
 
  }

//blue light_source
   light_source {
    <2, 2, 0>
    color rgb <0,1,1>
    looks_like { BLightbulb }  //给光源赋予了形状和颜色

    spotlight                  //给光源确定的方向,聚光
    radius 23
    falloff  18
    tightness 10

    point_at <2, 0, 0>
  }

图片描述


http://www.niftyadmin.cn/n/3053405.html

相关文章

struts2 tags之property备忘

<ol> <li>property: <s:property value"testname"/> </li> <li>property 取值为字符串: <s:property value"username"/> </li> <li>property 设定默认值: <s:property value&quo…

网安-web与HTTP基础

web 万维网&#xff1a;http://baike.baidu.com/item/www/109924?fromtitle%E4%B8%87%E7%BB%B4%E7%BD%91&fromid215515&typesyn&sefrenterbtn 网页&#xff1a;http://baike.baidu.com/item/%E7%BD%91%E9%A1%B5 浏览器的发展史&#xff1a;http://article.yeey…

ubuntu下七步配置好SVN服务器

Subversion在Linux下的设置比Windows简单&#xff0c;今天我们一起来看看如何在Ubuntu下安装配置Subversion服务器。 1、首先需要安装Subversion软件&#xff1a; sudo apt-get install subversion 2、创建仓库 svnadmin create /var/svn /var/svn 为所创建仓库的路径&#x…

关闭瑞星金山NOD32360窗口源码

关闭瑞星金山NOD32360窗口源码 真是只是关闭而以。。。。前阵子做迷失下载者&#xff0c;它好像也是这样的&#xff0c;所以就来模拟下他当然迷失还有冻结360&#xff0c;这里只是关闭窗口而以。。。。。杂七杂八的东西&#xff0c;如果大家有兴趣学VC&#xff0c;还是找正规的…

后台+登录界面

1.猫头鹰后台登录&#xff1a;http://www.sucaihuo.com/templates/320.html 示例&#xff1a;http://www.sucaihuo.com/modals/3/320/demo/ 2.通用响应式登录&#xff1a;http://www.sucaihuo.com/templates/244.html 示例&#xff1a;http://www.sucaihuo.com/modals/2/244/de…

安装pytorch+cuda9.0

1.找好pytorch与cuda的对应关系.这个链接可以查对应cuda的安装包 2.找好pytorch与torchvision的对应关系 2.查好自己的GPU与驱动与CUDA和CUDNN的对应关系 3.找好对应CUDA的pytorch安装方法 4.当conda,pip安装较慢时,将安装包下载下来本地安装,对于linux

IT史上所出现的重大病毒

IT史上所出现的重大病毒<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />1、Elk Cloner&#xff08;1982年&#xff09;它被看作***个人计算机的第一款全球病毒&#xff0c;也是所有令人头痛的安全问题先驱者。它通过苹果Apple I…

Android进阶2之Http操作访问网络

操作步骤&#xff1a; <1> 生成请求对象 HttpGet httpGet new HttpGet("请求地址。。。。。"); <2> 生成客户端对象 HttpClient httpClient new DefaultHttpClient(); <3> 执行请求 HttpResponse httpResponse httpClient.execute(httpGet); &l…