Mark Hood wrote:

> > Date: Tue, 28 Dec 1999 17:12:59 +0100
> > From: Hardy Henneberg <[EMAIL PROTECTED]>
> >
> > It looks like the java3d method Transform3D::frustum() is just a wrapper of
> > glFrustum, so I tried to use that as you suggested. But moving the top and
> > bottom doesn't skew the projection-frustum - it just moves it. ???
>
> The visual difference between skewing the frustum and just moving it can be
> fairly subtle depending upon your field of view and the Z depth of the
> transformed object.
>
> E.g., suppose you were looking at a transparent 4-story building from the
> street.  In order to keep the vertical sides of the building parallel in the
> image you have to keep the projection plane vertical as well, which means
> the view vector must be kept normal to the front of the building -- if you
> tilt the camera up to get the whole building in the image then you'll get
> converging lines.  The diagram below on the right shows the clipped image
> you might get, while the left shows a side view of the projection.  (Use a
> fixed width font to view).
>
>                               Ye                           Ye
>                                             ------------------------------
>                     ****     .|             |           *******          |
>                     *  *  .   |             |           *     *          |
>                     ****      |             |           *     *          |
>                     *  *      |             |           *     *          |
>                  .  ****      |             |           *******          |
>               .     *  *      |             |           *     *          |
>            .        ****      |             |           *     *          |
>         .  |        *  *      |             |           *     *          |
>      .     |        ****      |             |           *******          |
>   <) ------|------------------| Ze          |----------------------------| Xe
>      .     |                  |             |                            |
>         .  |                  |             |                            |
>            .                  |             |                            |
>               .               |             |                            |
>                  .            |             |                            |
>                     .         |             |                            |
>                        .      |             |                            |
>                           .   |             |                            |
>                              .|             |                            |
>                                             ------------------------------
>   |        |                  |
>   eye      near               far
>
> Skewing the view frustum vertically as shown below keeps the projection
> plane parallel to the building, preventing converging vertical lines, but
> translates the viewable part of the image upward so that the whole building
> can be seen.
>
>                                                            Ye
>                                             ------------------------------
>                              .|             |           *******          |
>                               |             |           *     *          |
>                           .   |             |           *     *          |
>                               |             |           *     *          |
>                        .      |             |           *******          |
>                               |             |           *     *          |
>                     .         |             |           *     *          |
>                               |             |           *     *          |
>                  .  ****      |             |           *******          |
>                     *  *      |             |           *     *          |
>               .     ****      |             |           *     *          |
>                     *  *      |             |           *     *          |
>            .        ****      |             |           *******          |
>            |        *  *      |             |           *     *          |
>         .  |        ****      |             |           *     *          |
>            |        *  *      |             |           *     *          |
>      .     |        ****      |             |           *******          |
>   <) ------|------------------| Ze          |----------------------------| Xe
>            .                  |             |                            |
>                     .         |             |                            |
>                              .|             ------------------------------
>
>   |        |                  |
>   eye      near               far
>
> The image with respect to the front of the building is the same as would be
> achieved by merely moving the eyepoint up two stories.  If you actually did
> this, however, you would be looking down on the first two stories and up at
> the top two stories, which would be evident by looking at the relative
> position of the projected back walls of the building.  By keeping the
> eyepoint at street level and skewing the projection frustum you keep the
> same apparent relationship between the front and back walls, so that it
> would appear that you were looking up at all four stories.
>
> > Your comparing with the architectural view camera gave me another idea. I just
> > rotated the projection transform around the x-axis - like tilting the film
> > plane -and it gave the expected vertical lines - but it also moved the focus
> > away from the target, so I have to correct for that by a translation - I
> > haven't managed to do that yet (it's a bit complicated). But is it the right
> > way to go. If I just rotate and move the projection-transform could I perhaps
> > as well just keep the camera direction horizontal and move the view frustum -
> > if you understand??
>
> With an actual view camera you can do this two ways: point the camera so
> that whole building is in the frame, and then tilt the film plane to correct
> for converging lines; or, keep the camera pointing horizontally and offset
> the film plane to get the entire building in the picture.  They're both
> equivalent in that the film plane always winds up vertical.  However, the
> glFrustum command as well as the Java 3D camera compatibility mode frustum()
> method only support the latter model.
>
> Make sure you're doing the following:
>
>         Orient the ViewPlatform to point to the object of interest with a
>         TranformGroup.
>
>         Turn on compatibilty mode with a View object by calling
>         setCompatibilityModeEnable(true) and attaching it to the ViewPlatform.
>
>         Set the projection matrix by calling setLeftProjection(M),
>         where M is a Tranform3D with the projection transform you constructed.
>
> > Your mail, and others I have received, indicate that the 'architechtural
> > view camera' is a very special projection. I don't think so. When I watch
> > sport on TV - for instance a soccer match - vertical lines are always
> > vertical. And it's not just sport transmissions, but the view angle in
> > sport transmissions is often so, that you can see it clearly in those
> > transmissions.
>
> Televised sports are probably using long telephoto lenses so the convergence
> of vertical lines is not going to be very noticeable.  You can get a similar
> effect by specifying a very narrow, nearly orthogonal perspective transform.
> You'll get an essentially "3rd person" point of view instead of an immersive
> "1st person" POV.
>
> -- Mark Hood

Thanks for your help Mark,

What I missed in the first place is that the solution by skewing the frustum is
based on the Camera direction always being horizontal - now the skewing also makes
sense to me.
I have implemented it in my camera class and everything works OK - at least it
works as expected. It will always be a matter of taste, which projection type you
prefer. But for my type of application I prefer, what I think you called the
2-point perspective projection. I think it gives you a better feeling of moving in
the room, while the normal 3D perspective gives you a feeling, that it is the room,
which is moving (that makes me dizzy).

I'm aware that using a small viewangle like using a telescope reduces the
perspective - and the problemes, which comes from perspective.
I have chosen a view angle of 60 degrees as the best compromise for my
applications. I think that a larger viewangle exagerates the perspective - and a
smaller viewangle makes it difficult to orientate, while moving around.
All what I have written on perspective are just my own ideas - do you know of any
good litterature on the theme ?

kind regards
Hardy Henneberg

PS: I replyed to the mailing list too, so others may have benefit from your good
answers.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to