Jump to content

Mesh moved when exporting in 3DS max

Recommended Posts


I've a problem when exporting from 3DS max to .babylon. In the 3DS max the mesh and in the BabylonJS Sandbox is placed correctly, but when I open the exported with my code, that mesh is placed somewhere else.

My code (It's in Angular 6, but with without Angular happens the same)

  if (BABYLON.Engine.isSupported()) {

    BABYLON.Engine.ShadersRepository = '/Babylon/Shaders/';

    const canvas = this.el.nativeElement;
    const engine = new BABYLON.Engine(canvas, false);

    // Resize
    window.addEventListener('resize', function () {

    // Scene, light and camera
    const scene = new BABYLON.Scene(engine);

    const light = new BABYLON.HemisphericLight('light', new BABYLON.Vector3(0, 1, 0), scene);
    const camera = new BABYLON.ArcRotateCamera('Camera', Math.PI / 2, Math.PI / 2, 50, new BABYLON.Vector3(0, 0, 0), scene);
    camera.inertia = 0.2;
    // Assets manager
    const assetsManager = new BABYLON.AssetsManager(scene);

    const meshTask = assetsManager.addMeshTask('sceneTask', '', '', 'http://localhost/index.php');

    // You can handle success and error on a per-task basis (onSuccess, onError)
    meshTask.onSuccess = function (task) {
        task.loadedMeshes[0].position = new BABYLON.Vector3(0, 0, 0);
        for (let i = 0; i < task.loadedMeshes.length; i++){
          task.loadedMeshes[i].isPickable = true;

    // But you can also do it on the assets manager itself (onTaskSuccess, onTaskError)
    assetsManager.onTaskError = function (task) {
        console.log('error while loading ' + task.name);

    scene.onPointerDown = function (evt, pick) {
      if (pick.hit){

    assetsManager.onFinish = function (tasks) {

      engine.runRenderLoop(function () {

    // Can now change loading background color:
    engine.loadingUIBackgroundColor = '#03528f';

    // Just call load to initiate the loading sequence

The object in SandBox and 3DS max, where it is placed correctly:



And the model opened with BabylonJs where the object is moved:




Thanks for your time :)

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