Procedural Sky with Sun Directional Light based on Location

Just wondering about a couple of thing in regards to SCN inside ARKit environment.


I am testing Procedural Sky with ARKit, seems like it does not actually work. I was hoping to get some kind of realtime sunlight affecting the 3D model to cast shadow that is more or less automatic based on light condition.


Is there something I was missing? First of all, can Procedural Sky affecting model in SceneKit editor actually works with ARKit? Or it needs to be PBR only?

Accepted Reply

Answering my own question:


Very possibly, ARKit environment light (Sky) ONLY reacts correctly when there is one material or object with PBR light, with Environment Light set in the scene. I tested having both PBR material and other non PBR materials (Blinn, etc). Having Procedural Sky set will not work for material light Phong, Blinn... until PBR material and Procedural Sky is set. Although I have a feeling that PBR material is still safest to work with AR.


Probably a little bug of Scene Editor with ARScene connection.


This is using XCode 9 beta with iOS 11 beta.

Replies

Answering my own question:


Very possibly, ARKit environment light (Sky) ONLY reacts correctly when there is one material or object with PBR light, with Environment Light set in the scene. I tested having both PBR material and other non PBR materials (Blinn, etc). Having Procedural Sky set will not work for material light Phong, Blinn... until PBR material and Procedural Sky is set. Although I have a feeling that PBR material is still safest to work with AR.


Probably a little bug of Scene Editor with ARScene connection.


This is using XCode 9 beta with iOS 11 beta.

The procedural sky settings in Xcode's scene editor let you configure a sky cube, but nothing I've seen indicates that this should affect the lighting estimate managed by ARKit (which is gathered by processing video frames—I don't think there's any lookup based on the user's geographic location). Having said that, there's definitely some cool potential for integration between those technologies! Maybe I can jump ahead to the next eclipse in AR with your app. 🙂

Good