Jump to content

setVirtualResolution to default resolution


photo

Recommended Posts

Hi,

I have tested to render at a high resolution with setVirtualResolution(7680 , 4320) and get image with

Unigine::Render::renderScreenMaterial("render_copy_2d", colorTexture) with callback without problems.

But when I set the new virtual resolution to default setVirtualResolution(-1, -1), my application is really slow and all the memory of GPU appear not be released.

What's the right way to made this ?

Thanks.

Link to comment

Hello,

I'm sorry for the delay.

We tested the same case with the console commands and it worked okay:

  • render_virtual_resolution 7680 4320
  • grabbed an image (F12)
  • set resolution to the default value with render_virtual_resolution -1 -1
  • video_restart

May I ask you to build a sample that shows this behavior? A full log and PC specs will also help.

Thank you.

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

Link to comment

No problem for the delay,

I have noticed this problem is much bigger when my test scene contains more nodes.
Where can find the video_restart in C++ please ?

For a single test scene this is difficult because there is many code now...When I have the time I can try to program a simple test to reproduce this problem.

For my PC specs this is an I7 4790 under win10 with 16gb of memory and the graphic card is an RTX2080S.
Thanks.

Link to comment

I have tried the restart_video and same problem.

If I delete all nodes and reload scene without restarting application or anything the problem disappear...


    Unigine::Vector <Unigine::NodePtr> listOfNodes;
    Unigine::World::getRootNodes(listOfNodes);
    
    for (Unigine::Vector<Unigine::NodePtr>::iterator itNode = listOfNodes.begin(); itNode != listOfNodes.end(); itNode++)
    {
        if (itNode.get() != nullptr)
        {
            Unigine::World::clearNode(itNode->get()->getName());
            itNode->get()->deleteForce();
        }
    }
    listOfNodes.clear();

Link to comment

If that can help to identify where is the problem...

Image before setvirtual.

Image during setvirtual and capture the gBuffer by callback on CALLBACK_BEGIN_VISUALIZER.

Image after capture and setvirtual(-1,-1) after 10 minutes for the memory usage is totaly free.

My graphic processor stay at 98.8/100% of usage, I don't understand why ?

EDIT: OpenGL rendering is used here

GPU_Usage.png.8affa7d18cf590d6ca18a698c46cfc22.png

 

I'll try to reproduce this problem in a test scene...

Thanks.

Edited by fabre.cedric
Link to comment

Well, I tested this with the console commands that should do the very same thing you've described. It worked similar for me both with DirectX and OpenGL.

On 6/9/2020 at 7:06 PM, fabre.cedric said:

my application is really slow and all the memory of GPU appear not be released.

By the way, did you mean RAM or VRAM? I'm asking because I see RAM consumption values on the last screenshot.

6 hours ago, fabre.cedric said:

I'll try to reproduce this problem in a test scene...

That will help a lot in resolving this question.

Thank you.

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

Link to comment

Hello,
I have noticed this problem appear only when I have planar reflection materials in my 3D Scene.
The memory up from 1.8Go to 8.5Go when grab image. And after that, my application run more slowly...

 

 

Link to comment

Cedric.zip

I have many objects in my real scene and the memory up to 10go when I grab an image and after, that run slowly.

If I destroy all nodes and reload all the problem disappear.


For first, when I have planar reflection why the memory up to ten giga when I grab image ? I think the problem is around this point.

Thanks.

Link to comment

OpenGL driver works very bad when you get VRAM usage higher than you have dedicated VRAM. Is that your use-case? If so there is very little we can do here. You can switch to DX11 or swith to a different GPU with higher amount of VRAM.

Alternatively you can reduce the planar reflections resolution if you plan to use OpenGL and your current GPU.

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

Link to comment

You are right Silent !

The problem is the vRam used for planar reflection !
Dx11 is not an option for our software and for quality rendering reduce the size of the texture is not an option too.

Maybe I can try to reduce the quality for small glazing only...

Edited by fabre.cedric
Link to comment
×
×
  • Create New...