Diligent Engine
Loading...
Searching...
No Matches
Radient

C++ applications can use the descriptor wrappers in RadientTypesX.hpp to build vertex layouts and texture load information with owned metadata and retained data blobs.

C++ scene asset importers can register support for additional formats and produce RadientImport::ImportedDocument. Register an importer with IRadientAssetManager::RegisterSceneAssetImporter; the built-in GLTF and OBJ importers participate in the same selection process. Import calls receive the asset manager, resolver, source data, default material, and mesh import services in their context. Include RadientSceneAssetImporter.hpp explicitly to implement importers.

The mesh import services in RadientMeshImportServices.h support importer implementations that create shared vertex, index, and morph target data and assemble mesh views with multiple geometries and materials. This C-compatible header is included explicitly and is not part of Radient.h.

The imported document types in RadientImportedDocument.hpp describe assets, scene hierarchies, skins, and animations using Radient types. Their C++ containers own the metadata and retain referenced assets. Include this header explicitly from C++ code.

Animation property names

Animation channels and destination bindings identify properties with nonempty, case-sensitive strings within their animation schema. Use the built-in constants from RadientAnimation.h, such as RadientNodeTranslationPropertyName ("Translation") and RadientMorphWeightsPropertyName ("Weights"). Custom schemas can define their own property names. Names are compared by text, so separate strings with identical contents identify the same property.

Material parameter updates

Use IRadientMaterialWriter to change non-texture material parameters at runtime, including base color, roughness, and texture-coordinate transforms. IRadientSurfaceMaterialWriter::SetAlphaCutoff() also supports runtime updates. Commit changes on the render thread before rendering a frame. A successful commit updates material getters immediately, and the next frame uses the new values without reloading the material or changing the scene.

Texture assignments, surface mode, and double-sided state must be configured before the material's load status, GPU resource status, or render view is first queried. After that, a commit that changes any of these properties returns RADIENT_STATUS_INVALID_OPERATION and applies none of its assignments.

Material assets also expose IRadientAnimationDestination. Use RadientMaterialAnimationSchemaID with the parameter's exact, case-sensitive name from the material definition, such as RadientStandardMaterialBaseColorFactorName. Reflection supplies the value type and array size for both standard and custom parameters. Non-texture parameters support animation, including array ranges; Boolean and integer values use STEP interpolation. Surface alpha cutoff uses RadientSurfaceMaterialAnimationSchemaID and RadientSurfaceMaterialAlphaCutoffPropertyName.

Map each clip target to destination element zero, then evaluate the binding on the render thread before rendering. Property names are resolved when the binding is created. Animation updates follow the same runtime rules as writer commits.

The GLTF importer supports KHR_animation_pointer for the corresponding material factors, alpha cutoff, and KHR_texture_transform offset, scale, and rotation. Texture rotations are scalar angles in radians: interpolation preserves the authored angles, including complete turns, without selecting the shortest arc. Emissive-strength animation is not yet supported. Scene instantiation with an animation registry creates material bindings automatically. Materials remain shared between scene instances: evaluating a material binding affects every instance that uses that asset. Independent playback requires distinct material assets.