HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bakeMaterialX.h File Reference
#include "pxr/pxr.h"
#include "pxr/usdImaging/bin/usdBakeMtlx/api.h"
#include "pxr/imaging/hd/material.h"
#include "pxr/usd/usdShade/material.h"
#include <MaterialXCore/Library.h>
#include "pxr/base/tf/declarePtrs.h"
#include <string>
+ Include dependency graph for bakeMaterialX.h:

Go to the source code of this file.

Typedefs

using FilePathVec = std::vector< class FilePath >
 

Functions

MATERIALX_NAMESPACE_END
PXR_NAMESPACE_OPEN_SCOPE 
TF_DECLARE_WEAK_AND_REF_PTRS (UsdStage)
 
USDBAKEMTLX_API UsdStageRefPtr UsdBakeMtlxReadDocToStage (std::string const &pathname, UsdStageRefPtr stage)
 
USDBAKEMTLX_API std::string UsdBakeMtlxBakeMaterial (UsdShadeMaterial const &mtlxMaterial, std::string const &bakedMtlxDir, int textureWidth, int textureHeight, bool bakeHdr, bool bakeAverage)
 

Typedef Documentation

using FilePathVec = std::vector<class FilePath>

Definition at line 40 of file bakeMaterialX.h.

Function Documentation

MATERIALX_NAMESPACE_END PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_AND_REF_PTRS ( UsdStage  )
USDBAKEMTLX_API std::string UsdBakeMtlxBakeMaterial ( UsdShadeMaterial const &  mtlxMaterial,
std::string const &  bakedMtlxDir,
int  textureWidth,
int  textureHeight,
bool  bakeHdr,
bool  bakeAverage 
)

Convert the given MaterialX Material from a UsdShadeaMaterial into a MaterialX Document and Bake it using MaterialX::TextureBaker, storing the resulting mtlx Document at bakedMtlxFilename. Any resulting textures from the baking process will live in the same directory.

USDBAKEMTLX_API UsdStageRefPtr UsdBakeMtlxReadDocToStage ( std::string const &  pathname,
UsdStageRefPtr  stage 
)

Read the MaterialX XML file at pathname convert and add to the given USD stage.