POV-Ray : Newsgroups : povray.animations : Step_Frame command???? Server Time
23 Nov 2024 12:03:38 EST (-0500)
  Step_Frame command???? (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Inquisitor
Subject: Step_Frame command????
Date: 2 Jul 2009 12:45:01
Message: <web.4a4ce3cbaa245cc6182abe670@news.povray.org>



Initial_Clock = 0
Final_Clock = 60

Initial_Frame = 0
Final_Frame = 1800








etc.

directory (with my POV ray scene files) yet have separate ini files.  This way
they all dump their images into the same directory.




// Does the storyboard
// When done, I have a 60 second spot with 1 frame/second
Initial_Frame = 0
Final_Frame = 1800
Step_Frame = 30

// Computer 2
// When done, I have a 60 second spot with 2 frames/second
Initial_Frame = 15
Final_Frame = 1800
Step_Frame = 30


of commands or tricks that I can use to get the same results?

Thanks!


Post a reply to this message

From: Chris B
Subject: Re: Step_Frame command????
Date: 2 Jul 2009 15:28:33
Message: <4a4d0a61$1@news.povray.org>
"Inquisitor" <dec### [at] sybasecom> wrote in message 
news:web.4a4ce3cbaa245cc6182abe670@news.povray.org...
> Say I have a scenario where I want to create an animation. say 60 seconds. 
> And.
> I want to have a smooth video. say 30 frames/second.  So, I'd have.
>
> Initial_Clock = 0
> Final_Clock = 60
>
> Initial_Frame = 0
> Final_Frame = 1800
>
> Also, it takes 6 hours to render a frame!  Hmmm. 1.3 years.
>
> I'd like to do 2 things.
> (1) I'd like to be able to have it first generate at one second intervals. 
> so I
> can see a story board of the entire video with 60 frames.  Simple enough. 
> set
> Final_Frame = 60.  Well, I don't want to have to re-render those 60 frames 
> when
> I do the rest, so I want the files to be numbered Xxxx0000, Xxxx0030, 
> Xxxx0060.
> etc.
> (2) And later, I'd like multiple computers to be connected to a common 
> network
> directory (with my POV ray scene files) yet have separate ini files.  This 
> way
> they all dump their images into the same directory.
>
> It seems that I could solve both desires with a Step_Frame command.
>
> // Computer 1.
> // Does the storyboard
> // When done, I have a 60 second spot with 1 frame/second
> Initial_Frame = 0
> Final_Frame = 1800
> Step_Frame = 30
>
> // Computer 2
> // When done, I have a 60 second spot with 2 frames/second
> Initial_Frame = 15
> Final_Frame = 1800
> Step_Frame = 30
>
> Since there isn't any such command (that I can find). is there some other 
> series
> of commands or tricks that I can use to get the same results?
>

Yes. Sort of! :-)

I'll explain for question 2), but you'll see that it's easy to use a similar 
technique for question 1).

Within the scene file you can tell POV-Ray to do whatever you want with the 
frame information or the clock information that gets passed in via the 
animation options. So if you wish to create such a step frame process you 
can declare a variable called 'Step_Frame' and one called 'Frame_Offset' 
within your scene file (or INI file), then you can calculated your own frame 
number (let's call it MyFrameNumber) and use it wherever you currently use 
frame_number:

#declare MyFrameNumber = frame_number*Step_Frame+Frame_Offset;

If you'd rather change these values through the command-line or in the ini 
file than set them in the scene file, you can do that too. The syntax is a 
little odd, but it allows you to declare a constant that you can read when 
parsing your scene file. The syntax is Declare=IDENTIFIER=FLOAT, so in this 
case you could specify Declare=Step_Frame=30 and Declare=Frame_Offset=15 in 
either the ini file or on the command line.

The remaining problem is with the output file names. I've used a solution in 
the past which is a bit messy, so you may find that someone else can propose 
a better alternative: You can specify an output file name via the 
command-line or ini file that incorporates a unique number for that computer 
so that no two computers are using the same output file name. From within 
the scene file write a text file that contains a rename command for each 
generated image. You end up with one text file for each image, but you can 
usually simply run a single OS command to concatenate them into a single 
batch file that you can run at the end, to rename all of the images at once. 
In Windows the DOS 'copy' command can easily do this concatenation, for 
example, 'copy *.txt myfile.bat'.

Note. It takes a little organisation and planning to avoid mishaps ;-). I'd 
recommend taking regular backups, so you can always go back a day if you 
make some dreadful mistake.

