#Everything is darker after upgrading to Unity 6

1 messages · Page 1 of 1 (latest)

glacial otter
#

Hi,
We had a project made in Unity 2022.3.62f2, and we have upgraded it to Unity 6. The colors became darker.
Now I've read many Unity Discussions post about it, and almost all of them mentioned that rebuilding lighting solved it. But not for us.
Rebuilding lighting finishes very quickly and seems to not have any impact.

Any idea?

#

its HDRP by the way

timid knot
glacial otter
#

if I would need to use the frame debugger for this

glacial otter
#

and I doubt I'm the only one fighting with this

#

so there must be a general link or something about "how to setup visuals to get the same results you had"

timid knot
#

There isn't because it could be a hundred different things. Frame debugger is the fastest way.
You don't need a day for that. You can start getting insights in a few minutes.

glacial otter
#

and should I compare the results of the Frame Debuggers in both Unity 2022 and Unity 6?

#

or what should I look for?

#

@timid knot

timid knot
#

If you can compare to the proper data, that would be ideal. But even without it you can at least understand where it goes wrong(at what draw call).

glacial otter
#

@timid knot left one is Unity 6

timid knot
#

Just looking at the render passes list is not gonna help. You need to look at the individual draw calls in the passes. Start from the bottom. It would be ideal if you can find a draw call that looks the same on both versions, but that's not very likely. The last draw call in deferred lighting would make it clear if this is an issue with lighting or after that.

glacial otter
timid knot
glacial otter
#

this is what I can see

#

the ForwardOpaque is the first one I can see the image

#

but that differs

timid knot
# glacial otter

That's a compute shader. Is there no draw at the end of the deferred lighting pass?

timid knot
#

Ok, what about the last command in Forward Opaque?

glacial otter
#

@timid knot

timid knot
glacial otter
#

nope

#

because post processing and other stuff is added

#

but its already differs in here

#

can this be the source of the issue?

#

@timid knot

timid knot
#

You should step up through the draw calls to see where that texture is rendered then

#

Or, actually...

#

Can you click that _Texture and show what it looks like?

glacial otter
#

this is just part of the end result

#

but you can already see it differs

timid knot
glacial otter
timid knot
#

Is this an actual texture asset? Or an intermediate render target?

glacial otter
timid knot
#

Are you sure you're looking at the image I am talking about?

#

There is not format or anything in it.

glacial otter
#

actual texture asset

#

but these images look the exact same way

timid knot
#

Aah, okay. That explains

glacial otter
#

in both Unity 6 and Unity 2022

timid knot
#

My best bet is that exposure values are different

glacial otter
#

hmm that's true

timid knot
#

It's likely calculated in one of the compute calls. Scroll through them and see if you can find one that references the texture for write.

glacial otter
#

that's the first compute stage

timid knot
#

I'm not sure if it's reading or writing here. But can you check all the other textures to see if they're identical?

glacial otter
#

I didn't change anything on the images

#

but this exposuretexture is really different

#

so this one really might be the difference

timid knot
#

These. Are they all identical or are there some differences

glacial otter
#

GbufferTexture0

timid knot
#

These look super weird... Does that resemble any geometry in the scene in any way?

glacial otter
#

others seems to be identical

glacial otter
timid knot
#

Hmm...
Perhaps try disabling that VFX and compare between versions again.

glacial otter
#

but its just the "snow"

#

so I guess the end result is influenced by the exposure texture

#

which is probably affecting the whole image

timid knot
glacial otter
#

ahhhhhh

#

okay

timid knot
#

I'd check the gbuffers again without the snow vfx

glacial otter
#

so then maybe the snow was cached?

#

and this is why it stayed in the frame calculation?

glacial otter
timid knot
#

There's no guarantee that it's the culprit. But eliminating possible culprits is gonna get us closer to the solution.

glacial otter
#

while I stop the game?

#

and not during runtime?

timid knot
#

It should, yes

glacial otter
#

ok

timid knot
#

You don't need to build or even play the game(unless there's a considerable difference in the rendering behavior at runtime).

glacial otter
#

but then I will discard it

glacial otter
#

okay, now the GBufferTexture0 and 3 are clear

#

they are black

#

but still the exposure texture is different

timid knot
#

Ok, I can spot a few differences in textures between the two. Though it could be that the two on the right are packed in that texture on the left. Worth looking at this.

As for the gbuffers, they're likely not empty, just containing values at a lower range, so you can't spot any differences.

glacial otter
glacial otter
timid knot
#

Okay, then that can probably be ignored.

glacial otter
timid knot
#

Check the gbuffers with reduced range. Not sure you can do that right in the frame debugger. Might need to open them in a separate image editor.

#

Did you compare all other textures in that compute command?

timid knot
#

Also, which command is that even? I don't see it selected in the hierarchy.

glacial otter
#

everything else were identical

timid knot
glacial otter
#

I compared the bottom Compute Deferred

timid knot
glacial otter
#

sorry

#

all of them

#

all of them has the exposureTexture

timid knot
#

Compare the first command. Is the exposure different between the versions?

glacial otter
#

this is the earliest stage from the top I could find these

