blockDat

Last Updated  01.02.2019 РVERY EARLY

Overview

BlockDat is the what we call the core data set of a rigblock. It comprises everything necessary for the replication of a given rigblock.

How data is stored

We currently store data to a rigBlock as an indexed json Dict. That looks something like this:

{u'baseName': u'middle',
 u'blockScale': 1.037493482218997,
 u'blockState': u'template',
 u'blockType': u'limb',
 u'define': {u'orients': [[52.22471587773368,
                           -71.93779744222662,
                           -16.535790332436875],
                          [52.22471587773368,
                           -71.93779744222662,
                           -16.535790332436875],
                          [52.22471587773368,
                           -71.93779744222662,
                           -16.535790332436875],
                          [5.389233579525813,
                           -78.6114656770376,
                           -3.2547763552193154]],
             u'positions': [[-74.79985247829057,
                             89.59468401000198,
                             6.8309683204825085],
                            [-67.3221197598987,
                             96.5377039202826,
                             5.137624991826678],
                            [-66.42490656915008,
                             95.59145818175912,
                             5.888416325692915],
                            [-62.11273142938996,
                             96.97845763451818,
                             3.656240724223191]],
             u'scales': [[2.1279380321502686,
                          1.6460264921188354,
                          1.886982262134552],
                         [1.0, 1.0, 1.0],
                         [1.0, 1.0, 1.0],
                         [1.0, 1.0, 1.0]]},
 u'orient': [52.22471587773366, -71.93779744222662, -16.53579033243688],
 u'position': [-66.74114618435289, 95.68534753799752, 4.876879197491775],
 u'rootOrientHelper': [0.0, 0.0, 0.0],
 u'scale': [1.037493482218997, 1.037493482218997, 1.037493482218997],
 u'template': {u'loftCurves': {u'0': {u'p': [-62.11273142938995,
                                             96.97845763451818,
                                             3.6562407242231947]},
                               u'1': {u'p': [-66.74114618435289,
                                             95.68534753799753,
                                             4.876879197491785]},
                               u'3': {u'p': [-69.4273789294334,
                                             93.65512839221766,
                                             5.528241587126501]},
                               u'4': {u'p': [-72.11361973321017,
                                             91.62490315578187,
                                             6.179605930847902]},
                               u'5': {u'p': [-75.0427217839515,
                                             89.95100176945735,
                                             6.939970093867182],
                                      u's': [0.43219668963492186,
                                             0.432196689634922,
                                             0.4321966896349216],
                                      u't': [-2.5891706859925808e-15,
                                             0.4447799814925754,
                                             -1.6077368156588644e-14]}},
               u'orientHelpers': {},
               u'orients': [[34.22581051559483,
                             -72.67783981267927,
                             -19.86320553000147],
                            [52.22471587773368,
                             -71.93779744222662,
                             -16.535790332436875],
                            [52.22471587773368,
                             -71.93779744222662,
                             -16.535790332436875],
                            [52.22471587773368,
                             -71.93779744222662,
                             -16.535790332436875],
                            [52.22471587773368,
                             -71.93779744222662,
                             -16.535790332436875],
                            [52.22471587773368,
                             -71.93779744222662,
                             -16.535790332436875]],
               u'positions': [[-62.112731429389946,
                               96.97845763451815,
                               3.656240724223186],
                              [-66.74114618435289,
                               95.68534753799752,
                               4.876879197491773],
                              [-66.74114618435287,
                               95.68534753799753,
                               4.876879197491779],
                              [-69.4273789294334,
                               93.65512839221766,
                               5.528241587126499],
                              [-72.11361973321016,
                               91.62490315578185,
                               6.1796059308479006],
                              [-74.79985247829057,
                               89.59468401000197,
                               6.830968320482507]],
               u'scales': [[1.0, 1.0000000000000002, 0.9999999999999997],
                           [1.0, 1.0, 1.0],
                           [1.0, 1.0000000000000002, 1.0],
                           [1.0, 1.0, 1.0],
                           [1.0, 1.0, 1.0],
                           [1.0000000000000002,
                            1.0000000000000002,
                            1.0000000000000002]],
               u'subShapers': {u'0': {u'o': [[34.22581051559291,
                                              -72.67783981267887,
                                              -19.863205529999515]],

Let’s break it down a bit.

  • version – when this rigBlock was made originally
  • The first level of data is root data
  • Then each state has a dict
    • Sorted by ordered index lists for the handles of that state
    • Sub shapers and others have sub dicts further still
  • ud – these are a simple collection of userdefined attributes on the rigBlock

For example, let’s look at the template state data.

  • orientHelpers is empty because this block doesn’t have data there
  • orients – indexed list of template handle orients
  • positions – indexed list of template handle positions
  • scales – indexed list of template handle scales
  • loftCurves – this is a keyed sub dict which has data indexed by the handle’s list index
    • This sub dict has data that it finds:
      • p-position
      • s-scale
      • r-rotate
      • t-tranlsate
      • o-orient
  • subShapers
    • Keyed sub dicts with data per subShaper

 

Roadmap

  • Need to add external file profiles for block dat
  • Want to add blockDat loading when the template handle count/shaper handle count changes
  • Look into storing component data

Change Log

2019

January

  • Bug fix for subshapers not loading properly

 

Josh Burton

[MRS Project Lead | CG Monks] Josh is an animator turned TD who hails from Oklahoma, pre-undergrad in the Marine Corps, animation basics at Savannah College of Art and Design, cut his teeth in gaming and commercials before co-founding CG Monks and more recently the CG Monastery. The Morpheus Rigging System is a culmination of years of R&D and he is now thrilled to see what users can create, collaborate and expand on with this open source MRS platform.