I'm trying to play 180 fisheye video with scenekit and one of the examples I found is using a sphere as AVPlayers geometry to play 360 degree video.
Problem is the video I'm using is captured with 180° fisheye camera and I need to represent it with a half sphere.
I've been fiddling with the code for 2 days but with no luck.
Since I'm not experienced in this subject, I've tried to put AVPlayer partially onto a full sphere or cut the SCNSphere in half without success.
The code below is for playing 360 video and from simple360player_iOS GitHub repo,
var screenScale : CGFloat = 1.0
if PROCESSOR_64BITS {
screenScale = CGFloat(3.0)
}
player = AVPlayer(URL: fileURL!)
let videoSpriteKitNodeLeft = SKVideoNode(AVPlayer: player)
let videoNodeLeft = SCNNode()
let spriteKitScene1 = SKScene(size: CGSize(width: 1280 * screenScale, height: 1280 * screenScale))
spriteKitScene1.shouldRasterize = true
var spriteKitScenes = [spriteKitScene1]
videoNodeLeft.geometry = SCNSphere(radius: 30)
spriteKitScene1.scaleMode = .AspectFit
videoSpriteKitNodeLeft.position = CGPoint(x: spriteKitScene1.size.width / 2.0, y: spriteKitScene1.size.height / 2.0)
videoSpriteKitNodeLeft.size = spriteKitScene1.size