As this thread on the Apple forums mentions, lights on iOS 10 are now weaker and change how scenes look.
The thread suggests setting SCNDisableLinearSpaceRendering
to YES, but this did not work. Put another way, using SCNDisableLinearSpaceRendering
will not make your scene look the same on iOS 10 as on iOS 9 -- at least not in our testing.
We also tried:
floorNode.geometry?.firstMaterial?.lightingModel = SCNMaterial.LightingModel.blinn
Screenshots below show the difference between the same scene. Notice how the floor turns from green to yellow even though the lighting is the same.
The scene contains one directional light and one ambient light.
Files for reproducing scene: https://www.dropbox.com/sh/cg5f7hyf1oonxfu/AAAJef7LhpSxuJyUSjqfGbmca?dl=0.
Even if it did work, setting SCNDisableLinearSpaceRendering
to YES seems to disable PBR.
Our app lets users customize the color of a directional light. The goal is to reproduce the same customized, lighting from an iOS 9 scene in an iOS 10 scene while taking advantage of PBR.
1) How can we ensure iOS 10 scenes look identical to iOS 8/9 scenes?
2) How can you achieve #1 while benefiting from PBR?
iOS 8/9 (run on simulator):
iOS 10 (run on user device):
You can render your scene on iOS 10
like it is rendered on iOS 9
by changing the lighting model of its materials from SCNLightingModelPhysicallyBased
to SCNLightingModelBlinn
.
Example: If you have only one 3D model in your scene:
for(SCNMaterial * mt in model.geometry.materials)
mt.lightingModelName = SCNLightingModelBlinn;
However by doing this you won't be able to take advantage of PBR. If you want to keep using PBR, then you can play with the intensity
and temperature
properties of SCNLight
to achieve different results.
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