Vousk-prod. Posted December 11, 2014 Share Posted December 11, 2014 Hi fellows, I'm in the process of updating all my projects to brand new version of BJS (from 1.12 to 2.0.alpha).But for some of them, I've got OIMO is not defined error in console (with bjs versions 1.14 and 2.0.alpha) I'm not using any physics (at all, nowhere). All my scenes are created via SceneLoader.Load and the objects are generated by the blender exporter. It occurs only on some scenes. Any idea about that ? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 11, 2014 Share Posted December 11, 2014 I have already seen this, is that in your code you use something that uses physics.exemple: scene.enablePhysics () => delete Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 Nope, I'm not using any physics specific code anywhere.In fact the global code is strictly the same for all my projects since they all use the same scene manager.There is no particular piece of code on the projects where OIMO error occured.That's why I guess that the difference could come from the imported blender scene, maybe a kind of object which could automatically start the "OIMO processing" or so... Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 11, 2014 Share Posted December 11, 2014 Show code in playground to watch. I have had this problem and it is because your code uses something physics. setGravity or something maybe? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted December 11, 2014 Share Posted December 11, 2014 The only code in the Blender exporter that processes physics I think is in a mesh. Not sure what a rigid_body is in the Blender UI, but if the mesh (referred to as object in code below) has one, physicsImposter, physicsMass, etc are set. Just open your .babylon in Wordpad and search for 'physics'. That should rule Blender in or out, definitively. EDIT: also check for scene.gravity or camera.applyGravity, though I believe both are always written and then set in BabylonFileLoader. # Physics if object.rigid_body != None: shape_items = {'SPHERE' : SPHERE_IMPOSTER, 'BOX' : BOX_IMPOSTER, 'MESH' : MESH_IMPOSTER, 'CAPSULE' : CAPSULE_IMPOSTER, 'CONE' : CONE_IMPOSTER, 'CYLINDER' : CYLINDER_IMPOSTER, 'CONVEX_HULL': CONVEX_HULL_IMPOSTER} shape_type = shape_items[object.rigid_body.collision_shape] self.physicsImpostor = shape_type mass = object.rigid_body.mass if mass < 0.005: mass = 0 self.physicsMass = mass self.physicsFriction = object.rigid_body.friction self.physicsRestitution = object.rigid_body.restitution Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 Oh man, once again you saved my life ! You're right, in every culprit .babylon file I have some physicsImpostors (etc) set.I will check in my Blender files for removing the useless rigid bodies (since I do not need physics for those scenes). Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 11, 2014 Share Posted December 11, 2014 de rien. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 11, 2014 Author Share Posted December 11, 2014 ?? ah ah, dad72 tu réponds pour JCP maintenant Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 11, 2014 Share Posted December 11, 2014 Bas c’est pas comme si je n'avais pas essayer de t'aider hein. j'avais aussi en partie raisons.. donc de rien. mais ne te sens pas obliger de dire merci, j'ai anticiper. ha ha. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted December 12, 2014 Author Share Posted December 12, 2014 Oui tu m'as donné des pistes aussi en effet, et le "oh mec tu m'as encore une fois sauvé la vie" équivalait à un merci.Mais en fait et surtout, pour moi ce post n'est pas fini : quand j'aurai identifié les éléments coupables dans les fichiers blender je terminerai ce post en récapitulant et en indiquant la marche à suivre pour que ça ne pose pas de problème à ceux qui n'ont pas besoin de la physique, puis je marquerai cette récap complète comme réponse au post (c'est ainsi que je fais la plupart du temps sur les posts), et là je considérerai le sujet comme terminé et pourrai envoyer mille bisous Mais je suis tout à fait de ton avis quand tu dis qu'un "merci" donne envie d'aider, je suis du genre à rappeler sur les forums qu'un "bonjour" et un "merci" ne font pas de mal et participent à la bonne vie de tous. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 12, 2014 Share Posted December 12, 2014 on est d’accord.Bonne continuation pour la suite de tes recherches à ce probleme. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted January 8, 2015 Author Share Posted January 8, 2015 The only code in the Blender exporter that processes physics I think is in a mesh. Not sure what a rigid_body is in the Blender UI, but if the mesh (referred to as object in code below) has one, physicsImposter, physicsMass, etc are set. Just open your .babylon in Wordpad and search for 'physics'. That should rule Blender in or out, definitively. As JCP said, when some physic related options are checked in blender for an object, the blender exporter automatically creates physicsImpostor, physicMass, etc, which automatically leads to (try to) launch OIMO while loading the scene in BJS. So if there is no plan to use realtime physic simulation in the game engine, every physic related options should be deactivated in Blender before any export. In my case, for some objects the RigidBody parameter was checked because physical simulation was used in Blender to set the scene, but since no further physcial simulation is required in BJS, to simply uncheck those parameters before exporting to .babylon file solved the problem. Thanks ! 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.