Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Apple Motion Motion + cameraMatrixAtTime

  • Motion + cameraMatrixAtTime

    Posted by Patric Logan on June 17, 2010 at 6:49 am

    Hello.
    At last I know how to get camera position from Motion thanks to fxplug:

    id 3dnow = [_apiManager apiForProtocol:@protocol(Fx3DAPI)];

    NSData* camData = [3dnow cameraMatrixAtTime:renderInfo.frame];

    double camMatrix [4][4];

    [camData getBytes:&camMatrix
    length:16 * sizeof (double)];

    NSString *string = [NSString stringWithFormat:
    @"Camera position:\n\nX: %f\nY: %f\nZ: %f",
    camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];

    Can anybody tell me how to get light position in motion? I don’t know what command gives me that possibility.
    Thanks!

    Patric Logan replied 15 years, 11 months ago 1 Member · 1 Reply
  • 1 Reply
  • Patric Logan

    June 17, 2010 at 10:06 am

    id fx3DAPI 3dnow = [_apiManager apiForProtocol:@protocol(Fx3DAPI)];

    NSData* camData = [3dnow cameraMatrixAtTime:renderInfo.frame];

    double camMatrix [4][4];

    [camData getBytes:&camMatrix
    length:16 * sizeof (double)];

    NSString *string = [NSString stringWithFormat:
    @"Camera position:\n\nX: %f\nY: %f\nZ: %f",
    camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];
    camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];

    p.s. fx3DAPI should be in angle bracket – code doesn’t allow me to do that and in last post it dissapeared

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy