Jump to content

[Solved] Weird rotations on duplicate meshes exported from Blender


WildBill
 Share

Recommended Posts

Hello!

So this is weird.... I've got a rigged character in Blender that I want to duplicate so that I can animate a scene with two characters interacting. The issue I'm having is that when I duplicate that mesh in Blender (by selecting both the mesh and the armature and pressing Shift + D) and export it, the duplicated character is rotated differently in my BJS scene than it was in Blender.

If I rotate the duplicated mesh 45 degrees (along the Z axis) in Blender, then export it to a .babylon file, it renders as being rotated 90 degrees in BJS. Rotating him 90 degrees in Blender gets even weirder: the mesh starts rotating along a different axis. And if I rotate him further then he starts doing all sorts of crazy acrobatics.

Here's a few screenshots of what I'm talking about:

ES6Lb11.jpg

Any ideas why it's rotating like this or how I might fix it? I have a hunch it's something to do with how I duplicated the mesh (maybe Shift + D was a bad idea? Is there a better way to duplicate this rigged mesh?) but I'm a newbie to Blender and BJS and I'm at a loss here. My log file didn't return any errors when I exported the .babylon file too, for what that might be worth. I'd be happy to attach the .blend and .babylon files too if that'd help diagnose it, just let me know!

As a side note, I've been lurking these forums for a while and its incredible how helpful everyone here has been. Your answers on all these countless old topics has helped me get this far, I feel like I already owe you guys big time. :)

Link to comment
Share on other sites

Haha I thought so. ;)

Sure thing, here's a .zip with the babylon, blend, and log files.

I think I may have fixed the issue though, or at least discovered why it's acting up. Originally, I was rotating the character by selecting the main root bone (his hip) and rotating it in Local mode instead of Global mode. Normally this would be fine since those two should be oriented the same for that main hip bone, but somehow it looks like the Y and Z axes got flipped between Local and Global. It must've been an accident when I was rigging him earlier. But when I rotated him 180 degrees in Global mode he rendered perfectly in BJS... sweet!

It may be worth looking into that inconsistency between how Blender and the Babylon exporter interprets the final rotation of a mesh with Global and Local rotation values, but it's not a big deal since it seems easy to fix (at least in this simple scene of mine) by just using Global instead of Local, at least on root bones. You guys already work hard enough on solving everyone else's issues as it is haha. Thanks again!

meshes.zip

Link to comment
Share on other sites

sounds like the orientation to origin are off on the meshes... let me look really quick 1 sec lll edit this post in a min.

Yup...

your orientation is all screwy.show.thumb.png.2e4de49638f07e93120c10f8f4e8f882.png

You need to set the models origin to 0,0,0 and have its local axes be aligned correctly in your editing program, or bake the vertex data post process.

Link to comment
Share on other sites

11 minutes ago, Pryme8 said:

sounds like the orientation to origin are off on the meshes... let me look really quick 1 sec lll edit this post in a min.

Do you have the meshes before babylon export?

Thanks :)

And yeah it should be the .blend file in that meshes.zip file attached above. I'm 99% sure I just messed up the orientation of that root hip bone when I was first rigging it, and that's totally on me. It's just weird how the exporter interpreted the final values differently than Blender shows them.

Edit: You rock, thanks for confirming that! I'll go back and reset the local orientation to match the global orientation and that should fix it.

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