POV-Ray : Newsgroups : povray.general : Can I set KFF from inside my scene? Server Time
5 Nov 2024 05:26:21 EST (-0500)
  Can I set KFF from inside my scene? (Message 1 to 5 of 5)  
From: Mathuin
Subject: Can I set KFF from inside my scene?
Date: 9 Oct 2008 14:25:00
Message: <web.48ee4bda854a994d401d7400@news.povray.org>
While designing my animation, I came across two snags, both of which could be
easily fixed if I could set KFF from within my scene file.

The animation is pretty simple:  it travels from point to point through the
scene, looking at attractions from different perspectives.  The first snag is
that I would like the number of frames to scale with the number of objects --
half as many attractions means twice as many frames per attraction which means
the animation runs twice as "slow".  The second snag is that the set of frames
allocated to each attraction counts both moving to the attraction and looking
at it but the last "attraction" is an overhead view so I only need half as many
frames to get the desired effect.  Being able to set KFF to something like
(dimension_size(Attractions,1)-0.5)*FramesPerAttraction would allow me to focus
on creating attractions and not on tweaking command-line settings.

I recognize that this sort of feature could lead to total chaos, so if there's
another way to solve this from inside the scene, I'm all ears.  Thanks!


Post a reply to this message

From: Dan Connelly
Subject: Re: Can I set KFF from inside my scene?
Date: 9 Oct 2008 15:29:00
Message: <48ee5b7c@news.povray.org>
I don't think you can set KFF from a scene file, but you can set the number of
attractions along with KFF from the ini file, right?

Form the documentation:
Declare=IDENTIFIER=FLOAT  	 Declares an identifier with a float value

You can now declare a constant in an INI file, and that constant will be available to
the scene. Since INI file statements may also be laced on the command-line, you can
therefore also declare on the command-line (though there is no switch for it).

   Declare=MyValue=24

This would be the same as a #declare MyValue=24; in a scene file. The value on the
right-hand side must be a constant float value.

A possible use could be switching off radiosity or photons from commandline:

   --in INI-file / on command-line

   Declare=RAD=0

   --in scenefile

   global_settings {
      #if (RAD)
         radiosity {
            ...
         }
      #end
   }

---------------------

Then have the POV file generate a number of attractions dependent on that parameter.

To keep the number of attractions and kff aligned, I'd consider setting generating the
INI with Perl (or just calling POV with command line options)

Dan

Mathuin wrote:
> While designing my animation, I came across two snags, both of which could be
> easily fixed if I could set KFF from within my scene file.
> 
> The animation is pretty simple:  it travels from point to point through the
> scene, looking at attractions from different perspectives.  The first snag is
> that I would like the number of frames to scale with the number of objects --
> half as many attractions means twice as many frames per attraction which means
> the animation runs twice as "slow".  The second snag is that the set of frames
> allocated to each attraction counts both moving to the attraction and looking
> at it but the last "attraction" is an overhead view so I only need half as many
> frames to get the desired effect.  Being able to set KFF to something like
> (dimension_size(Attractions,1)-0.5)*FramesPerAttraction would allow me to focus
> on creating attractions and not on tweaking command-line settings.
> 
> I recognize that this sort of feature could lead to total chaos, so if there's
> another way to solve this from inside the scene, I'm all ears.  Thanks!
> 
> 
>


Post a reply to this message

From: Mathuin
Subject: Re: Can I set KFF from inside my scene?
Date: 9 Oct 2008 16:25:01
Message: <web.48ee680e8cabb3cd8a103ef0@news.povray.org>
Dan Connelly <djc### [at] yahoocom> wrote:
> I don't think you can set KFF from a scene file, but you can set the number of
attractions along with KFF from the in
i file, right?
>
> Form the documentation:
> Declare=IDENTIFIER=FLOAT    Declares an identifier with a float value

[... docs elided ...]

>
> Then have the POV file generate a number of attractions dependent on that parameter.
>
> To keep the number of attractions and kff aligned, I'd consider setting generating
the INI with Perl (or just calling
 POV with command line options)

I already have an easy way to calculate the number of attractions as they are
stored in the Attractions array.  I was just hoping to keep the changes
required down to a bare minimum -- ideally, just adding a single attraction to
the array would cause the animation to scale up accordingly.

So is this impossible?  I'm current developing on Windows so I'm trying to
minimize the outside-POV scripting.  I can't even automate the script because
Pre_Scene_Command is run after INI files are read.  Bleah.


Post a reply to this message

From: John VanSickle
Subject: Re: Can I set KFF from inside my scene?
Date: 10 Oct 2008 08:21:52
Message: <48ef48e0$1@news.povray.org>
Mathuin wrote:
> While designing my animation, I came across two snags, both of which could be
> easily fixed if I could set KFF from within my scene file.
> 
> The animation is pretty simple:  it travels from point to point through the
> scene, looking at attractions from different perspectives.  The first snag is
> that I would like the number of frames to scale with the number of objects --
> half as many attractions means twice as many frames per attraction which means
> the animation runs twice as "slow".  The second snag is that the set of frames
> allocated to each attraction counts both moving to the attraction and looking
> at it but the last "attraction" is an overhead view so I only need half as many
> frames to get the desired effect.  Being able to set KFF to something like
> (dimension_size(Attractions,1)-0.5)*FramesPerAttraction would allow me to focus
> on creating attractions and not on tweaking command-line settings.
> 
> I recognize that this sort of feature could lead to total chaos, so if there's
> another way to solve this from inside the scene, I'm all ears.  Thanks!

Simply calculate a new variable, named it Clock, and use it in place of 
the clock variable.

#declare Clock=some_constantly_rising_expression_using_clock;

For some sections, Clock will rise as quickly as clock, but you can 
smoothly transition to something rising half as quickly for the slower 
parts.

If d*Clock/d*clock is ever negative (that is, the calculated value is 
going down at any point), then time will appear to flow backwards in 
your animation.

Regards,
John


Post a reply to this message

From: Alain
Subject: Re: Can I set KFF from inside my scene?
Date: 10 Oct 2008 11:25:37
Message: <48ef73f1$1@news.povray.org>
Mathuin nous illumina en ce 2008-10-09 14:23 -->
> While designing my animation, I came across two snags, both of which could be
> easily fixed if I could set KFF from within my scene file.
> 
> The animation is pretty simple:  it travels from point to point through the
> scene, looking at attractions from different perspectives.  The first snag is
> that I would like the number of frames to scale with the number of objects --
> half as many attractions means twice as many frames per attraction which means
> the animation runs twice as "slow".  The second snag is that the set of frames
> allocated to each attraction counts both moving to the attraction and looking
> at it but the last "attraction" is an overhead view so I only need half as many
> frames to get the desired effect.  Being able to set KFF to something like
> (dimension_size(Attractions,1)-0.5)*FramesPerAttraction would allow me to focus
> on creating attractions and not on tweaking command-line settings.
> 
> I recognize that this sort of feature could lead to total chaos, so if there's
> another way to solve this from inside the scene, I'm all ears.  Thanks!
> 
> 
> 
You can create INI files from SDL. INI files can launch POV files, even several 
in succession, and set KFF, they also can set the output file names for the 
images created. That way, you can launch several short animations that can flow 
from one to the next.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you spend 4 days at work wondering 
how to render your tongue.
David Kraics


Post a reply to this message

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