Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Need help with FOV math

Author
Message
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 22nd Apr 2003 14:26 Edited at: 22nd Apr 2003 14:27
I want to understant the math behind the commands
OBJECT SCREEN X() and OBJECT SCREEN Y().
I belive i should take into accounts the FOV angles, but first i need to clear some things about FOV.

The tutorial that deals with the FOV shows the formula:
tan(FOVangle/2)=(h/2)/d

where h stands for screen height() ??
what does d stand for?

if FOVangle stands for the horizontal FOV, then i need the vertical default FOVangle for the calculations, as well. what is it then?

[solo]

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Apr 2003 15:06
h = height
d = depth

but that appears to only be a 1/4 of the equasion

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 22nd Apr 2003 15:25
Raven,
Thanks. by 'depth' do you mean the distance from the camera,
and does 'height' stands for screen height()?

I wish someone has the complete equasion to clear that mystery.

[solo]

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Apr 2003 16:37 Edited at: 22nd Apr 2003 16:37
well no it should read
Screen Height = tan( ( (ObjVec.Y/2)/( Length(CamVec.Z,ObjVec.Z) )/2 )
that is provided i remember my Vector3 to Vector2 lol

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
solo
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Israel
Posted: 22nd Apr 2003 18:33
Thanks Raven.

[solo]

Login to post a reply

Server time is: 2026-07-11 04:22:49
Your offset time is: 2026-07-11 04:22:49