Detect a real world object using ARKit and SceneKit
ARKit
can detect planes, but right now only horizontal ones, see this answer here.
Other detections are not part of ARKit
.
Augmented Reality – Lighting Real-World objects with Virtual light
At the low level, RealityKit is only responsible for rendering virtual objects and overlaying them on top of the camera frame.
If you want to illuminate the real scene, you need to post-process the camera frame.
Here are some tutorials on how to do post-processing:
Tutorial1⃣️
Tutorial2⃣️
If all you need is an effect like This , then all you need to do is add a CGImage-based post-processing effect for the virtual object (lights).
More specifically, add a bloom filter to the rendered image(You can also simulate bloom filters with Gaussian blur).
In this way, the code is all around UIImage and CGImage, so it's pretty simple/p>
If you want to be more realistic, consider using the depth map provided by LiDAR to calculate which areas can be illuminated for a more detailed brightness.
Or If you're a true explorer, you can use Metal to create a real world Digital Twin point cloud in real time to simulate occlusion of light.
Related Topics
Cloudkit - "Invalid Bundle Id for Container"
Saving Swifty JSON Array to User Defaults
Referencing Self in Super.Init
Realitykit - How to Add a Video Material to a Modelentity
How How to Perform Multiple Alamofire Requests That Are Finished One After Another
Find Out When Uikeyboard.Frame Intersects with Other Frame
Does Nsnumberformatter.Stringfromnumber Ever Return Nil
iOS Swift - Uitableviewcell Custom Subclass Not Displaying Content
How to Get Core Data Entity by It's Objectid
How Does Appdelegate.Swift Replace Appdelegate.H and Appdelegate.M in Xcode 6.3
How to Delete Object in Array of Dictionaries Using Key Value
Images Inaccessible from Asset Catalog in a Swiftui Framework
How to "Explicitly" Implement a Protocol in Swift? If It Is Impossible, Why
Concatenate Literal with Optional String
Swift Callkit Sometimes Can't Activate Loudspeaker After Received Call (Only Incoming Call)