#archived-lighting

1 messages ยท Page 38 of 1

dawn pawn
#

Set it manually in the lighting settings or maybe with reflection probes

south dragon
#

i mean emit baked light, it doesnt light anything on the ground or even the test cube next to it

dawn pawn
#

Ahhh, honestly I am not sure how it exactly affects baked lighting. I am also not familiar with this lit version, can it be youre on an old Unity version?

south dragon
#

im on this one

#

which shader should i use that you reccomend?

dawn pawn
#

Thats a very old version yeah. I suggest to use the latest 2021 if you have to use 2021.
I always use URP/Lit as well, just havent seen the PBR part after it myself which I see in your shader name

#

But I cannot help much with the internal details. If no one here responds try the forums

south dragon
#

weird i dont have the "lit" one

south dragon
dawn pawn
south dragon
#

alrighty thanks anyways

high cave
#

watch that vid i need help

hot lake
#

Hello!

#

I have this very ugly baking artifact (right & left edge of the wall with a window). How can I get rid of it?

#

this only happens when sticking together a "windowed"-wall & a usual wall.

#

Here is the wall's mesh:

#

(no surprise)

#

Here is the windowed-wall's mesh:

#

Any help would be appreciated ๐Ÿ™๐Ÿผ

chilly kettle
# hot lake

You wont get better results when baking light with modular object like your walls.

#

Only way is increasing the resolution, to make it look better, but in most cases you will always see a seam.

chilly kettle
#

Yes

hot lake
#

So no real fix besides merging the meshes into one via a 3d modeling tool ? :(

chilly kettle
#

Sure. Thats the fix for it ^^
You can merge the Objects together in Blender for example, or hide this seams with some other geometry

hot lake
#

Understood!

#

Thanks for the answer. Do you by any chance no the deeper reason why these artifacts happen?

chilly kettle
hot lake
#

Thanks again!

fallen crater
#

Hey everyone. I'm running Unity 6 and using the Adaptive Probe Volumes with Progressive GPU Baking. I had to increase the Indirect Intensity to 5 when baking to make the shadows inside buildings not too dark. The problem is the APV's are almost white when in the sunlit areas, thus my non static objects are too way too bright. Aside from using Local Volumes and playing areound with the pst processing, is there another way to modify the APVs? Thanks!

#

Ideally I would like to set my indirect to 5, and then rebake just the APV's when the indirect is set to 1.

deft fiber
#

Keep intensity multipliers at 1
Changing them should really be your last option and there might be a problem somewhere else if it seems tempting to tweak them

#

At 1 multiplier all the light bounces are physically accurate

fallen crater
#

If I set it to 1 and bake, the character looks right but the corner is way too dark

deft fiber
#

What tonemapping and post processing are used here

fallen crater
#

ACES and bloom. I did no some color adjustments with the Post Exposure and contrast. Maybe I'll try playing around with those.

#

Changing it to Neutral looks more natural, but I prefer ACES

deft fiber
#

The image seems way more contrasted what I'd expect for ACES so I expect your contrast and other color adjustments are too harsh

#

I recommend you avoid making any drastic changes to the look of the scene with post processing before the lighting is in order, otherwise you might end up compensating the post processing with lighting changes so they compound in a very unnatural and unpredictable way

#

You can safely tweak the intensity of the sky also

fallen crater
deft fiber
#

When baking lights Ambient Occlusion is optional, and disabling it may reduce the excessive darkness in occluded areas

#

Especially if you've got SSAO on top of it

south dragon
#

how come my baked lighting looks trash and barely lit on my terrain?

#

for some reason its brighter over here in a different spot but with the same settings

#

also none of those are area lights, theyre just point lights renamed

south dragon
#

bro it wont even take direct baked light

quasi rune
#

why baking light taking so long???

deft fiber
# quasi rune why baking light taking so long???

Most common reasons:
You're not baking on the GPU or are but don't have a competent GPU
You're also baking Realtime GI
You have many objects, particularly small detailed ones set to be lightmapped

quasi rune
deft fiber
# quasi rune radeon graphics on a 5 year laptop

Doesn't sound like something you can expect to be very speedy, but GPU baking should still be faster than CPU baking
Check the console to make sure there are no warnings about the baker falling back to CPU

#

And then look into the second and third points I listed

hot lake
#

Hello! I have a problem with real time lighting

#

Here is the behaviour with my point light set to "no shadows". As you can see, the light is passing through the wall.

#

Now if I set it to soft shadows, I get these terrible artifacts:

#

Any idea of what the reason could be?

#

Setting the Depth bias to 0 in the URPAsset's settings fixes most of the problem. But I know it will cause more problems down the line. Is there a better solution?

deft fiber
#

Is that the setting you changed between the two screenshots? Something seems to have

hot lake
#

Yes exactly, 2nd screen is with depth bias 1, 3rd is with depth bias 0

deft fiber
#

As the note in the component says shadow resolution may be decreased if you have too many shadow casting lights in your scene visible at once

#

Also check the scale of your scene in general
One Unity unit should correspond to one meter, as light calculations are designed for objects in roughly real world scale

hot lake
#

oh shit you're right

#

if I deactivate all other lights + reduce the depth bias, the problem completely goes away

#

well damn ๐Ÿ˜ญ what can I do to up the shadow res then?

#

I tried the logical thing and put the "shadow resolution" to its max value (4096) in the URP asset, but it changes nothing.

#

Just to make everything clear:

hot lake
#

Here is 2 lights off (1 off changes nothing, >2 off gives the same result)

#

Here is depth bias 0, 2 lights off

#

Ok fixed, I am stupid

hot lake
#

I will set the res from 512 to 1024 for now, and reduce the depth bias a bit.

hot lake
deft fiber
#

Main light is not relevant here since that's for the sun / directional light only

#

Light resolution in general determines how accurate the shadow casting will be
Bigger shadow atlas means the lights' resolutions don't get reduced on the fly

hot lake
#

Was looking in the Unity documentation while the info was under my eyes

#

Thanks a lot for your help!

deft fiber
#

If you didn't already best to check the scene scale / size
If that's off it may cause other problems in the future

hot lake
#

Ye I did, seems correct!

tame mural
#

what causes these marks on a default cube when baking lights? the only thing affecting it is a realtime directional light but it still has some weird shadow-like color on it

strong python
#

Hi, gyus. I am trying to bake a light. After baking has been completed, the light on the wall seem to be correct, but after importing a lightmap, everything becomes too bright. Just moved to unity 6 and have never had this problem before

golden remnant
#

Hi, I'm trying to learn how Unity lighting works. I added a frame on the wall, but somehow, it turns black in play mode.

deft fiber
#

Are you making use of precomputed realtime global illumination there?

deft fiber
golden remnant
#

Here is my lighting tab, i'm not sure what precomputed realtime global illumination is ๐Ÿฅฒ. There are 2 realtime point light (the lamp) in the scene.
If I tick 'Auto Generate Lighting' the office man also becomes black, like the frame. However, if I untick it and manually click 'Generate Lighting' the office man get his color back, while the frame stays black. (Only happens in playmode)

deft fiber
#

Realtime GI should only be used if you know what it does
Then again so should Baked GI

golden remnant
deft fiber
#

There's very few reasons why the lighting would change like this between editor and play mode though

#

You could try making it dynamic instead of static, since static batching technically does modify meshes when entering play mode

#

But it might also help to replace it with another mesh, like a cube or a quad and to make sure the material is not two-sided

golden remnant
#

I made it dynamic, and it works. Still, I think I should replace it with another mesh. Thanks for your help!

deft fiber
strong python
#

Also, it does not seem that baked light maps are so bright..

strong python
#

Ok, i figured that out. For some reason all lightmaps were tagged as default in the scene folder. I changed it to lightmap, dir lightmap and shadowmask accordingly and it fixed the problem. But looks like unity set it as default every time..

kindred sedge
#

hello

#

i have a problem and need help with it

#

i dont get why my transparent cutout material isnt having lighting

#

could someone please help out /:

#

@summer aspen sorry for pinging, are you able to help me? Your pfp just looks like you know allot..

summer aspen
#

@kindred sedge Don't ping people not in conversation with you.
There are also materials pinned in this channel that explain lighting workflow.

kindred sedge
#

alright

#

thanks

deft fiber
kindred sedge
#

ok

#

i changed it to transparent btw, cause it looked better

#

but still same issue

summer aspen
#

Unlit shader means it will ignore lighting.

kindred sedge
#

oh

#

how do i make it not ignore lighting

#

theres only this one

deft fiber
kindred sedge
#

alr

#

yesss

#

thanks allot

#

i went through so much pain

charred storm
#

Can someone help me with figuring out why it looks so washed up? The textures on trees especially, I know it has to do with lighting but I am not sure exactly whats happening here and how to fix it

deft fiber
#

You can try to verify it by removing both smoothness and normal maps from the material to see if the "sheen" changes significantly

charred storm
deft fiber
#

If the cause is one or more of those issues, reducing smoothness will conceal it rather than fix it

charred storm
deft fiber
#

Assuming there is smoothness data in the mask map, you should usually not need to do any remapping

#

A bark's smoothness should be quite rough to begin with without remapping it
If it's inverted it'd look glossy instead

#

If the shader allows for remaps Min to be bigger than Max, you can also flip it with remap
But only if you have an inkling of if the bark smoothness data is right

#

If not, I guess it doesn't matter as long as it looks acceptable to you

summer aspen
#

@timber lichen Do you have a question? Don't cross-post "hello" everywhere, !ask a question if you have one.

tawdry schoonerBOT
#

:thinking: Asking Questions

:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #๐Ÿ”Žโ”ƒfind-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.
-# For more posting guidelines, go to #854851968446365696

timber lichen
#

so sorry

last haven
#

I have a scene with a dynamic directional light, and one interior. If I set all lights to baked lighting, I get Baked GI and it looks good but I want shadows for dynamic objects so I've changed them to mixed. But now I don't get any baked GI. How can I get the good looks of baked GI in my interior scene whilst having shadows on dynamic objects from both the Directional Light & all our interior lights?

#

seems baked indirect lighting mode is what I want. I'm just confused on how to achieve both baked GI & realtime shadows at once... also I'm using adaptive probe volumes

deft fiber
#

Baked GI is not expected to disappear with mixed lights unless something's wrong somewhere

#

Though most of them remove direct baked lighting in favor or realtime direct lighting, while keeping indirect baked lighting

last haven
deft fiber
deft fiber
#

I'd practice it in a very minimalist scenario with no extra lights first to get a feel for which setting does what

last haven
deft fiber
#

Probes could be having their own issues separate from the mixed lighting here

hot lake
#

Hello! I got a new problem

#

Just trying to test Realtime GI vs Baked GI, but the results of Baked GI are very underperforming. I think I'm doing something wrong.

#

1st problem: with Baked GI, Having a shadow casting light inside a one-sided mesh hides the light entirely

#

(with realtime GI, this problem is nonexistent)

#

Here is a result using realtime GI (with of course realtime lights)

#

My light is inside of the visible light bulb (that also has an emissive material). Please tell me if any of this is bad.

#

As soon as shadows are baked (via Shadowmap or Subtractive baked GI), the light doesn't exist outside of the light bulb.

#

(here using Subtractive, with a mixed light inside of the bulb)

#

I guess this is simply because the baked shadows use the space taken by the mesh, rather than its faces, for calculations.

For now I simply fixed it by removing the bulb from GI ("Contribute GI" set to false). No idea if there is a better way.

#

2nd problem:
If I disable the bulb for checking what the baking looks like

#

(please ignore the artifacts)
ground colors are way less reflected on the walls compared to the realtime GI result.

hot lake
#

By the way, is Enlighten (realtime GI) being replaced with APV?

upper cloud
#

how can I make it so the lighting isn't completely pitch black

#

this is realtime lighting

#

and URP

hot lake
#

add environment lighting here

#

You can either use skybox - you may create a custom skybox by making a new material and selecting the "ProceduralSkybox" shader

#

Or a color / gradient

upper cloud
hot lake
#

Maybe try baking

upper cloud
hot lake
#

If it fixes the pitch black issue, you might have the ambient light set to baked instead of realtime. I'm not sure. Try searching around this.

upper cloud
upper cloud
#

got it to work by doing absolutely nothing

stark tulip
#

Does anyone know the solution for this problem. When I press generate ligthing, my Graphics card pops out for a second and then dissapears again. Giving this error: [PathTracer] InitializeLightmapData job with hash: 731f6df5dcad8494c962234b00ce883b failed with exit code 2.

shell juniper
languid blaze
#

If I have an object set to contribute global illumination but to receive lighting from light probes, does it still need a valid lightmap UV?

#

I hadn't thought about this before. I'm getting yelled at about it by a VRChat world checker tool.

#

I guess I could test this by making crazy-awful lightmap UVs and seeing if that affects the GI bake

deft fiber
languid blaze
#

yeah -- if you uncheck both, unity does basically nothing but computing ambientl ight

deft fiber
# upper cloud no like UV issues

Realtime GI and Baked GI require lightmap UVs
If you disable those before generating UV issues should not be relevant to your lighting issues

upper cloud
#

by doing nothing

deft fiber
#

That's rarely how things work, so I wanted you to have the correct instructions as well

deft fiber
deft fiber
#

The bounce lighting you're getting from the floor is pretty much close to none, so it's something you could troubleshoot first with just baked lighting
Would have to see the lighting settings to look for clues

tight moss
#

im having a weird issue

#

in any project on 2022 lts, the "shadow strength" setting on the light component doesn't do anything

#

in another project of mine that is still 2022 but a few incremental versions behind, it works as intended

deft fiber
tight moss
#

built in, 2022.3.32f1

#

the one that works fine is 2022.3.11f1

#

in a fresh project in 2022.3.32f1, made a simple scene with some cubes and dropped in a realtime light with hard shadows, completely standard settings otherwise

#

wtf is that lol

deft fiber
tight moss
#

im installing the latest one and gonna try there

#

super weird

deft fiber
#

Not known issues I've heard anyone complain about, and since they're happening in a fresh project it might be something related to your system or drivers

#

Total wipe and reinstall of editors and Hub sometimes helps with issues that transcend projects and editor versions, but you never really know with those

#

I'd update GPU drivers in either case

#

Swapping the graphics API might potentially provide some clues

#

I guess it could indicate if it's a GPU issue rather than an editor issue

tight moss
#

@deft fiber wild. I updated to .3.55f1 and upgraded the same fresh project and the issue is gone

#

so it seems specific to 32f1

deft fiber
#

And probably to specific setups as well
I recall using that version when it was new

hot lake
#

It's ok I have some knowledge of a past project about mixed (already worked with lights but only through the scope of optimization, not for how things look like)

hot lake
#

Managed to fix all my other light problems yesterday, understood lots

hot lake
#

Hey guys

#

Just trying out APV, to see if I would prefer its workflow compared to baked. The shadows are rendering horribly.

#

Any idea why?

hot lake
# hot lake

By the way I fixed this. My lightmapper's "max bounces" was way too low.

#

@deft fiberHave to thank you for your quality help btw โœจ . Really speeds up my learning process

deft fiber
# hot lake

To prevent noise, APVs need a lot more samples than lightmaps do
That's why there's the Light Probe Sample Multiplier setting which I tend to keep at about 8 for non-final bakes and 32 or more for final

#

Furthermore the Adaptive Probe Volumes options volume override has Sampling Noise which effectively blurs the probes together but requires TAA since it relies on temporally denoised dithering

hot lake
#

Thanks for the infos! Meanwhile I've been able to do everything I wanted with baked lights. Only very minor artifacts are still here.

ancient notch
#

Guys, stupid question: Should i bake reflection probes before lightmaps or after? Or it doesn't matter?

#

And also, i have weird issue: all my lightmaps seems to be corrupted after i entering a playmode - they simply become black somehow. Then i need 2 rebake them and that's all fine, but problem comes back after entering playmode. Is it a bug or am i missing something?

deft fiber
ancient notch
deft fiber
#

I would not try to lightmap that many complex meshes, they have too many UV seams and tight geometry to ever work right

#

You'd instead want them to be receiving GI from probes
APVs would be pretty much ideal for that type of scene

ancient notch
deft fiber
# ancient notch I'll give it a try, thank u

Just in case you're not familiar, there's Light Probe Groups which be used to light non-lightmapped objects on a per-mesh basis, both dynamic and static where appropriate
APVs are the newer system which can light objects per-pixel, meaning you can replace almost all lightmapping with it

tight moss
#

@deft fiber i figured out that issue haha

#

i use next-gen soft shadows in another project that i had on 2022.3.32f1

#

and when you install it it overwrites realtime shadow pcs filters in the unity install itself

#

so if you don't use the plugin in another project on the same version shadows will look weird

tight moss
#

it is. worth it though they look crazy good

hot lake
#

With 0.2 minimum space between probe

outer tangle
#

in unity 6
why the whole scene turns dark when I clear baked data, is it a bug?

hot lake
#

I don't see the whole scene turning dark, only your two objects

outer tangle
hot lake
#

If they are set to "static" (or more specifically to "contribute GI"), they can receive environment light through baking

#

so if you clear the bake, you lose the light info, and they are not lit anymore

outer tangle
#

they are not statics

#

and they lose skybox lighting after clearing

#

btw skybox environment lighting doesn't work after it

hot lake
#

I don't think I can help you more sorry :/ maybe send a screen of one of the concerned object

#

(i mean send a screen of its inspector tab)

outer tangle
#

in unity 2022 it works fine, I have trouble only in unity 6

hot lake
#

๐Ÿค”

#

I don't know

#

Pretty strange

outer tangle
#

btw current version is 6000.0.33f1

ancient notch
deft fiber
deft fiber
#

You might also need a lighting settings asset to persistently save the generated lighting, but I don't recall for sure

#

Creating a new lighting settings asset enables baked GI by default, but you should disable it since you're not using it

coral surge
#

Hey guys, any idea why this might be happening? These are two modular meshes, when any light needs to go from one to the next it stops at the end of the first

#

These are my current settings

deft fiber
coral surge
coral surge
languid blaze
#

I've used both so that I could get really nice room-filling light from the player's flashlight

unique yarrow
#

i want to replicate super hot visuals, how does it use its lighting?

deft fiber
deft fiber
languid blaze
#

yeah

unique yarrow
languid blaze
#

I don't see realtime shadows on anything, but it's hard to say

#

maybe that's a shadow?

unique yarrow
#

in super hot if you look outsde its usually a blinding light but it doesnt seem to be direction light, not sure what it is

languid blaze
#

as in, when you look at the light, you see a flare?

#

I'd guess they have a very strong ambient light source (to light up everything), plus an intense baked directional light

(but I'd need to see more images lol)

unique yarrow
#

it looks like the sky is just a solid white/baby blue with a tone of bloom? so its not actuallyl ighting?

#

just enviromental lighting?

languid blaze
#

A common way to determine ambient lighting is to use the skybox

#

and in this case, the skybox looks like a solid color

#

so yeah

unique yarrow
#

how would i make that skybox? in hdrp bloom is tied to the "sky and fo volume" is there a way i can make it so only my environmental lighting has bloom? and how do i get a solid enviromental lighting like that?

languid blaze
#

Bloom is unrelated to the skybox

#

For this, you'd use the "Visual Environment" volume component

#

i don't think it actually has a solid color option, but you can use a gradient sky (and then add the Gradient Sky component)

unique yarrow
languid blaze
#

That looks like you have a large ground plane

unique yarrow
#

naa theres nothing there, its where the sky and ground meet but idk where its there when im not using sky and ground

#

i feel like HDRI sky would wortk with a solid material cubemap, but i cant seem to use a material converted into a cubmap foir my HDRI sky, it doesnt recognise it

little ore
#

some of my assets are just black after lightbaking, i did check all of them to static

anyone knows a solution?

deft fiber
#

You can't convert a material into a cubemap, conceptually that's not a thing
Materials reference a shader and properties for that shader, one such property could be a cubemap texture
HDRi sky volume override only takes a direct reference to a cubemap texture
So you need texture intended to be imported as a cubemap to start with

#

Gradient sky seems to create a kind of a flat horizon, I don't know why

deft fiber
little ore
#

heyy i got the solution

#

i had to switch this to lightmaps from lightprobes on the inspector for the black assets

deft fiber
#

Dynamic and non-lightmapped objects would be lit by light probes so they're required anyway
Smooth and metallic objects would be lit by reflection probes
Metallic materials get indirect light only from reflection probes

little ore
#

i gotta give it a read

deft fiber
#

The darkness in the drawer space next to the dishwasher is probably correct, considering it's occluded from the light source and very little bounce lighting can reach it
This could be helped by increasing light bounces, as well as samples to compensate that the light rays scatter more
No more than 10 bounces is recommended though, because of baking expense and diminishing returns

deft fiber
little ore
#

damn thanks a lot, i would've never known that

snow mason
#

how can i make this room darker? (im using URP)

dawn pawn
past forge
#

Hi there! I'm having some issues with baking lighting for my scene in HDRP, specifically with Adaptive Probe Volumes, and I'm not sure where to start troubleshooting.

I have a scene (A 600x600 terrain where an area of around 300x300 of that terrain is actually used and populated with objects) with a dynamic day & night cycle, with both interior and exterior areas. I have a fairly large number of mixed and baked lights and a few different post-processing volumes. I'm using the Progressive GPU Lightmapper and a 3060 Laptop GPU. What I want to do is not only bake the baked lights' shadows, but also use an adaptive probe volume for my entire scene to improve lighting quality. I also want to use its lighting scenario feature to blend between lighting depending on the time of day. At this time I don't have any reflection probes in the scene. I'll be honest and say that I'm not 100% sure of all the things the APV does, but as I've understood it it calculates bounce lighting for both static and dynamic objects?

#

While I have managed to successfully bake lighting once, it was with my APV's mode set to Scene and with extremely low quality settings in the Lighting tab. Not only do I want higher quality, but I also figure that it would be more resource efficient to have my APV use Local mode, as only half the terrain is used. However, when I try to bake lighting with increased quality settings (still fairly low quality as I understand it though - direct samples 128, lightmap resolution 40, lightmap padding 6, max lightmap size 1024, etc.), it either takes so long (over 90 minutes) that I'm forced to cancel, or Unity outright crashes. This happens whether I use Scene or Local mode. I assume that if I were to reset my settings (assuming I remember exactly what they were before) and bake in Scene mode, it would work again, but who knows.

Does anybody with experience with baking lighting in HDRP have an idea of where I'm going wrong or what I should look for? Could problematic meshes be an issue? In that case, why could I bake successfully once? Have I misunderstood the role of APV's? I've struggled with this for a while now and have tried a lot of stuff, but I feel like my knowledge of how baked lighting works to begin with is probably lacking.

Any help would be super appreciated, and thanks in advance!

unique yarrow
deft fiber
unique yarrow
#

ahh wait its the fog

#

thats annoying, the fog crates the horizon line but i want to use fog

deft fiber
deft fiber
#

@past forge There's a bit too much going on there to point to any particular cause or solution so I think it's most important you get more familiarity with the systems you're using
An important thing to understand is that APVs aren't a different baking system, they're a replacement for the Light Probe Groups and fulfill the same role but with optional extra features

past forge
astral tapir
upper fable
deft fiber
#

If you can describe the issue precisely in words, you can ask for help effectively
And more importantly search for answers online from other people who've had it

astral tapir
gentle sky
#

Point lights in my project seem broken. They're somehow cut off 180ยฐ. Happens to all point lights even in other scenes. Anyone have an idea what's happening or how to fix it?

upper fable
stark temple
#

Either the vertex normals or the normal map

gentle sky
#

I see, so a shader graph issue I assume?

stark temple
#

If you've created a shader that you're using everywhere that's doing something wrong with the normals that would also be an issue

gentle sky
#

lemme check something

#

Yeah you're right, it's a material issue not a light issue

#

It's a custom shader graph but not a specifically complicated one

#

Normals are just
tiling and offset -> sample texture -> normal unpack

stark temple
#

Why not just sample the texture as a normal? You shouldn't need to unpack anything

gentle sky
#

Works now!

cedar pulsar
#

I am using Unity 6 and when baking light with adaptive light probes, i am having odd results in many places:

dawn pawn
cedar pulsar
#

but i fixed it by using light probes on all my mesh renderers, i guess that's how it worked!

dawn pawn
#

Light probes and APV are different.. Pick one and use that. APV has higher quality.

deft fiber
#

I'd guess "using light probes on mesh renderers" likely refers to the setting of the mesh renderer component for it to receive GI from probes
Which is a requirement for lighting them with APVs

#

If you have multiple light probe groups across separate scenes, iirc you need to call the tetrahedralize method on them from a script to make them work together

candid jungle
keen kayak
#

How can I use vertex light? What shader shoul I use? I tried vertex-lit but is not working very well...some textures I need to use cutout to remove the alpha and I don't see this option

radiant veldt
#

Hey everyone! I'm trying to make a terrain generation system but it seems like there's this weird lighting seam between the chunk meshes, any idea how to fix this?

scarlet jay
small scarab
#

is there any requirement for GPU or packages?
i can't bake any lighting on GPU Lightmapper, it just stops at 1% whenever I try.

AMD Ryzen 5 7600X
32GB RAM DDR5
AMD Radeon RX 6600XT
Fedora 40, Linux 6.12.7-100.fc40.x86_64

deft fiber
# small scarab is there any requirement for GPU or packages? i can't bake any lighting on GPU L...

No packages


    At least one GPU with OpenCL 1.2 support
    At least 2GB of VRAM dedicated to that GPU
    A CPU that supports SSE4.1 instructions

If the Scene
you are baking requires more VRAM than is available on the designated GPU, bake times can significantly increase. See Performance for information to help you reduce the time it takes to bake your Scene.

The Progressive GPU Lightmapper does not support OpenCL CPU devices.```
#

Which Unity version are you using? Older versions have more GPU baking limitations as well as bugs and some particular newer versions have bugs snuck in as well

#

For testing use a very simple scene, maybe even a fresh project
Mysterious hang-ups were often solved for me by updating GPU drivers

crude wind
#

To fix this, you can generate an extra row/column of triangles on each side of the mesh

#

Then you probably want to hide those triangles afterwards somehow... I don't remember how I did it

#

Another sane option is to just calculate the normals manually

small scarab
# deft fiber Which Unity version are you using? Older versions have more GPU baking limitatio...

Unity 6000.0.24f1, 6000.0.34f1

clinfo | grep OpenCL
  Platform Version                                OpenCL 2.1 AMD-APP (3614.0)
  Device Version                                  OpenCL 2.0 
  Device OpenCL C Version                         OpenCL C 2.0 
    Run OpenCL kernels                            Yes
  Device Version                                  OpenCL 2.0 
  Device OpenCL C Version                         OpenCL C 2.0 
    Run OpenCL kernels                            Yes
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Profile                              OpenCL 3.0

RX6600xt has 8GB VRAM, so i think gpu meets requirements
sse4_1 flag is written in cpu flags within cat /proc/cpuinfo command

i tried simple scenes built with just cubes and light, more complex, less complex and always result is the same

i even tried on new, clean Fedora 41 installation and without installing ROCm I get error that there is no OpenCL device on board.
I haven't tried with ROCm yet on the new system

edit.
after installing mesa-libOpenCL and mesa-libOpenCL-devel on the clean system, the version of OpenCL is 1.1, so it seems like I need to install ROCm

edit 2.
installed rocm-opencl, rocm-opencl-devel, rocm-clinfo packages from dnf repos
result in editor
Light baking failed with error code 2 ('LoadShaders' failed with exit code: 3).
okey. it seems like i haven't done proper installation

small scarab
#

edit 3.
And here we go again. I am right now in the same place as before. After installing full set with proper installation (https://fedoraproject.org/wiki/SIGs/HC) (rocm-opencl rocm-opencl-devel rocm-hip rocm-hip-devel)

and there it goes
and the remaining time is just rising

HC
night shell
#

how many objects are you baking?

#

usually the settings unity has by default for lightmapping isn't the best so it'll need to be tweaked to lighten the load

small scarab
#

my scene is literally just THIS
IT cant be too hard for this graphics.
it's just some random showroom from blenderkit

#

there is something wrong with opencl, idk what or why

#

there is only this in the scene

#

don't ask about scene's name

#

and I lowered lightmap resolution to 20 texels per unit

night shell
#

hmm try this

#

this is a personal tool I wrote a while back, unzip it and drop it in your project

#

it'll sample data from your scene and give you a basic rundown on alot of the things, but should help answer questions people might have here

#

i.e. for instance how many objects you are baking and such

deft fiber
#

Just in case you're not baking Realtime GI at the same time or have too high baking quality

#

Have you tried baking in a test scene that has only unity's primitives? The mesh you've shown would be quite a hurdle for the lightmapper

#

The lightmapper traces rays off of each texture pixel of geometry surfaces, bouncing off of nearby geometry while looking for light
That means angular and dense geometry is the worst kind for it

#

Also if the mesh doesn't have a lightmap UV map generated for it, it's possible the surfaces have a significantly higher number of texels than expected

languid blaze
small scarab
# night shell that looks fairly complex actually

if this is complex, then how do you think bigger maps are baked?
if it was just "complex structure" I would at least hear that my GPU is working.
but it's not. Anyway, if you've properly read my previous message you would have known, that I actually tried with just Unity's cubes and planes before and the effect was exactly the same

small scarab
#

and even if I go this ridiculously low on the settings, the effect is the same.
it just stops there and doesn't go any further

#

radeontop

#

and while being idle

#

and "not using complex mesh" doesn't change a thing

small scarab
small scarab
#

on the other hand CPU managed to bake even on default, pretty high settings this simple scene (time 1 min, 25 sec) and the "complex" scene was baked in 1 min 34 sec on CPU.
don't get me wrong but GPU would be propably faster soooooo

deft fiber
small scarab
#

and this is what is was talking about from the beginning
about packages or maybe way of installing them?

as I said I had to install rocm-opencl packages to make unity detect my gpu as opencl device

small scarab
#

and this is thing that I wanted to do, use light probes, as for example sky occlusion for good GI, but without gpu it won't work

deft fiber
small scarab
#

i meant linux packages

deft fiber
#

But maybe someone else does

small scarab
#

that's why i asked the question there

crimson raptor
#

Hello everyone, I hope all is well out there!
I would like to explain my problem so that you can find a solution to solve it. I'm having some problems with the light, when I generate the light in Unity, it blows up the entire scene, leaving the various assets completely dark, as well as the terrain, as you can see in the image. I've tried several things and still can't solve the problem. Any suggestions that could help me?

Thank you for your availability first of all.

deft fiber
crimson raptor
deft fiber
#

Baked lightmapping is basically a process painting new overlay textures for every object based on where light and shadow are

#

The drawback of this method is that it absolutely struggles when you have a lot of complex, organic meshes and tight and intersecting geometry

#

Especially rocks, trees and other foliage

#

Light probes are also a part of that workflow, which store lighting at points in space during baking which nearby non-lightmapped objects can then be lit by

#

Often in a scene like this trees and rocks are set to contribute to GI but receive GI from probes instead of lightmaps, because a good lightmap is usually unattainable

crimson raptor
deft fiber
#

They are basically necessary though

#

A large complex mesh like a cave might not work with either lightmaps or light probe groups

#

For that there are Adaptive Probe Volumes, which basically solve the trees and rocks issue as well as the placing issue
But it's a new fancy feature that might not perform or even work on all platforms

#

But it might be your best option

#

Also, reflection probes are an important part of baking lighting

#

It's also possible to get darkness in interiors with light probes without baking, which may be an option because you have so relatively little variety in lighting

#

But it's not really a supported option at all, more of a hack to write into light probe data directly

crimson raptor
full nexus
#

Just updated our project from Unity 2022.3 to Unity 6 (URP 14->17).. And the default reflection probe, or rather just using the current skybox for reflections seem to have stopped working. Trying to use realtime lights only, without any baking. Has anything changed that is non-obvious that caused this to stop working?

#

The skybox reflections work briefly while re-generating lights, even if all bake options are turned off. But once the process is done, it stops working again

full nexus
#

... Setting the Environment Reflections source to "Custom" and assigning a cube map works. But as soon as I switch to "Skybox" it just stops....

deft fiber
full nexus
#

And this is the lighting setup

deft fiber
full nexus
#

Yeah I tried that as well, same outcome.

deft fiber
#

It usually helps to find issues that are deeper in your project, and just some simple stuff you might have missed

#

Upgrading from 2022.3. to 2023/6 has broken my projects in some very strange ways before

full nexus
#

Works as it should in a new clean project. So the issue is something caused by the migration I guess.

#

Wtf. In the migrated project, If I create a new empty scene. Add a reflective sphere (same as previous). It initially works. But if I hit the "Generate lighting" button, it goes back to not working. ๐Ÿ˜ฌ

desert dawn
#

Hi guys just wanna ask, why does my game still has lights when i only enabled point light and disabled the directional light, what should i do?

desert dawn
#

i see thanks

tropic tulip
#

Hey, guys! I am experimenting with Light Probes right now and I have a question. So, when I am clicking the Light Probe Group I can't see the edit button there. I am using Unity 6 version of Unity and I am wondering if something has changed?

deft fiber
tropic tulip
#

Yes I found it

#

For one moment I was confused

#

It was in older versions at the component

spice dagger
#

i have 2 models, one for the walls and a slightly smaller one to put some grunge decal thing on top of it with a transparent texture, when i bake my lighting it looks normal but when i enable the decal and rebake makes the wall behind it wayy darker, ive got cast shadows disabled on the decal so i dont rlly know what to do

dusk ginkgo
#

why are my hdrp lights going through my walls? they are thing but are double sided with normals done right. I have an area light on the outside of each walll but it seems to just be in the cracks of the house. if you dont know what it is, and want to help let me know what youd like to see to help. but everything is pretty straightforward. Shadows are mixed, have been tested generated and unbaked. the range does go "through" the wall but shadows are enabled. let me know what you all think

neon verge
#

Anyone know how to fix these black chunks showing up after baking? This only happens on baked lighting realtime looks fine on this. Everything was made w probuilder

jolly skiff
#

is it possible to remove all shadows including self shadowing?

deft fiber
# jolly skiff is it possible to remove all shadows including self shadowing?

Conceptually there is no "self shadowing" so disabling shadows is the way to get rid of "shadows"
In addition to shadows lit shaders do also occlude light by distance and normal attenuation
To get rid of all that you can use an unlit shader as with no light there are no shadows
If you want light still seeming to bounce off of materials you could instead increase ambient lighting to illuminate anything that's occluded from direct light, or you might want a totally custom lit shader that does whatever you want

deft fiber
full nexus
#

In Unity 2022.3, you could change the skybox during runtime with RenderSettings.skybox, as well as RenderSettings.defaultReflectionMode then calling DynamigGI.UpdateEnvironment. Seems like this has been changed in Unity 6 (or sometime inbetween). Because reflections still retain whatever was there during authroing (which now requires us to hit that Generate Lighting button, that creates a pre-baked reflection probe)..
Is there any way to get the old behaviour back?

#

... In our case we dont use any prebaked lighting at all, just runtime created stuff. So using a static pre-baked reflection is not going to work.

dull zinc
#

i have this problem where the terrain unaturally glow at night.. how do i fix this?

scarlet geyser
jolly skiff
dull zinc
deft fiber
#

If the sky (such as the procedural sky shader) is modified at runtime, the changes are not saved to scene lighting
For that you are expected to use Realtime GI option and a realtime reflection probe
Realtime GI allows the scene probe to be updated at runtime automatically, even if you don't have any GI static objects for precomputing realtime indirect lighting the Realtime GI system is meant for

languid wagon
#

Hey guys, newbie here. I've recently migrated to Unity 6. I'm having a strange behaviour regarding Baked Lighting in Substractive mode.
Setup :

  • several lights, all "Baked".
  • 1 dynamic light attached to a character (e.g. a Flashlight). It's a spot.
  • there is NO directional Light in my scene
  • there is NO mixed lights in my scene
    I bake my scene in Subtractive, all is fine and well. All my static objects are receiving direct lighting from Baked lights and shadows are also baked for them.
    When I enter Play Mode, if I turn on my flashlight and point it at those static objects, I get a realtime shadow cast for them. I can see my shadow caster count going from 0 to something above 0 when I do this.
    I do not understand why, since I thought Baked Substractive mode did not provide such a feature.
    Has anyone an ieda why I have this behaviour ?
languid blaze
#

your realtime flashlight has nothing to do with baked GI

#

I believe it would be relevant for lights set to the "mixed" mode

neon hedge
#

Hi. Another noobie here. This chart has me confused as well because it seems like it's saying static objects should not receive light or cast shadows from realtime lights, but they do, so I must be misunderstanding what that means.

chilly kettle
languid blaze
#

I could be wrong about this -- but it just doesn't make sense for 100% realtime lights to care about baked GI at all

#

oh yeah, this is talking about mixed lights

#

So, in Subtractive mode, a Mixed light will have its direct lighting baked into static objects

#

There will not be any realtime light coming from it at all for any static object

#

Non-static objects will still receive real-time light from that Mixed light

quiet egret
#

Anyone know why its coming out like this? It doesnt seem like the probe volume is doing anything. HDRP. I am not using any actual lights, I would like all light to come from emission (so i dont have to manually place 117 lights).

quiet egret
prisma ferry
#

Was this removed?

prisma ferry
worn tapir
#

Hey, do anyone know any resources for Roughness only (no metalic) PBR that is cheap on mobile (quest). I use deferred so cant afford so many calculations.
only diffuse, specular and energy conservation needed (no fresnel unless cheap)

chilly kettle
worn tapir
#

most shaders break this after including specular

chilly kettle
#

Never heart of that.
I guess you will need a special shader

worn tapir
#

all PBR shaders have this

#

but at that point they try to solve the whole rendering equasion

#

I dont need that much

#

like fresnel

chilly kettle
#

well, when developing for mobile, the URP shaders should be enough for performacne reasons

worn tapir
#

I use my own custom SRP

#

Lets me rip out things I dont need

#

and then I can work in pure RenderPass workflow

#

better for deffered rendering

chilly kettle
#

sounds over engineered to me, but do as you like ๐Ÿ˜„ ^^

scarlet geyser
languid blaze
#

yeah, you need a lot of indirect samples

#

indirect light is a lot more...inconsistesnt? random?

scarlet geyser
#

it's not random

languid blaze
#

i mean the baking process -- it's doing path tracing, which is a stochastic process

#

hence why low sample counts look noisy

quiet egret
scarlet geyser
#

not because it's random

languid blaze
#

that's why you need more samples

quiet egret
#

Its also lighting up my entire scene, not just that room and only that room is set to static rn

languid blaze
#

I believe the idea of APV is to provide all of your baked lighting

#

notably, APV does per-pixel sampling of the probes, rather than per-object sampling, so you'll see many probes contributing to a single renderer's illumination

#

The only reason I haven't jumped over to APV is that I can't find any good way to sample them from a script -- I need that information for game logic.

Apparently it's only resident on the GPU. I wonder if a compute shader would be able to grab that info.

quiet egret
#

APV are good for getting light to hard to reach places i believe. Also seems that my problem was weird normals on my emission objects, and was sending light to the back of the walls, but fixing that seems to have fixed the light map artifacts.

#

My current baking is without APV rn, since i deleted it to test why artifacts were popping up

prisma ferry
#

I do not understand this.. It is a canvas tent.. the light Would leak., but they are showing the 0-leaks as the correct render

silk junco
#

dont know why/how my player has this surrounding shadow. Could anyone help me to remove this 'effect'?

#

This is my first time with lighitng settings and I think i messed it up

gleaming fox
slate seal
#

Does anyone know how to add shadows to the terrain?

slate seal
bold osprey
#

Does anyone know how to solve this issue?
When using Realtime GI for multi-scene baking, there is an extremely high spike in ENLIGHTENRUNTIMEMANAGER.SYNCRUNTIMEDATA during scene loading or unloading in the game.

slate seal
#

does anyone know how i can get better lightning for my game

crude wind
slate seal
#

it looks very flat

crude wind
#

Show a reference image of a game that you'd like to accomplish

slate seal
#

ok

#

search up finnish cottage simulator

crude wind
#

I know the game

#

For most realistic lighting you probably want to use HDRP. It's not too beginner friendly though

#

Ofc you can get good results with URP or builtin RP if you know what you are doing

#

The first thing sticking out in that screenshot though, is the lack of grass and other details

slate seal
#

yeah

#

ill try adding grass

broken ice
#

noob question, although I think I know the answers, as looks logical, I prefer to ask: In a building prefab, set as static, with mixed lighting... the door, as it need to be opened from time to time, needs to be non-static?

silk junco
deft fiber
languid blaze
#

There's not enough stuff to be lit up

languid blaze
#

what's the fastest way to make Unity pack lightmaps? I want to see how different padding settings wind up affecting UV overlaps

#

(and i also want to try measuring how much space different objects are taking up)

#

I'm trying baking GI with 1 sample per texel, but it's still taking a decent while

#

I guess I need to turn off all of my light probe groups

#

related question: how can I get a list of every renderer with UV Overlap problems?

#

You get a warning that lists some object names, but...I have a lot of objects with those names

prisma ferry
languid blaze
#

I was also thinking of ideas for faking transmission

#

(i didn't think too hard, mind you, but i was thinking!)

#

For something so thick and opaque, I'd bake a map that's used to add emission to the material

#

since it's going to be a very diffuse source of light

silk junco
rough spire
#

I keep getting the error: โ€œLight baking failed with error code 5.โ€ On the latest editor version, does anyone know a fix?

rocky peak
#

Sometimes I tell Unity to autoadd some UVs, but depending on the geo, I then have to tweak it so I don't have UVs crossing and all that good stuff

proud bramble
#

Did anyone else APV lighting break in the new Unity 6 update (6000.0.35f1)?

proud bramble
#

The APV component is empty and the APV section in Lighting tab is empty in 6000.0.35f1. I reverted back to 6000.0.34f1 and everything is back to normal.

deft fiber
unique yarrow
#

what is causing this blocky baked/ mixed lighting

languid blaze
#

Perhaps you have lightmap UV issues

#

Try switching to the UV Overlap mode. It's in this big dropdown

unique yarrow
languid blaze
#

okay, so that's an issue, but it's probably not causing those large blocks

#

I wonder if you're getting any problems from the lightmap UVs not fitting into your lightmap texture

#

That's probably why it's having overlap issues

#

Shrinking the lightmap UV reduces the margin (measures in texels)

#

What are you current lightmapping settings?

languid blaze
#

I'm looking to improve lighting on this concrete hallway. On the left in the first image is the original design: a sharp 90 degree corner. On the right, I've slightly beveled the mesh.

I like the result, but this makes combining these hallways together much more annoying. I'm using PoseidonCSG to carve holes in them. The second image shows an example of this...

I can get around that by making my hallways overlap a bit, but that then causes some annoying thin bits of mesh that, ironically, cause additional lighting artifacts!

I was thinking about cutting edge loops in the hallway and then just giving them custom normals -- so, there would be no actual mesh deformation.

Any thoughts on this (or other approaches)?

languid blaze
# unique yarrow

I remember having very weird blocky artifacts like yours before. I just can't recall what I did to fix it

#

One thing I'd try is completely turning off filtering. It's on "Auto" right now; switch it to "None" and see what you get

#

(I wouldn't suggest leaving it off permanently, but you can see if it's relevant)

#

Tangentially: If you're going for very "soft" lighting with lots of broad light sources, you could get away with a much lower lightmap resolution.

unique yarrow
languid blaze
#

In the "Baked indirect" mode (which is what's being used here, since "Shadowmask" is not supported), a mixed light only contributes indirect light to lightmaps

#

So it's possible that you were getting weird artifacting on the direct light

#

That's...the opposite of what I'd expect, given that direct light is a lot more consistent

unique yarrow
#

ah wait nvm they are still there but less visible from the other lighting

deft fiber
languid blaze
deft fiber
#

That's always going to be a problem, more or less

languid blaze
#

true; it just means the seam will jut out slightly from the intersection

deft fiber
#

Since you don't have access to APVs yet I presume

languid blaze
#

although, I can configure which model "wins", so that the seam winds up like this

#

(this image is not an example of the seam jutting out. oops)

languid blaze
#

I'm probably going to add metal frames to these intersections to cover up the seams

deft fiber
#

It might be necessary to model the halls by hand in blender, so you can guarantee continuous UVs for level geometry

#

Or at least unwrap

languid blaze
#

I imagine that the discontinuity is the problem here

#

well, there'd always be a discontinuity if they're two separate models

#

but they also have different scales (the right hallway has been scaled to make it longer)

deft fiber
#

Do they have to be separate models or could you join them into one

languid blaze
#

I definitely can't just make a big model in advance. I'm building a pretty large maze of hallways

#

being free to move things around is important

deft fiber
#

Move around at runtime?

languid blaze
#

Nah

#

It's just a lot easier to lay out the level when I can freely arrange the hallways and rooms

languid blaze
deft fiber
#

If you create the lightmap UVs by hand and precisely line them up with the texel grid without any stretching then I guess maybe this seam issue should be dealt with?

languid blaze
#

Maybe. I should see if that actually works out

deft fiber
#

Bevels will always be a problem though, for any kind of continuous UVs

#

Would be interesting to see how the normals only bevel works in your case, even if it likely creates some curious looking problems

languid blaze
#

The sharp corner is really sticking out now that I'm adding lights that shine down on the floor

#

I somehow did it backwards. Incredible.

nocturne wigeon
#

is there a simple way to get a more stlized look with lighting without needing a complicated custom lighting shader, I want to make my current scene look more stylized. would hand painted textures look good for this?

dawn pawn
nocturne wigeon
dawn pawn
deft fiber
#

Post processing shaders, material shaders, texturing methods, lighting methods, even just texturing and lighting choices can make for a "stylized" look

timber lichen
#

having bit of trouble with 3D models having too much shadow on them, even if I turn off the cast shadow, it still has lot of shadow on it

unique yarrow
deft fiber
timber lichen
deft fiber
#

I don't recall if the slider controls the intensity of the ambient light, or the intensity of the occlusion
If it doesn't get brighter by lowering the slider, you may need a lighter texture
Or just remove the texture to see if that makes the shadows go away

#

How dark shadows are depends on ambient light level
Ambient occlusion methods occlude parts of a surface from receiving ambient light

timber lichen
hot lake
#

Hey guys!

#

I have trouble understanding this:

#

This is my only mixed light. All others are either realtime or baked.

#

There are 2 realtime lights in the scene.

#

Why would there be an overlapping problem if almost all lights are baked? Isn't it just an applied texture?

#

(for now I just changed Shadowmap to Baked Indirect, but I still would like some info about what I could've done)

timber lichen
deft fiber
#

I wouldn't describe those shadows as a default look
Another thing to try is to make a new totally default material and assign it to it

#

Some shadows might be on the texture itself

deft fiber
#

It's not an issue unless you can see shadowmasks not work correctly after baking

hot lake
#

It's strange because I did big project last year, with Shadowmap, and had never seen this problem

#

oh ok

#

maybe a buggy infobox from Unity 6

#

The big project was in Unity 2021.3.12f1

timber lichen
deft fiber
#

Shadows take the color of ambient light, those areas are darker than ambient light which you can see in any other shadowed part of the mesh

#

So I'm 90% sure it's still ambient occlusion of some kind, whether baked, post process or some other type

#

If the black occlusion appears on a pure default material, and the black* shadows seem to shift when the model is rotated in view, that would confirm it's post processing

timber lichen
deft fiber
#

Unless you see something wrong with the solid white one

#

In its case the shadows are no darker than the ambient light

timber lichen
deft fiber
#

Normal is relative but in that case it has no shadow besides directional attenuation from the light source, and ambient light illuminating it evenly

#

Ambient light is why the shadowy side is bluish rather than black

#

If the base texture has AO shadows baked in as it seems to do, those parts of the material will be darker regardless of light

#

If the occlusion map also has shadowing for those areas, they'll be occluded from the ambient light so they'll be about twice as dark as they should be

#

Post processing AO would add a third layer of shadowing into the same tight spaces

#

So, since the extra shadows are baked/painted on the texture, you can't get rid of them without manually un-painting them

#

But you can at least make sure to not have even more extra shadows from post post processing and the occlusion map

#

Receive shadows option or shadow casting in general is not related to this

timber lichen
# deft fiber So, since the extra shadows are baked/painted on the texture, you can't get rid ...

ok I see now, so the texture does have darker spots on it, you mean with baked that it is painted on the texture?

so if the occlusion map is brighter, the shadows or darker spots on the texture will also be brighter and therefore also in the scene?

it also looked bit dark without the occlusion map in the material, only by using the normal texture map, so maybe the occlusion map is causing issues? as changing the ambient occlusion in the post proccessing settings, changes the whole scene which I would prefer to avoid haha

languid blaze
#

The ambient occlusion map blocks ambient light (as the name implies)

#

So it doesn't do anything if you shine a light directly on a surface -- but if the surface is only lit by ambient light, it causes that area to become darker

#

(a black pixel in the AO map means that ambient light is completely blocked)

#

It looks to me like the base texture had ambient occlusion baked into it. This is incorrect -- the base map should be strictly the albedo of the surface

#

which is the color you get when you shine a light on it

languid blaze
#

that's screen-space ambient occlusion, which estimates the effect based on surface normals

timber lichen
#

ok slowly understanding the situation, so the correct way of the base texutre is removing the dark spots which are called ambient occlusion and only include the actuall colors of the character

and the AO map will take care of the shadows of the mesh which will then ignore the ambient light?

couldn't find the settings for screen-space-ambient occlusion

deft fiber
languid blaze
#

I'm just guessing here -- but that grainy look on the base texture looks a lot like baked AO

#

Actually, it exactly matches the AO map

#

lol

#

So you've wound up double-dipping on the ambient occlusion (and the darkening of the base texture means that even direct lighting gets darkened)

deft fiber
timber lichen
#

ok so the problem was that the person included the shadows in the base texture and also in the AO map which caused the character to have doubled the shadow intensity

languid blaze
#

Right.

timber lichen
#

alright, so guess removing the shadow on the base texture will fix the issue hopefully

deft fiber
timber lichen
#

I think I understand the situation, thanks for the support from both of you, now I can tell the artist to fix this

icy tundra
#

The ao-in-albedo is pretty common in stylized and low target hardware games, so it really is a matter of workflow.

nocturne wigeon
nocturne wigeon
honest folio
#

sliding over here to work on the issue-

kindred sedge
honest folio
#

OH

#

THAT DID IT

#

YEAHHH

#

TY TY TY

#

I CNA SLEEP TONIGHT

kindred sedge
#

it had nothing to do with the code ๐Ÿ˜ญ

honest folio
#

sobbing

#

im so new to it i thought i messed up the code

solar stratus
#

just did the adaptive probe volume light generation

#

now looks like crap

#

i kept the lights in mixed and static even the objects.

#

althought i though baked lights would also work but gave same result after backing

deft fiber
#

Looks pretty funny
If I had to guess your scene is brightly lit but dimmed by volumetric fog
Baking afaik cannot account for fog

#

Unless there was some extra setting for it

merry echo
#

Is their a way to make the lines in urp 2d light freeform smoother, i use fxaa but it style their

hot lake
#

Hello!

#

Any idea what might cause this light bleeding? (everything is baked)

#

(the one on the ground & on the edge of the left wall)

#

Here are the lightmapper settings

atomic cypress
#

I am trying to set up baked lighting in a scene in Unity, but for some reason it makes some parts of my material look very pixelated. I checked the color map and the way it looks in Substance Painter, but in there, it's not pixelated at all. Does anyone know what can be causing this issue?

languid blaze
#

This reminds me of a problem I saw earlier..sec

#

starting from that message

sturdy narwhal
#

i made a closed off room with the default cube but there is shadows being cast inside of it?

#

the platforms inside the cube also cast shadows? but they are in a closed environment, i dont understand how the sun is earching them

atomic cypress
# languid blaze starting from that message

I follwed all those steps, but unfortunately, this did not fix it for me. My lighting quality (project) settings were also already at high quality. When I bake lighting in a different scene with the exact same settings, but different meshes I don't have this issue.

#

I also checked all the exported texture maps from Substance Painter to see if I can find any of the pixelation in there, but they look totally fine

atomic cypress
#

I just put the mesh and material in a prefab, and the texture also looks pixelated in here, but it doesn't in the export png file?\

deft fiber
#

Kinda looks like it's using point filtering

atomic cypress
#

So putting that to none fixed it

atomic cypress
deft fiber
#

I'd first check that filtering is bilinear or trilinear and that mip map generation is enabled

#

If sRGB option is enabled and it's a non-color texture, it may be getting gamma corrected unnecessarily which can "stretch" the effective bitrate of the texture, highlighting banding at the high or low brightness areas

atomic cypress
#

Thanks a lot!

deft fiber
# hot lake (bump)

Most commonly because the same lightmap texel reaches both sides of the wall

hot lake
deft fiber
hot lake
#

Hmm I think I see, this has more to do with the ground itself? Should I increase its "scale in lightmap" value?

deft fiber
#

You might be able to fix it by increasing lightmap resolution and/or the floor's scale in lightmap property, and/or thickening the wall

hot lake
#

Ookok thanks! I'm starting to get the hang of it haha

deft fiber
#

If the floor geometry did not exist under the walls, that'd eliminate having to deal with the partially occluded texels at all

#

But it's not always feasible to customize all floors to contour every wall

hot lake
#

Oh I see

#

Maybe I could try finding a script that does that if other solution are not enough

deft fiber
#

Usually it's something you do from the start in the modeling process

deft fiber
#

@last ivy What's the word on Shader Graph Production Ready Shaders and Feature Examples?
It's kind of tricky working with them since the Production Ready node Lit shader only allows specifically for changes that resolve in the PBR master node, while the Feature Examples custom Lit is missing a lot of features and has some weirdness in it (like substituting light probes with the reflection probe, but not doing any probe blending)
It becomes kind of a maze to plan around what's possible and what's not without having to reverse engineer the lit shader itself

#

And currently it seems that'd be necessary to do to get a shader that has a custom light ramp, and which utilizes APVs
Like a snow flake or dust mote shader might
I guess this could've gone into #archived-shaders

last ivy
#

Hi Spazi. I'm not very clear on what you're asking. If you're hoping that we'll make one shader that does everything and is perfect for everyone, well - we're not planning to attempt that. The reason is that every project needs something different. Some projects want to do lighting as cheaply as possible. Others want to be as realistic as they can. Each shader needs to accomplish specific goals. The purpose for Shader Graph is to give artists the flexibility that they need to be able to create shaders that fill a wide range of goals and performance requirements. The Custom Lighting example we provide demonstrates that it's possible to create your own custom lighting model. We didn't intend for users to take it and use it directly (although you can if you want) but rather to learn from it how to achieve specific effects - such as allowing your custom lit shader to receive shadows from the rest of the scene.

#

If there are features missing or something else you hope that we'll demonstrate in future samples, please let me know.

unique yarrow
#

why are all my walls fine apart from this one wall which is so dark, I have a feeling its because the direct lighting comes from that direction but im not sure why its causing it (apart from some artifacting square patchy look which ill look into fixing)

deft fiber
#

Hi Spazi. I'm not very clear on what you

deft fiber
sturdy narwhal
#

what does this mean and why do i suddenly get this, didnt get it for weeks, something has changed and i dont know what why or how?

deft fiber
sturdy narwhal
#

so i have to many shadow casting light sources? why is this a debug and not a warning msg its cluttering my log :( ill try increasing atlas size but i think 4k still gave me the "warning"

deft fiber
sturdy narwhal
deft fiber
sturdy narwhal
#

i made a closed space with cubes, inside that area i have more cubes, and they are casting a shadow, but there is no light inside that closed off space

deft fiber
languid blaze
#

the walls are partially (or completely) failing to cast shadows

hallow rampart
#

Anyone know a good tutorial for adjusting my global volume to look like a horror themed game?

languid isle
#

Why is my stone at the one side so much darker then the rest and how can I fix that?

deft fiber
nocturne wigeon
#

I tired to make a more stlized lighting for baked lights, I tried my best lol (origianl is on left)

#

does it look more stylized to y'all?

dusty nymph
#

im trying to bake APV but i just keep getting this:

UnifiedRayTracingException: Can't allocate a GraphicsBuffer bigger than 2GB

What causes that?

#

can i not do terrains?

hollow stag
south dragon
#

the lighting on terrain doesnt work ingame, it looks so bad, i literally cannot figure out why it doesnt work and im about to give up. it works completely fine on a higher quality setting. ive tried different baking methods, changing to baked only lighting, changing light strengths, ect.

#

ingame^ vs editor

#

the thing is the editor is on that quality setting as shown ingame but it doesnt look the same

#

i know whats up with the blurry gravel i fixed that already

celest robin
raven flower
#

check your Universal Render Pipeline Asset and adjust your shadow-settings. Specifically the max distance for the shadows. I'm assuming that's where the issue is.

#

keep in mind this will reduce the overall quality of shadows. So use shadow cascades to tailor them for your game.

celest robin
#

Built In

#

And yeah, I already fixed it

karmic marlin
#

two questions:
Why is my spot light not working
how do i make the game super dark

dawn pawn
karmic marlin
dawn pawn
languid blaze
#

(which might depend on your quality settings)

karmic marlin
dawn pawn
#

Where the additional light value can be changed

karmic marlin
#

y or n

languid blaze
#

you want this section of the Project Settings

#

notably, I have a pixel light count of 8 set here

#

(oh hey, this is relevant for TinyGreenSlime's question, too)

karmic marlin
languid blaze
#

ah, this is URP, so you'll need to look at the render pipeline asset

#

but to make sure -- if you make a new, empty scene and add two objects:

  • Point Light
  • Cube

the point light never lights up the cube?

karmic marlin
#

let me see

#

gtg

#

when im back ill tell you

#

im back

karmic marlin
languid blaze
#

I'd fully expect it to work in a new project

#

I'm interested in what happens in a new, empty scene in the existing project

karmic marlin
karmic marlin
languid blaze
#

You may have changed the settings on your URP asset (or its Renderer) in a way that broke realtime lighting

karmic marlin
#

where is the urp

languid blaze
#

Those quality names are the defaults for a built-in render pipeline project

karmic marlin
#

huh?

languid blaze
#

wait

#

oh, whew, I thought I screenshotted my own project settings haha

languid blaze
# karmic marlin huh?

Did you install the Universal Render Pipeline package into this project after creating it?

karmic marlin
#

no

#

as far as i know, nope

#

how do i see if i did

languid blaze
#

Each quality level references a URP asset. You can click once on it to have it highlighted in the project window

karmic marlin
#

huh?

languid blaze
#

That "Performance URP Config" asset contains a bunch of settings for how rendering works.

karmic marlin
#

i think i have it

#

I DID IT

#

this was disabled

languid blaze
#

Ah, that'll do it

#

That may have just been the defualt for the mobile preset

#

I don't do 3D mobile work, so I don't know how impactful an extra per-pixel light will be

karmic marlin
#

its vr

hallow rampart
languid blaze
#

Too many realtime lights are hitting each renderer

#

(or too many mixed lights)

#

the exact behavior will depend on the baked lighting mode (shadowmask/baked indirect/i forget the third one)

polar thicket
#

I don't understand how people set up area lights. How am I supposed to see what I'm doing if they need to be baked to appear? (Unity 6, URP)

dense spruce
#

hey how can i make it so that the shadows looks good even from afar in hdrp?

#

shadow from afar:

#

shadow close:

inner seal
#

Why do the baked lighting look so weird here on splines with the spline extrude component, specifically on the areas in shadow?

inner seal
#

bottom looks like this

languid blaze
#

I'm unclear what exactly is wrong -- it looks like you've got some very strong ambient occlusion in between the wall and the pipe, but that's expected

inner seal
polar thicket
polar thicket
#

Wait so sincerely, the BEST way Unity has to handle area lighting is just.... guessing?

#

I'm sorry I have to double down and ask again - surely there's a way of actually working with area lights professionally in unity?

polar thicket
polar thicket
#

I was helped in another section of the Discord but I am still learning about lighting so I am still open to tips. Thank you.

inner seal
scarlet geyser
dense spruce
#

Hey why are my urp shadows pixelated? I just made an empty project, put 2 cubes, and the projected shadow is very pixelatdd

#

I did not tweak any of the settings

#

They are the default settings

#

Yet I have pixelated shadows

hallow rampart
deft fiber
dense spruce
#

Ah yes ok ๐Ÿ‘Œ

deft fiber
#

"Default" in what sense?

#

You have choices with tradeoffs
Baked light is cheap, but the workflow requires the baking process
Dynamic shadows are always expensive, but responsive

#

Ray tracing is definitely not your first choice
It's usually only for when you want the maximum possible visual realism

#

It works on top of all the other lighting features

#

Unity has no true realtime GI system (unless you count path tracing but it's not viable for realtime applications)

#

It has very typical raster renderer lights, via forward, deferred and forward+ rendering paths

#

The lightmapping system allows for baking those lights into lightmap texels and light probes to skip realtime calculations

#

There is the Realtime GI option as well
It's not truly realtime because it has to be precomputed onto static objects and probes, but for them it is as good as dynamic and supports indirect bounce lighting

#

If can extend the system pretty far if you have the know how
Cloud shadows could be handled as a separate light calculation step in a custom shader

#

Sure
Silly question indeed though

#

Your understanding of the tech and ability to optimize matters way more than the choice of engine

#

Unity in my experience goes a long way in making that process easier for you, compared to other engines

#

For example it has many automatic batching options that work for you even if you don't understand them at all

#

Regardless of what you pick, the important part is to learn how to do performance analysis and how to optimize graphics in general but specifically for that engine

#

If I suddenly lost my experience, I'd probably want to begin again with Unity anyhow

#

The others seem harsher against those who don't already know the ins and outs of graphics

#

But I'm sure they can reach basically all the same graphics and performance in the end, within the scope of what independent or mostly independent devs can make anyway

#

All you can do is the most research you can, really

polar thicket
#

I baked my lighting in my scene. My scene's lighting is as follows:

10 spotlights (baked)
Environmental light (baked)
1 directional light (real-time)

Why is my lighting in my build different than my lighting in the editor? Here is my lighting in the editor (looking how I want it)

#

And here below is the lighting in my build: everything seems somewhat darker and shadows look very dark black...

#

I discoveered, the bottom picture - the way the game looks in build - is how my game looks without spotlights. What is going wrong?

deft fiber
#

Pitch black shadows in build is a symptom of lighting not having been baked for that scene

#

You say you did bake it, but I have not seen it be caused by other things

#

With multi scene setups only the Active scene's lighting settings are used

polar thicket
#

I believe you - I'm an amateur at this and baking clearly confuses me. Can I walk you through some observations I've made and my process?

#

I've just cleared my lighting data and I'm going to start over. In my inspector, I'm showing one of the 10 near-identical spotlights. I'm going to click "Generate Lighting" now to bake the spotlight and environmental lighting.

#

Now I'm baking

deft fiber
polar thicket
#

Same results with my 2nd bake. I am interested in looking into Contribute GI static. If it isn't that I have another potential factor.

deft fiber
#

It's unnecessary and can make all baked lighting look worse since they have to share that lightmap space

polar thicket
#

So in other words, my static objects should probably all have this "Contribute GI Static" flag.

#

Shelves, walls, floors

languid blaze
#

note that you can contribute GI whilst still receiving GI from light probes

polar thicket
#

I am not consciously using light probes

languid blaze
#

and if the props don't contribute GI, they won't darken the shelves

deft fiber
#

Yes
For best bake quality and performance keep small and dense objects as not contributing to GI
If they need to cast baked shadows, then they can contribute to GI but receive GI from probes, as mentioned

languid blaze
#

(so, they'll be uniformly lit no matter where they are)

polar thicket
deft fiber
#

But that's unlikely to be the main problem here
Just something to improve your life

polar thicket
#

I appreciate that

languid blaze
#

i'm also grappling with that question right now

#

i'm not sure i want to lightmap 300 barrels

polar thicket
deft fiber
#

Can you show the Environment tab of Lighting window?

#

Black shadows imply the area is not being lit by ambient light which should generally be there

#

Oh, are your materials using a custom shader?

polar thicket
#

So it seems like the problem is coming down to my spot lights not being baked in my final game.
Observations:

When I remove the spotlights from the scene in the editor, the lighting remains the same. I think this is the expected behavior since I intended for the spotlights to be baked.

However, whether enabled or disabled, the spotlights are not appearing in my final build

polar thicket
#

And there is one thing I think you should know also

#

Here is where it gets complicated.

Some of the shaders were creating many variants, like 38k variants.
I removed a bunch of lightmap modes in Shader Stripping.

Was this the wrong choice?

I think it was producing so many shader variants that it was "crashing" my shaders/materials. I was seeing pink textures instead of the shader. It seems like clicking "Import From Current Scene" solved the problem, but it unchecked every lightmap mode.

Next I will show you my Environment Tab of Lighting Window.

#

This is the Environment Tab of the Lighting Window

deft fiber
#

Baked Directional and preferably Baked Non-Directional can't be stripped if you want them to show up in build

#

That seems like a likely cause

polar thicket
#

Okay, noted. I have questions on how that works.

#

My question is: What about baked shadowmask? Please look at my Scene tab in the Lighting Window. Lighting mode is set to "Shadowmask". Is this relevant?

deft fiber
polar thicket
#

interesting. that may indeed become relevant later. Let's not get too off focus here but I do want the shadows that cast from my Directional light onto the floor from the shelves to be baked, but I want that same Directional light which casts a shadow from the player character onto the floor to be realtime.

#

I wonder if I would accomplish that by setting my directional light to "mixed", since my shelves are static and my player character is not.

languid blaze
#

that would require a Mixed light source and...probably Shadowmask or Subtractive modes?

#

Baked Indirect doesn't bake any direct contribution from mixed lights at all -- it's all realtime

polar thicket
#

Interesting and confusing. Obviously I need to research how these things work but frankly I've watched many Unity videos on lighting and they only seem to scratch the surface. I think I will put that goal to the side for now (the mixed lighting) and for the time being I will focus on solving this problem.

#

here is my new shader stripping preferences. Let's see what happens when I bake. My concern is I will see the errors relating to too many shader variants again. We will cross that bridge if it comes.

languid blaze
#

you won't get random errors from "too many" shader variants (it just makes the build take forever)

#

An error shader in the built game means that a shader wasn't included at all

polar thicket
languid blaze
#

(or you've enabled strict shader variant matching and the exact variant wasn't included)

polar thicket
#

I will update you helpful people when this new bake is complete.

#

My friends

#

I am proud to announce our success here today

novel silo
#

I have somehow made a terrible mistake. When I bake lighting, it now does/looks like this. I have tried reverted to the default lighting settings in the scene, same result. Please help T_T

deft fiber
# novel silo I have somehow made a terrible mistake. When I bake lighting, it now does/looks ...

Which Unity version are you using and do the materials use custom sahders?
I don't remember exactly what causes this, but there's a few things you can try
Bake with importance sampling enabled
Bake with directional mode as non-directional
Bake with seam stitching disabled for offending meshes
Bake with lower resolution
Bake on CPU instead of GPU
But also I'd do a test bake in a new scene with default cubes only, then another with some of your custom meshes included just to see if it would stop occurring

languid blaze
#

It looks to me like you have extremely messed-up lightmap UVs

#

Check out the debug views (you might see a slightly different dropdown in older vesrions of unity, but it'll be in the same place in the top-right of the scene view)

low tusk
#

anybody know how to get lightmaps working on visionOs / Apple Vision Pro? Documentation states : Only static directional lightmaps with dLDR encoding are supported. I am using the polyspatial lighting node but its only showing light mapping in the editor not in the build

south raptor
#

Working in 6000.0.36f1 HDRP
My Adaptive Probe Volumes are blank in the inspector and I don't know why. I've set Adaptive Probe Volumes to enabled for Graphics -> Frame Settings -> Lighting and Graphics -> Custom or Baked Reflection -> Lighting

I've set the Sun to a Mixed lighting & have set the lighting system to adaptive probe volumes in the HD Render Pipeline Asset. Feel like I'm missing something.

languid blaze
#

something has broken in the probe volume's editor

#

it's trying to fetch a method via reflection and it's failing to do so

#

I'd restart the editor and see if it clears up

south raptor
#

Something was whack in the FrameSettingDisabledHelpBox function I believe.

languid blaze
#

ah, it's a very recent breakage

novel silo
languid blaze
#

That's kind of unexpected...

novel silo
#

super unexpected. I still feel like there's an issue with something and unchecking that box is like a bandaid. What does importance sampling actually do?

languid blaze
#

Importance sampling tries to reduce the sample count in areas without a lot of detail

#

Enable this to use multiple importance sampling for sampling the environment. This generally leads to faster convergence when generating lightmaps, but can lead to noisier results in certain low frequency environments. This is disabled by default.

#

I've never seen it have this wild of an effect

novel silo
#

I don't even remember enabling it ever at any point, but I guess I must have

languid blaze
#

I wonder if you have a really weird world scale..?

#

i'm trying to think of why it'd decide "ok, time for ONE SAMPLE!"

novel silo
#

Well nothing in the scale has changed since before this issue

languid blaze
#

I've tried toggling it on and off without any visible effect before

novel silo
#

I guess I should shut up and be happy my lighting now looks fine hahah

languid blaze
#

โœจ

#

Did the bake take much longer without importance sampling enabled?

novel silo
#

I didn't notice a difference

#

time-wise

deft fiber
#

Which specifically seem to be NaN propagation

#

So they're likely not "supposed" to happen
Unlike say invalid texels which have a purpose

languid blaze
#

I do like blaming NaN

#

That's such a weird result..

deft fiber
#

If bloom were enabled those black and white areas would basically explode, I expect

languid blaze
#

i think it is enabled

novel silo
#

Yeah bloom is enabled, the bright spots were like suns lmao

languid blaze
#

Is this a publicly available asset? I'd be interested in reprodiucing this

#

I'm trying to get a better handle on weird lighting problems

novel silo
#

No it's a world for vrchat that I've been working on for a while on and off. 90% of the materials and lighting etc is custom. The only thing in the pic that wasn't is the model for the bed and string lights but with custom materials.

languid blaze
#

ha, I'm also working on a VRChat world right now

#

i'm just struggling with seams; no nuclear explosions

#

If you can recreate the problem in a new scene that contains just one or two objects, that might help understand what's causing it

novel silo
#

I'll test that right meow

#

Test scene does not explode

novel silo
languid blaze
#

if you have version control set up, I'd start randomly deleting chunks of the world until the issue stops popping up

#

i do love doing binary search

novel silo
#

I do not have that, it good? Me get?

languid blaze
#

version control lets you track changes over time

#

it means that, if you do something dumb, you can just go back to a checkpoint

#

I use Git for everything. I can't imagine working on complex stuff without it

#

I've used it to go back and figure out when a problem showed up in one of my avatars

deft fiber
#

For reproducing it my hunch is the prime suspects are custom shaders and/or the sky as ambient source

flint root
#

Hey guys! I need some help (sorry if this isn't the right channel). I have a directional lighting object that I'm using as the sun as well as an object that I imported from blender as an STL file. I guess my questions would be:

Is there any way I can change the color of the shadow that the sun casts on the object?

Is there a way I could produce a color map on the surface of my object based on the position of my sun using raycasting?

novel silo
mellow radish
#

Hey, I have very little experience with lighting.
I use simple models+point lights to create torches and candles.
It works fine for the most part, however, when I bake lighting I get really weird shadows from exact same prefabs(pic1).
At first, I thought it was the light source being too close to the model(although it should happen on both then, no?), so I moved it up quite a bit, as can be seen w gizmos(pic 2).
Another thing that's odd is, even tho both light settings are exactly the same and I just baked, the one I am showing the inspector of is overriden by baking whilst the other is not(pic3).
My lighting settings can be seen on picture 4.
Picture 5 showcases a similar problem with candles.
Could somebody please help me with this?
Thanks in advance and please @ me when replying.

void urchin
#

Why cant I get lights to do anything? None of them seem to have any actual effect on the scene. I'm using URP if thats important

deft fiber
deft fiber
void urchin
#

I am going to be using 3D assets in the project, so how can I change the project so it no longer uses Renderer2D?

#

in the past I'd just make a brand new project to skip needing to worry about changing everything, as a new project already is preconfigured, but its a really inconvenient way to do that