marek-simonik / record3d

Accompanying library for the Record3D iOS app (https://record3d.app/). Allows you to receive RGBD stream from iOS devices with TrueDepth camera(s).
https://record3d.app/
GNU Lesser General Public License v2.1
382 stars 55 forks source link

Import r3d metadata into blender and convert to animation #33

Closed jaeh closed 2 years ago

jaeh commented 2 years ago

Hi Marek :)

we are currently implementing a blender python script that imports a .r3d file and then automatically animates the currently selected object in blender based on the values in metadata.

the repository with our blend file, data.r3d and python script is here: https://github.com/thesystemcollective/record3d-blender-import ( the python script is embedded into blender, changes to the .py file won't change the behaviour, it is just for easier copy pasting into different blend files)

i have a few questions that would help me with debugging:

  1. am i right in assuming that the poses array is ordered like the following: [qw, qx, qy, qz, px, py, pz] where q is the quaternion and p is the position?
  2. my rotation and positioning seems to be off, did you use different axis than blender does?

please note that, for privacy reasons, i removed all files except the metadata file from the r3d file, it works with a full r3d file too though.

jaeh commented 2 years ago

just found a bug with the r3d import, will fix that, the questions remain though.

edit: fixed, online version should now work as described above and in the README.md file.

marek-simonik commented 2 years ago

Hi Jascha!

The 7-element arrays contain elements in this order: [qx, qy, qz, qw, px, py, pz] (i.e. qw is not the first element in the array).

To answer your second question: Record3D uses the OpenGL coordinate system convention, which is different than the one Blender uses; see e.g. this link for more details.

jaeh commented 2 years ago

thanks! this should be all i need to know, back to python :)

i might reopen this issue if i need more answers, hope that's fine.