Unable to load a MPCDI example

Hi everyone!

Does anyone have a MPCDI example running in touchdesigner? I’ve been trying to load a simple example (1 region, 2d) with no success. I’ve attached the example I’m trying to load. Just replace the zip extension for the mpcdi extension

Thanks!

identity.zip (1.2 MB)

Hi @Cocolab,

the file doesn’t load for me for 2 reasons:

  • the package has a nested folder but it should contain a flat file structure.

From the spec:

Each component within the container will be an individual file. […] All container files will be managed at the root directory level the within the container. There shall be no sub-directories within the container itself.

  • after that the importer complains about missing geometry, color, and version attributes in the MPCDI tag.
  • It is also complaining about missing xSize and ySize attributes in the region tag. Those are currently being treated as case sensitive but we need to change this to case-insensitive as required by the spec.

As following with the XML conventions, tags and attribute names will be case-insensitive.

Currently your xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<MPCDI profile="2d" date="2012-10-29 04:29:05">
    <display>
        <buffer id="1" xResolution="1024" yResolution="768">
            <region id="0" x="0" y="0" xsize="1" ysize="1" xResolution="1024" yResolution="768"></region>
        </buffer>
    </display>
    <files>
        <fileset region="0">
            <geometryWarpFile>
                <path>geometry_channel_0.pfm</path>
            </geometryWarpFile>
            <alphaMap>
                <bitDepth>8</bitDepth>
                <componentDepth>3</componentDepth>
                <gammaEmbedded>2.2</gammaEmbedded>
                <path>alpha_channel_0.png</path>
            </alphaMap>
        </fileset>
    </files>
</MPCDI>

Via the spec though, there must be a version, color, and geometry attribute:

Directly following the XML version tag shall be the main MPCDI tag. This tag must contain
the following attributes:

<MPCDI profile="[valid profile name*]" geometry="[valid geometry
level*] color="[valid color level]" date="[file generation date
and time]" version="2.0">

Further there is also the color tag missing inside the region tag. Another requirement of mpcdi.

Can you let us know how the mpcdi file was generated?
I’m attaching here a “fixed up” version… (same thing with .zip ending…)
identity.zip (1.2 MB)

cheers
Markus

Thanks for the reply Markus!

This was a modified example of one inside the Mersive MPCDI Reference Implementation from the VESA website. It was not made with any software, I tried to modify it since the one that came there could not load either and I could not find any other example or snippet.

Our idea is to start making some tests with some mapping tools / workflows that we already have in Touchdesigner and VVVV and try to export them in MPCDI to load them in Unreal Engine / NDisplay projects.

Hey @Cocolab,

let me know how this goes and I’d be happy to test some more files…
I did discover some shortcomings thanks to your file - we’ll have some fixes for that soon.

Something for the near future (30k) would be that the Camera and Light COMPs can now create a dictionary with the values necessary to create a MPCDI file:

op('cam1').mpcdiRegion(1920, 1080)
# will result in
{
    'region': {
         'xResolution': 1920,
         'yResolution': 1080, 
         'id': 'cam1',
         'frustum': {
             'yaw': -0.0, 
             'pitch': -0.0, 
             'roll': -0.0, 
             'rightAngle': 22.499998092651367, 
             'leftAngle': -22.499998092651367, 
             'upAngle': 13.115642547607422, 
             'downAngle': -13.115642547607422
         }, 
         'coordinateFrame': {
             'posx': 0.0, 
             'posy': 0.0, 
             'posz': 5.0, 
             'yawx': 0.0, 
             'yawy': -1.0, 
             'yawz': 0.0, 
             'pitchx': 1.0, 
             'pitchy': 0.0, 
             'pitchz': 0.0, 
             'rollx': 0.0, 
             'rolly': 0.0, 
             'rollz': -1.0
         }
    }
}

cheers
Markus

1 Like