reepblue Posted May 25, 2015 Share Posted May 25, 2015 I first noticed this with my indicators for Vectronic when after a while the indicators would tend to Z-clip with the wall. Today after I went to a different project, I came back to Vectronic to do a few more changes. In the demo map, I noticed that my doors where not in the tracks anymore, and some indicator panels were oddly rotated. I was able to quickly rotate them back into place (both models and bones) and I only have these screenshots right now. And here is a physics model I forgot to rotate back. After fixing all the models, I closed the editor, and relaunched it. I went back to one of the entities I had to rotate and it's rotation on one of the axis was 89.98 rather then the 90.00 I set it at. It happens to both models with and without bones/animations.. 2 Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
CreativeOcclusion Posted May 25, 2015 Share Posted May 25, 2015 I have this problem too...I have noticed in Tunnels of Tarkus that the rotations change over time...I have had them off as far as 71.25 instead of 90.0...sometimes I have as many as 6 static models at a time that I have to adjust the rotation....I was not sure if this was only happening to me...I feel better that you have also experienced this.... Link to comment Share on other sites More sharing options...
reepblue Posted May 25, 2015 Author Share Posted May 25, 2015 I thought it was only me too. I actually noticed it first with my boxshoot door. But I thought it was just the model and the fact I was loading the map on a different OS. It seems to be that when an entity (or CSG) get rotated, the rotation does not get saved properly. Keep a entity as Rotation 0,0,0, nothing will happen. (maybe some of the 0's will become negative. (-0.0). It also has something to to if a script is attached, and/or is parented to another entity in the scene tree. This issue is annoying and frustrating as things slowly move on their own and one day you'll find all your objects not how you want them. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted May 25, 2015 Share Posted May 25, 2015 It is quite possible you can end up with small floating point inaccuracies in rotations, but 89.98 is functionally the same thing as 90. Your rotation gets converted into a 4x4 matrix, and to read the rotation back it is extracted from a matrix. However, I have never seen a case of continual loss in one direction. I am trying to reproduce this error... My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted May 25, 2015 Author Share Posted May 25, 2015 If it stayed at for example -89.98, I would have been like "whatever, looks fine to me". But it slowly becomes -88, -87, -85, etc. Issue does not really pop up unless you are editing the same map over and over again, switching projects, and just general use of the editor. If there is anything we can do to help, let us know. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted May 26, 2015 Share Posted May 26, 2015 I found a way to produce the problem; Just keep cutting and pasting the same object and you can see it change over time. This is a high priority issue. 3 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted May 26, 2015 Author Share Posted May 26, 2015 Interesting. I tried it with my doors and although the actual model did not rotate, the bones of the models did. Any idea how it relates to it being fine for a few days/weeks then suddenly everything is off? Yeah, I'm a fan of CTRL+Draging so this makes sense why it was happening to me. Oddly enough, my trusses, and CSG were made by me copying and pasting, and they seem not to be effected. Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted May 26, 2015 Share Posted May 26, 2015 I believe the quternion / euler conversion method is correct, but it's hitting the limits of 32-bit floating point precision. The solution is to store both the 4x4 matrix and the local orientation in the map file format, so that it doesn't lose a tiny amount of precision each time it's resaved. Your models are probably off a little because 90 degree rotations produce tiny rounding errors. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 1, 2015 Share Posted June 1, 2015 I did some more tests with the euler / quat conversion and my math is perfect. The problem is definitely just the limits of floating point precision. Therefore I have added the object's local rotation in the map format. 1 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts