repro: https://playground.babylonjs.com/#NRNBMM#83
thin instances don’t work with children ? I was expecting the children to be instanced as well…
repro: https://playground.babylonjs.com/#NRNBMM#83
thin instances don’t work with children ? I was expecting the children to be instanced as well…
hey
the base of Thin Instance is make single model from repeated models
that will work if you can marge them the parent and child as a single mesh
As @nasimiasl said, thin instances are simply additional matrices that let you duplicate the corresponding mesh geometry, children are not taken into account. You will need either to merge the meshes or add thin instances to the children themselves.
Thanks both! I have parent and child meshes with separate animation rigs so merging isn’t straightforward. I can 't seem to add thin instances to the children and still maintain parent/child configuration, any ideas ?
What is the problem in your PG? It seems ok to me:
comment out the lines for thin instances. The red/green/blue blocks should be above the cube.
repro with addself: https://playground.babylonjs.com/#NRNBMM#85
The thin instances matrices are composited with the matrix of the master mesh before being applied to the instance. In your case, you have a X rotation on the master that gets in the way because it is applied after the translation of the thin instance. You need to remove the rotation on the master mesh and embed it into the thin instance matrix:
I see. Not desired for my use case as the parent-child relationship between the instances aren’t maintained.