Render Video
paulhimes opened this issue · comments
I'm trying to render video using a SpriteKit scene as the material of a SceneKit plane. However, it crashes on eyeRenderer.render(atTime: renderTime)
Failed to create IOSurface image (texture)
Assertion failed: (result), function create_texture_from_IOSurface, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/Jet/Jet-2.26/Jet/jet_context_OpenGL.mm, line 570.
Is it possible to play video in a SceneKit scene when using SCNRenderer?
Here's the project with my modifications:
GVR-SceneKit-video.zip
Hi! This is probably one of the places where SceneKit does not work well in OpenGL mode inside GVR SDK.
As a workaround, you can try setting individual video frames as a textures. You will need to write some helper object, that given a video file will periodically call some method with image of a frame (see stackoverflow for this).
Once you have image with frame, you will need to update texture on some box every frame or so ( inside prepareFrame(with headTransform: GVRHeadTransform) ).
Obviously this workaround approach could result less then optimal performance.