这里给出一个场景:

Integrator "path" "integer maxdepth" [ 65 ]
Transform [ 0.721367 -0.373123 -0.583445 -0 -0 0.842456 -0.538765 -0 -0.692553 -0.388647 -0.60772 -0 0.0258668 -0.29189 5.43024 1]
Sampler "sobol" "integer pixelsamples" [ 64 ]
PixelFilter "triangle" "float xwidth" [ 1.000000 ] "float ywidth" [ 1.000000 ]
Film "image" "integer xresolution" [ 1280 ] "integer yresolution" [ 720 ] "string filename" [ "material-testball.png" ]
Camera "perspective" "float fov" [ 20.114292 ]
WorldBeginTexture "Texture01" "spectrum" "checkerboard" "float uscale" [ 20.000000 ] "float vscale" [ 20.000000 ] "rgb tex1" [ 0.325000 0.310000 0.250000 ] "rgb tex2" [ 0.725000 0.710000 0.680000 ] MakeNamedMaterial "RoughMetal" "string type" [ "metal" ] "rgb eta" [ 0.200438 0.924033 1.102212 ] "rgb k" [ 3.912949 2.452848 2.142188 ] "bool remaproughness" [ "false" ] "float uroughness" [ 0.100000 ] "float vroughness" [ 0.100000 ] MakeNamedMaterial "Material" "string type" [ "substrate" ] "rgb Ks" [ 0.067215 0.067215 0.067215 ] "rgb Kd" [ 0.243117 0.059106 0.000849 ] "bool remaproughness" [ "false" ] "float uroughness" [ 0.001000 ] "float vroughness" [ 0.001000 ] MakeNamedMaterial "Stand" "string type" [ "matte" ] "rgb Kd" [ 0.200000 0.200000 0.200000 ] MakeNamedMaterial "Floor" "string type" [ "matte" ] "texture Kd" [ "Texture01" ] TransformBeginTransform [ -0.386527 0 0.922278 0 -0.922278 0 -0.386527 0 0 1 0 0 0 0 0 1]LightSource "infinite" "string mapname" [ "textures/envmap.pfm" ] TransformEndNamedMaterial "Floor" Shape "trianglemesh" "integer indices" [ 0 1 2 0 2 3 ] "point P" [ -0.785994 0 3.11108 -4.55196 -4.75246e-007 -0.80933 -0.63155 0 -4.57529 3.13441 4.75246e-007 -0.654886 ] "normal N" [ 1.2361e-007 -1 2.4837e-009 1.2361e-007 -1 2.4837e-009 1.2361e-007 -1 2.4837e-009 1.2361e-007 -1 2.4837e-009 ] "float uv" [ 0 0 1 0 1 1 0 1 ] NamedMaterial "Material" TransformBeginTransform [ 0.482906 0 0 0 0 0.482906 0 0 0 0 0.482906 0 0.0571719 0.213656 0.0682078 1]Shape "plymesh" "string filename" [ "models/Mesh001.ply" ] TransformEndTransformBeginTransform [ 0.482906 0 0 0 0 0.482906 0 0 0 0 0.482906 0 0.156382 0.777229 0.161698 1]Shape "plymesh" "string filename" [ "models/Mesh002.ply" ] TransformEndNamedMaterial "Stand" TransformBeginTransform [ 0.482906 0 0 0 0 0.482906 0 0 0 0 0.482906 0 0.110507 0.494301 0.126194 1]Shape "plymesh" "string filename" [ "models/Mesh000.ply" ] TransformEnd
WorldEnd

Integrator "path" "integer maxdepth" [ 65 ]  表示使用路径追踪积分器,递归最大深度为65(就是光线最多反弹65次)。其实设置成2次结果也差不多:

 毕竟这个场景里也就这一个物体外加一个地板,基本上反射一次就够了。

在path.cpp里表示为:

        bool foundIntersection = scene.Intersect(ray, &isect);// Possibly add emitted light at intersectionif (bounces == 0 || specularBounce) {// Add emitted light at path vertex or from the environmentif (foundIntersection) {L += beta * isect.Le(-ray.d);VLOG(2) << "Added Le -> L = " << L;} else {for (const auto &light : scene.infiniteLights)L += beta * light->Le(ray);VLOG(2) << "Added infinite area lights -> L = " << L;}}

即当第0次反弹,或者是镜面反射的时候,直接计算光照。

Transform :场景内世界坐标系下的物体怎么变换到相机坐标系下。

Sampler "sobol" "integer pixelsamples" [ 64 ] 使用sobol方法来产生随机数,每个像素采样64次。下图是采样64次的结果:

如果设置只采样一次:

PixelFilter "triangle" "float xwidth" [ 1.000000 ] "float ywidth" [ 1.000000 ]  对每个像素使用三角滤波器,还可以选box滤波器等。

Film "image" "integer xresolution" [ 1280 ] "integer yresolution" [ 720 ] "string filename" [ "material-testball.png" ] 设置渲染图像分辨率和渲染结果图像的名字。

