5,391
edits
No edit summary |
m (→Frustum) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
;<tt>void [[gs_farclipplane_set]](float plane)</tt> | ;<tt>void [[gs_farclipplane_set]](float plane)</tt> | ||
:This sets the distance of the far clipping plane in world units. If you call <code>[[gs_farclipplane_set]](1000)</code>, then all polygons whose closest point is more than 1,000 world units (328.084 ft, or 100 m) away from the camera will be culled. The default distance of the far clipping | :This sets the distance of the far clipping plane in world units. If you call <code>[[gs_farclipplane_set]](1000)</code>, then all polygons whose closest point is more than 1,000 world units (328.084 ft, or 100 m) away from the camera will be culled. The default distance of the far clipping plane is 10,000 world units (3,280.84 ft, or 1,000 m). | ||
:(The maximum size of the visible world is 819.2 x 819.2 x 819.2 m, see [[OBD:OTLF|HERE]]. Therefore the default far clip distance imposes no restriction at all, unless the camera is taken far away from the center of the world.) | :(The maximum size of the visible world is 819.2 x 819.2 x 819.2 m, see [[OBD:OTLF|HERE]]. Therefore the default far clip distance imposes no restriction at all, unless the camera is taken far away from the center of the world.) | ||
| Line 12: | Line 12: | ||
;Notes | ;Notes | ||
:The far clip plane and FOV are only reset when Oni starts, ''not'' when you load a level, so mind their default values and the side effect of other scripts. | :The far clip plane and FOV are only reset when Oni starts, ''not'' when you load a level, so mind their default values and the side effect of other scripts. | ||
:There is no control over Oni's ''near'' clipping plane: its distance is always 4 units (16 inches). | :There is no control over Oni's ''near'' clipping plane: its distance is always 4 units (40 cm, or about 16 inches). | ||
:The fixed vertical FOV is why some of Oni's cutscenes were broken when 16:10 and 16:9 screens appeared. | :The fixed vertical FOV is why some of Oni's cutscenes were broken when 16:10 and 16:9 screens appeared. | ||
::To fix in on a 16:9 screen, use <code>[[gs_fov_set]](34.515877)</code> (because '''2 * arctan((4/3)/(16/9) * tan(45° / 2)) = 34.515877°''' ). | ::To fix in on a 16:9 screen, use <code>[[gs_fov_set]](34.515877)</code> (because '''2 * arctan((4/3)/(16/9) * tan(45° / 2)) = 34.515877°''' ). | ||