FurifyMesh not working on a mesh parented to TransformNode

Hi everyone,

FurifyMesh works as expected on a mesh with skeleton and active animation, but not if it’s parented to TransformNode.
Example: https://playground.babylonjs.com/#Z6SWJU#929

In the example above the same model is loaded twice:

  • in the first example the mesh is parented to TransformNode, and meshes produced from FurifyMesh are not visible in the scene.
  • the second example shows the expected behavior

Maybe this is not the best example, but in the project I’m working on right now, the “furify” meshes are visible, but they are mirrored on the y axis. I think it’s because original meshes are imported from blender, and they have a different orientation. When they are parented to transformNode, they are displayed correctly, but newly created “furify” meshes have an original orientation

Welcome aboard!

The fur mesh inherits the scale of the parent mesh, and when you do hero.getChildMeshes().forEach(mesh => mesh.setParent(root)), the meshes are moved under the root but their world matrix is recomputed so that it does not change after the move. As there’s a 0.01 scaling for the “idle” node in their hierarchy, they inherit this scaling, and in turn the fur mesh inherits it too, which makes the fur invisible (too small). You could do hero.getChildMeshes().forEach(mesh => mesh.parent = root)) instead, but you would have to reapply the transformation of the “idle” node:

Or you can move hero.getChildMeshes().forEach(mesh => mesh.setParent(root)) after the fur is created:

1 Like