Akshay.Patil Posted May 22, 2017 Share Posted May 22, 2017 Hello , Our app has to generate the preview from stored camera positions. To generate the Image preview we are using code snippet Camera playerCamera = StoredCamera[i].getCamera(); Image image = new Image(); engine.render.renderImage2D( playerCamera, image, w, h, "", 0 ); Above code snippet worked fine with Unigine 1.0 and we were able to get the Image Preview from the specified camera position. Which was used to match onscreen output if the both stored and current camera are having same value. But with ungine 2.3.1 the background color is not getting rendered in image texture. We have transparent region instead of background color. Can you suggest the fix for issue ? Link to comment
silent Posted May 22, 2017 Share Posted May 22, 2017 Hi Akshay, You can use Viewport class for that and use the same renderImage2D() method: https://developer.unigine.com/en/docs/2.4.1/api/library/rendering/class.viewport#renderImage2D_Camera_Image_void 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
Akshay.Patil Posted May 23, 2017 Author Share Posted May 23, 2017 I am getting same output with viewport.renderImage2D() , i.e. background color is not getting rendered in image Link to comment
silent Posted May 23, 2017 Share Posted May 23, 2017 Could you please provide a small test scene? Can't reproduce such behavior. 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