startec Posted September 30, 2015 Share Posted September 30, 2015 Hi, 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. Thanks! Quote Link to comment Share on other sites More sharing options...
Temechon Posted September 30, 2015 Share Posted September 30, 2015 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-voidOr maybe learn how to use the Assets Manager : http://doc.babylonjs.com/tutorials/How_to_use_AssetsManagerOr buy an awesome book for beginners that will teach you how to use all of this : http://learningbabylonjs.com/ Good luck ! Quote Link to comment Share on other sites More sharing options...
startec Posted September 30, 2015 Author Share Posted September 30, 2015 Thanks for this! Unfortunately I don't see a list of file types supported by babylon. Is there a place that shows the model types that can be directly imported?Thanks again for your help Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 30, 2015 Share Posted September 30, 2015 Hello you have the list of importer there:https://github.com/BabylonJS/Babylon.js/tree/master/loaders And exporters:http://doc.babylonjs.com/exporters Quote Link to comment Share on other sites More sharing options...
startec Posted September 30, 2015 Author Share Posted September 30, 2015 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 30, 2015 Share Posted September 30, 2015 We have great support for FBX as well https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/FBX Quote Link to comment Share on other sites More sharing options...
startec Posted September 30, 2015 Author Share Posted September 30, 2015 Man you guys are killing it! Thanks Quote Link to comment Share on other sites More sharing options...
reddozen Posted October 1, 2015 Share Posted October 1, 2015 This might be interesting for you... I do a lot with dynamically generated javascript through PHP and a SQL database to dynamically load scenes.http://www.diviniaro.com/WGClient/Models/Loaders/map_loader.php?zone=1®ion=1 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>');myMesh.doStuffWithMe; DK,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. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
startec Posted October 1, 2015 Author Share Posted October 1, 2015 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>');myMesh.doStuffWithMe;Awesome. 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.