• 正文概述
  • glTF 2.0 Specification GLTF  2.0规范

    The Khronos® 3D Formats Working GroupKhronos ® 3D格式工作组version 2.0.1, 版本2.0.1, 2021-10-11 23:01:57Z 2021-10-11 23:01:57Z from git branch: main commit: 8e798b02d254cea97659a333cfcb20875b62bdd4来自GIT分支:MAIN提交:8E798B02D254CEA97659A333CFCB20875B62BD4

     

     

     

    1. Foreword 1。前言

    Copyright 2013-2021 The Khronos Group Inc.版权所有2013-2021 Khronos Group Inc.

    This specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos.该规范受版权定律的保护,并包含khronos的物质。除了这些条款所述,如果未经Khronos的明确事先书面许可,则不得以任何方式复制,重新出版,分发,传播,展示,广播,广播,广播,广播,广播,广播,广播,广播,广播,广播或以其他方式进行复制,重新出版,传输,展示,广播或其他任何组件。

    This specification has been created under the Khronos Intellectual Property Rights Policy, which is Attachment A of the Khronos Group Membership Agreement available at https://www.khronos.org/files/member_agreement.pdf. Khronos grants a conditional copyright license to use and reproduce the unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos IP Policy must become Adopters under the process defined by Khronos for this specification; see https://www.khronos.org/conformance/adopters/file-format-adopter-program.该规范是根据Khronos知识产权政策创建的,该政策是https://www.khronos.org/files/member_agreement.pdf的Khronos组成员协议的附件A。 Khronos授予有条件的版权许可,以任何目的使用和复制未修改的规范,无需费用或特许权使用费,除非在本条款下授予任何专利,商标或其他知识产权的许可。希望实施规范并利用与该实施相关的Khronos商标,并根据Khronos IP策略获得相互专利许可保护的当事方必须根据Khronos为此规范定义的流程采用;请参阅https://www.khronos.org/conformance/adopters/file-format-adopter-program。

    Some parts of this Specification are non-normative through being explicitly identified as purely informative, and do not define requirements necessary for compliance and so are outside the Scope of this Specification.该规范的某些部分是通过明确识别为纯粹有用的,并且没有定义合规性必要的要求,这是非规定的,因此超出了此规范的范围。

    Where this Specification includes normative references to external documents, only the specifically identified sections and functionality of those external documents are in Scope. Requirements defined by external documents not created by Khronos may contain contributions from non-members of Khronos not covered by the Khronos Intellectual Property Rights Policy.如果此规范包括对外部文档的规范性引用,则只有这些外部文档的特定识别部分和功能才在范围内。由Khronos未创建的外部文件定义的要求可能包含Khronos知识产权政策不涵盖的Khronos的非会员的贡献。

    Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.Khronos对此规范无明确或暗示任何明确的陈述或保证,包括但不限于:适销性,适合特定目的的适用性,任何知识产权,正确性,准确性,准确性,完整性,及时性和可靠性。在任何情况下,Khronos或其任何促进者,贡献者或成员,或其各自的合作伙伴,官员,董事,雇员,代理人或代表都对任何损害责任,无论是直接,间接,特殊或后果损失的收入,损失的利润,损失的利润,或其他与这些材料有关的损失。

    Khronos® and Vulkan® are registered trademarks, and ANARI™, WebGL™, glTF™, NNEF™, OpenVX™, SPIR™, SPIR‑V™, SYCL™, OpenVG™ and 3D Commerce™ are trademarks of The Khronos Group Inc. OpenXR™ is a trademark owned by The Khronos Group Inc. and is registered as a trademark in China, the European Union, Japan and the United Kingdom. OpenCL™ is a trademark of Apple Inc. and OpenGL® is a registered trademark and the OpenGL ES™ and OpenGL SC™ logos are trademarks of Hewlett Packard Enterprise used under license by Khronos. ASTC is a trademark of ARM Holdings PLC. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.Khronos®和Vulkan®是注册商标,Anari™,WebGL™,GLTF™,NNEF™,OpenVX™,SpirVX™,Spir™,sip -V™,OpenVG™,OpenVG™和3D Commerce™是Khronos Group Ingronos Ingron的商标。中国,欧盟,日本和英国的商标。 OpenCL™是Apple Inc.的商标,OpenGL®是注册商标,OpenGL ES™和OpenGL SC™徽标是Khronos使用许可证使用的Hewlett Packard Enterprise的商标。 ASTC是Arm Holdings Plc的商标。所有其他产品名称,商标和/或公司名称仅用于身份证明,属于其各自的所有者。

    1. Introduction 2。简介

    2.1. General 2.1。一般的

    This document, referred to as the “glTF Specification” or just the “Specification” hereafter, describes the glTF file format.该文档(称为“ GLTF规范”或以下“规范”)描述了GLTF文件格式。

    glTF is an API-neutral runtime asset delivery format. glTF bridges the gap between 3D content creation tools and modern graphics applications by providing an efficient, extensible, interoperable format for the transmission and loading of 3D content.GLTF是一种API中性运行时资产交付格式。 GLTF通过为3D内容的传输和加载提供有效的,可扩展的,可互操作的格式,从而弥合了3D内容创建工具和现代图形应用程序之间的差距。

    2.2. Document Conventions 2.2。文件约定

    The glTF Specification is intended for use by both implementers of the asset exporters or converters (e.g., digital content creation tools) and application developers seeking to import or load glTF assets, forming a basis for interoperability between these parties.GLTF规范旨在使用资产出口商或转换器的实施者(例如,数字内容创建工具)和寻求导入或加载GLTF资产的应用程序开发人员使用,为这些当事方之间的互操作性构成了基础。

    Specification text can address either party; typically, the intended audience can be inferred from context, though some sections are defined to address only one of these parties.规格文本可以解决任何一方;通常,可以从上下文中推断出预期的受众,尽管某些部分被定义为仅解决这些当事方之一。

    Any requirements, prohibitions, recommendations, or options defined by normative terminology are imposed only on the audience of that text.规范术语定义的任何要求,禁令,建议或选项仅对该文本的受众施加。

    2.2.1. Normative Terminology and References2.2.1。规范术语和参考

    The key words MUSTMUST NOTREQUIREDSHALLSHALL NOTSHOULDSHOULD NOTRECOMMENDEDMAY, and OPTIONAL in this document are to be interpreted as described in BCP 14.关键词必须,必须,不得应,不得应,不得,不建议,建议,可能,可以在本文档中进行可选,应如BCP 14所述进行解释。

    These key words are highlighted in the specification for clarity.这些关键词在规范中突出显示,以确保清晰度。

    References to external documents are considered normative if the Specification uses any of the normative terms defined in this section to refer to them or their requirements, either as a whole or in part.如果规范使用本节中定义的任何规范术语来指代他们或其要求,则对外部文档的参考被视为规范。

    2.2.2. Informative Language 2.2.2。内容丰富的语言

    Some language in the specification is purely informative, intended to give background or suggestions to implementers or developers.规范中的某些语言纯粹是有益的,旨在为实施者或开发人员提供背景或建议。

    If an entire chapter or section contains only informative language, its title is suffixed with “(Informative)”. If not designated as informative, all chapters, sections, and appendices in this document are normative.如果整章或部分仅包含信息性语言,则其标题的后缀为“(信息)”。如果未指定为信息,本文档中的所有章节,部分和附录都是规范性的。

    All Notes, Implementation notes, and Examples are purely informative.所有注释,实施笔记和示例纯粹是有益的。

    2.2.3. Technical Terminology 2.2.3。技术术语

    The glTF Specification makes use of linear algebra terms such as axismatrixvector, etc. to identify certain math constructs and their behaviors as defined in the International Electrotechnical Vocabulary.GLTF规范利用线性代数术语(例如轴,矩阵,向量等)来确定国际电子技术词汇中定义的某些数学构建体及其行为。

    The glTF Specification makes use of common engineering and graphics terms such as imagebuffertexture, etc. to identify and describe certain glTF constructs and their attributes, states, and behaviors. This section defines the basic meanings of these terms in the context of the Specification. The Specification text provides fuller definitions of the terms and elaborates, extends, or clarifies the definitions. When a term defined in this section is used in normative language within the Specification, the definitions within the Specification govern and supersede any meanings the terms may have in other technical contexts (i.e. outside the Specification).GLTF规范利用了常见的工程和图形术语,例如图像,缓冲区,纹理等,以识别和描述某些GLTF构建体及其属性,状态和行为。本节在规范的背景下定义了这些术语的基本含义。规范文本提供了术语和详细说明,扩展或澄清定义的完整定义。当本节中定义的术语在规范的规范语言中使用时,规范中的定义控制并取代了该术语在其他技术环境中可能具有的任何含义(即在规范之外)。

    accessor 登录器 

    An object describing the number and the format of data elements stored in a binary buffer.描述存储在二进制缓冲区中的数据元素的数字和格式的对象。

    animation 动画片 

    An object describing the keyframe data, including timestamps, and the target property affected by it.描述关键帧数据的对象,包括时间戳以及受其影响的目标属性。

    back-facing 背面 

    See facingness. 见面。

    buffer 缓冲 

    An external or embedded resource that represents a linear array of bytes.代表字节线性数组的外部或嵌入式资源。

    buffer view 缓冲区视图 

    An object that represents a range of a specific buffer, and optional metadata that controls how the buffer’s content is interpreted.一个代表一系列特定缓冲区和可选元数据范围的对象,可控制缓冲区内容的解释。

    camera 相机 

    An object defining the projection parameters that are used to render a scene.定义用于渲染场景的投影参数的对象。

    facingness 面对面 

    A classification of a triangle as either front-facing or back-facing, depending on the orientation (winding order) of its vertices.根据其顶点的方向(绕组顺序),将三角形的分类为前面或背面。

    front-facing 前面 

    See facingness. 见面。

    image 图像 

    A two dimensional array of pixels encoded as a standardized bitstream, such as PNG.一个二维像素的阵列编码为标准化的bitstream,例如png。

    indexed geometry 索引几何形状 

    A mesh primitive that uses a separate source of data (index values) to assemble the primitive’s topology.一个使用单独的数据源(索引值)组装原始拓扑的网格原始性。

    linear blend skinning 线性混合皮肤 

    A skinning method that computes a per-vertex transformation matrix as a linear weighted sum of transformation matrices of the designated nodes.一种剥皮方法,该方法将每个Vertex转换矩阵计算为指定节点的变换矩阵的线性加权总和。

    material 材料 

    A parametrized approximation of visual properties of the real-world object being represented by a mesh primitive.由网格原始对象表示的现实世界对象的视觉特性的参数化*似。

    mesh  

    A collection of mesh primitives.网状原始素材的集合。

    mesh primitive 网格原始 

    An object binding indexed or non-indexed geometry with a material.用材料的对象结合索引或非索引几何形状。

    mipmap mipmap 

    A set of image representations consecutively reduced by the factor of 2 in each dimension.一组图像表示在每个维度中连续减少2个因子。

    morph target 变形靶标 

    An altered state of a mesh primitive defined as a set of difference values for its vertex attributes.网格原始态的变化状态定义为其顶点属性的一组差值值。

    node 节点 

    An object defining the hierarchy relations and the local transform of its content.定义层次关系及其内容的局部变换的对象。

    non-indexed geometry 非索引几何形状 

    A mesh primitive that uses linear order of vertex attribute values to assemble the primitive’s topology.使用顶点属性值的线性顺序来组装原始拓扑。

    normal 普通的 

    A unit XYZ vector defining the perpendicular to the surface.XYZ向量定义垂直于表面的单元。

    root node 根节点 

    A node that is not a child of any other node.不是其他任何节点的孩子的节点。

    sampler 采样器 

    An object that controls how image data is sampled.一个控制图像数据采样方式的对象。

    scene 场景 

    An object containing a list of root nodes to render.一个包含渲染根节点列表的对象。

    skinning 皮肤 

    The process of computing and applying individual transforms for each vertex of a mesh primitive.针对网格原始的每个顶点计算和应用单个变换的过程。

    tangent 切线 

    A unit XYZ vector defining a tangential direction on the surface.XYZ矢量定义表面上的切向方向。

    texture 质地 

    An object that combines an image and its sampler.结合图像及其采样器的对象。

    topology type 拓扑类型 

    State that controls how vertices are assembled, e.g. as lists of triangles, strips of lines, etc.声明控制顶点的组装方式,例如作为三角形,线条等列表。

    vertex attribute 顶点属性 

    A property associated with a vertex.与顶点相关的属性。

    winding order 绕组顺序 

    The relative order in which vertices are defined within a triangle三角形内定义顶点的相对顺序

    wrapping 包装 

    A process of selecting an image pixel based on normalized texture coordinates.基于归一化纹理坐标选择图像像素的过程。

    2.2.4. Normative References 2.2.4。规范参考

    The following documents are referenced by normative sections of the specification:以下文档通过规范的规范章节引用:

    2.2.4.1. External Specifications2.2.4.1。外部规格

    • Bradner, S., Key words for use in RFCs to Indicate Requirement Levels, BCP 14, RFC 2119, March 1997. Leiba, B., Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words, BCP 14, RFC 8174, May 2017. https://www.rfc-editor.org/info/bcp14布拉德纳(
    • IEC 60050-102 International Electrotechnical Vocabulary (IEV) – Part 102: Mathematics – General concepts and linear algebrahttps://webstore.iec.ch/publication/160IEC 60050-102国际电气技术词汇(IEV) – 第102部分:数学 – 一般概念和线性代数

    IEC 60050-103 International Electrotechnical Vocabulary (IEV) – Part 103: Mathematics – Functions https://webstore.iec.ch/publication/161IEC 60050-103国际电子技术词汇(IEV) – 第103部分:数学 – 功能https://webstore.iec.ch/publication/161

    Note 笔记

    An online version of these standards is available at https://www.electropedia.org/这些标准的在线版本可在https://www.electropedia.org/上获得。

    • The Unicode Consortium, The Unicode Standardhttps://www.unicode.org/versions/latest/Unicode联盟,Unicode标准https://www.unicode.org/versions/latest/
    • Bray, T., Ed., The JavaScript Object Notation (JSON) Data Interchange Format, STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, https://www.rfc-editor.org/info/rfc8259Bray,,编辑,JavaScript对象符号(JSON)数据交换格式,STD 90,RFC 8259,DOI 10.17487/RFC8259,2017年12月,https:///wwww.rfc-editor.rfc-editor.or.or.or.or.or.or.or.or.g/info/rfc8259
    • ISO/IEC 60559 Floating-point arithmetichttps://www.iso.org/standard/80985.htmlISO/IEC 60559浮点算术https://www.iso.org/standard/80985.html
    • ISO/IEC 15948 Portable Network Graphics (PNG): Functional specificationhttps://www.iso.org/standard/29581.htmlISO/IEC 15948便携式网络图形(PNG):功能规范https://www.iso.org/standard/29581.html
    Note 笔记

    A free version of this standard is available from W3C: https://www.w3.org/TR/PNG/该标准的免费版本可从W3C获得:https://www.w3.org/tr/png/

    • ISO/IEC 10918-1 Digital compression and coding of continuous-tone still images: Requirements and guidelineshttps://www.iso.org/standard/18902.htmlISO/IEC 10918-1连续音静止图像的数字压缩和编码:要求和指南https://www.iso.org/standard/18902.html
    Note 笔记

    An earlier edition of this standard called ITU Recommendation T.81 is available from W3C: https://www.w3.org/Graphics/JPEG/itu-t81.pdf该标准的较早版本称为ITU推荐T.81可从W3C获得:https://www.w3.org/graphics/jpeg/itu-t81.pdf

    • ISO/IEC 10918-5 Digital compression and coding of continuous-tone still images: JPEG File Interchange Format (JFIF)https://www.iso.org/standard/54989.htmlISO/IEC 10918-5连续色调静止图像的数字压缩和编码:JPEG文件互换格式(JFIF)https://www.iso.org/standard/54989.html
    Note 笔记

    An earlier edition of this standard is available from W3C: https://www.w3.org/Graphics/JPEG/jfif3.pdf该标准的较早版本可从W3C获得:https://www.w3.org/graphics/jpeg/jfif3.pdf

    • CIPA DC-008-Translation-2019 Exchangeable image file format for digital still camerashttps://www.cipa.jp/std/documents/download_e.html?DC-008-Translation-2019-ECIPA DC-008-TRANSLATION-2019数字相机可交换图像文件格式
    • Masinter, L., The “data” URL scheme, RFC 2397, DOI 10.17487/RFC2397, August 1998, https://www.rfc-editor.org/info/rfc2397Masinter,L。,“数据” URL方案,RFC 2397,DOI 10.17487/RFC2397,1998年8月,https://www.rfc-editor.org/info/info/rfc2397
    • Berners-Lee, T., Fielding, R., and L. Masinter, Uniform Resource Identifier (URI): Generic Syntax, STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, https://www.rfc-editor.org/info/rfc3986Berners-Lee, T., Fielding, R., and L. Masinter, Uniform Resource Identifier (URI): Generic Syntax , STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, https://www.rfc-editor.org/info/rfc3986
    • Duerst, M. and M. Suignard, Internationalized Resource Identifiers (IRIs), RFC 3987, DOI 10.17487/RFC3987, January 2005, https://www.rfc-editor.org/info/rfc3987Duerst,M。和 Suignard,国际化资源标识符(IRIS),RFC 3987,DOI 10.17487/RFC3987,2005年1月,https://wwwwww.rfc-editor.org/inf/info/info/rfc3987
    • Fielding, R., Ed., and J. Reschke, Ed., Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing, RFC 7230, DOI 10.17487/RFC7230, June 2014, https://www.rfc-editor.org/info/rfc7230Fielding,,Ed。和J. Reschke编辑,超文本传输​​协议(HTTP/1.1):消息语法和路由,RFC 7230,DOI 10.17487/RFC7230,2014年6月,https://https:///wwwwwwwwww.rfc-editor.org/infco.org/infco/rfco/rfc7230
    • IEC 61966-2-1 Default RGB colour space – sRGBhttps://webstore.iec.ch/publication/6169IEC 61966-2-1默认RGB颜色空间-SRGB https://webstore.iec.ch/publication/6169
    Note 笔记

    The encoding characteristics of sRGB are freely available from ICC: https://www.color.org/chardata/rgb/srgb.xalterSRGB的编码特性可从ICC免费获得:https://www.color.org/chardata/rgb/srgb.xalter

    • Recommendation ITU-R BT.709-6 Parameter values for the HDTV standards for production and international programme exchangehttps://www.itu.int/rec/R-REC-BT.709-6-201506-I建议ITU-R BT.709-6 HDTV生产和国际计划交换标准的参数值
    • MikkTSpacehttps://github.com/mmikk/MikkTSpacemikktspace https://github.com/mmikk/mikktspace
    • Thomas Porter and Tom Duff. 1984. Compositing digital images.SIGGRAPH Comput. Graph. 18, 3 (July 1984), 253–259. DOI: https://doi.org/10.1145/964965.808606托马斯波特和汤姆·达夫。 1984。合成数字图像。 Siggraph Comput。图形。 18,3(1984年7月),253-259。 doi:https://doi.org/10.1145/964965.808606
    Note 笔记

    A free version of this paper is available from Pixar: https://graphics.pixar.com/library/Compositing/Pixar可以免费获得本文的免费版本:https://graphics.pixar.com/library/compositing/

    2.2.4.2. Media Type Registrations2.2.4.2。媒体类型注册

    2.3. Motivation and Design Goals (Informative)2.3。动机和设计目标(信息丰富)

    glTF is an open interoperable 3D asset ‘transmission’ format that is compact, and efficient to process and render at runtime. glTF 2.0 is designed to be vendor- and runtime-neutral, usable by a wide variety of native and web-based engines and applications regardless of underlying platforms and 3D graphics APIs.GLTF是一种打开的互操作3D资产“传输”格式,非常紧凑,并且可以在运行时进行处理和渲染。 GLTF 2.0的设计为供应商和运行时中立,无论基础*台和3D图形API如何,可供多种本地和网络的引擎以及应用程序使用。

    glTF’s focus on run-time efficiency is a different design goal than typical 3D ‘authoring’ formats. Authoring formats are typically more verbose, with higher processing overheads, to carry authoring data that is no longer needed after iterative design is complete. glTF is complementary to authoring formats, providing a common, interoperable distillation target for publishing 3D assets to a wide audience of end users.GLTF专注于运行时效率是一个与典型的3D“创作”格式不同的设计目标。创作格式通常更详细,并具有更高的处理开销,以携带迭代设计完成后不再需要的创作数据。 GLTF是对创作格式的补充,为广泛的最终用户提供了一个常见的,可互操作的蒸馏目标,以发布3D资产。

    A primary goal of glTF is to be deployable on a wide range of devices and platforms, including the web and mobile devices with limited processing and memory resources. glTF can be evolved, to keep pace with growing compute capabilities over time. This helps to foster broad industry consensus on 3D functionality that can be used ubiquitously, including Physically Based Rendering.GLTF的主要目标是可以在各种设备和*台上进行部署,包括具有有限的处理和内存资源的Web和移动设备。可以进化GLTF,以跟上随着时间的推移的计算功能的增长。这有助于促进对3D功能的广泛共识,该功能可普遍使用,包括基于物理的渲染。

    glTF combines an easily parsable JSON scene description with one or more binary resources representing geometry, animations, and other rich data. These binary resources can often be loaded directly into GPU buffers with no additional parsing or processing, combining the faithful preservation of full hierarchical scenes, nodes, meshes, cameras, materials, and animations with efficient delivery and fast loading.GLTF将易于可简洁的JSON场景描述与代表几何,动画和其他丰富数据的一个或多个二进制资源结合在一起。这些二进制资源通常可以直接加载到GPU缓冲液中,没有其他解析或处理,结合了完整的分层场景,节点,网格,摄像头,材料和动画的忠实保存,并有效地交付和快速加载。

    glTF has been designed to meet the following goals:GLTF旨在满足以下目标:

    • Compact file sizes.The plain text glTF JSON file description is compact and rapid to parse. All large data such as geometry, textures and animations are stored in binary files that are significantly smaller than equivalent text representations.紧凑的文件大小。 纯文本GLTF JSON文件描述紧凑,可以快速解析。所有大数据,例如几何,纹理和动画都存储在二进制文件中,这些文件明显小于等效文本表示。
    • Runtime-independence.glTF is purely an asset format and does not mandate any runtime behavior. This enables its use by any application for any purpose, including display using any rendering technology, up to and including path tracing renderers.独立于运行时。 GLTF纯粹是一种资产格式,不要求任何运行时行为。这使得其用于任何目的的应用程序都可以使用,包括使用任何渲染技术显示,包括路径跟踪渲染器。
    • Complete 3D scene representation.Not restricted to single objects, glTF can represent entire scenes, including nodes, transformations, transform hierarchy, meshes, materials, cameras, and animations.完整的3D场景表示。 GLTF不限于单个对象,可以表示整个场景,包括节点,转换,变换层次结构,网格,材料,摄像机和动画。
    • glTF is fully extensible, enabling the addition of both general-purpose and vendor-specific extensions, including geometry and texture compression. Widely adopted extensions may be considered for integration into future versions of the glTF specification.可扩展性。 GLTF是完全可扩展的,可以添加通用和供应商特定的扩展,包括几何和纹理压缩。可以考虑广泛采用的扩展名,以集成到GLTF规范的未来版本中。

    The following are outside the scope of glTF 2.0:以下在GLTF 2.0的范围之外:

    • glTF is not a streaming format.The binary data in glTF is inherently streamable, and the buffer design allows for fetching data incrementally, but there are no other streaming constructs in glTF 2.0.GLTF不是流格式。 GLTF中的二进制数据本质上是可流的,缓冲区设计允许逐步获取数据,但是GLTF 2.0中没有其他流构建体。
    • glTF is not an authoring format.glTF deliberately does not retain 3D authoring information, in order to preserve runtime efficiency, however glTF files may be ingested by 3D authoring tools for remixing.GLTF不是创作格式。 GLTF故意不保留3D创作信息,以确保运行时效率,但是3D创作工具可能会摄入GLTF文件。
    • glTF is not intended to be human-readable,though by virtue of being represented in JSON, it is developer-friendly.GLTF并非打算是人类可读的,尽管由于在JSON中的代表,它对开发人员友好。

    2.4. glTF Basics 2.4。 GLTF基础知识

    A glTF asset is represented by:GLTF资产由:

    • A JSON-formatted file (.gltf) containing a full scene description: node hierarchy, materials, cameras, as well as descriptor information for meshes, animations, and other constructs.包含完整场景的JSON-Formatted文件(.gltf):节点层次结构,材料,摄像机以及用于网格,动画和其他构造的描述符信息。
    • Binary files (.bin) containing geometry, animation, and other buffer-based data.二进制文件(.bin)包含几何形状,动画和其他基于缓冲区的数据。
    • Image files (.jpg, .png) containing texture images.图像文件(.jpg,.png)包含纹理图像。

    Binary and image resources MAY also be embedded directly in JSON using Data URI or stored side-by-side with JSON in GLB container.二进制资源和图像资源也可以使用数据URI直接嵌入JSON中,也可以与GLB容器中的JSON并排存储。

    A valid glTF asset MUST specify its version.有效的GLTF资产必须指定其版本。

    2.5. Versioning 2.5。版本控制

    Any updates made to the glTF Specification in a minor version MUST be backward and forward compatible. Backward compatibility means that any client implementation that supports loading a glTF 2.x asset will also be able to load a glTF 2.0 asset. Forward compatibility means that a client implementation that only supports glTF 2.0 can load glTF 2.x assets while gracefully ignoring any new features it does not understand.次要版本中对GLTF规范的任何更新都必须向后和向前兼容。向后兼容性意味着任何支持加载GLTF 2.x资产的客户实现也将能够加载GLTF 2.0资产。向前的兼容性意味着仅支持GLTF 2.0的客户实现可以加载GLTF 2.x资产,同时优雅地忽略其不了解的任何新功能。

    A minor version update MAY introduce new features but MUST NOT change any previously existing behavior. Existing functionality MAY be deprecated in a minor version update, but it MUST NOT be removed.次要版本的更新可能会引入新功能,但不得改变任何以前现有的行为。现有功能可以在次要版本更新中弃用,但不得将其删除。

    Major version updates MAY be incompatible with previous versions.主要版本更新可能与以前的版本不相容。

    2.6. File Extensions and Media Types2.6。文件扩展和媒体类型

    • JSONglTF files SHOULD use .gltf extension and model/gltf+json Media Type.JSON GLTF文件应使用.gltf扩展名和model/gltf+json媒体类型。
    • glTF files stored in GLBcontainer SHOULD use .glb extension and model/gltf-binary Media Type.GLB容器中存储的GLTF文件应使用.glb扩展名和model/gltf-binary媒体类型。
    • Files representing binary buffers SHOULDuse either:代表二进制缓冲区的文件应使用:
      • .binfile extension with application/octet-stream Media Type;.bin带有application/octet-stream媒体类型的文件扩展名;
      • .bin, .glbin, or .glbuffile extensions with application/gltf-buffer Media Type..bin,.glbin,或.glbuf使用application/gltf-buffer媒体类型的文件扩展。
    • PNGimages SHOULD use .png file extension with image/png Media Type;PNG图像应使用.png使用<b1>> </b1>媒体类型的文件扩展名;
      • PNG images SHOULD NOTcontain animations, non-square pixel ratios, or embedded ICC profiles. Such features, if present, MUST be ignored by client implementations.PNG图像不应包含动画,非方面像素比或嵌入式ICC配置文件。如果存在,则必须通过客户实现忽略此类功能。
    • JPEGimages SHOULD use .jpeg or .jpg file extensions with image/jpeg Media TypeJPEG图像应使用.jpeg或.jpg使用image/jpeg媒体类型的文件扩展
      • JPEG images MUSTbe compatible with JPEG File Interchange Format.JPEG图像必须与JPEG文件互换格式兼容。
      • JPEG images SHOULD NOTcontain embedded ICC profiles. If present, embedded ICC profiles MUST be ignored by client implementations.JPEG图像不应包含嵌入式ICC配置文件。如果存在,则客户实现必须忽略嵌入式ICC配置文件。
      • Exchangeable image file format (Exif)chunks MAY be ignored by client implementations.客户实现可能会忽略可交换图像文件格式(EXIF)块。
    Implementation Note 实施注释

    Certain Exif chunks, e.g., “Orientation”, may severely impact an asset’s portability.某些EXIF块,例如“方向”,可能会严重影响资产的可移植性。

    2.7. JSON Encoding 2.7。 JSON编码

    Although glTF Specification does not define any subset of the JSON format, implementations SHOULD be aware of its peculiar properties that could affect asset interoperability.尽管GLTF规范没有定义JSON格式的任何子集,但实现应意识到其特殊属性,可能会影响资产互操作性。

    1. glTF JSON data SHOULDbe written with UTF-8 encoding without BOM. This requirement is not applied when a glTF implementation does not control string encoding. glTF implementations SHOULD adhere to RFC 8259, Section 8.1. with regards to treating BOM presence.GLTF JSON数据应使用无BOM编码的UTF-8编码编写。当GLTF实现不控制字符串编码时,不会应用此要求。 GLTF实施应遵守RFC 8259,第1节。关于治疗BOM的存在。
    2. ASCII characters stored in glTF JSON SHOULDbe written without JSON escaping.GLTF JSON中存储的ASCII角色应在不逃脱的情况下写入。
    Example 例子

    “buffer” instead of “\u0062\u0075\u0066\u0066\u0065\u0072”. “buffer”而不是”\u0062\u0075\u0066\u0066\u0065\u0072″。

    1. Non-ASCII characters stored in glTF JSON MAYbe escaped.可以逃脱存储在GLTF JSON中的非ASCII字符。
    Example 例子

    These two examples represent the same glTF JSON data.这两个示例代表相同的GLTF JSON数据。

    {

    “asset”: {

    “version”: “2.0”

    },

    “nodes”: [

    {

    “name”: “куб”

    },

    {

    “name”: “立方體”

    }

    ]

    }

    {

    “asset”: {

    “version”: “2.0”

    },

    “nodes”: [

    {

    “name”: “\u043a\u0443\u0431”

    },

    {

    “name”: “\u7acb\u65b9\u9ad4”

    }

    ]

    }

    1. Property names (keys) within JSON objects SHOULDbe unique. glTF client implementations SHOULD override lexically preceding values for the same key.JSON对象中的属性名称(键)应该是唯一的。 GLTF客户端的实现应覆盖同一密钥的词汇先前值。
    2. Some of glTF properties are defined as integers in the schema. Such values MAYbe stored as decimals with a zero fractional part or by using exponent notation. Regardless of encoding, such properties MUST NOT contain any non-zero fractional value.某些GLTF属性定义为模式中的整数。此类值可以作为零部分部分的小数或使用指数表示法存储。无论编码如何,此类属性都不得包含任何非零的分数值。
    Example 例子

    100, 100.0, and 1e2 represent the same value. See RFC 8259, Section 6 for more details.100,100.0,1e2表示相同的值。有关更多详细信息,请参见RFC 8259,第6节。

    1. Non-integer numbers SHOULDbe written in a way that preserves original values when these numbers are read back, i.e., they SHOULD NOT be altered by JSON serialization / deserialization roundtrip.非整数编号应以保留原始值回复时保留原始值的方式编写,即,不应通过JSON Serialization / delelialization往返进行更改。
    Implementation Note 实施注释

    This is typically achieved with algorithms like Grisu2 used by common JSON libraries.这通常是通过诸如常见JSON库使用的grisu2之类的算法来实现的。

    2.8. URIs 2.8。乌里斯

    glTF assets use URIs or IRIs to reference buffers and image resources. Assets MAY contain at least these two URI types:GLTF资产使用URIS或IRIS参考缓冲区和图像资源。资产可能至少包含这两种URI类型:

    • Data URIsthat embed binary resources in the glTF JSON as defined by the RFC 2397. The Data URI’s mediatype field MUST match the encoded content.RFC 2397定义的GLTF JSON中嵌入二进制资源的数据URI。数据URI的mediatype字段必须与编码内容匹配。
    Implementation Note 实施注释

    Base64 encoding used in Data URI increases the payload’s byte length by 33%.数据URI中使用的base64编码将有效载荷的字节长度提高了33%。

    • Relative paths — path-noschemeor ipath-noscheme as defined by RFC 3986, Section 4.2 or RFC 3987, Section 2.2 — without scheme, authority, or parameters. Reserved characters (as defined by RFC 3986, Section 2.2. and RFC 3987, Section 2.2.) MUST be percent-encoded.相对路径 – path-noscheme或ipath-noscheme由RFC 3986,第2节或RFC 3987,第2.2节,没有方案,权威或参数。保留字符(如RFC 3986所定义,第2.2节和RFC 3987,第2.2节。)必须为百分比编码。

    Paths with non-ASCII characters MAY be written as-is, with JSON string escaping, or with percent-encoding; all these options are valid. For example, the following three paths point to the same resource:具有非ASCII字符的路径可以按原样编写,JSON字符串逃脱或编码百分比;所有这些选项都是有效的。例如,以下三个路径指向相同的资源:

    {

    “images”: [

    {

    “uri”: “grande_sphère.png”

    },

    {

    “uri”: “grande_sph\u00E8re.png”

    },

    {

    “uri”: “grande_sph%C3%A8re.png”

    }

    ]

    }

    Client implementations MAY optionally support additional URI components. For example http:// or file:// schemes, authorities, hostnames, absolute paths, and query or fragment parameters. Assets containing these additional URI components would be less portable.客户实现可以选择支持其他URI组件。例如http://或file://方案,当局,主机名,绝对路径以及查询或片段参数。包含这些额外URI组件的资产将不那么便携。

    Implementation Note 实施注释

    This allows the application to decide the best approach for delivery: if different assets share many of the same geometries, animations, or textures, separate files may be preferred to reduce the total amount of data requested. With separate files, applications may progressively load data and do not need to load data for parts of a model that are not visible. If an application cares more about single-file deployment, embedding data may be preferred even though it increases the overall size due to base64 encoding and does not support progressive or on-demand loading. Alternatively, an asset could use the GLB container to store JSON and binary data in one file without base64 encoding. See GLB File Format Specification for details.这允许应用程序确定最佳交付方法:如果不同的资产共享许多相同的几何,动画或纹理,则可以选择单独的文件以减少所请求的数据总量。使用单独的文件,应用程序可能会逐步加载数据,并且不需要为不可见的模型部分加载数据。如果应用程序更多地关心单文件部署,即使由于基本64编码而增加的总体尺寸,并且不支持渐进式或点播加载,嵌入数据也可能是首选的。另外,资产可以使用GLB容器将JSON和二进制数据存储在一个文件中,而无需base64编码。有关详细信息,请参见GLB文件格式规范。

    URIs SHOULD undergo syntax-based normalization as defined by RFC 3986, Section 6.2.2, RFC 3987, Section 5.3.2, and applicable schema rules (e.g., RFC 7230, Section 2.7.3 for HTTP) on export and/or import.URI应进行基于语法的归一化,如RFC 3986,第6.2.2节,RFC 3987,第5.3.2节,并在导出和/或或/或进口上进行适用的架构规则(例如,HTTP的RFC 7230,第2.7.3节,HTTTP第2.7.3节)。

    Implementation Note 实施注释

    While the specification does not explicitly disallow non-normalized URIs, their use may be unsupported or lead to unwanted side-effects — such as security warnings or cache misses — on some platforms.虽然该规范没有明确禁止非正态化的URI,但在某些*台上,它们的使用可能不受支持或导致不需要的副作用(例如安全警告或高速缓存)。

    1. Concepts 3。概念

    3.1. General 3.1。一般的

    The figure below shows relations between top-level arrays in a glTF asset. See the Properties Reference.下图显示了GLTF资产中顶级阵列之间的关系。请参阅属性参考。

    Figure 1. glTF Object Hierarchy图1。GLTF对象层次结构

    3.2. Asset 3.2。资产

    Each glTF asset MUST have an asset property. The asset object MUST contain a version property that specifies the target glTF version of the asset. Additionally, an optional minVersion property MAY be used to specify the minimum glTF version support required to load the asset. The minVersion property allows asset creators to specify a minimum version that a client implementation MUST support in order to load the asset. This is very similar to the extensionsRequired concept described in Section 3.12, where an asset SHOULD NOT be loaded if the client does not support the specified extension. Additional metadata MAY be stored in optional properties such as generator or copyright. For example,每个GLTF资产必须具有asset属性。 asset对象必须包含version属性,该属性指定了资产的目标GLTF版本。此外,可选的minVersion属性可用于指定加载资产所需的最小GLTF版本支持。 minVersion属性允许资产创建者指定客户实现必须支持以加载资产的最低版本。这与第3.12节中描述的extensionsRequired概念非常相似,如果客户不支持指定的扩展名,则不应加载资产。其他元数据可以存储在可选属性中,例如generator或copyright。例如,

    {

    “asset”: {

    “version”: “2.0”,

    “generator”: “collada2gltf@f356b99aef8868f74877c7ca545f2cd206b9d3b7”,

    “copyright”: “2017 (c) Khronos Group”

    }

    }

    Implementation Note 实施注释

    Client implementations should first check whether a minVersion property is specified and ensure both major and minor versions can be supported. If no minVersion is specified, then clients should check the version property and ensure the major version is supported. Clients that load GLB format should also check for the minVersion and version properties in the JSON chunk as the version specified in the GLB header only refers to the GLB container version.客户实现应首先检查是否指定了A minVersion属性,并确保可以支持主要版本和次要版本。如果未指定<b1>> </b1>,则客户应检查version属性并确保支持主要版本。加载GLB格式的客户端还应检查JSON块中minVersion和version属性,因为GLB标头中指定的版本仅指GLB容器版本。

    3.3. Indices and Names 3.3。索引和名称

    Entities of a glTF asset are referenced by their indices in corresponding arrays, e.g., a bufferView refers to a buffer by specifying the buffer’s index in buffers array. For example:GLTF资产的实体在相应数组中的索引引用,例如A bufferView是指A buffer来指定buffers数组中的缓冲区索引。例如:

    {

    “buffers”: [

    {

    “byteLength”: 1024,

    “uri”: “path-to.bin”

    }

    ],

    “bufferViews”: [

    {

    1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
    2. 分享目的仅供大家学习和交流,请不要用于商业用途!
    3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入!
    4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
    5. 如有链接无法下载、失效或广告,请联系管理员处理!
    6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
    7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员!
    8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载
    声明如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性

    GLB下载网(glbxz.com)gltf文件下载-glb格式下载-模型制作 » glTF™ 2.0 Specification GLTF ™ 2.0规范(AI翻译)

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载要提取码
    百度网盘提取码都是gltf。
    分享过期和重复下载怎么办
    分享过期请使用备份下载,重复下载是不另扣费的,请放心下载。
    模型和平台不兼容怎么办
    可以用网站在线编辑功能,修改模型属性,大小,方向,坐标,中心,透明等问题,然后重新导出既可https://glbxz.com/38636.html
    • 9404会员数(个)
    • 16891资源数(个)
    • 28本周更新(个)
    • 39280 今日更新(个)
    • 1294稳定运行(天)

    提供最优质的资源集合

    加入VIP
    开通VIP 享更多特权,建议使用 QQ 登录
    ×