Render outline on mesh imported from glTF

Hello guys I’m pretty new to Babylon and I’m wondering if it’s possible to use AbstractMesh.renderOutline on a mesh imported from glTF.

With “simple” meshes like spheres or boxes the renderOutline property works fine but with my glTF model nothing happens…

SceneLoader.Append("/models/", "viciious.gltf", scene, modelScene  => {
    const vic = modelScene.getMeshByName("__root__");
    vic.renderOutline = true;
    vic.outlineWidth = .1;
    vic.outlineColor = Color3.Black();  
    const idle modelScene.getAnimationGroupByName("anim_idle");;

well I figured out I must not use __root__ as name for getting the imported mesh but the name specified in the glTF (in my case newviciious).

1 Like

Yep, this __root__ node is just an empty element generated during BJS import, parenting all you gltf elements.

1 Like