#archived-lighting

1 messages Β· Page 10 of 1

hot path
#

weirdd

#

no light layers either

#

so yeah

drowsy forge
#

Hey, does anyone have a good unity documentation i can follow. I need to apply a .hdr file, but idk where i apply it

night shell
#

unfortunately baking requires alot more steps than just simply setting lights to bake. I would watch this - https://www.youtube.com/watch?v=okYhs6kQ0xw

Let's learn some basics of light mapping in Unity 2020.1 using Universal Render pipeline (URP).

You will also learn some Unity tips and techniques to improve and speed up light baking workflow.

β˜‘οΈOld House 3D model : https://bit.ly/2xQSeU4

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

β˜‘οΈQuick Links :β˜‘οΈ
Introduction - 00:00
Part 1. How to bake lights ...

β–Ά Play video
#

this is for URP but the same ideas and process applies if your using the built in pipeline

quick minnow
#

hello, i wasnt sure where to ask this, but this random shadow appears on my plane when looking from some angles (realtime directional light) which disappears when turning off the shadows on the plane. its the default unity plane model, and help? thank you

deft fiber
#

@left spire if it's an indoors level, you can set ambient light to black
You can also generate appropriate reflection probes, and correct the smoothness values of the materials

left spire
#

Can you tell me where I can find a tutorial on that

#

Im a beginner as you can see. πŸ˜„

#

I don't know what my next step should be

left spire
#

Thanks I fixed it!

upbeat hearth
#

hello

#

can someone explain me how i can do lighjting in 2d? im struggling on this for quite some time now

#

in tutorials they just quickly done it with the urp i think but for some reason that doesnt work

#

im also a beginner btw

turbid forum
#

All my models are in the .asset format, making it impossible to create proper UV maps, since they don't have import settings. Are there any tools that can automatically convert and replace these models, or can generate proper UV maps for them?

#

It's preventing me from turning realtime lighting into baked ones, so any help would be appreciated! ^^

tiny imp
#

Is it possible to cast a light on a video being played? (canvas with raw image). Currently the green light only affects sprite renderer behind the canvas and not the canvas itself. Here are the properties of the canvas and raw image

#

Is it the default UI Material of the raw image that is causing it?

#

also my light settings

deft ermine
#

anyone an idea why the lighting in the distance is much brighter than that from close range?

deft ermine
deft fiber
# deft ermine thx lets see if that helps

Note that your shadow resolution is divided over the whole distance, so when you increase it your relative shadow resolution drops very quickly
For this kind of situation I prefer to use shadow cascades, so that the cascades are bundled pretty close to the viewer, and the last cascade alone taking up most of the shadow distance

#

So there is shadowing quite far, but we won't care about the resolution really

tight moss
#

i have a quad with a transparent texture on it set to "cast shadows: off" in the renderer but its still casting a shadow in the lightmap

#

disabled:

deft fiber
tight moss
#

what the hell

#

i just upgraded my project to 2021 lts and now when i bake with mixed lights and shadowmask, there are zero shadows in the bakes πŸ€”

#

it was working fine in 2020 lts

tight moss
#

ohh okay they inexplicable made both shadowmask and distance shadowmask in the lightmapper settings just "shadowmask" and made shadowmask a discrete setting in the project graphic settings which defaulted to distance πŸ™„

bitter token
#

Hi! anyone knows how to bake shadowmaps in URP with baked directional lights? right now i have to set them to mixed for the shadow map to even be considered inside my custom shader (and the shadowmap preview mode), but I'd prefer if these lights weren't mixed, since I don't need realtime light for anything else

deft fiber
bitter token
#

shadow mask*** sorry

deft fiber
# bitter token i mean this shadowmap

I would assume that shadowmask textures are tied to mixed lights in the Progressive Lightmapper
You might be able to disable the mixed light at runtime to not render the realtime part of it, but keep the shadowmask that way

bitter token
deft fiber
#

The shadowmask is just a texture sampled using a mesh's lightmap UVs, so maybe you can just keep it externally after baking again using baked-only lights

bitter token
deft fiber
#

You'll have to do something hacky for sure

bitter token
#

shit, alright thanks! is there an api i could hook into to make custom bakes or something?

deft fiber
bitter token
arctic edge
#

Hello, im not sure if this is the correct place to ask, but I have made a day night system which rotates multiple lights in a circle. But this means that the map keeps flickering, is there a way to stop the flickering?

deft fiber
arctic edge
deft fiber
#

But without knowing what the "flickering" looks like exactly I don't want to give precise solutions, in case the problem is not what I think it is

arctic edge
#

I figured out what it was, because i was rotating multiple directional light sources to create a light effect, i think the engine didn’t like it, as soon as i switched to a singular moving light source, it worked fine!

arctic edge
deft fiber
worldly beacon
#

Is it possible to limit the fall of light sources only on the prefab?
if the light source is in the prefab, then it can only illuminate the prefab

deft fiber
brazen kelp
#

I have a script that auto generates a city, which is not the best. It sometimes generates overlapping floor which gives a weird lighting look. Is there a way to fix that for overlapping objects??

north echo
#

Is it possible to have differently layers each have a different directional light, and have each one cast shadows for its own layer?

lime lagoon
#

Hey people, is it possible to swap between light backs at runtime. I have a number of places where I want to be able to turn lights on and off and I feel like it would be better to use backed lighting since the lights themselves don't move. Any one know of any good tutorials or what not?

covert stirrup
lime lagoon
north echo
timber lichen
#

can someone help me with the shadows on this animated windmill? No matter how many times I bake the lighting, this problem remains

hot path
#

Is it rotating?

#

And you are using baked lights

#

So that would break it

#

Afaik at least im not exactly a lighting expert

little condor
arctic isle
agile garnet
#

When using URP is there any way to control shadow distance per scene? As its all moved to the URP profiles now. And wanted to control it per scene as some of our levels a large open world and others are very small tight spaces? (we are already changing the lighting settings per device tier.. so its almost per tier per scene.. and im going to end up in combination hell πŸ˜„ ) wasnt sure if Unity already had like a bias control per scene?

timber lichen
tired kettle
#

hey all, is there a smart way to get rid of these (AO?) streaks inside of hollow cylinders ?

north echo
#

Is it possible for different layers to each have a different directional light, and have each one cast shadows for its own layer?

arctic isle
#

In Unity 2023.2 alpha the GPU Lightmapper is officially out of Preview!

Since 2023.1 Unity provides a "Baking Profile". This can be found in the Lighting window when using the GPU backend in on-demand mode, and offers you a tradeoff between performance and GPU memory usage when baking lightmaps. Since 2023.2.0a1 we have reduced the minimum VRAM requirement for the GPU Lightmapper to 2GB.

With this improvement, we have removed falling back from the GPU backend to the CPU backend. Instead of silently falling back from GPU to the CPU Lightmapper, now the bake process will stop and provide a clear Console message to explain why. However, with the lower memory consumption, we expect the number of failures to be significantly lower.

Note that for light baking some Scenes will simply not fit into GPU memory. This can become noticeable when processing large Scenes with many objects, and/or using many large textures, for instance for transparency.

deft fiber
#

I recall you mentioned that lighting auto-generation is unreliable compared to manual
Do you know if there are changes coming to that?

arctic isle
hot path
#

Im assuming its not possible because of some requirement in the gpu lightnapping code that isnt in older unity releases

timber lichen
#

Hey. SO im pretty new to lightning and stuff but I added post processing and I was trying to make nighttime and this happened

hot path
#

With this improvement, we have removed falling back from the GPU backend to the CPU backend. Instead of silently falling back from GPU to the CPU Lightmapper, now the bake process will stop and provide a clear Console message to explain why.

#

thats why i want this

deft fiber
#

Right, if you aren't getting an error I expect you could be able to port your scene to a 2023.1. project, bake and see what the detailed error is

hot path
#

hmmmmmm, i think it is using the GPU? after some more tests

#

lemme actually ADD a baked light lmao

deft fiber
#

Usually randomly not being able to bake with GPU was solved for me by updating GPU drivers and restarting Unity

hot path
#

