#archived-lighting
1 messages · Page 34 of 1
I am also starting to work on that
but we said it would be better to turn off shadows for the bounce lights
so how is that going to affect that?
Disabling shadows on them allows the light to spread more generally which should reduce any harsh shadows from the bounce lights
oh they are disabled
I have some placeholder ones
but why can't I see a way to dim the shadows in hdrp lol
only volumetric shadow dimmer
which does nothing
"Dimmer" under Shadows
Actually nevermind about that, it dims projected shadows but not shading
advanced settings
stupid unity
there is a dimmer
but somehow it's an ''advanced setting''
there is also tint
wow
maybe that will help if I make it less black
let's see
stupid unity, again
Hello, everyone. I have a problem with lightning and more saying. The Rendering Layers.
I need to have two seperate directional lights on scene. One resposible for Enviroment and the other for enemies.
The one for enviroment have Mixed mode and the other Realtime.
After setting up everything it turns out that the light for enemies lights the enviro also. Here comes to screenshots as comparison
(WITH LIGHT)
(WITHOUT LIGHT)
Objects on map are setted up on Light Layer Default
Did you follow all the instructions how to use rendering layers, specifically with lights
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@14.0/manual/features/rendering-layers.html
Yes
I have setted up custom Layers in URP asset
I have setted up mesh renderer on objects to proper light layer
And Light sources
Can somebody help me with this?
Can you get light layering to work with any kind of test light?
In test scene yes
But there is no baked lightning on scene
Just two cubes
Both set on the different light layer
Hey everyone. Not sure if this is the right channel to ask: Is it possible to fake multiple dynamic spot lights (they don't need to cast shadows)? And if so, how?
There's a bunch of ways, but what's the point of faking them? Some methods could be more expensive than simply having real spot lights
Also by dynamic do you mean they need to move, or to just affect dynamic objects?
Okay, I tested today this scene and this bug happens only if map have baked lightning
If everything is on Realtime Lightning then there is no problem
Hi guys, my gameobjects do not reflect light in the Game Tab, whereas they all reflect light in the Scene Tab. Is there a way to fix it?
Show us what you are seeing.
I guess you talk to me🙂 I removed and re-installed URP in package manager and some of my materials broke thereafter.
You have scene lighting turned off.
This replaces all lights with a single directional light attached to the scene camera
This toggle is in the top right corner of the scene view.
Thanks a lot, sorted out together with directional light fixed. Thx&Rgds.
my light is grainy and on the avatar shows a very crude geometric shapes around the eye. What am I doing wrong?
VR chatbot
Mmmm, ok, thanks for the info
They need to move
Does using DX12 make your game light, shadows and reflections look better than with DX11?
I didn't really give any info there, I asked for more
Ah ok. Sorry.
It was for spot lights that could move and activate and deactivate at certain points. It's for a mobile game.
Like i said, they don't need to cast shadows.
!vrchat
Join the growing VRChat community as you explore, play, and create the future of social VR! https://discord.com/invite/vrchat
Not sure if that's enough info
If you need to fake them for performance reasons you really don't have many options
Decals can be used to make spotlight-like projections, but they're unlikely to be any cheaper unless you're specifically running into light limit related problems
Additive particles / sprites representing the light's cone might be your best option
They wouldn't exactly "light up" anything but they still would be "spot lights" in a sense
That kind of technique is often used to fake sun rays, and generally used for flames
I'll keep that in mind, thanks.
And yeah, one of the issues is precisely the light limit, performance wasn't the only concern (sorry for not mentioning it 😅 ).
Hey, i have question. Do emissions count as lighting in unity?
I did just discover that they do in fact count as lighting
An emissive material set to contribute baked GI will affect baked lightmaps
It will also affect light probes
A material set to contribute realtime GI will only affect the realtime GI system
(if you have that enabled, at least)
Im using baked lightmaps for this currently
Sorry for the late response, i had someone come over for a sec
Any idea as to why some emissions wouldn't bake?
I'll look into that. Rn I'm trying to just build a shadow volume system from scratch and deal with the optimization consequences later but in the likely event of that failing I'll try this out.
when using adaptive light probes and baking adaptive probe data i just straight up crash, i span the scene which is a 1000x1000 terrain but theres not really anything on it and i dont have fill empty spaces ticked, however i just straight up crash any time i try to bake the adaptive probe volumes....anyone know what i could do?
Why is my area light not doing a single thing? Even with 1 million intensity? Sorry I've never used an area light before.
maybe this isn't even the right kind of light for what i want to do, idk...
I just want to make the inside of the volcano glow orange
Show the inspector for your material
Does baking the APV in a smaller scene with just some cubes work without crashing
Ill send it when i get home. Im currently at work
have you set Emission - Global Illumination - Baked in the material?
no
Yes
are these emission objects marked as Static?
so what's the point of the area light then if it doesn't even produce light!??!
It has to be baked into lightmaps.
It doesn't work in real-time
oh
A point light would probably work fine for your use-case
How can I fix weird auto generated light maps when using generate lightmap uvs
There’s always weird seams on cylindrical objects
Yes
Firts one shows the material, the next one shows all of the static objects highlighted and inspector stating that all of them are static
These show light settings
one possibility is that the bloom is just really, really strong; i can't tell how bright you have that emisison color set
i don't really understand non-HDRP lighting, since it's not based on anything physical
the materials might not be casting very much light
You can check the "Baked Lightmap" debug view to see if the surfaces are producing a little bit of light
crank this up to brighten the lightmaps
is baking lightmaps slower if the objects have larger scale?
like I have a restaurant scene, does it matter if everything is at 2 scale or say 1000 scale
yes, the time it takes scales with the size of the objects * the lightmap resolution (texels per unit)
so a bake with a lightmap resolution of 1 texel per unit and objects of size 1000 units will (in a simplified world) take 500 times more than with objects of size 2 units
Anyone know why my volumetric fog has started turning into this weird box shape over my screen?
so should I scale everything down before baking?
only the static ones
baked lighting is based on 'real world' light approximation so the scale of the world should correspond to the 'real world' units it represents. 1 unit is 1 meter. Scaling down the world before baking and then scaling it back up will likely not be effective even though it sounds like a fun workaround to baking times.
If you're still working on your lighting I recommend Unity 6's lighting preview in the debug modes or just lowering the bake resolution or sample counts, which also lowers bake times while you're still iterating.
ok thanks
my objects are way too large, a human is 800 units tall
This game I'm making is for a game jam, and the deadline is in 10 hours. I don't wanna scale everything to accurate size because it also means I have to modify the physics settings again (to get the same movement I currently have). I don't have time for that.
should I just try lowering the bake res like you suggested?
sure yes that would make sense
although unfortunately when the scale is this large a low resolution would be even worse for quality 😦
What are possible reasons for light probes to not work in URP?
what exactly are you seeing
Basically i have an indoor scene entirely lit by baked lights and reflection probe, and i have a bunch of light probes placed around, my game is an fps game, the issue i face is that the weapons, or player models (it's multiplayer) aren't lit by the light probes, it seems like they are but they're very faint
You should set up a test to show without any ambiguity what the effect of your probes are, if any
everything is really dark, i was using a realtime directional light, but idk if i should be doing that
Materials that are not fully rough are also affected by specular lighting in addition to probes
Metallic materials are only affected by specular lighting, not light probes
I would make a test material that has pure white color, 0 metallic and 0 smoothness and place it next to probes under a light that's "baked" rather than realtime or mixed
That kind of material should match quite precisely what light probe group's probes look like when previewed
I started doing research on shaders because i hate my current art style, but like can i light up a scene with only baked lighting and use custom shaders materials as well
imma test
there's so little material for when you get this far into game dev, can't even find people talking abt how to properly light up interior scenes
it not workie
Have you baked after adding those test lights, and do the light ranges reach any probes in the probe group
yup i baked
lights don't touch probes
imma increase range
ohhh
added mored probes, got something here
I don't really see evidence of any actual issue with the light probes
A lot of your materials appear brighter than expected because your specular reflections from the reflection probe are kinda super bright compared to any diffuse lighting
Possibly because you've got more lights with too low ranges
Not using box projection for the reflection probe can also sometimes make some reflected lights appear significantly larger, thus more luminous than they really are
yup, tried here, without reflection proble scene is really dark
it works, issue is really that my scene is not lit up correctly, what really lits up my scene is the reflection probe
well, if 1000 units in the game represent one meter, using 0.01 texels per unit would give you 10 texels per meter! it'd all shake out
although I'd rather just fix my scene scale 😉
it works, issue is really that my scene
Is enlighten just gone in unity 2022?
For baking it's gone
For realtime GI it's still an option
How come when I turn on realtime gi, it doesn’t show up as an option
It is realtime GI, to be precise
You can only generate realtime GI with Enlighten, which you cannot use to bake lighting
Tbh not sure why you'd want to use Enlighten except for that
Yeah I wanted to use it for realtime gi but that was it
Is there a way to achieve an aces post processing look without needing post processing
Why avoid post processing? That may be relevant
Vr chat quest doesn’t allow it
Many color adjustment effects can be moved from a post process pass to within the shaders that your objects use
ACES tonemapping or anything similar to it would additionally require HDR and linear color space, neither of which Quest might not support potentially
One of the earliest effects I implemented for The Last Clockwinder was HDR Tonemapping and Color Grading. We had decided from an early stage that the game was going to be lit entirely with static lightmapping The entire environment is lit with a single, massive bounced area light! , and post process
This speaks about exactly that
Hey does anyone know how you can get all the light sources in the scene in order to raycast from them and create shadow polygons? (Like in terms of the renderer having their information and getting it from there without having to grab a reference to each light object in the scene)
Hello!
Is there any reason why Baking GI would be stuck here, seemingly forever?
My scene is very simple and I've already attempted every solution I could find online
my computer is fairly powerful so I would not have expected this to take more than a few minutes. But it's been an hour.
Unity's lighting system must internally have a way to access them but I don't think a list of lights is exposed in their API anywhere. Is there some problem with just grabbing all of them at Start with a find by type (generally not recommended) method or serializing a list where you could drag them in editor?
Is there any reason why Baking GI would
In urp it's exposed to the render pass api. Not sure about other pipelines.
How can I improve the lighting, I tried baked but I don't think my models are optimized for that as there's a lot of black spots
Which black spots to you mean?
Cant tell if the dark grass is wanted like that or your issue ^^
I didn't use the baked lighting because of the issues,this is just unity lighting not baked
I will post my baked result later
Currently I feel like something is missing I just don't know what, unity always has very flat look to me
i like how it looks and it looks quite fine to me.
Baked will give you a more realistic look but needs some more work to do before you get a good result.
Not sure how firm you are with lighting in unity, but this is a great tutorial:
https://www.youtube.com/watch?v=hMnetI4-dNY&t=
In this video, you'll gain an understanding of how lights and shadows work in the Universal Render Pipeline, as well as how to set up a scenario with a mix of real-time shadows, Light Probes, and baked GI.
Speaker:
Ciro Continisio
Ask your questions here: https://on.unity.com/2UmP9TE
Did you find this video useful? Room for improvement? Let us...
Anything for getting volumetric lighting in urp for free, that's seems to be the biggest thing missing, that and post processing
depends on your target device.
Volumentric light is very expensive.
Often its faked with semi transparent geometry, if you need to make it performant.
If you need real Volumetric light, i guess you have to take a look into the asset store
I was aiming for mobile or webgl
Ok, that means no (real) volumetric light and nearly no Post processing ^^
In that case I will just push thr visuals as high as possible then work backwards, my main goal is to at least understand lighting
https://developer.android.com/games/optimize/lighting-for-mobile-games-with-unity
That is a nice guide for mobile light optimization
I know some games fake there lighting so I will need to look into that, Lost in random fake there shadows
One realtime directional light should be okay in most cases.
Depending on the hardware the user has.
Thanks I googled fake lighting and got a few results that I will try,
can someone please tell me how to fix this😭 🙏
You'll have to be more specific
light is going through wall😭
is it realtime or baked
mixed
why does spot light not doing mask culling in deferred rendering mode (URP). it works fine in forward rendering
if you using URP, goto the shadow settings and try to set max distance shadow value or you can change quality of shadow from the same URP asset setting.
It looks to be HDRP
It could be a bug, or a quirk of deferred rendering
Light layers do work instead
You should show the settings of your light
light setting or light
Properties of your light, but relevant settings wouldn't hurt either
There's just quite a lot of them in HDRP
Unlit materials show the lighting of lit ones through them when using Deferred rendering- can I fix this?
while i search for solutions can anyone point out why this bake might be missing shadows
i assumed contribute global was on but blender prefabs dont share there data, so i will need to rebuild my entire scene
this fixed the blacks spots
Do the materials and renderers used provide shadows?
I need to convert my assets to prefabs so I can activate contribute global but after testing 1 object it did bake with shadows. So hopefully the bake isn't missing anything else
Bake is looking better but my 10000 polly grass tile doesnt like light
It's not wise to try to lightmap small, dense or transparent geometry
its all of that, currently trying to find a fix
Light them with probes instead of lightmaps
i mean for the whole grass mesh
This. Use apv if you're on unity 6 though over legacy probes.
Legacy probes also often work great where lightmaps do not
Hi Everyone, this bathroom here is something im trying to recreate interms of lighting only, but i cant seem to get mine right. I know its an emissive material in the roof edges but do you think they implemented some sort of Area Light jsut to bring it all together?
Area lights require less samples to bake accurately than emissive materials, that's pretty much the only difference
Assuming static lighting, anyway
HDRP supports realtime area lights too
Unfortunatly i only have BiRP to use
does this look like then its souley reling on the Emission to create this look?
Area lights or emissive materials, as I said
Hi I have an issue where when I disable my main camera all of the lighting goes haywire, I need to use another camera for something, the first picture is the correct lighting, when the main camera is on, and the second picture is with the main camera off and the other camera on
I'm using unity 2019, and don't think I will be changing, But I will look into what not to light with lightmaps
do your cameras have different components than the other?
Yes they very much do
Oh how
When I asked my earlier question, I implied component settings, not just components themselves
Ah ok
Try duplicating your main camera and see if the copy displays the same result as your original
I gave them the same settings and the problem persists
What happens when you switch scenes?
Does the lighting do the same thing in other scenes?
Is your lighting rendering setting set to real-time or baked?
And do you have a baked lightmap active?
No
Is the lighting also buggy in the game view as well or is it just the scene view
Game view
And when you create a new camera, is the lighting bugged on that one as well
This might sound like a wild guess, but if you remove the main camera tag off of your main camera, does it still show properly?
Ok
It doesn't have the main camera tag
So is your lighting bugged on a completely new camera or not?
I'm a bit confused
And did this lighting bug start happening suddenly?
Oh it fixed when I changed it to realtime
Thank you
I went back to test and it's fine now
thank you
👍
So it's probably a baked lighting issue
Still haven't figured it out, if anyone knows how to fix this please help
Nevermind
Screen space reflections
Fixed it by turning em off
How to bake multiple lightmaps? When I bake a lightmap, rename the folder and bake it again, the previous lightmap is deleted
iirc they are tied to the Lighting Settings asset
You should be able to make multiple ones to bake to them separately
Thanks
reflections probes are also tied to the Lighting Data asset?
It seems reasonable but I don't know exactly
does anyone know a way around this? Using mixed area lights in hdrp. These gizmos suck, I cant see how they're overlapping and causing these bright spots.
I can only decrease the range or the intensity so much before you cant even see the light and even then is still an overlap. Sometimes increasing the range by alot but also decreasing the intensity loads will fix it. Other times there is just no way around it. Is there a package or something that can help with this? Its THE MOST annoying sh*t to deal with
yes, baked ref probes are tied to the lighting data asset
I have a moving light. How to prevent this waving shadows?
can anyone help me set up lighting so that i actually see something happen.
I tried following tutorials and tried stuff myself
But whatever i do, I dont see anything change in my scene, i and i dont understand why
URP has to be set up in your project settings and as the active quality level
Yea i changed it on both the Grapics and Quality settings
still i dont see anything change
After that you need a 2D light component in the scene and for all sprites to be using URP lit sprite materials
yea its probably the material that is not setup correctly
however, i cant seem to find where to create suck an lit sprite material
(since all tutorials also just either already all have it set up correctly, or they press this convert button in the edit context menu, which also does nothing for me)
or do i have to write my own Lit Shader Graph for that and create a material based on that?
No
The render pipeline converter probably should do that automatically
this does nothing for me
What editor version is it
2022.3.44f1
btw, I do notice that whenever i create a LitShaderGrap and maek a material out of that
That it atleast now reacts to light (ofcourse the shader is empty, so it makes sence that its all black, but at least it shows that the URP is set up in the project settings)
Do not do that at this time
Render pipeline converter is under Window>Rendering>Render Pipeline Converter in that version
You'll want to upgrade materials and readonly materials, and why not rendering settings while at it
i just checked all boxes XD
i hope they where all supose to be checked, otherwise i can easally go back to an earlyer state of the app
but still, i have no idea what just happend, and i still dont see aynthing
oh damm
thanks forthe help
i also want my particle system to emit light, however, i cant seem to make that work either
Lights module was not designed to work with 2D lights
https://discussions.unity.com/t/lwrp-using-2d-lights-in-a-particle-system-emitter/752498
This workaround will be necessary
And without modification will not let the 2D light inherit any particle properties like intensity
thanks a lot!
does anyone know why my directional light affects every object when i have it on only one layer on the culling mask? im trying to make it affect only one specific layer and its not doing that
only thing i can think of is that you havent setup the correct layer on the correct gameobjs or you have an extra light source somewhere (another directional light or skybox lighting enabled)
i think i found the issue, which was the urp renderer's rendering path was on deferred, which i put back on forward, but i want to keep it on deferred but i guess it wouldnt work if i did that so yeah ill just keep it on forward
It wouldn’t work because deferred renders the lighting after everything else and there’s no buffer for the layer so the renderer wouldn’t know which pixel is supposed to be affected by the light and what’s not
@dry pumice @upper fable Light/rendering layers work in deferred rendering
Couldn't tell you how
2021.3 is the only LTS version that supports light layers, but not forward+ rendering, though (in URP)
Nvm then
My scene's lighting data got all messed up... I've included before and after images, but I can't get back to the before...
Issue was caused when I hit "Generate lighting" in the panel
and deleting those files doesn't help with anything...
click the downward arrow next to 'generate lighting' and click clear
I have a bit of a problem, my scene is perfectly lit when i use hte simulator in the editor:
But on my real mobile when i build an APK all the lighting is gone:
does anyone know why this could be
Ensure that the build target (android in your case I believe) is selected to use the quality level with your 2D renderer
oh aha, now i see it, This is insdeed what i See on mobile
I asume i should change quality level Medium to use the shader right?
not change andriod to use quality level ultra
I usually rename "Ultra" to "2D" and delete the rest
not that it really matters, both are really easy to do
yea verry true
damm, i feel really stupid lol, you are a real timesaver
already spend a couple of hours yesterday on this, i jst coudnt find what the problem was...
You can add different 2D quality levels too, which in this case would each need their own 2D Renderer asset with different settings
2D Rendering can be made cheaper to run by changing Light Render Textures settings, disabling depth/stencil buffer or by disabling post-processing from the renderer asset
It is sort of working but also not 😅
The global light works, so therefore its like halfway dark
However the spotlight of the frog and the firefly is not
i searched and tried some setting changes i could find on internet again, but yea, no, none of then show any results
By "it" you mean what specifically
One of the renderer settings?
Multiple quality levels are an extra thing, you might not need them
This is my scene, it should look like this
And as you can see, the global light works because everything is darker but not 100% black.
However, the light that is comming from the firefly and the frog both dont exist or something
I've done that a few times, it just makes the scene slightly darker
What you mean by light limit?
That's hardcoded limit you cannot overwrite on forward path. Rendering layers are completely different concept and doesn't have anything to do with the light limit
Do you really need more than 8 lights?
If you cannot keep the per object light count less than 8 which is quite a lot already, you may consider using either deferred or forward+ rendering paths but both of them have their limitations and performance considerations to be made but both of them support lot greater light counts with less overhead per added light than forward which is the default
I am trying to adjust the ambient lighting for this scene but it is only changing it for some objects and not others
The long and short of how to use deferred or forward+ rendering is to tick the box in the renderer asset
Deferred renderer has a list of limitations though, like it cannot be used to render anything transparent
Splitting meshes and limiting light ranges is the most conventional and foolproof method however
Baked lightmaps override changes to environment lighting because it must be included in the bake
Clear lighting cache or bake again
should I keep workong at the lighting here, is there more I can do in urp
Hi, when baking lighting with adaptive probe volume, do you need to also bake the lighting? And in which order should this be done? Probe baking and Lightmap baking.
When pressing the button to generate lighting, it first bakes the ambient scene lighting which is used for non-baked realtime lighting
Then it optionally bakes precomputed realtime GI and baked GI if you have those enabled
Baked GI includes lightmaps and probes, which are either light probe groups or adaptive probe volumes depending on your settings
All baked lighting is generated in one go, in other words
Lightmaps and APVs aren't mutually exclusive
Regardless of whether you use the old light probe groups or APVs you must determine per mesh renderer whether it should get GI from lightmaps or light probes
Hey guys I have a very weird issue,
I am using lightmap steal to use same lightmap for LOD of a gameobject, it is working perfectly on first and second scene reload ,but on third reload the lightmap on LODs break on LOD0 its perfect
Thank you
i know this is more of a "help" channel but does anyone have suggetions to improve the lighting?
how do i change the skybox without changing the color of everything else (1 screenshot is without the skybox, 2. is with skybox, 3. is what i want it to look like)
You need to set environment lighting and environment reflection sources to something other than skybox for them not to be affected by it
thx
I have a laptop that I use solely for baking/builds. It has an RTX3080M in it. When I bake my scene using my Desktop (RTX4090), I get around 380mrays/s. When I bake with the laptop, I'm getting around 6-8mrays/s. Anyone have any idea what could be causing it? I assumed it would be considerably less but 7 mrays seems ludicrously low for a RTX3080M?
hey guys i need some help i want to make a night scene but im using a demo scene to practice but the global light is not working on those assets but just the character that i added how can i make the whole scene like one thing pls help
i tried moving the assets from the demo to sample scene but the global lighting isnt applying :/
Hey all! I see that there is no channel for built-in pipeline so I'll ask here. Has anyone else noticed that adding a cookie to a light breaks batching? Frame debugger says it can't batch because "multiple forward lights", even tho there is only one light in the scene. Happens at least in 2021.3.x & 2022.3.x. If I convert the project to URP, it works as it should.
you gotta be a bit more specific.
And also ask only on one relevant channel
Hello! I have a question about Unity 6 Lighting Scenarios.
So, I was playing with these features, and they work great for dynamic objects, but how about static ones? It seems that it stays with the same lighting.
I have a couple of lights marked as baked, and a small scenario marked as static. I have the Adaptive Probe Volume, and I baked 3 Lighting Scenarios (day, evening, and night). When I try to blend between them. I can only see the player (dynamic object) being affected by the different lighting, but the static scenario stays the same. Am I doing something wrong?
Also, what is the setup to get this transition on the shadows? (from here: https://unity.com/blog/engine-platform/new-ways-of-applying-global-illumination-in-unity-6)
https://unity.com/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Ffuvbjjlp%2Fproduction%2F5a5c1de0e5e7272c0ac4dba9454305b2a2ed819a-1400x795.gif&w=1920&q=75
Hi everyone, I've been playing with the particle effects in Universal 2D and I want to add a lighting effect to the particles. When I try to drag a Spot Light 2D prefab into the lights setting of the particle effect it doesn't work. But if I create a normal Point Light prefab I can place it in the lights setting however it won't cast any lights. Can anyone direct me on how to accomplish this effect please?
Are the objects receiving lighting from probes or lightmaps?
The visuals are so good in this game how do i make that i mean
Use volumetric lighting (built-in only in HDRP), add some post processing on top and hire couple hundred artists to make you all those assets/animations/etc. of course. What you want us to say?
I just wanted you to break down what things were used to create that scene like the blue light from somewhere in the sky and everything being so huge and trees look so good like what are things making this
Can you link me a tutorial for volumetric fog and lighting
and I am a school going person who doesnt have the budget to hire so I do everything myself
Any HDRP volumetric lighting tutorial should do
is that fps friendly? i have a mid end pc
Not friendly no, good graphics cost performance
What else could i add then?
If you want volumetric lighting you have to accept the performance hit, there could be some cheap trick to fake volumetric lighting but the screenshot you gave looks like "real" volumetrics
Then you either do everything by yourself which is quite much if you are aiming at that graphics fidelity level or you can look for ready to use assets and asset packs from asset store or somewhere else on the internet but then it is hard to find cohesive assets that fit well together
When using APVs you'd usually prefer to set all objects to use probes to have consistent features across the board, even if lightmaps are still an option for static objects
In the gif the directional light is animated/scripted to rotate and to fade out its intensity when close to aligning with the horizon
The URP sample it's from is downloadable though I don't recall if it included that particular effect
At the moment, both. The scenario use lightmaps, and characters and other dynamic objects probes.
Oh! Thank you so much. It makes sense to use probes for everything. I'll experiment with that today:)
I thought we have to wait until Unity 6 release next month! I'll try to find the sample to check it out:)
^^ lightmaps are not compatible with scenario blending iirc
Makes sense. I thought that it will be baking lightmaps for each scenario, but it seems that only probes get that. I'll follow @deft fiber advice. I appreciate both of your answers. Thank you!!
what are the settings on the renderer you're trying to illuminate?
Does this help? Im really sorry I just started off and really tried to look for answers before asking here
It's a Sprite Lit so it can only be illuminated by 2D lights
If you're using the 2D renderer, all 3D lighting is disabled entirely
that really fooled me lmao I thought it was 3d models
lmao its probably completely stupid the way im doing this but i really dont know how to get started
Can baked lights cast shadows from static objects? So like if there's a few static props in a room it'll be baked to cast shadows from those but if the dynamic player walks in it won't cast a shadow from them.
Baked lights and static meshes can only create shadows onto lightmaps or to light probes
Light probes can transfer the shadow to a dynamic mesh, but they're inaccurate
Mixed lights however can cast various types of realtime shadows from static meshes to dynamic ones or vice versa
Hi, again! I'm getting this error when trying to Bake APV:
ArgumentException: Kernel 'MainRayGenShader' not found.
Any clue? 🤔
I had a similar error, if not the same
Would've updated Unity but it was the patched version, whereas an unpatched project didn't suffer from it
Deleted Library, cleared lighting cache, baked again, same error, baked two more times and got different errors each time
After that it worked
Im making a minecraft like game and the realtime lighting might be a big heavy even on URP, so i wanted to ask if its possible to do runtime baking via a script ?
so that if a player is done with their map that upon saving they bake the lighting themself
Thanks for the ideas! I'll try them:)
super impractical not to mention impossible short of rolling your own lightmapping system that works at runtime
There's always room to optimize rendering
URP out of the box is set up with all the heaviest graphics settings enabled
Make sure you know what they are and how to disable them
It worked @deft fiber! I appreciate all your help:)
Additionally, I also deleted the scene folder that autogenerated when baking light. After deleting and clearing all that it worked!
could someone share a few screenshots on how lighring for urp should look without any modification to the shaders like custom scripts, There's not very many for exterior lighting
some guides would be good to, I'm using unity 2021 with urp
Really generating multiple times worked? Or which steps specifically
It was such a bizarre chain of errors
Im using ECS subscenes and for some reason when i close them (so i cant edit them) all my lights turn from Baked to Realtime and look different, but when i open it back up again, they change back to baked.
I'm not really familiar with subscenes, but traditionally the lighting data asset that contains references to baked lighting is associated with the "active scene"
With ordinary scenes when loading or unloading them you'd specify one of them as "active" to get its static lighting
Actually, I thought that the fix was specifically after deleting Library, clearing light cache and deleting the scene auto-generated light folder. Buuut, it happened again, and finally, I discovered that it was because of having the platform target as Nintendo Switch, having it as Standalone works.
good to know
apvs dont work for me nowadays i just get checkered tiles 🥲
hello everyone, Can any help me for light baking I am using mixed lighting and scene has been baked. But the problem is the trees which is far there shadow look like a dot. I want that shadow also visible like max distance shadow.
Seems most likely texel invalidity from exposed backfaces
Oh! Is there any solution for it?
3 1 2
from the docs:
The performance cost of Mixed Lights differs considerably, depending on the Lighting Mode. However, because Mixed Lights always combine at least some real-time and some baked lighting, Mixed Lights always involve more runtime calculations than fully baked lighting, and higher memory usage than fully real-time lighting.
In baked lighting, you load textures into memory. In realtime lighting you calculate more things every frame. In mixed lighting you do both.
Well it totally depends on the use case.
it's always a trade-off with these, there's no one-size fits all, which is why we have all three in the engine
Cool
@arctic isle do you know why it's happening?
@graceful pelican you are creating a scene for pc or mobile devices?
Not sure what's going on here unfortunately
In theory yes. It uses both memory for textures and does more calculations in realtime. But the tradeoff could be a bit of memory for a lot fewer calculations if you bake some lights.
On the other hand you may not be able to bake any lights or you may find out you can bake all of them... It really depends on what you want to make
And the constraints of the platform
Hello, I need help with baking, I've spent about an hour now, teaching my self how to bake, and i actually got it working pretty well, but i'm running into issues like: Multiple areas not being baked AT ALL and The floor material in the second picture is not reflecting the light at all. I sent a image of the lighting settings, what should i do to fix my listed issues?
Why is HDRP with HDRI Skys so unbeliveably bright ?
Like i made a dark grey material and it was like nearly white
Honestly HDRP is unusable in its current state if you want to use a stylized HDRI Sky
HDRP isnt really made for stylized stuff out of the box. But you can achieve a lot with a custom sky.
Hey!
- If you can use GPU Lightmapper, do it, it's faster
- Increase the indirect samples
- Increase the bounces
- Increase the light intensity
- Make sure the lights aren't inside the meshes
you need to put reflection probes into the rooms so the reflections work properly, i also recommend using light probes
more indirect samples & more bounces will decimate the performance tho, i know its the like simplest solution, but at what cost ^^
It will take more time to bake but it will actually have some light. Reflection probe is a good idea, but light probes won't help here.
well they are active (loaded) but they arent open for editing

as I suggest try diagnosing for texel invalidity, then if you find some, implement relevant fixes
I think problem is not texels.
Tree shadow look too weird from the far distance.
It shouldn't be that black on outdoor scene.... What shadow mode are you using? distance shadow masked?
there's like splotchy blackness to the shadow lol
@fluid solar distance shadow
try adding the tree last LOD to the scene and see its shadow. Maybe it's working as intended after all and you need to change the last LOD mesh
I have tried but it not working, I think I need to put trees on Realtime light.
Trying to bake with a 7800XT. I can see the first progressive update and then it stops there and the remaining time increases forever. If I stop and restart the bake, unity does nothing and I I try to close it crashes unity. Does anyone else have this issue? I am on arch Linux btw.
have you tried with small scene?
or try after clear GI cache.
Yes, its happening with Fresh arch install with an empty 3D scene
Clearing gi cache doesn't help
It work with CPU, but with gpu it is just stuck at "Global Illumination" no errors in the console or unity editor logs
And then if I try to close unity it hangs and I have to kill it with the monitor manager
Hello there ! Sorry to bother but I'm working on a litlle project I want to put on phone but when I Build and launch it my lightmapq are bright as hell
( I'm on baked of course )
How it's supposed to look in term of colors / brightness
On my scene I only have one directional Light
( Nevermind fixed it mu build was taking a light from an another scene )
Hey! I’m having an issue where the lighting doesn’t behave the same whether I’m on macOS or Windows. Is there something I can change in my settings to ensure consistent behavior?
The light on Windows disappears as soon as it touches my model. (HDRP)
I believe this is a !bug
🪲 To make bug reporting as quickly as possible, we made a bug reporting application for you. When running Unity choose Help->Report a Bug in the menu, or you can access it directly through the executable in the directory where Unity is installed. It will also launch automatically if you experience a crash.
📝 If your bug report is to do with Documentation, either an error, typo, or omission, you can report it by scrolling to the bottom of the page where you found the issue and click ‘Report a problem on this page’!
💡If your report is to do with a new feature idea, you can check the Unity Product Roadmaps page to see if your idea has already been planned.
For more complete instructions on how to report bugs, access: https://unity3d.com/unity/qa/bug-reporting
Hello, I have a Unity lighting question. I have been trying to set up baked lighting in a level. All assets in the level have lightmap UVs, which I created in Blender in a 2nd UV set. I checked the lightmap UVs in Blender and they don't have any overlapping faces, however when I try to bake my lighting in Unity, I keep getting errors about overlapping faces and I get weird shading artifcats. Does anyone know what could be causing this?
No crossposting please
Hello, i have a light in my scene, and i'm finally getting baking working well in my scene. My past technique for ceiling light was adding a second spot light facing up. Should i keep this? Does light bouncing do this for me? Should i remove it completely?
Not necessary to do with baked lighting
Okay, thanks.
Thanks it works, but now the ceilings are far to bright, i prefer them to be darker. How do i do this?
The lighting is bouncing around realistically now
The most practical way to make them darker and reflect less light would be to make their diffuse color darker
Oh this is realistic, oh didnt know that, so i should make the lights darker?
No, the ceilings
Darker colored things appear darker
Oh ok.
Oh yes, that works thanks.
Hello
One more question, is there a way to "disable the lightmap" or something? I have a scene where the lights turn off halfway through, but from what i know of, baking wont allow that. What should i do?
No built in way to do that, but there's some custom assets for it
It'll be easiest to keep all lights that need to be toggled as realtime instead
Okay
Now i have this issue, i previously had a point light here, but i deleted them, but this still comes back after baking.
having some minor lighting woes. my game kind of relies on 2D lights, and they run fine most of the time, but when there are more than 4-5 on screen at once it leads to performance issues. i've already limited the shadow casting as much as i can. all shadows are being cast by a single polygon.
anything else i can do to help performance here?
how do i fix this?
i got additional lights object limit at max
got deffered rendering path but still the lights dissapear for some reason
Shadow casting and whatever system you're using for volumetrics are subject to different limits than just lights
its not about volumetrics tho, it happens without volumetrics on for some reason
Then I suppose it's due to having too many shadow casting lights
You could try verifying it by disabling shadows on lights nearby other than that one, to see if its shadows stop disappearing
Deferred rendering does not offer any advantages for rendering of shadow casting passes as far as I know
i also tried that too but still the same issue
The shadow keeps disappearing even if that light is the only one with shadows enabled in the scene?
What about disabling other lights in addition?
i have like 22 lights
i tried disabling them too
but still its the same issue and it happens for all other lights its not specific to one light
Does anyone know why this is happening, even with no point near? I had point lights in that area before, but since then I've deleted them ,and rebaked, the lights just come back.
Depending on your rendering path you can adjust the maximum shadow atlas size which can help with that kind of issue.
Why does this object not affect the light? The point light is going through the lamp.
Are the normals double-sided?
how do i increase the atlas size tho
cant find the sectiion for it
try making the light have shadows
GameObject>Light>
You must have you've installed URP and configured it with a 2D renderer for 2D lighting to show up and also work
Does Unity's ray tracing also work for Linux x64 builds?
And is there, perhaps, any form of software-based ray tracing that could work on non-ray-tracing GPUs?
(I use Unity 6000.0.15f1)
hi, maybe a weird question. I have a huge scene, which took about 6-7 hours to bake its lightmap data.
now i have the lightmap texture.
but right now, i am somehow compelled to divide the huge scene into small chunks of scene, i divided that huge scene into 64 scenes.
Now is there any way to split that lightmap data too for all these 64 scenes without again lightmapping each of these new 64 scenes?
and also i will load and unload those scenes additively based on player proximity.
There is no way to "split" without baking again
oh! so i have to bake again for every scene, right?
another thing, what about the loading and unloading the scenes?
The lighting settings of the "active scene" scene will be used, but in my experience the additive scenes still carry over their own lightmaps when loaded in, even when baked separately
thank you, i'll test around a bit now
Like I said, depends on the rendering path you use.
I'm using URP in Unity 2021. I was wondering why the shadows at the bottom of this sphere are smooth while the shadows from the top (being cast by a larger object) are pixelated
Shadows casted by other objects are implemented using shadowmap texture which is composed of pixels and can have only so much detail in it. The bottom shadow is not cased by shadowmapping, you would even get that if the shadows were disabled. That's based on the normals pointing away from the light direction and normals are interpolated so it will look smooth
I think you can change the shadow filtering quality in URP too so the shadows won't look so jagged even though the shadow map is just either black or white texture
You can also increase the shadow map resolution, and adjust the cascade distance.
i need help with the point light, it's not working when first created, it's baked, i set all object to static, generate lighting, nothing happen, this's my first time to unity 
im gonna cry what is URP
Check the pinned messages of #archived-urp for instructions
okok i installed it but how to configure with 2d renderer
HEEEELP WHY IS IT GREY
I've got a weird setup and could use some help. My VR experience is using URP and APVs with fully baked lighting. I'm using lighting scenarios to turn lights on and off. The way I have my scenes setup is that the camera rig and some audio sources are all in one scene, and then I additively load the various scenes as the users goes through the experience and unload the last scene. So at any give time there is only the player scene and the currently active scene.
The issue I'm having is that in the one scene where I use lighting scenarios to switch lights on and off, I get the error saying the scenario doesn't exist, though they clearly do in the inspector. This works if I load my scene and my player scene in the editor and run it, but if I load the previous scene and let it additively load the new scene, unload the old scene, and try to switch it does not.
I assume this is due to baking sets. All the scenes were set to single scene but I now have my player scene and the scene with light switching in a baking set, but this doesn't resolve the issue. Infact it gives me a TON of errors in the console and turns the scene view red?
Do I need to have every single scene in my baking set? And if so how do I bake them all separately so they don't influence each other?
The error I get:
Well... I set everything back to single scene, made sure my loading script totally unloads the previous scene before doing anything with lighting in the newly activated scene, and used the below code before changing scenarios and it seems to work properly now.
probeRefVolume.SetActiveScene(SceneManager.GetSceneByName("Embrace"));
Spoke too soon. Still appears to not work in a build.
I swear
unity decides it's now not going to bake light properly anymore, and rapidly "prepares baking" 0 to 100% over and over, then switches to fluctuating between baking and preparing to bake, rapidly filling the progress bar whilst doing that
oh, now it decides to work
it worked after regenerating project files
I spoke too soon
So im starting to get into lightmapping. all my assets are static (the ones that stay still) and baked a map. Im not sure why this is happening as well as 97 overlapping UVs. Anyone around to help me learn the ropes? Ive watched YouTube videos as well. This model was grabbed from SketchFab
make sure on your models, you select generate lightmap
whatever shader you're using is cranky... Uhhh.....
try different shader, perhaps
or just ignore it if you don't notice anything wrong
now I just need to figure out why I can't get it to bake properly 
I've searched for plenty of time and came into conclusion that LPPV is not a thing in URP, but to confirm I am asking it there: Is Light Probe Proxy Volume broken\not a thing in URP?
@prisma ferry
so.. what is the problem? have you just ever let it finish?
well, it wasn't doing this before. it would bake in 2 minutes, and wouldn't freak out. now It's taking about 10 minutes, and improperly bakes every time
Ok, the only thing you mentioned before was 'spasm'. Not baking properly is a different thing entirely. I do not use baked lighting, but you are in good hands. it may take a while to get an answer
i assume you have tried just restarting Unity
yep
I've restarted unity, restarted my computer, cleared the GI cache (global illumination cache), reimported the model, reimported all assets....
I don't come here for help unless I've done all I can do
well, i'd imagine it will do nothing, but you could always try ye olde 'delete the Library and let it rebuild' or ask the VRChat people if there is a known issue with the version of Unity you are using, their SDK, and Baking lighting
it just keeps recalculating the map over and over, as if it's trying from different angles
delete the library, as in?
delete sdk stuffs?'
the Library Folder in your Project Folder. it is just a Cache. when it gets corrupted, it causes the strangest problems. you will need to re-open your Scene after you delete it and let it rebuild. otherwise you will freak out thinking it ruined/erased something
the sdk shouldn't be interfering since it only runs on upload
not to say it's not possible, but fairly unlikely
but it's also unity :/
should I have my project opened or closed?
closed
fingers crossed that it works. nothing lost but a few minutes if it doesn't
i always stay 2022.3.x updated, but i've overheard the VRCSDK is finicky
the vrcsdk only runs on certain versions
we were stuck on 2019 for the LONGEST time 
we just got 2022 versions within the last year
do the .x increments matter for compatibility? if not, i would update to the latest. i mean, they update for a reason
well of course, but I'm almost certain the sdk throws a shitfit if it's not the exact version
yeah, i thought it might
I can check if this doesn't fix it but answer is probably "yeah"
you son of a bit-
unity exploding
so it is working now?
no
I am switching to the 2022.3.6
wait
I'm dumb, 22f1 is later

let me try reloading the sdk
still nothing
it just never finishes baking
I wish there was a console readout for what unity is doing while trying to bake light
it'd be really nice to have that sort of feedback 
yeah, beyond me. no real experience there. Well, when the Gurus for the room come online, perhaps they will have some ideas
just for shits and grins, lets open another project and bake some lighting 
yeah, good test
okay, so it seems to be working fine in other projects
I should mention I have two identical copies of the same project
they just have different compression and organization settings for the assets because of PC vs Meta Quest builds
but both projects malfunction
IDK then. but, good info. now you kind of rule out a malfunction in Unity, at least
well it's something unity is doing in response to something I must've done... but I didn't do anything, just made a few udon sharp scripts
but I just tested by deleting them and it still malfunctioned
moved the script folder out of the project and deleted all references to scripts, but it still was doing the "funny"™️
unity is going to make me explode
GHJDSJKGHSD
YOU HAVE TO BE FUCKING KIDDING ME
@prisma ferry I am going to cry this is so stupid
bad setting?
no, listen to this garbage 😭
so, for vrchat, it supports both PCVR and Quest standalone builds. Up until recently, for avatars, you couldn't have constraints on quest side builds. So they recently developed their own implementation of constraints so that quest users could benefit from that and a lot of prefabs that used constraints would function properly without having to be entirely overhauled. Now, unity constraints (iirc) could be used in worlds on both quest and pcvr side. But I saw that the sdk was baking the unity constraints into vrc constraints when uploading an avatar, so I assumed "oh, I should just use vrc constraints in the world, too." Lo and behold, vrc constraints for whatever fucking reason completely disrupt the baking process
😭
Told ya to ask the VRChat server 😉
I don't think they would have known that
this hasn't been reported as bug afaik
it shouldn't be included in the base SDK if it's going to interfere with unity
when setting up a project, there's the base sdk, and then it either installs the world sdk or avatar sdk, depending on the project type
and that is one of the primary reasons whenever someone mentions VRChat, we send them to that server
seems so
Well, now you know, only Mesh, Armature, and possibly Lighting from Blender! It is odd though, as you pointed out, that there are no references to the actual issues in the console/etc
mhm -w-
This is so weird
did you model those shelves?
No the entire scene is a prefab from sketchfab
Lol
I figured i would use it to get better at baked lighting
Not sure why thats happening since all the shelf contents are a single materal. Its like the top isnt receiving any light
Every time I try to bake my lighting, everything turns black.
Anyone know how I can fix this?
Send a pic of your scene please and your lighting settings
Any ideas are appreciated ❤️🙏🏼
Would also like to have the walls not be pixelated 😅
The game idea I have relies quite heavily on lighting, but the problem I'm having is that the shadows don't line up well. Is there any way to make the shadow caster just use the rendered image as a shape? I tried to trace the sprite (within reason for a test), but it looks awful with the animations. Any help would be greatly appreciated.
Like why is this happening
Sorry dumb question, but is the part that's not rendering properly using a different material?
No all the shelf contents are the same material and are doublesided GI
Hmm, the only other thing I can think of is that it might have something to do with the normals. Like for some reason it thinks that those faces are pointing down.
Possibly. I fixed some double sided meshes and am rebaking
Ive been at this for hours tho
Sorry, I really don't know what else to do.
As a begginer, I am still wondering why there is a channel called #archived-lighting dedicated to lighting
How can I fix objects looking black after baking the light? lightmap UV is toggled on models. Any advise helps, thank you!
It's for when people have questions specifically about lighting in Unity. It's a very complex and broad category of problems on it's own, and it often takes much more specific knowledge than what is generally used in problem solving with Unity.
ok well Im new to unity so I would have no clue
besides, im making a very basic 2d platformer
No worries. I've been using it for years, and I still can make sense of the lighting system.
That's a great place to start. Stick with it, and I'm sure you'll be able to make some pretty awesome games eventually.
What setting should I look at? Changing Quality settings is making this inconsistent. I just dont want the light to pass through the walls
Lighting is a huge topic with an enormous impact on the look of games - even in 2d. There are lots of professionals dedicated to this topic alone due to its complexity and impact. Effective lighting sets the mood. It is often used narratively (battle of darkness vs light). It makes art assets look grounded in the world, have depth and character.
Gonna try anf fix this more today, as i really want baked lighting
im using baked lighting and a double sided material. im not sure why it looks this low quality (this is the best example of it i could find in my map)
Its the same with the shadows
How to turn on such debugging mode for GI?
It's from article about APVs https://unity.com/blog/engine-platform/new-ways-of-applying-global-illumination-in-unity-6
how do i bake ambient lighting when i use bakery?
generating lighting from the lighting tab removes my bakery lightmaps but then rebaking with bakery removes the ambient lighting
That should be the Rendering Debugger
There’s an unofficial Bakery discord.
Helloo im working on a really beginner game right now and trying to figure out the reasoning behind how lighting affects texture appearance stuff? I've never worked with lighting before but I was curious on why it looks like the two walls connecting are different colors
bake 6-way directional lights without shadows
Rendering Debugger
Lil question about light probe placement. Which of these probe arrangements makes more sense?
- The first one has the probes positioned exactly on the floor/walls/ceiling
- This might cause the probes to get bogus data
- The second one has the probes very close to the edges
- I'm a little concerned about the above and below problems here!
- The third one has the probes placed quite far from the edges
- Objects that get near the edges will now start taking data from distant probes
I will be filling this straight hallway with many of these slices
2 or 3, or 3 with 2-style extra probes sandwiched near the walls to minimize the leaking issue
Leaking is not usually a problem though, and in that case the ideal probe placement distance is only as close to the wall as your smallest objects' origins can get to
If your smallest object has the minimum radius of one unit, getting its lighting from a probe that's 0.5 units from the wall won't be exactly correct for its position
But not usually a problem either since you'll have more probes in the room to interpolate anyway
It'd be helpful to have some way to determine "invalid probes" specifically for outside areas that don't get interpolated at all, but that's not a thing
Does anyone know why the grass shows up like this? Any pointers help. Thank you!
chat gpt
I don't know what it's supposed to look like but the appearance suggests the shader is not using alpha for clipping or for transparency, or that the texture is missing it
Thank you, much appreciated!
How do I prevent light bleed like this when baking?
Light is coming through the floor
also advice on reducing acne like this would be good thanks
Are you using APVs?
No
Should I be?
Also Unity 6 seems to freeze constantly when baking lighting, or when trying to cancel it
Is this a known issue? I'm in a really really simple project so I'm surprised
also I can't seem to get rid of these seems no matter what I do
tried my own UV + generating a lightmap UV via unity, I have seam stiching enabled
For anyone wondering in future, it's a denoising bug. Feel like the denoising could be applied more intelligently to avoid this by default. I still haven't found a good solution.
so my friend has urp installed and on the deferred setting in the render pipeline rendering tab because of all his lights needing to be on but they still flicker on and off and we dont know why. anyone know what we could do to fix it?
The "best" solution would be to use textures on the surfaces that are lightmapped
Solid colors make any and all flaws like this pop out
APVs wouldn't suffer from seam or denoising issues though
In theory the ground should be invalidating the texels below it due to an exposed backface, which extends the valid texels below ground hiding the light as well as any shadow from below
That cannot not happen if you've enabled two-sided global illumination, in which case your alternative would be to block light coming from below with a mesh (that receives GI to probes only to not waste lightmap space)
First make sure URP is correctly configured and in use, rather than just installed
Then make sure the quality level that uses the deferred renderer is active and that the cameras don't have renderer overrides
If the materials are transparent, they have to fall back to forward rendering and its limitations
Deferred rendering only allows for limitless shadowless lights, so shadows may still flicker if there are too many lights with them enabled
how do i make just a room in a scene dark without affecting the main light settings?
- The light needs to have shadows enabled.
- Close the room.
- Bake lighting (reflection probes + lightprobes / lightmaps) in the room
alright thanks
Is using probes really better than lightmapping?
I can't imagine the detail would be great without a stupid amount of probes in the volume
Also I found OpenImageDenoise did better on reducing the UV seams
But still not amazing
You can get prety high details using probe volume (not regular lightprobes) with good performances. Bonus point is that they will also affect moving objects.
I'm currently planning APV + Lightmapping. On the topic of the lightmapper, is there any way to get more detailed logs from it? It's causing the editor to hang all the time. It got so bad it just stalls every bake even when the settings are super low. I think I need to clear the GI Cache or something. Currently not at my PC though.
I'm not that much of an expert in lightmapping tough, so sorry, I don't have an answer for this 😅
I tried clearing the GI cache, and baking lighting with no lights other than one realtime directional light hangs on Post-Processing 29%
Cancelling hangs unity editor completely
This is kind of a joke
Got it working for a second on 1 texel per unit!
But now it's hanging on 1 texel per unit Hahahahahaha
All my lit materials are acting as they are unlit, I can't make them react to any light, they're always fully illuminated. Any ideas?
I have a directional and point light in the scene. Might be, that I created the project in 2d?
Hum, from the name it could be linked to the denoiser ?
That's what I'm thinking, really wish there was a way to debug this properly though
Editor logs giving me basically nothing
Might be. Check your render pipeline asset.
nope, lighting is enabled
this is URP by the way
Are your lights realtime? You got a screenshot?
yes
Disabling filtering entirely seems to work, filtering on auto or my custom settings seems to hang. Will continue to test. Lighting looks pretty bad without denoising
Yes, denoising if definitively required. But maybe when you had 1 texel per unit it was not possible for the denoiser to resolve properly 🤷♂️
You could try a different denoising setting.
I only set to 1 texel to get the bake to complete at all
If I had to guess it's a memory issue somewhere in the pipeline, as it seems to hang on lower and lower settings until it just gives up entirely
But there's no logs I can find to help me debug
¯_(ツ)_/¯
Could you show the inspector of that cube ? It's using the URP/Lit shader ?
And this is the asset currently active ? (Graphic settings and quality level)
yeah, Well atleast I think so, because the scriptable is referenced in project settings
Each quality level can hold a render pipeline asset, that overrides the default one.
Do you have the option of porting your content over to a fresh 3d project? I can imagine converting a 2D project to 3D would be problematic at best
Im mixing 2d and 3d quite a lot in this project. Only the characters will be 3d, as this is a isometric game
I might need to add a 3d renderer too in URP settings, right?
Yes 🙂
If you have 3D objects, you need a 3D renderer. A camera can only use one renderer at a time.
thanks
so i basically have to have 2d cameras for 2d and 3d
also, scene view seems to react only to the default renderer
Or just a 3D camera that renders everything
Unless you really want to mix 2D objects, with 2D lighting, and 3D objects with 3D lighting.
But I'm pretty sure a single 3D camera is enough.
yup, I need 2d lighting and 3d lighting
also would be cool for the scene view to atleast use both
because now, I either see the lighting on 2d or 3d
The scene view is also a camera, and as I said, a camera only uses one at a time (the default one for scene view)
You can lit 2D objects with 3D lights, if you use the URP/Lit shader on them.
oh nice, yeah, that works
thank you very much
Situational, perhaps
APVs can handle a pretty stupid amount of probes before it becomes any kind of issue
I'd rather just light things using regular lightmaps honestly. I'm a big fan of the indirect shadows. The seams are really annoying and it's impossible to create UVs which hide them entirely.
Are there no options to get rid of them? OpenImageDenoise helped but seems to have a memory leak or something
Now it's hanging with no denoiser 😦
how large is your scene?
Really small
Not much in it at all, I'll get a screenshot
In lightmap view ^
and you're just using lightmaps, correct?
I was messing around with mixed but I think it's fully baked right now
Just one directional light
Actually the view you see above is mixed because it crashes every time I try to bake right now
So it won't convert to fully Baked
Unity crashes every time you try to bake??
Well it hangs on 29%
and cancelling it will cause unity to freeze completely
Waiting on GI.Tick or something
hi, does anyone knows why my light bypass objects?
Shadow casting is not working, which makes it pass through

and why is not working
I didn't change anything in the scene.
Hard to guess
One possibility is too many shadow casting lights
Anyway it's what's required for light to be occluded from passing through surfaces
What scene is this?
I mean a few days ago it was fine. Today I opened Unity and it was no longer fine.
Have you tried Spazi's suggesiton? How many lights are nearby? You could try disabling some to see if that fixes it.
When i delete the HD Additional Light Data script object, seems to be fixed but it erases all the values
You can copy a component and "paste as values" if the properties are lost
Hey everybody! im STRUGGLING with a really HARD bug im having on Unity 2021.3.14f1 with deferred Lightning, i dont know what is the cause and i tried everything, changing settings in the renderer, changing quality and everything but i have the same result/bug everytime.
Lights dissapear as if Forward lightning was active.
THE FUNNY THING IS: Whenever i turn a "flashlight" on the player, wich is a spotlight, lights nearby the player fixes themselves and start working as they should be.
Any expert on lightning and how it works?
https://gyazo.com/f1087d5d26ab4ea711d22b256e622c27
HDRP or URP?
URP
It's from certain view angles right?
Yeah, in a certain angle some lights doesnt works. But as i said turning on a spotlight fixes them lol
I had an issue some time back with shaders not working from certain view angles, I reported it but they never fixed it
you got any custom shaders?
All my shaders are custom shaders, really simple but yeah 💀
I think mine was with object local axis fucking up? but seems unrelated to this
anyways tried using the URP Lit basic shader and have the same problem
As a workaround, you could probably do some light stuff on startup to fix it via code rather than with the torch
just enable and disable a spot light or something
If it fixes it permanently
Yeah i tought that could be a temporal fix but maybe theres a better solution
If your spotlight is triggering visible lighting to be recalculated I could see that being a relation
Could be too many lights in the scene? Not sure
Sorry I can't be of more help, just wanted you to get some kind of response
I mean yeah...? there a lot of lgihts in realtime in a whole scene but my camera far plane is set really closely so those lights should not be rendering right?
Also using deferred i could have a lot of lights also?
This is true
Have you investigated the render pipeline yet?
It's been a while since I've done stuff with shaders etc but you can view all the draw cells sequentially in the render debugger
I'd recommend looking there
when i use the render debug thing, and set light debug mode to everything
All the lights just works!
ehwn i set lgithning mode to none
only some of then work
really weird
Submit a unity bug report is my honest suggestion
It's hit or miss honestly but it's probably worth a go
You'd probably need to find a way to reproduce it in a simpler scene though
what do you meant with local axis?
yeah maybe
You could patch to newest version of 2021.3. which is 44f1, since your current version is pretty ancient
While at it it might be a good idea to delete Library to have your project freshly regenerate
URP Assets might get broken internally in some circumstances, so it might be a good idea to swap it out for a new one and go with that
You might also want to triple check that your current quality level is using the right URP asset and that your camera is using the specific Renderer with deferred rendering enabled
I would visually verify that deferred rendering is working by creating a primitive mesh away from the others and adding more than 8 shadowless lights on top of it to confirm that it can be lit by more lights than the forward maximum
@deft fiber This maybe little to complex to explain but i will try. I just played the Scene where i have my map with lights, and when startin the scene from there everything works as expected even i could put a lot of lights close each other (More than i ever have in the map) and it works good.
The problem is normally in the game that scene doesnt comes first, it loads from a main menu
And everything spawns since its an online game
Maybe the proiblem could be there?
Not the most empirically satisfying test, since we only see 5 to 6 lights affecting a mesh at a time
My test would be to put all lights on the same side of a mesh, and decrease their ranges or intensities so they show up as distinct dots and don't blur together
Starting a game directly from a scene in the editor generates temporary lighting which is not present in the build or in game mode when switching scenes
However, that is not in theory related to realtime light components or rendering paths, only to ambient scene lighting
Sorry this maybe shows it better
To address that specific lighting settings issue you can create lighting settings and generate lighting for each scene from the Lighting window (make sure that realtime GI and baked GI checkboxes are disabled since they would be unnecessary for now)
Still I doubt that's actually related
Generate lightning in the Realtime Lightmaps?
You don't want lightmaps, just to generate lighting without
Realtime GI lightmaps and baked GI lightmaps are specific and involved workflows
If they're disabled, only scene ambient lighting is calculated
Which is what's lost when switching scenes, if un-generated
So i should double check there is no lightning data on that scene right?
i tought this was something i needed to use even for realtime lights
I have an asset that is not being affected by the light. I have this warning on the asset prefab. In the console I get a warning about my mesh not having normals. Yet my mesh absolutely does, have attached an image of the asset in maya where the green lines show the direction of the normals. So they are there. Any other ideas?
Normals can sometimes be lost on export, or what you're seeing in the modeling program could be normals generated on the fly
I'm not totally sure about the cause or the cure, but forcibly triangulating the mesh before export sometimes helped when using Blender
Does anyone know why shape keys are messing with the object's lighting?
The model is from blender, and everything looks good there.
It may be a workaround to set mesh normals and blend shape normals both to "calculate" from mesh import settings
Also could be a workaround to disable blend shape normals entirely, but both have drawbacks
Third possible workaround could be to keep normals on "import" and turn on "legacy blend shapes"
In any case the support for blend shape normals is kind of limited
Is this from inside Unity somewhere?
yes, mesh import settings
All three workarounds should be found there
Yeah this fixed it!
Works great

Never really knew that the import settings were constantly updated, and you could go back and change the import settings
I suppose all computer code is constantly "importing" from somewhere
In Unity's case the the asset you import into Assets folder is compiled into a format usable by the engine (but unreadable by humans) as per import settings into the Library folder
This happens when it's first imported into project, and each time new import settings are applied
If you have to "reimport" a project later now it should make sense what the editor is doing
Hi, I've been trying to bake the light on my map. I have a cell shading shader on the geometry but when I try to bake the light everything looks off and generally worse than without baked light in the editor
Not baked
Baked
Toon shaders rarely support baked lighting because the style of shading is hard to make work at all for lightmap textures
The lightmap texture consists of relatively large pixels and contains a lot noise / denoising artifacts and if compressed at all, compression artifacts
These can usually be concealed by varied and textured environments but if you use a stepped light ramp for toon shading, all of those will pop straight up
Like the smooth circular steps of the light radius you see in the above picture would just be a jagged mess of texel edges
It works if I set the light to Mixed instead of Baked and then bake the light
But I don't get the logic
No actually the circles are not baked
Mixed lighting includes realtime direct lighting, which will get cel shaded correctly, and baked indirect lighting which you likely aren't seeing at all
Assuming the shader isn't utilizing the lightmap textures at all
Basically Mixed is equal to Real time in my case?
Yes
Tldr the shader doesn't seem to support lightmaps, and you likely wouldn't care for them anyway
What should I do in my case? Keep all the lights as real time seems a big hit on performance
how can I cull lights in my unity scene because i need a ton of them for a vr game so i cant have lag and baked lighting isnt working with my models, plus it would take forever. (using URP btw)
As long as no meshes are reaching the light's range and the lights don't have shadows enabled, they don't really contribute to any rendering costs
Still, you can destroy or pool them when they're not in view to free up the memory and the small CPU overhead
Baking process can be sped up considerably
What kind of models do you have that are incompatible with baked lighting
its the model im using for the map, its a bunch of different models that i joined together in blender so the baking process would be faster, but when i try using baked lighting, the lights just make the walls glow, and some parts dont even get affected.
Joining meshes doesn't affect light baking in any notable way
Having less polygon surfaces helps, especially if you're got some that are never seen
I'd much prefer to see a picture of the issue but that sounds like very typical lightmap UV overlap and/or texel invalidity
Doesn't mean that the mesh can't be lightmapped
having trouble with light casting through this large object.
it's supposed to be a sort of space station around a star - there are some turrets on the outside of the station but light is being cast onto the backs of the turrets through the station.
Moving the turrets closer or further away seems to have no effect.
As you can see from removing the star - all the light is coming from the star.
Screenshot 2 is just showing the inside of the station so you can see it should be blocking the light
Any idea how to fix this?
What properties does the light have
And how far are the objects from the light
objects are about 800 away from the light source
i've tried ramping up the shadow distance but didn't solve it
Shadow distance only concerns directional light shadowws
The Range on this light may be too large for shadows to work properly
Increasing the Near Plane to match the radius of the emissive body should help
But ultimately punctual lights and their shadows are not designed to really work on a scale this big
Yeah I’m my fiddling I ended up making changes to the near plane and it seems to have improved the situation
Thanks 🙂
I always hear this HDRP is only for big companys and nothing for small indie devs.
But why exactly and what you gonna do if you want to use Raya Tracing? Because I thought Ray tracing is (only) compatible with HDRP?
It's not so simple
You can use HDRP as a solo indie dev, you may recognize Lethal Company as one such HDRP indie game
But HDRP expects you to understand modern rendering pipelines to use it effectively, and many of workflows make most sense if you're using industry standard external tools and have multiple graphics professionals working together
So it's not correct to say it's "only for big companies" but serves as a warning that a solo developer who doesn't know much about graphics will be biting more than they can chew if they jump straight into developing a project in HDRP
The Main factor in my game is about 100% native Linux support and it also would be bad if peoples with a none-RTX GPU doesn't can play it.
That's why I search for tool or maybe even assets that allow me a ray tracing like graphic with real looking reflections and shadows, that also work on None RTX GPUs and also still supports Linux builds.
I saw that some other engines are able to support ray / path tracing, that's works also on Linux and does support software tracing for none RTX and RX GPUs. But they also have their own other problems. I want to make something similar like that but with Unity.
Even if I have to purchase a expensive asset from the store. It just should be similar to Ray tracing Reflections, Shadows and Lights, must support Linux Builds and also should have a fallback solution if the player doesn't have a Nvidia-RTX or AMD-RT Graphics-Card.
HDRP supports all that
It's up to you to set up the ray traced lighting as well as the fallback lighting, regardless of what solution you go with
I've got a problem with CalculateInterpolatedLightAndOcclusionProbes() function, it always return ambient probes as calculated probes, no matter if there is backed light probes or not. Positions I send are good and I tried with manual placing, there is light from probes on them, so I don't really get, what do I do wrong, is there something I misunderstand or mess up?
Doing this on URP with unity 2022.3.35f1, if that helps 🥹
Any idea why the walls are not receiving light and looks like only indirect light is baked?
Check
If they are static
Receives GI
UVs
Direction of light
The first image's grey and black checker pattern indicates that whatever debug view you're using, you're not seeing any data at all
It happens either when the baked data is null, or if the editor has deleted the debug data
Lightmap debug datas are temporary and only for the last baked scene in current editor session
Third image shows that they do have some lightmap data, but it seems misplaced
That can happen if they don't have correct lightmap UVs, usually if you haven't enabled the mesh to generate any
I would not say that it looks like "only indirect light is baked", but that could happen if you use mixed lights and their realtime direct light component fails to show up
does anyone know why my lightmaps are doing this every time? this is in shadowmask mode, but it does it in the normal baking mode too
Looks like lightmap UV overlap
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352 chapter 9
ah ok, thank you! i'm doing this in a bit of an unusual way so i wasn't sure where to start
it looks great if I use APV though, do light probes not use UVs like lightmaps do?
("great" but gotta fix the artifacting)
As far as I know no, shadowmasking requires textures to be rendered due to the way it works
Unusual?
i'm doing the environment in source 2's hammer editor, so i'm using the UVs directly from there
seems like i might have to fiddle with it on that end
bc even just a simple box from hammer had messed up lightmap UVs
Usually you can let unity generate lightmap UVs just fine for any mesh, as long as the mesh is not generated in-editor
maybe it's to do with the hierarchy of the mesh? bc right now the entire environment is under one prefab
the pillars and arches and whatnot are separate objects, but imported under the same object
Shouldn't make a difference
the FBX source exports is also in ascii which may be causing some issues so i'm gonna try exporting it to binary maybe?
I don't see any lightmap UV issues in the latest screenshot
that's with light probes, so it's not using lightmap UVs
but i do want to see if I could get it to bake shadows in too, light probes are mostly just indirect lighting
ok converting to binary does this lol
i was able to check the environment UVs in blender, would this have something to do with it? it works in hammer but it's kinda all over the place in export
This would be an unsuitable lightmap UV, but it's not the lightmap UV
Unity should generate a suitable one onto the second UV channel for all meshes that have lightmap UV generation enabled in mesh import settings
ah yeah you're right, i forgot
here's one of the lightmaps it generated, doesn't seem too bad?
but it's still just doing this so i'm not sure what to do
i upped the padding to make sure there isn't any overlap, still fucked up
Wow. What an incredibly helpful thread. Wish I knew about this weeks ago! 🙂
Looks fine, though you may need to increase the exposure in the window to see the light there actually is
Also utilize the scene window lightmap debug views
this was the best attempt, but it looks like the light map is literally just being offset a little, like here
or here
are the lightmap UVs somehow not aligned to the mesh?
Hi, I really would like to try and get this look and feel :
How can I get rid of those?
Any idea what setting does cause those nasty shadow bugs?
Second one is texel invalidity that's caused by texels being exposed to mesh backfaces
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352
c. 15
The first/third one could also be that, but it could be lightmap UV artifacts, denoising or filtering artifacts (c. 9, 16, 17)
The redlined parts there are a gradient on the texture itself, not related to lighting
Ya, not worried about textures here.. I want to make my Editor that pitch black and only light up my scene
That wasn't clear from the question
Do you really mean just the background of the editor, or the game itself as well?
Thought the arrows where pointing into the void. Guess not. I would like to have that black background in game as well.
pretty much like this
Your level is lit but nothing else
By default both scene and game windows use the skybox settings for the background, which can be found in Lighting window under Environment tab, this also affects Lit materials
Separately from that the Camera component has its own Background Type field
Scene window has a toggle for skybox as well, which makes it use the background color defined in Preferences>Color instead
ah okay. Let me mess around with the 3 areas and see if I can get soemthing working
Thank you
Whenever I create the lightmap through unity it gets messy. It's a big object, how can I create it correctly? What would be the correct specs?
Is a big maze, I having trouble generating the lightmap uv
Whenever I create the lightmap through
you could just create a depth shader that fades to black, slap it on a perimeter around the map
We all gooood! Thanks a bunch
Is it possible to fixe the fact that my realtime light does not look the same as my baked light ?, for example i need to use realtime light for my moving door, but it doesn't look as good as other static object :/
Not really, since realtime light doesnt have lightbounces and therefore looks very rough
If you want good realtime lights either use hdrp with raytracing or for URP look on the asset store for Radiant GI
Both raytracing or Radiant GI are extremly performance heavy and could halve or even quarter your fps
Hence why unitys default realtime light looks bad, so its performant
Not with lightmaps, since they're calculated and stored in a much different way from realtime lights
You could light the lockers with light probe groups, so then they would have the same kind of lighting though light probes are inconsistent between objects
Adaptive probe volumes on the other hand give you perfectly consistent lighting for both static and dynamic objects
Side note if you don't know what enlighten realtime GI or don't intend to use it, you should uncheck "realtime GI"
It's much different from realtime lighting
The vast majority of games out there don't use anything more complex than that
Very few need true realtime GI simulation at all
How good or bad it looks really is up to skill
are you using light probes?
I think a simple fix is to lightmap the locker door closed
that way it retains the light when closed
although of course that would introduce some issues, that being you will get a "shadow line" on the inside of the locker when its open
depending if you are fine with that are not
other solutions people suggest here also work fine
ussing an LPPV
but you could also "override" the light probe select for that door object by using the "AnchorOverride" gameobject field, use a gameobject to manually pick a probe that is closer lighting wise to the rest of the doors
Can anyone confirm that Terrain works with APV sky occlusion? For me it seems like it's ignored in lighting calculations (as if light from the bottom goes through it)
I'm using a light group :
i'd look into APV, if you're in URP i believe there's a prototype version, but it's built into HDRP
it'll generate the probes for you, and allows objects to recieve a gradient of lighting from the probes
right now the locker looks different becasue it's recieving the same static light value throughout the object
this scene here is built using baked lighting and APV light probes, that makes it so the non-static player viewmodel has really nice variable lighting https://streamable.com/iq18xn
(i think this is your issue)
ok thanks I check that :)
when i add fog it doesnt work on the floor and roof.. how do i fix this?
i've put my game in 2023.2.20f1 editor version, but i can't find Adaptive Probe Volume 😢
https://docs.unity3d.com/6000.0/Documentation/Manual/urp/probevolumes-use.html
You must follow all of the instructions
I don't recommend using the 2023.1 and 2023.2. tech stream releases since Unity 6 is out
Fog must be supported in the shader to work, so your floor and ceiling materials don't seem to
do you know how to make fog supported
Well, really depends on what shaders the materials of your floor and ceiling are using
It would be suitable to disclose that
they're just cubes stretched out
With what materials
just screenshots i put into the project
do you think i could put my project in unity 6 ?
I don't usually suggest jumping between feature versions, but since you already have the 2023.2. which is an earlier variant of 6 it probably won't break too many things
ok i will try :)
i update from 2022 to 2023 so a big chance it wont break a lot yeah x)
"Probe Volumes" should be the same as Adaptive Probe Volumes though
There's ever only two options for light probe systems
but i can't seem to find how to make it work :'(
Do the 8+ lights need to overlap one another?
I guess you’re not using HDRP
this sphere is about 10000 away from the sun, what lighting can i add to the sun to make it act as a natural light that would come from our sun?
adding a point light moreso makes the shadow too perfect
also if they are rotating around the star, the point of where the light comes from, which would hopefully be the star, but actually just acts as if there is a light coming from one direction
Probably best to make your own lighting in a custom shader, which just takes a position or direction @civic tendon