Transparent parts rendering differently at different viewing angles

for some context, I’m trying to recreate the effect from Eclipse Game seen in this first video

when I change the parts’ transparency with a script, it looks different from different angles, which you can see in the second and third videos (this is my problem. i dont want it to do that!!!)
the third video is without fog or shadows, and with the sun directly above


i’ve tried removing the shadows from the parts, turning off shadows globally, putting the sun above, removing the fog, removing the atmosphere, not doing any other effects with it, removing the texture from the baseplate, and waiting a few minutes to see if it was just the lightning not being loaded fully yet

local script I'm using for the effect
local ContextActionService = game:GetService("ContextActionService")
local Lighting = game:GetService("Lighting")
local TweenService = game:GetService("TweenService")

local lightingfolder = game.Workspace.Folder
local black = lightingfolder.black.Texture
local sun = lightingfolder.sun.Texture
local toggled = false

local function darksight(actionname, userinputstate, inputobject)
	
	local darksightparts = game.Workspace.darksightparts:GetChildren()
	local normalparts = game.Workspace.normalparts:GetChildren()
	
	if userinputstate == Enum.UserInputState.Begin and toggled == false then
		print("activated")
		Lighting.Sky.SkyboxUp = black
		Lighting.Sky.SkyboxDn = black
		Lighting.Sky.SkyboxLf = black
		Lighting.Sky.SkyboxRt = black
		Lighting.Sky.SkyboxFt = black
		Lighting.Sky.SkyboxBk = black
		Lighting.Bloom.Enabled = false
		Lighting.SunRays.Enabled = false
		Lighting.Sky.SunTextureId = sun
		Lighting.Sky.SunAngularSize = 20
		Lighting.Brightness = 3
		Lighting.ColorCorrection.Saturation = -1
		--Lighting.FogEnd = 50
		for i = 1, #darksightparts do
			darksightparts[i].Transparency = 0.1
		end
		for i = 1, #normalparts do
			normalparts[i].Transparency = 1
		end
		task.wait(0.5)
		toggled = true
	elseif userinputstate == Enum.UserInputState.Begin and toggled == true then
		print("deactivated")
		Lighting.Sky.SkyboxUp = "rbxassetid://6412503613"
		Lighting.Sky.SkyboxDn = "rbxassetid://6444884785"
		Lighting.Sky.SkyboxLf = "rbxassetid://6444884337"
		Lighting.Sky.SkyboxRt = "rbxassetid://6444884337"
		Lighting.Sky.SkyboxFt = "rbxassetid://6444884337"
		Lighting.Sky.SkyboxBk = "rbxassetid://6444884337"
		Lighting.Bloom.Enabled = true
		Lighting.SunRays.Enabled = true
		Lighting.Sky.SunTextureId = "rbxassetid://6196665106"
		Lighting.Sky.SunAngularSize = 11
		Lighting.Brightness = 3
		Lighting.ColorCorrection.Saturation = 0
		--Lighting.FogEnd = 10000
		for i = 1, #darksightparts do
			darksightparts[i].Transparency = 1
		end
		for i = 1, #normalparts do
			normalparts[i].Transparency = 0
		end
		task.wait(0.5)
		toggled = false
	end
end

ContextActionService:BindAction("Darksight", darksight, false, Enum.KeyCode.E)

any help in fixing/figuring out what’s causing the issue would be appreciated

Try setting the material to neon and see if that gives you a better result. Also is your baseplate transparent too? Try avoiding making the baseplate transparent as that will cause layering to flicker based on which parts’ origins are closer to the camera.

1 Like

tried removing the baseplate and it stopped doing it. thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.