Camera :相机参数 "perspective"表透视投影。  fov:

图来自learnOpenGL

光源。注意下面的变换矩阵是一个旋转矩阵。

 TransformBeginTransform [ -0.386527 0 0.922278 0 -0.922278 0 -0.386527 0 0 1 0 0 0 0 0 1]LightSource "infinite" "string mapname" [ "textures/envmap.pfm" ] TransformEnd

PBRT的scene.pbrt使用方法相关推荐

  1. Unity中Combined Mesh (root: scene)的解决方法

    解决方法:去掉Static标记.

  2. Q109:用PBRT渲染Blender导出的模型

    前续:Q106:Linux系统下安装编译PBRT-V3 这篇文章的内容主要分两部分:1,用Blender建立模型:2,用PBRT渲染 一.用Blender建立模型 咱在这里要建立的模型是"马 ...

  3. Q109:用PBRT渲染Blender导出的模型(3)

    前续: Q109:用PBRT渲染Blender导出的模型 Q109:用PBRT渲染Blender导出的模型(2) 这里只是小编自己练习用Blender建模的笔记. 参考:Sebastian Lague ...

  4. Q109:用PBRT渲染Blender导出的模型 (2)

    前续:Q109:用PBRT渲染Blender导出的模型 这里只是小编自己练习用Blender建模的笔记. 还是参考:台湾大神的blender教程全集 对应内容是其中"小狗玩具模型" ...

  5. Windows下编译安装PBRT V1.05

    由于要用到网上的一个插件.虽然现在PBRT已经出了V2版本.仍然需要编译下PBRTV1版本.V1的各个版本功能相似,只是不断的修正BUGS的过程.因此选择了V1的最后一个版本PBRTV 1.05. 1 ...

  6. PBRT 学习:安装编译

    文章转自:http://wutiam.net/notes/116 版权归原作者. 虽然,该文章对应的windows系统,但是对了解pbrt的编译非常有帮助.原文如下. 去年在前公司看着 leader ...

  7. iOS 13 Xcode11 中的 Scene Delegate

    如果将Xcode更新到11, 创建项目.默认会创建SceneDelegate.swift, 那么问题来了, 这个代理用来干嘛的了? 在这篇文章中,我们将探索iOS13和Xcode11的改变.我们着重介 ...

  8. ruby .each_Ruby中带有示例的Array.each方法

    ruby .each Ruby Array.each方法 (Ruby Array.each method) Array.each method can be easily termed as a me ...

  9. Transition 调用方法分析

    Transition 调用方法分析 TransitionManager.transitionTo(Scene) /*** Change to the given scene, using the* a ...

  10. 几个摄像头和雷达融合的目标检测方法

    来源 | 知乎专栏(黄浴) 编辑 | 焉知智能汽车 关于传感器融合,特别是摄像头.激光雷达和雷达的前融合和和特征融合,是一个引人注意的方向. 1 "YOdar: Uncertainty-ba ...

最新文章

  1. 网络干货,无论是运维还是开发都要知道的网络知识系列之(五)
  2. 好文章,被架构师秒杀之后
  3. 什么是序列化? 您需要通过示例解释的有关Java序列化的所有知识
  4. PHP+Ajax手机移动端发红包实例
  5. java 邮件跟踪_如何跟踪邮件已读状态(Java)
  6. 【Java】自编时间相关常用函数
  7. 如何将html转为report,如何使用XtraReport将报表导出为HTML
  8. android弹窗闪退,[Android 小记] PopupWindow中放置Spinner 点击直接闪退的问题分析
  9. HM发卡系统 十分好看的ui
  10. c# 删除文件,清理删除文件
  11. 手持“六脉神剑”、横跨软硬领域,揭晓英特尔构筑智慧云基石宝典!
  12. 3.windows图形界面
  13. 基于thinkphp的出租屋管理系统
  14. 局域网中抓到NBNS数据包
  15. OA办公系统审批流程是什么?
  16. 多元素过渡理解和一点透
  17. 蚂蚁金服bPaaS究竟是什么?
  18. 计算机组装原则与注意事项,计算机安装流程和注意事项
  19. java 延时队列_Java实现简单延迟队列和分布式延迟队列
  20. 1+1≠2 |A/B 测试中的赢者诅咒

热门文章

  1. Ubuntu安装Windows字体
  2. 挑战云主机战:学习使用云端服器象棋云库
  3. K8S Java客户端的帮助文档
  4. 算法笔记练习 题解合集
  5. 2022新华三十大技术趋势白皮书
  6. SuperMap BIM+GIS技术白皮书
  7. 基于网易云API做的一个扫码登录
  8. tomcat原理详解和请求过程(涉及网卡、套接字等)
  9. ICCV 2021可逆的跨空间映射实现多样化的图像风格传输:Diverse Image Style Transfer via Invertible Cross-Space Mapping
  10. matlab常用代码及操作