2017-08-23 70 views
2

在Youtube charnel中,我看到很多這些演示顯示了使用ARKit的門戶。實際上,我認爲他們使用Unity來構建演示。我想用ARKit和SceneKit來實現它。在ARKit中顯示相機捕捉圖像和scene.background

當我設置scene.background.contents屬性時,相機捕獲的圖像無法再顯示。

 if sceneView.scene.background.contents == nil { 
     sceneView.scene.background.contents = UIImage(named: "Media.scnassets/environment_blur.exr")! 
    } 

在iOS的11,SCNMaterial有一個新的屬性:colorBufferWriteMask,但我不知道如何使用它。 Apple使用colorBufferWriteMask在其ARKit示例代碼中實現飛機模糊對象

enter image description here

有誰知道知道如何做呢?

回答

0

是的,你需要在你的arkit場景中放置一個SCNNode。您可以將節點定義爲SCNSphere,並將圖像放置在球體邊界內或使用基本上使球體的外觀成爲圖像。

+0

我不明白。你能否提供幾行代碼? – HaoDong

相關問題