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 / Camera Theory - how to remove 3D? XD

Author
Message
Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 1st Feb 2012 09:16
As I already said in this Thread
http://forum.thegamecreators.com/?m=forum_view&t=193879&b=1&p=0
I'm building an Entity-Viewer for my game engine.

Here is a screenshot of the current state:



The different views are rendered by 4 different cameras ( cam 1 - 4 ).
As you can see in the screenshot the views Front, Left, Top, which are intended to be 2D, are still in 3D.
Is it possible to manipulate a camera to give me a two dimensional picture?
I tried to fix this by setting the camera fov.
A camera fov of 0.1 has almost the effect I'm aiming for, but if I set the camera fov to 0.0 the camera seems to render nothing at all.
Is there a simple trick to set the camera to 2D?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Feb 2012 11:16 Edited at: 1st Feb 2012 11:17
What you need is to change the camera to orthogonal projection.

Dimitry wrote a function to do so. Here's the link : http://forum.thegamecreators.com/?m=forum_view&t=42592&b=6

TheComet

Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 1st Feb 2012 13:46 Edited at: 1st Feb 2012 13:52
Thanks!

It's working



I changed the code a bit.



Some things are still unclear.
"*m33=1.0*-((Zoom)/1000)" for example was simple try and error XD ... seems to work for me now ... but I'm not to sure why "/1000"
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Feb 2012 03:28
Can I ask the purpose of this tool?... Is it to replicate those lovely PSOne resident evil and FFVII style fixed camera angles or?

(if so I am keen to see more )

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 3rd Feb 2012 04:45
IanM's plugin can also make turn a camera to orthogonal projection.
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 3rd Feb 2012 05:31
I like my code, as it's just toggling some camera variables to get the desired effect.



From memory I preferred my code over other solutions, primarily because you can still interact the mouse with 3D objects with minimum effort. All the other methods that I tried caused mouse interaction issues very early on.

I'm very keen to discuss this topic, so please, do experiment.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia

Login to post a reply

Server time is: 2026-07-09 16:57:40
Your offset time is: 2026-07-09 16:57:40