POV-Ray : Newsgroups : povray.pov4.discussion.general : Another v4.0 rtr/kla concern. Memory bubble with large HDRI images. : Another v4.0 rtr/kla concern. Memory bubble with large HDRI images. Server Time
23 Apr 2024 14:26:51 EDT (-0400)
  Another v4.0 rtr/kla concern. Memory bubble with large HDRI images.  
From: William F Pokorny
Date: 30 Sep 2021 18:50:51
Message: <61563f4b$1@news.povray.org>
With some of the recent posts on environmental HDRI image use, I played 
today in the povr branch with .hdr and .exr 4k x 2k images. First, 
viewing them via rtr/kla and then playing a little with potential HDRI 

The frame rates are surprisingly good even on my little i3 rotating HDRI 
images full circle. In fact for small windows it's quick - for a while...

It looks like large amounts of memory are allocated to back the large 
HDRI images and that memory (or a substantial part of it) is freed at 
the end of each 'frame.'

The free's cannot keep up after a certain fps rate(1) and the memory 
attached to the povray process quickly jumps to many gigabytes. If 
lucky, you reach an equilibrium before you start to page (or crash).

For now, the frame rates can be slowed with strong AA settings. For the 
4k x 2k HDRIs with which I was playing, I had to use AA costly enough to 
drop to around 2 fps to keep the memory continuously under 500MB.

Note: There are github pull requests and issues related to not freeing 
image memory during animations which might be of use - should one of us 
find a 'todo' to pop the memory bubble issue.

Aside: When the frame rate gets high, closing the preview window itself 
works much better than 'q' (quit) or 'p' (pause). Or, on linux/unix, you 
can have a kill command ready to go on the povray process id should the 
memory consumption start to get out of hand...

Bill P.

(1) - I suspect the slow free might be due the use of c++11 vectors - 
but that's a guess. For rtr/kla it would, of course, be better not to 
allocate and free the memory, but rather re-use it.

(2) - The idea being to modify HDRIs with an rtr/kla 360 preview. After 
which, a render using same scene, but a single spherical camera, would 
be used to generate an updated HDRI image.

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.