Well, the only way I know to definitively answer your question is using
the math behind the perspective projection algorithm.

X = size of object orthogonal to view
D = distance from viewer
Y = orthogonal size of half field of view at distance D
a = 1/2 * FieldOfView
b = angular size of object

(See attached diagram)

What you really care about is what percentage of the full field of view
is taken up by the object.  I'll start with R, the ratio of the half
field of view.
  R = X / Y

(Notice that it's not b/a!  Not the same thing.)

By trigonometry:
Tan(b) = X/D   ==>  X = D Tan(b)
Tan(a) = Y/D   ==>  Y = D Tan(a)

X/Y = R = Tan(b) / Tan(a)
      R = X / ( D*Tan(a) )

Looking at this, you can see that the further the object is away from
the eye (the distance D), the smaller the ratio of the field of view.

The ratio of the full field of view, R', is then just half of this:
  R' = X / 2DTan(a)

You should be able to multiply this by the width of your window in
pixels to figure out the EXACT pixel size of the object.

Who said you wouldn't use all that math when you got out of school?  Oh,
that was the business majors... :)

-Lee

J. Lee Dixon
SAIC - Celebration, FL
407-566-1438
[EMAIL PROTECTED]    AOL: LeeOrlando


-----Original Message-----
From: David [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 14, 2001 12:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Perceived distance and size mystery


As an update, if I double the field of view to PI/2 instead of PI/4
distances look correct, but that introduces a fishbowl situation, since
to
see that much requires nasty bending.  Still can't fugure this out.


----- Original Message -----
From: David <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 13, 2001 1:37 PM
Subject: [JAVA3D] Perceived distance and size mystery


We have been noticing something strange.  Virtual distances seem closer
than
they really are.  For example if we have the user's eye at 1.7 meters
from
the ground and there is an object 5 meters away, it looks like you are
on
top of it practically.  I went into everquest (a 3d commercial world)
and
one thing I keep noticing is that the field of view is about half of
what we
are getting in Cosm. What controls the "feeling" distance from an object
in
3d?  I know the height from the ground is a big factor, as the brain
seems
to judge a first person perspective all in relation to this.  But I am
thinking field of view also plays a part in this.  I know when I look at
a
object 12 feet high in our application it looks smaller than it really
is.
I think that is because my brain expects a certain relationship between
field of view and eye height to properly gauge depth and size.  I can't
help
but think that what I need to do is shrink the left/right range I can
see
and at the same time "push out" the scene so it appears deeper.  I know
I am
not explaining this well.  But for example a wall 3 meters high seems to
be
smaller than it really is.  I have to move forward until it is
practically
in my face before it starts appearing "taller" than me.  I was thinking
if I
made the field of view smaller this would reduce what I could see from
left
to right, but increase what I can see from top to bottom? Or am I crazy?

I am attaching a picture.  In this picture the box is calculated to be
10.3
meters from the view.  The view "point" is calculated by getting the
translation on the view transform.  The distance is calculated to the
center
of the box.  The view has been translated to be 1.7 meters above the
ground,
and there is a slight upward slope in the gound in this picture.  The
box
itself  has auto computed bounds to be a 1.5 meter radius, so assume
that is
to the corners, the box would be about 1.2 meters on a side.  This just
does
not seem right to me.  The box should look a LOT further away.  In fact
I
would expect it to look 3 times further away than it appears.

I eagerly await a solution to this mystery.

Dave Yazel
Cosm Development Team

========================================================================
===
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".

projection_diagram.jpg

Reply via email to