POV-Ray : Newsgroups : povray.general : Feature request: Various SDL / Command Line Stuff : Feature request: Various SDL / Command Line Stuff Server Time
30 Jul 2024 10:23:57 EDT (-0400)
  Feature request: Various SDL / Command Line Stuff  
From: clipka
Date: 19 Mar 2009 13:55:00
Message: <web.49c286b3db7f4ec5f708085d0@news.povray.org>
I was thinking about the separation between SDL and command line parameters for
a few things:


* Image & Pixel Aspect Ratio:

There are two common practices to write scenes regarding this:
(a) write a scene for a fixed image aspect ratio (e.g. 4:3);
(b) write a scene for a 1:1 pixel aspect ratio.

I personally favor (b), as it always gives me an undistorted image even if I
happen to choose the wrong image aspect ratio - or even happen to choose a
different one later in the process.

The FAQ argues strongly against (b), obviously favoring (a), claiming that this
makes the user aware that he chose the wrong aspect ratio because he can see
that the image is distorted, while in the other case he may get a different
"viewport" than intended by the scene author, without even noticing.

I insist that this argument does not hold, because the difference between the
intended aspect ratio and the one picked for rendering may be ever so subtle,
and the scene may not contain enough objects that hint at the originally
intended aspect ratio clear enough. This is especially a problem with 4:3 vs.
5:4 aspect ratios.

I agree, however, that (b) is not an ideal solution either, as a 1:1 pixel
aspect ratio may not always be desired.

Now the POV sample scenes always come with a comment that indicates the aspect
ratio intended by the scene author.

My proposal is to add a new statement to the POV camera{} section specifying the
originally intended aspect ratio.

(The rationale of specifying this in the camera instead of the globals{} section
is that someone may want to add alternative cameras to their scene that may be
designed for different aspect ratios.)

The statement might have the form (e.g for a 4:3 image aspect ratio):

    camera {
        ...
        aspect_ratio 4/3
    }

The value specified could be used as follows:

- automatically produce a warning if the scene is rendered with a resolution
that doesn't fit this ratio (a complementary command line switch could be used
to explicitly specify a pixel aspect ratio in case this is not the usual 1:1)

- allow for either the image height or width to be specified as "auto" on the
command line, causing the corresponding value to be computed automatically from
the other parameter (note that this could *drastically* reduce the number of
quickres entries for people frequently messing with various aspect ratios)

- automatically compute all relevant camera parameters by just specifying camera
location, look_at, opening angle and aspect_ratio


* Frame Count:

Instead of using the 0.00-to-1.00 clock, animations may instead use the
frame_number for timing reference. In that case, it may be desirable to specify
the number of frames not on the command line, but in the SDL file, either to be
warned if different values are specified on the command line, or to always
override those values.


* Render batch:

Occasionally, a full render may consist of several images to be rendered in
sequence, e.g.:

- a scene file requiring to generate its own bitmaps for the main render

- a scene to be post-processed using another SDL script

- a scene to be rendered in multiple passes to take advantage of some other POV
effects (e.g. to do a radiosity pre-pass with area lights turned off or the
like)

In some cases this can be achieved with a single invocation of POV by exploiting
the animation facilities. Sometimes, however, this is impossible because it is
desired to have different image sizes for the various passes.

Of course, virtually every OS provides *some* way of batch processing. However,
it would be desirable if this could be done in a way that works with all
platforms on which POV runs.

Something that comes to my mind would be to have an .ini option to specify a
list of .ini file sections that are to be rendered, e.g.:

  ; valid for all passes
  Output_File_Type=N
  Render_Sections=FooTexturePass,RadiosityPass,MainPass

  [FooTexturePass]
  +W1024 +H1024
  Input_File="Generate_Foo_Texture.pov"
  Output_File_Name="Foo.png"

  [RadiosityPass]
  +W320 +H240
  InputFile="MyScene.pov"
  Output_File_Name="MyScene_RadiosityPass.png"
  Declare="RadiosityPrePass=1"

  [MainPass]
  +W1024 +H768
  InputFile="MyScene.pov"
  Output_File_Name="MyScene.png"
  Declare="RadiosityPrePass=0"


Post a reply to this message

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