#archived-lighting

1 messages Β· Page 6 of 1

timber lichen
#

i tried to bake a light so i will have better performance in VR.. I tried. how can i bring my old light setting back?

#

because this literally looks ugly...

#

it supposed to be dark..

arctic isle
#

Click the downward arrow button next to Generate Lighting and select Clear Baked Data

night shell
timber lichen
night shell
#

yeah I know but I can try to help you with the baked lighting to get it to where you actually need it

timber lichen
night shell
#

I work with lightmaps too much so πŸ˜›

timber lichen
night shell
#

back to realtime that is?

#

it should be as simple as clearing the lightmap data

#

as @arctic isle showed

timber lichen
#

how it looked like before i did this

#

i want to bring old one

night shell
#

yeah there are ways to get it closer

timber lichen
night shell
#

you can get it close to the old one yes

timber lichen
#

im bad at lightin

night shell
#

its alright, gotta start somewhere

timber lichen
night shell
timber lichen
#

also this 😭

timber lichen
night shell
#

I can walk you through it, though lets move into a thread before we clog this channel up

timber lichen
#

okay

night shell
#

well

#

I suppose anyone else needs help with lightmapping?

#

thats two days in a row now πŸ˜›

celest star
#

anyone know how to start from a base project and make lighting similar to this image from karlson?

radiant kettle
#

Adding a Spot light, I get only black and white, same thing for point light, how can I tweak it so it also shows colors?

#

It works properly using a directional light, but it's the only one I managed to make show colors

#

Apparently it's just with the grass

#

Example with directionnal:

deft fiber
# radiant kettle

Sounds like an error in the shader
Perhaps when calculating additional lights, the result is converted to single channel value at some point

night shell
#

just large spotlights, I see alot of indirect bounce lighting so I'm betting that its either baked lighting (probably mixed lighting in this case if I had to geuss) or using enlighten, and ssao from the looks of it (judging by how there is AO even in the direct light of the spotlight) and some other post processing effects, bloom, chromatic aberration, vignetting

celest star
night shell
#

the problem is that you don't end up with that lighting right off the bat, there are steps you have to do to achieve it

celest star
#

would i need to change stuff with the directional light or in the lighting tab?

night shell
#

well assuming you have your level geometry

#

and given that screenshot is of an interior

#

you would do away with that directional light

celest star
#

ok

#

so i would just need to use spot lights as my lights?

night shell
#

yes

night shell
celest star
#

would i need to get rid of the skybox?

night shell
#

yes

celest star
#

should i set it to one color for the skybox in my camera and lighting tab?

night shell
#

sure yeah

#

and make it black

#

again in that screenshot it looks to be all interior with no windows, so no reason for there to be any sky/ambient lighting from outdoors

celest star
#

ok thx

#

yeah thats what im trying to do just make a fully interior map

radiant kettle
radiant kettle
#

Here's the section that probably has an issue:

Pass
{
    Tags
    {
        "LightMode" = "ForwardAdd"
    }

    Blend One One

    CGPROGRAM
    #pragma vertex vert
    #pragma geometry geo
    #pragma fragment frag

    #include "UnityCG.cginc"
    #include "AutoLight.cginc"
    #include "UnityLightingCommon.cginc"

    float4 frag(geometryOutput i, fixed facing : VFACE) : COLOR
    {
        float3 normal = lerp(i.normal, -normalize(i.world.xyz - _WorldSpaceLightPos0.xyz), _TranslucentGain);
        float viewDirection = normalize(_WorldSpaceCameraPos - i.world.xyz);

        float3 lightDirection;
        float attenuation;

        float distanceToLight;

        if (_WorldSpaceLightPos0.w == 0.0)
        {
            attenuation = 1.0;
            lightDirection = normalize(_WorldSpaceLightPos0.xyz);
        }
        else
        {
            float3 vertexToLightSource = _WorldSpaceLightPos0.xyz - i.world.xyz;
            distanceToLight = distance(_WorldSpaceLightPos0.xyz, i.world);

            attenuation = 1.0 / distanceToLight;
            lightDirection = normalize(vertexToLightSource);
        }

        float NdotL = saturate(saturate(dot(normal, _WorldSpaceLightPos0)) + _TranslucentGain);

        float3 ambient = ShadeSH9(float4(normal, 1));
        float4 lightIntensity = NdotL * _LightColor0 + float4(ambient, 1);

        float4 col = tex2D(_GroundTexture, i.uv.zw);
        col *= lightIntensity;

        float3 ambientLight = UNITY_LIGHTMODEL_AMBIENT.rgb * col;

        float3 diffuseReflection = attenuation * _LightColor0.rgb * ambientLight
            * max(0.0, dot(normal, lightDirection));

        return float4(distanceToLight, 0, 0, 1.0);
    }
    ENDCG
}
broken leaf
#

does anyone know why I get these weird artifacts when baking global illumination?

#

its like some areas are higher resolution than others

#

here are my settings

#

im very new to unity

night shell
#

that happens when you have geometry with no backfaces

#

