#archived-lighting
1 messages · Page 15 of 1
Also don't crosspost I don't want to be repeating what others have said already
Is there's a way of preventing the fog from affecting a specific object?
for urp, I dont see any way except making your shadergraph transparent (then you'll have option to disable fog)
for built in, make custom shader and add nofog to the pragma
I've been having an issue with my lights and I REALLY need help from someone with experience with lights. I've been wanting to bake lights into my scene forever but no matter what I do it'll break some of the lights every time and they just wont generate, I used to have 128 UV Overlaps (lol), but the number is down to 46 now. I've tried so much and yes I generated Light UV
Here are the settings I used
💔
Hello!
First, onto the settings: Use GPU Lightmapper if you can. It's (generally) 5 times faster. Turn progressive updates off for speed as well. After that, follow the instructions here (Chapter 9) --> https://forum.unity.com/threads/progressive-lightmapper-guide.1340936/#post-8467001 for getting rid of UV Overlaps. Hope this helps!
Hmm can anyone tell me why I keep getting dark models when baking lights?
Are the models set to Generate Lightmap UVs in the mesh importer settings? Are they set to be static in the scene?
Yes all of the floor tiles are static and have that box ticked. I set some objects with the issue to receive GI from reflection Probes as it seemed to be the only way to fix them. It seems random now though.
I've noticed that where objects are black, they are in the presence of multiple lights. I'm on URP. Not sure if this is a limitation?
Which version of the Editor are you using? For baked lighting this should not be an issue.
I rebuilt the lighting and it worked better this time. I think I found my main issue though 🙂
Thanks for the help
how can i fix the problem where when i baked lighting and there are random bright spots
Post screenshots of the issue to help people see the problem..
Hi! I'm a completely beginner in Unity and I keep struggling with lighting an indoor environment (for a game). Can somebody please explain me why lights pass through walls and tell me how can I fix it?🙏 I tried to use baked, mixed and realtime lights but the problem is still here....
This is either due to bad UVs or due to backfaces in your scene. Look into the debug visualizations (there is a dropdown at the top of the Scene View) to take a peek at the Texel Validity and UV Charting to see what the problem might be.
Turn on shadows for your objects and lights
Thank you, that is so much better! But I still have this :
idk where it is
what one is it
the left-most icon on the bar in the picture will give you the menu
If you're using earlier versions it may just say 'Shaded' or 'Textured'
yeah im on that
Hm... I am not sure what your setup is exactly, but it helps to use cubes / boxes instead of planes for overlapping geometry
I actually use cubes
what do i do now
Take a look at the texel validity info here https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/
If you're using these lights as just stable light sources, you can try baking and see if the issue still remains? Is this baked?
i hate reading its annoying
I just tried and it still doesn't work. Even if it worked, I can't use baked lights because some objects in my scene have to move, right?
Sure. Mixed lighting could be used here, but you don't have to go through any complicated setup if you don't need it. Take a look at this thread: https://forum.unity.com/threads/realtime-lights-leak-through-walls.1012474/
im so confused
If I change the mode of my Point Light to "Baked" without baking any lightmap will it do anything? Because from what I can see the the light is still there and works just as in the "Realtime" mode
if you have backfaces in your scene, they will make the parts of the wall 'seeing' them invalid and so lighting will not be calculated for those parts of your scene but instead the neighboring geometry will be interpolated into it
Baked lights are 'realtime' until you bake something for convenience. It's so you can preview the direct lighting.
So that is how it works. Thanks!
im soooooooooo confused
Does this help? https://forum.unity.com/threads/faq-blocky-artifacts-appear-when-i-bake-a-scene-how-can-i-fix-them.951444/
I know it's reading but it's the best I can offer 😄
So make a new scene and make a new Quad or Plane. If you spin around the Scene View, you can see that you can only see the Quad from one side.
The Quad will have one 'face' which you can see and one which you can look through. That's because it 'faces' in a certain direction and the opposite direction to that is what we call the backface.
Baked lighting requires a lot of knowledge about mesh rendering fundamentals like face normals, UVs and vertices
Similarly, if you go 'inside' a cube, you will be able to see through it because you're looking through the 'backfaces' of the quads that make the cube.
I just read the thread and it didn't help 😭
I would try
1.increase the wall size so it overlap the ceiling more if you didn't already do it
2.try increase the lightmap resolution (texel per unit), see if it help
For the wall overlapping the ceiling I think I'm quite good 😅
And I just tried with 120 texels per unit and the problem is still there
damn 120 is indeed overkill.
Yeah I know, I just wanted to be sure that the problem doesn't come from the lightmap res
What does this error mean and how can I fix that?
Anyone know how to make the 2d lights pixelated
thanks giorgos for taking the time to reply, ill look into and see if I can fix it :) thanks <3
These are compression artifacts. Are you targeting mobile?
i am targeting VR (oculus 2)
stand alone
In the player settings for Android, there is an option for lightmap compression, you can turn that to high quality and it should resolve the issue
I see you're using Bakery, not sure if that matters
i see, thanks man, i forgot that setting exist 
I keep getting this error while baking, every second or so. I cleared cache and checked my memory tab and its around 70% while baking so there should be enough memory
any tips?
could this be because of GPU baking?
maybe your gpu is out of vram
gpu baking takes a lot of vram
afaik
if you're trying to bake large translucent / transparent materials with the GPU Lightmapper it's possible that it can't fit them in the available VRAM
not necessarily translucent/transparent but most cases of this are with such materials.
Should I just bake without those materials then? Or switch back to the original baking method
🍰
I'm not sure, I have plenty of free vram for baking
GPU will always be faster if you can fit the scene in. Make the materials receive from probes and it should still be good 👍
I have 2 scenes where when i run them independently, everything works fine. But when i try to load into the second level using LoadScene, the whole map is darkened. and i can barely see any details.
How can I do so, and is there a way to apply it to all materials at once? Or is that a bad idea
you need to do that per mesh renderer aka per object
you could also make your materials smaller 🙂
Is this the setting you're referring to?
if it is, I have it on for all my materials it seems
I'm curious, what happens if I bake without those materials
This only happens in the editor. If you build your game, you will see that this will not happen.
You have to go to Window -> Lighting. In that Window, look for the "Debug Settings". Untick the "Auto Generate" checkbox and hit the "Generate Lighting" button beside it. That should take care of it in the editor for the current scene.
Oh thanks, i'll check it out
No ambient light
Generate lighting for the scenes from Lighting window
Realtime GI or baked lightmapping need not be enabled for this
does anyone know of a simpler lighting engine for Unity?
I don't want to use the fancy stuff and all, I'm looking for something dead simple like the Godot lighting style
I'm mostly looking for this because I want the sharp edges to be fine visible, just like on the other side
Is this an example of what you want or what you don't want? I'm not sure I understand
something I do not want
It may help to provide and example of what you desire
Looking at Godot its shaders seem to be more complex than what most Unity's render pipelines offer
Speaking of, there conceptually isn't a "lighting engine", there are Render Pipelines which give rendering features for shaders to utilize
To have simpler shading you simply need simpler shaders that don't utilize complex or fancy lighting functions
what I want to achieve is something like Blender 2.79 solid view with textures enabled
Ofcourse, I do want to have the shadows on the parts of the car hidden from the sun, but the sharp edges should remain visible
ah well, render pipelines then. I'm not quite the Unity expert to be honest 😅
The "sharp edges" are in the mesh, lighting cannot hide them
The only significant difference I can spot between the images is that this second set has no specularity
If you only need to emulate that visually it might be enough to turn the material smoothness to 0 in Unity
the sharp edges are still not here though
to show you, if I rotate that darkened part to the sun, you can see how the edges start showing up
They are there but that area is in shade, therefore subtle angles of the surface cannot be discerned
while now on the other side they are hidden
aaaaand what would I do to make them (more) visible?
There is no simple solution to that
The sharp edges are only a change in surface angle
Fundamentally we see them only because they reflect light differently
No light, no difference in reflection
You could implement some type of fake lighting, like a shadowless directional light pointing up or down, but I get the feeling that's not what you'd be happy with
hmhh let me try something along the lines of that out
if it works, it works 🙂
it sort of works
it's hard getting the lighting intensity right now though, because else 1 area will be too much unlit, and when increasing it's way too bright
but I'll stick to this for now, if you have any other solutions you could drop them below, I'd be happy to try out if that works better
You may be able to reduce environmental lighting from the Lighting window to compensate
that doesn't really help it seems, only increase the issue of overlighting
Even reducing it increases overlighting?
well in order to get my desired results I have to adjust the intensity of the directional lights again, but that increases overlighting again
ah this style
I would bet that using like an HDRI that has strong contrast would get you close lighting wise
Is there a way i can make a shadow 'diffuse'? like, blur the edges of a shadow
i want to sort of blend the edges of the shadows being cast on my fog
Hello all! I'm creating a game from and isometric perspective, in order to have an isometric camera I had to set my camera clipping near to -100 and turn fog off. However this caused my shadows to become all wonky as you can see below. Any ideas on how to fix the shadows?
It'd be called "shadow filtering" but iirc only HDRP offers it out of the box
Don't use a negative near clipping plane, move the camera back instead
Can't believe it was this simple😅, thanks
It's the setting that refers to whether the renderer receives GI from Lightmaps / LightProbes in the MeshRenderer Component
hey how do I enable scene lighting/bloom or whatever is needed to make this work? The orb is supposed to glow
Emission? You can add it from the material you've assigned it
I'm a little confused now ngl. The Mesh Renderer Component for me is greyed out and un-editable
However, in my prefabs of the same object, these are the settings
then it shouldn't go into the bake
my post processing was missing bloom
Shouldn't go into the bake?
the whole object?
The material attached to that mesh
So in that case I can just ignore the error that shows up? And bake like normal?
is the error still out of memory?
yes but only when the lightmap resolution is really high, which I need because it fixes my UV overlapping issue
also sidenote: I really appreciate you giving me this much of your time to help me solve my issue :) <3
The UV overlaps can be solved by making the Scale in Lightmap in the mesh renderer component bigger. You can also try to go into the Lightmap Parameters (you'll need to make a new asset) and disable the anti-aliasing samples (set it to 1).
Generally a really big lightmap resolution will lead to the lightmaps not fitting in GPU memory or taking an inordinate amount of time to bake.
That makes a lot of sense, let me see if I can fix by changing the Scale in Lightmap on the mesh renderer
It's on 1 by default, what should I try instead?
There's no right answer for this, 2 will make it twice as large 🤷♂️

You're talking about the scale right? The anti-aliasing samples will just make the size of the data passed to the GPU larger or smaller, but won't fix your UV issues.
Yeah the scale
hmm
I've had this on all my gameobjects since day 1
god bless
Alright well, it's baking time 🍰
Thank you once again gio, I will give you a large chunk of the cake once its done
Thank you have a nice day <3
somewhere that yeah, maybe a little more advanced, but that style should be the basic of my game combined with shadows ofcourse
how do i increase shadows render distance
Don't crosspost
This type of question google can easily answer
Please help idk why this is happening. URP 2d Happens in scene view too
Hi guys, Im having this strange unity glitch where my room ( Which is not at all open to any sort of light) has some strange lighting when looking from far away, the light is alays in the shape of a circle
so when I use enlighten on URP for RTGI, how much perfs do I lose?
Very situational and subjective
You need to ask less unanswerable questions and do more tests
I see
If you're worried about Enlighten support, you're safe to upgrade editor versions at least up to 2024.3.
what is needed in a shader ,for reflection probe to work?
except standard shader , which are the other shaders what supports reflection probes on the surface?
Hi... Is it possible to make reflections from an HDRI image but also use a different skybox without the HDRI - I don't want the HDRI image to be seen (I am using URP)
Maybe it has somethi g to do with your shadow distance
It's urp btw, where do I change that
Thanks so much! I fixed it
But I still have a question, How do I light a room properly?
My scenes keep looking dull, i want a simple scene, just a white room with proper lighting like this:
A nice Bright room like this
But all of mine look dull, dark, increasing the intensity of the directional light dont make a difference at all
screenshots of your current world would help
but also understanding how the reference here is lit is key
for instance its way more than a directional light
and if I had to geuss I don't think its a directional light
but there is tons of bounce lighting going on here
and in addition to that, there looks to be some SSAO in use
Is there a simple way to increase the intensity of shadows in a shader's lighting model
If you're calculating the light and shadow within your shader you can do anything
If you're using predefined lighting functions, shadows in them have no color or "intensity", rather they're an absence of light, mainly ambient light
im using a surface shader with a custom lighting function, which is this:
fixed4 LightingBackFace(SurfaceOutput s, half3 lightDir, half atten)
{
half NdotL = abs(dot(s.Normal, lightDir));
half4 color;
color.rgb = s.Albedo * _LightColor0.rgb * (NdotL * atten);
color.a = s.Alpha;
return color;
}
just not sure what i'd need to change in something like this to darken shadows
I'm with Spazi, shadows are the absence of light, if your shadows are not dark enough its because you have too much enviormental light
I don't know anything about surface shaders but if your shaders are not dark, those areas must be getting light from somewhere
Kind of similar to this, basically the same thing. I'm using URP btw
yeah thats the farthest thing from that image
first off, looking at your reference here
I really doubt that world is even lit with a directional light
sure there are shadows being cast directly down, which could be done with a directional light as well.... or with light sources placed vertically
but the biggest thing also with the lighting in that reference image is bounce lighting
I tried a directional light but even that isn't that great either, it did not light up the indoors at all
bounce lighting can only be achieved either with light baking through progressive lightmapping, or enlighten realtime GI
How do I enable that?
its not really as simple as enabling a button I'm afriad
search up a tutorial on lightmapping first
lightmapping is how you achieve bounce lighting
realtime lighting cannot do bounce lighting
(unless you use enlighten)
use a skybox
Even for indoors?
oh your shooting for an indoor enviorment?
then yeah you don't have much options really, either use enlighten realtime GI, or I would suggest using lightmapping
In this video, we are going to take a look at Lightmapping in Unity 2020.1 to help you create fast and beautiful lighting in your scene.
Learn more about Lightmapping in 2020.1 from our Docs!
https://on.unity.com/2U7VQIX
Interested in the newest Graphics Features we added in 2020.1? Click here!
https://on.unity.com/2GHYGkR
Download the Spaces...
damn you dyno
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 ...
Also about the directional light I placed it inside of my room, and increased it's intensity, but the room lighting wouldn't budge
you should not be using a directional light for indoor scenes at all...
directional lights are for suns/moons and general outdoor lighting
I think you need to learn about the different kinds of lights first - https://www.youtube.com/watch?v=p13tuFdKwP4 @vital widget
Unity Tutorial exploring the different light types you can use within the editor. This will work in all versions of Unity including 2018.3
✦ Subscribe: http://bit.ly/JimmyVegasUnityTutorials
✦ Patreon: http://patreon.com/jimmyvegas/
✦ FREE Assets: http://jvunity.com/
✦ Facebook: https://www.facebook.com/jimmyvegas3d/
✦ Twitter: https://twitter.c...
Ah damn, alright thanks man
Unity URP Lighting Course that people miss when it comes to doing great lighting for their projects, be it games or cinema. In my videos I will briefly explain basic but fundamental concepts and then show things in Unity. This will take your skills to a completely different level due to teaching you some art, photography, lighting and theory tha...
Why after generating lighting on the lighting panel it creates these weird things?
im using urp
and i made static all the objects that will not move in the game
I also generated lightmap uvs on the models that hadnt them
the only thing that stayed ok is the playground slide
idk why
im also not using the Lit shader for my materials but a custom one (not written by me)
What shader is it?
it is from a paid asset of the unity asset store, can i send the shader anyways?
It seems unlikely I could spot an issue with the shader code itself, but knowing what the shader is meant to do or how it's meant to be used may provide some clues why the issue is happening
The asset was meant to be used in HDRP but i converted the shaders to URP and it worked as it would until i baked the lights of a scene the first time with this shader applied on some materials and they cause weird artifacts. I use this shader for all my objects on my game, and the artifacts are shown only in a few of them
the shader provides some fields like Saturation, contrast a thing where you can drag your ORM map and use multiple normal maps or albedos
And if i drag down the contrast field of the objects that are glowing asf then it fixes, but the colors are not the same
Custom shaders cannot be automatically converted, so normally they wouldn't work at all
But would it seem that contrast field is what causes the issue every time you use it?
If so, avoiding the problem at least would be simple
but it happens only on certain objects
it only happens on these 3 coloured chairs, books and papers
nothing else
Even with the exact same material?
Something has to be different between working and non-working meshes
Probably either mesh renderer properties or material properties
the material of the papers books and chairs are different
but they use the same shader
I should investigate more on the fields
on what the creator of the asset put into these fields
and the most odd fact is that they have only a normal map and albedo
maybe a ORM map
but im not sure
i have to check
@timber lichen is it kind of "popping"?
like it happens
very quickly
when viewed at different position/angles
it pops
its not like a gradual change
idk if u tried this yet but theres a limit to how many lights an object can be lit by
so if u disable a few of them
see if it keeps happening
u can increase the limit in settings
but I'd say its better to just break up ur floor into multiple parts
yeah u can check in settings for it and turn it up but that confused me for ages
even on terrain like if u have a big ass map made it cant handle more than 7 lights
ye no worries
uhmmmm 1 sec lemme find it again
oh ye I think thats it I'm pretty sure the limit is like 8
My avatar in vr chat lights up an entire room literally, im not sure how to fix this, she has emissions but i lowered them, it sucks because dark worlds suddenly turn bright
We can't really help with vrchat, but my guess is that your avatar includes lights
Emissive materials shouldn't be able to light anything usually
Hey folks, is there any way to get a tube light? I googled but could only find threads from 2015
Or a line, really
Just a looong point
That would be an area light or an emissive material
Besides HDRP area lights can't be realtime, and emissive materials lighting is baked only in all render pipelines
so... I have a scene in a desert...
Can emissive materials actually emit light? I tried but it just looked like it was glowing
I'm new to this, sorry 😄
the shadows are being too strong for my liking... can I adjust the light or shadow setting so it doesn't make it that dark?
you can tweak shadow strength in the light source properties?
Mine looks like this
Reducing the resolution kinda works but... it created weird artifacts at higher distances
Okay... found the issue...
Shadows are only as dark as ambient light, changed from Lighting window
Only with baked or precomputed lightmapping
The calculation is too expensive to do in real time
I see, thanks
hi, how could i add shadows to tube area lights
or, if theres a way to do this without using shadows, how would i fix the light bleeding through the objects and reflecting off of stuff in other rooms?
Only with strategic use of light layers
Or possibly with per-room reflection probes but only with baked lights
alright
hi, i set up the light layer but how do i select the object(s) that it should affect
nvm, i figured it out. but thanks, that worked. now i just gotta do it for everything in the game😄
but yeah they work amazing for what i needed
Hello, question. Could UV overlaps such as these be the cause to lights breaking when baking?
yes
if you are authoring your own lightmap UVS then yeah just make sure nothing overlaps
but if you arent, and are trying to bake that
you can actually have unity generate lightmap UVs for you
from the mesh import settings correct?
yes
I had done that already and still faced all these issues
are you putting your scene in one giant model file?
or are these seperate model files you have?
Good night everyone! Could someone help me find what could be happening with this light maps? This dots on the wall weren´t supposed to be visible or even baked in the light maps, because they are far from the the point light range, does someone knows any fix for this?
this are the inspector of the candle light
I´ve tested and they are coming from the candle lights for some reason
try enabling importance sampling
can you do it again?
because "all these issues" can be due to a number of things
both
because I can't do much beyond check and uncheck the box no?
unity will give you options though when ticking that box
but generally by default it should do an okay job
but yeah do both, I want to see what issues that you are referencing
should I generate with low quality for now just to show?
what are your lighting settings?
also just to rule it out I would make sure that isn't cuased by texel invalidity, even though it doesn't look like it
ehhh...
ok
for speed do the following
- direct samples = 16
- indirect samples = 16
- enviorment samples = 16
- light probe sample multiplier = 8
- min bounces = 1
- max bounces = 4
- filtering = advanced (and set the denoiser filters to open image denoise)
- max lightmap size do NOT set it to 4096, I would set it at most to 1024
alright baking now
Ah ok, chaging the lightmapping padding would help in this case?
nope
that does not look like a padding issue to me
but I want to rule out texel invalidity just in case
I´m a bit new in this topic sorry
there should be a scene view mode for texel invalidity
if you see alot of red then thats bad, but otherwise it should all be a nice green
in the texel validity view mode
you mean this view?
There doesn't seems to have many problems with the texel validity I think...
or it is just not showing
for texel validity you have to have recently baked your scene
since unity will discard the data when you close your project
or load a new scene I think
sorry, needed to restart my pc because unity sometimes stay stuck at the "preparing bake" stage 😓
but gonna try with a new bake now
hmm
I will say
the artifacts look like fireflies
again it could be texel invalidity, but I doubt it, but also
on your filtering settings
make sure that you are using a denoiser
low sample counts will cause these fireflies to appear on your lightmap ESPECIALLY if you are not using any denoising
here, you mean?
yep
thats probably why actually
for the direct/indirect and ambient occlusion if you are using it
use Open Image Denoise
or OptiX
you should always be using a denoiser on your lightmaps
(unless if you know what you are doing and are intentionally having them off)
sure! I'm trying with Open Image Denoise right now
@night shell this time I got much less UV overlap
It worked man! But I've found the real problem
it has to do with the textures on the wall
that looks fine actually
the lights look fine too to me
in my experience I always get UV overlap issues, but if you final bake looks totally fine then you should not be stressing about it
they where reflecting on the textures
if the final result looks completely fine then don't worry about it
any adjustments I can make to the lightmap and bake again or should I keep the settings as you told me?
how does your scene look baked?
pretty close to the original
?
almost identical
screenshot?
go for it
actually is it ok if I send it in Dms?
I have my DMs closed
alright no problem
ill send here and remove it later
ill send baked screenshots first
this is the closest its been to the original, still buggy
original looks like this:
some of those artifacts are texel invalidity artifacts
I can show you how to fix those
those appear when you have backfaces exposed
I'm not sure what that means to be honest
gimme a sec
texel invalidity artifacts
like I said, these are caused when you have exposed backfaces
case an point, my wall here is not fully modeled
and therefore the backfaces are exposed
i.e. backfaces are basically geometry or polygons that is culled
Oh I see.. though I dont remember importing anything like this
there are a couple of fixes you can do
could this happen with occlusion culling?
no that is unreleated with lighting
okay I see
- you can enable double sided GI on the materials for objects in that area
- with your geometry, double check for exposed backfaces and if there are then add geometry so that those backfaces are not exposed
case and point in my example
here is with double sided GI turned on
the problems are fixed
but also in this example I turned culling off since I was demonstrating some issues to someone else as to why you shouldn't always do it
and the other fix
just avoid exposing backfaces
ok so if my issues are all around this wall thing
can I just put a large cube behind it
no that wouldn't really fix it
since your geometry in that instance is rather complex I'd probably just enable double sided GI
from the original mesh?
on the material settings
the material that you are using for that object
enable it
aha okay
I'm going to geuss you are using URP arent you
yep
ah, then in that case you'll just have to set the culling from back face to off
or whatever the name of the option is
just as a warning though, don't set this for all objects
it will typically fix alot of issues
but it will also have a side effect if you are not careful
top is with it disabled, bottom is with it enabled
ooh okay I can deal with that for a few objects
and no ambient occlusion is in use
so enable it only for the areas/materials that need it
and do a rebake
and that should fix alot
Alright will do
also let me show you how my scene looks like with realtime lights
or before baking I mean
you'll notice I have this weird cutoff on some lights
with the purple one
much brighter before the bake
the bake always makes everything dimmer and some lights disappear straight up
when baking lighting, one thing you will lose out on is specualrity which is why some things might appear a bit darker
as for some lights disapearing
that can be due to a number of things but most likely
you just have lights that are set to shadow casting, and while they look fine in the scene view, in actuality you have placed them inside of objects that you are also marking Contribute GI static
which means that during the bake they will be completely occluded and therefore not show up
this isn't an issue with baked lighting, its an issue with realtime lighting and shadow casting being inprecise
technically it would happen in any other engine as well
I also get weird issues like:
no light under sign
light under sign (I zoomed in)
or just got closer in the scene
are some of those lights realtime?
if they are you are most likely running into a per pixel light count limit
I triple checked that every light is baked
even directional lights that act as sun / moon
and this is when baked?
nope, before baking
baking aside, there is a light there above that sign that doesnt show up until I get very close to it
that sounds like the light is realtime and again its a per pixel light limit your hitting (since the light is closer to the screen it gets priority)
turn gizmos on and check that light
its a baked light
this happens in many cases across the scene
sometimes one light will turn off if i move another light too close to it
I guess if they're near the same object?
I have videos of this happening if it will help make it clearer
sure go for it
baked lighting has no limit on the amount of lights you can have since its all getting baked down into a texture
yeah but then I have all these issues with it
if I could bake while getting the same visuals I would in a heartbeat
trying to fix them one by one
yeah again that issue sounds like the light is still realtime, thats the only case a light like that would exhibit such behavior
realtime or mixed
all the spot lights in my scene selected
same for the one directional light on top
all baked
I see the text is bolded white
which usually happens when a value is different then that its supposed to have in a prefab if I recall?
I suppose lets try this to verify it even though I think my gut feeling is correct
bake your lighting
and then once you do
disable all of the lights in your scene
and dont rebake
yep
those look like the telltale realtime light culling issues
I can even see when selecting
that they are realtime
huh
old video maybe before I switched back to bake I suppose
so changing the mode to baked doesnt do anything until I actually bake?
yes
okay makes sense
I'm baking right now then ill disable all the lights
disable them from the actual objects not from the scene correct?
sure yeah
actually if you just mentioned this
you probably don't need to do the disable step
since it sounds like just a misunderstanding on your part assuming that they would be changed instantly, instead of they only change when you bake
so what am I supposed to do once they bake? they'll still look broken
yes
I mentioned this earlier
because baked lighting is more precise than realtime, any lights inside geometry that is being baked will be occluded
mhm I see
so you need to move them so that they are not inside the baked geometry and rebake
the issue with the weird walls here is fixed
the scene is just very very dark compared to the original
massive difference
makes sense to me
with baked lighting you are also simulating the bounce of indirect lighting and shadowing
realtime lighting doesn't simulate any of that because its too expensive
so therefore the lighting model in realtime is more simplified, and in your case your scene looks brighter because of it
so to counteract this I would need to increase the intensity of the lights overall? or maybe just the big one above?
I'll explain
also with increasing the intesity, i guess its just trial and error? increase, bake, check, repeat?
until its right
sure yeah
but given the nature of baked lighting being precomputed, you have the huge advantage of being able to do more calculations to make the lighting look proper
like I mentioned you get things like indirect shadowing and bounce lighting which you can't get with realtime
the image in the center here, the dark one with the light coming from above is an example of pure realtime lighting
I'll show another example
heres a scene with baked lighting
realtime here
baked here
notice how the lighting looks alot more natural, realistic, and even darker than the realtime one?
mhm
and from your screenshots I can tell why your scene is darker than normal, because its all under a large peice of geometry/ i.e. looks like an underpass
which is blocking most of the skylighting and moonlight
it does more bounces off things and includes colour for shadows as well because it doesnt have the issue of having to deal with a lot of processing so it can do whatever it wants quality wise, realtime doesnt get the same luxury, correct?
yes
makes total sense
yeah the underpass causing a lot of darkness, ill try to increase the overall intensity and rebake till its right or even better than before
if you've been using realtime lighting and never touched baked lighting I can imagine it might be quite the change especially if your used to how realtime lighting looks
but realtime lighting is not fully "accurate" compared to bake
truth be told its my first time touching anything 3d or lighting
yatta yatta you get the point
mhm it makes lots of sense
David I have a huge amount of gratitude for you
and I've been waiting to express that
no need
I've been trying to fix my lighting for around 4 weeks now
I'm mentioning you by name in my thesis lol
I will, its the least I can do
you helped me more than you can imagine
and in a very crucial time for me
god bless
I meant screenshot for the other guy not you but ok
Oh sorry...
is that before you applied denoising in the lightmap or after?
It was before I've applied the denoiser, after reducing the smoothness of the material the problem seems to be solved also... but not as well as with the denoiser turned on
well show me how it looks now with the denoised results
its hard to see in that screenshot since its so low quality
Ah sorry, there is no issues, was just giving the feedback...
I'm sorry if I've made a confusion
oh
But thanks so much for the help
your welcome
@night shell do you mind if I use a couple of your screenshots as reference?
go for it
thank you very much
Is it normal for lighting to take 10+ mins to bake? I've only got a single area light I'm trying out
depends on your hardware but also your lighting settings
I was told by one of the Unity devs that using GPU Lightmappers is 3x faster on average
But then again that depends on other factors
just thought id drop this here
these are my settings
lightmapping settings specifically
but @timber lichen is right, the GPU lightmapper is faster on average, but even if its still slow then there are ways to speed it up and get good results
lightmapping speeds will slow down when you have tons of objects that you are lightmapping, not really when you have tons of baked lights
Hi guys, is there a doc or any kind of ressources that contains some hexadecimal codes examples for light color based on environment ?
Hey Guys and Ladies -- Can someone please point me to the documentation on how to make an emissive object -- This is the emissive material I have set up, its not doing anything that I can tell -- my area light in the same room is doing the lighting -- I'd like to get it right
I'm assuming your area light is placed where that "light" is
yes
and you want it to make it appear like its emissive, then just swap the material on that light mesh you have on the ceiling
the white panel is the piece thats supposed to be emissive
I can make the emission work seems to be the problem
im using built in renderer
you mean you cant?
I set it up as an emissive object, and it does not increase the light in the room
probably because the emissive material is not assigned
oh
I can see in your example that "light" mesh does not have that emissive material you created
which is what I meant here
just as a small note, I would advise not to use emissives as a primary source of light in your scenes.
even though that isn't what your doing in your scene since you have an area light that is the main thing that is outputting the lighting for that room in that spot
but it's not a good idea to use emissives for your lighting ONLY, and not using any unity light sources to back it up
Not exactly
You can find more or less standard examples of lighting conditions measured in Kelvin for the color and brightness in lux (or also lumen or candelas for individual light sources)
Where can i find that ?
can someone explain something to me about shadows that is kind of irrelevant to unity but:
I get raytraced GI, reflections, etc... but what exactly really, are raytraced shadows? Aren't all realtime shadows, traced by rays?
no
realtime shadows come from basically a rendertexture from the lights perspective
think of it like another camera that is rendering the world, but from the perspective of the light
there is no "tracing of rays" that is happening
its basically the render texture view from this, and it is projected onto the scene
which gives you the appearance of shadows
a bit of a rocky and hacky explanation but does that help @tight moss ?
yes! that helps. so how does it determine where the shadows should be in that texture, if not casting a ray at that pixel? the "projecting" part
again no "rays" are cast in this process
but basically the depth buffer is used from the lights perspective
so what happens sort of is that the world from the light is rendered
and we get the depth buffer of the scene from the lights position
then that is projected onto the main scene camera using matricies
and to determine if something is being shadowed
the depth buffer, that makes sense
a depth test is done, so basically comparing what the depth value at a certain spot in the scene is compared to the main scene camera
and if it doesn't pass the test, that pixel is occluded and therefore in shadow
I'm probably butchring the explanation since it's been a while that I've messed with shadowmapping
but that is sort of the esseence
Shadow mapping or shadowing projection is a process by which shadows are added to 3D computer graphics. This concept was introduced by Lance Williams in 1978, in a paper entitled "Casting curved shadows on curved surfaces." Since then, it has been used both in pre-rendered and realtime scenes in many console and PC games.
Shadows are created by...
this will help you learn the nitty gritty
but all throughout that process no "rays" are cast
the problem with shadowmaps obviously is that they are a set resolution
so how well shadows can resolve details is dependent on how much resolution there is for the shadowmap
so the benefit of raytracing is more resolution basically? and is it cheaper to have more shadow casting sources if you are doing raytraced shadows?
the benefit of raytraced shadows is yes effectively more resolution (pixel perfect, almost like the stencil shadows from doom 3 YEARS ago), and for that last point I'm not too sure but my gut says that there still will be a cost
that was a great explanation though thank you. comparing the depth buffer of the camera and the light source makes sense
since those shadow casting objects would still have to be included into the scene structure that the rays will trace against
i thought so too, on the second point... i just vaguely remember a game advertising their raytraced shadows and dovetailing it with "allows us to have unlimited shadow casting light sources!" and i remember thinking, "that doesn't sound right"
i think it was tomb raider
well technically in a sense they are not wrong
because you don't have to render the scene multiple times effectively from different angles from light sources
but its not like they are free neither, have too many objects in the scene structure that the rays will trace against that will slow things down surely
ohhh because you're casting rays from the camera, not the lights
yesss
from the camera, not the light
but in short, they are not wrong it is cheaper, but its not completely free
thanks so much! I feel slightly more knowledgeable now 👍
I am new to unity and game development, thus not have good knowledge. I am confused about lighting.
Is mixed light the same as baked lighting?
In my unity project baked lighting is a lot darker and dull than the realtime lighting after baking. And spotlights doesn't work when i use baked mode in it and generate the lighting.
I have everything that's none moving to be static, like walls, floor, roof, and other prop items.
Hello everyone, am I the only one that can't get a proper bake in Unity V 2022.2.21?
Baking process remains stuck at 5% and "Preparing Bake"
baking with v 2022.2.7 works fine
Hello! This is a known issue- sorry about that! We've fixed it in the next 2022 version (2022.3 LTS).
This issue stems from animated materials being included in the bake. If you exclude mesh renderers with animated materials, the bake should continue.
thank you for the info i was that close to throw away my pc ahahah
Hey! Baked lighting exists only on disk (in the form of Lightmaps, Light Probes, and Reflection Probes) whereas mixed lighting uses some realtime components as well. You can check the documentation for the exact details of this, as there are different use-cases for each of the light types.
As for the lighting seeming darker after baking, sometimes that's expected, as realtime and baked lighting use different methods (math) for calculating the shading of your geometry. In general, baked lighting is much more physically precise and smoother than realtime lighting. It also supports indirect lighting (bounce lighting).
Check out the pinned messages for resources on lighting in Unity, and feel free to give any feedback on the learning process. We're in the midst of discussions of how to make lighting easier to work with for beginners, so any feedback is appreciated.
what version should work with animated materials?
Right now no released 2022 version does, but 2022.3.0f1 will
when will it be available for downlaod?
I would say by the end of the week if things go according to plan. I don't control the release dates/times so I'm not 100% certain.
cuz bake used to work with v 2022.2.7
Yeah it's a regression we introduced in trying to 'fix' caching/hashing of shader globals in the bake. Technically, you shouldn't be baking animated materials, but we're making it possible just because it's completely unreasonable to make such a change in an LTS.
thank you @arctic isle
you got it 😄 
if I make a hole in a terrain using the hole brush, will a real time light hitting only that hole still count as hitting the terrain?
Thank you, I was able to figure out the issue and now the scene looks much more better than before, i also made some lighting improvement to make look better than before.
In terms of the feedback, the docs are really in-depth and teaches you everything you need to know. However, it's my personal opinion, it would be really helpful if there are official step by step guide of getting started with unity video series available that's official made by unity instead of a third person. Mainly because 3rd person always have their personal opinion and touch to them.
Along with it, there's a YouTube channel on YouTube that does 100s of programming stuffs (Fireship.io). I would much appreciate it if there's quick and easy to understand breakdown of different things that unity has to offer. I ended up watching a video called Lighting in Unity in 1 minute which helped me understand couple of things which got me confused.
Thanks for the feedback, glad your scene is looking better 
It's out now 🙂
thank you @arctic isle gogogo guys ❤️
I'm a bit confused because I'm testing it right now and it's still stuck
The fixes were supposed to be for the time parameter, let me see what happened here. It said that it landed in 2022.2.22f1 which is not a real version.
Welp the solution right now is still to not include animated materials in the bake. This particular functionality of the lightmapper is something that is particularly troublesome to bugfix, we're working on it atm
yep found out that turning them off as you said allows the bake to proceed normally. Since they are emissive too, in my specific case, i don't really need them to have lighting baked on those meshes.
That's good to hear. We found what went wrong with the fix, for 2022 the hope is to get it into the next release 😮💨
EDIT: Seems it's on its way to 2022.3.2
having issues with my lightmaps, some objects are way to bright and some are way to dark
they are all static meshes
adding lightprobes helped
So im trynna bake my lighting in my game and its not even using my GPU. It did before but now its at like 1% usage. I do have GPU lighting selected and yet its not even using it. Nor is it using my CPU. And its making the lighting having a previewed bake time of 3 days... which is insane
to perfect it
objects have an anchor override
on the mesh renderer component
which allows you to pick specifically what probe you want to use for an object in space
So I work with procedurally generated scene which has a lot of lights in it. The problem is light bleeding artifacts that i have no idea how to fix. Is there any way to make dynamic light culling? Or should i use something else?
Reducing the amount of lights is not my solution.
Your lightmap resolution is way too low, or being wasted on something
Neither meshes from procedural generation or ProBuilder are good for lightmapping because they often have a lot of seams or discontinuity of geometry
uuh where can i change the resoultion?
Lightmapping settings
Hello everyone, I have a plane that receives light, I want it to have both sides illuminated. How do i do that ? I'm working in HDRP, and the light is a directional Light.
Check the double sided checkbox in the material
I'm sorry I didn't explain my problem properly. I've checked the "double-sided" box for my material, but my plane is only lit on one side at a time. The illuminated side is correctly lit, but the other side isn't because the light doesn't touch it, so the material is darker on that side. I'd like to know how to get both sides of my plane to have the same color, regardless of which side is lit.
Double sided materials still have only one front face, and duplicate its appearance to the back face
Instead of that you could duplicate the mesh faces and flip their normals in a modeling program, or make a shader that checks if backface is being rendered and negates the normal vector
HDRP may have some translucency option that can transmit light from one side to the other without using any workarounds, but I'm not fully aware of them
Thank you.
What does area lights do
emit light
okay
Which render pipeline?
Not practically
You could change ambient lighting with triggers by player/camera position
Why is it a problem to "pass the lighting to a player"?
If you have a GPU to bake on, scenes rarely should take that long to bake
Yes, Indirect Lighting Controller volume override
But baking will give you superior results in both cases
You might not even need a lightmap, just baked reflection and light probes if you don't need accurate bounce lighting in- or outdoors
If bakes take a long time that's usually if you're not baking on GPU, your lightmapping settings are too high, and/or you've included too many small or too complex meshes in the bake
Reflection probes are necessary in pretty much all lighting scenarios, light probes are necessary when you also want baked lighting to affect dynamic meshes
Light probes can also be used to cheaply illuminate static meshes as well
I don't see what exposure has to do with this specific issue
I think I would avoid any drastic changes to exposure, trying to get the lighting conditions right first
It may make it easier to have your emissive materials use a black base color/texture for the emissive parts, so that direct and indirect lighting don't add to it
Unlike URP, HDRP uses standardized exposure, and I think it also has an option for exposure-independent emission intensity
If you have no particular reason to stick to URP, maybe HDRP could be a better option
Still this problem seems mostly stem from unfamiliarity with how all the parts of the lighting system work together, and HDRP is guaranteed to be more complicated in that regard
I think lighting is best learned by practicing and testing one thing at a time, then two things at a time and so on
Didn't follow the entire conversation, but just FYI that ambient lighting is practically a single light probe and a single reflection probe
Bloom is usually just blur, but you can control how 'fake' it looks
I don't think bloom itself blurs the image below it in either RP, you could be seeing TAA or something
The look can be fully customized likewise but that requires familiarity not just with lighting but HDRP itself as well
Wonder if it could be possible to write to individual light probes manually? So you could create probe lighting conditions without any baking
Goal being separate lighting conditions for an interior contained by an outdoors area
But it's not a very user-friendly way of doing so
In 2023.2 you can move probes after a bake, in the future we're working towards being able to procedurally create them with some nicer APIs.
didnt help me :(
guess i just need to occlude light
are the lights here realtime?
yes
Hmm bakedProbes array doesn't have many clues which probe index is which, does it
nope 😄
Gets even worse if you are loading scenes and tetrahedralizing
It'd be really cool if SHs were a type of asset which you could assign to probes in the inspector 
SHs seem like they could be used for many different things too
That was one of the reasons I originally blocked the positions api because there was no way to tell. Now you can access probes per scene and that's enough for now.
That is doable (I think) 🤔
I thought I was looking at lightmapping issues
It may help to demonstrate the light bleeding issue with more precise information or pictures
Usually only realtime shadow casting or baked lightmapping can solve light bleeding effectively
Light layers work in some circumstances but it's hard solution to use systemically
Then Lightmapping has nothing to do with it. Try reducing the size of the map and make sure that all these lights are not overlapping hence becoming vertex lights. Switch to deferred if you're seeing weirdness still. Make sure your geometry and lights have shadows and proper normals. Once a smaller sized map works, scale up and see.
Drop it in the product board if you want it done, we look at that every week 🙂
I need sum help. I have a flashlight that has a spot light, but the light of the spotlight only hits furniture, but not the walls nor floor
any help?
light only hits the locker
I baked lights using Bakery, but want shadows, too, is there a way to have a point light only cast shadows?
What material are you using for the wall? If you swap out the material for a standard Lit material does the list then show?
how do i bake it so it actually looks like the light has a spot light?
i enabled the uv auto make on all models
dont use point lights, use emission
you can turn up the emission intensity to light it up more
For reference each line is a mesh, and the black shapes are 3d objects that cast shadows.
I thought it was the urp messing up at first, but I made a fresh project, and it is still happening.
I changed every lighting/graphics setting also, though I am %90 sure it is the mesh as if I rotate it the ine rotates as well.
If I turn off shadows it still happens also
Doesn't seem to be a specular thing.
Imagine it is normals
Solved: I got the fbx exporter package, and set normals to calculate, and it was fixed. Does anyone know of a script that can recalculate normals on a mesh inside a scene?
?
The lightmap is being repeated across meshes so that implies they don't have lightmap UVs
A lightmap resolution of 1 is way too low to represent spot lights, or any kind of lighting accurately
If you want to speed up baking, bake on the GPU and decrease the sample counts proportionally, but don't make the resolution too low
The correct resolution depends on the scale of your meshes but assuming real world scale, 5 to 10 are pretty low but not too low usually
What's the context to this?
I combined submeshes together, and the new mesh wasn't getting lit correctly. I made a script that re-calculates the mesh normals like importing fbx does so not a problem anymore.
Do someone know why this wierd shadows appear above the mesh, I am also using urniversal render pipline, Thanks!
HELP
I used the normal map, but after switch the scene, it happened
Describe the issue precisely
I would first check the light position relative to object using scene view when that happens
Seems possible that the light has a offset big enough to clip into the environment
is there an 2d global point light in urk or i need to do it myself?
Can you explain what you mean by 'global point' light? Do you mean a directional light?
global and point are kind of conflicting ideas
well directional light is global by itself so yeap 😛
alternative of directional light for lights 2d
because global light only uniformly lits object, doesn't cast shadows
then yeah there isn't anything like that in 2D URP, most likely for performance reasons
you can easily make one by just making a huge point light though 🤷♂️
well not really
futher point lights gives low res shadows
not sure, does all perpixel 2d lights use cascade shadows?
imo i'd better write my own shader than, but im not sure if unity exposes lighting code
not sure about that, I would just look at the docs https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@16.0/manual/Lights-2D-intro.html
for URP and HDRP we do have the code available
but yeah writing your own shader is a solid option if you're up for it
Just looking at that, im not surprised if you are hitting some light count limit
spawningg that at runtime
a bit of a bench test on hdr lighting
didn't go well
got rid of the edge clipping
with the universal pipeline i would get edge cipping spawning this way
it ran properly but the entire set of prefabs would differentiate
i read a few possible solutions, one being programmatic edge smoothing
But why
Because it's really difficult to give precise advice otherwise
"It happened" is unclear
How to fix it
can i make my 3d project without lighting like cn i remvoing the lighting while everthing is still visible?
sure just use unlit materials
how is that done?
you create unlit materials (right click in the project view, create, material) and then assign them to your mesh renderers (scene objects) from the inspector
It may be slightly different for each of the different rendering pipelines, but that's the gist. I suggest looking it up on
if you don't understand any of these steps and read up on docs / watch a tutorial to understand materials, shaders and light.
i did make a unlit materil but it removes my colours how do i fix that?
also i m working with default core
your colors?
the color of the object
you probably want to assign a texture to it / change the color from the material inspector
See like
Let's assume i have a 3d character
I made a unlit material
Do i drag it on the char or what?
yes
Yes but then it removes my characters textures as well
you have two options:
- modify the existing materials on the character to make them unlit
- re-assign the textures
in option 1 you will likely have to to re-assign the textures as well, not sure
What is easier?
both are the same amount of work more or less
Isnt there any other way to remove lighting?
if you're using materials that expect light, no
or here
also is this my texture issue or is this cuz of somelight settings?
This you can fix in Window > Rendering > Lighting under the environment tab
i opened it what should i change
try changing the environment reflections and environment lighting 🙂
I would strongly suggest going through learning resources instead of trying to change one setting at a time, it will really help if you have a solid basis of understanding for this stuff. Spoonfeeding you answers now won't really help.
check the pinned messages if you're motivated to do so
Nah I fix it
Looking good 🔥
heh the map gen is more fleshed out than that now
Mesh or more likely texture normals issue
My guess is the normal map is in DX format instead of GL
If it's not the texture then it could be that the mesh normals are inverted with a two-sided material
Even if both sides are rendered only the front face would get lighting, which the backface duplicates
Hello guys!
Im working on open-world RPG game and i have a real-time direct lighting with day/night cycle, i'm using a Realtime Global Illumination and on environment it looks very good
But i can't understand what sort of light i need to use in indoor. For example, i created a small village. I have some torches that lighting space around houses. Here logically i need to use real-time point light to cast dynamic shadows from NPCs and so on.
But what sort of light should i use inside buildings? If i use real-time light it costs too much FPS, if i use baked lights it looks strange during day (plus some people in videos on Youtube said not to use both Real-time GI and Bakes Gi together)
Is there some techniques or rules that i should use in these kind of project?
p.s. sorry for maybe a dumb question, im new to unity
pps and sorry for my bad English 😀
Not really, only mesh and shader normals affect lighting
The plugin could be making normals that are pointed in the wrong direction in some way
@arctic isle hi, i don't know why but i disabled dynamic material renderers and bake still doesn't work. Any idea on how to solve this?
Hey 🙂 I don't know of any other issue regarding this, though I have been able to reproduce what you are suggesting, not sure how/why it happened. If you see this after clearing the existing lighting data and cache and making sure you don't have any materials that change the mesh / albedo of renderers set to contribute or receive baked GI, then please file a bug.
@arctic isle thanks i will check tomorrow 🫶🏼
good to see you still kicking edward elric
Hey everyone, as you can see the shadow is passing through a static object, how can I make it not pass? (the vase is not static)
(For anyone who is searched for this message, i used "Dynamic Shadow Projector" from the asset store to fix it.)
Thanks for your answer, I'll try it now
@maiden axle @timber lichen Not the fault of subtractive mixed lighting mode, rather receiving double shadows happens when the table is set to not cast shadows
Those individual floor boards are wasting huge swathes of lightmap space and really making the lightmapper struggle in this case
I tried all the cast shadow options but the problem is not solved, what I want is to create shadows under the dynamic objects in the room. When I do baked indirect and in shadowmask mode, realtime shadows do not form
Keep shadow casting on for the table
If it's static you'll need to bake again
If it still casts no shadow, that suggests the lightmap UVs on the floor underneath are messed up
The rug is showing no baked shadows at all
Your true issue probably isn't even the shadow casting, but various problems with the lightmapping itself including UV overlap and too many mesh seams
I keep the lightmap resolution very low because I'm testing right now, I think when I increase it, the carpet and its surroundings will be fixed, my problem is with realtime shadow
Discontinuous geometry always eats into the available lightmap resolution and makes bleeding issues hard to avoid
Check for lightmap UV overlaps first and foremost
Good to know
I suspect the normals must've been put sideways by the mesh generator, or something weird like that
Is lightmapping and baking lights worth the hassle? My project is kinda done but I notice the biggest impact on performance are the shadows
no shadows performs great but I can't have that
How many things can break if I go this route? I'm assuming lots
Baking lights is a skill with a bit of a steep learning curve
If you're familiar with it, then yes
If not, then maybe not? "Worth the hassle" is relative
Baked lightmapping is a tradeoff to reduce realtime rendering cost to instead store and load textures which take up space on disk and in memory
It produces much better results in some cases than realtime lighting, yet worse in others
Nothing can "break"
If the bake goes poorly then the lighting won't look good, but you can always clear the baked lighting cache
hmm
well
I get like 15-20 FPS if I disable just the directional light
assumption is the same thing would happen if I baked it
I could see getting 30+ fps if I bake everything

I haven't done it tho
so I'm not familiar with it
why is it a steep learning curve?
also, question: Why are shadows hard on both the cpu and gpu? Shouldn't they have a negligent impact on GPU?
https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/
Over twenty of these are problems with baked lightmapping specifically you might run into
They're described by symptoms so one issue may have multiple causes
Shadows are rendered almost entirely if not entirely on the GPU, to my knowledge
Yea but they're calculated by the CPU
They don't really have polygons etc so idk why they're so hard on the gpu
and that link scares me
Pretty sure they're not
GPUs calculate a lot more than just polygons, and shadows are just another part of the rendering process
oh
I thought the positions of the shadows are calculated by the cpu
why are they taking a toll on the cpu then
Positions of shadow casters, which are essentially cameras, but that's just an overhead cost
ok thank you mr instructor
I will try and see what I can do
right now instantiation can cause a stutter but otherwise it runs ok on my pc
the game is kinda shit so I think it should run fine on weaker PCs as well
so I will try my best
- it's urp
Good luck
Despite the potential problems of baked lightmapping, you might not encounter many, or any
Make sure to follow tutorials and do simple practice bakes first
btw I just remembered. My zombies can't be pooled per se cause they get ragdolled, altered, body parts missing etc. But theoretically, wouldn't it be helpful to pool the zombies with all the scripts, then when they get killed, I could instantiate a destroyed, ragdolled version of the zombie
that might help with the stutters I get when the zombies get instantiated, yea?
Possibly
Instantiating in my experience shouldn't cause stutters, but if they're super heavily loaded with components maybe pooling can't improve that specific issue
Maybe better to investigate the precise cause of the stutter by profiling
(Being ragdolled or modified shouldn't prevent pooling either, though if you add or remove components or gameobjects in the hierarchy that could make it much less convenient)
Better to ask in coding channels, this is outside of my wheelhouse
profiler says instantiate is responsible for the spike
but I will investigate further
Why could you not use realtime reflection probes with deferred rendering?
Hi there, anyone knows why baked light creates those weird brighter and darker spots?
Hi ! I have a very strange problem with unity lightning, if someone is avaible to help me :)
say what the problem is in this channel and someone may be able to help
very hard to tell what's going on here, you can go in the baked lightmap view and boost the exposure with the slider at the bottom right to get (and give us) a better look
I have a problem with lights probes when loading scenes additively and asynchronously, they dont work anymore after that
In the scene I want the light probes? Or anywhere ?
after the two scenes have loaded just call the function from anywhere
Perfect, thanks !
oh and @opal chasm if you're loading multiple additive scenes (3+ total), tetrahedralize after all are done loading for best performance
noted, and thanks a lot, it solved the problem after 2h of messing up lol
thanks for the advice, this is how it looks like in baked lightmap view
i already tried to increase the bounce, the texels, the lightmap size, checked create Lightmap UVs
turns out to be the same result
Does anyone know how I could bake a light map to a non static object? I would like my object, which is moved by a script, to have the same lighting regardless of where it is using the lightmap instead of using dynamic lighting.
hmmmm what denoiser are you using?
no, but there are ways around this. just off the top of my head
- Make the object static. Bake the lighting.
- Take the lightmap and turn it into a texture for your object. Composite that over the existing textures
- Using an unlit shader, use the new texture as your object's texture
Based on which modeling / DCC program you use, you may be able to do that there: https://docs.blender.org/manual/en/latest/render/cycles/baking.html
if this isn't texel validity (go to the Texel Validity mode to see if the texels are red, then check the troubleshooting guide if they are https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/) then this is a denoiser issue. I hope that it can be fixed using (in your Lighting Window) Filtering > Advanced and then choose the Open Image Denoise filter for direct and indirect.
i already fixed one of the areas on my world by increasing the scale on the lightmap, but i definetly gonna try the guide. Denoiser was Open Image Denoise already 
Does anybody know how to disable reflections on a metallic material?
They don't look metallic unless they have reflections. I guess you could just reduce the metallic slider to 0
hey guys i am getting very weird shadow bugs in build mode, but not in the editor
What could I do to fix this? The floor of the room just turns black after baking
Hey. I am wondering if someone have an idea how i can get rid of this different lighting.
The Maze is build via runtime.
The only idea i would have is give them a "Anchor override", so they all get their lighting information from the same tile.?
Is there something smarter?
Hi there, question…
I am unsure how shadow max distance is being calculated because if I set it to 500 for example, a shadow doesnt appear when a camera is only 50 units away from the object - would appriciate any guidance on how it is measured. Thank you!
to follow this question up, no matter how high I set the shadow max distance, if I move the cube -50 meters away from the camera, I cannot get a shadow to show up. Thank you!
Are you using the same setting that you are editing there?
Will not do anything if you adjust the "HIGH" Settings when you are displaying the "MEDIUM" Settings
wow, I actually had a different render asset connected to my quality settings. I appriciate the help. Question on this though: is 1 unit in "Max Distance" equivialnt to 1 unity unit, in the scene view?
Thank you!
Yep
Ok thank you!
You could probably set some type of culling mask on each of the lights
i am not sure
anyone have any idea what causes these faded black squares on my screen?
presumably some sort of post-processing
ah i thought so
im using volumetric fog and the depth of field which was what i first thought it was
it's some sort of interaction between these systems. I think if you tone down the ambient occlusion this effect may be toned down as well
may also be the fog heres with and without
why do you have fog indoors is a separate question
let s say I have 2 light
Maybe something to do with light clusters (arent you using hdrp?). Sometimes hitting the per cluster light count can cause that
yeah im on hdrp
it seems like a screenspace thing though, no?
Though I think the limit is currently at 63 or something so maybe not the light count
just gives it a little bit of an eerie look
i have about 320 point lights in this scene btw
Those light clusters/tiles are just chunks of the screen
it's a fine if it's an artistic choice
so maybe the perspective and the fact that you can see down the hall causes this?
it is
just used for the big halls and really long corridors is why i have the fog
- the depth of field since its a helmet cam/bodycam style fps
ehhh maybe but it just depends where im looking ill see it
Atleast the problem here looks very similiar https://forum.unity.com/threads/hdrp-tile-cluster-lights-rendering-bug.667234/ which makes me believe its the light clusters
if the max lights are 512 im still quite under the limit
Its currently 63 per 8x8 pixel tile
But doesnt seem likely you are hitting that either
one person says they fixed it by reducing the range of the lights
turned it down to 10
but its super dark
i had it on like 25 before lol
now i cannot bake lighting wtf
why not? 🤔
that probably means that it doesn't see any changes in the bake input (lights/meshes/materials/settings)
ffs
you can clear and rebake if that helps
i need to learn unreal engine starting to get sick of this engine
are the lights set to baked / mixed?
just changed all lights from baked to mixed and it aint giving me no light at all no matter what settings
fixed had to clear, change to realtime and change back to mixed
oh, strange
Hey guys, I'm trying to create a dimly lit moody mansion setting and wanted to bake my lighting to reduce lag. I didn't think it would be a problem, but I'm having a really difficult time generating the lighting to match what my scene looked like using realtime lights.
What I'm dealing with now is the lights are appearing waaay brighter in the baked version than the realtime version, completely different vibe.
Does anyone know what I can change to get the baked lighting to more closely resemble the realtime lighting? For example, is there a away to reduce "exposure" when baking so that the lights appear dimmer?
Here are my images of realtime and baked, including the lightmapping settings.
