Jump to content

Crash when using Unigine::Render::renderImageCube


photo

Recommended Posts

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 by fabre.cedric
Link to comment

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

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:

  1. Wrong OpenGL implementation of cubemap rendering (even for renderTextureCube): resulting cubemaps will be always filpped;
  2. 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!

  • Thanks 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...