it is using the VRAM i think, like VRAM usage goes up, and it still says Baking device as my gpu, but there is no core usage

deft fiber
#

Well, maybe the 2023.1. test project will give you more accurate info

hot path
#

okokok i added a baked light

#

it did work

#

good, im just dum

#

Is ~1.5 minutes normal for baking one light, just making sure lol

#

1024 lightmap size, idk if any other settings are important

#

hm, gpu gets 480mrays/seca nd CPU gets 32, but will the results be the same?

deft fiber
deft fiber
hot dome
#

Messing with terrain for the first time, and peaks with heavy shadows don't get darker, but rather turn a bright glowing blue, why does this occur?

#

nvm, fixed it. had to set environment lighting's source to gradient, not skybox

merry abyss
#

Question - I am following various lighting tutorials to get more experienced at it, in the tutorial the Directional Light has been turned off and their meshs turn full black; in my case light off the meshes are not full black.
What could be the source of the extra lighting my scene has that theirs does not?

arctic isle
# hot path How. Do i. Get this. Into my 2021 LTS version. Ok sorry if thats maybe rude but ...

Hey, as Spazi very kindly answered the preview tag has been removed for 2023.2 alpha and above, although I would expect 2023.1 to be mostly comparable in terms of functionality and performance. We will not be backporting the improvements we have made to 2021/2022 releases as the improvement is a complete rewrite of the baking orchestration.

However, you can already bake using the GPU lightmapper on these earlier versions, with the caveat that if your GPU VRAM is too small, the bake will take longer as we split the lightmaps into tiles to fit it into the gpu memory (you can control this in 2023.x using the GPU Baking Profile). The number of lights isn't the only thing to affect bake time, it's mostly the size of the geometry, the size of the lightmaps, and the number of samples per texel.

If you're willing to switch to 2022.2 (soon to be LTS), we made an improvement which caches the GPU lightmapping shaders which should shave off 30s from the bake after the first bake with the GPU. Hope this helps!

merry abyss
arctic isle
hot path
#

Yeah this is great, thanks!
Only small concern is i saw a benchmark on this server showing that 2022 has lower framerates than 2021? it was from a user and it was in URP so idk how valid these claims are, but i was hoping you could clarify on that point.

#

whoops meant to reply lol

arctic isle
# hot path whoops meant to reply lol

No worries about the reply. I am not sure which post you are talking about and it could just be related to URP (I'm on the light baking side of things). If it's a valid concern then it's crucial that the user files a bug (if they haven't already) and if it's in my area we'll deal with it UnityChanThumbsUp

hot path
#

there is a few context messages above it

#

I wish discord would just let you link to messages in other channels without this sketchy looking nonsense lol

#

it might be specifically for VR since they were talking about that

forest rose
#

What should I do with this asset since I can't push?

arctic isle
# hot path it might be specifically for VR since they were talking about that

Yep I read some of the context above and below. Not clear what the issue here might be just by looking at the stats, but the difference seems quite large. I wouldn't recommend using the tech stream releases in production, it depends on what your project needs are. For VR, having very high framerates on something like the Quest 2 is a must-have. For desktop platforms (with much better hardware presumably) you can get away with it until this issue is resolved.

arctic isle
# forest rose What should I do with this asset since I can't push?

There isn't any elegant solution, I'm afraid. I'd say add it to the .gitignore and keep it locally on the machine that will build the project. The lighting data asset missing means that you won't see the lighitng on a different computer, but you can either generate again or transfer it outside of git if you need it elsewhere.

forest rose
#

Ah so as long as I can regenerate it again then it should be fine for me. Is it as easy as just pressing regenerate lighting if I delete it?

arctic isle
#

Yep πŸ™‚

forest rose
#

That is fine with me then, thanks for the help πŸ™‚

forest rose
#

Would anyone who has knowledge with lighting be able to jump into a call with me and help me solve some lighting issues?

carmine hedge
#

Situation : i have conference room and 100 chairs inside. 100 chairs have 1 UV map which overlapped because they are same.

Question : how can i do their lightmap UV ? They seems like points inside UV2 map.

deft fiber
#

However that many chairs might take prohibitively much space on the lightmap, especially if they have a lot of UV islands
If that becomes an issue, you could render them as dynamic objects and light them with light probes, reflection probes and mixed lights

carmine hedge
#

okey got it thanks.
another issue is about padding, on forum that i did read they refer numbers as 64 or 128 pixel padding but what is for. i mean 64 for 1024x1024 or 2048x2048 or 512x512 texture size?
i generally use 1024 uv size inside maya UV page so should i pick 32 or 64 or 128 to avoid light artifact

deft fiber
#

Usually you should be good with 2 pixels, and more than 3 is excessive in my experience

carmine hedge
deft fiber
#

If you have hundreds of chairs with multiple UV regions, the margins will add up very quickly

#

If your meshes have detailed geometry and they aren't viewed up very close, baked lightmapping may not be the best option

#

But it depends on your specific needs and performance concerns

carmine hedge
#

yea a bit confusing πŸ˜„
my last question, total 90mb lightmap is high or low on map size equal forexample cs dust2 map or street with 10 houses

deft fiber
carmine hedge
#

Thanks lot!

deft fiber
#

I stress again that you should only bake lightmaps for meshes that really need them and are suited for it, so mainly large and blocky geometry
That is, unless you absolutely must avoid realtime lighting and have abundantly texture memory to spare

pliant kelp
#

Hey, I'm making a game for VR(using XR, with android), and my lights have been weird, my lights normally work fine, but whenever I turn my camera to a certain director, both in game and in the editor, all the lights just turn off, even the ones in view. Sorry if it's a simple fix, I just haven't been able to find any

#

Actually, they don't turn off, they just turn white, but i'd still like to know if there is any fix

fickle pasture
arctic isle
# fickle pasture Anyone can help me understand how this is by design? https://issuetracker.unity3...

Hello! A colleague of mine and I took a look at this case. The caveat in this particular case is that the scene geometry is rebuilt every time the scene opens. The lighting system registers references of static objects at bake time, meaning that if they are replaced (in this case re-genereated) on scene load the lighting data will be referencing the old geometry and will require a re-bake.

Baked lighting, in the form of lightmaps, is patched directly onto the geometry. If that is lost, the lighting is lost. I believe that my colleague found a function parameter in the level generation that if set to false would make the issue go away.

arctic isle
fickle pasture
#

That was my bad too, I left over a piece of code that re-generate the level generation on Awake by mistake

#

Which wasn't supposed to happen

arctic isle
#

No worries, I hope things are working for you now πŸ˜„

fickle pasture
#

Right now TileBuilder already supports saving grid level data to JSON, and the mesh will be generated at runtime from the JSON.

arctic isle
#

None of the precomputed options are available at runtime at the moment

fickle pasture
#

I see, will it be supported soon for URP?

#

SSGI that is

arctic isle
#

I'm not sure about that, sorry. The render pipelines are on a path to being more aligned, but I don't know if SSGI is part of that plan.

iron dome
#

How do you remove baked lighting from an fbx?
I'm using this FBX in this prefab that had baked lighting from a different scene. I don't want baked lighting on the fbx in this prefab. I can't find settings anywhere in the material on the fbx or the children on the fbx. I don't want to remove the baked lighting from the scene that this was originally in so I won't be deleting the lightmaps.

arctic isle
#

You should be able to reuse the same model / prefab in different scenes without the lightmaps carrying over πŸ€”

#

Can you 'Clear Baked Lighting' in your new scene if you're not using any for it?

iron dome
#

Thanks for the reply. Right okay, I assumed that was how it should work. There isn't a "Lighting Data Asset" in the Baked Lightmaps tab > Lighting Data Asset field for this scene. I cleared the data anyway as you suggested but nothing happened. I just check the geometry normals and they are correct.
I unity FBX asset import settings window for the pumpkin asset, I turned off generate lightmap UV's and hit 'apply' but it hasn't changed anything.

This is a video of it in blender (opened from the fbx file directly from unity editor asset folder) just for context to confirm that the asset has no problems in and of itself. I also know that it did not look like this before baking in the other scene.

