logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Can horizontal and vertical FOV be controlled separately? (Read 412 times)
Devil Master
Junior Member
**
Offline


Oldunreal member

Posts: 54
Joined: Jun 18th, 2011
Gender: Male
Can horizontal and vertical FOV be controlled separately?
Apr 15th, 2018 at 1:25pm
Print Post  
This is something I was wondering because I recently assembled myself a homemade VR HMD, which I use to play games that ReShade makes stereoscopic. One of them is Unreal, and, while it works as expected, I just got an idea which would make it even more immersive. I just don't know whether it would actually work!

So, let's say this picture represents the original game output, before any shader modifies it. A single view, where the horizontal and vertical proportions are the same.


What ReShade does is to intercept the graphical calls and modify them with different effects depending on the applied shader.
The first shader I apply is SuperDepth3D, which draws two different views (from two slightly different points of view) instead of just one. In "side by side" mode, the two views are drawn besides one another, and they are squashed horizontally to make them fit the screen.


In order for them to have the correct proportions, I apply a second shader (3DAdjuster), which lets every view to be moved around, stretched or squashed independently. I set it to squash the two views vertically.


Now, while this works, it has two drawbacks: first, visible black bars remain at the top and bottom of the scene. Second, it halves the vertical resolution. So I was thinking: would it be possible to tweak some options to double the vertical FOV, while leaving the horizontal FOV unchanged?

This would be the result, with no shader applied. Compared to the original image, this one would look squashed vertically, but more of the environment would be drawn at the top and bottom.


At this point, if I applied the SuperDepth3D shader, the image would get squashed horizontally, but its proportions would already be correct and the two views would occupy the entire screen, with no black bars, like this:


What I want to know: is it feasible?
« Last Edit: Apr 15th, 2018 at 6:27pm by Devil Master »  
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 542
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #1 - Apr 15th, 2018 at 9:56pm
Print Post  
The idea behind making vertical FOV based on horizontal FOV and aspect ratio is that on typical display devices the horizontal and vertical DPI are identical.

You would only need independend FOVs if that is not fullfilled for your display device.

However you do have control over the aspect radio, so why don't you just double the vertical resolution for rendering?
  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Devil Master
Junior Member
**
Offline


Oldunreal member

Posts: 54
Joined: Jun 18th, 2011
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #2 - Apr 15th, 2018 at 11:37pm
Print Post  
han wrote on Apr 15th, 2018 at 9:56pm:
The idea behind making vertical FOV based on horizontal FOV and aspect ratio is that on typical display devices the horizontal and vertical DPI are identical.

They are, and in fact, the display can show a perfectly normal 1080p Windows desktop. Using it for stereoscopy, however, halves the horizontal resolution, because the same amount of elements is used to display two side-by-side images instead of one.

han wrote on Apr 15th, 2018 at 9:56pm:
However you do have control over the aspect radio, so why don't you just double the vertical resolution for rendering?

The amount of control I have is not complete. The catch is that I must always start from a 1920x1080 image. I can move it around or stretch it at will, but if I doubled the vertical resolution, the video card would output an image at a nonstandard resolution which the display would not recognize.
  
Back to top
 
IP Logged
 
Kajgue
Global Moderator
Betatester
*****
Offline


Super-sexy-Kung-Fu-H
obo-sunva-bitch

Posts: 380
Location: Apophizal (T:S:B) Headquarters
Joined: Oct 17th, 2005
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #3 - Apr 16th, 2018 at 1:38am
Print Post  
There was a guy working on a stereoscopic mod for Unreal some time ago, though I don't remember his name.

His name might have been 'intergration'? But don't quote me on it!
  

AKA - ( T : S : B ) Ice-Lizard


Whistleblower Ted Gunderson
Back to top
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 542
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #4 - Apr 16th, 2018 at 3:52pm
Print Post  
Devil Master wrote on Apr 15th, 2018 at 11:37pm:
The amount of control I have is not complete. The catch is that I must always start from a 1920x1080 image. I can move it around or stretch it at will, but if I doubled the vertical resolution, the video card would output an image at a nonstandard resolution which the display would not recognize.


But the image is not outputted to the display directly? Sounds to me rather more like a ReShade limitiation. If the outputted image is used for sampling later on, it's resolution could be arbitrary in the first place...
  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Devil Master
Junior Member
**
Offline


Oldunreal member

Posts: 54
Joined: Jun 18th, 2011
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #5 - Apr 16th, 2018 at 6:51pm
Print Post  
han wrote on Apr 16th, 2018 at 3:52pm:
Devil Master wrote on Apr 15th, 2018 at 11:37pm:
The amount of control I have is not complete. The catch is that I must always start from a 1920x1080 image. I can move it around or stretch it at will, but if I doubled the vertical resolution, the video card would output an image at a nonstandard resolution which the display would not recognize.


But the image is not outputted to the display directly? Sounds to me rather more like a ReShade limitiation. If the outputted image is used for sampling later on, it's resolution could be arbitrary in the first place...

ReShade cannot alter the number of pixels the image is composed of: it can only change what those pixels show. If you start with a 1080p image, you always end up with a 1080p image. For example: if you squash vertically a 1080p side-by-side stereo pair to give it the correct proportion, the final image will still be 1080p... only, the upper and lower quarters will be black.
  
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 542
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Can horizontal and vertical FOV be controlled separately?
Reply #6 - Apr 17th, 2018 at 4:35am
Print Post  
Like I said, I see this as a ReShade limitation, in it's implementation to be precise.

It does all kinds of API replacement/hooking, thats why I don't see why, for example in case of OpenGL can't just replace the default bound framebuffer object and hook glBindFramebuffer(), etc. calls to remap it to it's own replacement fbo, which could be arbitrarily sized, to directly read from it later on for it's own processing.


  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo