As you guys know, Half Life Alyx does object culling on the right peripheral vision for both Pimax and StarVR One headsets. This is fixed by running parallel projection, but what if we can mod Half Life Alyx files to get the game to stop this culling on the right peripheral?
So far I’ve found some very interesting settings in the Half Life Alyx game folder.
For example in a bunch of files, there are references to Culling, Camera, or FOV settings. Maybe if we change some of them this can be fixed.
I used FileSeek software in order to find all files that references the words: cull, camera, and fov. Most important keyword is probably frustum. Because the issue is called frustum culling. I bolded all the interesting parts.
In game/core/base.fgd
// FGDFIXME: why are these different from the ones above? 15: "Distort" 16: "Hologram (Distort + fade)" **23: "Cull By Distance (TEST)"** 24: "Spotlight FX" 26: "Fade Near"
I wonder where this number is used.
PointClass base(Targetname, EnableDisable) tags( Info ) iconsprite( “materials/editor/info_visibility_box.vmat” ) centered_box_oriented( box_size )
= info_visibility_box : “A dynamic visibility culling box which can be used to hide objects at runtime and can be toggled on and off by entity I/O.”
[
box_size(vector) : “Box Size” : “128 128 128”
cull_mode(choices) : “Mode” : “0” : “Should the box hide objects inside or outside of its bounds. If inside is selected, any objects fully inside the box will be hidden. If outside is selected, all active visibility boxes are considered, and objects not intersecting any visibility boxes will be hidden.”=
[
0: “Hide objects inside”
1: “Hide objects outside”
]
]
I wonder what would happen if changed the mode to 1
SolidClass base(Targetname) color(0 128 255) = func_areaportalwindow :
“An entity that can be used to optimize the visibility in a map. If you seal off an area with them, when the viewer moves the specified distance away from them, they will go opaque and the parts inside the area will not be drawn. The ‘target’ brush model should enclose the func_areaportal window so no parts of it are culled by the window. If you use the optional foreground brush model, then it should enclose the ‘target’ brush model.”
[
target(target_destination) : “Rendered Window” : : “The name of a brush model to render as the window.”
FadeStartDist(integer) : “Fade Start Distance” : 128 : “When the viewer is closer than this distance, the alpha is set to ‘TranslucencyLimit’.”
FadeDist(integer) : “Fade End Distance” : 512 : “When the viewer is at this distance, the portal becomes solid and closes off.”
TranslucencyLimit(string) : “Translucency limit” : “0” : “This value limits the translucency of the bmodel and prevents it from becoming invisible when the viewer is right on top of it.”
BackgroundBModel(string) : “Foreground bmodel” : “” : “(Optional) brush model that is drawn after the fading brush model. This model should have alpha in its textures so you can see through it.”
PortalVersion(integer) [readonly] : “Portal Version” : 1 : “(Don’t change). Differentiates between shipping HL2 maps and maps using new engine features.”// Inputs
input SetFadeStartDistance(integer) : “Set fade start distance.”
input SetFadeEndDistance(integer) : “Set fade end distance.”
]
Tweaking Fade start and end distance might do something
PointClass base(Targetname) = env_zoom :
“An entity that can be used to control the player’s FOV. Useful for scenes where the player’s view is being controlled, or player-usable binoculars/telescopes, etc.”
[
Rate(float) : “Seconds to reach target” : “1.0” : “Amount of time it should take to reach the specified FOV.”
FOV(integer) : “Target FOV” : 75 : “FOV that this entity should set the player’s FOV to when active.”// Inputs
input Zoom(void) : “Start controlling the player’s FOV.”
input UnZoom(void) : “Stop controlling the player’s FOV.”spawnflags(flags) =
[
1: “Allow Suit Zoom” : 0
]
]
This looks like the holy grail. I wonder what setting this number to 180 or 210 would do?
PointClass base(Targetname,Parentname) editormodel(“models/editor/camera.vmdl”) = point_viewcontrol :
“A camera entity that controls the player’s view. While it’s active, the player will see out of the camera.”
[
fov(float) : “Field of view” : “90” : “Player FOV (if Set FOV spawnflag is set)”
fov_rate(float) : “Seconds to reach FOV target” : “1.0” : “Amount of time it should take to reach the specified FOV”target(target_destination) : “Entity to Look At” : : “Name of the entity that the camera should point at and track while active.”
targetattachment(string) : “Target Attachment Name” : : “If set, the camera will focus on the specified attachment on the ‘Entity to Look At’.”
wait(integer) : “Hold Time” : 10 : “The amount of time the camera should control the player’s view for, after which it deactivates itself. If the camera should stay active until told to deactive, set the ‘Infinite Hold Time’ spawnflag.”
moveto(target_destination) : “Path Corner” : : “The first path corner in a track that the camera should move along once it’s activated. If not specified, the camera won’t move.”
interpolatepositiontoplayer(boolean) : “Interpolate Position To Player” : 0 : “Gradually interpolate player’s position to here on start. (Episodic only)”spawnflags(flags) =
[
1: “Start At Player” : 1
2: “Follow Player” : 1
4: “Freeze Player” : 0
8: “Infinite Hold Time” : 0
16:“Snap to goal angles” : 0
32:“Make Player non-solid” : 0
64:“Interruptable by Player” : 0
128:“Set FOV” : 0
]
speed(string) : “Initial Speed” : “0” : “The starting speed that the camera moves at, if it’s on a path track.”
acceleration(string) : “Acceleration units/sec^2” : “500” : “The speed at which the camera accelerates to path corner’s desired speeds.”
deceleration(string) : “Stop Deceleration units/sec^2” : “500” : “The speed at which the camera decelerates to path corner’s desired speeds.”// Inputs
input Enable(void) : “Enable the point_viewcontrol, and start controlling the player’s view.”
input Disable(void) : “Disable the point_viewcontrol, and stop controlling the player’s view.”// Outputs
output OnEndFollow(void) : “Fired when the point_viewcontrol deactivates, due to the Disable input being received, the Entity to Look At being destroyed, or the Hold Time expiring.”
]
There’s also other files with interesting references to those keywords like gameinfo.cgi, halflife2.fgd, hlvr.fgd, etc. I’ll let you guys know if I find a solution.