Jump to content

Blender export with a given rotation

Matt Duffield

Recommended Posts


I am working on some models created in MagicaVoxel and imported into Blender.  I am trying to export the model facing a specific rotation so that when I export it from Blender to BabylonJS, it is displayed with the correct rotation.  For some reason, regardless of what I set in Blender on the model, I always get the same orientation in BabylonJS.  I would like to know if it is possible to have the orientation of the model show up correctly in BabylonJS?  Can I view Blender's model with Y being Z so that I can be sure that when I export, it will display correctly in BabylonJS?

I am hoping this is something simple that I am simply not understanding in Blender.

Link to comment
Share on other sites

It is kind of guess work without out some kind of pictures, but you should know that everything is automatically swapped between y and z on export.  Maybe you are over thinking this.

If MagicaVoxel imports things that results in things being on their side, use transform UI (toggled with the 'n' key) to get it looking right in Blender.  Unless you bake in any rotation or scale (recommended), it will be export as the original, but rotated in BJS during import. Could also be a camera problem.


Link to comment
Share on other sites

Hi JCPalmer,

Perhaps if I attached the obj and png files exported from MagicaVoxel, you can try it on your end.  I import it into Blender and then scale it down.  Next, if I understand you correctly, I rotate the plane into the correct orientation/rotation so that it should be accurate when exported to BabylonJS.  I do this by click Ctrl+A and selecting Rotation.  



Finally, I export it out.  However, it always gets imported and is viewed the same when I load the file in BabylonJS.


What I would like to see though is that the orientation of the X,Y,Z is normal like the rest of BabylonJS meshes as follows:


My goal is to export the model from Blender already in the correct orientation/rotation without needing to change anything and have it left-hand.  I am not sure if this is possible but I wanted to know what my workflow should be.  If you can import the obj and png files into Blender and then export them so that they line up correctly, I would love to know how to do this.

Thanks again for your response,




Link to comment
Share on other sites

Okay, great!  Thanks for the tip.  I will definitely take a look at it.  I am using the Gamepad API and the FollowCamera.  Is there a way to keep the camera from doing a 360 rotation around the plane when I am turning left or right?  I would like to only allow a certain maximum angle for plane but the camera seems to get out of sync.  Also if I rotate too much my Y rotation becomes my pitch rotation?

I am sure this is pretty simple but it has me stumped for the moment.

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