How to Load Scene Kit View into Motion 5

I want to take a Scene kit view which is normally displayed in a .xib file like so:


SCNView *sceneView = (SCNView *)self.view;


This sceneview is then generally called by the awakeFromNib method from what I have seen.


But instead of the view being created in the view i want to display it in the canvas of Motion 5 which grabbed via the FxPlug SDK via the renderOutput method in the FxPlug API as seen in the method signature. In the signature there is an outputImage where you cna grab the width and the height which represent the canvas in which to use for Motion.

- (BOOL)renderOutput:(FxImage *)outputImage
  withInfo:(FxRenderInfo)renderInfo


I want to be able to use the Scenekit SDK and functionaility that it provides but display what I create inside of Motion 5 via the FxPlug Framework. Is there a way to accomplish this? Is it possible to take a Scenekit and convert it into an FxImage so they are usable textures? I know this is a long shot but any help or guidance would be greatly appreciated.

So I have gotte nto this point where I am sending some data to the console but still cant get anything to render on the screen. Here is the code I have so far and its corresponding output in the console:



- (BOOL)renderOutput:(FxImage *)outputImage
  withInfo:(FxRenderInfo)renderInfo
{
  BOOL retval = YES;
  id parmsApi = [_apiManager apiForProtocol:@protocol(FxParameterRetrievalAPI)];


    SCNRenderer *renderer;

    SCNScene *_scene;

    SCNNode *cameraNode;

    _scene = [SCNScene scene];

    renderer = [SCNRenderer rendererWithContext:renderInfo.sharedContext options:nil];
    renderer.autoenablesDefaultLighting = YES;
    renderer.playing = YES;
    renderer.loops = YES;
    renderer.showsStatistics = YES;

    renderer.scene = _scene;
    SCNCamera *camera = [SCNCamera camera];
    cameraNode = [SCNNode node];
    cameraNode.camera = camera;
    [_scene.rootNode addChildNode:cameraNode];
    renderer.pointOfView = cameraNode;

    renderer.sceneTime = renderInfo.time.frame;
    NSLog(@"Renderer Info: %@", renderer);
return retval;
}



And the console output:



Renderer Info: <SCNRenderer 0x14ede9890: scene = <SCNScene: 0x14edc6f30>, pointOfView = <SCNNode: 0x14ed3f680 | camera=<SCNCamera: 0x14edc5260> | no child>, sceneTime = 0.000000, context = 0x108255000>

So when I run this in Motion i have nothing diplayed on the screen even if I try to add something to the scene via OpenGL but when I run Motion the sceneTime actually updates and things seem to be received on Motion's end. Any thoughts or ideas would be greatly appreceated.

I'm not an expert on SceneKit, but it looks to me like you haven't asked the renderer to actually render anything. I think you need to add [-renderer renderAtTime:].

How to Load Scene Kit View into Motion 5
 
 
Q