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

推荐订阅源

MyScale Blog
MyScale Blog
U
Unit 42
The Register - Security
The Register - Security
S
Security Affairs
博客园 - 【当耐特】
Latest news
Latest news
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
C
Cisco Blogs
宝玉的分享
宝玉的分享
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 叶小钗
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园_首页
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
Recorded Future
Recorded Future
Scott Helme
Scott Helme
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tor Project blog
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hacker News: Front Page
J
Java Code Geeks
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
Attack and Defense Labs
Attack and Defense Labs

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