Well, I find an easy way to achieve this, but lose some material details.
Change the light model of the material to SCNLightingModelConstant and exclude the model from the lighting calculation of your SCNLight .
1. set light model
SCNLightingModelConstant consider ambient light only for shading, so we need external lights to preserve the visible model.
model.geometry.materials.firstObject.lightingModelName = SCNLightingModelConstant;
2. preset bitmask categories and indicators
model.categoryBitMask = 1; directionalLight.categoryBitMask = ~1UL;
If the results of bitwise AND from categoryBitMask are zero, the node will not be taken into account when lighting, so there is no longer a shadow. The Shadows model will remain in the scene.
source share