码迷,mamicode.com
首页 > 其他好文 > 详细

USD词汇表(USD Glossary)

时间:2017-10-14 01:31:21      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:blank   default   desc   for   ida   sas   代码   different   define   

这篇文章目的是将USD Glossary中比较重要的概念和相关API的说明翻译出来,词汇翻译的列表会按照其重要程度排序,所以会打乱原有顺序,这样做是为了增强可读性及逻辑性,对原文有兴趣的请参考:https://graphics.pixar.com/usd/docs/USD-Glossary.html

 

USD introduces quite a few terms and concepts, some of which, unavoidably, already have different meanings in other contexts, so it can be quite daunting to make sense of all of our documentation and code until you have become fully indoctrinated.  This glossary attempts to define and explain all the major concepts and behaviors referred to in other parts of the USD documentation.

USD介绍了比较少的术语和概念,其中在其他语境中会有不同的含义,这是不可避免的,所以除非你已经完整的被USD灌输了一遍,否则要弄明白USD的文档和代码是十分艰巨的。这个词汇表尝试定义和解释所有的主要概念和软件行为,这些概念和行为会被其他的USD文档参考引用。



Stage

stage is the USD abstraction for a scenegraph derived from a root USD file, and all of the referenced/layered files it composes.  A stage always presents the composed view of the scene description that backs it.   The UsdStage class embodies a Stage, and caches in memory just enough information about the composed namespace and backing files so that we can rapidly traverse the stage and perform efficient data queries

场景图概念由USD的根文件及组成它的引用文件、分层文件派生而来,Stage就是场景图在USD中的抽象。Stage概念在USD源码中是由UsdStage class表现的,UsdStage class会将组合的命名空间和支持的文件缓存到内存中,以便我们能快速的遍历stage、高效的运行数据查询操作(data queries).

 

Prim

Prim is the primary container object in USD: prims can contain (and order) other prims, creating a "namespace hierarchy" on a Stage, and prims can also contain (and order) properties that hold meaningful data.  Prims, along with their associated, computed indices, are the only persistent scenegraph objects that a Stage retains in memory, and the API for interacting with prims is provided by the UsdPrimclass.  Prims always possess a resolved Specifier that determines the prim‘s generic role on a stage, and a prim may possess a schema typeName that dictates what kind of data the prim contains.  Prims also provide the granularity at which we apply scene-level instancingload/unload behavior, and deactivation.  

在USD中Prim(要素) 是主要的容器对象:prim能装(或者排序)其他prim,能在Stage中创建命名空间层级树,prim还能装(或排序)存有有用数据的properties。在USD中,prim和它的索引(这个索引是计算好的),是Stage保存在内存中的唯一的、永久的场景图对象,而与prim交互的API则是由UsdPrim类提供的。Prims会一直拥有一个Specifier(分类符),该分类符决定prim在Stage中的类型作用,prim可能会拥有一个schema类型名来规定prim应该装载什么样的数据。prim这个概念在我们使用场景实例,装载卸载行为属性,去活某些对象的时候会提供粒度的支持。

                                

Active / Inactive

Activation is a metadatum/behavior of prims  that models a "non destructive and reversible prim deletion" from a stage. Prims are active by default, which means they and their active children will be composed and visited by stage traversals; however, by making a prim inactive, via UsdPrim::SetActive(false), we prevent the prim itself from being visited by default traversals, and we also prevent the prim‘s descendant prims from even being composed on the stage, which makes deactivation a useful tool for pruning unneeded scene description for scalability and complexity management.

Activation是stage中有着“非破坏性且可逆的删除行为”模型的prim的一个元数据集合/行为。默认情况下Prim是激活的,这意味着它和它的子Prim都会被stage遍历器所组建和访问;然而,通过UsdPrim::SetActive(false),,使Prim无效,我们能够阻止prim自身被默认的遍历器访问。也能阻止在stage中组建Prim的后代prim,这就使得deactivation在可伸缩性及复杂度管理中、在削减不需要的场景描述的时候成为一个有用的工具。

 

API Schema

An API schema is a prim Schema that does not represent an object‘s type-identity, but simply serves as an interface or API for authoring and extracting a set of related data.  See the UsdModelAPI class reference as an example.  In terms of the USD object model, an API schema is one that derives from UsdSchemaBase, but not from its subclass UsdTyped.  That means UsdPrim::IsA<UsdModelAPI>() will never return true, for example, and there is no entry for UsdModelAPI in the UsdSchemaRegistry

Choose to create an API Schema when you have a group of related properties, metadata, and possibly associated behaviors that may need to be applied to multiple different types of prims.  For example, if your pipeline has a set of three attributes that get authored onto every gprim, and you want to have a robust schema for authoring and extracting those attributes, you could create an API schema for them.  Why not instead subclass the typed UsdGeomGprim schema and add the attributes there?  Because you would then need to redefine all of the schema classes that derive from Gprim, thus preventing you from taking advantage of built-in DCC support for the UsdGeom GPrim-derived classes.  API schemas provide for "mix in" data organization.   

API schemas can be generated using the USD schema generation tools, but they can also be created manually.

 API schema就是prim的一个没有表示对象类型身份的schema(关于prim及schema的概念请查看下方prim的翻译),但只是简单的用做接口或者api来编辑或是提取相关的数据集,可以参考UsdModelAPI的例子(UsdModelAPI就是一个具体的API schema)。就USD的对象模型而言,API schema派生自UsdSchemaBase,而不是派生自UsdTyped

USD词汇表(USD Glossary)

标签:blank   default   desc   for   ida   sas   代码   different   define   

原文地址:http://www.cnblogs.com/hksac/p/7631248.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!