POV-Ray : Newsgroups : povray.general : Speed up the calculation of a single image by using the options +sr and +er Server Time
24 Dec 2024 21:21:49 EST (-0500)
  Speed up the calculation of a single image by using the options +sr and +er (Message 1 to 4 of 4)  
From: Christian Baun
Subject: Speed up the calculation of a single image by using the options +sr and +er
Date: 4 Aug 2014 14:55:01
Message: <web.53dfd628263d1e289108b29d0@news.povray.org>
Hi,

I want to speed up the calculation of a single image by using multiple servers
in parallel.

Before POV-Ray 3.7 this was possible by starting a POV-Ray job on each available
server and letting each server calculating a part of the final image by using
the options +sr and +er.

The behavior of POV-Ray 3.6 and older is very well explained here [1]:

"When rendering a subset of *rows* (+sr/+er) POV-Ray writes the full height into
the image file header and only writed those lines into the image that are
rendered. This can cause problems with image reading programs that are not
checking the file while reading and just read over the end."

When using PPM as output format, it is easy to concatenate the resulting parts
to the final image.

POV-Ray 3.7 works in a modified way as described here [2]:

"When rendering a subset of columns (+sc/+ec) and/or rows (+sr/+er), POV-Ray
generates a full width image and fills the not rendered columns with black
pixels. This should not be a problem for any image reading program no matter
what file format is used. Earlier versions of POV-Ray had problems when a subset
of rows (+sr/+er) was rendered. The full height information was written into the
image file header but it only wrote image data for those lines that were
actually rendered. This made output files that were incompatible with various
image processing tools. In version 3.7 this is no longer the case."

Is there any way to get the old behavior back without doing a downgrade?
Is there any "hidden" command line option?
The new behavior makes distributed image generation very complicated.

Best Regards
   Christian Baun

[1] http://www.povray.org/documentation/view/3.6.0/217/
[2] http://www.povray.org/documentation/3.7.0/r3_2.html#r3_2_4


Post a reply to this message

From: jhu
Subject: Re: Speed up the calculation of a single image by using the options +sr and= +er
Date: 4 Aug 2014 21:15:01
Message: <web.53e02f6fe8e54933d19b0ec40@news.povray.org>
Not really. See here:
http://news.povray.org/povray.text.tutorials/thread/%3Cweb.52e993ec552e7103d19b0ec40%40news.povray.org%3E/

Just need to install Imagemagick


Post a reply to this message

From: clipka
Subject: Re: Speed up the calculation of a single image by using the options +sr and +er
Date: 4 Aug 2014 21:21:26
Message: <53e03196@news.povray.org>
Am 04.08.2014 20:51, schrieb Christian Baun:

> "When rendering a subset of columns (+sc/+ec) and/or rows (+sr/+er), POV-Ray
> generates a full width image and fills the not rendered columns with black
> pixels. This should not be a problem for any image reading program no matter
> what file format is used. Earlier versions of POV-Ray had problems when a subset
> of rows (+sr/+er) was rendered. The full height information was written into the
> image file header but it only wrote image data for those lines that were
> actually rendered. This made output files that were incompatible with various
> image processing tools. In version 3.7 this is no longer the case."
>
> Is there any way to get the old behavior back without doing a downgrade?
> Is there any "hidden" command line option?

No.

> The new behavior makes distributed image generation very complicated.

It should still be easy enough to do with any batch image manipulation 
tool: Just blend the partial images using your choice of "add", 
"screen", "exclusion" or "lighten" operation, and Bob's your uncle.

For instance, using the ImageMagick tools this should be as simple as:

     composite -compose lighten "foo.ppm" "bar.ppm" "foobar.ppm"

There are various advantages to this; not only does it save you from the 
hassle of trimming away the header of the second image; it also works 
with any image file format, allows for more flexibility in partitioning 
of the render job, allows for overlap of the rendered regions (if you 
choose the "lighten" operation), and also allows for file format 
conversion as you go.


Post a reply to this message

From: Christian Baun
Subject: Re: Speed up the calculation of a single image by using the options +sr and= +er
Date: 5 Aug 2014 04:50:00
Message: <web.53e099f3e8e5493391a8a5990@news.povray.org>
Hi clipka,

The "composite -compose lighten" approach works perfect.

Thanks a lot !!!

Best Regards
   Christian Baun


Post a reply to this message

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