I want to make blooming effect in arkit by camera settings:
self.sceneView.pointOfView.camera.bloomIntensity = 2.0;
self.sceneView.pointOfView.camera.bloomBlurRadius = 30;
self.sceneView.pointOfView.camera.bloomThreshold = 0.6;
It works great below iOS 13.0, something like this:

But when the same code run on the system iOS 13 or newer, it works like this:

The blooming settings of camera does not work.
I was able to add bloom to a node with this approach.
func addBloom() -> [CIFilter]? {
let bloomFilter = CIFilter(name:"CIBloom")!
bloomFilter.setValue(10.0, forKey: "inputIntensity")
bloomFilter.setValue(30.0, forKey: "inputRadius")
return [bloomFilter]
}
Then you can add it to your node like this:
myNode.filters = addBloom()
According to official documentation, in order to use bloom effect in iOS 13 you need, at first, to enable wantsHDR instance property for camera (to apply post-processing effects to a scene).
So your code might look like this:
@IBOutlet var sceneView: ARSCNView!
override func viewDidLoad() {
super.viewDidLoad()
let scene = SCNScene(named: "art.scnassets/myScene.scn")!
sceneView.pointOfView!.camera!.wantsHDR = true // ENABLED
sceneView.pointOfView!.camera!.bloomIterationSpread = 10
sceneView.pointOfView!.camera!.bloomIterationCount = 3
sceneView.pointOfView!.camera!.bloomIntensity = 20
sceneView.pointOfView!.camera!.bloomBlurRadius = 3
sceneView.pointOfView!.camera!.bloomThreshold = 0.5
sceneView.scene = scene
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With