How to fix issues with Migrating from Compatibility to Voxel/Emulate Compatibility in Voxel

This is my first community tutorial so keep in mind it might not be great
Notice: when I mention Voxel I am reffering to Voxel with ColorGrading

Tips on Migrating
  1. Try having your game in two studio windows one with Compatibility tech and one with Voxel tech
Part 1: The Brightness Issue

Let’s first tackle the biggest issue when migrating to Voxel: The Brightness Issue

Crossroads at night (Compatibility)


This Crossroads map seems a bit dark, let’s fix that!

Crossroads at night with some lights (Compatibility)


That was easy but we have an issue, Roblox is gonna remove Compatibility this Crossroads map is using Compatibility.
Thankfully Roblox added the new ColorGrading instance which replicates the old Compatibility colors if ToneMapPreset is set to Retro, However ColorGrading does not clamp the Brightness! (Why Roblox?)

Crossroads at night with some lights (Voxel)


Yikes

We have a lot of lights in a small space and they all have brightness 40
Let’s turn the brightness down to 0.25.

Crossroads at night with some lights with brightness of 0.25 (Voxel)


We kindof fixed the issue but theres a lot of dark spots let’s try surface lights!
Crossroads at night with some lights (Compatibility)

Crossroads at night with some surface lights (Compatibility)

Crossroads at night with some surface lights (Voxel)

That looks almost like what it looked like before! Just a little bit brighter.

You might notice Neon looks a bit brighter in Voxel

Neon Part (Compatibility)

Neon Part (Voxel)

I found that if you limit the color to not go brighter than Medium Stone Grey (Default Color) It seems to somewhat replicate Compatibility
Neon Part Medium Stone Grey (Voxel)

Moving Lights

Adjusting Moving Lights is harder because it requires more scripting, since the light is moving around the map it will have to adjust to it’s surroundings and even the surrounding lights might have to adjust.
Here is some example code that detects how many surrounding enabled lights there are:

--Notice: This is example code I recommend doing something much more complicated/complex than this to get better results.
local n=0 --you might want to set this to a negative number to exclude some lights
for i,v in pairs(workspace:GetPartBoundsInRadius(pos,60)) do
	if v:FindFirstChildWhichIsA("Light") then
		for i,v in pairs(v:GetChildren()) do
			if v:IsA("Light")and v.Enabled then n+=1 end
		end
	end
end

Then we divide the Brightness by n

light.Brightness=1/n

Unfortunatly the video won’t upload so here’s some screenshots of the video
Compatibility



Voxel

Part 2: No u Anisotropic Occupancy

In Compatibillity there was this kinda Subsurface Scattering effect where if a part was big enough to have a shadow but thin enough then some of the light would go through it.
IDK if these are the right screen shots I might be mixing them up
Thick part and thin part (Compatibility)


However that is actualy despite being probably a desired effect by a lot of devs it is actualy unintenional and was patched
The same thick part and thin part (Voxel)

We can fix this by using what I call shadow parts.
Thick part and thin part with shadow parts (Voxel)

Basicaly what I did was clone the thin part, set the clone/ShadowPart’s Transparency to 0.8, then set the original part’s CastShadow to false.
However don’t just go disabling CastShadows on every BasePart in your map, and cloning everything then setting the Transparencies to 0.8, instead of cloning everything, for medium/big/large maps, instead your gonna want to disable CastShadows on thin parts, then manualy place Shadow Parts around the map with varying Transparencies. It will look better, and have better performance.
I also might make a plugin to auto generate Shadow Parts.

Keep in mind I might add more to this tutorial later. I apreciate suggestions/feedback of how to make a better tutorial. And better/more ways to fix lighting migration issues.
And also please tell me issues you are experiencing with migrating from Compatibility to Voxel that this tutorial doesn’t fix.

12 Likes