arctic isle
iron dome
#

It was. I unchecked it and applied to see what would happen. Nothing changed. Is it possible for lightmap data and lightmap generated UV to persist after unchecking the Generate Lightmap UVs option?

arctic isle
iron dome
#

Good question. I don't know. I have a bunch of static objects in the scene I baked in and didn't know any different. It is a small object, yes. Does the size make a big difference? The scene is quite large and it seems like manually placing light probes would be a lot of work throughout the whole scene

#

I'll look into light probes now.

arctic isle
#

It gets easier with time as you can dupe them and CTRL+drag to place them in discrete units. It will save you lots of texture memory as well which lightmaps take up πŸ™‚

iron dome
#

From what I read, they also contribute lighting information to non-static objects. That sounds very useful

arctic isle
#

Yes! They can contribute GI to dynamic objects and static objects.

fickle pasture
#

What are the requirements to load levels with GI Additively?

#

Currently I've done these 2 things.

  1. Same Lighting Settings on both levels.
  2. Used SceneManager.MergeScenes(firstScene, secondScene).
#

But it doesn't seem to be working on build.

#

Are there any settings I should be aware of?

arctic isle
#

MergeScenes is an Editor function for combining two scenes and serializing them into one, doesn't work in the Player.

fickle pasture
#

And yep I did use this SceneManager.LoadSceneAsync((int)sceneName, LoadSceneMode.Additive);

arctic isle
#

You don't have to merge lightmaps, but if you're using lightprobes you need to re-calculate the tetrahedral mesh.

arctic isle
deft fiber
#

I'm not familiar with that method but it sounds like it's not meant for runtime use, rather for authoring scene assets

#

Which is kinda weird in context

#

Oops I was scrolled up

arctic isle
fickle pasture
deft fiber
#

To best of my knowledge, lightmaps and other lighting data are read only from the active scene, even with additive scenes
To let separate parts keep their lightmaps you'd probably have to use the PrefabLightmapping script
But I'm not entirely sure

fickle pasture
#

I am trying without MergeScene on build, but build is taking long, I'll come back and report back the results

#

πŸ‘

arctic isle
forest rose
#

Is there a channel where I can ask for feedback on my level lighting wise or if anyone wants to have a look, The level takes 3 mins to get through

arctic isle
#

@forest rose if you have a repository I can clone I could take a look

forest rose
forest rose
arctic isle
forest rose
#

No problem, will push and send you a link now

#

I plan for this to be built as the homepage of my website portfolio

#

So published with webgl, not quite finished yet and I probably should have done lighting last after I finished fleshing everything out

arctic isle
#

Website Showcase feedback

arctic isle
#

Can you show screenshots of the editor and player?

fickle pasture
#

Can you show screenshots of the editor

pliant kelp
wicked garnet
#

Would anyone here happen to know if when a scene is loaded does the lightmaps associated with it all get loaded into memory, and stay there for as long as the scene is loaded?
I am thinking of having a single scene for my project, it will use baked lighting, but if all lightmaps are always loaded into memory that could be an issue.
I was hoping that as prefabs get loaded/unloaded as the player moves around (using a custom streaming system) only the necessary lightmaps would get loaded/unloaded along with them. But I cannot find any definitive information on that.

pliant kelp
deft fiber
shell mauve
#

When loading into my scene from another scene the lighting looks a lot darker. Whereas when pressing play from the scene itself it looks a lot lighter, what is going on and how do I fix it?

upper fable
shell mauve
upper fable
shell mauve
#

Yes, but that causes other problems, such as whenever I change anything in my scene it regenerates and I really don't want that.

#

I have also tried setting it as the active scene when transitioning between scenes.

#

Changing the lighting settings of both the scene and light etc

#

The only thing that fixes it is enabling auto generation of lighting, but that often takes minutes and my pc maxes out performance to do it, and it just resets every time I move or change something.

quick saddle
#

How can you make the skybox "glow" like in this pic?
Is it an hdrp only thing?

#

If its volumetric lighting

#

I dont know what the name for it would be called

deft fiber
shell mauve
deft fiber
shell mauve
shell mauve
#

@deft fiberDo you have any suggestions on what to do?

deft fiber
shell mauve
deft fiber
# shell mauve What do you mean by regenerate the library?

It means deleting the Library folder in your project files through windows and letting Unity regenerate it, which resets all editor's internal files
I believe it is the same option as "Assets>Reimport All", but possibly a tiny bit more nuclear when you want to be absolutely sure

#

Though it's an old problem, worth noting that your editor is an un-updated version of an old tech stream release so there could be assorted problems originating from that

shell mauve
#

Okay I'll do that, I just pushed to git so I can always revert back to that if it messes up my project.

shell mauve
deft fiber
deft fiber
shell mauve
#

Can I update my existing 2022 editor to that or do I have to install a whole new editor?

deft fiber
shell mauve
#

Damn, it uses so much hd space

#

I really wish I could just update an existing version

deft fiber
#

You can uninstall the previous editor before you install the new one

shell mauve
#

That didn't fix it, I will upgrade now.

shell mauve
#

@deft fiberI have updated to the new version and nothing has changed

#

Here is my lighting settings if it helps

#

and the visual result still looks the exact same

deft fiber
shell mauve
deft fiber
#

If it doesn't occur in a fresh project in a similar scene, then you know you have some way to fix it, or in worst case port all the assets over to the new project

#

If it occurs even in the fresh project then you could report a bug and have someone at Unity take a look at it

shell mauve
#

Okay, I think I just fixed it. By disabling every option in scene lighting, then enabling Auto Generate it seems to work. Now when loading the scene from another scene it looks the same as if I had just loaded directly into the scene.

#

It is all updated realtime now as well so I don't have to wait for it to bake like before with auto generate enabled.

#

Thanks for your help with this

deft fiber
shell mauve
#

It just took twice as long to load the scene

#

but thats okay as its only about 5 seconds

charred moth
#

Guys for anyone trying to bake lights, I have found the perfect settings for a good high quality/speed ratio

#

Default settings

fickle pasture
#

Anyone know why my scene is darker on build?

#

It works perfectly fine on editor

ripe harbor
#

Why do all my shadows dip to a deep black when I load a scene in URP ?

little condor
ripe harbor
little condor
ripe harbor
#

it's just when I jump from one scene into this other one the shadows become pitch black

little condor
little condor
little condor
#

Cool. Not sure what the issue could be then πŸ€·β€β™‚οΈ

arctic isle
# ripe harbor

Can you click 'generate lighting' in the scene you're loading even if it's all realtime lighting?

ripe harbor
#

Alright, I'll bake GI.

#

it'll take a while, this is a pretty big scene

arctic isle
#

Ah if you already had then you probably don't have to again πŸ€”

#

Maybe it's that env lighting is coming from the active scene?

ripe harbor
#

maybe a clue is: the scene I'm coming from has no directional light, since it's an interior scene

ripe harbor
#

also I'm not loading additively

arctic isle
ripe harbor
#

Okay, so I baked the GI and it works.

arctic isle
#

We're working on fixing this workflow

ripe harbor
#

but what if I want the sun to move? Shouldn't the dynamic lighting have the correct shadow color?

arctic isle
#

My guess is that it will with the current setup you have

#

But you can also use enlighten realtime gi and you'll get the environment lighting recalculated

ripe harbor
#

isn't enlighten deprecated?

arctic isle
#

Only enlighten baked gi, not realtime

ripe harbor
#

So I gotta bake the scene for the realtime shadow color to work, then?

#

this is confusing to me, because in a previous project, it worked fine without baking GI realtime lightmaps.

arctic isle
#

The difference is that this is not shadow color, but ambient lighting that is applied over the shadow. I'd suggest trying stuff out and seeing if it works. If you're using just realtime lighting I think there's a chance it will work πŸ™‚ Especially if it worked for you before.

ripe harbor
#

the documentation isnt Completely clear on what is and isn't Enlighten and what is and isn't deprecated. Are those probe volumes with the yellow dots part of that system, and do they work still?

arctic isle
#

