Prerequisites
- A working iOS quickstart
- A ready camera preview and valid beauty capability
Apply a subtle preset
Use the shared effects engine after the preview is ready:
NosmaiEffectsEngine *effects = [NosmaiCore shared].effects; [effects applySkinSmoothing:0.35f]; [effects applySkinWhitening:0.10f]; [effects applySharpening:0.15f]; [effects applyTeethWhitening:0.20f];
Parameter ranges
| Method | Range | Off value | Visible result |
|---|---|---|---|
applySkinSmoothing: | 0.0 to 1.0 | 0.0 | Softens skin detail |
applySkinWhitening: | 0.0 to 1.0 | 0.0 | Brightens skin tone |
applySharpening: | 0.0 to 1.0 | 0.0 | Restores edge detail |
applyTeethWhitening: | 0.0 to 1.0 | 0.0 | Brightens detected teeth |
Clamp slider values before calling the SDK. Apply changes on the main thread that owns the UI control.
Reset beauty
[[NosmaiCore shared].effects removeBuiltInFilters];
Use removeAllBeautyEffects when the product also needs to clear makeup, face shape, and eye color.
Verify it worked
Move smoothing between 0.0 and 0.4 while a face is visible. The preview should update without restarting the camera.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
| No visible change | Preview is not ready or no face is tracked | Apply after camera readiness and test with a well-lit face |
| A packaged AR effect disappears | Built-in beauty conflicts with the active AR slot | Follow the package replacement rules and apply the intended mode last |
| Result looks unnatural | Values are too strong | Start below 0.4 and tune on target devices |