#

left is 2022, right is 6

timid knot
#

Interesting. So, there must be a difference in how the exposure is calculated. Or maybe a setting.

#

This might help find out if there is a specific object or material that makes the difference, or if it's the lighting in general.

glacial otter
timid knot
glacial otter
#

these 3 exposure related settings are the exact same in both Unity

timid knot
glacial otter
#

Exposure Control is also used in both

timid knot
#

Ok, then use the debug features to investigate exposure.

glacial otter
timid knot
glacial otter
#

left one is Unity 6, right one is 2022

#

@timid knot I have no idea what these histograms mean

timid knot
#

Should probably start with the Scene EV100 Values

glacial otter
#

unity 6 - unity 2022

#

@timid knot

timid knot
#

Don't look at the histogram. Look at the scene/game view. Are there areas that stand out/show more difference?

glacial otter
#

unity 6 - unity 2022

timid knot
#

Why is there such a difference in resolution?

glacial otter
#

@timid knot

timid knot
#

What is the main source of light/brightness in that scene? What is that bright "cloud" around the "moon"?

#

Is it some kind of volumetric fog?

glacial otter
#

this is a texture

#

but there are also a volumetric fog added

#

and there are tons of other vfx

#

but those volumetric fog and vfx are not just around the sun

#

its all around the scene

timid knot
#

Can you try comparing with all the volumetric fog and other vfx disabled?

glacial otter
#

same

#

after stopping the game running in editor

timid knot
#

So at this point it's just that texture/image?

glacial otter
#

I removed vfx-es

#

fx-es

#

I removed volumetric fog

#

well, these are lot of textures

#

on top of each other

#

lot of disabled spotlight gameobjects

#

reflection probes

#

global volume

#

navmesh manager, fmod

#

etc. etc.

#

meshrenderers

timid knot
#

Hmm...
Let's start simple. Disable eveything in the scene. Add a default sphere and see if it looks the same between the versions. If it does, start enabling chunks of objects until there is a difference.

glacial otter
#

if I remove the Global Volume, then exposure gets more similar than what it was in Unity 2022

#

but still stays different

timid knot
#

Yeah. Next try what I suggested.

glacial otter
#

I don't even need to put a sphere there

#

I don't know why is that yellow color in the left

timid knot
#

Great. Now take a look with frame debugger

timid knot
timid knot
timid knot
#

Looks like sky settings to me

opaque laurel
#

hey uhh rq, this is the code channel

glacial otter
#

sorry

timid knot
#

Indeed. But at least it's a in a thread. Maybe mods can move it to rendering.

opaque laurel
#

threads can't be moved

glacial otter
opaque laurel
#

just saying, asking in #1390346776804069396 could probably get more relevant eyes on the issue, maybe even someone who's encountered it before

glacial otter
#

true

#

but I don't really want to start the whole discussion all over again

#

its already multiple hours went into this

opaque laurel
#

you can link back to this issue

#

(and also summarize what you'e already been through)

glacial otter
#

now I need to do something entirely else, but I will come back

glacial otter
#

@timid knot do you have any idea about what should I change?

#

skybox settings seem to be the same

timid knot
#

Can you show the sky ox settings? I think there might be in several places for hdrp(lighting tab, rp asset maybe somewhere else too).

glacial otter
#

I found the setting, HDRI Sky had an exposure compensation value

#

and when I cleared that value to be 0, then the empty scene changed to the original coloring

#

but if I discarded the scene

#

and I got back the original main menu

#

that looks the exact same

timid knot
#

Mm? So the issue is solved?
Or do you mean that resetting that setting doesn't help when switching between scenes?

glacial otter
#

at all

glacial otter
glacial otter
#

so I'm not sure anymore I can solve this

#

the coloring needs to be reset by an artist

#

because probably its get calculated fully differently in Unity 6

timid knot
#

No. There shouldn't be any difference. Same assets should produce the same image.
If the skybox is fixed, then you should next start reenavling objects in the scene until you start seeing difference again. At that point investigate the object that produces the difference.

glacial otter
#

it could take days or weeks to fix this

#

and I have zero idea which setting mean what

#

and the vignette is also different

#

but I can't find a setting to make them similar

timid knot
#

So if you disable post processing, it looks the same?

glacial otter
#

I think yes

#

if I disable post processing on both

#

but maybe the light around the sun is higher

timid knot
#

Looking at the black areas it still looks very different.
Did you not try what I suggested? Disable all the objects, then enable one by one(or groups of objects), until you start seeing differences.

glacial otter
#

@timid knot

#

all other stuff in scene is the camera and the actual visual pieces

timid knot
#

And if everything(aside from the camera) is disabled you see no differences?

glacial otter
timid knot
#

Ah, I guess the skybox settings moved to lighting tab in unity 6.

glacial otter
#

BUT if I delete everything in Unity 2022, it also switches into the sky

timid knot
#

You could disable the skybox on Unity 6 to get a fair comparison.

glacial otter
#

because there are multiple skybox setting categories

#

so I guess there are multiple skyboxes

#

in all project

timid knot
#

Mainly in the lighting settings. But can also be on the camera or the volume that you mentioned earlier.

glacial otter
timid knot
#

Where does it appear..?

glacial otter
#

I replied to that comment

timid knot
#

Is that the first object where the difference appears?

glacial otter
timid knot
#

If you disable it, there is no difference?

glacial otter
#

whatever I do, there is difference

#

in there

timid knot
#

So then you didn't do what I suggested..?

#

Disable everything. Start enabling objects one by one.

glacial otter
glacial otter
timid knot
#

Show me.

#

There is a difference in an empty scene?

glacial otter
timid knot
# glacial otter

I said like 10 times already, disable everything. Start enabling one by one... Or does it mean that there is only difference when all of the sprites are enabled??

glacial otter
#

okay, this is still a difference

timid knot
#

Great. Now, check both in the frame debugger

glacial otter
timid knot
#

Add a camera.

glacial otter
timid knot
#

Show the camera settings.

glacial otter
#

@timid knot if I set both background type to None, then this grey rectangle appears in Unity6

#

@timid knot

#

@timid knot okay, apparently there's still some kind of skybox activated in Unity 6, because if I disable viewing Skybox in Scene view, then it shows the same as in Unity 2022

#

but then I have no idea how to fully disable that

#

there's no On-Off in Unity 6

#

In Unity 2022, at least there's the None option

#

never mind, I was an idiot

#

found it

glacial otter
#

@timid knot okay, tried to revert everything, because I'm not sure anymore I didn't fuck up something

#

and I can't set it back to how it worked before...

#

which asset stores the original skybox?

#

never mind

glacial otter
#

@timid knot okay, I have zero idea about what goes wrong... I can disable things until I can see the same on both screen, but then I can't re-enable them, because I always forget where the settings were ....

#

I don't understand what is HDRI sky... why one change in skybox is visible, why the other is not, etc.

#

why is there Sky type for example in 50 different places

timid knot
timid knot
#

Seeing how your game is 2d, you probably don't need the sky at all. You should just set it to solid color and then compare both versions to make sure there's nothing else that creates a difference

timid knot
#

Ok, but that scene is, is it not?

glacial otter
timid knot
#

Ok, so is sky playing an important role in that scene? Is it visible in any way?

glacial otter
#

whatever I do, the skybox is different

#

I can't make them similar

timid knot
#

Even with solid color?

glacial otter
#

I don't know to be honest

#

first I would be happy if I could set the skies on both Unity to be the same

timid knot
#

You can check the older version docs as well to make sure you understand how it works there

glacial otter
#

for some reason

timid knot
timid knot
#

If yes, look at the frame debugger. Where is that rectangle coming from? it definitely isn't normal.

glacial otter
#

so something is there in the camera

timid knot
#

Well, what do you see in the frame debugger, when there is just a camera in the scene?

glacial otter
#

I mean the game related camera

#

not the default instantiated camera

glacial otter
#

okay, the 2 camera settings are exactly the same

glacial otter
glacial otter
#

@timid knot

#

its when only a camera is there

#

the game-related camera which was already in the scene before

timid knot
#

Well, one major difference is that exposure is calculated or written in the left case and not the right.

glacial otter
#

with exact same value (0)

#

but the colors are still different in scene view

#

only the camera is active in both scenes

timid knot
glacial otter
#

in both unity

timid knot
#

check the values in frame debugger

glacial otter
#

they are the same

timid knot
#

Before that, can you compare these two exposure textures and make sure they have the same values?

glacial otter
#

this is an extra stage in Unity 6

glacial otter
#

in Gimp

timid knot
# glacial otter

Dbuffer is a pass used for decals.
What draw calls does it contain?

glacial otter
#

okay, I could remove that

#

by disabling the Decals

timid knot
#

Clearing the render targets it unrelated.
Start from the bottom and step through every draw call upwards.

glacial otter
#

the Decals option exists only in Unity 6 camera, not on the Unity 2022 camear

#

so above Deferred Lighting, its black

#

on Deferred Lighting, its already have the grey-ish color

timid knot
#

On what draw call in deferred lighting?

glacial otter
timid knot
#

Then look at the differences in each of the draw call

glacial otter
timid knot
#

Do you have hdr color enabled in the render pipeline asset on both versions?

glacial otter
#

@timid knot

#

_LightLayersTexture is not in Unity 6

timid knot
#

Also, check these setting: In Player Settings, the setting PreserveFramebufferAlpha

timid knot
#

Render pipeline asset. Though maybe there isn't in hdrp..?

drowsy dagger
#

Have you checked your material? , maybe u material is the problem

glacial otter
timid knot
glacial otter
#

also there's VolumetricCloudsShadowTexture in Unity 6

#

and RenderingLayersTexture in Unity 6

#

but Volumetric Clouds is disabled...

#

@timid knot

timid knot
glacial otter
#

there is

#

these definitely can darken the screen in Unity 6

timid knot
#

But it seems like you can disable them, so maybe try that to be sure.

glacial otter
#

I can only see that volumtric clouds shadow texture

#

which is suspicious

#

but volumetric clouds and their shadow is disabled...