Light Probe Groups are a separate system but compatible with Enlighten. They can also hold baked indirect light.

ripe harbor
#

I see, okay

#

@arctic isle Sorry to ping, but i've been trying to solve this issue for ages and as you're a developer, you may know or can point me in the right direction to solve this. do you have any idea what PrepareDrawShadowsCommandStep1 does in the URP pipeline? Whatever it's doing is causing a seg fault. I thought I was finally free of this wretched thing, but it's back. Here's the top of the stack trace:

Received signal SIGSEGV
Obtained 67 stack frames
0x00007ff71a5bc052 (Unity) PrepareDrawShadowsCommandStep1
0x00007ff71a5b33f7 (Unity) ScriptableRenderContext::ExecuteScriptableRenderLoop
0x00007ff719b0cd89 (Unity) ScriptableRenderContext_CUSTOM_Submit_Internal_Injected
0x00000175adb8bb71 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal_Injected (UnityEngine.Rendering.ScriptableRenderContext&)
0x00000175adb8ba13 (Mono JIT Code) UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal ()
0x00000175adb8b903 (Mono JIT Code) UnityEngine.Rendering.ScriptableRenderContext:Submit ()
#

As it's Unity, I assume that's down in the C++ code, which isn't something I can fix myself

arctic isle
#

This has something to do with how URP is interacting with the C++ layer in the Editor. Haven't seen it before, can you submit a bug?

ripe harbor
#

I'm filing a bug report as I speak. I tried before but my previous project was too big to send...

arctic isle
#

Thank you! Yes, the smaller the better otherwise it's very hard to investigate πŸ™

ripe harbor
#

In my experience with this accursed bug which has been smacking me around for a week, the stack trace begins with UIElements of all things, which I don't think should be a part of this. AFAIK I didn't do anything directly to cause this, which was also the case before... Unfortunately, as I said, a few pieces of the stack trace delve into c++ territory, which is outside of my range

#

thank you for responding

arctic isle
deft fiber
quick minnow
#

hello, is there any way to improve these spot light shadow quality issues? its on 4096 but still looks like this

mild venture
#

Hello there! So I managed to make night in my game, but the object does not want to get dark.

I dont know whats the problem, and what to do. :/

grim summit
#

heyo so i was baking my lighting, and it keeps turning out like this, does anyone know good data amounts??

deft fiber
#

I recommend you don't go over direct samples 32, indirect 512 and environment 256 when testing

night shell
#

yeah those numbers are nuts, you should never need to go that high ever

grim summit
#

it looks like this

#

then after a few seconds

deft fiber
grim summit
grim summit
#

worked like a charm

#

that would explain it

hoary fossil
fickle pasture
hot path
deft fiber
slim vector
#

Why the spotlight soft light is passing through the object? It shouldn't be on ground

quick minnow
stark temple
slim vector
#

the spotlight (realtime) is up on ceiling and is pointing downward

stark temple
#

has the spotlight been set to cast shadows though?

slim vector
#

No it wasnt

#

Thanks

#

Didn't even know that was a setting

hot path
#

can you please make your issue more clear with some other example

arctic isle
#

Feedback Request: Global Illumination changes with the 2023.1 beta tech stream
https://forum.unity.com/threads/feedback-request-global-illumination-changes-with-the-2023-1-beta-tech-stream.1412454

We want to make sure we are providing you with the best products for your day to day experience in Unity. We want to learn from you how you are experiencing the changes related to global illumination which we delivered in the 2023.1 beta release. Please take 10 minutes to complete the following survey to help us improve your ongoing experience with Unity, and invites you to participate in user testing for Adaptive Probe Volumes.

Also see discussions in #archived-hdrp if you're interested in what's going on in the Discord side.

quick minnow
deft fiber
#

Spot light shadow quality goes expoentially worse when you push the angle wider than 100Β°

#

I generally recommend keeping the bias values at defaults (not zero, nor very high value either) but you may be able to improve shadows on flat surfaces by increasing Depth bias, and on curved surfaces by increasing Normal bias in this situation

quick minnow
hot path
#

they just showed up after changing the texture on my custom terrain shader

#

Uhhhhh? what are these bands from?

#

my messages sent out of order whoops

#

oh wait

#

nvm its from my normal map somehow

hoary fossil
#

@deft fiber so sorry, I actually had something typed out but forgot to hit send. I wanted some feedback on this current scene. I wanted to know if anyone had any experience lighting large scenes made to look small due to perspective. Also wanted some feedback if possible.

ripe harbor
#

and, well, I can't exactly fix it, can I?

ripe harbor
#

that line goes down to c++ land

#

I wonder if I should try upgrading to 2023...

arctic isle
ripe harbor
#

No dice, though.

arctic isle
winter eagle
#

why is there shadow on joints and zigzag in shadow

ripe harbor
#

And yeah I’ll make a backup. I’ve been hesitant to jump to 2023 because a change made to… what was it, render handles? I forget. Was going to break a lot of packages I was planning to use

ripe harbor
winter eagle
#

Thanks i will try.

winter eagle
#

Thanks SSAO worked. but zagged shadow is still problem and also ceiling have more light than wall, also objects kind of shinning on edge. Thanks in advance.

stark temple
winter eagle
#

and how to solve shadow zaggedness

deft fiber
deft fiber
#

You could add a strong depth of field though, and another thing that conveys scale beyond lighting are physics
Small physical objects have very little relative mass and inertia, and by extension are more affected by wind and air resistance

winter eagle
#

Still shadow is not good

deft fiber
winter eagle
#

thanks but still same result

deft fiber
winter eagle
#

yes its active

deft fiber
#

yes its active

acoustic cove
#

How do I have a plane that can recieve shadows as if it was just white but is otherwise unrendered?

Transparent texture didn't work, unfortunately.

covert stirrup
acoustic cove
hot path
#

how should I get my trees to render their colors? this is during noon in my game, but the light doesnt hit the leaves, rendering them as black instead

#

im using a directional light

#

You can see also on the outer edges of the leaves there is lighting and they look green

merry abyss
#

I am doing some lighting tutorials to get more familiar with unity lights - in Linear color space is that sorta yellow-ish bright sharp edge to the specularity expected?

#

I feel like based on this image that some setting might be wrong because it feels over-exposed

#

for parameter reference, the light's intensity is 1, the surface's smooth/metal are 1 and 0.77

#

looking at this I feel like I am getting the bottom result and should be getting the top result?

#

I am in linear

#

is that the expected appearance?

#

removing all other sources of light and reflection, is that the expected output of linear light space? it looks wrong to me

#

i switched it to gamma for comparison and this looks even worse πŸ€” so at least I know it IS in linear space when its says its in linear space

#

I will keep following tutorials for now, maybe one will have the answer

night shell
#

if you've been in gamma space for a long time without knowing it does take some getting used to if your switching to linear

merry abyss
hot path
#

Im on mobile atm so its annoying to search

night shell
#

on the enviorment tab

hot path
#

Ohhhhhh i see
I turned that off for my nights, can i control it programatically

#

?

night shell
#

you can

hot path
#

Cool, thanks!

merry abyss
#

where is the lighting/environment data stored?

#

I have two scenes and environment differs between them and I would like to use the same parameters on both scenes

hot path
#

@night shell it seems like its really slow at updating

night shell
#

are you using skybox or gradient colors?

#

gradient colors should be instant

hot path
#

ive tried skybox and color

hot path
#

ill add a field to my timecycle

night shell
#

single color should also be instant

hot path
#

for controlling that

night shell
#

though I'd advise you use a gradient color rather than a single color

#

it'll look better

merry abyss
covert stirrup
merry abyss
covert stirrup
#

Doesn't cover all the features though, I don't know if there's a way to sync environment values like that

hot path
#

it takes multiple seconds

#

i can record a vid if you want

night shell
#

in editor or in game?

hot path
#

in editor in game view

#

i can try a build?

#

nvm my build just crashes

#

wtf

radiant kettle
#

What explains this shadow banding using point light in Unity?

radiant kettle
#

I kept working on the shadows and the result is okay now, only one thing though, it seems as the shadows don't move smoothly but rather in small steps. As if they didn't update often enough.

