VR Screen Becomes Black Due To Non-Transparent Character

Reproduction Steps

I have found the issue can be reproduced with the following in Roblox Studio with a VR headset plugged in. I use a Valve Index, but reports of black screens have been reported with other headsets as well.

local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

RunService.RenderStepped:Connect(function()
	local Camera = Workspace.CurrentCamera
	local Character = Players.LocalPlayer.Character
	if not Character then return end
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.HeadLocked = false
	Camera.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0, 1.5, -0.5) * CFrame.Angles(-(tick() * 2) % (math.pi * 2), 0, 0)
	
	for _, Part in Character:GetDescendants() do
		if Part:IsA("BasePart") then
			--(Part :: BasePart).LocalTransparencyModifier = 0.501
		end
	end
end)

The issue is resolved by uncommenting line 15 and keeping the value >0.5. <=0.5 can reproduce the issue.

Expected Behavior

I don’t expect the screen to go black due to the character. I do however expect it to turn black for trying to go through other parts though.

Actual Behavior

As shown in the video, the screen goes black in certain cases when the character’s transparency is <=0.5.

Workaround

Nexus VR Character Model will soon have an update out that bumps up the specified transparency to 0.501 if the default 0.5 is specified. However, this affects every VR experience and does not help other systems that may not even modify the transparency of the character at all.

Issue Area: Engine
Issue Type: Display
Impact: Very High
Frequency: Constantly
Date First Experienced: 2023-01-21 00:01:00 (-05:00)
Date Last Experienced: 2023-03-11 00:03:00 (-05:00)

6 Likes

Hey! You can try putting this in a local script!

local VRService = game:GetService("VRService")
VRService.FadeOutViewOnCollision = false

If it doesn’t work then tell me!

2 Likes

can confirm that this does work – but i feel like it’d still probably be better for that option to ignore the local character regardless of transparency. i mean after all, it’s not like any other VR game punishes you for just being in first person.

also i feel a little goofy for completely overlooking that property while i was trying to figure this issue out myself :sob:

1 Like

To be fair… your character probably shouldn’t register as a collision since it is… yourself.

I didn’t look to see if this was a property. Cool to see it is. Flipping that to false for everyone for every case isn’t something I would ship as part of Nexus VR Character Model because it actually is a useful option to reduce players seeing while going through walls. Your character is you and probably shouldn’t count as a wall.

2 Likes

Hi Nexus, Noble and Skyle!

Thanks for pointing this out.
The camera fade out is preventing players from looking through walls and as you discovered, it ignores everything with >0.5 transparency, e.g. windows etc.
In this case the Character and Fade interact with each other and cause the camera fade to trigger because you are “inside” you character model. As you discovered, you can disable the fade completely, but maybe configuring the value or distance would be preferred? Being inside your character isn’t something we encourage and I’m not fully convinced that ignoring your character model is the best approach either.

1 Like

The problems I face with Nexus VR Character Model appear to be floating-point related to me, but I could be wrong. When you move your head, the character tries to move your character to that. The eyes will be whenever the attachment is, which is typically perfectly on the surface, and may go into the UpperTorso if you bend down enough.

I’m hesitant to change any global properties with my code because I risk fighting any developer who uses it. Either it would lead to a complaint to me that my system doesn’t work or stops from, or it leads to a false bug report to Roblox about a property not working as expected.

2 Likes