Regards,
Chris B.


Post a reply to this message

From: Darren New
Subject: Re: Step_Frame command????
Date: 2 Jul 2009 19:45:27
Message: <4a4d4697$1@news.povray.org>
Inquisitor wrote:
> Since there isn’t any such command (that I can find)… i
s there some other series
> of commands or tricks that I can use to get the same results?

Do the looping from outside of povray. Calculate a batch/shell script tha
t 
will invoke pov for the appropriate frame, and then run the script. Since
 
you're skipping frames, you aren't carrying data from one frame to the ne
xt, 
so this would seem pretty straightforward.

Both Windows BAT files and Unix shell programs can handle integer-like fo
r 
loops, so it shouldn't take any code you don't already have.

-- 
   Darren New, San Diego CA, USA (PST)
   Insanity is a small city on the western
   border of the State of Mind.


Post a reply to this message

From: Karl Anders
Subject: Re: Step_Frame command????
Date: 4 Jul 2009 03:35:00
Message: <web.4a4f05cab78569e70a54db0@news.povray.org>
Another possible solution would be to install and use MegaPOV, which does have a
commandline switch or .ini-file option that does what you are looking for - only
it's called Frame_Step :-)

Have a nice weekend
Karl


Post a reply to this message

From: Inquisitor
Subject: Re: Step_Frame command????
Date: 8 Jul 2009 08:25:00
Message: <web.4a548ef4b78569e182abe670@news.povray.org>


ChrisB -  I think I understand the methodology.


That opens up some possibilities.




Thank you for the responses.  Lots of things to research.  Probably explore all


Post a reply to this message

From: Chris B
Subject: Re: Step_Frame command????
Date: 8 Jul 2009 08:55:27
Message: <4a54973f$1@news.povray.org>
"Inquisitor" <dec### [at] sybasecom> wrote in message 
news:web.4a548ef4b78569e182abe670@news.povray.org...
> Sorry about the delay. I've been on vacation.
>
> ChrisB -  I think I understand the methodology.
>
> Darren New - Hmmm. wasn't aware you could drive POV Ray from a command 
> line.
> That opens up some possibilities.
>
> Karl Anders - Haven't heard much about this program.  I'm assuming there's
> plenty on it. on this forum.  Need to do some research on this too.
>
> Thank you for the responses.  Lots of things to research.  Probably 
> explore all
> three approaches. just for s&g and for ease of use and future needs.
>

Another thing you may wish to look at to see whether it helps is SMPOV 
(http://www.it-berater.org/smpov.htm), which is designed to front-end 
MegaPOV to perform distributed processing. I've never used it myself, but it 
claims to be able to 'distribute animations in pieces to PC's via MegaPOV's 
"frame_step"-feature '.


Post a reply to this message

From: Inquisitor
Subject: Re: Step_Frame command????
Date: 16 Jul 2009 14:10:01
Message: <web.4a5f6ce8b78569e182abe670@news.povray.org>




------------------------ Begin of  ANIMATION.INI ---------------------------
Input_File_Name=Batch.pov

Initial_Frame = 0
Final_Frame   = 100
Initial_Clock = 0
Final_Clock   = 100
------------------------ End of  ANIMATION.INI ---------------------------


equal 0, Initial_Clock must equal 0 and Final_Frame must equal Final_Clock.


batch is one instance of POV-Ray running the full ini file.  Typically, if

POV-Ray per CPU core that you have available on your system.  You lucky ones

separate directories.

------------------------ Begin of  BATCH.POV ---------------------------
// Notes:
// (1) Number of digits needed for Final_Frame.  2 if 10-99, 3 if 100-999...
#declare digitCnt = 3;
// (2) File naming assumes that total lengh of film is 9999 seconds or less.
// (3) Seconds between frames for final product.
#declare minStep = 1 / 15;

// (4) Initial time to start "Job"
#declare timeStart = 0 * minStep;           // <------ Change This!
// (5) Seconds between frames for this ini file "Job".
#declare timeStep = 15 * minStep;           // <------ Change This!

// Don't mess with.
#declare time = timeStart + clock * timeStep;

#fopen file "Rename.bat" append
#write (file,
    concat("'  Frame ", str(clock, 5, 0), " is at ", str(time, 5, 5), "
seconds\n")
    concat("rename Batch", str(clock, -digitCnt, 0), ".bmp ")
    concat("Frame", str(int(time), -4, 0), "-",
        str(mod(time / minStep, 1 / minStep), -2, 0), ".bmp\n"))
#fclose file


------------------------ End of  BATCH.POV ---------------------------



#declare digitCnt = 32;


them to 1000 and over change to 4.



#declare minStep = 1 / 15;





#declare timeStart = 0 * minStep;
#declare timeStep = 30 * minStep;

Change every instance of "clock" in your pov scene file to "time" and you're
good to go.  Each batch will create 100 bitmaps (in this example) and a batch
file (Rename.bat) that will rename the POV-Ray images to a naming convention
based on the actual seconds of the frame.  That way the images can all be
dropped in a common folder and will order by their time in the film and thus
make life easier when combining into the video.

Good luck.


Post a reply to this message

From: Inquisitor
Subject: Re: Step_Frame command????
Date: 7 Aug 2009 17:45:00
Message: <web.4a7c9f26b78569e182abe670@news.povray.org>
I wanted to pass on the results...

Here's the YouTube of a low resolutiong version using the technique above.

    http://www.youtube.com/watch?v=TujngLy_QK4

Its 480x270 by 15 f/s.

I'm currently generating a high res version

1280x720x15 f/s... It should be out in... say... a month or two.


Post a reply to this message

From: Chris B
Subject: Re: Step_Frame command????
Date: 8 Aug 2009 04:45:56
Message: <4a7d3b44$1@news.povray.org>
"Inquisitor" <dec### [at] sybasecom> wrote in message 
news:web.4a7c9f26b78569e182abe670@news.povray.org...
>I wanted to pass on the results...
>
> Here's the YouTube of a low resolutiong version using the technique above.
>
>    http://www.youtube.com/watch?v=TujngLy_QK4
>
> Its 480x270 by 15 f/s.
>
> I'm currently generating a high res version
>
> 1280x720x15 f/s... It should be out in... say... a month or two.
>

It's looking very good indeed and very good to see what you're up to :-).

Although you've not asked for feedback, I've made a few notes in case you're 
still at a stage where you can implement improvements:

There are jumps in the ocean surface pattern about every 10 seconds. There's 
one at about 2min that's quite apparent (play from 1m 58s).

The boat is nice, but I think that making the hull slightly reflective would 
make a huge improvement (though it would lengthen render times). The sails 
look too solid to my eyes. I'd suggest making them slightly transparent and 
playing around with the diffuse settings, although this once again will 
impact your render times.

When the boat starts to turn at 2m 28s, it seems like it needs half a second 
to a second of transition.  Again at 3m 33s the stop is just too 
instantanious and clean (even for someone who's a dab hand on the throttle).

IMO the camera stop at 2m 51 s is too abrupt and the transition to night at 
about 2m 58 doesn't ring true. The shadows on the lights imply that the Sun 
is still very high in the sky. You could maybe move the main light down to 
make the shadows track more. Moving the clouds across the sky and the water 
texture more rapidly during this transition would give a feeling that the 
footage has been sped up. I'd suggest keeping the camera dead still at this 
stage as this sort of shot is typically done with a fixed camera with a 
delay timer.

Regards,
Chris B.


Post a reply to this message

From: Alain
Subject: Re: Step_Frame command????
Date: 8 Aug 2009 12:27:51
Message: <4a7da787$1@news.povray.org>

> I wanted to pass on the results...
> 
> Here's the YouTube of a low resolutiong version using the technique above.
> 
>     http://www.youtube.com/watch?v=TujngLy_QK4
> 
> Its 480x270 by 15 f/s.
> 
> I'm currently generating a high res version
> 
> 1280x720x15 f/s... It should be out in... say... a month or two.
> 
> 
> 

Interesting side by side masts setup. Never saw something like that on a 
real ship. I tought of something similar myself, but with parallel 
masts, not masts meetint at the top.


Alain


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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