Here's the movement code, that is currently called on update, it does use Lerp so I would assume that'd be smooth?

#

Could also be described as slighty jittery/flickery along the edges, just slight movement back and forth noticeable around the edges as it moves (on top of the normal back and forth movement).

deft fiber
# radiant kettle I kept working on the shadows and the result is okay now, only one thing though,...

If I understand what you're describing it's because shadow passes are limited by their pixel resolution
The way any edges rendered on the screen "shimmer" from one pixel to another when moving slowly between them, the pixels of the shadows shimmer too, though you can look at the edge much closer
Assuming that is the problem and there isn't some other jitter on top of that, there isn't exactly a solution for it

#

If the light is meant to be a sun, you could use a directional light instead so you can benefit from shadow cascades

#

But to be rid of the problem you'd probably have to use HDRP or some other system with much more sophisticated shadow filtering

#

The closer the objects are to the light, the less shadow aliasing there will be

radiant kettle
#

It does seems pixel like in a way

#

Or low resolution, the way it jumps from one pixel to the next.

radiant kettle
deft fiber
#

And since it is a spot light rather than a point light, the resolution will be spread across the angle
Over 90Β° you start losing relative resolution at an exponential pace

radiant kettle
#

@deft fiber Also heard it might be a limitation of Built-In shadows, and that something like NGSS might fix it, thoughts?

#

Also resolution is maxed out, and spot is directly above

#

Might try to lower that

deft fiber
radiant kettle
radiant kettle
#

Shadow banding kinda

#

No luck with changing the angle, at 50 now

#

Directional light works great

#

But feels limited

#

The mix of directional light (shadows) + spot light (no shadows) seems to work pretty well though

ripe harbor
arctic isle
ripe harbor
#

No problem. I havent gotten an email about it yet. Am I supposed to get a confirmation if it went through?

arctic isle
ripe harbor
#

hmm okay. It's been a few days. I hope it went through...

timber lichen
#

can anybody help me with this weird baked lighting?

deft fiber
timber lichen
#

how do i fix?

deft fiber
# timber lichen how do i fix?
#

You'll have to test these to figure out what the culprit is
I'd start from compression

hot path
#

@night shell OK after some hassle figuring out why my game was crashing, I can confirm that the ambient lighting has a big delay, maybe 1-1.5 seconds before updating

#

do you have any ideas why

night shell
#

not really, perhaps its being computed on the GPU and thats why it takes a bit for it to get updated

#

but I would ask how fast your lighting for your scene changes

hot path
#

do you mean regular lights?

#

those update instantly

#

i can send you a video

night shell
#

I mean your directional light

hot path
#

yeah

night shell
#

your scene is an outdoor forest scene yeah?

hot path
#

thats instant

#

yes

night shell
#

I'm assuming you have some kind of daynight cycle thing?

hot path
#

yes

#

thats why im updating the ambient lighting

night shell
#

how fast is the daynight cycle

hot path
#

uh its 27.5 minutes total but that is extremely easy to adjust

night shell
#

because chances are you can live with the ambient lighting not updating immedieatly since the transitions are very gradual

hot path
#

its not very gradual tho

#

the jumps are very noticeable

#

lemme get a video just a min

serene elbow
#

Is HDRP ready for production/commerical games?
Trying to achieve this kind of graphics. Is HDRP better for it or the standard pipeline?

hot path
serene elbow
#

Hmm I want to target only PC/Windows maybe mac/linux but for now Im only certain about Windows

hot path
#

as soon as i click host, my time manager script runs

#

and that updates my lighting every frame

#

you will notice at the start it takes a second to update the ambient lighting

#

and then after a bit

#

maybe skip to like 30 seconds in, there are very obvious jumps

#

while my directional light very clearly updates

night shell
#

hmm

#

not sure how to make it faster, in my experience its always been instant for gradient/color specifically

#

anyone who might have an idea how would be much appreciated to help out

hot path
#

maybe my trees could cause the issue

#

they have been broken for a while

#

beacuase if you look the table updates instantly

#

just not the trees

night shell
#

that is possible

deft fiber
hot path
#

not sure why you replied to my hdrp msg

deft fiber
hot path
#

just this

#

should i call that every frame?

#

sounds expensive

deft fiber
hot path
#

ill try it ig

#

but it updates the cube table i have

#

justn ot the trees

#

maybe just the trees do take a long computation time

#

is there a way to do something like shadow cascades

#

so i can realtime update the trees that are close, and the trees that are further away update less

tropic sable
#

Hello there, I am trying to enable the probe volumes feature, but whenever I create a probe volume, I get this. Where can I disable enlighten? probe volume feature is not supported on elighten

forest rose
#

Just asking for some feedback, what are we thinking about the lighting here?

deft fiber
deft fiber
forest rose
#

So you mean too much light for the sources that are being shown?

deft fiber
night shell
#

I would agree it lacks directionality

#

i.e. what we mean by that is there is no sharp distinct light sources in the scene that seem to contribute to the lighting

#

the lighting is seemingly coming from everywhere

forest rose
#

I completely understand and agree, indirectness is pretty intense and I should add more light sources to combat this

night shell
#

you combat it by intensifying your light sources

#

generally when I light also I would avoid from taking indirect multiplier values on lights less than or greater than 1

#

in the lighting window I also would keep indirect intensities at 1

#

to essentially respect the rule of lighting in regards to energy conservation

#

but in your scene I can see where the lights are coming from and are placed, but the problem is that they are not bright or intense enough

#

<@&502884371011731486>

forest rose
#

So what I have at the moment, is indirectness to 1 and intensity to around 3+. I do have a big range on though so it might be that being the issue

deft fiber
forest rose
#

I think the lighting is fine, issues are just the individual light sources

night shell
#

ahhh yep

#

your indirect intensity is boosted beyond 1

arctic isle
#

You shouldn't really be changing these values

night shell
#

along with your albedo boost

#

yep

#

leave those at 1

deft fiber
#

In that situation I might also do a test bake without any of the artificial light sources, to make sure there's no unexplainable light coming into the room from anywhere

night shell
#

your indirect samples is pretty high

#

doesn't really affect the light in the scene but will certainly make things slower in the bake

forest rose
#

Baking time fortunately doesn't tend to be an issue for me, I'l post my next bake

#

It looks better but is darker now

night shell
#

intensify your ceiling lights

#

setting up a mockup scene to help illustrate things

deft fiber
#

Still looks pretty strange
The "outside" seems pretty dark compared to how much light is flooding in from there

night shell
#

^^^

#

looks like its just an image, a disconnect between how dark it appears versus the light that is coming in behind

deft fiber
#

Is it like, a doorway or a window or a portal
I think I can see some downsampling which implies there's something in the way

forest rose
#

The directional light is coming through the east wall so I have to use an area light for light to come in, it feels like the glass is tinted to block light

#

Its going to be a window, i'l be sure to add a frame around the window

deft fiber
#

Right, the earlier image showed an area light in that spot
I'd say it's still way too intense

forest rose
#

This is my room that is only done through directional light

#

I think this room was why I increased the albedo and indirectness

night shell
#

looks good in there

#

the glass to the outside is pretty dim though

deft fiber
#

I think there's no issue besides those two extra values and the area lights that simulate indirect light from outside being too strong

hot path
#

btw that marble looks really good

#

how did you make it? if dont mind telling

night shell
#

quick rough example to demonstrate why you shouldn't really try to boost albedo/indirect values

#

the one on the left is very uniformly lit

#

versus on the right when the indirect/albedo boost values are kept at 1, notice how much stronger the lighting directionality is.

forest rose
forest rose
hot path
#

how does the relfection work even

#

it does look nice

night shell
#

its parallax corrected, he did a nice job setting up his reflection probes

hot path
#

what is a reflection probe

forest rose
#

Reflection probe and box projection

night shell
#

to put it simply, a probe being like a point in space, and reflection obviously meaning "reflection". so its a reflection at a certain point in space

forest rose
night shell
hot path
night shell
#

depends on the scene but sometimes yeah

forest rose
hot path
#

oh

