On 04/08/2015 at 13:55, xxxxxxxx wrote:
I've been in Vicon's CaraPost software these days (crazy!), and, skipping all the verbose details, I need to execute a script.py on a bunch of vector data BEFORE I bring it (an fbx) into C4D--all that's fine.
C4D's been my primary Python place for a few years, now, and I was daydreaming about importing the c4d module outside of c4d so I could use utils' matrix helpers. Well, that would be lazy of me and I'm guessing not possible (I imagine the modules are tucked away somewhere), so my primary question is:
Does anyone have a module suggestion for replicating c4d's matrix and helper functions from utils? I'm currently looking into NumPy, then thought I'd just do it myself which took me to places like this one, then started searching again and quickly thought, "If only I could use c4d.utils!" It's good to get me out of my comfort zone, but still, sheesh, it's a crazy world out there.
Just to repeat/clarify: I have an imaginary null object with a position and rotation vector (list of three floats). I need to solve for the matrix required to move that null to position2/rotation2 and multiply a list of vector3's by said matrix. I think that question's too big for someone to just walk me through, so I was looking for module advice and distantly hoping I could just be lazy and use c4d.utils out of c4d.
If you read all of this, thanks again x 1,000!
On 04/08/2015 at 17:39, xxxxxxxx wrote:
The mystery is lessened by this page, so I'm not currently going down the alternate module path, since all I need are those two operations. I think I'll just make my own translation matrix class.
Not sure if that hyperlink is working, here it is in case it's not:
On 05/08/2015 at 02:05, xxxxxxxx wrote:
Any reason why you can't just run the script from Cinema 4D? Otherwise, I guess NumPy is the way to go.
On 05/08/2015 at 10:24, xxxxxxxx wrote:
Yeah, my post was getting long, but the module Cara uses is called PyCara, and it insists you install it with Python 2.7.10. Vicon's been around for a while, of course, but this facial tracking system they have (CaraPost) is very new and a little rough around the edges in places. Hence the need (desire) for the c4d module outside of c4d, because I can't get the PyCara module *into* c4d
On 05/08/2015 at 10:51, xxxxxxxx wrote:
Unless this is not a straight C4D -> PyCara -> C4D process, in which you could simply preprocess and
postprocess the data in Cinema 4D, I think you should go for NumPy or something similar.
On 07/08/2015 at 11:48, xxxxxxxx wrote:
Yeah, I just did my own 4x4 hack job matrix in the end, but for future googlers I found this, too (I don't think it'll hyperlink) :
Sorry for taking this thread so far off the C4D track!