Raphy44260 Posted March 10, 2017 Share Posted March 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2017 Share Posted March 10, 2017 Hello and welcome! can you make sure that you are using quaternions to export rotation (right click in the scene/Babylon properties). Do you have a simple scene with a box that can highlight this issue? Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 10, 2017 Author Share Posted March 10, 2017 wow, thanks for your ULTRA FAST reply Deltakosh ! Yes this option is checked (i didn't know it existed... ). You'll find a screenshot attached. Thank you ! Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 10, 2017 Author Share Posted March 10, 2017 PS : i've just tested with quaternion option unckecked, the problem is still here. Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 12, 2017 Share Posted March 12, 2017 Did you try to use 'reset x form' on the problematic object ? Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 12, 2017 Author Share Posted March 12, 2017 Yes, i applied a resetXform on each object, then rotated them with align tool to place them properly. Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 13, 2017 Share Posted March 13, 2017 Is there a way to have access to your max file ? Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 13, 2017 Author Share Posted March 13, 2017 For sure ! You'll find here the file that doesn't work... sample-rotation-trouble.max Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 13, 2017 Share Posted March 13, 2017 Thanks! @Temechon will help you soon (Thank you @Temechonby the way ;)) Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 14, 2017 Share Posted March 14, 2017 I tried to export : Here is what I have in bjs : Where is the problem ? Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 14, 2017 Author Share Posted March 14, 2017 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 Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 14, 2017 Share Posted March 14, 2017 Did you try the last version of the exporter? It's a really normal that all axis are reversed in the bus file, as 3dsmax is right handed and Babylon is left handed. Edit : nvm I can see it in your first post. I'll check my version tomorrow Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 14, 2017 Author Share Posted March 14, 2017 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 14, 2017 Share Posted March 14, 2017 @Temechon if end up with a different version, can you be kind enough to do a diff with the latest one? Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 15, 2017 Share Posted March 15, 2017 @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) Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 15, 2017 Author Share Posted March 15, 2017 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, Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 15, 2017 Share Posted March 15, 2017 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) Quote Link to comment Share on other sites More sharing options...
Raphy44260 Posted March 16, 2017 Author Share Posted March 16, 2017 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.... Temechon 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 16, 2017 Share Posted March 16, 2017 Cool Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.