#

what

#

ok i need a page on these

#

hold on

#

"A Reflection Probe is rather like a camera
that captures a spherical view of its surroundings in all directions. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. Several reflection probes can be used in a given scene
and objects can be set to use the cubemap produced by the nearest probe. The result is that the reflections on the object can change convincingly according to its environment."

#

aha

#

makes a lot more sense

night shell
#

reflection probes are very important, especially in a PBR context

forest rose
#

Still having a bit of trouble though, Not quite sure what I should increase/decrease

night shell
#

probably best to start with one light at a time

forest rose
#

It might be better to add a skylight like in my other room to make it more natural?

night shell
#

so in that case I would mabye start with the ceiling lights and get those looking right

night shell
hot path
#

do reflection probes update in realtime if something like a player walks by

#

or is that not feasible without nomming performance

night shell
#

its doable, but it will eat performance if you have alot of them

hot path
#

does URP support it automaticlaly

night shell
#

yes

hot path
#

ok

azure pond
#

I don't know if this is relevant here, but anyone has any ideas on why my game builded looks DEEPFRIED

hot path
#

very nice

forest rose
#

I'm using urp at the moment since it's made for browser so yeah reflection probes are in urp

hot path
#

so that players can update

#

like a mirror

azure pond
hot path
#

does it look deepfried

azure pond
#

let me check

forest rose
azure pond
#

that can't do mirror

#

but probes can do realtime

forest rose
#

Ah okay, stick to probes then

azure pond
#

I assumed so because everything else works fine

#

holy crap making a new project takes minutes

hot path
azure pond
#

I can't even build

#

the default

#

scene

hot path
#

what

#

whats the error

azure pond
#

error: Build path contains project built with "Create Visual Studio Solution" option, which is incompatible with current build settings. Consider building your project into an empty directory.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

#

well

#

It isn't deepfried

hot path
#

did you build your project into your main project directoy

#

do what it says

#

empty directory

#

oh

#

okok

azure pond
#

I know I can solve it dude

hot path
#

ok cool, just making sure there are a LOT of people who dont know how lol

azure pond
#

eh

#

now

#

now what?

hot path
#

idk im not a lighting expert as is probably obvious by my lack of knowledge about reflections

hot path
#

if anyone coming into the channel wants to look

deft fiber
azure pond
#

hmm

#

maybe

#

I'm using the default URP post processing

#

and I think it does support linear because a new project worked just fine

azure pond
#

sorry not really a graphics man

deft fiber
azure pond
#

Win,Mac,Linux

#

default settings for the build settings

deft fiber
#

The problem occurs on all three?

azure pond
#

I unfortunately can't test that

deft fiber
#

I'm only concerned about the specific platform where the problem occurs

azure pond
#

Well

#

then Windows

#

I use windows

#

and it's not just my win version

#

Win 11 did the same for example

deft fiber
#

Right, there shouldn't to my knowledge be any difference between the editor's color space and the build's color space since they're both the same platform

azure pond
#

but as you can see the images is rather different

#

I fixed the youget near things and it looks weird

#

but that's it

#

should I try a different Platform maybe?

deft fiber
azure pond
#

yeah it is

deft fiber
#

This will make sure you're supposed to be seeing the same thing in editor and in build
You can click through the quality levels in case you find one that exhibits that particular problem

azure pond
#

well

#

they obviously look worse but

#

they aren't deepfried

deft fiber
#

Hmm then I don't of any more obvious things to check
Since it looks like post processing in that situation I might make a test build with all post processing disabled, or using the other quality levels to see if the problem still appears

azure pond
#

alr

deft fiber
#

Other than that trying to port things to or from a fresh test project and hoping the problem is revealed would be my next option

azure pond
#

yeah

#

well thanks

#

I'll try a build without the postprocessing

hot path
#

@deft fiber ok after testing that function you sent does not fix anything

#

it runs exactly like before

#

let me reduce tree count maybe

azure pond
#

It's just as deepfried

deft fiber
azure pond
#

but now it looks worse

#

jesus

hot path
#

yeah those three are the only thing i have

#

after reducing tree count

#

it still runs EXACTLY the same

deft fiber
hot path
#

so why do my trees keep destroying my game

#

i would just use another tree asset but i cant find one that looks good with wind support etc that looks this good for free

#

for obvious reasons

deft fiber
#

Based on what I know about the environment lighting system, changing the values would force the spherical harmonics and reflection probe to update, which are required to render the lighting on lit shaders
Though I have no idea why updating just one SH and one cubemap would be so slow

deft fiber
azure pond
#

I'll try in a new scene

azure pond
#

looks fine

hot path
#

my cube immediately renders

#

the new lighting i mean

#

this is so painful

azure pond
#

okay it's fine if I turn off everything except a cam, light and a model

deft fiber
azure pond
#

can too much lights cause that?

#

it's not that

#

enabled everything with gameplay

#

and it did it

deft fiber
#

Getting closer though, it sounds like!

azure pond
#

I mean

#

they are disabled unless the player gets 60m close

#

so a few of them can be active at each time

#

like 2-3

#

I turned off all of them

#

and still happens

#

god damn

#

I'm getting

#

Shader warning in 'Shader Graphs/RocketPlume': implicit truncation of vector type at line 1527 (on d3d11)

Compiling Subshader: 0, Pass: DepthNormals, Vertex program with <no keywords>
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING

#

theese kinds of errors

#

so like

#

could that be it

#

if my damn rocket plume shader was doing that

#

I'm going insane

#

it's not that

#

I'm not even getting warnings now

#

it's

#

my

#

player

#

there is something on my damn player

#

that causes this

#

post processing mabye

#

as in the camera settings

#

it

#

it was that

#

what the fuck

hot path
#

so

#

@deft fiber do you know if there is a way i can check what the ufkc the GI updater is doing

#

so i can figure out why its taking so long

deft fiber
hot path
#

here are lighting settings btw

#

and this

#

any of this look problematic

deft fiber
# hot path

"Realtime global illumination" means you may be using Enlighten's precomputed realtime GI in addition to scene's own environment lighting

hot path
#

intersting, would that cause the lag?

#

lemme run rq without

#

well now none of my lights work

#

tf

#

ok i fixed that

#

some other weird setting

#

but nope

#

still delay

#

maybe less tho

deft fiber
#

Enlighten should definitely be suited for the task of changing environment lights at runtime, but have to work with its workflow and be tweaking its settings in that case

#

(Please condense messages into longer paragraphs also)

hot path
deft fiber
#

Iirc it's the "realtime lightmaps" tab of Lighting window
https://docs.unity3d.com/Manual/realtime-gi-using-enlighten.html
Here's the docs, may be helpful to look up tutorials also
But note that you might not need this and I'm not totally sure what the advantages are in this kind of situation when you're only trying to change the probes
I recommend you choose to disable it for now, or to work with it and figure out how that changes things

hot path
#

"you're only trying to change the probes"

#

Are the ambient lighting things controlled by probes?

deft fiber
# hot path Are the ambient lighting things controlled by probes?

