Jump to content

To confirm, is importing 3D models as their own meshes possible?


Recommended Posts



I have done as thorough research as I can into this topic and I still haven't found a clear answer.  Are we able to directly import assets like .FBX or .STL files, and use them as ordinary meshes (i.e. apply our own transitioning and coloring to them?)


Additionally, when we import a Babylon Scene, are we able to interact with the individual meshes in the scene?


From what I have seen so far, it seems like once the .babylon file is imported, there is no way to access the meshes the scene contained.  Please let me know or point me to the best documentation if possible.



Link to comment
Share on other sites

Hello startec, 


It is totally possible to access all loaded objects :) 

You should look for this method: http://doc.babylonjs.com/classes/2.2/SceneLoader#static-importmesh-meshesnames-rooturl-scenefilename-scene-onsuccess-progresscallback-onerror-rarr-void

Or maybe learn how to use the Assets Manager : http://doc.babylonjs.com/tutorials/How_to_use_AssetsManager

Or buy an awesome book for beginners that will teach you how to use all of this : http://learningbabylonjs.com/


Good luck !

Link to comment
Share on other sites

Awesome. Thanks, I don't know how I missed that.  Any plans to add .FBX anytime soon?


To let you know why I want to do all this I am particularly interested in importing a mesh (only a mesh) as an .FBX file with its animation channels built in.   I have only just begun using the blender add-on, but it seems that once you import the Blender scene, you can no longer access the specific models from the scene as meshes. (i.e. you can not apply your own effects such as materials to the models )


Is this incorrect?


This converter http://www.babylonjs.com/converter.html seems to be broken.

Link to comment
Share on other sites

This might be interesting for you... I do a lot with dynamically generated javascript through PHP and a SQL database to dynamically load scenes.



I treat babylon files as package containers. You can also use something like this to pick a loaded mesh / work with it...

myMesh = scene.getMeshByName('<mesh name>');





I still need to clean up this RO2 map and package it up into a simple file so you can have it for a demo... I know you want it... lol I just need more time to work on it and optimize it. Should be a pretty interesting solution to a lot of problems once it's finished.

Link to comment
Share on other sites

Ah, thank you reddozen.  That was the part of the answer I was really searching for.  I know you can do all of these cool things with .babylon files but I didn't know if you could use Babylonjs to retexture an .fbx that you made somewhere else.  That was really what I was looking to do:

myMesh = scene.getMeshByName('<mesh name>');



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.

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.


  • Recently Browsing   0 members

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