Kesshi Posted March 2, 2016 Share Posted March 2, 2016 I would like to know why BabylonJs uses left handed coordinates. I mean OpenGL is right handed, most of the software i know is right handed (Blender). I know that early versions of DirectX were left handed but nowadays it supports both. It would be nice if BabylonJs also had a switch for this. At the moment i have do convert all my data/models from right to left handed. Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 2, 2016 Share Posted March 2, 2016 Hi Kesshi, I am not sure how to answer this question I am not the one who decided left or right handed, but I am one of the people who decided to use this framework, with both its good and bad sides (not that I am saying there are bad sides, of course). You can also say that 3DS (and STL! And Cannon.js) have Z as the up-axis, so why can't we support that as well? If you don't like the left handed system, you can always change the source in your own fork (I guess those are simple changes in the engine) and enjoy BJS right-handed. Knowing how @Deltakosh keeps the framework backwards-compatible, this will probably never happen. But who knows ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 2, 2016 Share Posted March 2, 2016 BJS is left handed because...we had to make a choice As raanan mentioned, we also decided to be Y up where others did differently. You can still consider changing Babylon.js to right handed with little changes: - Change Matrix.LookAtLHoRef to be right handed: https://github.com/BabylonJS/Babylon.js/blob/master/src/Math/babylon.math.ts#L2475 - Change Matrix.PerspectiveFovLHToRef to be right handed: https://github.com/BabylonJS/Babylon.js/blob/master/src/Math/babylon.math.ts#L2569 And you're done Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Kesshi Posted March 3, 2016 Author Share Posted March 3, 2016 10 hours ago, Deltakosh said: You can still consider changing Babylon.js to right handed with little changes: - Change Matrix.LookAtLHoRef to be right handed: https://github.com/BabylonJS/Babylon.js/blob/master/src/Math/babylon.math.ts#L2475 - Change Matrix.PerspectiveFovLHToRef to be right handed: https://github.com/BabylonJS/Babylon.js/blob/master/src/Math/babylon.math.ts#L2569 And you're done Its not enough i think. Maybe face winding and depth func also need to be changed ... I think i will not mess around with those things for now Its a bit extra work but I just need to make sure to always make the correct conversions when exchanging data between our offline appliaction and the new online one. I wrote a basic function already to convert a mesh/geometry from right to left handed. ... maybe i modify the obj loader to do this directly while loading. Most obj files found in the internet should be right handed anyway. Things like z-up can be easily fixed by the user by roating the object. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 3, 2016 Share Posted March 3, 2016 Quote Its not enough i think. Maybe face winding and depth func also need to be changed . Correct And I really like to idea of delegating the conversion work to loaders 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.