SceneKit Multiply (blend mode). Not workin on PBR

I have added a material to my geometry of SCNNode and now I want to add another material to it and set it to blend mode 'multiply'.

I tried a lot but unable to find a way to do this. If we blend the texture as


material.lightingModel = .physicallyBased

let image = UIImage(named: "1.PNG")

material.multiply.contents = image

material.multiply.contentsTransform = SCNMatrix4MakeScale(10, 10, 0)

material.multiply.wrapT = .repeat

material.multiply.wrapS = .repeat

material.multiply.intensity = 1.0



when set to “ physically based”. The multiply doesn’t work....


any clue what is wrong?


thanks!

Did you resolve your issue?


I seem to have the same problem with multiply not working (ie it has no effect) when lightingModel is physically based in iOS 11.4beta6. The exact same code works when the lighting model is changed to phong, except now the lighting on the object is wrong for the scene where physical based lighting is used.

According to Apple is a bug, and they have no ETA for fixing it... 😟

Don't use the .multiply content, set the texture to the .diffuse content and set the material blend mode to .multiply.
Code Block
let material = scnNode.geometry?.firstMaterial
material?.blendMode = .multiply
material?.diffuse.contents = yourImage

SceneKit Multiply (blend mode). Not workin on PBR
 
 
Q