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

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
H
Help Net Security
Last Week in AI
Last Week in AI
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
B
Blog
C
Check Point Blog
T
Tailwind CSS Blog
云风的 BLOG
云风的 BLOG
D
Docker
Recent Announcements
Recent Announcements
Vercel News
Vercel News
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
月光博客
月光博客
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
The Register - Security
The Register - Security
V
Visual Studio Blog
F
Full Disclosure
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
PCI Perspectives
PCI Perspectives
Cisco Talos Blog
Cisco Talos Blog
博客园 - Franky
D
DataBreaches.Net
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
T
Tenable Blog
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy

博客园 - 涛仔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 }
      }
  • 其他阴影,略.