JiaYao Posted July 4, 2016 Share Posted July 4, 2016 Hi, I am trying to use a WidgetSpriteViewport, but I am finding the results to be very abnormal. WidgetSpriteViewport's camera are using main camera's Modelview and .Projection function . But I have found it's different effect that in different position and functions ,as show blow: First, put it in front of the .update() function ,the result is object is shaking .Please see the file name is First . Second ,put it in end of the .update() function ,the result is object is shaking a little bit and it seems like lost material .Please see the file name is second . As mentioned above ,the situation happened that only use mat4 to change position ,and the object speed very fast (test is 1000 Meters per second).however it is not happen at lower speed . The main camera works fine, but when I set it to the WidgetSpriteViewport, it becomes very abnormal . The camera's position and look direction is changing every update. Thanks Link to comment
silent Posted July 4, 2016 Share Posted July 4, 2016 Hi Jia, Could you please confirm that you are getting similar results to that: https://developer.unigine.com/forum/topic/3923-widgetspriteviewport-is-very-jumpy-when-the-viewport-changes/ If so, we are working on a fix that will be available with 2.3 SDK update. To be 100% sure that we fixed your use-case too, could you please provide a minimal test scene (based on newly generated project from SDK Browser)? Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
JiaYao Posted July 5, 2016 Author Share Posted July 5, 2016 Hi , I have create a minimal test projection , you can download and test it . Tanks . TestViewport.zip Link to comment
JiaYao Posted July 5, 2016 Author Share Posted July 5, 2016 Hi , you can focus I add replay topic . Tanks . Link to comment
silent Posted July 5, 2016 Share Posted July 5, 2016 Hi Jia, Thank you for the test scene. I've succesfully reproduced this behavior and added this test scene to our internal bug tracker. Sorry for the inconvenience caused. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted July 8, 2016 Share Posted July 8, 2016 Hi Jia, To fix your issue you need to use following code in update(): int update() { time += (engine.game.getIFps()) * 1000; node.setWorldTransform(translate(Vec3(time, time, 0))); spriteViewport.setProjection(player.getProjection()); spriteViewport.setModelview(player.getIWorldTransform()); return 1; } But in this case there will be an issue with incorrect Velocity buffer calculation. To avoid id, please disable TAA and motion blur in console: render_motion_blur 0 && render_antialiasing 0 Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts