|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Has anyone developed a macro for controlling a camera with "traditional"
instructions? I am working on a project where I need to set up and store
multiple views of a site. I use CASE to select a camera and I have a NSEW
system for camera position and view direction, but no "tilt" or "pan".
Any ideas?
Post a reply to this message
|
|
| |
| |
|
|
From: Redbeard
Subject: Re: Camera Navigation - Tilt and Pan Macro?
Date: 14 Nov 2001 21:15:51
Message: <3bf32557@news.povray.org>
|
|
|
| |
| |
|
|
"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:136### [at] 3-enet...
> Has anyone developed a macro for controlling a camera with "traditional"
> instructions? I am working on a project where I need to set up and store
> multiple views of a site. I use CASE to select a camera and I have a NSEW
> system for camera position and view direction, but no "tilt" or "pan".
>
> Any ideas?
>
These are simply rotations of the camera, correct? You might try something like
this:
1. Start with camera at origin facing z-direction with look_at and angle
already set using appropriately translated positions for position and view. Or
by using direction and other camera settings.
2. Use rotate <Tilt, Pan, 0>, where Tilt is negative for tilting up,
positive for down; and Pan is negative for left and positive for right.
3. Translate back to the camera position.
The key here is step 2. You just have to make sure that when you do your
rotation, the camera is at the origin. Otherwise the whole camera will move and
most people get confused by this.
This probably isn't the best way, but it should work.
Michael
--
camera{location<8,20>look_at<6,0,4>}light_source{<8,8>rgb 1}difference{union{
#macro M(D,J)#local R=asc(substr(D,J,1))-32;<div(R,10)*2,mod(R,10)>#end#macro
E(D,B,R)prism{-D,4+D,R#local C=1;#while(C<R+1)M(B,C)#local C=C+1;#end}#end E(
0," (2:FPKAD80* U_dZU"18)sphere{2,2}#macro T(N)cylinder{<9,-N,3><9,4+N,3>3-N}
#end T(0)}T(2)E(1"45LNXUK4"8)pigment{rgb x+y/2}}//(c)2001 MDJohnson(Redbeard)
Post a reply to this message
|
|
| |
| |
|
|
From: Christopher Johnson
Subject: Re: Camera Navigation - Tilt and Pan Macro?
Date: 14 Nov 2001 21:40:17
Message: <3bf32b11$1@news.povray.org>
|
|
|
| |
| |
|
|
"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:136### [at] 3-enet...
> Has anyone developed a macro for controlling a camera with "traditional"
> instructions? I am working on a project where I need to set up and store
> multiple views of a site. I use CASE to select a camera and I have a NSEW
> system for camera position and view direction, but no "tilt" or "pan".
>
> Any ideas?
>
"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:136### [at] 3-enet...
> Has anyone developed a macro for controlling a camera with "traditional"
> instructions? I am working on a project where I need to set up and store
> multiple views of a site. I use CASE to select a camera and I have a NSEW
> system for camera position and view direction, but no "tilt" or "pan".
>
> Any ideas?
>
One method I tend to use is sherical coordinates for the camera. I like to
be able to spin the camera around an object and change the linear distance.
May not be exactly what your looking for but it makes an effective "boom"
set-up.
#macro Rotsph(Declination, Rotation, Distance)
#declare result =
vrotate(<0,Distance,0>,<(90-Declination),Rotation,0>);
result
#end
This simply converts the rotational coordinates to cartesian.
then define the camera
#declare Location = <35,180,100>; // 35degrees up from the xz plane, 180
degress counter clockwise, and 100 units away.
#declare Lo = Rotsph (Location.x,Location.y,Location.z);
camera {
location <Lo.x,Lo.y,Lo.z>
look_at <0,0,0>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher Johnson wrote:
>
> "Daniel Matthews" <dan### [at] 3-enet> wrote in message
> news:136### [at] 3-enet...
>> Has anyone developed a macro for controlling a camera with "traditional"
>> instructions? I am working on a project where I need to set up and store
>> multiple views of a site. I use CASE to select a camera and I have a NSEW
>> system for camera position and view direction, but no "tilt" or "pan".
>>
>> Any ideas?
>>
>
>
> "Daniel Matthews" <dan### [at] 3-enet> wrote in message
> news:136### [at] 3-enet...
>> Has anyone developed a macro for controlling a camera with "traditional"
>> instructions? I am working on a project where I need to set up and store
>> multiple views of a site. I use CASE to select a camera and I have a NSEW
>> system for camera position and view direction, but no "tilt" or "pan".
>>
>> Any ideas?
>>
>
> One method I tend to use is sherical coordinates for the camera. I like
> to be able to spin the camera around an object and change the linear
> distance. May not be exactly what your looking for but it makes an
> effective "boom" set-up.
>
> #macro Rotsph(Declination, Rotation, Distance)
> #declare result =
> vrotate(<0,Distance,0>,<(90-Declination),Rotation,0>);
> result
> #end
>
> This simply converts the rotational coordinates to cartesian.
>
> then define the camera
>
> #declare Location = <35,180,100>; // 35degrees up from the xz plane, 180
> degress counter clockwise, and 100 units away.
> #declare Lo = Rotsph (Location.x,Location.y,Location.z);
>
> camera {
> location <Lo.x,Lo.y,Lo.z>
> look_at <0,0,0>
>
> }
I think this is the inverse of what I was thinking, I will have a play with
it and see if it fits my needs. I guess I just need to look it the other
way around. :o)
thanks.
Post a reply to this message
|
|
| |
| |
|
|
From: Christopher Johnson
Subject: Re: Camera Navigation - Tilt and Pan Macro?
Date: 15 Nov 2001 12:09:44
Message: <3bf3f6d8@news.povray.org>
|
|
|
| |
| |
|
|
Alright, that probably asn't what you were looking for. I may have the
macros but I'd need to clean them up a bit. Just for clarification .... you
mentioned a NSEW sytem of camera position and orientation. I wouldn't mind
seeing the source for that. And as for tilt and pan ... Assuming left hand
coordinates and the camera is at the origin looking at +z. Pan is the
rotation of the camera along the local y axis ( left to right) and tilt
along the local x (up and down).
CDJ
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|