Filters and effects
The difference between filters and effects, the .nosmai format, local versus cloud filters, and the built-in beauty and color controls.
Filters versus effects
Nosmai supports two kinds of looks.
Filters are color grading adjustments that change the overall tone of the frame, similar to social media filters. They are static, apply to the whole frame, and use simple parameters such as intensity.
Examples: warm or cool tones, high-contrast looks, vintage, sepia, black and white, LUT color grading.
Effects are animated or interactive elements that can move or respond to the face. They can be layered, can include particles or 3D, and can track facial features.
Examples: face beautification, animated stickers, particle effects (snow, rain, sparkles), seasonal AR, masks that follow the face.
| Filters | Effects | |
|---|---|---|
| Purpose | Color grading and tone | Animation and interactive elements |
| Movement | Static | Animated |
| Scope | Whole frame | Can be localized to the face |
| Interaction | None | Can respond to the face |
The .nosmai format
Both filters and effects are packaged as .nosmai files. A .nosmai file can hold color grading data for a filter, or animated and face-tracking content for an effect. You apply either one the same way, by passing its path or name to applyFilter.
Local versus cloud filters
Local filters ship inside your app. Place .nosmai files in your app bundle (iOS) or assets/filters/ (Android and Flutter), and the SDK lists them automatically.
Cloud filters are downloaded on demand. List the available cloud filters, download the one you want (with progress), then apply it from its local path. Downloaded filters are cached on the device.
Each filter entry includes its id, name, display name, type (local or cloud), and filter type (filter or effect), so you can build a gallery and group items as you like.
Built-in beauty and color
Beyond .nosmai files, the SDK has built-in controls you apply directly:
- Beauty: skin smoothing, skin whitening, face slimming, eye enlargement, nose reshape.
- Makeup: lipstick, blusher, and blend level.
- Color: brightness, contrast, saturation, sharpening, RGB channels, HSB, white balance, hue, grayscale.
Each control takes an intensity value.
NOTE
Intensity ranges differ by platform. On iOS and Android native, beauty intensities are 0.0 to 1.0. On the Flutter plugin they are 0.0 to 10.0. Color controls use signed or wider ranges (for example brightness -1.0 to 1.0, contrast 0.0 to 2.0). See your platform guide for the exact range of each method.
Capture and recording
Every photo or video you capture includes the effects currently applied, since processing happens before capture. See the platform guides for capturePhoto, startRecording and stopRecording, and the Live streaming guide for sending processed frames to a streaming pipeline.