zoukankan      html  css  js  c++  java
  • SunFlow场景文件的Cameras代码块摘要

    相机:
    有四种相机类型:针孔(Pinhole )、薄透镜(thinlens)、球面(spherical)、鱼眼(fisheye)。

     所有相机都涉及的主要因素是 eye,target和up的值。Eye 是相机在世界坐标中的位置,target 是世界坐标中相机看的位置,up是相机的旋转角度。

    也可以用变换矩阵代替这三个值,如:

    transform col myMatrixReadByColumn

    transform row myMatrixReadByRow
    相机也可以具备运动模糊效果。

    • 针孔相机 (PinHole)
      这是最常用的相机类型了。
      camera {
      type pinhole
      eye 7.0 -6.0 5.0
      target 6.0 -5.0 4.0
      up -0.30 0.30 0.90
      fov 49.134 /* 视域 */
      aspect 1.333 /* 朝向 */
      }
      有一个参数shift可以在不破坏原有设置的基础下对相机的x,y方向进行微调,如:
      camera {
      type pinhole
      eye 7.0 -6.0 5.0
      target 6.0 -5.0 4.0
      up -0.30 0.30 0.90
      fov 49.134
      aspect 1.333
      shift 0.1 0.2
      }

    • 薄透镜相机(ThinLens) 
      可以产生“景深”效果,略
    • 球面相机(Spherial)
      主要用于产生环境照片,略
    • 鱼眼 (FishEye), 超广角镜头,略
  • 相关阅读:
    fzu 2122
    hdu 4707 bellman
    sicily 10330. Cutting Sausages
    湖南省2016省赛题。1809: Parenthesis 线段树
    Panoramic Photography
    B. No Time for Dragons 贪心
    The Weakest Sith
    E. The Best among Equals
    Gym 101149I I
    AtCoder D
  • 原文地址:https://www.cnblogs.com/xiaotaoliang/p/1389612.html
Copyright © 2011-2022 走看看