Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
0.8.3:models [2022/04/25 11:24] – [Instancing / Model duplication] admin | 0.8.3:models [2022/04/25 11:26] (current) – [Instancing by TModelDef] admin | ||
---|---|---|---|
Line 322: | Line 322: | ||
Use this method to render for example grass or trees. It is not recommended to use it for animated charaters, | Use this method to render for example grass or trees. It is not recommended to use it for animated charaters, | ||
- | because they would be rendered the same. | + | because they would be rendered the same (with the same animation frame). |
- | You can simply setup instanced rendering in the TGorillaModel or TGorillaMesh object. | + | You can simply setup instanced rendering in your TGorillaModel or TGorillaMesh object. |
<file pascal> | <file pascal> | ||
Line 343: | Line 343: | ||
- | ==== Instancing by TModelDef ==== | + | ==== Instancing by template (TModelDef) ==== |
Since 0.8.3.1966+ we've refactored the way to instanciate models. The previous method was incomplete in handling animated models. | 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, which will be used for duplication. The template itself will not be rendered in our example, but of course that's possible too. | + | We will load up a template |
Each duplicated model will run a different animation to show instanciating is still fast, but allows to handle models differently. | Each duplicated model will run a different animation to show instanciating is still fast, but allows to handle models differently. |