Jacobo Bibliowicz
Workshop Goals
Workshop Results
Comments
Update from Day 2:
Spent some time in the morning attempting to coerce CMake to produce a file with extension .mll which is what Maya requires, but to no avail. Eventually just changed the value in the generated VC project. Need a better solution. The rest of the morning I spent correcting some issues with the geometry import, in particular for scaled models. Added attributes to hold extra OpenSim info such as mass, center of mass, and inertia.
Began implementing Joints. The Joint is a transform node under the parent Body's transform node, placed at the "location in parent." The child Body's transform node is then placed under the Joint transform and moved to match the correct position/orientation. Coordinates are implemented as extra attributes on the Joint transform node.
This got me most of the way there with some models, such as the arm26 model. Others, such as separate legs, had some issues.
I spent the afternoon learning about the different types of Joints. Focusing my time on CustomJoint as it seems to be the most prevalent one in the Models. Basically, it wraps six functions–three in a rotational axis and three translations along an axis. There are a number of functions. The most prevalent seem to be Constant, LinearFunction, and SimmSpline.
I think I'll only be able to implement translations in the time given. I set up three point attributes in the joint for each of the translation functions. I compute each function using expressions and finally set an expression to add the three translations together to get the final result. Implemented the first two function types that way. Ran into some issues with Maya expressions but finally plowed through those. This morning as I'm considering implementing SimmSpline I think it might be better to remove the expressions and implement it all using driven keys. That is the plan for today.
Final Update:
Managed to get 85% of the way there. CustomJoint is implemented but there are a lot of leg models using a MultiplierFunction which simply scales an underlying function. Did not get a chance to implement it. However, I'm very satisfied with my progress in this regard.
I'll post my presentation slides which have result images on this site. These also discuss some of the implementation details.
Thank you to the OpenSim team for your help this week. It was an honor and a pleasure to be a participant here and I look forward to working with OpenSim in the future!
Update from Day 1:
Surprised by new OpenSim 3.0 beta. Unfortunately I had runtime library incompatibility problems between OpenSim and Maya. So I spent the afternoon compiling OpenSim from source. Then I recompiled my Maya plugin. Spent some time getting the CMake code correct.
CMake flags that I learned about through the process:
LINK_FLAGS: a property of a Target which provides flags for the linker. Must set it using SET_TARGET_PROPERTIES. Needed this to export the initializePlugin() and uninitializePlugin() in Maya.
COMPILE_DEFINITIONS: another Target property which holds extra preprocessor symbols. In order to append the new symbols without removing any other ones, can use the SET_PROPERTY command with the APPEND directive.
** Have yet to find a way to produce an .mll file instead of a .dll file without changing the global library suffix for CMAKE. Trying ADD_CUSTOM_COMMAND to add a post-build step to move the file from target.dll to target.mll, but so far it's not working.
Plan for Day 2:
Importing Joints.