SceneKit: how to reproduce the iOS 9 color lighting effect (one directional, one surrounding) on ​​iOS 10 without disabling PBR?

As mentioned in this section on Apple forums, the indicators on iOS 10 are now weaker and change how the scenes look.

The thread suggests installing SCNDisableLinearSpaceRenderingin YES, but this did not work. In other words, using SCNDisableLinearSpaceRenderingit will not make your scene 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

The screenshots below show the difference between the same scene. Please note that the floor turns from green to yellow, although the lighting is the same.

The scene contains one directional light and one ambient light.

Files for playing the scene: https://www.dropbox.com/sh/cg5f7hyf1oonxfu/AAAJef7LhpSxuJyUSjqfGbmca?dl=0 .

Even if it worked, installing SCNDisableLinearSpaceRenderingon YES seems to disable PBR.

Our application allows users to customize the color of the directional light. The goal is to reproduce the same customized lighting from the iOS 9 scene in the iOS 10 scene, taking advantage of PBR.

1) How can we ensure that iOS 10 scenes look identical to iOS 8/9 scenarios?

2) How can you reach # 1 when using PBR?

iOS 8/9 (run on simulator):

enter image description here

iOS 10 (launch on user device):

enter image description here

+4
source share
2 answers

. Bug Reporter 28459280. , Metal locksAmbientWithDiffuse true iOS 10.

Scene Kit, , locksAmbientWithDiffuse true ( node), iOS 8/9 .

, iOS 10 , iOS 8/9.

0

iOS 10, iOS 9, SCNLightingModelPhysicallyBased SCNLightingModelBlinn.

. 3D-:

for(SCNMaterial * mt in model.geometry.materials)
    mt.lightingModelName = SCNLightingModelBlinn;

, , PBR. PBR, intensity temperature SCNLight .

+1

Source: https://habr.com/ru/post/1654757/


All Articles