|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So it's been a few years since I last used Povray, and I started on a scene
today...only for my first command to throw an error. Here's the source:
camera {
location <3, 1, 3>
look_at 0
right x*ImageWidth/ImageHeight
up y
}
Here's the error:
Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 5.2.1 @
i686-pc-linux-gnu)
File 'what.pov' line 4: Parse Error: Expected 'numeric expression', undeclared
identifier 'ImageWidth' found instead
Fatal error in parser: Cannot parse input.
Render failed
I verified the format by comparing it to the official documentation. Checking
further, I found that ImageHeight throws the same error. As I said, it's been a
few years. Has somebody decided that ImageWidth and ImageHeight no longer need
to exist? Or have I forgotten something?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 01/15/2018 11:13 AM, Robert Kennedy wrote:
> So it's been a few years since I last used Povray, and I started on a scene
> today...only for my first command to throw an error. Here's the source:
>
> camera {
> location <3, 1, 3>
> look_at 0
> right x*ImageWidth/ImageHeight
> up y
> }
>
> Here's the error:
>
> Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 5.2.1 @
> i686-pc-linux-gnu)
>
> File 'what.pov' line 4: Parse Error: Expected 'numeric expression', undeclared
> identifier 'ImageWidth' found instead
> Fatal error in parser: Cannot parse input.
> Render failed
>
> I verified the format by comparing it to the official documentation. Checking
> further, I found that ImageHeight throws the same error. As I said, it's been a
> few years. Has somebody decided that ImageWidth and ImageHeight no longer need
> to exist? Or have I forgotten something?
>
>
Try:
right x*image_width/image_height
All built in POV-Ray keywords are lower case. I find myself using the
online keywords index all the time. You can find it at:
http://wiki.povray.org/content/Reference:Keywords
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Robert Kennedy" <nomail@nomail> wrote:
Has somebody decided that ImageWidth and ImageHeight no longer need
> to exist? Or have I forgotten something?
You forgot that capitalization means something.
The correct reserved internal variable names are:
image_width
image_height
You CAN do something like
#declare ImageHeight = image_height;
#declare ImageWidth = image_width;
and then go from there.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Robert Kennedy" <nomail@nomail> wrote:
> Has somebody decided that ImageWidth and ImageHeight no longer need
> > to exist? Or have I forgotten something?
>
> You forgot that capitalization means something.
> The correct reserved internal variable names are:
>
> image_width
> image_height
>
> You CAN do something like
> #declare ImageHeight = image_height;
> #declare ImageWidth = image_width;
>
> and then go from there.
Yeah, that was it. As an excuse, I mention this web page:
http://www.povray.org/documentation/view/3.6.2/153/
which uses ImageWidth and ImageHeight. Perhaps it needs to be updated?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 01/15/2018 12:34 PM, Robert Kennedy wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> Yeah, that was it. As an excuse, I mention this web page:
>
> http://www.povray.org/documentation/view/3.6.2/153/
>
> which uses ImageWidth and ImageHeight. Perhaps it needs to be updated?
>
>
Unsure the 3.6 docs will be touched at this point. The 3.7/3.8
equivalent page:
http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_19
has been updated with the correct keywords. It also strongly discourages
use of the keywords to a degree with which I don't agree.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Robert Kennedy" <nomail@nomail> wrote:
> Yeah, that was it. As an excuse, I mention this web page:
>
> http://www.povray.org/documentation/view/3.6.2/153/
>
> which uses ImageWidth and ImageHeight. Perhaps it needs to be updated?
I think it's been mentioned that the wiki is the best place to keep up with the
documentation. I only use online help for posting links, for "real" help I use
the F1 Help, or the Insert Menu examples, or Friederich Lohmueller's site.
You might keep in mind that reserved internal variable names are highlighted in
that purple color - so if you reach the end of the variable name, and it doesn't
turn purple... Sometimes I can't remember if there's an underscore for certain
ones....
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 15.01.2018 um 18:34 schrieb Robert Kennedy:
> http://www.povray.org/documentation/view/3.6.2/153/
>
> which uses ImageWidth and ImageHeight. Perhaps it needs to be updated?
The code snippet in that section is a "general way to set the correct
aspect ratio piece of documentation", indicating that (or at least being
consistent with the interpretation that) "ImageWidth" and "ImageHeight"
are intended to be placeholders for the values you used for the INI
settings of the same names.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 15.01.2018 um 18:56 schrieb William F Pokorny:
> Unsure the 3.6 docs will be touched at this point. The 3.7/3.8
> equivalent page:
>
> http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_19
>
>
> has been updated with the correct keywords. It also strongly discourages
> use of the keywords to a degree with which I don't agree.
You're not the only one.
That's why POV-Ray 3.8.0-alpha will even use `right
x*image_width/image_height` as the default (provided you specify
`#version 3.8` at the very start of the file).
The reasons stated do have their merit, but I think they warrant no more
than to just advise some caution.
It should also be noted that scene authors worried about the issues can
use a construct like the following to enforce the intended aspect ratio:
#if (image_width/image_height != 4/3)
#error "Scene is designed for 4:3 aspect ratio!\n"
#end
Users who may need to render to a non-square pixel format should indeed
opt for a fixed aspect ratio, and use a variation of the above test to
warn rather than abort:
camera {
right x*4/3
}
#if (image_width/image_height != 4/3)
#warning "Scene is designed for 4:3 aspect ratio!\n"
#warning "Rendering for non-square pixels.\n"
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Robert Kennedy" <nomail@nomail> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "Robert Kennedy" <nomail@nomail> wrote:
> > Has somebody decided that ImageWidth and ImageHeight no longer need
> > > to exist? Or have I forgotten something?
> >
> > You forgot that capitalization means something.
> > The correct reserved internal variable names are:
> >
> > image_width
> > image_height
> >
> > You CAN do something like
> > #declare ImageHeight = image_height;
> > #declare ImageWidth = image_width;
> >
> > and then go from there.
>
> Yeah, that was it. As an excuse, I mention this web page:
>
> http://www.povray.org/documentation/view/3.6.2/153/
>
> which uses ImageWidth and ImageHeight. Perhaps it needs to be updated?
It is meant to explain that you should insert the image height and width - 3.6
had no image width and height keywords.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 1/15/2018 6:34 PM, Bald Eagle wrote:
> I think it's been mentioned that the wiki is the best place to keep up with the
> documentation. I only use online help for posting links, for "real" help I use
> the F1 Help, or the Insert Menu examples, or Friederich Lohmueller's site.
Unfortunately, Google prefers the POV 3.6 docs to the wiki.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |