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 Discussion / how is a camera created

Author
Message
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 31st Jul 2009 23:08
I was thinking about it the other day and was confused on how a camera is created. It isn't an object and is able to move around in 3d space so my question is how is a camera created.
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 31st Jul 2009 23:15 Edited at: 31st Jul 2009 23:18
The "camera" is just a way of changing the values entered into the calculations needed to work out where the 3D vertices end up on the 2D screen. It's not an object at all; it just uses similar commands to objects to make it a bit more intuitive.

If you want the more technical details on how this process works, it is based around a 4x4 perspective matrix transform.

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 31st Jul 2009 23:43
interesting.......go on, Nex....

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 1st Aug 2009 00:00
If you want me to be honest, I don't know how 4x4 matrix transforms work, I just know how to use them...

This is more about 2D transformations but the principles are very similar.

http://en.wikipedia.org/wiki/Transformation_matrix

pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 1st Aug 2009 01:21
That has to be the most complex thing I ever "attempted" to read.lol.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 2nd Aug 2009 04:00
Quote: "That has to be the most complex thing I ever "attempted" to read.lol. "


Agreed. But it is fairly interesting, lol.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Aug 2009 23:19
The 'camera' is only a 'human' term which is easier for us to get our heads around, rather than talking about a 'viewport' - or port (window) from which to view a scene.

As the monitor screen we look at is 2D and our world is 3D, the transformations simply turn the 3D points in space into 2D dots (pixels).

TDK_Man

pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 3rd Aug 2009 06:03
This is just a guess but does it create a 3d world offscreen. Then calculate where the "camera" would be and positions the points that we would see onto the 2d screen
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Aug 2009 06:13
yep, every vertex is a point in virtual 3D space and that is put through a mangel to make it 2D like TDK said.
by mangel I mean complex formula.

TGC Forum - converting error messages into sarcasm since 2002.

Login to post a reply

Server time is: 2024-05-20 05:34:11
Your offset time is: 2024-05-20 05:34:11