ios – SceneKit. Methods to obtain default scene mild conduct with out autoenablesDefaultLighting?


I attempted to set autoenablesDefaultLighting=true for my SCNView and it seems good. Nevertheless i need to obtain the identical conduct with out autoenablesDefaultLighting with setting mild and regulate it a bit of bit.

I attempted omni mild with this code:

let lightNode = SCNNode()
lightNode.mild = SCNLight()
lightNode.mild?.castsShadow = true
lightNode.mild?.kind = .omni
lightNode.mild?.depth = 10000
lightNode.place = SCNVector3(x: 0, y: 0, z: 100)
scene.rootNode.addChildNode(lightNode)

And acquired this:
enter image description here

And with autoenablesDefaultLighting=true I acquired this:

enter image description here

Leave a Reply