Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
1.0.0:models [2023/02/23 12:15] – [At Runtime] admin | 1.0.0:models [2023/02/23 12:20] – [Instanced Rendering] admin | ||
---|---|---|---|
Line 544: | Line 544: | ||
- | ===== Instancing / Model duplication | + | ===== Instancing / Cloning |
==== Instanced Rendering ==== | ==== Instanced Rendering ==== | ||
Line 554: | Line 554: | ||
{{youtube> | {{youtube> | ||
+ | |||
+ | |||
=== At DesignTime === | === At DesignTime === | ||
Line 595: | Line 597: | ||
__WARNING: | __WARNING: | ||
- | ==== Instancing by template (TModelDef) | + | ==== Cloning |
+ | |||
+ | Instancing can be done by GPU and providing different transformation matrices like above or by cloning the visual component with all of it's data. | ||
+ | Both ways have their advantages and disadvantages. | ||
+ | |||
+ | * Use instancing if you want to re-render a mesh multiple times | ||
+ | * Use cloning if you need different visual feedback (like animations or materials), but if you want to reuse the vertex data itself | ||
- | Since 0.8.3.1966+ we've refactored the way to instanciate models. The previous method was incomplete in handling animated models. | ||
In the following example we show how to load a complex animated model with multiple meshes and animations. | In the following example we show how to load a complex animated model with multiple meshes and animations. | ||
We will load up a template (TModelDef), | We will load up a template (TModelDef), |