On Windows, the Facebetter SDK is accessed through its C++ interface. This guide follows the C++ Desktop Demo as a reference for the complete integration flow.
Integration Overview
Call this before creating the engine so that initialization log messages are captured.
Log levels (ascending): Trace / Debug / Info / Warn / Error / Critical.
2. Create the Engine
resource_path must point to the resource.fbd file shipped with the SDK, which contains AI models and filter assets.
3. Enable Beauty Types
All beauty types are disabled by default and must be explicitly enabled:
4. Set Beauty Parameters
All parameter values are in the range [0.0, 1.0]. A value of 0 disables the effect.
Basic Beauty
Skin-Only Beauty
Use SetSkinOnlyBeauty to set whether beauty effects are applied only to skin regions. When enabled, beauty effects (smoothing, whitening, etc.) will only be applied to detected skin areas, leaving non-skin areas unchanged.
After enabling skin-only beauty, even with high beauty parameter values, non-skin areas (such as background, clothing, etc.) will not be affected.
Face Reshape
Makeup
Stickers
Pass a sticker ID string to activate; pass an empty string to disable. Built-in sticker IDs are bundled in resource.fbd:
Filters (LUT)
5. Process Frames
Typical per-frame processing:
Load from file (single-image mode):
Convert output format if needed:
6. OpenGL Integration (render preview)
Upload the processed RGBA data to an OpenGL texture:
7. Full Example (real-time processing loop)
The snippet below is drawn directly from the demo and shows the complete processing loop with frame-rate limiting:
Quick Reference
BeautyType
Basic Parameters
Skin-Only Beauty
Reshape Parameters
Makeup Parameters
ImageFrame Factory Methods