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

推荐订阅源

The Last Watchdog
The Last Watchdog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
S
Schneier on Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
Recorded Future
Recorded Future
I
Intezer
云风的 BLOG
云风的 BLOG
博客园 - Franky
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
Tenable Blog
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Attack and Defense Labs
Attack and Defense Labs
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
The Cloudflare Blog
Webroot Blog
Webroot Blog
W
WeLiveSecurity
H
Heimdal Security Blog
博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
G
Google Developers Blog
O
OpenAI News
V
V2EX
罗磊的独立博客
博客园_首页
N
News | PayPal Newsroom
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
TaoSecurity Blog
TaoSecurity Blog
Cloudbric
Cloudbric
H
Hacker News: Front Page
博客园 - 叶小钗
T
Tor Project blog
AI
AI

博客园 - 涛仔28

Unreal Engine Plugin management HYPE若干经验 转 ifstream 读取中文路径 总结SQLExpress2008安装 如何使用子程序参数--摘自代码大全2 WinDBG咒语 SunFlow渲染流程的设计 SunFlow场景文件的Instances代码块摘要 SunFlow场景文件的GI代码块摘要 SunFlow场景文件的Cameras代码块摘要 SunFlow场景文件的Modifiers代码块 - 涛仔28 - 博客园 SunFlow场景文件的Shader代码块 - 涛仔28 - 博客园 SunFlow场景文件的Light代码块 SunFlow场景文件的Image代码块 SunFlow场景文件的代码顺序 关于Ext3.0释出 函数的连续性 关于JSON的大文本处理 脚本的杂乱思路
SunFlow场景文件的Object代码块
涛仔28 · 2009-02-13 · via 博客园 - 涛仔28

网格:

  • 三角形网格 (Triangle Meshes)
    1. 句法:
      点(Point)等同于节点(Vertex)
      object { 
      shader default
      type generic-mesh
      name meshName
      points X
      x y z

      triangles X
      A B C /* 顶点索引,从0开始 */

      normals none/vertex/facevarying
      uvs none/vertex/facevarying
      }
      对于法线和UVS,如果使用vertex类型,网格的每个点都需要自己的法线或UV坐标,如:
      ...
      points 3
      x1 y1 z1
      x2 y2 z2
      x3 y3 z3
      triangles 1
      0 1 2
      normals vertex
      d1 e1 f1
      d2 e2 f2
      d3 e3 f3
      uvs vertex
      u1 v1
      u2 v2
      u3 v3
      }
      对于facevarying类型,要使用如下的格式:
      ...
      points 3
      x1 y1 z1
      x2 y2 z2
      x3 y3 z3
      triangles 1
      0 1 2
      normals facevarying
      d1 e1 f1 d2 e2 f2 d3 e3 f3
      uvs facevarying
      u1 v1 u2 v2 u3 v3
      }
    2. 变换:
      是否需要围绕特定的法线旋转一个对象?可以在 shader / modifier 后面调用如下的句法:
      transform {
      rotate x y z d /* {x,y,z}是法线坐标,d是旋转角度 */
      }
      可以使用变换矩阵进行变换,如:
      object {
      shader default
      transform col my4x4MatrixReadByColumn
      type generic-mesh
    3. 面阴影/修改器:(Face Shaders/Modifiers)
      如果要对同一个网格对象的不同的面附加多个阴影或修改器,如下:
      object { 
      shaders 2
      shaderName0
      shaderName1
      modifiers 2
      bumpName0
      "None"
      type generic-mesh
      name meshName
      points 6
      x1 y1 z1
      x2 y2 z2
      x3 y3 z3
      x4 y4 z4
      x5 y5 z5
      x6 y6 z6
      triangles 2
      0 1 2
      1 2 3
      normals none
      uvs facevarying
      u1 v1 u2 v2 u3 v3
      u4 v4 u5 v5 u6 v6
      face_shaders
      0
      1
      }
      在 face_shaders节,把阴影0(即阴影列表中的第一个阴影 -- shaderName0)赋给三角形列表中的第一个三角形,阴影1赋给第二个三角形,等等。
      对于修改器来说是通理的,但对于具备纹理的修改器来说(bump/normal map),需要同时附加uvs坐标,另外,如果一个面没有修改器,只要在列表中使用"None"就可以了。
    4. Object Motion Blur 运动模糊效果,略
    5. Bezier Patches 略

  • Quad Meshes  略。