Dad72 Posted March 1, 2016 Share Posted March 1, 2016 When we remove an object from the scene with 'mesh.dispose()' which has a skeleton. this one is not totally remove, it remains the Bip01 (Pelvis I think) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 1, 2016 Share Posted March 1, 2016 Hey this is a bit too precise to help you without a sample repro Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 1, 2016 Author Share Posted March 1, 2016 I am unable to reproduce on the playground because no model animate seems to have been created with a biped, but with bones. So I create a screenshot to show however that corresponds Bip01 (this is a point Bip01). <fr> Si je supprime le modèle avec dispose(), il est supprimer a 100%, les os aussi mais à 99%. Il reste ce point Bip01( voir capture d’écran) qui lui est pas supprimer et reste sur la scene non visible. C'est parce que j'utilise un biped de 3ds max pour créer le squelette et pas des os</fr> Voici où ce situe ce Bip01 qui est selectionner: Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 1, 2016 Share Posted March 1, 2016 Ok but I cannot help without code Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 1, 2016 Author Share Posted March 1, 2016 BABYLON.SceneLoader.Append("data/characters/", "skeletons.animation.babylon", global.scene, function(scene) { skelette = global.scene.getSkeletonByName("skeleton #0"); scene.getMeshByName("casual01_m_highpoly").dispose(); }); Je supprime simplement l'objet. je ne vois pas ce que tu demande comme code ? Logiquement, là je met en mémoire le skelette et je supprime le modèle 3d, mais il reste le Bip01 qui est juste un points. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 1, 2016 Share Posted March 1, 2016 David, ca fait des annees qu'on bosse ensemble tu me connais maintenant. Je voudrais un exemple live que je puisse debugger. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 1, 2016 Author Share Posted March 1, 2016 Oui, je comprend. c'est que je suis un gros paresseux. je vais voir a mettre le perso sur mon serveur et a t'envoyer un exemple sur le playground pour debugger. Je vais voir a faire ca demain. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 1, 2016 Share Posted March 1, 2016 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 2, 2016 Author Share Posted March 2, 2016 Voila, comme promis. Et en faite c’est pire que ce que j'avais vue. c'est tout les bones spline qui ne sont pas totalement effacer quand on regarde dans un console.log les mesh restant dans la scene complete. Et on dirait aussi que le mesh est bien effacer de la scene mais on peut encore le voir dans un console.log après un dispose() http://www.babylonjs-playground.com/#J4VIN#2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 2, 2016 Share Posted March 2, 2016 Ok so this is not a bug It is by design: - If you dispose a mes: it is removed from the scene obviously but because you keep a link on it, you can still use it. The garbage collector will remove it from memory as long as no one has an access to it. In shorter word, you just need to set mesh = null in your example - Because skeletons can be shared between multiple meshes, disposing a mesh does not dispose its skeleton. You have to first call mesh.skeleton.dispose() if you want to force it Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 2, 2016 Author Share Posted March 2, 2016 ok, I understand better. Thank you Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 2, 2016 Share Posted March 2, 2016 My pleasure Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.