Trying to integrate New DepthKit capture into A-frame

Hi Folks,

I today tried the new DepthKit capture. And it’s as smooth as butter.
I liked the simplicity, and ease of use.

I’m using this version of A-frame integration: https://github.com/juniorxsound/DepthKit-A-Frame

For importing into A-frame, which requires, a text file and the mp4 combined-per-pixel.

I used to export of new DepthKit, with spewed a lot of error.

Looking deeper, the format of txt file in the new version is different.
I tried with the previous version of txt file, and the new capture, It kind of worked, but not as expected. Of course, the metadata won’t match with the files.

Any turnaround for this? The main aim of the project is to use a web framework.

Thanks,
Chait

2 Likes

Hi there, sorry for the delay.

The Depthkit AFrame / Threejs player is still pretty experimental.

If this is still relevant for your project, could you try the following.

Copy the below json and then edit it to match your parameters (specifically depthFocalLenght, depthPrincipalPoint, nearClip and FarClip.

We’re still ironing out all the metadata formats and so there is some compatibility issues coming up.

{
"_versionMajor": 0,
"_versionMinor": 2,
"boundsCenter": {
"x": 0,
"y": 0,
"z": 1.03093326091766
},
"boundsSize": {
"x": 3.14853119850159,
"y": 1.76878845691681,
"z": 1.08638906478882
},
"crop": {
"w": 1,
"x": 0,
"y": 0,
"z": 1
},
"depthFocalLength": {
"x": 366.041,
"y": 366.041
},
"depthImageSize": {
"x": 512,
"y": 424
},
"depthPrincipalPoint": {
"x": 259.258,
"y": 203.902
},
"extrinsics": {
"e00": 1,
"e01": 0,
"e02": 0,
"e03": 0,
"e10": 0,
"e11": 1,
"e12": 0,
"e13": 0,
"e20": 0,
"e21": 0,
"e22": 1,
"e23": 0,
"e30": 0,
"e31": 0,
"e32": 0,
"e33": 1
},
"farClip": 2.0207,
"format": "perpixel",
"nearClip": 0.5207,
"numAngles": 1,
"textureHeight": 424,
"textureWidth": 512
}
1 Like

Is the A-frame plugin development on hold? Just trying to gauge what my webXR options are, I got the old on working, but it’s hard to place and scale the video. Thanks!

1 Like

Hi Mark! Looping in @obviousjim or @MichaelAllison, who may be able to provide some more insight on this topic.

Hi @MarkHellar,

Feel free to use this js file for A-Frame & Depthkit integration.
Link: https://github.com/chetu3319/Depthkit.js

You will be able to easily scale as well as use other optimization options like mesh scalar, simple play pause and other similar.

Thanks,
Chait

1 Like

Awesome this works great! Thank you!

1 Like