Yes, as I mentioned the environmental lighting settings generate an SH/ambient probe, as well as a cubemap/reflection probe
(Or rather that's what DynamicGI.UpdateEnvironment does so I assume changing the settings must be doing something similar)
These are then used by lit shaders to render the lighting on meshes

hot path
#

I see

deft fiber
#

If you schedule updates in incremements more frequent than Unity can perform the readback, Unity silently ignores the request.
If the current system does not support asynchronous readbacks, environment cubemap readback stalls the current thread, and Unity reads and processes each face of the cubemap one by one.
If changing the values also regenerates the dynamic GI environment, it probably follows these rules likewise

#

Which is a potential explanation for the delay

hot path
#

Interesting, but why does my cube table update instantly then? Thats interesting

deft fiber
#

I think that "shouldn't be possible"
But it's hard to say
It's a clue of some kind at least

untold jolt
#

Why is the door so dark and how can i fix this?

hot path
#

looks like no indirect lighting

#

maybe

#

@deft fiber is it normal that i have 24 RT lightmaps

deft fiber
#

Realtime?

hot path
#

yes

deft fiber
#

I don't recall how many lightmaps Enlighten produces normally
I recommend doing some tests scenes with it to get a grasp of the ins and outs

deft fiber
# untold jolt Why is the door so dark and how can i fix this?

If they're dynamic and they're supposed to be static, that would explain it
If they are static, they might not have valid lightmap UVs
If they are dynamic and meant to be dynamic, you need reflection and ambient probes to light dynamic objects with baked lighting

tawny minnow
#

Hey, I have a problem with the unity lighting

tawny minnow
#

on the scene editor, the lighting is normal, but in the build, it becomes dull and darker

#

scene editor:

#

that is the build editor

deft fiber
tawny minnow
#

gimme one sec

#

it didn't change anything

#

its the same

hot path
#

whoops I meant there are no lightmaps

#

not it does not work

untold rain
#

I want to create a placeholder for a night time festival and want to put something on this capsule and not sure what light options there are?

#

Some examples

untold rain
#

I tried some method of creating a lantern but the main issue is the scene itself feels way too dark. I can try placing some directional light. I am going for a "festival at night" sort of scene.

#

The building placeholders are barely visible besides just the shape.

hot path
#

in the video you sent it looks like there is extra lighting on the buildings

#

but also you can increase the range

#

@deft fiber I think it might just be recalculation times, looking at the lighting settings while the game is running, it updates the color displays when the trees update

#

not sure if there is a solution though

#

man this is pain

tropic sable
undone surge
#

Hello there, I've some lights that are going through the seams of my mesh. After few researches, a solution was modifying the bias of the light could be a solution (If you have another one, i'll take it ! :d), it helps a bit but still have some weird light where I shouldn't have... Also, my shadow are modified when I'm rotating my camera. Did I miss something ? I am currently on the 2021.3 version ! Thanks in advance :)

knotty rover
#

@arctic isle I forgot to ask something yesterday during the live session =]

Right now we have 4 types of lights (directional, point, spot, area), area light is baked only, it'll be really helpful if you guys make it realtime, I know calculating shadows for area light isn't as simple as point/spot/directional, but it'll enable us to create so many things, like neon lights over a shop's logo, or long strip lights...

deft fiber
#

Although it'd be nice, all three would have to be rewritten or expanded heavily to make it possible so don't hold your breath for it

#

You still have the option to let baked area lights illuminate dynamic meshes via reflection and light probes
And you've also got HDRP which does support them in realtime thanks to its more complex lighting

knotty rover
#

Oh yeah, I plan on trying to make it myself as I need it for a short term project, it'll just be awesome if Unity added real-time support to Area light someday, I don't know about HDRP, I mainly use URP

arctic isle
# knotty rover <@271000502555115521> I forgot to ask something yesterday during the live sessio...

That's right Spazi, thank you! It's unlikely we'll add it in BiRP so it will depend on when URP will completely detaches itself from built-in for this to happen. It's not going to be soon though as we have a lot of other things cooking. As Spazi mentioned, you can "fake" the indirect lighting somewhat with reflections and light probes, but you'll have to work around the limitations of the engine.

#

It's a double-edged sword having such wide platform reach with Unity as we need to make sure we can support all of them, which is why the render pipelines help segregate the target specs for features like this.

knotty rover
#

Yeah, I'm aware the Built-in RP will be deprecated at some point, I've been using URP since the LWRP rebrand. Thankfully we have SRP so we can add functionality ourselves so I'll definitely give it a try

hot path
#

@deft fiber AHA i figured out the issue, each lightmap was one terrain, so when i deleted my extraneous terrains it fixed the slow updates. Its still not perfect but with my slow time cycle it is MUCH less noticable

deft fiber
hot path
#

realtime lightmaps tab

#

NOTHING else adds a lightmap

#

just the terrains

#

its weird but

#

meh

deft fiber
#

That is Enlighten, so if you disable Enlighten entirely the scene lighting should update globally rather than per-object

hot path
#

yeah thats what i thought

#

but turning off enlighten

#

makes everything slow

#

maybe now that i removed the terrains

deft fiber
#

"Everything"?

hot path
#

The trees updating

deft fiber
#

I would presume ambient lighting without Enlighten is a global variable all lit shaders refer, and that it shouldn't be possible that they don't update in sync, even if they update at a delay
But I think it may be pointless for me to repeat the same speculation before I have a chance to prod at it

untold rain
#

Is there a way to put a directional light in the scene for only part of the scene? The directional light seems to illuminate the entire world. I am trying to get something like it for only a rectangular section.

hot path
#

Area light afaik

untold rain
#

Area light comes out to look like this:

#

Directional looks like this: (Will light up everything)

#

Am hoping to have directional only in a small section

arctic isle
#

