HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bakeSkinning.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/usdSkel/api.h"
#include "pxr/base/gf/interval.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/vt/types.h"
#include "pxr/usd/sdf/layer.h"
#include "pxr/usd/usdSkel/binding.h"
#include <vector>
+ Include dependency graph for bakeSkinning.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UsdSkelBakeSkinningParms
 Parameters for configuring UsdSkelBakeSkinning. More...
 

Functions

USDSKEL_API bool UsdSkelBakeSkinning (const UsdSkelCache &skelCache, const UsdSkelBakeSkinningParms &parms, const GfInterval &interval=GfInterval::GetFullInterval())
 
USDSKEL_API bool UsdSkelBakeSkinning (const UsdSkelRoot &root, const GfInterval &interval=GfInterval::GetFullInterval())
 
USDSKEL_API bool UsdSkelBakeSkinning (const UsdPrimRange &range, const GfInterval &interval=GfInterval::GetFullInterval())
 

Function Documentation

USDSKEL_API bool UsdSkelBakeSkinning ( const UsdSkelCache skelCache,
const UsdSkelBakeSkinningParms parms,
const GfInterval interval = GfInterval::GetFullInterval() 
)

Bake the effect of skinning prims directly into points and transforms, over interval. This is intended to serve as a complete reference implementation, providing a ground truth for testing and validation purposes.

Although this process attempts to bake skinning as efficiently as possible, beware that this will undo the IO gains that deferred deformations provide. A USD file, once skinning has been baked, may easily see an increase of 100x in disk usage, if not more. The render-time costs of invoking skinning tend to be low relative to the IO gains, so there is little render-time benefit in baking the result down. Whatever wins are achieved may in fact be undone by the increased IO costs. The intent of the UsdSkel encoding is to defer skinning until as late in the pipeline as possible (I.e., render time), partially for the sake of improving IO in distributed renderings contexts. We encourage users to bring similar deferred-deformation capabalities to their renderer, rather than relying on baking data down.

USDSKEL_API bool UsdSkelBakeSkinning ( const UsdSkelRoot root,
const GfInterval interval = GfInterval::GetFullInterval() 
)

Overload of UsdSkelBakeSkinning, which bakes the effect of skinning prims directly into points and transforms, for all skels bound beneath root, over interval. Skinning is baked into the current edit target. The edit target is not saved during skinning: the caller should Save() or Export() the result.

USDSKEL_API bool UsdSkelBakeSkinning ( const UsdPrimRange range,
const GfInterval interval = GfInterval::GetFullInterval() 
)

Overload of UsdSkelBakeSkinning, which bakes the effect of skinning prims directly into points and transforms, for all SkelRoot prims in range, over interval. Skinning is baked into the current edit target. The edit target is not saved during skinning: the caller should Save() or Export() the result.