|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Can anyone explain the use of the sky vector for the camera better
than the documentation? It is a little a little vague and brief . It would
be great to be able to roll the camera in a predictable way.
Thanks.
Bruce MacKay
(bma### [at] hevanetcom)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
bruce mackay <bma### [at] hevanetcom> wrote:
: Can anyone explain the use of the sky vector for the camera better
: than the documentation? It is a little a little vague and brief . It would
: be great to be able to roll the camera in a predictable way.
Why don't you just use the 'rotate' keyword?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I really don't think rotate will roll the camera... it just moves its
position.
I don't know what the documentation says, but sky points towards the sky
(perpendicular to the horizon). So if your camera is looking towards
+x, and the sky is usually +y, then if you change it to +z, you'll roll
the camera by 90 degrees. If you use, for example, <0,1,1>, you'll
roll the camera 45 degrees.
here's a script that is interesting
#declare cam_dir = cam_lookat - cam_location;
#declare cam_right = vcross(cam_dir, old_cam_up);
// old_cam_up would be y (unless you changed it)
// cam_right is a vector that is perpendicular to both the direction
// that the camera is pointing and to the up vector
#declare cam_up_perp = vcross( cam_right, cam_dir);
// cam_up_perp is an up vector that you could use to give the same
// results as 'y', but it is now perpendicular to the camera's
// direction
/*
Now, you can rotate cam_up_perp around cam_right (using
vrotate_axis(), IIRC) and use that as your new UP vector.
This code has not been tested... I just whipped it up now. I hope
it helps.
Side view of what we this did:
y / cam_up_perp
| /
|/
*--__ <-- cam_dir
--__
--#
* camera position
# camera look_at
*/
Nieminen Mika wrote:
>
> bruce mackay <bma### [at] hevanetcom> wrote:
> : Can anyone explain the use of the sky vector for the camera better
> : than the documentation? It is a little a little vague and brief . It would
> : be great to be able to roll the camera in a predictable way.
>
> Why don't you just use the 'rotate' keyword?
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nathan Kopp <Nat### [at] koppcom> wrote:
: I really don't think rotate will roll the camera... it just moves its
: position.
plane { y,-1 pigment { checker rgb 1,rgb .5 } }
plane { -y,-1 pigment { checker rgb x*1,rgb x*.5 } }
light_source { 0,1 }
camera { location -z look_at 0 rotate z*30 }
http://www.cs.tut.fi/~warp/rotate.jpg
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I stand corrected.
-Nathan
Nieminen Mika wrote:
>
> Nathan Kopp <Nat### [at] koppcom> wrote:
> : I really don't think rotate will roll the camera... it just moves its
> : position.
>
> plane { y,-1 pigment { checker rgb 1,rgb .5 } }
> plane { -y,-1 pigment { checker rgb x*1,rgb x*.5 } }
> light_source { 0,1 }
> camera { location -z look_at 0 rotate z*30 }
>
> http://www.cs.tut.fi/~warp/rotate.jpg
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
the problem with rotating the camera is that you have to place the camera at
the origin, rotate it, then translate it.
Adjusting the sky vector does this with less of a head ache.
Normal cameras are placed at the location, then pans around it's y-axis to
match the look_at vector, then tilts up or down to look directly at the look_at
point.
The sky vector alters the cameras Y axis. Since I see this question asked by
more than one user, I'm going to put up a small tutorial on my website on how
this works...
Nathan Kopp wrote:
> I stand corrected.
>
> -Nathan
>
> Nieminen Mika wrote:
> >
> > Nathan Kopp <Nat### [at] koppcom> wrote:
> > : I really don't think rotate will roll the camera... it just moves its
> > : position.
> >
> > plane { y,-1 pigment { checker rgb 1,rgb .5 } }
> > plane { -y,-1 pigment { checker rgb x*1,rgb x*.5 } }
> > light_source { 0,1 }
> > camera { location -z look_at 0 rotate z*30 }
> >
> > http://www.cs.tut.fi/~warp/rotate.jpg
> >
> > --
> > main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> > ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Why doesn't someone just make a macro that allows the user to enter Roll and
Dolly values, this would make using a POV-Ray camera SOOO much easier!
(It would also make vertigo zooming an easier thing to do)
--
Lance.
---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Josh English <eng### [at] spiritonecom> wrote:
: the problem with rotating the camera is that you have to place the camera at
: the origin, rotate it, then translate it.
I really don't see the problem here. You do this with all your objects,
don't you? Why the camera should be any more difficult?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Because with a camera there should be an easier way to control it's roll,
since the axis should not be a world-coordinate system by an
object-coordinate system... (it's got the feature built into it, so why do
some complex rotate and translate when you can use its built-in keyword?)
--
Lance.
---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Lance Birch <lan### [at] usanet> wrote:
: Because with a camera there should be an easier way to control it's roll,
: since the axis should not be a world-coordinate system by an
: object-coordinate system...
I still don't understand. I don't see any difficulty in controlling the
roll of the camera. I roll it just like any other object.
Or do you mean that you have to use rotate _after_ location and look_at
and after that making the camera to look at a certain point is difficult?
Well, you can use something as simple as this:
#declare CamTiltAngle=radians(30);
camera
{ sky <sin(CamTiltAngle),cos(CamTiltAngle),0>
location <1,2,-4>
look_at 0
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|