Goal
To separate Collection from Validation.
Motivation
I’m interested in pursuing a world where validation is as simple as…
assert rig.data("isAnimatable")
As it means technicalities can eventually be overcome via an abundance of collected information, such as isAnimatable
.
I’d like contracts to be made possible, and as simply as possible, such as…
character.rig:
- height: 2.0
- performance: 30fps
- isPointcachable: true
- isAnimatable: true
Where height
is a data member and it’s value is asserted by the relevant validation plug-in, similar to the above.
The contract could then be modified by anyone familiar and in charge of quality control, without the ins and outs of programming, pipeline or Pyblish. It would fully separate the business logic (i.e. Validation) from it’s implementation (i.e. Collection).
Implementation
On disk, the format is plain JSON, generated in the most performant manner possible; e.g. a C++ plug-in.
Some development targets.
format: json
outputSize: ~1mb
serialisationTime: <1second
humanReadable: true
informationCapturePercentage: 90
The format would remain minimal and web-friendly, such as taking < 1 second to produce, being transmittable across HTTP and occupy less than 1 mb on disk, containing information relevant only to Instance
's and validation.
For example.
transform
boundingBox
currentFile
- Children of each
Instance
along with attributes of each child e.g.type
transform
normalDirection
boundingBox
- UV shells along with attributes of each e.g.
overlapped
inverted
The resulting file might resemble something like this.
hulk_shot1.psh
"MyInstance": {
"data": {
"transform": [
[0.0, 10.0, 0.0],
[0.0, 0.0, 0.0],
[1.0, 1.0, 1.0]
],
"boundingBox": [
[0.0, 0.0, 0.0],
[10.0, 10.0, 10.0]
],
"currentFile": "c:\\project\\myfile.mb"
},
"children": [
{
"name": "arm_GEO",
"attributes": {
"type": "mesh",
"transform": [
[0.0, 10.0, 0.0],
[0.0, 0.0, 0.0],
[1.0, 1.0, 1.0]
],
"normalDirection": [0.0, 5.43, 0.33],
},
"uvShells": [
{
"id": 0,
"inverted": false,
"overlapped": true
}
]
}
]
}
Format
Any declarative format is equally well suited and the choice ultimately boils down to either cosmetics or compatibility. JSON was chosen for it’s compatibility with JavaScript and web-technologies, as the format is expected to be transmitted either locally via IPC or remotely such as to a server in the cloud.
Scope
To cover a vast majority of validations, but no extractions or integrations.
In the most epic of production scenes, no file is ever expected to reach the 1 mb ceiling. I’m expecting the vast majority of space currently consumed by large scenes to be per-point data, such as vertices or animation curves. Without these, raw data relevant to validation should remain in the kb-range.
In addition to the 1-to-1 data typically stored by the DCC software, computed information may also be stored. In the above example, uvShell
is such a member as it contains information not normally present in the scene file itself, but rather post-computed by a relevant visualiser (in this case the UV editor) based on surrounding information - in this case the UV points themselves.
The Pyblish file format would include such members and provide for additional members to be added dynamically, similar to how the Alembic file format provides a foundation of default attributes, e.g. pointPosition
but also offers the ability to attach any arbitrary data at run-time.
This arbitrary data should enable the foundation Pyblish file format to remain small and nimble, yet cover a majority of validation scenarios, whilst still giving room to the more esoteric uses most scenarios will undoubtedly have.
Discussion
The proposed design changes how we perceive validation today. Rather than tailoring each validation to a particular asset, properties of each asset is mapped into a format compatible with Pyblish and a series of available validations.
The validations can then be pre-built and be made configurable, as discussed in Plug-ins as Modules.
I’m seeing a future where there are hundreds, if not thousands of these curated validators available to us, all written to conform to the Pyblish file format and the information available within it, and possible available in the cloud with no need to install or set them up.
Any information not already available in the file format itself may be added dynamically, similar to Alembic, and would become equally ad-hoc to the ones we create today. The goal of course being that the file format should encompass >90% of the need and that >90% of unavailable information could be computed indirectly.