taiotoshi Posted August 28, 2015 Share Posted August 28, 2015 Hi, when I try to export an object, that was cloned from another object with the max 'mirror tool',the cloned object is not exported correctly. It seems that max is flipping the axis in the objects TM which will cause strange effects during export. I attach a simple max scene with a box (left) and a cloned box (right) (using the mirror command). As you can see the rendering is ok, but the babylon export fails. What can i do to resolve this issue? Regards Andre mirror_error.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 28, 2015 Share Posted August 28, 2015 Hello, you should bake and ResetXForm on the mirrored object Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted September 7, 2015 Author Share Posted September 7, 2015 Hello, you should bake and ResetXForm on the mirrored objectHello, thanks for your reply. Unfortunately we are forced to export the scenes as they are (without modifying them by hand).Some of them are quite big... The IGameExporter from the 3DSMaxSdk / samples is able to handle the mirrored objects, at least in 3DSMAX coordinate system.I know that we have D3D on babylon export, but all objects export fine, even the rotated ones. (Export Quaternions == true).Only the mirrored are not correct.Any hints on how i must 'transform' vertices / positions to make things look the same way as in max / renderings? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 8, 2015 Share Posted September 8, 2015 If you can identify them, it is just a matter of applying a counter rotation Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted September 9, 2015 Author Share Posted September 9, 2015 Identifying should be no problem. I have found a test for negative parity of the TM in max samples. But could you give me some more information or sample code on how to do the 'counter rotation', please.I guess, I must apply them to the texture vertices as well? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 9, 2015 Share Posted September 9, 2015 can you create a PG so it will be easier for me to find the right transform matrix? Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted September 10, 2015 Author Share Posted September 10, 2015 I have attached the max file and the exported output in my zip file.I cant imagine how to create a useful playground, because it would contain the false exported objects (see mirror_error.babylon) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 10, 2015 Share Posted September 10, 2015 So sounds like you need two things: a rotation on X axis of Math.PI and either inverting faces order which is less tricky (you have to use mesh.getIndices and then mesh.setIndices) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 10, 2015 Share Posted September 10, 2015 Other option (my favorite): update the exporter to take mirrored objects in account! Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted September 14, 2015 Author Share Posted September 14, 2015 the updated version of the exporter would be my favorite too. When do you think, you could have a look on that item, and when can I expect an updated version of the exporter? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 14, 2015 Share Posted September 14, 2015 My ask was more: When do you want to have a look? Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted October 19, 2015 Author Share Posted October 19, 2015 Ok, i will give it a try, if you will guide me a little bit. So i have to : 1) rotate all points around x axis math.Pi2) invert the order of all faces What about the texture maps? If you would like to assist me with some code fragments, this would be very nice, because I am relatively new to this kind of stuff... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2015 Share Posted October 19, 2015 Just thinking out loud : can you try to set mesh.scalingDeterminant = -1 ? Quote Link to comment Share on other sites More sharing options...
taiotoshi Posted October 20, 2015 Author Share Posted October 20, 2015 Sorry, i Cant find any '.scalingDeterminant' properties.Do you mean MaxNode, unskinnedMesh or the babylonMesh? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2015 Share Posted October 20, 2015 Oh sorry, I meant: in your javascript code, on your babylon.js mesh Quote Link to comment Share on other sites More sharing options...
david028 Posted May 8, 2016 Share Posted May 8, 2016 Has anyone found a solution to this? I am having the same problem exporting cars from 3ds max where one door is often a mirror of the other and due to the curved nature and detailing I can not simply clone and rotate the other door which would need to be inverted. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 9, 2016 Share Posted May 9, 2016 yep the idea was to invert mesh.scalingDeterminant for your mirrored object Quote Link to comment Share on other sites More sharing options...
asidiali Posted January 6, 2017 Share Posted January 6, 2017 Hi there @Deltakosh, Having the same issue with mirrored objects in the scene from 3DSMax. Tried to invert `scalingDeterminant` to no avail. Any other suggestions? I am going to try to follow your instructions above for manually rotating and inverting the order of the faces. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 6, 2017 Share Posted January 6, 2017 Nope, I know this is a pain but so far I did not find another way to support it 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.