FaceGen 3 SDKs Reference
|
FaceGen 3 Statistical Color Model for a UV map: More...
#include <Fg3Scm.hpp>
Public Member Functions | |
Scm3 (String8 const &dirBase, String8 const &overlayColor="") | |
Loads a SCM from all applicable file types starting with 'dirBase': | |
Scm3 (String8 const &imgFile, String8 const &egtFile, String8 const &fimFile) | |
Scm3 (ImgRgba8 const &meanClr, String8 const &egtFile, String8 const &fimFile) | |
" | |
bool | empty () const |
" | |
ImgRgba8 | calcScmColorMap (Sam3Coord const &faceCoord, bool multithread=true) const |
Compute the SCM color map without any detail texture, custom base or overlay: | |
ImgRgba8 | applyFace (Face3 const &face, float detailModulation=1.0f, bool multithread=true) const |
Returns the final color map image for the given face: | |
ImgRgba8 | transformDetail (Bytes const &detailJpegBlob, bool multithread=true) const |
ImgRgba8 | applyFaceCoord (Floats const &ColorCoordS, ImgRgba8 const &transformedDetail, float detailModulation=1.0f, bool multithread=true) const |
Returns the final color map for the given face coordinate and optional transformed detail texture: | |
Static Public Member Functions | |
static float | gammaDefault () |
Public Attributes | |
ImgRgba8 | mean |
Scm3Modes | modes |
SCM modes (symmetric only) encoded with gamma=1/2.6. Size is power of 2. Can be empty. | |
Img2F | detailXfm |
float | gamma = gammaDefault() |
Desired inverse gamma value for output color maps: | |
ImgRgba8 | overlay |
ImgUC | fadeMap |
FaceGen 3 Statistical Color Model for a UV map:
Definition at line 73 of file Fg3Scm.hpp.
|
inline |
Definition at line 97 of file Fg3Scm.hpp.
Fg::Scm3::Scm3 | ( | String8 const & | dirBase, |
String8 const & | overlayColor = "" |
||
) |
Loads a SCM from all applicable file types starting with 'dirBase':
Definition at line 215 of file Fg3Scm.cpp.
Fg::Scm3::Scm3 | ( | String8 const & | imgFile, |
String8 const & | egtFile, | ||
String8 const & | fimFile | ||
) |
fimFile | " |
Definition at line 256 of file Fg3Scm.cpp.
Fg::Scm3::Scm3 | ( | ImgRgba8 const & | meanClr, |
String8 const & | egtFile, | ||
String8 const & | fimFile | ||
) |
|
inline |
Returns the final color map image for the given face:
detailModulation | OPTIONAL: The amount of detail texture modulation. Defaults to 1.0. Use 0.5 for little, 1.5 for lots. |
multithread | Select false if calling within multithreaded context. |
Definition at line 126 of file Fg3Scm.hpp.
ImgRgba8 Fg::Scm3::applyFaceCoord | ( | Floats const & | ColorCoordS, |
ImgRgba8 const & | transformedDetail, | ||
float | detailModulation = 1.0f , |
||
bool | multithread = true |
||
) | const |
Returns the final color map for the given face coordinate and optional transformed detail texture:
ColorCoordS | The face color coordinate (symmetric only, there is no asymmetric): |
transformedDetail | The transformed texture detail image from above. Can be empty: |
detailModulation | OPTIONAL: The amount of detail texture modulation. Defaults to 1.0. Use 0.5 for little, 1.5 for lots. |
Definition at line 417 of file Fg3Scm.cpp.
|
inline |
Compute the SCM color map without any detail texture, custom base or overlay:
multithread | Select false if calling within multithreaded context. |
Definition at line 113 of file Fg3Scm.hpp.
|
inline |
|
inlinestatic |
Definition at line 95 of file Fg3Scm.hpp.
ImgRgba8 Fg::Scm3::transformDetail | ( | Bytes const & | detailJpegBlob, |
bool | multithread = true |
||
) | const |
Separates the detail transformation from the rest of the texture update computatation in order to more quickly update the texture image when the detail texture remains the same. Returns an empty image if argument is empty, or if this SCM has no detail transform map:
Definition at line 380 of file Fg3Scm.cpp.
Img2F Fg::Scm3::detailXfm |
Resampling map from SCM UV layout (ie. in SCM UV layout) to FG internal UV layout. Pixel values are OTCS coordinates for FG internal UV layout, with (-1,-1) as invalid (ie. outside face area). Size is power of 2. Can be empty.
Definition at line 83 of file Fg3Scm.hpp.
ImgUC Fg::Scm3::fadeMap |
Transition map from FaceGen face area (0) to non face area (255) allows SCM to be color-matched and composited onto a generic head/body map in this UV layout. Same dimensions as 'modes'.
Definition at line 93 of file Fg3Scm.hpp.
float Fg::Scm3::gamma = gammaDefault() |
Desired inverse gamma value for output color maps:
Definition at line 85 of file Fg3Scm.hpp.
ImgRgba8 Fg::Scm3::mean |
SCM mean color map encoded with gamma=1/2.6. Size must be power of 2. Can be empty if 'modes' is empty and 'overlay' is non-empty.
Definition at line 77 of file Fg3Scm.hpp.
Scm3Modes Fg::Scm3::modes |
SCM modes (symmetric only) encoded with gamma=1/2.6. Size is power of 2. Can be empty.
Definition at line 79 of file Fg3Scm.hpp.
ImgRgba8 Fg::Scm3::overlay |
Not technically part of an SCM but here for convenience. Size must be power of 2. Overlay image with transparency in alpha channel. Appled after all the above. Useful for in-texture clothing or hair. Ignored if empty. DEPRECATED.
Definition at line 90 of file Fg3Scm.hpp.