Orthogonal Camera

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Orthogonal Camera

Postby Major Cooke » Fri Mar 02, 2018 11:58 am

Rachael and quite a few others have said this is actually doable. There is some experimentation on the side ongoing currently, so I'd kindly like to ask if this can remain open until the theories have been denied at the very least.

Now for some use cases...
2D perspective games coming from the side make gratuitous use of orthogonal perspectives, aka parallel projections.

I'm making a 2D side-scroller game, and the way I'm mitigating as much 'perspective' as possible is by pulling a camera out and sinking in the FOV quite steeply. However, it's still not enough.

Fez is a game that utilizes orthogonal and it's quite impressive.
User avatar
Major Cooke
The road to Hell is really paved in the corpses she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Orthogonal Camera

Postby Rachael » Fri Mar 02, 2018 12:06 pm

One idea for implementing this might be a vertex shader which, based on camera depth, will multiply a vertex's post-translated X/Y to always be at an angle from the camera's view rather than at its true location, which would give the illusion of a flat projection. This method would mitigate the problems with Z-fighting.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Orthogonal Camera

Postby Graf Zahl » Fri Mar 02, 2018 12:14 pm

Major Cooke wrote:Rachael and quite a few others have said this is actually doable. There is some experimentation on the side ongoing currently, so I'd kindly like to ask if this can remain open until the theories have been denied at the very least.



I think it can remain open, but considering that it has no business in the "Feature Suggestions" part of the forum, I think it should be moved to "General".
For me this is just more extraneous stuff that bears no relation to Doom so it may be better suited for an engine fork.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Orthogonal Camera

Postby dpJudas » Fri Mar 02, 2018 12:32 pm

Adding orthogonal camera is mostly just a matter of changing the projection matrix, but I'm a bit with Graf on this one in the sense that I don't want to spend the time dealing with the places in the code where the projection does matter: BSP clipper, SSAO depth buffer lookup, the VR eye buffer setup code. I also wouldn't be surprised if there could be a problem with how portals are marked in the stencil buffer.

TL;DR: this will make it harder to maintain the renderer, requires actual work, and the only use case I can think of is people that's trying to convert Doom into a 2D game engine.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Orthogonal Camera

Postby Graf Zahl » Fri Mar 02, 2018 12:44 pm

Thanks for the feedback. Moving to "General" now.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to General

Who is online

Users browsing this forum: NovaRain and 2 guests