(turn off "Show Halo" by the way to get rid of that orb look

untold rain
#

Is there a way to bake in editor?

#

In gameplay the area light is still not showing anything

arctic isle
#

Yes, Window > Rendering > Lighting then press "Generate Lighting"
However-- this requires some extra setup which I assume you haven't done so I'd say maybe use a spotlight and trim it with some cubes / a custom mesh / a cookie to mask the light if you don't want to get into the weeds of baking lighting

arctic isle
untold rain
#

Am trying to replicate something like this. I realize the lanterns are not lighting the scene, they are just glowing so that would just be emissives.

#

I guess I can use spotlights. I am new to lighting and not sure of styles possible

arctic isle
#

If you want to get as close to this as possible I would advise that you look into baked lighting as it will provide the best results.

untold rain
#

Why does the light go through objects?

#

I plan on trying to make it so the light only renders on the area with assets for "Level" this may require new terrain or spotlight for terrain.

#

Although I may completely remove terrain. I found "Culling Mask" lets me do some stuff.

#

Not sure what lighting would be used for these? I imagine the first scene in the game to show the lights of the festival lanterns turning on as the buildings get drawn in; as if the world is being drawn in detail as you enter it. One method would be Culling Mask for each building perhaps. So "Building 1" appears, then "Building 2".

#

I am not the best with complex. Am looking for simple things to drop in that I may have overlooked. I have Spotlights, Emissives, and Directional Light (most likely with a lot of Culling Mask).

deft fiber
# untold rain I am not the best with complex. Am looking for simple things to drop in that I m...

What you're asking for is pretty complex
Baking is the best tool for area lights and emissive materials, but that results in static lights with static geometry
You can get a dynamic fading effect with dynamic point lights but then you'll probably need to work to optimize their number and ranges
HDRP on the other hand supports many types of dynamic lights in great numbers, but is heavier and more complicated to work with

#

Most of lighting knowledge is knowing the tools and how to navigate around their limitations

untold rain
#

What about use of just emissive and spotlight and tons of Culling Mask? Is that maybe work?

#

How to do a scene where as the player enters a trigger, an area lights up in real time?

#

(It should probably just be a trigger that spawns the light game object.)
I am just wondering if there are other options I am not aware of that do not require the rendering window or more complex systems.

forest rose
#

What are we thinking about the lighting now?

night shell
#

I'm assuming those are ceiling lights on the top left right?

#

are they on or off?

forest rose
#

They are on, I'm probably going to put an emmissive material so it shows light coming from it

night shell
#

I would make them much stronger if they are meant to be on

#

but honestly if we step back and be less pedantic, the lighting is still plenty passable

forest rose
#

I still need to put a metallic texture on the lights but I’m trying to get it as natural as possible since this will be frontpage of my website as a portfolio

#

It will represent me so naturally looking for quality

radiant kettle
#

What would be the prefered way, or multiple ways, to prevent an object from receiving any light (and be completely dark)?

forest rose
#

Cast shadows off?

radiant kettle
#

In my case it becomes brighter doing that

deft fiber
radiant kettle
#

Either ways will mostly likely see by testing it

deft fiber
radiant kettle
#

Is there a way to make the back of quads also block lights, I guess it would make more sense to use another quad or a plane rather in that case?

deft fiber
#

If you want the unlit material and shadows, you can also duplicate the mesh gameobject in the hierarchy and set it to "shadows only"

#

The shadows only mesh does need a lit material, but it doesn't matter what kind since the surface won't be rendered anyway

gritty fox
#

im kinda stuck with my lighting. trying to go through that lightmapping troubleshooting guide but I cant figure out whats causing this

#

this is before i bake. if i keep it like this it doesnt look too good and the light can go through some walls at the top/bottom. ive even tried making the walls go higher than the ceiling and lower than the floor. with shadow maps, I gotta put it to "on enable" because on every frame i get like 20 fps atm

#

this is ideally what i want. Just with a bit better performance and the shadows to look a bit better (because in some areas it doesnt look too good)

#

but when i BAKE it I get this and I cant figure out how to fix it

#

im using hdrp and my skybox is on none. every light I have is a point with a mixed mode

night shell
#

or could also be that you haven't marked the correct amount of objects as static

gritty fox
#

i have marked the whole map as static apart from 2 small doors

night shell
#

then its likely your lightmap UVs

gritty fox
#

thanks for the help

night shell
#

you can enable lightmap UV generation on your meshes

#

which can be found in the mesh import settings when you select a mesh in the project view

gritty fox
#

ah i see

#

gonna give that a try

hot path
#

Does anyone know how I can have ambient lighting affect my terrains? There is realtime lightmaps created for each of my terrains, not sure if thats affecting how ambient lighting is being applied

night shell
#

<@&502884371011731486> @timber lichen

boreal iris
#

moving around/moving the camera causes them to flicker on and off

delicate mountain
boreal iris
delicate mountain
#

ah well that's not dandy, try resetting the lights. Maybe they just got bugged?

#

idk man I'm here fighting with HDRP so I'm not in the greatest of moods hehπŸ˜…

boreal iris
#

ahh that's fair man, thanks for trying. I'm trying to bake the lightmap now but that is going to take 3 hours apparently? Does it usually take that long?

delicate mountain
gritty fox
#

having some trouble with lighting atm and its really bugging me. This is what I'm trying to get atm but this is realtime on "every frame" update mode for shadows and of course it gives a low performance

#

if i go to on demand or on enable update then the light will bleedthrough

arctic isle
gritty fox
#

but if I bake everything the this happens and it gets like this. Cant see it in the screenshot but at the bottom of the wall the light comes under and UP the wall and the ceiling tiles are different colors

arctic isle
#

is each of the ceiling tiles an individual mesh?

#

Are you using just lightmaps? What are your lighting settings?

gritty fox
arctic isle
boreal iris
gritty fox
arctic isle
# boreal iris URP

you can increase the max pixel light count in your render pipeline asset

gritty fox
#

so far ive just baked lighting. im using point lights for all the lights that are on. skybox is off

arctic isle
#

Min bounces 6, max 10

gritty fox
#

okay

arctic isle
#

Turn off ambient occlusion for now

#

You may have bad UVs, just need to see

boreal iris
quick saddle
#

Do u have a bunch of point lights?
Theres a max limit of lights u can have i think

arctic isle
#

do you have any of this on?

#

under PlayerSettings > Graphics

arctic isle
boreal iris
boreal iris
arctic isle
arctic isle
boreal iris
boreal iris
#

it'd be nice at the very least if there was a way to have it so that it prioritized the closer ones, rather than at random or however it does it now

arctic isle
#

hmm maybe you should set them back to Auto prioritization

#

since you increased the light count-- that way you won't have any manual overrides

boreal iris
#

that's how I have them

arctic isle
boreal iris
arctic isle
boreal iris
#

ok super interesting development that might provide insight - recording now

#

the light flickering seems to only happen on the terrain - I placed some random cube below it & it looks like the light is working fine on the cube, but flickering onthe terrain

#

@arctic isle meant to ping πŸ˜›

deft fiber
boreal iris
#

they are sparse, but there will be ~100 per terrain

boreal iris
#

ah so what I have described is impossible in your mind?

#

Perhaps I can shrink the terrain

deft fiber
#

Usually you would have environments in smaller chunks, but for some reason Terrain doesn't do that automatically (or at all)

deft fiber
#

Instead of lights, particles can also be used for a "glow" effect to avoid the limit

boreal iris
#

thanks for the ideas

deft fiber
# boreal iris interesting. I know nothing of forward or deferred rendering paths, I will have ...

Forward is the default, in which each mesh is rendered again for each light affecting it, hence the cost of lights and the limit
In deferred rendering path lights are rendered only for each pixel on screen affected by them, which makes shadowless lights incredibly cheap
There's a lot of render pipeline specific drawbacks though, namely no hardware AA and no deferred rendering for transparent materials
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/rendering/deferred-rendering-path.html more about that here
Forward+ is a brand new thing which as I understand works as the old forward but slices the screen to tiles, so the light limit is per mesh per tile
It's basically the best of both worlds, but still new and may act unpredictably so some things like shaders with custom lighting may bug out
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@14.0/manual/rendering/forward-plus-rendering-path.html

boreal iris
boreal iris
deft fiber
boreal iris
deft fiber
boreal iris
#

Yeah I'm using github for everything so conceivably I could but I may as well just wait - thanks for the tips!

#

Deferred seems like a good quickfix for now anyway

gritty fox
#

my lighting is almost done to how i need it but I've just got these few problems. Any thoughts?

#

samples are 32, 512, 1 and bounces are 6 min, 10 max now which fixed LOTS of areas but its just these that are left all over the map. After baking some walls are just black, some of the ceiling tiles are a different color or arent meant to be lit up like the second screenshot etc.

night shell
gritty fox
night shell
#

are those area lights or emissives only?

#

or both?

gritty fox
#

point lights

#

and emission

#

im pretty sure 1 sec

gritty fox
#

i got this on the material for the ceiling and point lights

night shell
#

show us what your scene looks like in the baked lightmap view

#

with the lightmap resolution checkerboarding enabled

gritty fox
#

okay

#

like this?

#

not sure why that far wall there hasnt got anything wth

#

spots like this light here on the left is lit up by a light but it shouldnt be. And also at the bottom of the walls as you see are getting lit up.

night shell
#

those ceiling UVs are completely messed up

#

should not look like that

#

you can see how the cherkboard pattern is not consistent with the walls or even the floor

gritty fox
#

yeah

#

any way to fix this or how did this happen?

arctic isle
gritty fox
#

Okay

arctic isle
#

For the noisy areas you should increase the indirect samples and the noise should go away

#

next step from 512 is 1024

gritty fox
arctic isle
#

(in recent versions we're more explicit that samples are only in powers of 2)

arctic isle
gritty fox
#

Nice okay thanks

arctic isle
#

Since you have few lights to light this entire area, you need many bounces and indirect samples to have the light reach the farther areas. If you turn off filtering temporarily you'll be able to see the exact samples taken.

#

In fact, to get a better image I'd switch the Filtering to Advanced and choose OpenImageDenoise for indirect

gritty fox
#

Hmm I think I was gonna try that until it said something about it not being supported or something. Will have to recheck in the morning but I'll run through everything and post some results. Thanks again for your help! πŸ‘

earnest sluice
#

guys how can i disable all shadows on my scene

#

i selected no shadows but it didnt works

twin zenith
#

I believe that's not the cause of shadows, but just certain areas being differently lit due to you having a directional light, if you delete the light and instead use environment light from the lighting settings everything will be equally lit

deft fiber
hot path
#

ok, how should I go about making this look more realistic? I think that the light shouldnt be so sharply blocked by the hill, but I cant get my terrain to be affected my ambient lighting, and im not even sure if that would look good

tired siren
#

Is it even worth baking if the only static object in a massive scene is the terrain?

tired siren
hot path
#

and how would i position that

#

why cant i just get ambient to work on terrain?

tired siren
#

Are you using a directional light?

hot path
#

yep

tired siren
#

I dont know the answer to your question, but using a second dirrxtional light facing the opposite direction at 1/10 the overall scene would light the hill enough to make it believable.

#

Is your terrain static?

hot path
hot path
#

i dont just want to add 253485 directional lights

tired siren
#

Two-three should get you the desired effect, once you bake the lighting it won't affect performance.

hot path
#

how do i bake a moving light

#

what