Open 3D Engine Atom Gem API Reference 24.09.2
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ImageProcessingAtom::ImageAssetProducer Class Reference

#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, AZStd::set< AZStd::string > tags=AZStd::set< AZStd::string >{})
 
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 class  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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ImageAssetProducer()

ImageProcessingAtom::ImageAssetProducer::ImageAssetProducer ( const IImageObjectPtr imageObject,
AZStd::string_view saveFolder,
const Data::AssetId & sourceAssetId,
AZStd::string_view sourceAssetName,
uint8_t numResidentMips,
uint32_t subId,
AZStd::set< AZStd::string > tags = AZStd::set< AZStd::string >{} )

Constructor with all required initialization parameters.

Parameters
imageObjectis the image object to be processed and saved
saveFolderis the path of the folder where the image asset files be saved
sourceAssetIdis the asset id of this image. It's used to generate full asset id for MipChainAssets which will be referenced in StreamingImageAsset.
sourceAssetNameis the name of source asset file. It doesn't include path.
subIdis the product subId to use for the output product.
tagslist of tags to save in the image asset.

The documentation for this class was generated from the following file: