Jump to content

Rotation trouble with 3 axis rotated objects


Raphy44260
 Share

Recommended Posts

Hi,

We use 3D STUDIO MAX 2017, and Babylon Exporter V0.7.

We've made several tests to try to understand why we got a problem with some objects once exported from Max. It seems like when an object has some rotation inside Max on the 3 axis, it is not exported as it should be, and rotation values are wrong. I haven't found any particular "rule" in the calculation of these wrong values.

We've made the same test with only 1 rotation (along X OR Y OR Z), and 2 rotations (X+Y OR X+Z OR Y+Z) : the exporter seems to work fine in this case. The issue appears only when an object is rotated along X+Y+Z.

Thanks a lot for your help,

Raphaël

Link to comment
Share on other sites

:o Thanks @Temechon...

The problem is : i would love to get such export ! [crying]

Mine looks like the screenshot i posted above (you will easily see the differences). You'll find Babylon file attached. I've checked all rotations, and it seems like during export, the arrows with rotations along X/Y and Z have wrong values.

I'm getting mad :)

 

M4BF.zip

Link to comment
Share on other sites

Thank you Temechon.

I understand it's normal axes are reversed, but it's not "only" that.... Values have no link at all with values that are in max file. If you have enough time, please check my Babylon file and you'll see rotations are wrong.

Thanks again :)

Link to comment
Share on other sites

@Raphy44260 'rotation' have no values because you're exporting quaternions instead of euler rotation. Check in rotationQuaternion, I have a value for each object. 
Example for dummy_origine010 : "rotationQuaternion": [-0.3461, 0.0, 0.0, -0.9382]

I tried with the very last version of the max exporter (I used the 0.5 before) : same screenshots as above...

Can you try with the very last version of the max exporter please ? https://github.com/BabylonJS/Babylon.js/blob/master/Exporters/3ds Max/Max2Babylon-0.7.0.zip (click on the download button)

Link to comment
Share on other sites

Hi Temechon,

I'm already using version 0.7 of exporter as explaned in my firts post.

I've also tried to check+uncheck the general option about quaternions, and the problem has not been solved. Is there any special "object-linked" option that could explain a bad export ?

On 10/03/2017 at 6:30 PM, Raphy44260 said:

PS : i've just tested with quaternion option unckecked, the problem is still here.

I'm no in office ight now, but i'm going to test again these options and check values.

6 minutes ago, Temechon said:

Example for dummy_origine010 : "rotationQuaternion": [-0.3461, 0.0, 0.0, -0.9382]

Is there a way to choose rather to use Euler or Quaternion rotation during import inside BJS ?

Thank you very much,

Link to comment
Share on other sites

I'm not aware of any special object-linked option that could explain this... Maybe you have a parent-child relation in your original max file I don't have in the file you sent.

You can choose by exporting quaternion/euler by clicking on the 'export quaternion' option when click righ-click on the scene. (checked : export quaternion. Not checked : export euler angles)

Link to comment
Share on other sites

On 15/03/2017 at 9:28 AM, Temechon said:

@Raphy44260 'rotation' have no values because you're exporting quaternions instead of euler rotation. Check in rotationQuaternion, I have a value for each object. 
Example for dummy_origine010 : "rotationQuaternion": [-0.3461, 0.0, 0.0, -0.9382]

Great, great, great thanks Temechon, the problem is solved. Here are the 2 mistakes we made : 

1. objects links were not destroyed before exporting

2. when we exported with quaternions, we tried to get the rotation information through "rotation" value instead of "rotationQuaternion" in BJS

Thank you very much, i'll let you know about the project's future.... :)

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