Help needed with import and render solution

I have this idea for a game and I want it to look a certain way.

The requirements are quite modest.


I want to be able to load in a scene, made from a node-graph of geometry instances.

I then want to apply my own shader to the rendering to acheive a spcific visual effect. This needs custom uniforms going to the shader.

And then I want all that rendered to a texture so that I can do a type of distortion on the image.


It really should not be very difficult.


My first stop was SceneKit. Which nicely includes import for DAE. I can manipulate the scene as SCN in XCode. And then use the built in rendering.

This was very easy.


But when I came to applying my own shader, I discovered that SCNTechnique is not properly supporting scene rendering. The callbacks needed to send additional uniforms to the renderer are not supported at all in Metal. And in OpenGL are broken. (I have filed a radar 23681745)


SceneKit is also a bit uncooperative. I need to access stuff like the ViewMatrix and the ProjectionMatrix, and there does not seem to be functions to get at this stuff.


Perhaps I should just write my own render pipeline? And import geometry with ModelIO

I looked at MetalKit to provide ready-made structures for mesh and submesh. But I still need to import geometry.


That means I need.

DAE -> nodes of MTKMesh

or

SCN -> nodes of MTKMesh


If I try to create a MDLAsset directly from a loaded SCNScene - this results in an problem. MTKMeshes are not created because it is not using a buffer allocator.

I can ask Model I/O to directly load Alembic files. But I am frustrated that I am having to avoid the formats that all this other Apple technology works in.


Is there some obvious solution I am missing?