NotNa19 Posted September 10, 2021 Posted September 10, 2021 How can I get an image from the camera so I can use it in code? For example, if I have several objects with a camera and I want to receive images (best as an array of pixels) and process it somehow.
silent Posted September 10, 2021 Posted September 10, 2021 NotNa19 Please check the Screenshot sample from SDK Browser: Samples -> C++ API -> Render -> Screenshot That's basically how to get and image from a screen. Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
NotNa19 Posted September 17, 2021 Author Posted September 17, 2021 Thanks for the answer! I analyzed the example and understood how i can get a screenshot only from the player's camera. I also need to receive an image from several cameras at the same time, without switching the player. Looking at the example, it seems to me that this can be done only with the help of more engine objects.
silent Posted September 17, 2021 Posted September 17, 2021 For that you need to use viewports: https://developer.unigine.com/en/docs/2.14.1/code/usage/mirrors_viewports_materials/index?rlang=cpp#texture_render But don't expect great performance numbers :) 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
NotNa19 Posted September 17, 2021 Author Posted September 17, 2021 Thanks! This is exactly what I need.
Recommended Posts