Open 3D Engine Meshlets Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <MeshletsAssets.h>
Public Member Functions | |
MeshletsModel (Data::Asset< RPI::ModelAsset > sourceModelAsset) | |
Data::Instance< RPI::Model > | GetMeshletsModel () |
AZStd::string & | GetName () |
Static Public Attributes | |
static uint32_t | s_modelNumber |
Protected Member Functions | |
bool | ProcessBuffersData (float *position, uint32_t vtxNum) |
void | debugMarkMeshletsUVs (GeneratorMesh &mesh) |
uint32_t | CreateMeshlets (GeneratorMesh &mesh) |
uint8_t * | RetrieveBufferData (const RPI::BufferAssetView *bufferView, RHI::Format &format, uint32_t expectedAmount, uint32_t &existingAmount, RHI::BufferViewDescriptor &bufferDesc) |
Data::Asset< RPI::BufferAsset > | CreateBufferAsset (const AZStd::string &bufferName, const RHI::BufferViewDescriptor &bufferViewDescriptor, RHI::BufferBindFlags bufferBindFlags, const void *data) |
uint32_t | CreateMeshlets (float *positions, float *normals, float *texCoords, uint32_t vtxNum, uint16_t *indices, uint32_t idxNum, RHI::Format IndexStreamFormat) |
uint32_t | CreateMeshletsFromModelAsset (Data::Asset< RPI::ModelAsset > sourceModelAsset) |
uint32_t | CreateMeshletsModel (const RPI::ModelLod &modelLod) |
uint32_t | CreateMeshletsModel (const RPI::ModelLodAsset::Mesh &meshAsset) |
uint32_t | GetMehsletsAmount () |
Reference Class to Demonstrate Meshlets Prep in CPU The following class is taking in ModelAsset and based on it, generates a new Atom Model that now contains enhanced meshlet data. This class is built to demonstrate and used as reference for using the mesh data to generate the meshlets on the fly and send them to the regular render. This is NOT the class that will be used to create indirect Compute and Draw calls. For this we will be using the MeshletRenderObject class.
Currently assuming single model without Lods so that the handling of the meshlet creation and handling of the array is easier. If several meshes or Lods exist, they will be created as separate models and the last model's instance will be kept in this class. Each one of the ModelLods contains a vector of meshes, representing possible multiple element within the mesh - to fully represent a mesh, the replication method will need to run and gather all data, unify it within a single stream and address from each of the Lods.