惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
T
Threatpost
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
S
Secure Thoughts
MyScale Blog
MyScale Blog
O
OpenAI News
P
Palo Alto Networks Blog
美团技术团队
C
Cyber Attacks, Cyber Crime and Cyber Security
TaoSecurity Blog
TaoSecurity Blog
量子位
L
Lohrmann on Cybersecurity
G
GRAHAM CLULEY
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Know Your Adversary
Know Your Adversary
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
宝玉的分享
宝玉的分享
PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
I
InfoQ
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
S
Security @ Cisco Blogs
S
Schneier on Security
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Cloudflare Blog
AWS News Blog
AWS News Blog
IT之家
IT之家
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
H
Heimdal Security Blog
I
Intezer
A
Arctic Wolf
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
W
WeLiveSecurity

博客园 - 涛仔28

Unreal Engine Plugin management HYPE若干经验 转 ifstream 读取中文路径 总结SQLExpress2008安装 如何使用子程序参数--摘自代码大全2 WinDBG咒语 SunFlow渲染流程的设计 SunFlow场景文件的Instances代码块摘要 SunFlow场景文件的GI代码块摘要 SunFlow场景文件的Cameras代码块摘要 SunFlow场景文件的Object代码块 SunFlow场景文件的Modifiers代码块 - 涛仔28 - 博客园 SunFlow场景文件的Light代码块 SunFlow场景文件的Image代码块 SunFlow场景文件的代码顺序 关于Ext3.0释出 函数的连续性 关于JSON的大文本处理 脚本的杂乱思路
SunFlow场景文件的Shader代码块 - 涛仔28 - 博客园
涛仔28 · 2009-02-12 · via 博客园 - 涛仔28
  • 颜色空间:
    有六种,常用的是  sRGB nonlinear
  • 阴影:所有阴影都可以使用 texture
    1. Constant Shader
      定量阴影,物体本身不会产生阴影效果,只有投下的阴影效果,如:
      shader {
      name sfcon.shader  /* 阴影的名字 */
      type constant /* 定量阴影类型 */
      color { "sRGB nonlinear" 0.800 0.800 0.800 } /* 颜色空间,通过把数值加大到1.0以上,可以打开"Path Tracing"效果 */
      }
    2. Diffuse Shader
      漫反射阴影,物体本身会产生阴影,但无高光,如:
      shader {
      name sfdif.shader
      type diffuse
      diff { "sRGB nonlinear" 0.800 0.800 0.800 }
      }
    3. Textured Diffuse Shader
      使用了Texture的漫反射阴影类型,如:
      shader {
      name sfdif.shader
      type diffuse
      texture "C:"mypath"image.png"
      }
    4. Phong Shader
      最为逼真的阴影类型,如:
      shader {
      name sfpho.shader
      type phong
      diff { "sRGB nonlinear" 0.800 0.800 0.800 } /* 漫反射部分的色值 */
      spec { "sRGB nonlinear" 1.0 1.0 1.0 } 50 /* 高光的色值及强度 */
      samples 4
      }
    5. Textured Phong Shader
      使用了纹理的Phong Shader,如:
      shader {
      name sfpho.shader
      type phong
      texture "C:"mypath"image.png"
      spec { "sRGB nonlinear" 1.0 1.0 1.0 } 50
      samples 4
      }
    6. Shiny Shader
      发光体阴影,如日光灯之类的物体:
      shader {
      name sfshi.shader
      type shiny
      diff { "sRGB nonlinear" 0.800 0.800 0.800 }
      refl 0.5 /* 不知道这个是什么 */
      }
    7. Textured Shiny Shader
      使用了纹理的发光体阴影,如:
      shader {
      name sfshi.shader
      type shiny
      texture "C:"mypath"image.png"
      refl 0.5
      }
    8. Glass Shader
      玻璃类型阴影,如:
      shader {
      name sfgla.shader
      type glass
      eta 1.0 /* 折射率 */
      color { "sRGB nonlinear" 0.800 0.800 0.800 } /* 色值 */
      absorbtion.distance 5.0 /* 吸收率,数值越小吸收越多 */
      absorbtion.color { "sRGB nonlinear" 1.0 1.0 1.0 }
      }
      跟踪深度 (Trace Dept),似乎与透明度有关,如下的场景全局设置:
      trace-depths {
      diff 1
      refl 4
      refr 4
      }
      调整三个值,玻璃的透明度发生变化.
      聚焦线(Caustics),要做场景全局设置如下:
      photons {
      caustics 1000000 kd 100 0.5
      }
    9. Mirror Shader
      镜面阴影,如:
      shader {
      name sfmir.shader
      type mirror
      refl { "sRGB nonlinear" 0.800 0.800 0.800 }
      }
  • 其他阴影,略.