Jump to content

Loading fbx


ansonix
 Share

Recommended Posts

Hi, 

I have just started a new project in babylonjs, just to learn how to use the framework and learn the glossary in the game coding industry :). It looks very interesting. However, I am spending a lot of time in non-related stuff of the framework, that is converting fbx files into babylon files.

What I try to do is to load this pack into a babylon project https://www.assetstore.unity3d.com/en/#!/content/69687

I have followed other topics regarding to install a plugin in blender and exporting to babylon. I have managed to load the model.

Then I do the same process with the 4 animations, to export them, and I edit the babylon json file, and I move manualy the skeleton array into the basic model babylon file. When I play the animation it is distorted. 

I have also seen other threads using a visual studio project or exec files to merge the fbx files and then export them, but I am running in a mac, not windows.

Is there a way to make run that asset, with the 4 animations? like any reliable online converter or any js addon to load directly fbx.

I have seen some threats also that were talking about loading the mesh in a file and the animations in other files, but I didn't manage neither with the distorted animations, I always had to copy manually to the file where is the mesh. 

I am getting a bit discouraged to continue with this framework (although it looks awesome) in the sense that I spend too much time in non coding related stuff like this, and also that most asset sources are fbx format, and seems hard to have to go through all this process every time with not much warranty that the output will be right and not broken... :/

Thanks a lot for your time! :)

Link to comment
Share on other sites

Remember that the FBX format is a Z axis up on export. This will not work well with some animation, so I highly recommend that you view your FBX file in the free FBX coverter/viewer first, and if the orientation is correct, then import the FBX file into Blender. There you can take advantage of the exporter to the .babylon format which in my opinion, is the best pipeline to BJS. The other advantage to FBX is that as an ascii format, it's easy to read and edit - provided you're exporting an ascii FBX file.

As for the babylon.js framework, I've spent almost 3 years working in WebGL, and can do far more in less time with few restictions. I was once a Unity user, as well as using UE4 in alpha and beta. And I don't want to give the impression that there is little learning curve to BJS, but I find this specific framework practically limitless - as DK and DR as well as all other contributers are here to make certain that babylon.js has most every feature of openGL 3+ including native support for all HTML5, jQuery, etc. I can't say it was as easy working in other frameworks such as three.js. 

So if you have any issues, you'll definately find your answer here. nd if you need further help impoting you're scene into BJS, I'm happy to oblige.

DB

Link to comment
Share on other sites

Thanks a lot for the answer.

Yes, regarding frameworks after seeing some (three.js, pixi.js, etc), babylon seemed to me the most complete in different terms. And I am learning a lot of with it. But it surprises me the difficulty to have assets working (take in account that my knowledge is very limited :)

About my issue, I import the animation the same way than the model. That is what I do in blender:

1- I do a new blank project (it always adds me a box by default, that I delete in the middle of the scene)

2- I import a FBX file (model)

3- I don't touch anything, and then I export to babylon file using the addon.

The process for the animation is exactly the same. I don't by code in babylonjs how to load only the animation file alone, so to try it, I copy/paste the skeleton array to the model file, and then the guy moves somehow :P

I don't know if in blender I should check something else, but if I import the model and the animation in the same scene, they seem to me the same size, position, etc, but I don't know what should I check to verify my theory :) hehehe.

Thanks!

Link to comment
Share on other sites

17 hours ago, ansonix said:

I don't know if in blender I should check something else, but if I import the model and the animation in the same scene, they seem to me the same size, position, etc, but I don't know what should I check to verify my theory :) hehehe.

I'm not sure what you mean by "verify your theory?" If this is to import and export the FBX file containing the mesh, sleleton, materials (another subject) and animation at the same time into blender before exporting to .babylon, then you should have no issues. However, if you need additional help with your scene, please let me know. I was really the guy who purchased the very first license of Filmbox before they renamed it to MotionBuilder - but that's a whole other story. However having contributed to the application and format, I should be able to assist with any further issues.

Cheers,

DB

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