Graphics: Difference between revisions

154 bytes added ,  Thursday at 22:28
minor rewrite and formatting touch-up of FOV section
(general review and minor rewrite of Occlusion section)
(minor rewrite and formatting touch-up of FOV section)
Line 28: Line 28:


;Field of view (FOV)
;Field of view (FOV)
:Oni defines the vertical field-of-view (FOV), i.e., the angle between the top and bottom planes of the frustum as measured at the camera's location, and its default value is 45°. On a 4:3 screen, the corresponding horizontal viewing angle is '''2 * arctan(4/3 * tan(45° / 2)) = 57.8224°'''
:Oni defines the vertical field-of-view (FOV), i.e., the angle between the top and bottom planes of the frustum as measured at the camera's location, and its default value is 45°. On a 4:3 screen, the corresponding horizontal viewing angle is <tt>2 * arctan(4/3 * tan(45° / 2)) = '''57.'''</tt>.


;Widescreen FOV
;Widescreen FOV
:On a 16:9 or 16:10 screen, the horizontal viewing angle for a vertical FOV of 45° is larger: '''2 * arctan(16/9 * tan(45° / 2)) = 72.73435°''' and '''2 * arctan(16/10 * tan(45° / 2)) = 67.0682°''', respectively. This causes insufficient frustum culling in some of Oni's cutscenes (intro sequences of {{C|2}}, {{C|11}}, and {{C|14}} for example). A quick way to fix this is to bring the horizontal viewing angle down to the supposed '''57.8224°''' during the cutscene: the 4:3 viewport will then effectively be trimmed vertically rather than extended sideways. On 16:9 and 16:10 screens, the corrected vertical FOV will be '''2 * arctan(3/4 * tan(45° / 2)) = 34.515877°'' and ''2 * arctan(5/6 * tan(45° / 2)) = 38.0871°''', respectively. Remember to set it back to 45° after the cutscene to fully enjoy the extended viewport. (Note that the [[AE]] contains widescreen patches for some of these cutscenes.)
:On a 16:9 or 16:10 screen, the horizontal viewing angle for a vertical FOV of 45° is larger: <tt>2 * arctan(16/9 * tan(45° / 2)) = '''72.'''</tt> and <tt>2 * arctan(16/10 * tan(45° / 2)) = '''67.'''</tt>, respectively. This causes objects to show up in some of Oni's cutscenes which aren't meant to be seen, for example the opening cutscenes of {{C|2}}, {{C|11}}, and {{C|14}} (the camera even becomes blocked by a wall in Ch. 2). A quick way to fix this is to bring the horizontal viewing angle down to the intended '''57.''' during the cutscene: the 4:3 viewport will then effectively be trimmed vertically rather than extended sideways. On 16:9 and 16:10 screens, the corrected vertical FOV will be <tt>2 * arctan(3/4 * tan(45° / 2)) = '''34.'''</tt> and <tt>2 * arctan(5/6 * tan(45° / 2)) = '''38.'''</tt>, respectively. Remember to set it back to 45° after the cutscene to fully enjoy the extended viewport. (Note that the [[Anniversary Edition]] contains widescreen patches for some of the affected cutscenes, making this unnecessary.)


==Occlusion==
==Occlusion==