#archived-lighting

1 messages · Page 2 of 1

deft fiber
#

Outside of shadow distance nothing can stop sun shining in the ravine, so the appearance changes
You can change it in project settings > quality

#

Texel invalidity and/or lightmap UV overlap

timber lichen
deft fiber
#

Well, the fixes aren't difficult by any means but you still need to diagnose the problems properly

timber lichen
#

I see, thanks!

winged tangle
#

realtime GI

chilly kettle
winged tangle
#

i'm reading now that unity's "realtime GI" is still basically baked GI, except now that your light sources can move around. your scene objects must still be static 😦

livid jetty
#

the shadow seems to be going onto the wall but also through it..?

#

the wall is about 0.3 units thick - is that just too thin?

chilly kettle
livid jetty
chilly kettle
livid jetty
#

just click on it and you know what I'll show you

livid jetty
#

set cast shadows to off

kindred harness
#

How to control baked shadow intensity ? My shadows are too dark at some places

kindred harness
#

I don't understand why the mixed light shadow strength doesnt change baked shadow intensity

#

I could use a 2nd directional light but I feel like this should be possible to be handled some other ways

chilly kettle
deft fiber
# kindred harness I don't understand why the mixed light shadow strength doesnt change baked shado...

Because it's a setting under realtime shadows
As Kjarudi said you have to in some way add light where you want there to be light, as the baking process starts with a dark scene and simulates light rays in it
In addition to shadowless (realtime) directional lighting the other options are to give every material their own base color as an emission map with low intensity, or to manually brighten the ambient lighting via probes or cubemaps (a bit tricky if you don't know how the system works)

broken bone
#

Hey everyone, is there a way to darken this room entirely while keeping my directional light?

deft fiber
broken bone
#

thank you

thin mason
#

Hi all, is anyone available to hop into a VC suuper quick to help me figure out how directional lighting works in an enclosed space? My lights only work when set to realtime and I'm not sure what is causing this

#

oh... are there no VCs in this server?

thin mason
#

I'm a lighting noob: why does my spot light only work when the mode is set to real time and not when baked?

I'm reasking this because baking the lights using the lighting interface didn't work

dense minnow
#

How would I go about fixing my shadows? This is the only place they look like this (URP)

#

I fixed it by lowering the max distance of shadows

#

Im assuming it just made the shadowmap or whatever able to have higher quality because it could increase the size of faces in it

#

well, thats my guess

deft fiber
#

(or at very least contribute GI static)

deft fiber
#

Cascades let you divide the resolution into regions over distance, so you can have higher resolutions up close and lower resolutions far away, which ideally means you can have a larger shadow distance and visually higher resolution up close where it's needed the most

thin mason
deft fiber
#

Those sample counts are really overkill
I recommend creating new lighting settings asset to reset to defaults

thin mason
deft fiber
thin mason
#

It still says "No Lightmaps"

deft fiber
#

You should see a progress bar near the button

#

And a warning in console if something's off

#

Note that the level geometry needs to be contribute GI static as well, obviously

thin mason
dawn fog
#

I'm tryin to bake a simple wall/window onto a ground plane shadow map, but I'm getting this obnoxious noise on the lightmap. Any ideas what is going wrong?

dawn fog
#

Oh nvm, I think it's a problem with the GPU version... damn the CPU is so damn slow.

kindred harness
olive parrot
#

how do I access HDRP light intensity multiplier in C# script? If I change the light.intensity it ignores the value set in inspector. I want to set the value in inspector using units like lumens, and then control the intensity multiplier using script to flicker it.

crimson gulch
#

Hello, I have a light/shadow question.
As you can see in my screen, I have a "saturn like" planet with a ring.
The sun in the middle is a light, and you can see the shadow on the planet.

My question, how can I get the light through the ring and not blocked?
As you can see on the screen, on the outer side the ring does not receive light

Thanks !

deft fiber
#

Some leaf/vegetation shaders have a similarly desired effect of duplicating the light hitting one side onto the other side

#

But it's kinda complex stuff in any case

bright rune
#

I'm getting this weird lighting, It is supposed to be unlit and yet it's gone buggy
Edit: My Temporary Fix is to turn off Shadows for the Sun

bright rune
timber lichen
#

I'm trying to get an emissive material to light up the surrounding area, it's not working even though I turned on Realtime GI. The material itself glows, but doesn't effect the environment. Any help would be much appreciated

#

I'm using HDRP

little condor
deft fiber
daring warren
#

Really weird problem, when I add a canvas to my scene it makes the scene a whole lot darker, no matter where i put it.
Any words of advice ?

deft fiber
upper fable
#

Please dont post on multiple channels

#

You could actually take and remove the messages from all but one channel, its annoying when people waste their time helping on questions that are already answered etc.

tepid dragon
#

sorry I thought that no one is talking here so i posted on another channel then i forgot to delete this one

#

btw how can I add the Post Processing to the scene

timber lichen
#

Which rendering pipeline are you using 🤔

tepid dragon
#

regular 3D scene

#

is this what you mean?

upper fable
tepid dragon
#

which?

limber delta
tepid dragon
#

they are using URP

#

and i am using regular 3D

limber delta
#

Alright, then there shouldn't be any issues if you find a tutorial that shows how to do it for the URP

tepid dragon
#

i am not using URP

tepid dragon
limber delta
#

What does it say if you go to Project Settings > Graphics?

tepid dragon
limber delta
#

Hmm, this is a bit above my skill level, but I'm pretty sure you should be working with a render pipeline. You could probably google some info on that.

chilly kettle
#

If there is nothing written, its most likely the "built in" render pipeline

limber delta
deft fiber
timber lichen
#

I turned it to static and it still doesn't work

#

nevermind, I've figured this out. Thank you for the help

rough kestrel
#

how i make light not go through walls

#

or better go only in certain angle

rough kestrel
#

how i make baked light work

chilly kettle
#

This channel is not for teaching the fundametals.

#

In this video, we are going to take a look at Lightmapping in Unity 2020.1 to help you create fast and beautiful lighting in your scene.

Learn more about Lightmapping in 2020.1 from our Docs!
https://on.unity.com/2U7VQIX

Interested in the newest Graphics Features we added in 2020.1? Click here!
https://on.unity.com/2GHYGkR

Download the Spaces...

▶ Play video

In this video, you'll gain an understanding of how lights and shadows work in the Universal Render Pipeline, as well as how to set up a scenario with a mix of real-time shadows, Light Probes, and baked GI.

Speaker:
Ciro Continisio

Ask your questions here: https://on.unity.com/2UmP9TE
Did you find this video useful? Room for improvement? Let us...

▶ Play video
#

these are great

hasty horizon
#

Hello, i am using Unity 2020.3 and turned on the fog but it does not show up in the build.
Do i need to turn it on somewhere? i am using the Universal Render Pipeline in this project

rough kestrel
#

i dont have damn lighting window

hasty horizon
rough kestrel
hasty horizon
#

it's just a little differently named but it's the same window

rough kestrel
#

people say there should be bake button inside and there isnt

hasty horizon
#

Baking could also be called Generate

#

Check if you have a generate lighting button at the bottom of that window

rough kestrel
#

is it supposed to take forever

chilly kettle
#

No

hasty horizon
rough kestrel
#

i have like 100k objects on scene

#

but these lights affect max 500 objects

chilly kettle
#

Doesnt matter, every object that is static will be baked into lightmap

#

this will be a HUGE one

hasty horizon
#

Yeah, it all depends on how many static objects you mostly have

rough kestrel
#

it doesnt sound more optimal than dynamic light

hasty horizon
#

well, it's better for low end devices since this data will not be calculated at runtime

chilly kettle
#

lol.. lets go and render 100k shadows 😄
This will be a 1 FPS game 😄

hasty horizon
#

you are calculating it right now once to save time during runtime on rendering all the lights

#

I have a question myself about the fog.
In the editor it's showing up like normal but it's not working in a build.
Is there any other setting i have to change to make it work?
I am using URP and 2020.3

rough kestrel
#

i easily have 30fps with realtime

chilly kettle
#

Did you build your game with high quality settings, or did you choose some low quality, where the fog is disabled?

rough kestrel
#

and my bake is still not done

chilly kettle
hasty horizon
#

I think the high quality setting is selected i never yet touched the quality settings

rough kestrel
#

that why im doing baking but i dont see why it would take more time than to render itself

#

while it takes 10mins already

deft fiber
chilly kettle
#

Baking can take 1 minute or 1 hour.. depending on your settings and the amount of objects and lights.

rough kestrel
#

so if i set smaller light angle it will be faster

#

why cant i just set limit to check only objects 10 meter away from light source

chilly kettle
#

You can mark them as not GI Static if you dont want them to be baked

#

and they dont get baked

rough kestrel
#

the only static thing i have is floor

#

and i still have like 10k floor objects for npcs to move on

deft fiber
rough kestrel
#

just default unity cubes

#

and even quads in some places

hasty horizon
#

i tried all 3

chilly kettle
#

you have them activated here?

hasty horizon
#

yeah

deft fiber
#

It could be something related to shader stripping or deferred rendering path, but these are just stabs in the dark
Haven't heard of fog just totally breaking before

hasty horizon
#

the renderer should be forward since it's 2020

#

i don't think 2020 URP has the option for deferred only 2021+

rough kestrel
#

wait can i just disable all objects besides lights and then bake

#

as directional light seem to able generate that way

#

and can i mark objects in different way than static

#

as it colliders with navmeshagent baking

hasty horizon
#

you can select individual settings as static

#

if you click the dropdown near the everything static or something

#

then you can uncheck some things you don't want in a navmesh

coarse pecan
#

I have a box made up of six 'side' meshes, each separate as the box is destructable. But using HDRP, the light leaks around the 'gaps'between the sides. even though they are touching (even if I overlap them) is there some way to stop this?

hasty horizon
#

Ok i found something with the fog, so my project right now first has a scene where some manager objects are in and then loads the level i test.
I turned on fog in that first scene and now it does show in build

#

I know what it is

#

It's because i have multiple scenes loaded and thus the first one overrides everything

rough kestrel
#

baking lighting only affects certain objects?

#

what if new ones would appear in place of bake

chilly kettle
#

Nothing

#

They are black or lit by a realtime light

rough kestrel
#

ok so im having issue

#

normally when i baked with my main game area toggled off

#

just lighting on

#

then when i toggled it on i could see everything changing light based on intensivity normally

#

but for baking lamps i had to turn everything on

#

and now global light seem to not affect pure black tiles

#

thought i can cast dynamic light on already baked light

#

baked light like shader

#

how i make day night cycle with baked lamps

#

and non baked sun

chilly kettle
#

You can use lightmap switchers for this or mixed lighting

rough kestrel
#

but then lamps wont work when switching

#

i wanted something like baked lamps are always on but global light can cast additional light on it

#

how can i keep this light and allow global light light up these black tiles

chilly kettle
#

You can use an additional directional light without shadows

rough kestrel
#

isnt one enough?

#

and everything is without shadows already

chilly kettle
#

one what?

rough kestrel
#

i have one directional light

#

it affects everything except static objects that bake was performed on

#

how can i allow directional light light up baked objects

chilly kettle
#

it does

#

in standard settings

rough kestrel
#

i might changed those

#

as i changed everything to minimum so it manages to bake

#

as you see it uses same light per tile

#

like in minecraft

chilly kettle
#

i see

#

looks like MC

rough kestrel
#

lamp light is good already but i need make directional light and skybox light be able to light up these black tiles as well

#

where are settings for enabling it

rough kestrel
#

anyoneee

rough kestrel
#

can i make 360 light

#

so it will light up dark areas

#

it seem to only light up from up not from sides

#

and i dont want add 4 more directional lights i feel like it burn

chilly kettle
#

Add some environmental light, if you want to brighten up the whole scene

rough kestrel
#

1 isnt enough

#

i need to use like 5 to light up every side

#

and that might burn phones

chilly kettle
#

dude.. Environmental light!

rough kestrel
#

black wall sides

#

environmental light up only from top

#

unless i rotate it

chilly kettle
#

..useless to talk to you, sorry xD

#

You could just google for "Environmental light" and you would see, that this is not the same as Directional light

rough kestrel
#

ah of course i changed it already

#

but it doesnt affect baked lights

chilly kettle
#

thats correct

rough kestrel
#

i need light up parts that are baked already

chilly kettle
#

Then add a Direct light that lights the dark parts and bake again

rough kestrel
#

so 4 directional lights

#

isnt that be laggy

chilly kettle
#

You can add infinite lights, when you bake them. Makes no difference. Only in the time you need to bake

rough kestrel
#

oh i dont want baked

#

directional light i want dynamic

#

because i want day night cycle

#

that why im baking all lamps on map

#

lamps - baked
directional light - dynamic

#

so 5 directional lights might be laggy

chilly kettle
#

i recommend, that you switch to another scene and try it very small..
Add some of your rocks, and a lamp.
Then adjust the Environment Light and bake everything

#

the environmental light will be baked into the lightmap

#

Then add one Direct Light (Dynamic) to fake the sun & shadows

rough kestrel
#

without directional light even ground is dark

#

i might be missing something

chilly kettle
#

you have to bake again if you change something like the environment light

rough kestrel
#

but i never saw enviromental light being included to baking

chilly kettle
#

Thats why i say, test your perfekt light in a scene where you get fast bakes

rough kestrel
#

maybe i have some option off

#

i do have fast bakes here i have all options to minimum

chilly kettle
#

Show me the Bake Settings

rough kestrel
chilly kettle
#

Well.. you should minimum add 2 bounces and a resolution of 5 texels.. otherwise this lightmap does not make any sense ^^

rough kestrel
#

then light get different on same walls

#

i wanted whole side have same light level

#

i want make every object not affected by lamp to have exact same light level

chilly kettle
#

this environment light is my only light source in this scene, and its baked into the map. You could use a color you want for everything in your map

rough kestrel
#

i dont have color as source

#

only skybox or custom

chilly kettle
#

Are you looking in reflections?

rough kestrel
#

yes

chilly kettle
#

why?

rough kestrel
#

ok wait

#

should skybox and sun be removed

chilly kettle
#

doesnt have to be removed

#

i just dont need them for my game

rough kestrel
#

i notice i cant adjust intensity when in color

#

everything is dark

chilly kettle
#

because your scene is baked

#

go here and clear baked data

rough kestrel
#

but i do need bakes for the lamps

chilly kettle
#

you can bake again after this...

rough kestrel
#

ok so now obviously everything has same color because lamp is only light source

#

but everything is dark as well

chilly kettle
#

and you gave the environmet light a color?

rough kestrel
#

gray

#

a ok

chilly kettle
#

Give it something like Red or Pink to test

rough kestrel
#

so lets say white works

#

but now how would i make day cycle with it

chilly kettle
#

switching lightmaps

rough kestrel
#

but im making smooth cycle

chilly kettle
#

it can be blended

rough kestrel
#
    if (c.hours == 21)
    {
        lightt.intensity = 2 - (c.minutes / 60);
    }
    else if (c.hours == 22)
    {
        lightt.intensity = 1 - (c.minutes / 60);
    }
    else if (c.hours == 7)
    {
        lightt.intensity = (c.minutes / 60);
    }
    else if (c.hours == 8)
    {
        lightt.intensity = 1 + (c.minutes / 60);
    }```
#

i had something like this

#

how i get similar effect

chilly kettle
#

Maybe you should focus on one thing after another ^^

rough kestrel
#

so i make one white lightmap and other gray

chilly kettle
#

You could.
I have to go back to work, cya later

rough kestrel
#

hm after baking it breaks anyway

#

only before baking it looks properly

severe herald
#

Is there anyone here that is familiar with Bakery lightmapping that would be willing to help me look over my project and figure out what is causing my lighting problems when baking?

acoustic grail
#

does anyone know why I'm getting such bad bakes?

#

the white is a separate plane mesh and it's still baking bad

#

the uvs look fine too

#

I'm even getting bad bakes with just a plane

acoustic grail
#

could it be that my unity is broken?

#

I made a new project and a cube couldn't even get a good bake

chilly kettle
acoustic grail
#

I reinstalled unity and still have the issue

chilly kettle
acoustic grail
#

yep it's checked

#

I went and look for overlapping uvs and there are none either

chilly kettle
#

Whats the setting of your light bake?

acoustic grail
#

progressive gpu haven't changed any settings for it

#

and tried bakery too

#

enlighten is bad too

limber delta
#

Have you played around with Lightmap Resolution?

#

(increasing it)

chilly kettle
#

Ok, can you give me a screenshot of the lightmap and second: Are the edges of the cube marked as sharp?
Could also be a problem with the normals.

acoustic grail
#

yes I've tried increasing the size

#

one sec I'll take a pic

#

yes they are marked

#

oh sorry I mean no

#

only seams are marked

chilly kettle
#

there you go

#

it baked the edge like its a smooth edge

#

i think

acoustic grail
#

idk I just marked them as sharp and tried again but still bad bake

#

unless I messed up a step

chilly kettle
#

how does it look when you change the debug view to lightmap?

#

with the resolution checked

acoustic grail
#

looks fine to me

chilly kettle
#

Yep.. okay, next thing to test is inceasing the padding in the generate uv setting in the import setting

chilly kettle
acoustic grail
#

idk if thats the right pic

#

I just looked in lighting data

#

also whats weird is unity is telling me I have overlapping uvs for an object but when I go check them in blender there are no overlaps

chilly kettle
#

Its not in Blender

#

its the Lightmap

acoustic grail
#

whats the lightmap?

#

the overlapping?

chilly kettle
#

The Lightmap UVs

acoustic grail
#

the pic above is from unity

chilly kettle
#

check the preview and have a look on the shells of your cube

#

if they share the same texel they are marked as "overlapped"

acoustic grail
#

so these are overlapped?

chilly kettle
#

they share one texel

acoustic grail
#

ah okay so that bleeds then right?

chilly kettle
#

try adjusting this

#

to 4 or 8 or whatever helps

acoustic grail
#

I did but it got worse

#

also I don't have the margin method option

#

but idk if that matters

#

also I tried making the margins in blender really big and still bad

deft fiber
chilly kettle
# acoustic grail

These are only for the texture.
If you activate generate Lightmap UV, Unity created a second UV Channel for the lightmap

#

you could deactivate generate lightmap UV to use the same UV as for your textures

acoustic grail
deft fiber
#

Low texel density causes wider color bleeding

acoustic grail
#

I'm don't have the option to do it automatically

#

I'm on unity 2019 due to restrctions for game I'm making the assets for

acoustic grail
#

I don't have the setting

#

do I have to enable it somewhere?

#

or is it built into the pack margin?

#

because was assuming that if it was automatic I wouldn't be able to manually adjust the size

deft fiber
acoustic grail
#

I didn't find any instructions to enable it on the page

#

also are you sure its for all versions?

#

here it says new 2020 feature

deft fiber
acoustic grail
#

but also even if I just need to increase the margins why did the unity plane get bad baking too?
the problem with it might be unrelated but it could also be helping the problem

deft fiber
#

The documentation is specifically for your version of unity and has big sections about the lightmap margins

#

The new 2020.1. system is for automatically determining suitable margins

#

Overlap can happen within a mesh's UVs, or between multiple mesh's UVs on the same lightmap

#

This is complex stuff, with or without my advice you shouldn't be just skimming the resources you find

acoustic grail
#

I just read through it word for word and it doesn't say anything about automatically generating packed margins

#

it only explains what they do

#

if you know where it is please just send a pic

#

because I didn't find anything in this page about automatic margins

#

unless you were talking about the lightmap which I already enabled and tried increasing pack margin

#

when you said "to increase uv margins with automatic generation" I thought you were referring to the automatic uv margin packing

deft fiber
#

That should fix the overlaps from within a mesh

#

The UV overlap troubleshoot page suggests increasing the resolution of the whole lightmap
If there's not enough space for the given meshes it may be that it packs them too tight together

#

The total resolution seems to be running low in general due to how big the overlap blotches are

#

If all else fails I expect you can do the process of authoring lightmap UVs manually and ensure there are "outer margins" that way
But that again increases the resolution effectively needed on the map for the mesh

acoustic grail
#

its already set to 2k so I can't imagine that such a small scene with only a cube and a plane would need more than that
but I did adjust the pack margin to 15 and the results were better but still for a simple shape like a cube still not great and has some dark edges, more complex objects don't get any benefit from increasing the pack
but it is better so it's an improvement, I guess I'll just have to mess with the margins

#

how would I manually author lightmaps?

deft fiber
acoustic grail
#

how hard is it? is it similar to uv unwrapping manually?

acoustic grail
# acoustic grail

but also is this related in any way to margins? or is this the lighting not baking properly/not having enough samples/etc?

deft fiber
#

Well, mainly just UV overlap and texel invalidity are the important ones

acoustic grail
#

could there be uv overlap even if it's a unity plane?

acoustic grail
deft fiber
acoustic grail
deft fiber
rough kestrel
#

sooo

#

how i bake all objects on map with exact same light amount from every side

hidden void
#

hey guys I am posting this here as well, had it posted in HDRP but dont know if this could a good place as well,
this is only happening when I build my project

#

its 2 terrains

#

each separeted scene, (multi scene)

#

any quick thoughts?

chilly kettle
hidden void
#

the lighting is set up in the main scene

hidden void
#

so basicly any texture that is in the 6'th slot of the texture paiting of the terrain does this

white gorge
#

Hello. I have a problem with lightning. When I start my scene from scene 1 it looks like image one (The lightning im going for) whereas when i start scene 1 from another scene it looks like image 2. Anyone have an idea why the light from one scene affects another?

#

Sometimes it helps the thought process when asking the question. If anyone else have a problem with this it can be fixed by going to window-rendering-lightning. Chose the scene with the light you want and create a "new lightning setting". Then scroll to the bottom and hit auto generate. Wait for it to finnish and then it worked (atleast for me).

upper fable
deft fiber
white gorge
upper fable
white gorge
deft fiber
upper fable
#

Yeah ik, thats what i meant, the ambient probe is generated anyways when baking lighting but nothing more than that is baked if theres no static objects etc.

deft fiber
narrow perch
#

i have a level which has multiple render zones which intersect each other vertically in some places. this isnt a problem in normal gameplay but because all render zones are visible in the editor i cant bake lighting without getting shadows from other areas of the level (which i dont want). any solutions? last i checked u cant bake objects separately and i assume this hasnt changed

acoustic grail
#

anyone know what could be causing a weird bake like this?

#

there's no overlap but it looks like the bake was really messy

winged tangle
#

same with me, wtf is up with unity 😠

acoustic grail
#

I've been trying to fix that for like 3 days now lol, I've tried basically everything and the lighting is still blotchy

winged tangle
#

fuckin hate unity's lighting system

#

no idea how archviz assets gets his lighting to work

#

i know my model UVs are correct as well ://

acoustic grail
#

lol yeah same, I gave one of my objects like a quarter of the lightmap and good margins and the lighting is just not good, if it's still a uv thing then I'm surprised

coarse pecan
#

Does lightmap baking always use the first UV set on objects?

chilly kettle
brittle prawn
#

Hello I have made a material with white color and emission with highest intensity but it doesn't act like light, I want to know what i did wrong

chilly kettle
# winged tangle same with me, wtf is up with unity 😠

Show me the Debug view (texel validity) of your scene.
Unitys lighting system is very good 😄 Mostly its the person infront of the screen that make the mistake 😄 But i feel you. Its hard to find out whats the problem sometimes ^^

brittle prawn
chilly kettle
brittle prawn
# chilly kettle Show the lightmap in debug mode

It wasn't tag static, but I am confused now the emission is set as realtime but act as backed backing light takes eternal, in the starting I though emission is low so I made it highest now this is what I get, is there any layman way to do this?

#

here is the lightmap

chilly kettle
#

Emission intensity like 2 or something should be enough.
Also you can see that your UVs are stetched. Did you generate them in the import settings?
also your Chairs look, as if they have no lightmap uvs

#

Did you generate Lightmap UVs in the Models import settings?

limber delta
#

Hi guys. Let's say I have an asset, a drawer, with both static and dynamic parts to it. The "main body" and the drawers are all part of the same mesh (FBX file) but separated. All the drawers are parented to the main body.

When I import into unity, should I check "Generate lightmap UVs" for that whole mesh, even though only the main body will be marked as static? Will lightmaps only be generated for that main body (and not the drawers which will not be checked "static")?

#

Hope that makes sense

past merlin
#

Does anyone know why my point lights are doing this?

#

this weird line?

chilly kettle
chilly kettle
past merlin
#

no, they are generated in real time

#

my other lights work fine

#

idk why these dont

chilly kettle
#

Which pipeline do you use?

past merlin
#

Urp

deft fiber
limber delta
deft fiber
chilly kettle
past merlin
#

Yeah probably it, other texture works fine

limber delta
#

Does anyone use magic light probes? Are all your static objects in the same layer?

limber delta
#

I'm going through the quick start guide and it says "In real scenes, you need to select the layers in which your static geometry is located, use the drop-down list for this." which I didn't know was a condition for it to work.

At this point I have many many static objects in the scene their not all in the same layer

#

Have you made sure all you're static objects are all in the same layer?

#

Oh god damn it, haha, my mistake, you can pick mulitple layers in the drop down 😂

#

hahaha. wow. sometimes I'm wuite dumb

#

quite

chilly kettle
#

Never used layers for MLP

limber delta
#

I see

#

It's set on default, I guess all your static objects has been in the default layer

chilly kettle
#

I just create an MLP Gameobject in the MLP Manager Tool and place it in the scene, generate the probes and thats it ^^

limber delta
#

right 😄 maybe i'm complicating things unnecessarily

#

Either way, thanks for your help!

honest ore
#

I have been having this problem for a long time does anyone have an idea of whats going on here? I have tried almost everything

#

the lighting is so off the walls all have their own shadows and the ground is split in squares for some reason

chilly kettle
# honest ore

Is it baked? Do you have generated Lightmap UVs in the import settings?

honest ore
#

also Im not quite sure what you mean by lightmap UVs sorry im a little new to lighting in unity

chilly kettle
#

Show me the lightmap in the debug view pls 🙂

honest ore
#

oh yeah that tab ill send it quickly

#

this is what it looks like

#

okay I think I see the problem as well now, its those lines that split the wallls isnt it?

#

the UVs are completely messed up?

chilly kettle
#

Nope, they are fine.

honest ore
#

oh really?

chilly kettle
#

So..

  1. show me the import settings of your ground tiles.
  2. Lightmapper settings
honest ore
#

okay give me one second

#

firstly the lightmapping settings

#

and the import settings

chilly kettle
honest ore
#

its a model I made in blender

honest ore
#

I tried using 1024 lightmap size resolution way lower it didn't really change much

chilly kettle
#

i send you some settings, wait a sec

honest ore
#

alright thank you man

chilly kettle
#

How big is your scene? it looks massive in the preview

honest ore
#

so this area that you can walk around in is about 60meters x 60 meters

#

and there are maybe 40 lights?

#

I took the actually area lights out and stuck to an emission texture

#

also this is all done in URP

#

I tried it in HDRP but its even worse there

#

Im going to talk in the thread so we dont take anymore space here

winged tangle
deft fiber
honest ore
#

Okay I just have one more question if that's okay, Is it possible to use real-time spotlights on game objects with baked lightmaps?

chilly kettle
#

Sure

honest ore
#

wait you can??

chilly kettle
#

It just adds light onto it

honest ore
#

because I tried making a flashlight with a spotlight on the end and the light just did nothing only reflected off of the corner of the walls and acted really weird

chilly kettle
#

As we already said, when something is behaving weird, try it in another scene to find out, what the problem could be

honest ore
#

yeah i'm currently doing that right now i'm just going to do testing and fixing it

chilly kettle
#

👍🏻

warped jackal
#

anyone know why this happens? if i let it finish my entire map is pure white and black

#

im just trying to get something half decent to start with

chilly kettle
#

I have never seen this 😄

warped jackal
#

really...i swear i've had to deal with this several times

chilly kettle
#

did you check all the debug views?

warped jackal
#

like what

chilly kettle
warped jackal
#

maybe its overlap

chilly kettle
#

overlap normally look different.. it should not create a black/white visual

#

did you generate the uv map correctly in the import settings of the model?

warped jackal
#

it happens to the terrain too tho

chilly kettle
#

What happens if you just take the water part there with the statues and put it into a new scene and bake the light?

warped jackal
#

the water is pretty simple idk if it's causing any issues

#

alright this is a finished like bake

#

how is that even possible

chilly kettle
#

wow

warped jackal
#

the unlit stuff in the back have screwed up colors/lighting too

chilly kettle
#

How does the Lightmap Debug look like

warped jackal
#

this one?

chilly kettle
#

there is a debug view whats called lightmap or something

warped jackal
chilly kettle
#

"baked Lightmap"

warped jackal
chilly kettle
#

looks better.. but what are this weird lines above the wateR?

warped jackal
#

spikes

chilly kettle
#

ah. okay

warped jackal
#

idk if this helps but my map looks like hell after i clear lighting data too, until i change the reflection probe intensity

#

this is what they look like, if i change them at all the lighting goes back to normal

#

it's set to realtime instead of bake cause i thought that might be an issue

chilly kettle
#

And the "Texel Validity" Debug View look also okay?

warped jackal
#

im not really sure what these are supposed to look like

chilly kettle
#

You deleted the lightmap, so it has no infos there

warped jackal
#

oh

chilly kettle
#

only if your terrain is fked up

warped jackal
#

yeah

silk lance
#

I have walls that intersect in an interior scene, there cause these dark edges no matter how I change the lights
in the scene, I'm sure I am doing something wrong but not sure what that is right now. Has anyone come across this lighting issue?

chilly kettle
#

It also can be wrong normals of your room. But I think it’s more a resolution thing, because the shadows behind your pictures is also very blurry.

frozen lark
#

Does anyone know why parts of this model I have are black after lightmapping (I use bakery in this case)
Pics of unshaded view for reference

timber lichen
#

For some reason im baking lighting for a large map and it took 3 hours, once it got to 0, it said Baking and then 30 seconds, and then Baking, and then 30 seconds again, its been doing this over and over

chilly kettle
frozen lark
#

Yes and yes, the generate uv option is also on, it seems to be just my light intensity, however it still is a bit weird, i can't really get the results that i want

#

Also i dont know how to explain this but sometimes when i press ctrl+s to save or do some other action such as tweak area light intensity it changes the brightness of the scene by a little bit somehow

#

And i get this "shadow" on the left side despite me not even using directional lights for this or anything like that

#

seems to be environment light from the skybox with environment lighting set to colour mode instead of skybox it still does that though

chilly kettle
#

Are you sure you baked any light? ^^

warped jackal
silk lance
#

@chilly kettle It was the 'Intensity' and 'Radius' properties in the Universal Render Data that were off. After making some adjustments its looking fine. Thanks

chilly kettle
warped jackal
#

setting in the lighting tab is all i know about it

safe pewter
#

Trying to get good looking lighting in this scene I'm making. The bottom of this pool has an emissive texture. Is there a way to make it so the rim around the pool isn't so dark? I have 4-8 bounces in my bake settings. Do I need more?

#

if I turn off SSR, you can see some of it is completely black

deft fiber
#

If they're very smooth, the light won't scatter so much to areas which aren't facing any light

safe pewter
#

even with a smoothness of 0.5 it still doesn't change anything about the rim of the pool

#

it's also a completely enclosed interior so there isn't much for the light to bounce into

safe pewter
#

settings

gilded cloak
#

How can I go about making the lighting better on the enemy without ruining the dungeon crawler/dark effect I'm going for?

chilly kettle
gilded cloak
#

That only really helps show off the purple part of him, I was looking to get the rest of him illuminated a bit. Maybe just a weak spotlight/point light?

chilly kettle
gilded cloak
#

I ended up using a spotlight for the moment during combat, looks okay but I'll come back to it later when I'm looking to polish stuff

frozen lark
#

I have a problem with lightmap data getting corrupted when entering playmode

Before play mode - 1st pic
After - 2nd pic

frozen lark
#

I am not sure what was it but i created a new scene and copied the model over, regenerated lightmap and it is fine now, maybe something got corrupted as it happened after i made a change to the model in blender

hallow moss
#

help, in the scene tab the light shows up, but in the game tab, or when testing, it doesn't

odd loom
#

hey, i just want to say im an amateur when it comes to lighting , most things i did are from online tutorials,
my problem is the inside of the building textures looks really weird and not visible,this are my current light config, what im i doing wrong?

#

i change envirenment lighting Source from color to Skybox it looks better but there is this weird blue color tint applied to all objects, is there is a way i can edit that tint out?

deft fiber
odd loom
odd loom
deft fiber
#

It'd be nice if interiors could be shadowed from ambient light but for dynamic geometry that's practically impossible without ray tracing, and even for static geometry it requires precomputing of some sort

odd loom
#

gradient worked alot better than with color, so i will settle with it for now, thanks again

rapid hazel
#

my 2D shadows look like this for some reason

#

I've increased the shadow resolution to its max

#

this is unity 2020.3 LTS using the URP 10.10

#

anyone have a fix?

brittle prawn
#

why this wall in the right appear black, while it is the same color to the one in front fyi I have baked the lights and added a area light faced toward the walls it didn't worked on the right hand side wall

glacial dagger
#

I've looked online for answers, but haven't found anything that's quite what I'm looking for. Basically, I'm looking for the light blue part of the material to be unlit, to look like it's glowing.

I'm using the texture file below, where the light blue glowy bits are the 4 light blue color swatches on the right. I'm unsure what the best way is to have multiple effects on a model like this.

I'd ideally love if I could have this take a single material, if that's possible.

tepid minnow
#

could just mask it with vertex color into the emission slot

#

or use the alpha channel of your texture to represent that mask

chilly kettle
glacial dagger
chilly kettle
#

the easiest way would be to use a second material for the insets.

glacial dagger
#

Basically, I use this color palate for a lot of objects in my game, and having a single color palate material allows me to easily swap out certain colors (like switching the glow color to light green instead of light blue) by just changing the material of the object. Which is why I'd like to keep it at one material, as it just keeps my systems simpler.

chilly kettle
#

In this case, you have to write a custom shader with vertex color like @tepid minnow said i think.

glacial dagger
#

Alright, I'll look into that

tepid minnow
#

could use the red channel of vertex color, then just take your color from the textures multiply it bu vcol.r then feed that into the emission

hallow moss
#

I've already posted this but no one replied sooooo
help, in the scene tab the light shows up, but in the game tab, or when testing, it doesn't

deft fiber
glacial dagger
#

It may not be the cleanest solution, but it works, so y'know

chilly kettle
#

yay!

glacial dagger
#

Here's the before and after, if anyone is curious

chilly kettle
#

gj

glacial dagger
#

It's simple, but makes it feel way more polished

brittle prawn
#

why this wall in the right appear black, while it is the same color to the one in front which is cream white fyi I have baked the lights and added a area light faced toward the walls it didn't worked on the right hand side wall

little condor
brittle prawn
little condor
brittle prawn
little condor
brittle prawn
safe pewter
#

With my interior lighting, I've found that shiny objects don't seem to have a specular highlight like they usually would. They have a slight reflection as expected by it's hard to tell they're actually shiny objects at first glance.

#

I assume this is because the environment is only lit by emission and not actual lights? Should I switch to area lights etc for baking?

deft fiber
#

Hard to see presence or absence of reflections in that image
I recommend testing using spheres with various chrome materials, with SSR turned off without the blistering over-exposure

crystal jay
#

I have an issue where my lightmaps render correctly in editor, but when I build to Android, lightmaps do not render, light probes however to seem to still be functioning. Any ideas why?

safe pewter
#

seems bakery has an option for my issue

distant leaf
#

is urp good or what should i use for lighting

upper fable
chilly kettle
#

Thats a question like "is food healthy" 😄

#

Give more infos 😄

distant leaf
#

well i dont know anything about lighting so i cant

#

i cant give any more info

#

except tht i work in 3d

chilly kettle
#

Than you have other tasks to do before you care for lighting 🙂

distant leaf
chilly kettle
#

URP is easier, because you have not so many physical correct lights i would say

#

But HDRP give more realistic results

safe pewter
#

Why does my spot light seem to get cut off at a certain distance?

crystal aurora
#

I upgraded the project from 2022.1.3f1 to 2023.1.0a6

everything is fine except the whole game got darker. any idea? before and after in the pic

timber lichen
chilly kettle
#

Im not sure how unity handles Planes with a double sided material.
Is the lightmap applied with the same brightness on both sided? i think so, right?

#

bcause its the same UV

chilly kettle
#

Ok. so i will add additional geometry for my plane there

#

thx

deft fiber
#

Backface rendering is kind of weird as they seem to copy realtime lighting of the valid side likewise

chilly kettle
#

yeah, i saw this on my grass where i just used x-crossed planes.. and the backside always look a little different 😄

tough hatch
#

I have a spaceship where u can walk around in and still fly so the object isnt marked as static, is there a way i can have baked interior lights on my ship, considering none of the lights move relative to the ship?

chilly kettle
tough hatch
#

oh, that makes sense 😄 , thanks

crystal aurora
deft fiber
#

Unpredictable stuff can happen with them

lost flare
#

I am in desperate need of help with 3D lighting

#

Is there a way to render baked lightmaps to a prefab? If not, how do I procedurally generate a 3D scene and still have baked lightmaps?

little condor
lost flare
past merlin
#

Hey, is there a way to get rid of the bright spots where my light is, but keep the overall brightness of the light the same?
Like can i somehow change the lighting "Curve" (im on urp)

deft fiber
#

After that there's many options for controlling lighting via post processing volume overrides, such as "color curves"

deft fiber
#

But even if lightmaps are in prefabs, the seams between them can be a problem

ember tide
#

Hey, question: How do i make a material be a certain colour, no matter the scene light or shadows. My case: i wont this yellow bar to be pure yellow on all sides

ember tide
chilly kettle
#

👍🏻

brittle prawn
#

Why there are black marks downside on the wall, is it because of lights?

#

@chilly kettle help please

chilly kettle
#

do you have something in the texel validity debug view?

chilly kettle
chilly kettle
rose veldt
#

Here goes a question: I created a terrain, textured it and put some trees down on it. I want my game to take place at night aswell. Once i crank down the skybox lighting multiplier to something like 0.25 or 0.5, everything goes dark except the painted trees which just remain as they were at "daytime".

Is there some way to get the trees to adapt to lighting other than placing them manually?
Thanks!

chilly kettle
rose veldt
#

bruh now even my tree colliders stopped working

#

yea one sec

chilly kettle
rose veldt
chilly kettle
#

That are textures

#

^^

rose veldt
#

whoo

#

myyyy bad

#

one sec

chilly kettle
#

yeah.. its an unlit shader

#

unlit shaders dont care for light

rose veldt
#

damn :(

#

any way I can cheat/avoid this?

chilly kettle
#

you may change to a lit shader

rose veldt
#

uuuh

#

where do i find the "lit" shader category 😅

chilly kettle
#

there are several different shaders in unity

#

u can use a standard/lit shader, but you may need to assign the textures again.
Or your Tree asset comes with a lit shader which you can use

brittle prawn
# chilly kettle did you fix it?

No actually this is the texel invalidity, I have changed the material to render both but it didn't helped, what should I do now? The Tree I am using is imported can edit it's material

crystal aurora
#

⚠️ I have dynamic lighting from sun. if I enable occulision culling, those objects which are not drawn stop casting shadows.

is there a solid and performant solution for this issue? I can't be the only one encountering this watdis

deft fiber
brittle prawn
deft fiber
brittle prawn
obsidian gull
#

I have a pretty interesting one:

#

In order to get more of a 2.5 look, I'm using custom projection matrix to put a skew on my camera (to make vertical surfaces take up more screen space)

One of the (several) issues I'm having is that shadows disappear when they're outside of the normal ortho camera bounds, even though they're rendered with my custom projection matrix.

Am I taking the totally wrong approach to this? Is there a way to tell Unity, "hey, render shadows outside of what should be viewable by the camera prism!"

still hound
#

How can I reduce lightmap convergence and size?

brittle prawn
deft fiber
brittle prawn
ember tide
#

Tried all the lighting, enviroment, and material settings. The only thing that affected the shadow was alpha. But i wish to keep the crystals transparent :/

#

After reading forums, guess the only option is to use soft, or just disable shadows

deft fiber
#

Which render pipeline is this and what shader is the crystal using?

woven hare
#

I'm making a solar system but if I use a point light at the Sun, it ends up with the inner planets blindingly bright and/or the outer ones pitch black. Any ideas how to make it more even?

upper fable
# woven hare I'm making a solar system but if I use a point light at the Sun, it ends up with...

I assume you use URP or HDRP am I correct? Both uses inverse square fall-off which means light intensity decreases very rapidly when distance increases, that's how it works in real life too. id just make custom shader for the planets to simulate the lighting the way I want, that requires some basic understanding of shaders tho (that's not a surprise as all the lighting in unity is calculated using shaders)

deft fiber
#

HDR tonemapping helps as well to make the differences between dark and light less drastic

umbral elk
#

Hi! I'm using URP but I have some ligh bleeding, what can I do to prevent it?

upper fable
umbral elk
#

Both seem to work with the current setup yeah, but I guess I will need some testing once I have more objects

#

Thanks!! n.n

rich surge
#

Tell me pls how to make an object invisible, but obj have a shadow?

upper fable
dry cedar
#

does anyone know why whenever I bake my lights it just gets stuck at GI preprocessing. This is on a new project so its default settings on everything and I only have 3 objects in the scene. I also have these 3 warning messages which I suspect are the cause but Im new to unity and dont know how to fix them

chilly kettle
chilly kettle
dry cedar
#

Assertion failed on expression: 'm_PendingLightmapHashes.size() == m_LightmapCompositeHashes.size()'

chilly kettle
#

hmm.. i have no clue..

dry cedar
#

i fixed it I just cleared the GI cache

fickle meadow
#

Hello! im trying to do something rather tricky and would like to know if its even possible in unity

#

my goal is to copy the exact light and shadow result from A to B

#

I would really appreciate if anyone could help me out with that 😅

chilly dust
#

hi, want to ask if there is a way to modify luminance of a light source (in nits/ apostilbs) in unity? thanks

daring trench
#

Is lightmapping on cpu or gpu the fastest?

chilly kettle
daring trench
#

:0 ty

dull marlin
#

Does anyone know if Emissive Materials count towards lighting? I'm having an issue where with only 3-4 scene lights I'm getting glitching when looking in certain areas.

dull marlin
#

Hmm..

#

As it stands, I have all of my spot/point lights set to Low Shadow Quality, I have 4 cascades turned on in URP's Renderer, I've bumped up the Shadow Resolution, Shadow Atlas Resolution and Cookie Atlas Resolution in the Renderer to 4096 to the point where I don't get any lighting warnings in the console anymore. I have 4x flashlights in the game that I can pick up that are located in a small closed space, when I turn them all on and start looking certain ways the space lights start turning off.

deft fiber
dull marlin
#

I can confirm it's definitely the active one. I confirmed this by turning the Render Scale all the way down while I was in Play Mode and it did go pixel-y.

deft fiber
dull marlin
#

Well for the house all of the parts are separate, it's not one mesh

#

I haven't experienced any lighting issues up until now to be fair. It seems like things only started happening once I was building my own UV, which ultimately just toggles on another Spot Light with a cookie.

deft fiber
#

UV?

dull marlin
#

UV Light

deft fiber
#

Ah

dull marlin
#

For that, the purple torch throws out a SphereCast with a layerMask, if it hits it, toggle the cookie light.

deft fiber
#

Still, sounds like a textbook example of mesh object falling inside too many light ranges

#

One of the few times I can recall that wasn't the case with those symptoms was when there was a custom lighting asset involved

dull marlin
#

So there's a light attached to the back of the player with shadows disabled, there's two point lights in the truck which provides the primary illumination, there's four flashlights, so naturally, 4 spot lights, that would put the count to 7 near that area

#

I could probably mark lights as important but I'd rather avoid that if I can

dull marlin
#

@deft fiber I managed to fix it. I'm not sure why I did this but the rendering was set to deferred, not forward.

#

Now I'm just having an issue with light bleeding between the meshes.

deft fiber
dull marlin
#

Yeah I do remember playing with lighting a little before and I'm surprised it works with forward and not deferred.

deft fiber
#

"Light bleeding" with realtime lights happens usually if there's no shadow casting to stop the light

dull marlin
#

Yeah, unfortunately in this case shadow casting is turned on for all of the room lights.

deft fiber
#

Who knows, maybe that works in inverse as well 😄

dull marlin
#

Haha nope! I've spent many-a-hours trying to fix it.

#

I believe combining meshes can fix it though, so I'm trying a resource from the store at the minute to see if that does it.

deft fiber
#

Why do you suppose that?

dull marlin
#

I read something that, by combining meshes you're pretty much eliminating any way that lights can manage to fit through any cracks that would cause bleeding.

deft fiber
#

What type of "light bleeding" is it anyway?

dull marlin
#

Uhh let me get a pic, sec.

#

Main light source is from below.

dull marlin
#

Combining meshes didn't work unfortunately, like you said. Or at least it doesn't merge any vertices.

deft fiber
#

In that situation I would try to confirm that shadow casting works with any mesh at all

dull marlin
#

^ That's from the same light you see in the first picture.

deft fiber
# dull marlin

There's light reaching under the table without casting any shadows, so that suggests there's also a shadowless light illuminating that room and probably the next rooms over

thorn flower
#

hey - total noob here

developing for low-end mobile devices here
am noticing some gains if i switch from "Lit" to "Unlit" shader on many props in scene which are static and are not moving anywhere
is there something like "baking" to bake whatever these objects would have looked like with Lit shader - to bake that in advance and leave them with the more performant "Unlit" shader?

safe pewter
#

Question about light baking.

I want to switch between two different baked lighting maps (there's a part where the lights switch off, and my scene is fully lit by only emissive materials). I know this is possible, but I'm not sure if light probes will respond to this change?

chilly kettle
chilly kettle
deft fiber
#

@thorn flower Baked Lit shader already does that to an extent that's practical
Though there's no system for it it would be possible to save all apparent lighting to an unlit texture, but in most cases it would end up looking really weird

#

A huge portion of lighting is dependent on viewpoint, such as specularity and fresnel, which cannot be correctly saved to a texture

#

Unless the viewpoint never changes, but at that point you could save that part of the level to a static image in the style of the original Resident Evil

toxic rover
#

Is there a way to make a light not cast shadows but not go through meshes?

deft fiber
toxic rover
#

Yeah

#

welp seems like I'll have to implement the lighting system the tutorial i was following has

deft fiber
#

Light layers are useful for blocking light in one room appearing in the adjacent room

thorn flower
#

i thought the result of the URP/Lit shader is possible to fully bake onto a model, but i dont know the first thing about 3D lighting so if there's anything about a lighting shader which dynamically shades different based on angle / viewpoint then ye forget about it

obtuse minnow
#

is there a way to light/brighten an individual object?

#

it would seem layers and a culling mask is the answer

rough kestrel
#

can someone help with lights baking

#

i want every tile to have exact same level of light from every side

#

with the exception of tiles that are in range of lamp

chilly kettle
#

Use Environment Light and only your lamps for additional light.

rough kestrel
#

every tile has random light then

#

and i wanted all of them stay same unless near lamp

chilly kettle
#

they dont look baked

rough kestrel
#

before bake they all same light

#

after baking they look like this

chilly kettle
#

show me import settings of the tiles

rough kestrel
#

where that

chilly kettle
#

Let me google that for you

rough kestrel
#

a im using default unity light

chilly kettle
#

???

rough kestrel
chilly kettle
#

i want to see the import settings of the tile, not of the lightmap ^^

rough kestrel
chilly kettle
#

Thats the texture 😄
I mean the Mesh / 3D Model

rough kestrel
#

default unity quad

#

no idea how to access it i double click but dont show anythingh

chilly kettle
#

okay. default unity quad has no import settings

rough kestrel
#

for some other tiles i use default unity cube but it has same broken light

chilly kettle
#

And your Baking Settings?

rough kestrel
chilly kettle
#

Well. Try it with Lightmap size like 1024 and a Resolution of 40

rough kestrel
#

aw hour long generation

chilly kettle
#

You should Bake with GPU (unless you dont have one 😄 )

rough kestrel
#

okay so other thing

#

can i bake light on non static objects

chilly kettle
#

Nope

rough kestrel
#

because these have regular light

chilly kettle
#

To have a simulation of baked light on dynamic objects you use Light Probes

#

Or bake them static and set them dynamic after bake

rough kestrel
#

baking currently visible dynamic light would be best

#

because it affect all objects and dont have random light problems

rough kestrel
#

it all dirty now

#

not looking as good as dynamic light

rough kestrel
#

light look very smooth hoever

#

but i dont want light difference between static and non static objects

rough kestrel
#

i noticed it gets better when i set higher enviromental samples

#

but it automatically gets darker when tile is next to wall

#

how i not make it darker then

rough kestrel
#

i tried everything is there real no way of baking everything with same light level

rough kestrel
#

is there any way of setting light bounce to 0 and still light up meshes

#

as they always get black then

olive python
#

how to fix <333 ? ?

#

something with transparency ? full alpha it not occur

#

Only happens in fog

#

disappears when closer

chilly kettle
deft fiber
# rough kestrel every tile has random light then

For future reference this issue happens when lightmap resolution is so low that the padding between meshes consumes all their space on the lightmap so your tiles end up with a lightmap UV scale of 0

deft fiber
olive python
main wolf
olive python
#

No fog

safe pewter
#

just to confirm, unity will use the second UV map for lightmap baking, correct?

dull marlin
#

Hey guys, quick question. How do I go about making it so only one point light is visible on one certain camera?

#

I set the Layer of the Point Light to LIGHT, and removed the LIGHT layer from the Culling Mask of the Main Camera - I figured that might of been enough but it doesn't seem to be working as expected when looking through the secondary. I'm not sure if it makes a difference or not that I'm using the Secondary Camera as a Render Texture through the First Camera.

#

For reference.

chilly kettle
dull marlin
#

I figured it would too. I saw someone similar online say it wasn't working for them either and it came down to the conclusion that Unity's URP ignores layers for lights in particular.

chilly kettle
orchid jacinth
#

a bit of a new question but when baking lighting, is there any way to fully see lighting changes you make to lighting sources or do you have to generate lighting to see the full visual change?

chilly kettle
#

And if you are happy with the result higher the texel resolution and make a final bake

orchid jacinth
#

thank you!

timber lichen
#

Hello, Im having some issues with lightning on my 3d game. My game works perfect when i play each scene separetly but for some reason, when I try to play from the main menu every single scene becomes darker than it is. And it is worse when I play it from the build

#

How can i fix it?

chilly kettle
#

You load a scene to your main scene?

timber lichen
#

what do you mean?

chilly kettle
#

Do you load a scene to your main scene? 😄

#

or how do you change scenes while playing?

timber lichen
#

with a script that changes me to the next scene

chilly kettle
timber lichen
#

tysm

chilly kettle
#

Google first Entry.. 😄

timber lichen
#

i searched it and i found nothing

#

It says that if I play from the build that shouldnt happen

#

but it happens from some reason

chilly kettle
timber lichen
#

Thanks!

#

Maybe this will work

#

😄

safe pewter
#

of course the scene i spend the most time on has the worst issues with baking REEE

#

letting generate lightmap UVs looks awful. Making them myself in Blender looks awful

#

trying to do different iterations with different settings is awful because it takes 5 minutes for it to finish baking

#

fun fun fun

#

if anyone has any idea on what I can do to make this easier (yes I have turned down resolution on my bakes for previewing. yes I am rendering with my GPU - my RTX 2080)

chilly kettle
#

what exactly looks aweful?
And how does your scene look when baked?

safe pewter
#

lol

#

thats what it looks like baked.

chilly kettle
#

Well, thats not what normal bakes look like xD
Do you set them to static? 😄

safe pewter
#

yes

chilly kettle
#

What are your light sources?
Its weird because i see no shadows or something 😄

safe pewter
#

Emissive materials.

chilly kettle
#

which are emissive?

safe pewter
#

sky texture and the lights

#

every other scene I have has baked fine with no lights and just emissive materials

#

all objects I want to have baked lighting have second UV maps for lightmaps. for example:

chilly kettle
#

Well.. hard to tell.
So whats the difference between your scenes?

They have complete different style. Do you use some asset store props in your scene where the light is not working?

#

a weird shader? or something?

safe pewter
#

they literally use the standard unity material

#

thats it

chilly kettle
#

what happens if you put some of your models from the weird scene to the good scene and bake it?

#

try to figure out where the problem is.

safe pewter
#

apart from the water objects which aren't marked to be used with baked lighting

safe pewter
#

yeah props (like this slide) seem to render fine in the other environments

chilly kettle
#

looks better

safe pewter
#

recommended margin for baked light map UVs? I'm having a lot of seam issues

north lagoon
#

how do i make this look better

olive python
#

how to fix 333

deft fiber
safe pewter
deft fiber
safe pewter
#

literally everything I see about making UVs for lightmap purposes tells me to use lightmap unwrap.

deft fiber
safe pewter
#

so what else am I supposed to do?

deft fiber
ornate glen
#

where can I find 2d point light? there is no 2d point light in the lightning part

#

nvm they rename it

vestal canopy
#

also bake the lighting for best results, there will be gorgeous light bouncing

safe pewter
deft fiber
#

It's based on angle, instead of naively tiling all quads together
Indeed considering Unity has no concept of quads

#

The lightmap UVs can be perfectly fine and it can still end up looking messed up due to a number of other problems, such as wrong object scale, UVs that don't fit the total lightmap resolution or margins that are too small/big

#

Or problems entirely unrelated to UVs

polar wadi
#

Is there an easy way for culled mesh to still cast shadows?

#

OK nevermind, setting the mesh renderer lighting cast shadows option to two sides fixed the issue. Just need to figure out how to not get this weird not shadow area just next to the wall.

#

One solution suggested by Unity is to shrink the UV map a little but it's a bit of a hassle to handle floor tiling this way

#

Found again, Slope Scale Depth Bias on my directional light fixed the issue too, nice 😄

vestal canopy
#

thats what baking lights is about

vestal canopy
#

you bake the lighting information

#

you have to set the mode to baked , set it to mixed if you also want it to cast realtime shadows on moving objects

deft fiber
#

This type of light leaking is not related to UVs at all, but rather how shadow casting renders mesh geometry less connected than it visually appears

#

If the light leaking is happening specifically in baked lighthmapping specifically because there's no margins between UV islands, then changing UV size would help

north lagoon
vestal canopy
#

plus, you can always lower your baked lightmap res to make it faster

north lagoon
vestal canopy
#

i have never heard of that

north lagoon
#

im on a laptop

vestal canopy
#

here, on the lighting window

vestal canopy
bleak sorrel
#

is there a way to disable texture filtering on shadows?

random spire
#

Would anyone like to assist me in fixing my lighting as it seems no point lights or pretty much every other light besides directional doesn't work.

little condor
random spire
#

URP

random spire
#

I've been at this for several hours with no help from google

little condor
#

No point doing a call because I might not be able to help and it'll be a waste of both our time. Take a screenshot your Unity editor where you have selected a light that isn't working as you expect.

random spire
#

There's no light at all

#

Im baking it right now

little condor
#

If you're baking and there is no light map showing, are your objects set to Static and your light set to Mixed or Baked?

random spire
#

Its static

#

And its set to baked

little condor
#

After the bake, can you see anything in the debug 'Baked lightmap' view? You might have to increase the lightmap expose to see the lit parts.

random spire
#

dubug Lightmap View ?

little condor
random spire
#

What am I looking for here

little condor
#

It should show you a sort of black and white image of your baked map, i.e. the lit and shadow parts.

random spire
#

Thats it

#

Uh chief something wrong here

little condor
#

If you just have a single spot light, try increasing the power of it, and maybe increase it's range too. Bake again and see if you can see any effect.

Also, use that slider to increase the expose of the lightmap as the lightmap might be really weak and can't be seen clearly.

#

But if your light is set to Bake and your objects are set to static, there shouldn't by any issue. The texel density on your meshes look a bit odd, but that shouldn't be the reason for no light showing.

random spire
little condor
#

Yeah, don't worry about that at the moment. Can you increase the intensity of the light to 400 and increase the range to 30, then re-bake? Just want to see it 'some' light appears.

little condor
#

And did you see any light in the lightmap?

random spire
#

Is only lighting the acid under the ramp

#

That's really weird

#

the only light on any thing else are the reflections on the ramp

random spire
#

pain

random spire
# little condor And did you see any light in the lightmap?

is this important There are 1 objects in the Scene with overlapping UV's. Please see the details list below or use the 'UV Overlap' visualisation mode in the Scene View or Lightmaps in Lighting Settings for more information.

  • default: 267 texels
#

I think I might have fixed it I changed my model from fbx to obj and seems to fix the problem

thorny goblet
#

Okay, so i was told to use area lights to make my windows look more realistic, but my area light on my emissive object, isn't emitting any type of light.

#

Could any other type of light work?

mellow sierra
#

If you're using URP, area lights are baked only.

thorny goblet
#

ok

little condor
little condor
# random spire I think I might have fixed it I changed my model from fbx to obj and seems to fi...

Overlapping UV's are important on baked lightmaps as it can lead to incorrect shows being applied to models. For example, if you had a model of table and the top and bottom of that table had overlapping UV's then you would find that underside which should all be shadow might have light artefacts on it, and the top of the table might have shadow artefacts.

When you imported the Obj file, maybe Unity recalculated the lightmap UVs for you. You can manually do this if you select the model in your Project window and in the inspector select the Model tab and scroll to the near the bottom of the properties. There's a Generate lightmap UVs option in there.

polar wadi
#

How can I get my point light to shine through the glass of this window ?

#

using HDRP

deft fiber
polar wadi
#

If I turn it off, the frame won't cast shadow either.

#

In the end I found the option under Alpha Clipping -> Use Shadow Threshold which allowed me to only hide the glass part of the window, thanks 😉

#

Only downside is this option seems to use alpha from the texture only, but my texture is actually fully opaque and it's the color which makes the glass transparent. But that's ok for my use case

deft fiber
polar wadi
#

Yes, that's one solution indeed

drifting panther
#

what could cause black boxes randomly popping up on screen? It happens when I add a lot of light sources, it's kind of annoying

#

any idea why?

deft fiber
drifting panther