fabre.cedric Posted February 25, 2021 Share Posted February 25, 2021 (edited) Hello, I have migrated our project on the Unigine 2.13.0.1 and when I use the Unigine::Render::renderImageCube or ViewportPtr->renderImageCube I have noticed many crash when call QCoreApplication::ProcessEvent (update/render/swap) on a QT application. The texture cube creation like this: Unigine::ImagePtr screenshot_image = Unigine::Image::create(); screenshot_image->createCube(1536, 1536, Unigine::Image::FORMAT_RGBA16F,1,true,true); I have tested this in my code : Unigine::Log::warning("before\r\n"); view->renderImageCube(camera, screenshot_image); Unigine::Log::warning("after\r\n"); And in the log I have noticed this : WARNING: before ERROR: Image::flipY(): can't flip Cube image WARNING: after If I use the renderTextureCube method that work perfectly and there is no crash but I need Image and not Texture. With the previous version of Unigine 2.12.0.2 there is no problems before migrating. Thanks Edited February 25, 2021 by fabre.cedric Link to comment
silent Posted February 26, 2021 Share Posted February 26, 2021 Hi Fabre, Can you create a small reproduction sample based on the already existing Qt integration samples inside SDK Browser? I've tried to reproduce this, but with no luck. 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
fabre.cedric Posted February 26, 2021 Author Share Posted February 26, 2021 Hi Silent, I can reproduce it on the sample viewportQT without problem in the AppQt just add this line before if (Unigine::Engine::isInitialized() && Unigine::Render::isInitialized() && timer_resize == 0) : if (Unigine::Input::isKeyUp(Unigine::Input::KEY_A)) { Unigine::ImagePtr cubeImage = Unigine::Image::create(); cubeImage->createCube(1024, 1024, Unigine::Image::FORMAT_RGBA16F, 1, true, true); if (Unigine::Game::getPlayer().get() != nullptr) { if (Unigine::Game::getPlayer()->getCamera().get() != nullptr) { Unigine::Log::warning("BEFORE \r\n"); Unigine::Render::renderImageCube(Unigine::Game::getPlayer()->getCamera(), cubeImage, 0); Unigine::Log::warning("AFTER\r\n"); } } } I have another bug with the path name of the application because my windows user name is "Cédric Fabre" and sometimes the "é" chars doesn't work. For exemple I can't execute foxHole demo...Look at the "Data path" and "App path" there are not the same. ---- Filesystem ---- App path: C:/Users/C├®dricFABRE-EDICAD/Unigine SDK Browser/demos/foxhole_demo_windows_2.13.0.1/bin/ Data path: C:/Users/CÚdricFABRE-EDICAD/Unigine SDK Browser/demos/foxhole_demo_windows_2.13.0.1/data/ Save path: C:/Users/C├®dricFABRE-EDICAD/Unigine SDK Browser/demos/foxhole_demo_windows_2.13.0.1/bin/ Thanks :) Link to comment
fabre.cedric Posted February 26, 2021 Author Share Posted February 26, 2021 Some important thing, I use openGL and not DirectX and I'm on a new computer I9 9900K with Rtx3070. Link to comment
silent Posted February 26, 2021 Share Posted February 26, 2021 Hi Fabre, I've successfully reproduced this issue. The Qt is not really required, it's just me copied wrong method (texture instead of image). Sorry for the misleading. Regarding your initial issue with crashes - there are currently 2 separate bugs: Wrong OpenGL implementation of cubemap rendering (even for renderTextureCube): resulting cubemaps will be always filpped; General engine crash when calling renderImageCube (with both DX11 and OpenGL). I've already created two tickets regarding this behavior in internal bug tracker. In the meantime you can still get required CPU image from the working renderTextureCube by calling texture->getImage(image); To avoid flip issue currently there is no solution rather than using the DX11 API. I hope that we would implement a proper fix for these issues in the upcoming 2.14 SDK update. 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 Link to comment
fabre.cedric Posted February 26, 2021 Author Share Posted February 26, 2021 No problem I'll use texture instead with a viewportPtr. I have created a new post in the bug reports. Thanks For your rapid answer Silent and have a good day. Link to comment
Recommended Posts