danni.coy Posted December 17, 2013 Share Posted December 17, 2013 What I did. Added A capture button to the Tracker Editor.I have added active.player to tracker. it basically does what game.player does but it also works in editor mode. if (engine.editor.isLoaded()) { engine.editor.call("controlsSetEnabled",0); engine.editor.setPlayer(player); } else { engine.game.setPlayer(player); } We are capturing from the system script. This is so I can batch capture while reloading the world between captures to keep timing of animations and world settings consistent.The capturing code in this case looks like. Player player = Unigine::getPlayer(); engine.render.renderImage2D( player.getProjection(), player.getModelView(), image, width, height, player.getPostMaterials(), RENDER_HDR_DISABLED ); We also have a second batch capture mode which adds the following code to the system script. // track initialisation tracker = new Unigine::Tracker::Tracker(); track = tracker.addTrack(filename); //in update function. float pos = (frame-min_frame/max_frame-min_frame)+min_frame; pos /= unit_time*25; track.blend(pos,1.f); What is not working Motion blur. In the case where the camera is being moved by the Editor script and captured from the System script - we are getting a lot less motion blur in the captured frames than we do on the screen. In the cases where both moving the camera and capturing is happening from the system script (batch mode) we are getting a lot more motion blur. Ok what am I missing. How do I get this to work? Link to comment
silent Posted December 19, 2013 Share Posted December 19, 2013 Hi Danny, Have you tried to change Motion Blur setting in Render settings -> Postprocess inside the Editor? 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
danni.coy Posted December 29, 2013 Author Share Posted December 29, 2013 yes -- we have been using these to tweak the results but what we are seeing on the screen is not what we are getting using engine.render.renderImage2D we have to adjust and then look at the rendered frame sequence to figure out if it is right Link to comment
silent Posted January 9, 2014 Share Posted January 9, 2014 Please, check if the variable render_motion_blur is always set to 1 when you capturing frames. 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
nat.harrold Posted January 9, 2014 Share Posted January 9, 2014 It is not simple to describe the problem. We have been capturing motion blur perfectly since it was implemented years ago. Something danni has written in his batch capture code has twisted how motionblur works recently. The bizarre thing is that we can see motionblur if travelling into the screen, but not if travelling perpendicular / sideways. If danni disables the batch capture code and we capture normally, things work fine. It seems that there is some kind of scaling or multipllication happening for some axis of movement. We just don't know what in the code danni posted above would cause this behaviour. Thanks. Link to comment
Recommended Posts