Bifrost Object
This section introduces the Bifrost object data structure on which Bifrost geometries are built.
Objects are collections of key/value pairs (i.e. properties). They are dictionary-like data structures.
Objects as Building Blocks
There is only one object data type. Conceptual types (such as materials, cameras, and geometry) are represented using a property-based sub-typing of Bifrost objects. JSON schema files are used to define these conceptual types. They define a set of properties (whose type can be another conceptual type) that are required for a conceptual type of object.
Schemas
Schemas are well-defined sets of properties and functionality that describe a conceptual type of object. Bifrost schemas follow the JSON Schema Draft V7 format. Simple examples of this format can be found online.
There are a few custom extensions to the JSON schema standard to express concepts that allow for greater re-usability of our schemas:
- typeOverrides: In a $ref block, this allows authors to override a type specified in the referenced schema.
- valueOverrides: This property allows authors to specify default values to properties in referenced schema.
By allowing property types and values to be specified on a per-reference basis, the referenced schemas can be re-used for many different types of geometric data.
In particular, the library provides predefined schemas that describe certain types of geometrical objects, as well as functionality to manipulate objects conforming to these schemas.
Bifrost Object SDK
The Bifrost object library is a collection of core functionality to support objects in Amino graphs. The SDK provides a C++ API to create objects and add, remove, get, set and iterate over properties. It also provides functionality to create objects from JSON schemas. Some base schemas that define geometrical objects such as points, strands, and meshes are included.
Links
- The Bifrost Geometry section presents how Bifrost objects are used to build points, strands, and meshes data structures.
- The Bifrost Object SDK basics section shows how the SDK can be used.