#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>
Go to the source code of this file.
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
.