POV-Ray : Newsgroups : povray.advanced-users : Stop rendering using a break statement Server Time
31 Oct 2024 21:00:01 EDT (-0400)
  Stop rendering using a break statement (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Mike Horvath
Subject: Stop rendering using a break statement
Date: 8 Feb 2015 14:26:02
Message: <54d7b84a$1@news.povray.org>
Is there a easy way to stop rendering based on a condition, sort of like 
a break statement in a loop? I know I can wrap my entire scene in a 
condition, but I am hoping there is something simpler. Thanks.


Post a reply to this message

From: Le Forgeron
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 14:43:26
Message: <54d7bc5e$1@news.povray.org>
Le 08/02/2015 20:26, Mike Horvath a écrit :
> Is there a easy way to stop rendering based on a condition, sort of like
> a break statement in a loop? I know I can wrap my entire scene in a
> condition, but I am hoping there is something simpler. Thanks.

The scene is parsed 100% before the render starts. So, no, from the SDL
you cannot control the interruption of the rendering.

On Unix/linux, you can send a signal to the process, and it will catch
it, and stop a few moments after (the front-end thread will stop giving
works to the back-ends' ones... sort of, then collect them all and exit:
if you are rendering at 1pph or less, a few moments can still take a
long time)

I do not know for the window's port. I used to see a "stop" button
somewhere.

Notice that interrupting a render will not, on any platform, provide a
partial picture-file output. NOT.


Post a reply to this message

From: Mike Horvath
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 15:18:29
Message: <54d7c495$1@news.povray.org>
On 2/8/2015 2:43 PM, Le_Forgeron wrote:
> Le 08/02/2015 20:26, Mike Horvath a écrit :
>> Is there a easy way to stop rendering based on a condition, sort of like
>> a break statement in a loop? I know I can wrap my entire scene in a
>> condition, but I am hoping there is something simpler. Thanks.
>
> The scene is parsed 100% before the render starts. So, no, from the SDL
> you cannot control the interruption of the rendering.
>
> On Unix/linux, you can send a signal to the process, and it will catch
> it, and stop a few moments after (the front-end thread will stop giving
> works to the back-ends' ones... sort of, then collect them all and exit:
> if you are rendering at 1pph or less, a few moments can still take a
> long time)
>
> I do not know for the window's port. I used to see a "stop" button
> somewhere.
>
> Notice that interrupting a render will not, on any platform, provide a
> partial picture-file output. NOT.
>


Stopping the parsing (and thus the render too) is what I meant.


Post a reply to this message

From: clipka
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 15:20:32
Message: <54d7c510$1@news.povray.org>
Am 08.02.2015 um 20:26 schrieb Mike Horvath:
> Is there a easy way to stop rendering based on a condition, sort of like
> a break statement in a loop? I know I can wrap my entire scene in a
> condition, but I am hoping there is something simpler. Thanks.

POV-Ray is quite a fascinating thing: It provides ways to do plenty 
different things, sometimes in more than one fashion.

Therefore, rather than ask about a very specific mechanism, it is often 
a more promising approach to ask about the goal you ultimately want to 
achieve; the mechanism you have in mind for it might be unavailable, but 
there might be other ways around it.


Post a reply to this message

From: Mike Horvath
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 15:32:10
Message: <54d7c7ca$1@news.povray.org>
On 2/8/2015 3:20 PM, clipka wrote:
> Am 08.02.2015 um 20:26 schrieb Mike Horvath:
>> Is there a easy way to stop rendering based on a condition, sort of like
>> a break statement in a loop? I know I can wrap my entire scene in a
>> condition, but I am hoping there is something simpler. Thanks.
>
> POV-Ray is quite a fascinating thing: It provides ways to do plenty
> different things, sometimes in more than one fashion.
>
> Therefore, rather than ask about a very specific mechanism, it is often
> a more promising approach to ask about the goal you ultimately want to
> achieve; the mechanism you have in mind for it might be unavailable, but
> there might be other ways around it.
>

One thing I want to do is stop parsing when frame_number equals some 
number. I've created an animation with duplicates that I don't need. But 
I can think of other instances where this could be handy.


Post a reply to this message

From: Le Forgeron
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 16:18:38
Message: <54d7d2ae@news.povray.org>
Le 08/02/2015 21:32, Mike Horvath a écrit :
> On 2/8/2015 3:20 PM, clipka wrote:
>> Am 08.02.2015 um 20:26 schrieb Mike Horvath:
>>> Is there a easy way to stop rendering based on a condition, sort of like
>>> a break statement in a loop? I know I can wrap my entire scene in a
>>> condition, but I am hoping there is something simpler. Thanks.
>>
>> POV-Ray is quite a fascinating thing: It provides ways to do plenty
>> different things, sometimes in more than one fashion.
>>
>> Therefore, rather than ask about a very specific mechanism, it is often
>> a more promising approach to ask about the goal you ultimately want to
>> achieve; the mechanism you have in mind for it might be unavailable, but
>> there might be other ways around it.
>>
> 
> One thing I want to do is stop parsing when frame_number equals some
> number. I've created an animation with duplicates that I don't need. But
> I can think of other instances where this could be handy.

You just want the +EF option ( end-frame, followed by the number of the
frame after which to stop the rendering of the range.)

Look also at SF (start frame) to start after the first one.


Post a reply to this message

From: Mike Horvath
Subject: Re: Stop rendering using a break statement
Date: 8 Feb 2015 19:31:02
Message: <54d7ffc6$1@news.povray.org>
On 2/8/2015 4:18 PM, Le_Forgeron wrote:
> Le 08/02/2015 21:32, Mike Horvath a écrit :
>> On 2/8/2015 3:20 PM, clipka wrote:
>>> Am 08.02.2015 um 20:26 schrieb Mike Horvath:
>>>> Is there a easy way to stop rendering based on a condition, sort of like
>>>> a break statement in a loop? I know I can wrap my entire scene in a
>>>> condition, but I am hoping there is something simpler. Thanks.
>>>
>>> POV-Ray is quite a fascinating thing: It provides ways to do plenty
>>> different things, sometimes in more than one fashion.
>>>
>>> Therefore, rather than ask about a very specific mechanism, it is often
>>> a more promising approach to ask about the goal you ultimately want to
>>> achieve; the mechanism you have in mind for it might be unavailable, but
>>> there might be other ways around it.
>>>
>>
>> One thing I want to do is stop parsing when frame_number equals some
>> number. I've created an animation with duplicates that I don't need. But
>> I can think of other instances where this could be handy.
>
> You just want the +EF option ( end-frame, followed by the number of the
> frame after which to stop the rendering of the range.)
>
> Look also at SF (start frame) to start after the first one.
>


No. For example I may want frames 1-3 and 5-6 parsed and rendered, but 
not frame 4. Your suggestion doesn't work in this case.


Post a reply to this message

From: clipka
Subject: Re: Stop rendering using a break statement
Date: 9 Feb 2015 02:18:46
Message: <54d85f56@news.povray.org>
Am 09.02.2015 um 01:31 schrieb Mike Horvath:

>>> One thing I want to do is stop parsing when frame_number equals some
>>> number. I've created an animation with duplicates that I don't need. But
>>> I can think of other instances where this could be handy.
>>
>> You just want the +EF option ( end-frame, followed by the number of the
>> frame after which to stop the rendering of the range.)
>>
>> Look also at SF (start frame) to start after the first one.
>
> No. For example I may want frames 1-3 and 5-6 parsed and rendered, but
> not frame 4. Your suggestion doesn't work in this case.

So what you're after is not really stopping a render, but skipping 
individual frames in it.

No, at the moment I can't think of any mechanism by which POV-Ray might 
support this (other than rendering only subsets of the animation in the 
first place). The "#error" directive came to my mind, but it does not 
only abort parsing of the current frame, but also the entire render job.


Post a reply to this message

From: scott
Subject: Re: Stop rendering using a break statement
Date: 9 Feb 2015 03:14:25
Message: <54d86c61$1@news.povray.org>
> No. For example I may want frames 1-3 and 5-6 parsed and rendered, but
> not frame 4. Your suggestion doesn't work in this case.

Do you not want frame 4 rendered to save time, or because you physically 
don't want the file to be created?

If you want to save time, but don't mind the file being there, then just 
let it render an empty scene with no objects for the frames you don't 
want, it will only add a fraction of a second.

It should be easy if you could render another .pov file, and put 
something like this in it:

#if(frame_number<>4) // or whatever condition
  #include "mainPOVscene.pov"
#end


Post a reply to this message

From: Le Forgeron
Subject: Re: Stop rendering using a break statement
Date: 9 Feb 2015 03:23:43
Message: <54d86e8f$1@news.povray.org>
Le 09/02/2015 01:31, Mike Horvath a écrit :
>
> No. For example I may want frames 1-3 and 5-6 parsed and rendered, but
> not frame 4. Your suggestion doesn't work in this case.

If frame 4 has already a output file, I wonder if the -C (or is it +C ? 
I know they are opposite of each other, but cannot remember which one 
would try to look if the output image already exist and is complete) 
option would not skip the render of it when detecting that it is already 
complete ?


-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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