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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 涛仔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  略。