|
Open 3D Engine Atom Gem API Reference
23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <ImageAssetProducer.h>
Public Member Functions | |
| ImageAssetProducer (const IImageObjectPtr imageObject, AZStd::string_view saveFolder, const Data::AssetId &sourceAssetId, AZStd::string_view sourceAssetName, uint8_t numResidentMips, uint32_t subId) | |
| bool | BuildImageAssets () |
| Build image assets for the image object and save them to asset files. It also generates AssetBuilderSDK jobProducts if it success. | |
|
const AZStd::vector < AssetBuilderSDK::JobProduct > & | GetJobProducts () const |
| Return the list of JobProducts. The list could be empty of the build process failed. | |
Protected Types | |
| enum | ImageAssetType { Image, MipChain } |
Protected Member Functions | |
| bool | BuildMipChainAsset (const Data::AssetId &chainAssetId, uint32_t startMip, uint32_t mipLevels, Data::Asset< RPI::ImageMipChainAsset > &outAsset, bool saveAsProduct) |
| void | GenerateJobProducts () |
| void | SaveAssetsToFile () |
| AZStd::string | GenerateAssetFullPath (ImageAssetType assetType, uint32_t assetSubId) |
The ImageAssetProducer saves an ImageObject to a StreamingImageAsset and several MipChainAsset. And save them to files on disk. It also generats a list of AssetBuilderSDK::JobProduct which can be used for Image Builder's ProcessJob's result.
| ImageProcessingAtom::ImageAssetProducer::ImageAssetProducer | ( | const IImageObjectPtr | imageObject, |
| AZStd::string_view | saveFolder, | ||
| const Data::AssetId & | sourceAssetId, | ||
| AZStd::string_view | sourceAssetName, | ||
| uint8_t | numResidentMips, | ||
| uint32_t | subId | ||
| ) |
Constructor with all required initialization parameters.
| imageObject | is the image object to be processed and saved |
| saveFolder | is the path of the folder where the image asset files be saved |
| sourceAssetId | is the asset id of this image. It's used to generate full asset id for MipChainAssets which will be referenced in StreamingImageAsset. |
| sourceAssetName | is the name of source asset file. It doesn't include path. |
| subId | is the product subId to use for the output product. |