quickest way to fix it is actually setting the double sided GI property on your material settings (or if that option isn't on but you have an option to set the render faces mode or culling mode, make sure it is set to both so both front and back faces are not culled

broken leaf
#

ok ill try this thank you so much πŸ‘

broken leaf
#

ah i see what happened

#

i had stuff hidden blocking the way and i didn't realize that it would still interfere with the bake πŸ˜‚

cedar vale
#

why are bullet holes like that in the shadow

chilly kettle
#

Well, I would disable the shadow for a bullet whole, makes no sense for me ^^

tired edge
#

Hello ^^ I have a question regarding the URP spotlight.... For some reason the range of the spotlight is light very small.... If I Increase the Intensity to like 80 or 300 then the range is good but if I go close to something then it very bright. I know the build in / URP light works different but I am trying to understand it and set it up and achieve something similar with what I had in build in. I mostly trying to make a flashlight. I seen a lot of different workaround for it but I am just curious how to accomplish this? It is like the Range has no effect. I put the intensity to 4-8 and increasing the range does absolute nothing about 10.
Am I missing something ?^^

#

few ideas I had which are not ideal :
-changing the color of the light depending on the distance of the object he looking the cloesr you are the darker the color is (but looks weird and I dont thing looks good)
-changing the intensity depending on the distance (I dont it is recomended to do this and again it doesnt look good)
-Having the Intensity really high and changing the range depending on the distance (I havent tried that but maybe?)

deft fiber
# tired edge Hello ^^ I have a question regarding the URP spotlight.... For some reason the r...

"Range" is only for limiting the light's maximum effective range so you can exclude objects from its influence for performance or artistic reasons, not for extending it.
Built-in RP uses linear light falloff, whereas URP uses inverse squared, I believe, so lights will always get exponentially brighter/dimmer by distance.
Unless you modify your URP to use linear falloff you won't ever get it to be fully similar.
The harsh falloff is there for rendering realism and you can get pretty far with it as long as you're using linear color space, HDR and tonemapping post processing

tired edge
#

What is a good starting intensity then?

#

because 8 I can hardly see anything bit further ...

#

Have to like go real close to them to even see something

#

do you have any recommendation ? πŸ™‚

#

maybe my scene is broken or bugged

#

yeah something with my FPS set up causes the light to act like that... hmm

#

Ill investigate because when I use just a main camera and spotlight then it works fine

tired edge
#

Ok solved it^^ I figured it out thanks.

lyric gull
#

Do I need to place Light Probes in every room of my big castle scene or where / when ever place light probes ?

arctic isle
#

Place LightProbes wherever you will have dynamic objects that will receive indirect light

lyric gull
arctic isle
#

yep exactly

lyric gull
bronze charm
#

sorry for the n00b question, but what does "UV" stands for?

arctic isle
#

Doesn't exactly stand for something, it's like saying XY
https://en.wikipedia.org/wiki/UV_mapping

UV mapping is the 3D modeling process of projecting a 3D model's surface to a 2D image for texture mapping. The letters "U" and "V" denote the axes of the 2D texture because "X", "Y", and "Z" are already used to denote the axes of the 3D object in model space, while "W" (in addition to XYZ) is used in calculating quaternion rotations, a common o...

arctic isle
cedar vale
thorny goblet
arctic isle
#

Hey, there is a per-object limit for pixel lights

#

You can

  1. Decrease the number of lights hitting those objects
    OR
  2. Go to Edit > Project Settings > Quality and increase the pixel light count
#

If you're using URP, then you'll find this setting in the URP settings

thorny goblet
#

oh ok i'll try that

thorny goblet
#

Do you want a video of how it looks?

arctic isle
#

Sure

gray obsidian
#

Can someone help me with the lightmapper? I have an indoor office scene which I want to bake light for it to look good I have to increase the Lightmap Resolution to gigantic values, like 1024. I usually see people use values of like 30 or even lower. Why does my resolution have to be that high to look good? The first screenshot has a resolution of 100, the second one is baked with a resolution of 1000.

#

I'm also getting UV overlap errors with values as small as 100. These are the settings:

slate ocean
#

Just a quick workflow question, but when it comes to lightmapping, what kind of static objects are not worth baking and should use light probes instead? I get something like an apple would be too small to be worth baking, but what about a barrel? a crate? a small shelf?

simple viper
#

how do i achieve n64 lighting

#

im having trouble removing directional lighting and adding ambient

limber delta
limber delta
# slate ocean Just a quick workflow question, but when it comes to lightmapping, what kind of ...

Probably best thing is to experiment. I guess it depends on the distance from the camera to objects as well. Not sure if this helps but here's a video on lightmapping where he talks briefly about what you are asking about https://youtu.be/hMnetI4-dNY?t=2877
Small, highly detailed objects seems to be what should be considered

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
limber delta
# simple viper im having trouble removing directional lighting and adding ambient

Here's a great video on how to work with lighting. Basically he starts with a totally dark scene and goes from there https://youtu.be/f6zUot73-gg
You could also try different shaders for your materials (for example unlit shader).

This tutorial is an explanation about dynamic lighting in Unity, and should help you make better looking scenes ! It will go over Skybox, Ambient, Reflection probes and post process.

NOTE : This tutorial is made with Unity 2019.x in mind, and the Built in render pipeline

this is NOT a tutorial for unity 2020.x or HDRP or URP. The theory is e...

β–Ά Play video
arctic isle
# slate ocean Much appreciated!

To add to what @limber delta said, since lightmapping depends on sampling texels, unless you have a really high-resolution lightmap you won't have very good quality on those small high-detailed meshes using lightmapping anyway.

gray obsidian
rustic fable
#

Does anyone have any idea why my light is clipping? (viewport)

#

It depends on where I'm looking at. It's fine in my other scenes

deft fiber
rustic fable
prime wharf
#

Hi im having issues with the custom map that I am working on, Some buildings on the map seem to have some weird line going across them. Has you can see on the screenshots, it should not look like that. I also have an issue where the spotlight is not lighting the scene (it will only appear on certain angles when I look at them.) Please let me know if you have an idea of what the issue could be.

arctic isle
#

LightingSettings @weary frost

weary frost
#

o ya

#

take the widescreen n everything

#

there easier

#

to see

#

i gtg in 2 mins

#

ill see your messages when im back ty for the help so far, i think ill try the cpu just to see if its faster since its significantly better hardware

arctic isle
#

resolution is very very high, drop it to like 20

weary frost
#

kk gotcha

arctic isle
#

and go up by 10s until you get a better image

deft fiber
#

@prime wharf Check texel invalidity and UV overlap debug views

prime wharf
deft fiber
wanton tendon
#

Hello! I'm on the URP with procedural meshes and some brick material, building for Android. I'm unsure what changed, but I'm getting these artifacts in specific areas. Lower right shows how the material looks 90% of the time, upper and lower left show the black artifacts. I'm no artist, it's hard for me to identify the issue. Any idea?

arctic isle
wanton tendon
#

Thanks! That solved it. Will test in VR how it looks and then set the whole project to Non-Directional

wanton tendon
#

Okay - it wasn't working in VR at all. super over-saturated, made the game look like a destroyed visual novel.

arctic isle
#

Yeah you're not getting any of the normal maps that the directional lighting gives. What you see there are not artifacts but small shadows.
Can you share an image of what it looks like in VR? Does it look the same in the editor?

wanton tendon
#

WIt hthe directional baking it looks exactly the same

#

with non-directional in editor it looks great, in VR something like this (not a real screenshot but photoshop to mimic the look)

arctic isle
#

Interesting, can you post about this in the Global Illumination forum? I'll make sure we get some eyes on it.

#

!Forums

tawdry schoonerBOT
#

Have a question that requires a more detailed explanation? We suggest using the forums (https://forum.unity.com/) to ensure a your question is answered more effectively.

arctic isle
#

<@&502880774467354641> can you pin this message ☝️

wanton tendon
#

I'll make a note and try to do it the day after tomorrow. Got a presentation coming and am crunching hard. Will accept the shadow dots until then πŸ˜„

arctic isle
#

In my opinion they look good because they add some depth to the brick material, they come from the surface normals

#

But yes, good luck with the presentation!

wanton tendon
#

They do look good in other places, but there they look like its from another dimension. The difference is just too harsh.

noble fern
#

Hi everyone, I'm trying to bake light but burning spots appear. I've generated UV light maps. All of my light is mixed or baked. I try to help myself but it always finishes burned and dirty.

simple viper
#

how do i disable shadows

#

i want n64 ambient lighting with no shadows

arctic isle
#

Select No Shadows on your Light component

simple viper
#

thanks :D

timber lichen
#

is there a way to use hex codes for ambientlight

#

and if not, how do i convert the rgb values or hex code to whatever the 1,1,1,1 format unity uses is

#

nvm i figured it out

chilly kettle
#

Hello, i still have problems with the uv overlaps when baking. i have no clue why this is happening:

#

i set the scale lightmap to 1.5, but it doesnt change anything for the object scale in lightmap

deft fiber
frail carbon
#

I desperately need help! When ever I play my current game, the baked lightmaps disappear when I exit play mode. The only way I can make it reappear is by generating lighting all over. Any suggestions?

#

Update: It seems to only happen when I trigger another scene with SceneManager.LoadScene

deft fiber
frail carbon
#

It must be a bug

arctic isle
#

This does sound like a bug we're tracking. Are you baking both scenes together?

frail carbon
#

I'm only baking the first scene

arctic isle
#

The recommended workflow is:

  1. Bake both scenes together
  2. Load scene the scene that now has a folder with lightmaps in the same directory as the .unity file
  3. Load the other scene additively
arctic isle
frail carbon
#

I don't think so

#

Unless it will help my problem!

arctic isle
#

If you can get away with baking them together then go for that and I'll make a note to check on what issue we are tracking so I can provide any workarounds.

#

(but I can't do that until I'm back at the office)

#

You should also be able to bake them separately if you want, but if they contain light probes you need to do some extra stuff about that to combine the probes from the two scenes

frail carbon
lean moat
#

Does anybody know what's wrong with my baked lighting here?

arctic isle
lean moat
#

My meshes were one sided, but they need to be, so I just created a duplicate without flipped normals, baked the lighting, and then set them back, seemed to work fine.

arctic isle
#

Yep that was the suggestion I had in mind as well. Just make sure your front-facing geometry isn't exposed to back-faces

knotty rover
#

Can someone from Unity tell us if Unity is interested in making some form of UE5 lumen like feature? Having a realtime GI that supports light bounces would greatly improve our games

arctic isle
#

We are interested πŸ‘€

#

Lots to look forward to in srps / weta tools / lighting BUT I am not an official source, just saying we're interested

#

Keep an eye on the Unity Blog for more info on all of that

knotty rover
#

I cannot wait until it's officially confirmed that we'll get some form of realtime GI with bounced lighting support.

For example: at the moment scenes are pretty dark without bounced lighting, and as a countermeasure we have to place more point lights and increase the range which sucks performance especially with shadows, some form of realtime GI with bounced lighting will drastically reduce the amount of point lights needed to illuminate a scene and will add a very realistic look, I'm pretty sure it'll be taxing performance as well, but it's better than having tens of light sources per location.

#

UE5's lumen gives a very realistic lighting behavior and as Unity devs we felt left out lol

I'm pretty sure their implementation is taxing performance as well, but seems like they introduced Nanite to win back some frames, so if you're taking notes, it'll be great if Unity also introduced auto LOD for better performance.

deft fiber
frail carbon
arctic isle
frail carbon
magic ether
#

can somebody please help me, baking lights just isnt working for me, anybody have any ideas?

First one is after bake, second one is before bake

deft fiber
#

That said I haven't seen anyone get very good results when baking lights for voxel-based scenes
There's often way too many seams to account for and there's no practical way to conceal limitations with lightmap compression or resolution, due to the simplistic pixel textures

timber lichen
#

I'm trying to add a spotlight in HDRP and only the shape box works

#

Cone or pyramid aint working

runic quarry
#

I baked the lighting in my scene, and for some reason this single object is glowing and completely blowing out the entire screen when it comes into view

#

it doesn't have any emissive material on it and even has a low smoothness
also besides the directional light there are no lights in the scene

#

this is what the scene is supposed to look like (a different location in the map)

#

it just appears to be that single object that's glowing

#

there is bloom enabled in post processing, but it's extremely minimal (see blue vending machine in above screenshot)

#

the only answer I found online said to uncheck "stick seams" in the mesh renderer, but that didn't work

upper fable
runic quarry
#

it's a very simple urp lit shader graph

upper fable
runic quarry
timber lichen
#

this should probably count as lighting, having this issue where when i run the Game scene it looks normal (top), but when I run the Menu scene and then go into the game it looks dark (bottom),

this does not happen when i start in the Game scene, go into the menu scene, and back into the Game scene, only happens when i open with the menu scene

(i use a directional light with shadows)

dusky bay
#

its something that happens when you change scenes yeah

#

i think it was something to do with auto generate lighting in the lighting settings or something

timber lichen
#

oh yeah okay so i did that and now its always broken so i can probably just lower the shadow strength

timber lichen
#

where exactly is that

#

oh i found it had to turn off auto generate

#

seems to be looking good now

arctic isle
chilly kettle
# arctic isle Which version are you on?

Hey, how deep are you into unitys Lightmap UV Generator? πŸ˜„ Having trouble for a while that the uv shells get placed to dense so i have many overlapping lightmap Uvs

arctic isle
chilly kettle
#

Ok, is it possible that i create that post NOW and you give them a hint to look into it? πŸ˜‚

arctic isle
#

No guarantees but yeah I can give them a nudge

chilly kettle
#

great, thanks πŸ˜„

round fox
#

Does anybody know why this point light only shows light on the floors and not on the walls?

#

in the screenshot it looks like it does but trust me it doesnt ingame or on my screen right now in scene mode

limber delta
#

@arctic isle I hope you don't mind me pining you. I was wondering if you know why area lights in the URP acts like spotlights? It's a question I haven't been able to find an answer for.

limber delta
round fox
#

yes i figured it out. tnx

limber delta
#

and what was the issue?

round fox
#

dark material

limber delta
#

ah πŸ™‚ ok

arctic isle
arctic isle
#

So I am 99% sure this also happens in built-in. I think if you increase the range it will go away.

limber delta
#

Yep, it does get smoother by increasing the range but sometimes that causes other issues as the light bleed in into spaces below.

arctic isle
#

Are you trying to get a perfect square on the floor? You could use a cookie to get the shape you want

round fox
#

In the first image a couple lights is turned on in the hallway but in the seconds picture none of them are turned on. The point lights used here are turning on and off by itself. when i get close to them, they turn on, when i get further away, they turn off. The light component doesnt turn off just the visual light. And its not just in scene view its also in game view and in a build version. pls help!

arctic isle
fickle needle
#

or reduce the amount of lights you have, and/or their range

limber delta
round fox
round fox
fickle needle
#

you will lose MSAA antialiasing though, you can possibly switch to forward+ as well

merry turtle
#

I'm a complete noob to lighting, I baked my lights and it ended up looking like this, I don't know what is happening but how do I fix it?

fickle needle
#

same with invalid texels

round fox
fickle needle
#

This is HDRP, so a bit different, but it should be similar

round fox
#

I have no pipeline

fickle needle
#

Oh, I thought you were using URP

round fox
#

i have installed post processing and i am using it on my camera

fickle needle
#

been a while since I used built-in, I think you can do it from the camera in built-in.
Click on your camera, you should find it there

fickle needle
#

forward/deferred rendering path

round fox
#

oh i see, what should i change it to again?

fickle needle
#

deferred

round fox
#

Ohhhh

#

noww

#

thanks

merry turtle
#

I was re-baking it it looks about the same

fickle needle
#

shading mode, should be under the scene tab somewhere

#

this is how it looks in 2022.2, I believe it's different In previous versions but should be around there.

merry turtle
#

the checkerboard is the default result right?

#

I don't see any red around anything

arctic isle
#

It's overlayed over the actual debug view

fickle needle
#

if nothing is red, for overlap UVs view and invalid texels, then it could be something else

#

I noticed stich seams can cause these types of issues, slight light leaks in corners, you can disable it per object in your scene, and rebake

harsh swan
#

can you help me ?

fickle needle
#

actually, giorgos, any ideas why that happens? I noticed meshes with very few polygons end up with light leaks in corners due to stich seams

#

is it supposed to have some edges to work with? This usually happens with things when an object has very few polygons

merry turtle
#

I re-baked everything and the lighting still looks odd, and that light leak is still there?

fickle needle
#

how many texels?

arctic isle
merry turtle
#

I don't know where to check the texels

fickle needle
#

in your lightmap settings

arctic isle
#

It's the Lightmap resolution

merry turtle
#

I think these are just the default settings

arctic isle
# harsh swan can you help me ?

Hey for this exception to go off, either your "RenderSettings" or your "LightmapSettings" are null for the scene you're trying to build

fickle needle
merry turtle
#

I was about to say

fickle needle
#

Also you might want to switch to the GPU lightmapper, and disable progressive updates, & reduce max lightmap size to 1024

merry turtle
#

I thought I saw the option to change the seams on it but I can't find it now, yes it is set to 4 (stitchable)

#

I'm going through and disabling stich seams

fickle needle
#

just try it on a few meshes that had light leaking and see if it fixes it, no need to do it for all scene meshes

merry turtle
#

for context, this scene is pretty static, I don't think I will have anything realtime, the most that really happens is that a door will open

arctic isle
# harsh swan how i can fix id

Go to Window > Rendering > Lighting and make a new Lighting Settings asset at the top and assign it for all your scenes.

#

I will assume that "RenderSettings" means render pipeline so if that's missing you'd probably be able to tell or your project is broken somehow

merry turtle
#

I'm baking it again now

harsh swan
night shell
#

bookmarking...

merry turtle
#

that didn't fix it

merry turtle
fickle needle
merry turtle
fickle needle
#

try reducing padding to 4, if it doesn't help, check the thread
also make sure your meshes have generate lightmap UVs on, set to calculate mode and minimum Texel's set to 15
(if using custom meshes with no manual lightmap UVs)

merry turtle
#

Where's the setting to check if the mesh has "generate lightmap UVs"?

night shell
#

locate the model in the project view, and in the inspector tab on the bottom you should see the option to generate lightmap uvs

merry turtle
#

thank you, just found it! Mine's set to 40 (I don't believe I changed this)

#

I'm going to try one more time then I'll look to the thread

#

anything else I need to change before that though? Baking takes about 5-10 minutes

night shell
#

what do your settings look like for lightmapping @merry turtle

#

oh wait you just posted them

night shell
merry turtle
#

I'm looking at the thread

#

I did change it to 32 (and the other stuff) but the light leak is still there

night shell
#

if there isn't, then there is no reason to have enviormental lighting or directional lights in your scene

merry turtle
#

no windows

night shell
#

well in that case remove any directional lights you have

#

if there is a skybox/enviorment lighting you should also remove them/disable/drop the intensity to zero

#

that should solve your light leaking

merry turtle
#

I took out the directional light but why are some of the floors missing?

merry turtle
#

What should I tweak now?

night shell
#

lowering the sample counts definetly does make things ugly, but clearly also reveals to me you aren't using any dedicated light sources in your scene

#

I would use point lights for those ceiling lights (and also exclude them from the bake so the point lights don't get occluded by the emissive shape you have, which should also reduce the blobby/noisy artifacts caused by the low sample counts from emissive only sources)

merry turtle
timber lichen
radiant kettle
#

Is there a way around this?

deft fiber
#

@merry turtle With how many UV seams you have and how much padding there is, there doesn't seem to be enough resolution, which is a common problem when trying to bake with a lot of small disconnected level geometry
Your best way to defeat all these problems is to get familiar with baking by practicing it in a much simpler scene

deft fiber
# radiant kettle Is there a way around this?

No
Though it depends what you consider your options to be
By that I mean that you cannot make Enlighten do realtime indirect bounce shadowing for lights other than directional, but maybe can use different types of lighting

eager coyote
# merry turtle

Are you building your scene using a lot of small, independent geometry? I'm seeing a LOT of seams.

merry turtle
#

I am using only emissives, those lights were just using an emission map

radiant kettle
deft fiber
radiant kettle
#

Okay, thanks

night shell
#

Unmark the contributw GI flag on those emissive objects

deft fiber
merry turtle
#

I see

merry turtle
night shell
merry turtle
#

I unchecked that already, does the point light not have the contribute GI flag, and only relies on the mode I set it to?

night shell
#

Techically it does have that flag but because its a light it only relies on the mode you set it too

merry turtle
#

I see, should I just bake again now?

night shell
#

Yes

#

Wait

deft fiber
#

@merry turtle @night shell It would be really practical to use a thread for this

tall whale
#

hey guys! so when i walk around in my scene or move the camera in the edit view around my lighting it flickers for some reason. does anyone know how this could be solver?

wanton tendon
#

Any idea where this might originate from? Too many overlapping light sources while baking? Or can someone give me a hint for a keyword to google for?
Thanks!

tall whale
night shell
#

increase light limit in URP settings if you are using URP

#

if you are in built in pipeline you increase the per pixel count in the quality settings

arctic isle
night shell
#

thats a temp solution though

#

you need to look into light baking since you have too many per pixel lights

tall whale
#

where would you increase the light limit

wanton tendon
night shell
#

if you are using built in

tall whale
#

tahts all i see

night shell
#

wrong place

#

thats the lightmapping panel

#

are you using built in pipeline or urp @tall whale

tall whale
#

urp, sry

night shell
#

you'd find the light count on the URP asset itself

#

on quality settings good chance that the asset is already assigned

tall whale
#

ok ya now i got it

night shell
#

you can click it and adjust the settings on the asset istelf

#

I would also look into light baking because you have too many per pixel lights if there is that much flickering

tall whale
#

ok all fixed! thanks, i didnt have the urp selected

#

whats a way i can fix this?

#

the lighting is off on that wall because the directional light is being pointed in that direction but its an enclosed box so idk wahts going on

#

i also have a baked map on this wall too

wanton tendon
# arctic isle Texel validity artifacts, you have backfaces in your scene

Praise your wisdom! Roommesh is procedurally generated, the tiles above the window were ceiling and floor tile, resulting in two meshes with opposite normals on the same spot. Switched two lines in extremely complicated meshmaker code, fixed this issue and 2 others I've had. You saved my weekend. Can call it a day, lol!

crystal zephyr
#

for some reason the lights in my game won't work at all

#

they don't change, they won't let me change them, they just won't work and i even cleared baking many times

#

and i have to have this damn game done tonight

#

now when i bake it, the lights just go out!

night shell
#

light leaking into the room?

soft edge
#

Hey there! Hope this is the right channel for this.
My shadows look detached the further I zoom out. How would I go about fixing this? (using URP)

#

Changing the depth and normal bias to 0 (in render pipeline asset -> Shadows) does help a little bit, but there's still a clearly visible line between wall and shadow

woven badger
#

Hello, for some reason every time I try to bake lighting in my project, it just gets stuck at "Baking..." and says like that to the point to where my whole pc starts freezing

#

ive tried making a new scene and it still happens

#

even when just baking a point light on a default cube

night shell
#

but sounds like its pointing to that your system isn't that capable

#

there are ways to get around it and make it so its not as intensive

silver grove
#

Gotta increase it for long range

crystal zephyr
#

question, how do i make it so then having two lights doesn't cause extreme blind spots in my level?

#

i have to have my game tonight and i really need an answer to this pretty fast

drowsy scroll
#

Heyo, a quick question.
So I created this hole in the ground and it seems that the lighting in the scene doesn't seem to cast shadows in it.
It is completely lit.
Is there a way to make the inside of the cave dark?

crystal zephyr
#

@summer aspen do you by chance know about specific lighting issues?

summer aspen
#

@crystal zephyr Don't tag people not in conversation with you.

crystal zephyr
#

my apologies

soft edge
woven badger
#

just out of no where now

spark pasture
#

Does anyone know why in HDRP a light has to be THIS HIGH to actually look good

#

I am bad at lighting

idle hinge
#

anyone know why the area light is making the shadows like this? the archway is supposed to cast a shadow from every part but the area light goes through the top for some reason

lean moat
#

Anybody know why my realtime lights aren't working in the build?

#

I can't use baked so realtime is my only solution, however it won't show up in the build

#

Editor

warped trout
#

should it really take about 6 (went up to 9) hours to bake this small room with 1 single light?
im baking on my rtx 3060ti

deft fiber
warped trout
#

think something must have bugged for a moment

#

changed settings back and forth before and now its going basically instantly

#

i think i might just need to look up how to get this light baking thing to work

deft fiber
warped trout
#

gave it crazy high settings, turned off and on static on almost all objects and no global illumination calculation happened

slate ocean
#

I'm having a bit of confusion when it comes to modular asset workflow when they contain both exteriors and interiors. The reflection probe from outside seems to be affecting the walls on the inside. The exterior/interior walls are a single mesh, so I guess I have to separate them into their own mesh and object. But this just doubles the amount of work that needs to be done. Is there any good resources on lighting for both exteriors and interiors simultaneously?

arctic isle
warped trout
arctic isle
warped trout
#

also, i cancelled the problematic baking before
does that matter?

arctic isle
#

No that's ok

arctic isle
#

@warped trout can you send me Editor.log-prev?

little condor
# spark pasture Does anyone know why in HDRP a light has to be THIS HIGH to actually look good

To get good indoor lighting without blowing out the Lumen values, you need to adjust the default post-processing volume overrides. So I create a new volume and add the following two changes:

  1. A Visual environment with Sky type = none. Since you're indoors, you don't want the sky to contribute to the lighting.

  2. Enable and set the Exposure settings.

If you're using area lights then you might find the ceiling doesn't receive any light. In this case you'll need to bake your lighting. If you do this, I find setting the Indirect Intensity to 2 or 3 gives better results, but you might have to experiment yourself.

spark pasture
#

Oh yeah

spark pasture
#

Thank you though

soft edge
silver grove
#

Have you tried messing with the shadow bias of the directional light?

deft fiber
# slate ocean I'm having a bit of confusion when it comes to modular asset workflow when they ...

Some render pipelines (if not all by now? At least HDRP does) support blending multiple reflection probes over a mesh, so interiors can have their own reflections
Otherwise you do have to split the meshes into inside and outside, which also helps with light probes (Not sure why that would double the work)
Note that there's two kinds of reflection probe blending which can sometimes cause confusion: the kind that calculates the average of two reflection probe per mesh, and the other that calculates probe influence per-pixel over the mesh

soft edge
#

Zooming a little bit closer and the gap disappears.

silver grove
#

what happens if you make the wall thicker? otherwise I'm out of options

#

might just be how Unity handles distance optimisation

silver grove
#

epic

soft edge
#

thin wall no good

#

Thanks a bunch!

silver grove
#

nw πŸ™‚

#

Yeah unity doesnt like double side shadows on planes either, creates cracks through it

#

seeing a pattern here..

soft edge
#

I feel like unity wants to fight me sometimes πŸ™‚

#

phew, that helped a lot for sure. Thanks again

upper fable
silver grove
#

bet

warped trout
#

why is there no difference in light on this

#

vs this

#

both snippets taken after manually generating lighting

#

my lightmapping settings:

limber delta
#

Have you marked your objects as static and then baked your lights?

gleaming kettle
#

Hello, for some reason every time I try to bake lighting in my project, it just gets stuck at "Baking..." and says like that to the point to where my whole pc starts freezing
ive tried making a new scene and it still happens
even when just baking a point light on a default cube

warped trout
limber delta
warped trout
#

the light is separate but its also static

#

gonna check its pos

#

yeah, that was it, it was covered by a mesh

deft fiber
gleaming kettle
#

2019

deft fiber
gleaming kettle
deft fiber
# gleaming kettle

It's not the latest version of 2019 LTS, so updating may help
Upgrading to a newer LTS like 2020 or 2021 could also help solve these kind of problems
Important try is to bake with auto-generate off, as it can be buggy

#

Sometimes restarting the editor and updating relevant drivers solves vague hang-ups as well

gleaming kettle
slate ocean
warped trout
deft fiber
# warped trout Seems like it was yeah

Seems there was some confusion earlier
UV overlap problems are in most cases different meshes sharing the same space in the lightmap, which tends to happen when "generate lightmap UVs" box isn't checked in import settings

warped trout
#

Well, i didnt change anything with the lightmap
I just properly unwrapped each mesh in blender and reimported in unity

warped trout
deft fiber
#

They shouldn't be occupying the exact same space even with non-overlapping UVs, but that still seems to happen without automatic generation

warped trout
#

Yeah i will use automatic generation
I dont have enough knowledge to do any different with lightmaps

timber lichen
#

Does global illumination pre processing lose its progress if canceled partway through?

#

For realtime gi

warped trout
deft fiber
warped trout
raven nymph
#

i convert my 3d models into a 2d normal map and sprite in a render pass before post processing

#

is there a way i can make them work with 2d lights

limpid salmon
#

when i import my model from blender (after fixing flipped normals)
by default has a urp/lit material
the model does not respond to light properly

glad cipher
#

My friend is having a problem with normal maps, he says the light cuts off where the light placed and the shadow moves with the position of the light. He doesn't know if it's the problem with the normal map or something else (had to say this because he's too scared to ask) @sturdy cargo

sturdy cargo
#

yeah

#

this is the normal map

arctic isle
#

Hey there is a limit to realtime pixel lights per object depending on your render pipeline

sturdy cargo
#

im using hdrp

arctic isle
#

πŸ€”

sturdy cargo
#

whenever i move the light source around, the shadow moves with it, but when i don't use a normal map the shadowed section disappears

arctic isle
#

What's up with those 4 tiles being a different color

sturdy cargo
#

this is the roof without the normal map

sturdy cargo
little condor
#

Also, you may need to change some of the texture settings. This could be a DirectX normal map, so get the right shadows I changed the swizzle settings to this:

#

That should give you something like this:

sturdy cargo
#

yep that worked out great

#

thanks mate πŸ‘

inland sparrow
#

how do I make a global light in unity 3d?

#

do I need urp or hdrp

deft fiber
little condor
# inland sparrow how do I make a global light in unity 3d?

There is no "global light", but there is global illumination. This is where objects receive light that has bounced off other objects. Is that what you mean?

If so, then you can either bake the bounced light onto static objects and use light probes for dynamic objects, or you can use raytracing on RTX capable cards, or imitate it with environment lighting.

It depends on what you're wanting to do really.

deft fiber
#

Could also be referring to directional light

#

Or ambient lighting

night shell
#

most likely ambient lighting

#

as in probably a flat constant color

#

no directionality

atomic summit
#

Hello, Im still new to baked lighting but I cant seem to figure out why theres this big black pillar in the hallway, (There is no black pillar to make the shadow and the building is inverted normals)

#

if you need more info im happy to provide πŸ™‚

night shell
atomic summit
#

I checked the light maps and there seems to be an issue with one of the mesh's crossing over the lightmap

#

Imma re import my mesh's and see if I can change some settings

#

FIXED IT

#

Just had to make the mesh generate lightmap uv's

inland sparrow
pastel vortex
#

I've been trying to set up light probes in my scene. But it seems my dynamic objects are all lit the same way from all angles, creating a "fullbright" effect. what am I doing wrong?

#

here's another example of how the material should look vs how it looks

deft fiber
#

here s another example of how the

rustic fable
#

Hi. How can I trouble shoot that my lightmaps arent visible?

rustic fable
#

Ok it seems like the shader didnt support it

#

strange

wide loom
#

I'd love some help solving a weird lighting issue I'm experiencing.
I'm using the URP renderer with deferred lighting and experience light flickering on camera movements.
Spent a ton of time trying to figure out what is going on, as it's acting as if I reached the maximum light sources allowed even though it shouldn't happen using deferred?

chilly kettle
wide loom
#

(It still happens in the latest LTS)

chilly kettle
#

Did you try 2022?
Maybe its already fixed there

wide loom
#

Didn't try 2022, I'm using this project for production

wild idol
#

I used bakery to bake my lights. But the maps come out very wrong.

#

Except for a texel mismatch the uvs dont seem wrong

#

If anyone has an idea lemme know 🫢

scarlet geode
#

don't know if this is where the post this, but does anyone know how to use emission maps for a URP sprite lit shader? would it be through using secondary textures?

olive aurora
untold jolt
fickle needle
#

If you want to get global illumination but have the ability to disable lights, you can set the light to Mixed

#

which makes it bake the indirect lighting/gi only, while the direct light will always be realtime, and only the indirect portion will be baked

zenith coral
#

So I'm working in URP and implementing a Frustum-Aligned Volumetric Fog effect.
I've got pretty much everything working EXCEPT shadow maps.
I can't for the life of me figure out how to pass a light's shadow map to a compute shader in URP
Does anybody who knows a bit more than me think they can help?

#

Here's a screenshot of the effect so far (even though that really doesn't help at all lol)

#

I need to use the depth of each light's shadow map to know when and where each light is blocked

stuck jetty
#

If that's true. Just get the light shadow map in each ray marching step, the position will be your ray position and only calculate the ray if shadowMapResult > 0

zenith coral
#

I'm unsure of how to get a light's shadow map in URP

#

And pass it into the compute shader where the calculations are taking place

stuck jetty
#

Light.shadowAttenuation
This will return the shadow of that light

zenith coral
#

I'm supposed to be able to use this in a compute shader?

#

I thought that was just for standard shaders

zenith coral
#

Nvm I got it working

#

Didn't know you could include Lighting.hlsl into a compute shader and have it work

stuck jetty
#

Great. Your volumetric effect looks nice.

worthy relic
#

Is there a way I can prevent materials (the way material in the screenshot) from having lots of glare from a baked lightsource?

#

basically how can I make it look smooth and not like the light is concentrated on that one spot

worthy relic
#

to be honest I don't know what that is

#

basically how can I make every wall be evenly lit up (like this picture), rather then the walls near the direct lights being extremely bright

worthy relic
#

i'll check it out, thanks

prime wharf
twilit kraken
#

guys, the lighting in my scene gets changed when i load it through another scene

twilit kraken
#

I did google and saw about baked lights and pre generating light rendering, but none of it is working for me

deft fiber
twilit kraken
warped trout
#

can someone explain to me how the volume component works?
i have 2 different volumes for 2 different kind of objects
but 1 of the volumes control both objects even though the second object has its own volume
but that volume doesnt effect the object its inside of

deft fiber
warped trout
#

well my game is in URP

#

so how should i have my volumes set up for my objects?

deft fiber
#

Though I'm not sure what "volumes for objects" exactly means in this context

warped trout
#

then how do i get different effects for different objects?

deft fiber
warped trout
#

different emission strengths, the spread

deft fiber
warped trout
#

thats what i mean (i think?)

timber lichen
#

Why does my scene look like this? I deleted the "Directional Light" because this is going to be an indoor scene.

#

I want it to be a dramatic scene with a light in the middle but...well, you see the issue

summer aspen
#

Turn down environmental lighting in lighting settings

timber lichen
#

Okay

#

Where's the lighting settings?

#

Also, sorry for the long response

timber lichen
#

can anybody help me? i have a flashlight with realtime light, and my scene is baked (completely). So i cant see flashlights realtime light on objects. Help

deft fiber
#

Unless they use a shader that only implements baked lightmapping and no other type of lighting

deft fiber
timber lichen
#

wait lemme send flashlight

deft fiber
#

wait lemme send flashlight

untold vine
#

So, just upgraded to 2021 to test out point light shadows in URP, but can't seem to get them to show up.
Point Light is set to Hard Shadows, the meshes have Cast Shadows set on.
The URP object has the following settings for lighting and shadows:

#

I'm using this code in a shadergraph custom function to get the lighting from the point light in the scene

// More code:
// https://github.com/Cyanilux/URP_ShaderGraphCustomLighting/blob/main/CustomLighting.hlsl
// Unity Reference:
// https://github.com/Unity-Technologies/Graphics/tree/master/com.unity.render-pipelines.universal/ShaderLibrary

#ifndef CUSTOM_LIGHTING_INCLUDED
#define CUSTOM_LIGHTING_INCLUDED

void AdditionalLights_half(float3 WorldPos, out half3 Color, out half Attenuation, out half LightAmount)
{
#if defined(SHADERGRAPH_PREVIEW)
    Color = 1;
    Attenuation = 0;
    LightAmount = 0.5;
#else
    int additionalLightsCount = GetAdditionalLightsCount();
    
    float attenuation = 0;
    half3 direction = 0;
    half3 color = 0;
    float lightAmount = 0;
    
    for (int i = 0; i < additionalLightsCount; ++i)
    {
        Light light = GetAdditionalLight(i, WorldPos, half4(1,1,1,1));
        color += light.color;
        //attenuation += light.distanceAttenuation;
        attenuation += light.distanceAttenuation * light.shadowAttenuation;
        lightAmount += (1 - (light.distanceAttenuation * light.shadowAttenuation));
    }
    
    Color = color;
    Attenuation = attenuation;
    LightAmount = lightAmount;
#endif
}
#endif // CUSTOM_LIGHTING_INCLUDED

And it works, but objects on the other side are also getting lit.

untold vine
#

Here's what it's doing in the scene

deft fiber
# untold vine Here's what it's doing in the scene

There's a part about these Keywords

    - Boolean Keyword, Global Multi-Compile "_ADDITIONAL_LIGHT_SHADOWS"
    - Boolean Keyword, Global Multi-Compile "_ADDITIONAL_LIGHTS" (required to prevent the one above from being stripped from builds)
- For a PBR/Lit Graph, these keywords are already handled for you.```
Not sure but it might be related
untold vine
glad cipher
#

I have an issue with the ceiling being too dark when using area light, is there any way to fix this or just use point light?

digital ridge
#

I have very limited 3D experience, but I feel like this is something a lightmap could help with (for the ceiling).

little condor
# glad cipher I have an issue with the ceiling being too dark when using area light, is there ...

As Shearbot suggested, you can bake the reflected light into a lightmap, but this won't interact with your normal maps on the ceiling and so will look a bit flat.

Alternatively, you could add another area light but have it on the floor and point it upwards to mimic the reflected light on to the ceiling. You should increase the size of the light, disable the emissive mesh, and untick 'Affect specular.

night shell
#

but yeah the reason why it looks dark there is because there is zero bounce lighting

#

you could fake it like @little condor suggested, but also baking your lighting into a lightmap also solves this as in lightmapping bounces are computed

craggy badge
#

To create shadows, I use Shadow Caster 2D. But it makes a strange transparency artifact in sprites."Self Shadow" makes more artifacts if it is activated for more than one sprite. The problem is solved if during "Play mode", enable and disable the component, but it seems to me that this is not the solution.

timber lichen
#

Hi there! Tried to bake lighting on the my world but there is a problem. While the right table gets baked properly the left one has glitched baking.
Both of them are set to static. Is there a way to fix this issue?

#

Both of the light sources are identical

arctic isle
timber lichen
#

Seems like the lightmap that bakery is calculating on the left table is not working properly

timber lichen
#

hello guys (again). can anybody help me? I have a Realtime light for a flashlight. I have my whole scene with baked light. So i cant see this realtime light. I tried to increase Pixel Light Count (to 8). Firstly it did work, but now it doesnt. I tried to increase Pixel Light Count more but it still doesnt work. Can anybody help me?

high elk
#

Why aren't these lights baking?? I've searched around but no one seems to be having the same issue as me.

#

I've set all the lights and game objects (that are going to receive lighting) to static, and I set the lights to baked. When I bake a lightmap, it still produces one based on GI, but none of my lights are included. When I disabled baked GI, it just didn't bake anything.

#

The lightmap also looks like total crap, but I'm not as worried about that since I've been able to fix it in the past.

violet tapir
#

Hey everyone! We are making procedurally generated levels. The scene would look much better if we could generate and bake all the light probes during the level-loading sequence in runtime. Is it possible?

austere canopy
brisk sedge
#

Yo, when you implement building system, aka you can build stuff from provided prefabs, what is the best way with lighting? as you cannot use Baked lights, as you change the enviroment. So using real time lighting is the best choice? even if that is not performance friendly

chilly kettle
#

Does someone have a clue why the gameobject take lightprobes that are incredibly far away from the object?

#

It could take hundreds of other probes that are closer

languid dew
#

Hello all, rather new to dabbling with lighting and I'm curious if anyone can help me understand why the object on the far left is being lit by the light that emanates from the player. My expectation is that the object between the player and the far left object would be casting shadows upon it/blocking light getting through.

I am in URP and using Light2D (Experimental) to cast the light. The objects themselves are 2D planes and are set to Cast Shadows.

chilly kettle
# languid dew Hello all, rather new to dabbling with lighting and I'm curious if anyone can he...

Have a look if this helps you ^^
https://www.youtube.com/watch?v=n08EA3svNT8

BMo

This tutorial is lit

Learn how to setup 2d lights and lighting in this 5 minute Unity Tutorial!

Creates lights, shadows, and use post-processing effects to add incredible atmosphere to your games.

Adding 2D lights is rather simple, you just need to make use of the Universal Render Pipeline or URP provided by the Unity engine. Once you import...

β–Ά Play video
high elk
#

I've got "Generate Lightmap UVs" checked for the mesh, if that's what you're talking about

austere canopy
high elk
#

oh i don't really care about the light map looking wrong, I know I can fix that

#

I'm more concerned about the lights not contributing to the lightmap

#

You can see in this picture, where I've got a lightmap generated, that none of the lights are contributing to it

austere canopy
high elk
#

none

austere canopy
#

does lightmapping work in a different scene?

high elk
#

I'll try it out

high elk
#

thats really weird..

austere canopy
#

so its either the lights the geometry or the lightmap settings

#

you could try to use the same lightmapper setting the test scene
see if that makes a difference

#

also scene scale can be a issue

#

Unity expects to have 1 unit = 1 meter of pyhsics and lightmapping

high elk
#

Alright, I'll mess around w scale and settings. will come back when it either works or I've given up πŸ˜… ty malzbier

languid dew
high elk
#

reducing resolution and samples solved the problem

#

kinda dumb that i'll be stuck w a lower-res lightmap though

languid dew
#

Is anyone aware whether it's possible to modify the points of a ShadowCaster2D component upon creation?

#

Left = how they're generated when added to an object via code. Right = desired shape. Can't seem to find a way to edit points via script 😦

languid dew
night shell
#

which are typically provided by unity ambient probes (or light probes)

#

but other than that yeah realtime lighting is the only way

modest carbon
#

Does anyone know if Emissive Materials are the best practice for glowing objects that turn their glow on and off? From what I’ve researched so far, it seems the glows have to be baked in to the surrounding materials.

little condor
# modest carbon Does anyone know if Emissive Materials are the best practice for glowing objects...

Correct. Emissive objects don't dynamically contribute to lighting other objects, so you need to bake the lighting. You can use light probes to pass colour information on to dynamic objects, but its still difficult to turn glowing objects off and on.

You can also double-up on the lighting by having an object with an emissive material that glows and also have normal light inside it. Then when you want to turn it off, disabled the light and swap out the object material for a non-emissive one.

What are you trying to do?

modest carbon
modest carbon
#

I suppose I could run some area lights along my tube light prefabs and have those nested lights turn on/off on events? If there’s a smarter way to do it please let me know!

merry turtle
#

Getting these issues in my scene after I baked my lighting where it's just black on some models, how do I fix it?

merry turtle
#

Baking isn't working rn

#

it just keeps saying

every time I click Generate Lighting, with this result

night shell
#

I would bake in subtractive lighting mode

hot hornet
#

Hi, anyone know why, when I bake lightmap one object is ignoring light? the mesh have the same configuration as the others.

merry turtle
deft fiber
merry turtle
#

I never turned it on

deft fiber
hot yarrow
#

Trying to implement deferred lighting. How can I get unity to pass all current transformation matrices to a compute shader?

deft fiber
hot yarrow
#

thx

fringe notch
#

Not sure whether this should be in #βœ¨β”ƒvfx-and-particles or here but no one is responsive in vfx so ill post here. Basically, I have a particle system and I can see the particles even in total darkness. This is not intended. Is there a way to make the particles only visible in light?

thorny crane
#

Im trying to make a UV light map for complex geometry in blender for unity

#

What am I doing wrong here?

deft fiber
#

Never attempt to use "lightmap pack" UV unwrapping

thorny crane
#

I let unity create the lightmaps and it gave me this result

thorny crane
lone pier
#

I'm having an issue where the lighting looks lower quality when moving over to a new project. I tried copying the exact settings for the project, camera, lights, lighting settings, and materials and even copied the old map file over just to be sure I didn't miss anything. Does anyone know what could be causing this?

#

Not sure if it's relvent, but the old project used 2020.3.39 and the current project uses 2021.3.11

untold jolt
#

Why does it do that

deft fiber
# untold jolt Why does it do that

I would start by trying to determine if it's caused by realtime lights or the baked lightmap
Looks like it could be most likely pixel light limit of realtime lights

deft fiber
rocky lantern
#

Is there a way to get the surface positions of surfaces on a lightmap?
I want to use my own compute shader pathtracer for making lightmaps as it should be much faster but im finding no information on how to get any data relating to the objects in a lightmap

flint cedar
#

Is area light or plane with emissive material more performant?

deft fiber
flint cedar
deft fiber
flint cedar
#

I would presume so, area light would work fine in my case

whole bramble
#

lightprobes breaking batching

#

built in RP

#

any solution?

deft fiber
#

A static batched mesh is just one mesh technically, so it can use one "closest" probe as meshes do, or break the batching

#

In BiRP with "Use Proxy Volume" a mesh can be affected by multiple probes, but I'm not sure how that works for static meshes or how optimized it is

#

But it's worth a try

whole bramble
#

according to forum , now im trying to uncheck batching static and check gpu instancing for the lightprobe objects

#

let's see if it works or not

whole bramble
#

thanks a lot

#

the technique worked

#

got 60-70 drawcalls again instead of 250+

rocky lantern
#

If a single mesh is too big to fit inside a single lightmap how do you know which triangles belong to which lightmap?

trail summit
#

How would i improve the shadows here? They look way too soft, and have a weird i guess filtering effect.

deft fiber
#

The filtering artefacts are meant to be stabilized by temporal anti-aliasing which you may need to enable

trail summit
#

where do i enable it?

deft fiber
#

Scene window has a separate toggle for it

desert helm
#

hello guys, im having a problem with editing light properties in HDRP, they are basically unresponsive.
i can change Type and mode of the light, the rest i can only change trough script or light explorer.
Any ideas?

#

I just found out i can edit it if mode is set to baked.

storm flax
# trail summit where do i enable it?

antialiasing setting on camera, and in the editor viewport up where you can change near plane etc.
if you want TAA to work in the editor you’ll also need to turn on the β€œalways refresh” option for the viewport

brisk sedge
#

I made my wall get light from lighting probes, as these objects is not exactly static. Is ther a way how to blend the light difference between the meshes?

brisk sedge
#

adding more faces or more orbs doesnt seem to help at all

#

lightmaps give me this bleeding effect. Which is solved by increasing the resolution of lightmaps, but that is very limited resource i have

night shell
night shell
deft fiber
#

Which is why you'll want to prefer continuous geometry for light baking

oblique otter
#

My point lights are not working at all, but when I use directional light they work. Is there a setting that I need to change ?

little condor
deft fiber
#

Quality settings would be good to see as well, in case of light limits

grave edge
#

good evening everyone. regarding lighting, in the case of a building or at any rate an apartment, how should I select baked, realtime or mixed? i.e. what should I base on? Then in case I need to eventually repair the UV lighmaps, how do I do that? Help me plz πŸ™πŸ™

limber delta
# grave edge good evening everyone. regarding lighting, in the case of a building or at any r...

Hello. I think you should start with some tutorials. This is a good one: https://youtu.be/hMnetI4-dNY

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
kind axle
#

i made a basic main menu scene that leads to my testing area scene, but when i click play and get transported there the lighting is all dark? can someone help with this?

formal veldt
#

how do I make it so light sources don't add together?

#

like in zone 2

#

where 2 point lights hit the same area

#

I want zone 2 to have the same intensity as zone 1 basically

deft fiber
sage birch
#

Why are lights getting occluded so easily

#

what the actual f

#

If anyone knows how to fix this issue please tell me.

#

Everytime i add like 4 point lights it immediately starts to glitch out at certain angles when looking

deft fiber
sage birch
deft fiber
# sage birch Will this affect performance?

Yes, a mesh needs to be rendered again for every pixel light affecting it
The vast majority of games/engines use forward rendering and have to work around this limitation by avoiding bundled masses of lights or very big meshes within realtime light ranges

sage birch
deft fiber
#

Unity does support deferred rendering which doesn't suffer from this, but is worse at transparency and antialiasing

sage birch
#

And is this problem persistent in URP render pipeline?

deft fiber
#

Yes

#

"Forward+ renderer" is available in newest versions of URP, which should solve the problem for good

sage birch
#

I'm in unity 2021

#

So to change to deferred rendering you simply changed the rendering path to deferred?

deft fiber
sage birch
#

Will read about this

formal veldt
warm oxide
#

Hi all, i'm having a really weird issue with my game. Totally new to this, but i found i liked my levels the default way without lightmaps, i dont need it hyper realistic its for VR. (XR & VRIF)

So, If i start the scene loaded, it looks fine, but then if i go to a menu and hit restart, i get these horrible graphics issues:

#

Furthermore, when i try baking lighting, i get horrible results

#

This is how it looks both in scene and game view when i start with the scene loaded:

#

One lightmap turned everything blue:

#

Another gives me horrible squares on the materials:

#

I just want it so that when i restart the scene, or load the scene, it keeps the same image

night shell
#

Looks like I'm seeing some misunderstandings

warm oxide
#

Could well be David, im really new to this

#

i just got into the coding and design side but i know 0 about graphics

#

Im on a URP pipeline

night shell
#

Notice in the baked lightmapping view how the UVs are different

warm oxide
#

I was just trying to change them around and see if it improved anything

#

even set at default none it produced the result as first dispalyed above

#

None looks good, i like it this way:

night shell
#

Have you looked into lightmapping tutorials?

#

Or are you just winging it?

warm oxide
#

I've looked at the Unity documentation

#

But this is targetted that someone who wants to bake and render

night shell
#

Yeesh yeah that is very surface level

warm oxide
#

i want it to maintain default all the way through, without any strange changes from something so simple as a SeceneManager.LoadScene()

night shell
#

Ill be on my PC in a few but i could try and give some pointers

#

But just to clear some things up

warm oxide
#

Any help would be greatly appreciated!

night shell
#

Whether that lighting is realistic or stylistic depends on your art direction

night shell
#

What kind of bad results

#

Those can be many different things

#

If lighting looks awful when baking, it could be

  1. Lightmaps UVs are not generated for meshes
  2. No objects are marked static
  3. There are no lights that are marked mixed/baked
  4. Artifacts could be due to having alot of meshes in the scene with no backfaces in plain view
  5. Light leaking due thin meshes
  6. Etc
#

Screenshots would help

warm oxide
#

Ok

#

Its definitely not 2

#

So, we have None in the lighting settings

#

So i guess we'd focus on a tile where the artifacts were worst

#

Im not actually too sure about UV mapping

night shell
#

Thats fine unity can autogenerate lightmap uvs in editor

warm oxide
#

Anything else you wanted to see mate?

night shell
# warm oxide

As for this I would create a lighting settings asset

warm oxide
night shell
#

Are there any lights in your scene marked baked/mixed?

warm oxide
#

It doesnt look like it?

night shell
#

Thats a mesh, not a light

warm oxide
deft fiber
night shell
# warm oxide

Ok so you have lights in the scene but what modes aew they all using?

#

Realtime/mixed/baked

warm oxide
#

I just found these:

night shell
#

Those are emissives, not lights

deft fiber
#

You could make a thread if it seems like it's taking a while

night shell
#

Go for it

warm oxide
#

Lighting Issues within URP in Unity

warm oxide
night shell
latent lava
#

Hi! im new to unity and was developing an mobile game for my university project, i was having some issues with scene lighting and wondered if anyone could provide a fix! Im using just the normal scene directional light but for some reason often when i change scenes in play mode using buttons the scene will go all dark and shadows will be wrong, ive tried adding additional lighting and turning off shadows but this hasnt fixed my issue, ive also tried setting it to baked mixed and realtime ,none of these have fixed it either . the bottom scene view is what its meant to look like

warm oxide
#

@latent lava Look at the thread me and david were in i had the axact same issue

latent lava
#

oh ty!

fringe notch
#

Hey guys, I have an issue with my light sources (spot-realtime). They interfere and what I mean by that is that they alternate, every single one of them cant be turned on at the same time for some reason. Also 99% sure that my flashlight breaks them even more. I can show visual evidence if so needed. Thanks!

warm oxide
fringe notch
#

There should be nothing wrong with the flashlight, It's just a spot-realtime

#

i can record how it looks

warm oxide
#

go for it because im struglling to visualise

fringe notch
#

here it is

#

going back and forth the lights flicker

#

they almost take turn/clip

warm oxide
#

Im not sure on this one, you look further ahead than i am with Unity. Maybe check the radius of those spots above? overlapping perhaps?

#

just a wild shot in the dark πŸ™‚

latent lava
latent lava
#

the only thing i found different was a folder with some lighting data was created

#

but i cant recall how i got it haha mb

warm oxide
#

I think that happens when you create a new Lighting Settings Component

latent lava
warm oxide
#

Not a folder though, just an obj

latent lava
#

mine created a folder with those things inside it

warm oxide
#

interesting! πŸ˜„

latent lava
#

this and one ui issue is the only thing preventing from submitting this project haha so i hope i can get a fix

warm oxide
#

Whats annoying for me is the scene load fine from main menu, but then if i "Restart" then it goes all black and its been inhibiting progress for 2 days now

latent lava
#

yeah!

#

same!

arctic isle
#

@latent lava The environment lighting has not been generated for your scene. Go to Window > Rendering > Lighting and hit Generate Lighting at the bottom. This will generate the directory with the same name as your scene (like you noted above) with the LightingDataAsset and Environment Reflection Probe.

arctic isle
# warm oxide Not a folder though, just an obj

The LightingDataAsset and LightingSettingsAsset are two different things. The first is the computed lighting for a given scene and the second is the settings to use when computing it.

latent lava
#

oh i see!

warm oxide
#

for example:

arctic isle
#

As a general rule, when loading scenes that contain environment lighting you need to have that lighting computed into the LightingDataAsset (via auto mode or on-demand bakes). The presence of that identically-named directory is a sign that it's been computed. It works when loading scenes in the editor because the env. lighting is computed for you in the editor but you have to do it yourself in Playmode.

latent lava
#

now for my next issue over to the input channel XD

warm oxide
#

Over here it looks fine:

warm oxide
latent lava
#

good luck with ur project!

#

hope u can fix the issues

fringe notch
arctic isle
arctic isle
# warm oxide Over here it looks fine:

Hm... your project seems to have some problems with how the geometry is set up, possibly the lights? Can you follow through with @night shell in that thread?
Some things that may be going wrong:

  • Incorrect / not generated lightmap UVs
  • Geometry not static
  • Lights are not set to baked
  • Geometry not occluding realtime or environment lighting / light bleeding from outside
warm oxide
#

Yep, Followed all the way up to the last messages so far.

#

Ah he's back πŸ˜„

night shell
#

I've been having him check all of those boxes so no worries, was in the middle of something but back now

fringe notch
#

and i think you're actually right

arctic isle
#

If you're using URP, change the limit in the RP settings, otherwise it's under Edit > Player Settings > Quality

fringe notch
#

alright, will try it out rn

#

yes, so the problem was that the limited amount of realtime lights that can affect one singular pixel was too low

#

its fixed now i believe, thank you!

paper oriole
#

When baking my lightmap, I’m getting this weird β€œburnt” look along the edges of things. What is this and how do I fix it lol

deft fiber
#

Sometimes object scales that are off in the lightmap may skew the partitioning

dusty parcel
#

Yeah, either more lightmap resolution or more padding for your UVs

pliant gazelle
timber lichen
#

Why my 2d lighting asset do not show on create asset list?
Im making 2d game with installed urp and attached 2d render to urpasset

i can create 3d light, but it looks like the 2d light its not installed or smh
on every tutorial there is also placed "2d light"

Unity i belive in you community!

earnest sluice
#

hi, how can i make a good&optimize stadium lighting?

dawn pawn
torpid ruin
#

I seem to have run into a problem in my HDRP 3D unity project, the lights seem to work fine, yet whenever the camera moves, the lights flicker randomly, anyone come across this before, if so any solutions?

#

happens in the editor and the actual game, I tried using the anti-flicker with no prevail and attempted to increase the amount of lights through the quality settings

rocky lantern
#

why is it that if I write to a lightmap, this happens?

#

heres the lightmap, its fine if unity makes it but as soon as I write to it this happens

#

even if I write a high value to the entire texture, it seems like some faces just dont use the lightmap as soon as I write to it

glossy pike
#

i tried generating lights and this happened

arctic isle
#

Also report a bug through the bug reporter if you haven't already. It should pop up automatically if the editor crashes.

arctic isle
#

That's if you are using High Quality Lightmaps, otherwise it's not an exr

arctic isle
arctic isle
arctic isle
timber lichen
arctic isle
dire otter
#

Anyone with a good eye know why the 2D Light goes through the ground even though the ground sorting layer is set correctly?

rocky lantern
arctic isle
arctic isle
dire otter
#

I wanna make it not clear

arctic isle
#

Are you expecting the light to somehow be on the surface of the ground only?

dire otter
#

So, the "ground" is a tilemap layer which will be toggled off revealing a cave. When it is not toggled off, you can still see the 2DLight through it.

#

I tried using sorting layers but it didn't affect it.

arctic isle
#

Okay now I understand. The Light2D has certain sorting layers that it affects. You should set your ground object to a layer on its own and have the cave lights affect other layers but not the one that the ground belongs to. Is that what you did?

dire otter
#

Yes

arctic isle
#

Can you show me the inspector for the ground object and the lights?

dire otter
#

1st Image is Ground Object, 2nd image is Parent object, 3rd image is individual light sources on said object.

arctic isle
#

This I think looks correct... Is it possible that your sorting layers are in the wrong order?

#

I am not sure that it would make a difference here but I don't know what could be wrong. You could maybe try to tinker with the rendering layer mask.

#

Or change the overlap operation if that area is lit by a different light. Just some ideas.

slow rose
#

How do I fix directional lights from coming through the wall? There are no gaps

undone surge
slow rose
night shell
slow rose
night shell
#

You can use HDRIs for that

#

But to finish what I was gonna say, the solutions here is to either have a modeled light blocker mesh that is thick so as to prevent light coming tbrough, maks your interior walls thicker, or go to the shadow settings for the light and reduce the bias values

glossy pike
#

how would i make more dark/scary? i know nothing about lighting, explain it to me like im a 5 year old

alpine bison
#

@glossy pike prolly start with lighting tab, go to env. and turn down the exposure from skybox. maybe look in to URP vids on youtube for lighting settings. allowing for post processing .

desert dagger
#

Hi guys, I'm trying to make an rts game and I have a problem with lighting. I want my objects to cast shadows on the ground, which is now done as a tilemap. From what i read online there is an option for this in a debugger, and I found it, but it doesn't seem to do anything. Does anyone know why?

dark jay
#

how do i turn off auto exposure in hdrp

#

also how can i get volumetrics for area light

deft fiber
deft fiber
#

Non-sprite shaders by default don't support sprite features like tinting or masking

hoary fossil
#

its been a while but here is a 2022.2 Environment test

lost granite
#

does anybody know why the light here might be bleeding through? HDRP, and I'd like to find any way to get rid of it by any means

the camera will be completely static for the entire time, the two point light sources and the gramophone itself are completely static too.

This isn't being used for a game, just to be rendered into a video so the solution can be as jank and inefficient as necessary, I just want to avoid ray tracing as I need to render ~4000 frames and when I was using ray tracing, each frame took like 8 seconds to render, also i couldnt figure out how to get the local volumetric fog or particle systems to show up in ray tracing, google didnt have many answers for me

#

a thought I had was to straight up use a shadow-only object to block the light but for some reason that wasn't doing the trick

#

oh is it an issue with the model actually

dark jay
#

cuz its not working

deft fiber
dark jay
#

where do i find that

#

ohh nvm i found it

#

thanks

turbid forum
#

I'm getting the following error when trying to bake my lighting:
[PathTracer] Failed to add geometry for mesh 'Combined Mesh (root scene) 13'; mesh contains non-finite values.

Is there any way to "fix" this mesh so that it is pathtraceable? :)

deft fiber
timber lichen
#

Should I optimise lights by my self

(Light turning them off if the player is far away) or is there some default stuff for that

deft fiber
#

Those would not help with lights near meshes that are viewed from very far, especially with shadow casting lights and forward rendering

lost granite
#

ill keep trying though

#

setting cast shadows to two sided did not fix the issue, here's the mesh renderer settings btw if that helps

#

also does anybody know why setting any kind of light mode to baked and baking the lighting makes them disappear

#

im on 2022.0b16.112.5806 so that might be part of it

#

using the CPU lightmapper does not appear to fix it

#

ill download the full release 2022.2.2f1 and see if that solves the issue

lost granite
#

the baked lightmap doesnt show it

main wolf
lost granite
main wolf
#

That's weird, the handle looks like it doesn't cast any shadow either, only the box itself cast shadow from what I can see.

lost granite
#

here's a comparison between the mixed and baked

#

the baked is the dark one

#

reflection probes are the only reason its not like black

lost granite
#

the gramophone is made up of 4 meshes

#

actually the vinyl itself is also seperate

#

the vinyl with the model is different and i just put the other one on top of it

#

the other one isn't static so i dont really care

#

looks good enough from the fixed angle

#

the light bleeding through seems to go away and change in shape as I move around it

main wolf
# lost granite

Looks like it does cast shadow, but it seems like overlaps with the mesh. Maybe try playing around with shadow bias

lost granite
#

oh hmmm

#

weird

#

changing it from distance shadowmask to shadowmask made it go away

#

ohhhhhh

#

so since its static its only using baked shadows now

#

this will work

#

imo it looks kinda worse now

#

maybe i need to bake it again

#

i cant quite put my finger on why it looks worse but it does

#

yeah it definitely looks worse

timber lichen
lost granite
#

exactly the same

karmic grove
#

How do you handle night lighting for open world games?

#

in GTA5 for example they use point and spot lights with no shadows everywhere, but they use like a hundred light sources for an average scene that is used by cars and buildings and even then it doesn't look super realistic due to the lack of GI and light bounces

#

is there a smarter solution that can be used with Unity like the irradiance volumes in Blender?

visual lion
#

Hey so I realize this might be a bit broad, but does anyone have any tips on how I can improve the lighting in this simple scene? For background it is a 3d world built up with 2d sprites. I want it to feel more "spooky" and moody I suppose, but can't pin point exactly what I need for it

deft fiber
timber lichen
deft fiber