Jump to content

OIMO not defined on some scenes with BJS since 1.14


Vousk-prod.
 Share

Recommended Posts

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 ?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 :lol:

 

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.

Link to comment
Share on other sites

  • 4 weeks later...

 

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 !

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...