SCNMorpher and smooth vs flat rendering

I am using SCNMorpher to morph between different facial expressions on a 3D face model exported as a DAE file from Blender.


Before I first call setWeight:forTargetAtIndex: on the morpher, the model is rendered smoothly, as desired.


But as soon as I make that call, all the polygon edges become visible, which is very unattractive. It's exactly the same difference as switching from 'smooth' to 'flat' rendering in Blender itself.


You can see the smooth rendering here: http://imgur.com/WK1IrwB

And the flat rendering here: http://imgur.com/bvlai9u


I'm using the Lambert lighting model (though the others are affected just the same), and litPerPixel is true for every material of every target geometry.


I'm not clear if this is a known/deliberate limitation of SCNMorpher, a bug, or something I'm doing wrong. I wonder whether the morph is somehow screwing up the vertex normal data which would normally be used for smooth rendering.


Any light anyone could shed would be much appreciated.

Replies

My guess is that the "flat" model has wrong normal vectors. Try to open your Collada file in Preview to verify.


(By the way, that "smooth to flat" transition is interesting in itself).

I have this problem too,and can't find how to solve it. How to combine 24 .obj facial features together with SCNMorpher.

"I am using SCNMorpher to morph between different facial expressions on a 3D face model exported as a DAE file from Blender"


how do you get SceneKit to recognise the morph controllers in the dae file? I also have a Blender model with shape keys that I exported to dae. The exporter writes the shape keys as Collada morph controllers. But I can't get SceneKit to recognise these as targets for SCNMorpher. How did you set this up? (Or is it a case of having a separate dae for each shape key?)

Try to set the SCNMorpher's calculationMode property to SCNMorpherCalculationModeNormalized

Did you find the answer to this issue? I am getting the same issue, I think this is a bug, right?

Hi I think the issue is solved if you use Unify Normal and turn it on.


https://developer.apple.com/documentation/scenekit/scnmorpher/2875540-unifiesnormals?language=objc

That fixed it for me. Thank you!

I'm having exactly the same issue! Did you manage to solve Blender to Scene kit morph keys export?