POV-Ray : Newsgroups : povray.general : Camera Question Server Time
6 Nov 2024 20:21:04 EST (-0500)
  Camera Question (Message 1 to 4 of 4)  
From: Mr Art
Subject: Camera Question
Date: 14 Jul 2002 16:19:30
Message: <3D32855F.9010801@chesapeake.net>
I ran into some problems with my camera statement today
ans so I tried some of the examples from the docs.
Here is what I tried and what the docs say:
( small amounts of editing have been done to conserve space in this
post)
That I tried:
#declare Here=<0,0,0>;
  #declare Long_Lens =camera {location -z*100 angle 3}
  #declare Short_Lens =camera {location -z*50 angle 15}
  camera {Long_Lens look_at Here}
Here is the error that I get:
Parse Error: No matching } in 'camera', look_at found instead

 From the docs:
CAMERA:
     camera{ [CAMERA_ITEMS...] }
CAMERA_ITEM:
     CAMERA_TYPE | CAMERA_VECTOR | CAMERA_MODIFIER |
     CAMERA_IDENTIFIER
CAMERA_TYPE:
     perspective | orthographic | fisheye | ultra_wide_angle |
     omnimax | panoramic | cylinder CylinderType | spherical
CAMERA_VECTOR:
     location <Location> | right <Right> | up <Up> |
     direction <Direction> | sky <Sky>
CAMERA_MODIFIER:
     angle HORIZONTAL [VERTICAL] | look_at <Look_At> |
     blur_samples Num_of_Samples | aperture Size |
     focal_point <Point> | confidence Blur_Confidence |
     variance Blur_Variance | NORMAL | TRANSFORMATION

Camera identifiers may be declared to make scene files more readable and
to parameterize scenes so that changing a single declaration changes
many values. You may declare several camera identifiers if you wish.
This makes it easy to quickly change cameras. An identifier is declared
as follows.

CAMERA_DECLARATION:
     #declare IDENTIFIER = CAMERA |
     #local IDENTIFIER = CAMERA

Where IDENTIFIER is the name of the identifier up to 40 characters long
and CAMERA is any valid camera statement. See "#declare vs. #local" for
information on identifier scope. Here is an example...

  #declare Long_Lens =camera {location -z*100 angle 3 }
  #declare Short_Lens =camera {location -z*50 angle 15 }
  camera {Long_Lens look_at Here}

I looked in the NG's to see if anyone had posted about this
but could fnd nothing. What's up with the camera?


Post a reply to this message

From: hughes b
Subject: Re: Camera Question
Date: 14 Jul 2002 20:43:05
Message: <3d321a99$1@news.povray.org>
"Mr Art" <mra### [at] chesapeakenet> wrote in message
news:3D3### [at] chesapeakenet...
>
>   #declare Long_Lens =camera {location -z*100 angle 3 }
>   #declare Short_Lens =camera {location -z*50 angle 15 }
>   camera {Long_Lens look_at Here}
>
> I looked in the NG's to see if anyone had posted about this
> but could fnd nothing. What's up with the camera?

Oh-oh. Yeah, I see what you mean. Thorsten Froehlich had modified how the
camera is put together to make the camera items better organized internally
so maybe he knows what went wrong there. Perhaps just an oversight in how
the camera code gets reinvoked? Nothing at all I know about so I'll shutup
and let others speak on this.


Post a reply to this message

From: TinCanMan
Subject: Re: Camera Question
Date: 14 Jul 2002 22:13:52
Message: <3d322fe0$1@news.povray.org>
> #declare Here=<0,0,0>;
>   #declare Long_Lens =camera {location -z*100 angle 3}
>   #declare Short_Lens =camera {location -z*50 angle 15}
>   camera {Long_Lens look_at Here}
> Here is the error that I get:

I'm not sure exactly what is the problem here but try doing something like
this instead:

#declare Long=yes;// no for short lens
camera {
  #if (Long)
    location -z*100 angle 3 //Long lens
  #else
    location -z*50 angle 15 //Short lens
  #end
  look_at Here
}


-tgq


Post a reply to this message

From: Christopher James Huff
Subject: Re: Camera Question
Date: 15 Jul 2002 14:25:01
Message: <chrishuff-111E0C.13222915072002@netplex.aussie.org>
In article <3d322fe0$1@news.povray.org>,
 "TinCanMan" <Tin### [at] hotmailcom> wrote:

> I'm not sure exactly what is the problem here but try doing something like
> this instead:
> 
> #declare Long=yes;// no for short lens
> camera {
>   #if (Long)
>     location -z*100 angle 3 //Long lens
>   #else
>     location -z*50 angle 15 //Short lens
>   #end
>   look_at Here
> }

Or use macros:
#declare Here=<0,0,0>;

#macro Long_Lens() location -z*100 angle 3 #end

#macro Short_Lens() location -z*50 angle 15 #end

camera {Long_Lens() look_at Here}

Or something like:
#macro Long_Lens(LookAt)
    camera {
        location -z*100
        look_at LookAt
        angle 3
    }
#end

Other ideas: 
Make position relative to look_at (location LookAt + RelPos).
Specify location as parameter and automatically adjust angle depending 
on distance of look_at from location.
Specify angle, look_at, and direction as parameters and adjust distance 
of location.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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