Page MenuHome

Imports C3D Graphics Lab Motion Capture files
Closed, ResolvedPublic

Description

Project: Blender Extensions
Tracker: Py Scripts Upload
Blender: 2.63
Category: Import Export
Python: 3.2
Script name: C3D Graphics Lab Motion Capture file (.c3d)
Wiki page: http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Import-Export/C3D_Importer
Author(s): Daniel Monteiro Basso
Status: Open

This is an importer for C3D motion capture files. I'll upload the addon and make a proper description later.

Details

Type
Patch

Event Timeline

Upload of first public version of the add-on. Included a C3D file from CMU Mocal Library for testing (the one matching the test motion of http://projects.blender.org/tracker/index.php?func=detail&aid=27127&group_id=153&atid=467 ).

Installation and use is trivial:
- in user preferences click 'install add-on' and select the zip file attached (io_import_c3d.zip), then enable the add-on.
- in "file / import / graphics lab motion capture (.c3d)", select the test file and have fun.

Hi,
Due to changes to the api including the merging of bmesh, several addons are outdated.
Please, if you are the author of an addon check your script with blender revision 44256 or newer.
That is builds made After blender 2.62 official release.
I would ask that updates be made to your addon before the Blender 2.63 release.
6-8 weeks away.
This allows time for the api to become more exposed & bmesh to stablize furthur.
If you need help, drop into irc freenode #blenderpython or #blendercoders & feel welcome to ask questions.
At the time of 2.63 release, scripts that are not repaired or in active developement will have their tracker page marked "Closed"
this will not affect your links to the tracker, similar to closing scripts in 2.49b, the page will be still availible & can be re-opened.

Thanks for your understanding & patience during these Exciting Times.
Brendon.

Hi,
there is an error message, while trying to import .c3d data exported by Cortex from Motion Analysis.
Did you know about this issue yet?
I ll upload a screenshot of the message and a sample file.

Any help or advice is much appreciated. Many thanks!
Jens

I attach an example to make things easier to figure out. Many thanks!
Jens.

Hi, I fixed the problem, now the markers are imported just fine. Cortex uses the Y axis as up vector, so you'll have to rotate everything to align it with the Z axis. You can parent all markers (empties) to an empty at the origin, then rotate X 90 degrees. It all depends on what you intend to do.
If you don't want to wait for a build that bundle the corrected addon, you can download the attached new version.
Cheers,
Daniel
PS: funny mocap :-)
----------------------------------------
Revision: 3611
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3611
Author: dmbasso
Date: 2012-07-10 14:22:10 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
fix for problem reported by Jens Meisner

Cortex from Motion Analysis exports the LABELS parameter
in a different group (not POINT); now the importer searches
all groups for a LABELS parameter.

Bonus! I added an option to automatically convert from Y-up coordinates. You're welcome. ;)

Addon zip file removed to avoid conflicts with newer Blender versions. The addon is bundled with Blender in the 'testing' (contrib) section.

Closing as resolved, addon is in contrib

Addon zip file removed to avoid conflicts with newer Blender versions. The addon is bundled with Blender in the 'testing' (contrib) section.

Hi Daniel,

I have a .c3d file which I imported using your amazing .c3d importer addon, then I modified the location of some points and now I want to export it back to .c3d file. Any idea please?

Hello @John (shepherd), unfortunately there is no easy way to export it back to a .c3d file. The addon can import specially-crafted .csv files (first row must have the labels as 'marker_x', 'marker_y', ...), so if you only intended to consume it back in Blender you could write a script to output such a format (not very difficult).

Hello @Daniel M. Basso (dmbasso) thank you very much for your response and kind reply. Could you please advise me how this can be done? Like I'm a little bit confused when you said "there is no easy way to export it back to a .c3d file" with " you could write a script to output such a format (not very difficult)." Could you please advise how I can do it? I can record the location of each of the imported c3d points for everyframe in blender, but how I can export it to be a working .c3d file?

I apologize for my convoluted answer, let me try to clarify:

I'm a little bit confused when you said "there is no easy way to export it back to a .c3d file" with " you could write a script to output such a format"

"such format" refers to .csv, not .c3d.

how I can export it to be a working .c3d file?

You can't. The addon only imports .c3d and .csv files.

I'm sorry but I don't have any suggestion that would not require extensive amounts of coding.

Okay, thank you very much. I'll see how it goes and let you know.