#archived-lighting
1 messages · Page 17 of 1
I'll test and see
is there anything else it could be
changed it and nothing changed
@deft fiber
is there anything else
Did you follow my advice
whats uv overlap
You can go through the debug views first and see if any of them highlights anything in red
what debug views
these
ok
I got it now
whent to uv overlaping and this is what I see
is that bad
I also see this
@deft fiber
That's a lot of texel invalidity
Looks like you most likely have overlapping geometry
how do I fix
Check if there is overlapping geometry and remove it if there is
what does overlapping geometry mean
?
duplicated objects or something
but this problem jsut poped up out of now where and it use to bake fine
Duplicated objects or duplicated mesh polygons likely
The screenshot shows texel invalidity when there is no obvious cause for it, and copious amounts of z-fighting so that leads me to believe you have multiple levels stacked together
but when I move the object there is only one
@deft fiber
I really dont want to make a new project
I only have one object
The mesh itself could have duplicated faces
What can cause this?, tried** Cast shadows: two sided**, and **lowering the depth bios **
I'm facing really strange issue with lighting for additive scenes. The Scene 7 is baked seperatly, because it's intented to be very dark. The rest of the scenes was baked together with preloader as a Active Scene with directional lights.
When I loaded Scene 7 at the same time as the rest it's appear super bright, the same thing is for the runtime, but when I load it in different order it looks ok.
The issue is fixed when I set Scene 7 as an Active, but I don't want to set it as active.
Do you know what can cause it?
Try clipping the wall into the floor slightly
Could be a floating point thing
I believe in this case the bias settings combined with low shadow resolution and thin-ness of the wall cause the some shadowmap pixels to spill through
Bias can't be changed much without running into more issues, but you could try increasing shadow resolution and/or thickening the wall
If your shadow casting light is a spot light, check its angle
Spot lights with very wide angles of over 90° will start losing shadow resolution exponentially
Not sure what's going on all of a sudden but I can't bake lighting
It's all mixed lighting and on shadowmask, marked stuff as static and it's usually just fine
But all of a sudden I can't bake and it just goes straight to 99% finalising bake and just stays there saying 1 second left
Never had this problem before
I think there's an option to completely purge the light cache
And obviously do a full reboot
Also try switching from CPU -> GPU bake or vice versa
I finally implemented proper viewmodel rendering into my game, but it doesn't receive shadows- is there any way to fix this?
(I have a main camera, which culls viewmodels, and a sub-camera, which culls everything except viewmodels and overlays it on the screen.)
iirc you'll have to use Render Objects renderer feature instead of overlay cameras if you want shadows
That doesn't give you the option to change FoV of the viewmodel, but there's at least one hack around that such as the one used by Metro Exodus
https://youtu.be/pM2Lr5roSPc?t=275
hello everyone, how would i be able to modify the color of the environment lighting's intensity and color through script?
I think you only need to change this, if using a single color
https://docs.unity3d.com/ScriptReference/RenderSettings-ambientLight.html
If you use the three color gradient then you need to change all three
If you use skybox ambient lighting then it could be trickier
In that case you may need to update both the ambient cubemap as well as generating it into SH format but I'm not totally sure
https://docs.unity3d.com/ScriptReference/RenderSettings-ambientIntensity.html this would only control the intensity
what about the intensity though?
just so you know you can easily change the skybox's ambient lighting by doing RenderSettings.ambientIntensity
I linked that one as well!
The sky colors are in HDR format so the colors themselves can represent any intensity
A separate variable for it is convenient if you only need to change intensity and don't wish to touch the colors
oh sorry, i didn't notice that :D
but i would like to create 2 variables, a color and a float for the intensity
so i could modify the color and then modify the float for the intensity, i feel like that would just be the most comfortable
the reason i'm asking is since if i create a Color variable there's no intensity there, so i don't understand how would you pass on the intensity into the RenderSettings.ambientLight
or does it use the alpha or something?
Color itself can contain the intensity in three channels
Non-HDR colors are in 0-1 range in each channel as you'd expect
HDR is much the same but with each channel multiplied by some intensity factor
1f, .5f, 0f is orange, 2f, 1f, 0f is a glowing bright orange, for example
It depends on what the Color is being used for if the HDR intensity can be used, or if it's clamped to 1
oh so i just do new Color(1f * intensity, 1f * intensity, 1f*intensity); right?
Ambient lighting seems to accept both HDR color and a separate intensity variable on top of that, so you can use either workflow
Yes
thanks
You can see how the inspector increases color values when displaying them in 1-0 range and increasing intensity in the inspector's color picker
Apparently it uses color*(2^intensity), but any intensity value or function that you prefer will work
Does anyone know what causes this when moving the camera around with lightmaps? I am using Unity 2023.1.4, I have switched everything to baked lighting and baked the lightmaps for this object. It looks fine when scaled normally, but when I scale down it starts having this blotchy effect.
These ceiling lamps have an emissive map that actually works, but they are not acting like lights themselves, so I added a point light, my goal is to achieve a bright indoor scene, I'm also using URP, what can I do to achieve that result?
In this image I was using the Deferred rendering path
and I achieved the result by just adding point lights
but here as you can see (now I'm using forward) the ambient light that I want to achieve is a little bit forced
I even found a way to achieve this by using forward+ that avoids the problem of "per object light" and so I could add more lights but idk if there will be performance issues even baking the lights
My URP scene moving objects wont receive shadows from my mixed type directional light. They will receive shadows only from other moving objects, but I'd like them to be received from the larger environment also.
Is this HDRP? Looks like SSAO or some other screenspace effect artifact
Could also be related to realtime shadow bias and distance, or shadow cascades
Doesn't look like anything baking should cause
Forward, deferred and forward+ rendering paths look exactly the same, but have different technical limitations
If you want good and natural ambient lighting you'll want to use baked lightmapping
I think I found my answer, but it's pretty bad :/
Symptoms
My baked/ static objects do not cast shadows on my RealTime lit meshes (characters/ marked non-static).
In this shot, The red block would be expected to cast a shadow on the white and...
yeah I tried but many of the models that i downloaded from the asset store have very bad lightmaps, for instance, i just baked the scene and with even the Generate lightmap UVs option enabled on import settings of the model they look completely black
and I don't even know a thing about lightmapping
Shadowmask lighting mode is supposed to solve this problem, but it's the most expensive one out of the three
Well that's sad to hear, why is it so expensive? Sounds like it would be more efficient
It combines both realtime and baked lights, but also masks shadows out from areas of the baked lightmap where they're occluded by static shadow casters
iirc
It's a pretty complicated system
https://docs.unity3d.com/Manual/LightMode-Mixed-Shadowmask.html
And there's two variants of it
Conversely Baked Indirect doesn't deal with shadows at all, and Subtractive naively overlays baked and realtime shadows
The earlier link is 6 years old so I think it's out of date regarding this
This quote could be applied to so many things in unity hahaahahaha
Thank you for this link, I'll read through it
Hi is it possible to snap a 3d object to a hdri so it looks like its in the hdri? I have a hdri road and i want to place my car so it looks as its on the road
Am using hdrp pipeline
Heh, there's intuitive things too luckily! Baked lighting in particular has a lot of very technical processes to it
Not possible if the camera ever moves
A HDRi environment exists at virtual infinity
Your best bet is to place the camera in a fixed position and then just eyeball the object's position and rotation relative to it
It's hard to use if you don't know how it works
The meshes you have look suitable for baked lightmapping
Oh ok
Honestly yeah, I just wish Unreal didn't lean so heavily into blueprints I find them so rubbish for any type of complicated project, if you're someone who wants to use code it just feels like you're handicapped there, unless you're in a huge team. Unity's C# experience is pretty nice in comparison
Particle systems and shader graph likewise are intuitive
So after investigation I've found shadowmasks are already enabled for this scene, it's just this part doesn't seem to work:
Real-time shadows from dynamic GameObjects, using the shadow map, up to the Shadow Distance.
As you can see objects cast, but don't receive properly
I'd make a test scene in a non-VR-template project to try to rule out project specific stuff
Fair idea, I'll try that, thanks
Seems to work in an empty URP project. Which should help diagnose, bit weird it's so strangely configured in the VR template.
But I think it's all being done realtime, even with set to mixed
Yeah I don't evern know how to get it to bake in the default project
Enabling it in the lighting settings doesn't seem to do much
Don't know how to get what to bake? I understood that it worked right there
I think I just needed to mark contribute global illumination
On some stuff
Unsure
Trying a blank scene in my VR project now instead
God knows what hidden settings are in the template scene
Frankly I think the VR template might just need a serious polish up, there are a few things wrong with it
Yeah it seems to work in a new scene with the exact same URP config and light settings
I'll see if porting over the VR functionality ruins it later
how can i achieve per-vertex lighting?
I made a new directional light other than the pre-given one in my scene and now it seems to work
might look at it later i guess ¯_(ツ)_/¯ to see what was wrong
Pretty sure there are options for it in the Asset for shading
Only for additional lights, but might give you a start point
hmm, yeah but i need the main lights too
trying to recreate a authentic N64 look, the n64 had its tri-point filtering and Gouraud Shading (aka Per-Vertex lighting)
Nevermind I'm a dumbass completely forgot what I was looking for, still broke in that scene /shrug
I think writing your own shader would honestly be easiest for this
And also I haven't been able to get this working for mixed lights, only realtime :/
I honestly didn’t think it was going to be that hard to work with lighting….
Realtime lighting is a dozen different hacks working together to produce visuals that sometimes somewhat resemble reality
Hello hello! quick question ! What's called the tool that allows to bake lighting only what's in the viewport ? So I don't have to bake the entire scene to see if it's good or not ? Thanks :D
There is no such tool officially
There's "progressive updates" setting that prioritizes view, though even still only the finished bake is a reliable indicator of the result
You can disable parts of your scene for the duration of a bake in any case
Meh, so it means, i really need to wait the whole scene to be baked to have an idea of the result :/
More or less
Also, another quick question, I'm trying to bake in gpu but it switches automatically when I'm starting the bake to CPU mode. Does it means my computer is not good enough to run the GPU mode ?
You can speed up the bake by baking with GPU, reducing samples and especially the lightmap resolution
It's always important to optimize the scene for bakes by excluding small and high-poly meshes from the lightmap, or from the bake entirely
Or there is another possible issue ?
Yep, unfortunnetely, I tried to reduce everything ahah
It could be falling back to CPU for many reasons
Does the console display any messages when that happens?
"Falling back to Cpu lightmapper"
"Failed to find a suitable OpenCl device"
" OpenCL GPU device NVIDIA GeForce GTX 1060 3GB from NVIDIA Corporation has less than 4 GB of global memory, ignoring device for lightmapping." - But that's a warning, not an error
At least the message is clear why it fell back
Which editor version is it?
2022.2.17 !
I'd make a test project using a newer version like 2022.3., 2023.1 or 2023.2
There's been a lot of improvements to vram requirements with them when baking with low end cards
But I'm not sure which version has which improvements precisely
Oh, looks good, I'll test that ! Thanks for your help ! 🌸
2023.2. should support even as little as 2GB
2022.2.17 is now a now unsupported tech stream version, I would consider upgrading to 2022.3. (though .3.4f1 and .3.5f1 seem to have bugs with canvases and sprite rigging so do tests or make backups first)
Definetely, tysm !
we've a camera that is far away from the scene's objects; is there a way to tell the first shadow map slice range to start after a certain distance rather than from the camera?
(using URP)
I think you'd have to increase the camera's near clipping plane up to that point
ah, that's not unreasonable at all.. ^^' thanks
i'm wondering something, would it be possible to make sure that shadows in the built-in render pipeline only get calculated on awake or through scripting? something similar to the option to choose from on awake, every frame, through scripting on reflection probes
and if your answer is bake the lighting, i dislike baking because of the time it takes, and also i want no global illumination, just diffuse lighting and shadows
Realtime shadows are only valid for the frame when they're rendered because they depend on what the camera can see and how far they are from it
yeah right, all those depth buffers, but i saw HDRP had like an option for "On Awake", does it work the way i want it to there?
Yes, HDRP supports shadow caching which kind of does save them for later use
You'd have to make your own implementation of it if you want it into BiRP
then for now i guess disabling shadow casting for all dynamic objects should look the same way i intended, not too sure about the performance though
how to fix this shadow? if object close to another object, that shadow like this. and how to make the shadow smooth?
You can disable the shadow from distance to save the performance
i using mixed for lighting
That's because your bias is too high and you don't have enough resolution
lightmap resolution?
No, the resolution for your shadow
Mixed light mode uses realtime shadow
where the setting?
You can increase the effective resolution by decreasing shadow distance
And if you're using a spot light, by decreasing its angle
i using point light
the shadow look normal in directional light, but look worse in point light
After checking those I'd tweak the light bias values, but carefully since any low or high bias often causes other issues
shadow distance in urp right? i try to decrese to 2 but still worse
i try to change value in dept bias and normal bias but nothing happend
If nothing seems to change when you tweak those settings, that may suggest that the URP asset you're modifying is not the active one
is active before i change to bias to custom, before that render pipeline asset
if using renderpipeline asset in bias, and then change value in depth bias, the shadow change
but stil terrible
like this
Try tweaking your shadow settings in your URP asset settings to higher quality / softer
I wish there was a fast blur available or something
I am pulling shadow coordinate and cascade data in shader, but after upgrading to a newer version of unity, something about how cascade maps are calculated to passed has changed, and I havent been able to find documentation on how it differs 🤔
I went from 2020 to 2021 and the Last Border fade-out is new and I think might be whats breaking my shader?
Is there a place to see all the behind the scenes info on what unity's shadow stuff is doing?
I guess I am looking for essentially a full walkthrough of re-writing unity's lit workflow? but specifically for 2021, like I am guessing such a workflow would have the answers I'm after
There's nobody out on the internet who has that kind of knowledge to share, I'd expect
Save for Unity's developers who have different priorities
We can really only hope that when "block shaders" roll around they will give us that kind of granular control over the URP shader features
RIP, good to know. The unity github code repo has uncommented versions of stuff like shadows.hlsl, but without knowledge that I lack, I am not sure how to make use of them to fix my problem 🤔
Apologies if this is an overdone question, but it's been bothering me ever since I started making games years ago, and I still don't understand why it happens:
What causes the obscene differences in shading between these walls? Why doesn't the light uniformly shade them like you'd expect?
hey uhm, if i load a new scene in editor play mode the enviromental lighting from the skybox is not working anymore in that scene (not in the scene i pressed play in) and after build the first scene is having this issue bot not scenes loaded, very weird, help
I need help, every time I bake my light my map becomes dark, does anyone know how to fix this issue?
Looks like a problem with normal maps, such as the texture not being marked as type: normal map
Could be many reasons for it so hard to say
I'd try to confirm that you're baking correctly and there's no issue with your scene or its meshes by first making a new scene with some default cubes and trying to bake lightmaps just for them
You need to generate lighting from the lighting window for each scene (with realtime and baked global illumination setting disabled if you don't specifically need them)
i have, but this still happens
yeah, I made a small map and it was baked correctly, there must be something wrong with my actual scene with baking.
I NEED FAST HELP, NEED TO PRESENT THE PROJECT IN 2h
What can i do to fix this problem bigtime fast
i am seeing your answers in 30 min, please be very specific and easy to understand
Please help me
I'm very sorry If I'm asking something that is so obvious, but I truly don't understand how URP Light 2D's target sorting layer works.
My goal: I want it so that the light does not bleed through objects as if the light is being placed on top of all of the layers.
Pic #1
The target sorting layer for the light 2d component is set to "default" and for some reason this is the only way the light will render, but the light bleeds; as if the light is rendered on top all of the other game objects.
Pic #2
The target sorting layer for the light 2d component is set to "background". But the light now does not render. My expectation is the light will appear only on the background layer.
Please tell me if I'm doing something wrong, it would be very appreciated!
@timber lichen you got a Solution for mine maby?
Sorry bro, I'm new to 2D lighting and never touched unity 3D before. I hope you find a solution though
Im fucked
I accidentally find a solution to this, using the sorting group component
Do you have checked "generate lightmal uv" in the import settings?
In the same folder as your lightmaps
found it thanks
Is it set to static or did you bake this mesh before?
yes it's static and it's baked mesh
Well, then it receives its light from the bake.
Just turn it back to Receive GI: Lightmap
If you dont want that, you have to delete its Lightmapped Data and then it can get its lighting info from Lightprobes again
ah... so it's grayed out because it's already baked, I see thanks I did it now
Good 🙂
guys how do you deal with lighting? i try to put in a light but unless i ramp up the intensity it is dark, but if i ramp up the intensity then anything close enough to the light is a white blob
You cant use lights in unity, as you see them in reallife. Normally you dont add a light source directly beneath the ceiling.
If you have a overall brightness in your scene, you work with global environment light.. so you make sure, everything has enough light.
If you want to bake lights, then you can add a area light to your room...
If you want your room to be lit, i would use environment lighting, add a lamp on the ceiling, fake the "light" with an emission and add an area light to the room (if you bake) or a point light in the center of the room, if you want realtime light.
Well.. gamedesign is about faking stuff allover 😄
Do you bake your light or is it realtime?
for which hardware?
phones
Well. Phones can not really handle realtime shadows
ive seen real time shadows on phones
Mostly they are faked
And Point lights are the most expensive
Just my 2 cents: step back from doing perfect lighting on a mobile device.
Bake as much as possible and for the rest, fake the light or if you want, give very important objects a real realtime shadow.
^
its all about faking it till you make it in terms of graphics 😛
granted, skull isn't entirely wrong there are some phones that are capable of casting realtime shadows
I bet, I had my final due and waited till the last minute to do lighting. Overall the project looked nice but definitely isn’t industry standard.
is it normal for baked lighting to take hours for such a simple scene?
I know what to do for rooms, but how am I supposed to place reflection probes in wide open spaces?
Doesn't seem right
I'd try baking manually with Auto Generate off, and without any custom shaders in the scene
Or a test bake in a totally default scene with some cubes to rule out custom shader problems
I'm having similar issues
Is light baking just simply broken? I've been using the progressive GPU lightmapper and when I open task manager, CPU is at 100% and GPU is at like 2-3%
What Unity version and do you have any messages in console about falling back from GPU to CPU baking?
Thanks for the quick reply. I'll have to check when I get home tonight unfortunately.
Just another quick one. Do you know if it's possible to force stop or cancel a light bake, then save the previews? I've noticed that it seems to bake everything perfectly to 99%, then it just hangs or crashes. The result is usually almost perfect. However, when I hit play, the lightmap previews are all wiped, so I can't preview it in-game!
Not an option, to my knowledge
Hanging at 99% is a typical symptom of the lightmapper trying to bake animated shaders
I think it causes it to try to repeat the bake for it forever as the shader keeps changing
You see the scene, very simple, just some cubes
Relatively, but I can see custom meshes and potentially custom shaders
In your situation I'd want to 100% confirm that baked lightmapping works in your project, which can be best done in a new scene with only default cubes
If it works there that confirms the problem is somewhere in the earlier scene or its assets
I disabled global illumination on the tree so yeah
Gotta try in a new scene tho
Ooooh, so it could be a product of some of my custom shadergraph materials?
I'll try just using URP lit materials when I get home
nevermind that
shadows are bleeding through surfaces
as if its ignoring the static objects
You have a culling mask there, are the walls on a different layer ,so they cant receive the light?
walls are on Solid layer
they shuld be counted
this happens when i switched to Mixed
Which Lighting Mode do you use?
Maybe try Shadowmask for this. Not sure but i think in Subtractive your dynamic objects receive light from your light source.
Or change the color strenght of the light source, so your shadows are not that obvious.
shadowmask fixed it
another question
colored objects are not static and they seem out of place
if i set the main light to baked, they are just dark, not lighted
You have Light Probes?
its a game for mobile
ok how does that matter? theyr just for reflection
LIGHT probes. Not Reflection Probes
Without light probes, your dynamic objects cant receive baked light
https://www.youtube.com/watch?v=hMnetI4-dNY&t=1s
At 43:00 min
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...
now it looks accurate
👍🏻
shuld i have reflection probe fora mobile game?
If you have Glossy/metallic Materials yes. And it doesnt need any performance, if you set the ref.probe to baked
ok
If you have multiple rooms, you want to have one Reflection Probe for every room.
No Problem 🙂
What are cast shadow decals?
I was reading an article by playdead and found it there
guys, look at this shadows from the building
compared to the purple vase
how can i fix this
its baked lighting
the green floor is very big, maybe the texture is stretched?
guys
so i made an enclosed space
as you can see the walls are all black
but the floor is not
space is enclosed from all sides
how to achive pitch black spaces
the shadow
Seems to me like you are not a fan of the bounce lighting
What your seeing there is bounced lighting filling in those shadows @gentle sluice
What are you trying to do
Bake without any bounce light?
Gonna assume so, in that case in the unity lighting window there is a field called indirect intensity multiplier
I'm doing some chunking for this world I'm generating and the lighting between the chunks seems to be inconsistent, generating a grid pattern. The chunks themselves are completely seamless, but the shading seems off. I'm using a standard lit hdrp material
Drop it to zero
i dont know dude
i havent done lighting atall til now
but im thinking an entirely closed space shuld be pitch black
I just told you how to eliminate the bounce lighting
Turn your indirect multiplier to zero on the lighting window @gentle sluice
So you want to keep the bounce lighting then
yes
Because reflections are not raytraced and are hacky cubemaps
Your floor is getting reflections from either the sky or some reflection probe within your scene, and your black walls are also having some kind of reflection as well
Controlling reflections can either be done my eliminating them, or placing reflection probes to get a more accurate reflection
Your material properties also affect the appearance of reflections on materials as well, if they are metallic or smooth/shiny they will receive a reflection
so i shuld place a reflection probe inside the closed space
yes
Hi I have a problem that the light penetrates the walls, knowing that the wall I use is thick
What is the solution to the problem?
This room has no light, but the light comes from the next room
Realtime shadows for the light
Or non-realtime shadows with the baked lightmapping workflow
Your shadow strength is below 1, so some light is let through
Yes, when I made it 1, it did not penetrate, but the shadow became like this
It became severe and it's not very good
Fixed...
Hey guys. I'm not new to baking lighting and I think I am experiencing a bug.
I have a fresh scene and am trying to bake a directional light. It bakes black. The point lights bake fine and are set to bake. Only the directional light is the issue. Any ideas?
The mesh and lights are all static.
First image is after baking. You can see the point lights have baked fine inside the building interiors.
Second image is after clearing baked data - so no baked data.
nvm. I fixed it. There was a skybox object which had a mesh render set to cast shadows.
I was using shadowmask to bake a scene before. 151 mixed point lights, indoor scene no sky box or anything. HDRP
Now it just crashes. It finishes everything, goes to importing assets and then unity just crashes at the end. I tried baked indirect but on a few surfaces the lighting was a bit off and the performance wasn't very good compared to what I had with shadowmask.
Ive tried 3 times now, each time taking like 3-4 hours to bake, finish up and then crash. So now i feel like breaking something lol please help.
I have this scene and I have this lighting settings. On my scene exist two sources of light: Probe Volume (2023 new feature) and sun which is Realtime.
The problem is that Baking requires more than **100GB **of RAM! And I dunno why!
How can I fix this?
What params should be tweaked for to get ability to bake the scene?
Okay, the problem is in probe volumes, why this takes 100GB RAM - mistery.
Yes
Restarted, cleared bake data, changed settings etc
Crash
Have you tried reducing the values like texture size etc?
i've added URP and followed some basic tut (https://www.youtube.com/watch?v=NOv31HSqs6U)
However my spotlights do not work, no matter what intensity i choose. Only directional light works
Your VRChat world will thank you!
Video style entirely stolen from the original legend, Ian Hubert: https://www.youtube.com/mrdodobird
Thumbnail is from Furality Luma: https://furality.org/
Ending is VirtualFurence: https://twitter.com/virtualfurence
More advice:
- Spot Lights are (almost) always better than Point Lights
- Keep realtime/mixed l...
This tutorial is not for URP, but that only implies that the post processing shown is not compatible
Do point or spot lights not work in either realtime or after baking?
Realtime punctual lights need to be enabled in URP Asset's quality settings
i dont see punctual lights anywhere
Point and spot lights are both "punctual lights" as well as "additional lights" in this context, though I forgot the inspector doesn't always call them that
okey it actually did work, it just had to be at a very precise distance and a very high intensity (500)
if i move the spotlight up just a little bit, even while increasing intensity to 2000, its almost immediately gone
That seems way higher than what we should expect
That happens because the yellow curve is the outer range of the light which fades out the light
aah, i see now, the range slider
What is the range set to currently? It may be that your scene's scale is wrong
Light intensity is relative to scene size in editor units, which are meters
It's worth making sure that your humanoid character is about two units or two default cubes high, and not bigger or smaller by a big factor
Sometimes meshes are imported even 100 times too large which makes it seem that lighting and physics act weirdly relative to them
16, my unit is scale 1 & 1.25 so i think its fine. But i can control the light way better now with range etc. Intensity is still 500 but i can control it just fine
It seems correct!
no
what about shadowmap and things
should i disable them when baking or doesnt matter?
Well if you want shadows in the bake you should probably leave them on. How about reducing the texture size down to something very small like 64x64 and then reducing the other values by half or more
alright
Set the lightmap resolution to 1, lower the 3 samples to as low as possible and set max bounce to 1. Set directional mode to non-directional and Increase the max lightmap size to 2048 or 4096 and try again see if it finishes.
You are generating a lot of high res lighting to a ton of small lightmap textures is what I am thinking.
The settings I describe should hopefully allow the lighting process to finish. Als make sure you are not editing a prefab while baking lights, be in the scene root.
Im making a 2d topdown game (with shadows). But the problem is my door is casting shadows onto my walls which i dont want. I only want the door to cast shadows on everything else except the walls. How do i make this happen?
also how can i make some light only impact some objects?
2D lights have a "target sorting layers" option
it dont work for me
Thank you will try this when I get home
ive set the walls and floors to different sorting layers in the tilemap renderer, but when i set my global light to target anything else than default it doesnt light anything at all
yeah works now
only thing i dont understand is why ive had to lower the settings when theyve always been fine as they are
upped it a bit and got it to work on these settings
havent tried going higher yet
anyone here know any guide that tell you how to make your own shadow caster?
like writting it from scratch
On some unity versions the lightmapper gets crashy or weird. Could be that you were unlucky. Restarting unity or your pc usually is enough. But if you can get back to your old lighting settings it rules out hardware related issue. Good luck with your project!
ok so I found something that can tell me how to make shadow caster
but this shadow caster is so dependant on camera location
like for example
it broke because the shadow caster (camera) is not in the right position
so it like need to be on such exact position, unity directional light don't need thing like this
anyone know how to solve this problem?
anyone knows why my light isnt showing? (hdrp)
Im getting very weird artifacts on some of the walls, I have tried everything like replacing them, enabling double sided GI and other stuff, but nothing seems to fix it.
Check UV overlap and Texel Validity view modes from the scene window
They would help us pinpoint if the problem is one of them or both
changed it up a bit, still running in the same issue and heres the texture validity view
nothing on the UV overlap view
Hmm is it a probuilder mesh
The blocky artifacts are texel invalidity from exposed backfaces
https://forum.unity.com/threads/faq-blocky-artifacts-appear-when-i-bake-a-scene-how-can-i-fix-them.951444/
UV overlap could cause them to be appear in wrong places away from the exposed backfaces, but the view above indicates that should not be the case
The only exception that comes to mind is that the UV overlap view might not work correctly for probuilder meshes
well how would i fix it?
Find the backfaces and remove them by covering them with something or setting those specific materials as two-sided
The tricky part is to find them if they don't seem obvious
finally it wokrs 
i have an asset that usually has transparent windows, for whatever reason in another project they are blacked out?
what are some possible causes please?
okay i know why, i switched from using the built in render pipeline to the urp and that caused the black windows
anyone?
No need to crosspost
People who are familiar with re-writing URP's rendering features (or have as much as attempted it) are few and far between
presumably you need set the realtime light settings/shadow cascade settings in the pipeline asset especially the realtime shadow render distance away from the camera
I don't use hdrp, but inner cone angle at 0 might be a bad idea for some pipelines, probably bad if you use light cookies.
still doesnt work when i increased the inner angle
Hello guys, I have an issue
I am working on an indoor garage scene where I have directional light turned off, and want light to be emitted from the ceiling (the ceiling material has an emission map)
But however, it does not seem to be casting any light onto the floor. I'm not sure how I would achieve the effect of the ceiling lights casting light onto the floor.
I tried changing the emission map intensity, but it just made it look worse. At this point, I don't even know if I should be using emission maps for this effect. Maybe spot lights are the fix to this? But is there an easier way of doing all that without having to place hundreds of spot lights?
Please help, and thanks in advance
Short answer: no
Emission is not working that way.
Emission has mostly a very small effect only on direct surrounding objects.
You can work with area lights to fill the indoor scene with light and add a post processing effect (bloom) to make it look, like your visible lights in the ceiling are "bright".
If you want something like a visible light on the ground, you could use a spot light.
Oh okay! I guess I mixed up how emission works.
Thank you
If you place a massive cube in there with an emission, you would see the effect. But not with this small points there ^^
Okay, I think I got it, but does this look like light the square ceiling tile lights would emit in real life?
Not really ^^
I think in reallife you will not see this on the ground ^^
You can try Arealights and bake them
You can technically get light cast from emissive materials using baked lighting, but you'll still want light components there because emissive baking is so inefficient
These types of lamps have light diffusion panels, which makes their light very wide and soft
Area lights would be the most fitting light component for them, but spot lights with extremely wide and soft angle could work also (with no shadows
Yeah, I changed it all to area lights, but the baking process on URP is very long for a simple 2 room map (it takes around 20 minutes). Is this normal?
Depends completly on your settings ^^
Baking can be sped up by baking on the GPU (if you have a decent one) and by decreasing resolution
Ohh my bad lol I had it set to my cpu which is a 9th gen I5,
I have a 3070 so it should be faster with my gpu
Does anyone know what this issue is called and how to troubleshoot it?
Basically I'm trying to make modular assets for this level, the issue here is that there are two types of ceilings here. I don't mind the seam in the middle that separates the two meshes however the light is also being distorted. The UV's are as good as they're going to get and they're both using the exact same textures with the same.
I believe it has something to do with the bake but I'm not sure
Different angle. It's obvious that it's caused due to the rotation of the mesh but how would I go about to fix this?
I've been really against baking, but i did a small amount of baking, and it actually works pretty well, here is the only problem though: https://i.imgur.com/Uka3ZCk.png where could this be coming from?
The blocks of light on the floor
Hm.. i have some guesses:
- No "Generate Lightmap UV" in the import settings
- Something weird about your normals
- Very low Resolution of the lightmap or your different tiles there
Probably also no "Generatve Lightmap UV" in t he import settings or very low Resolution?
They should look like this when you activate this debug mode
Where exactly is this?
What? I gave you 3! options
Thanks for the direction, one more question if you don't mind.
My work flow is like this
- Model and UV asset in Maya(Low and high poly)
- Bake high to low and little basic texturing in Substance Painter
- Import texture and mesh into Unity and apply to material
My question is, at which point would the Generate Lightmap UV and/or Low resolution of the lightmap occur, so I can go back and sort it?
Sorry if this is too broad of a question, just been struggling on this for a while now 
For example, if you stack UVs for saving space in your texturing process, you get problems when baking light.
Generate Lightmap UV is in most cases a very good idea, because unity packs the lightmap UVs very efficent and in the style how it needs them.
For the Resolution, you could do first bakes with something like 5 texels per unit. For final bakes you should increase it if needed to something like 20 tpu or more, if you need really high res.
I always to the Generate Lightmap UV.
If you have really complex shapes, then you can do your own lightmap UV in a seperat UV-Channel as your Texture
Just a nitpick but these dark grey checkers would imply that the viewmode has no lightmap debug data to use, as it's only stored for the session after bake, per scene ^^
Perhaps!
I appreciate you here 
Tiled and modular environments with small pieces are always more or less problematic for light baking, since more disconnected parts means more seams, which means discontinuities in the surface lightmap, and more UV islands that require padding which consumes lightmap resolution
https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/ chapter 10 has more info about this
You can also find the rest of the issues there that we've been talking about
Btw Spazi? How long do you use Unity? You seem to have a plan from everything 😄
I mean im using it for 5 years now, and i still struggle on some parts 😄
I started in spring 2020, but I've been focusing more on problem solving than the development grind itself during that time so I've had more time to learn various things!
Ah 😄 Okay ^^
Yeah solving problems from other people increases the own knowledge very fast 😄
Truly, when you work alone a hunch of how stuff works is often well and good enough
Okay, i baked my scene, and its getting alot more fps, but a problem, is that my floor texture turns black when looked at, and turns back normal when not.
It depends on what angle i look from
That sounds like a normal problem.
Do your Material have a normal map?
Yes, but i mean pitch black, as if the floor isnt there
Yeah.. but you said its dependent on the angle, and that is normally a problem with normals 
Is the normal texture set to type "normal map" in its import settings?
Is this on every floor tile?
Its just one big floor.
Yes it is
Can you do a video? 😄
I wouldnt be able to upload it, because of size, but here are screenshots: https://i.imgur.com/tkQYuXU.png https://i.imgur.com/cZX5Uxr.png
First one is when looking directly at the floor
how does it look when you change the import settings of the mesh to this?
just to make sure, its not a smoothing problem
nvm i found the problem its my occlusion culling
oh lol
Sorry, but one other question, why does it seem like there is a radius around my characters body. https://i.imgur.com/uvKwtW6.jpeg
Its not very noticeable in this dark environment, but in lighter areas it is.
anything in the radius, becomes slightly darker
Hi, I'm making game and there's this problem with the lighting and I don't know what's causing this problem
I'm using point lights with the Baked mode turned on.
Baked lights are static, you don't move them
How can I move down skybox?
So, I'm trying to make toon shading, but the baked shadow give me this gradient like shadow, is there a away to not include them in the lightmap?
like I only want to bake the casted shadow
YOu can move up your Terrain. Or create your own skybox that fits your needs
What is "them" ? 😄
the one I circle in red, the one with gradient like coloring on the lightmap. Like I want to remove that and get just the casted shadow
Where is the light coming from?
there is 2 source there one is the directional light (white color). the other one is from an emissive object which is the red light
You can disable bounce lighting from lightmapping settings
But the direct shadows will always have smooth edges to some degree, or pixelated
yeah it's better now thanks. but the direct shadow is indeed still there
YOu can turn of cast shadow on the object 😄
But i guess you want some kind of shadow?
yeah like I just want to bake the casted shadow, since the direct shadow that unity bake is not toon like shadow
If nothing gives the correct visuals. Paint it in with photoshop 😄
hmm... i might do that for last resort 😅
oh... wait this actually help in decreasing the gradient, is there a way to apply this?
Whats this? The Intesity Slider in the Lightmap Preview?
from that
maybe yeah
I dont think that you can apply this. Never done that.
I see... I will look for another way, thanks anyway
Have you tried disabling global illumination
That only previews the lightmap at different exposure values, it doesn't actually do anything to the gradients
Try disabling bounce lighting when baking as I suggested
this setting
the direct light is still there
I mean the gradient of the direct light
it fix one of the problem of the gradient of the emissive light, but the gradient from the direct light is still there
like on the top left
Can you show that in the scene
The lightmap can have all kinds of weird values in UV areas that are not visible from the outside
Well, since the lightmapper doesn't have any toon shader, the light received by a surface is proportional to its normal direction relative to light
It's a "gradient" because this surface is curved
You can modify lightmaps in an image editor that's capable of editing .exr files to apply a step function for a toon-like light ramp
Or you can use a shadows-only mesh for baking and a dynamic mesh with a toon shader for the visuals
In either case it's unlikely you'll ever get good looking toon shading from the lightmapper because you'll always be limited by texel resolution
I see... thanks
But it should be fairly easy to try those two ideas
is there a way to easily compare scenes with APV and with no APV without clearing baked data? I would like to see how it affects environment and characters
If there doesn't seem to be a button to toggle them on/off, I suppose you could save the scene as or duplicate it and clear the bake, then compare the two
that's why I asked about an "easy" way. This seems so daunting I don't think anyone would bother
What seems daunting?
having the duplicate of the scene without the baked data
Isn't that just a matter of a few mouseclicks
depends on how many scenes you have in your project and how complex they are. Of course this is a workaround, but system such as APV shouldn't require us to work this way
Not exactly sure where to post this, but does anyone know what this issue is called? Where some of the triangles are darkened
@oblique crown Did you try disabling the probe volume gameobject, or the probe volume global setting in Frame Settings
I didn't tried frame settings. I'll check that one out, thanks
I am wondering how it will affect scene view camera 🙂
hm, it might actually works as I can see that changing default frame settings works on other properties. (I have to switch branches to check the apv)
Do you have a better picture, it's a quite hard to see
I mean the grey parts, not sure why they are grey
Something odd is happening with the triangles and for them to act like this with the lighting
Could be inverted normals, could be n-gons or self-intersecting polygons, could be overlapping geometry
I would scrutinize those polygons in modeling software first
It may be overlapping geometry, vertices. Generating this mesh in Unity. Thank you, I'll check it out!
How was it generated?
It is a bit complex, it's basically a cylinder with cutouts
Calculating triangles/quads
It's happening throughout the whole model, but on the outside it's hiding it
Also doesn't seem like it has extra triangles, it's an odd one. I may just add a plate on the areas without holes and hide it, dumb solution but works
Outch! That are WAY to many triangles for a game 😮
They are also to sharp and to long.
I expect your mesh generation algorithm is making some kind of mess there
Booleans are notoriously difficult to get right without glitching out
These look like overlapping or intersecting polygons also, but it's hard to say
Quite likely hahaha not a pro at this and its quite complex for me. Need time to debug it all
if you are using Built-In, I think you can manually sample the lightmap using DecodeLightmap then use step function to make it cell-shaded
Shader Graph also has the Baked GI node
I think that could work too, sample the baked GI/lightmap then step it to make it cell shaded
The challenge is that doing any kind of stepping function to lightmaps brings out the texel edges, resulting in worbly light ramps
I see... thanks i will look into that
Guys Why can't I darken the sprites even though there is no light? How can I add 2D lightning ?
Anyone has any idea why my shader and my lights look different in the game window and the scene window? I'm at a loss what caused this. Thanks in advance 🙂
May be the lighting
I've added a screenshot of my direct light and lighting settings, but I can't see the issue
Not really sure, but it may be an HDR issue. Do you have HDR enabled?
If you click on the camera
Or this: In the scene tab, you have to check the little sun ☼ next to the "Shaded" drop down so as to see the real lightning of your scene.
Does your camera have post processing? I'd also check if changing the scene view from orthographic to perspective changes the appearance of the shaders
You have to create at least one 2D light into the scene, or lit sprites will be fully illuminated
I have some static gameobjects (Chairs, desks) that for some reason, stop reacting to light after baking my scene, before baking it looks just fine.
Baked objects don't really "react" to light
Can you demonstrate the issue
gimme a sec to bake my scene once again, to provide a example
This is what it looks like after baking: https://i.imgur.com/TyYni3h.png The chair and desk, are pitch black, even though their is a light directly above it.
After baking check scene view modes for lightmap UV overlap and texel validity
How do i do that?
You must have baked lights for that scene during that editor session to use them
But it will likely reveal UV overlaps, texel invalidity or both
how do I darken an area? (like negative light)
When you dont use a light 😄
Or possibly with Post processing
but the area is already lit
by the sunlight
even though it's underground
(the light on the side is black because I thought you could have negative intensity
You would have a shadow casting surface above the underground area to block the directional light, assuming directional light is reaching in
It will still be lit by ambient lighting
How do i fix overlapping UV's?
Most important step is to have lightmap UVs on the meshes, which can be automatically generated from mesh import settings
I already have a water plane blocking the light
I'm not sure why it's still getting light
Ambient lighting from the sky / environment
how do I turn it off for closed areas like that one
With a script for example
how
If its a first person game, you could add a collider there, that triggers a script to turn of or darken the ambient light of the scene.
Which render pipeline is your project using?
urp
Then you may have to use baked lighting and its reflection probes and lighting probes, or control all ambient lighting with a script as suggested
(There's no technical reason why we couldn't use lighting probes without baking all lighting, like reflection probes can, but there's no editor tools for it)
I think using a post processing for this area could be possible too
But that would make everything darker in this area, not only the walls.
I don't think it's really possible to reduce lighting with post processing
Reducing exposure or brightness otherwise won't be convincing
HDRP does have volume overrides that can control ambient lighting though
Hello everyone !! I am a newb VR developer using Unity. I need your help for me to know why there are some patches of glow after i generated baked lightmaps. Thanks!
I would first check scene view modes for lightmap UV overlap and texel validity
I can see realtime/mixed lighting but no visible results of baking
Thank you,
The red texel invalidity means those surfaces are exposed to mesh backfaces, which terminate light rays during baking
That little UV overlap shouldn't cause any big issues
I'm a little suspicious about how the floor doesn't seem to be included in the bake, but the foliage is
Usually you don't want plants, foliage or other such high-detail meshes to be lit by lightmaps, but light probes
The texel invalidity looks so noisy I guess there might be overlapping geometry there too, but most of it would likely be caused by inverted normals
You have to box in your geometry by shadow casters so that no light gets in from the skybox. No post processing or script required.
Skybox lighting is not calculated in realtime, it can only be shadowed by meshes when baking lighting
Yes you are right, it's true for real time but he did not specify what he is using or I missed it 😉
I dont remember by heart is realtime directional goes through back faces, probably does. So boxing in makes sense then
thank you. there are a lot of things im not able to wrap my head around. are there any specific guides i can go though?
hat/tip
What is the best route i should take when it comes to lighting ? realtime gives me bad performance and Baked, gives me year long wait times. I never though that lighting would be the death of me.
I understand i only have two options, but i'm asking about what i could possibly do to make realtime lighting more bearable.
Use less, lower the quality of everything
I'm trying to target low end systems with my game, so that kinda forces me to also bake with my low end GPU, instead of my better one.
Same answer to that for speeding up baking
Bake on the GPU, decrease samples and most importantly lightmap resolution, exclude small and detailed meshes from the bake, and make sure you don't have other stuff in the scene that could cause ballooning bake times such as animated shaders
Not how it works
Baked lighting performance for the user is precisely the same no matter how beefy the machine you use for baking is
Sadly the low end gpu i'm using to build this game, always force unity to fall back to my CPU
You should use the better GPU
Okay
Newer Unity versions also support weaker GPUs for baking
I challenge you spazi! Lightmap resolution is not much of a factor because it does reduce the number of raycasts 😉
Here's the introduction guide https://youtu.be/KJ4fl-KBDR8
Here's the troubleshooting guide https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/
I'm not sure where there's resources for best practices like when to exclude things from bake, when to use probes instead of lightmaps or how to allocate lightmap resolution but I guess those can be learned by practice as well as by scouring though the docs, for forum posts and for more guides
Does not*
I believe it does! From my understanding the raycasts are fired out from each texel
Docs also state that:
Lightmap Resolution: Specifies the number of texels per unit to use for lightmaps. Increasing this value improves lightmap quality, but also increases bake times. Note that doubling this value causes the number of texels to quadruple because it determines both the height and width of the lightmap. See the Occupied texels count in the statistics area of the Lighting window.
And it certainly feels like it does, more so than samples
Ah sorry I understood this as lightmap size, good point 🙂
For a long time I thought the size was the bake resolution, since it is one kind of resolution also!
I stand corrected!
You can cut bake time significantly if you scale down the map and light ranges before baking and revert the scales after baking is done, but then you cant use light probes that way (or maybe you can now, I've never tried it)
On 1:1 scale, my map takes hours to bake, while on 1:10, it only takes a couple of minutes, on CPU, with the same parameters.
[Edit]
That's using enlighten btw, I'm not sure if it also works on progressive
This sounds like a roundabout way to decrease lightmapping resolution, which is relative to unit scale
Okay thanks
I'm having trouble with the light probe volumes. Following the instructions here:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/probevolumes-fixissues.html
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@15.0/manual/probevolumes-use.html
But however, I'm getting a lot of Light Leaks with mixed lightning, whereas with baked lightning mode it's not leaking. Is there some setting somewhere that I am missing to make mixed lightning used the same baked light settings? Should add I've already got the baked global illumination and baked indirect on (using unity 2023.1)
🤔 Could be the case.
But iirc, I ve tried using the lowest lightmap resolution and it still takes more than 1 hour to bake on 1:1 scale
Can you show the two results you are getting?
how can i fix the lightning in this door
(im in a dark room and theres a lighted room in the other side)
maybe an invisible cube or smth?
Is this Realtime or baked?
i guess realtime?
Hm. If you didnt bake the light, its realtime ^^
Does your door have a second side, or is it just this side?
Is the door very thin at the parts where these six ornaments are inset into the door?
let me check
It may help to change the Lighting to "per pixel" if you dont have this right now
Try set Lighting to "per pixel" in your Render Pipeline Settings
Assuming the light has shadow casting enabled, the door is likely too thin, and/or the front and back side of the door aren't geometrically separate enough
where can i find that sry
idk lol
This stuff is easier if you start knowing
URP uses pixel lights by default, and both pixel and vertex lights are limited to max 8
BiRP uses vertex lights for any lights that go above the light limit
Vertex lighting can make shadowing less accurate which could explain the light leaking
I think it's likely that it's shadow bias pushing the light through thin geometry
I'd test with a shadows-only box collider to see if it's possible to thicken the door's shadow just a bit to allow one side to be lit but the other be shadowed
Ok, I realised mixed lighting, meant all objects would still receive direct realtime lighting. I thought mixed lighting would be baked for static gameobjects.
So it's solved or?
Mixed mode lighting is baked as well, but has realtime parts for shadows and specular reflections
Yes, my question is solved, but I'm confused over the baked lighting scenarios for light probe volumes. As the docs seem to imply I should be manually moving geometry/activating lights and then baking each individual light scenario. Seems an awful lot of work without some kind of scripting to help out
How do light scenarios relate to the original problem?
Because I want to be able to turn on and off these baked lights, and I have a lot of these lights. There can be a lot of combinations of lights being on or off and some geometry can move. I was hoping to be able to use light probe volumes for my project, but it's looking less likely
I don't think either probes or lightmap really support those kinds of environments 
Both depend on what the problem is exactly
And what kind of lighting system you're using
Progressive CPU https://i.imgur.com/1kVrxQi.png
Right, can you point to a specific problem? I don't know which one you mean
The walls are all a different shade of gray, and certain parts of the scene is pitch black almost as if its not being rendered
Like the wall all the way at the back of the image
Check lightmap UV overlap and texel validity using scene GI view modes
https://docs.unity3d.com/Manual/GIVis.html
They will likely reveal issues
uhhhhhhh https://i.imgur.com/wPEcUTw.png
Dark grey means that you have not baked during this editor session for this scene so there is no debug data to display
The one above suggests that your meshes don't have proper lightmap UVs, though
The walls are just Unity Cubes
The non-uniform scales are problematic for lightmap UV mapping
And the windows blinds (?) seem especially bad
With default cubes you get no control over their UV mapping in these situations
oh ok
@thorny goblet also you should really use your good GPU for baking that you said you had
GPU hmm tasty
bakes muuch faster than CPU
a pitty i have one that does not let me bake
Like I mentioned before newer unity versions support weaker GPUs for baking
2023.2. as little as 2GB vram if I recall correctly
Ok, i'll start using that
It's a tech stream release so keep backups of your projects
Not quite sure if this post goes here but, does anyone know why these lines are showing up in unity but not in blender and how to fix it? In blender it looks fine, but if I set the image texture to "linear" instead of "closest" in blender then I get the same result in blender as well. Is it possible that unity sets the texture to use "linear" instead of "closest" automatically? My texture that I am using is just a few pixels that range from black to white. Also the blender file and unity prefab are directly related aka when I open the prefab in unity it opens up blender so they are definitely using the same texture.
You need to disable the texture's bilinear filtering (to point / no filter) in texture import settings on unity side
Probably want to disable mip maps too
@deft fiber Do you have an idea how i can achieve a material with transparency but also emission + bloom? Got my Chicken with emission, but i want it to look more like a "ghost" 😄
Maybe your faces on the wall have a "unlit" shader?
You can get emission and bloom just fine with transparent materials, though with alpha blending you may need to compensate brightness for transparency
Additive blending makes it easy to have glowy semitransparency, as it makes the texture act like light
This is vertex lighting
Either pixel lights are disabled in your quality settings, or you've hit the pixel light limit and the remaining lights are falling back to vertex lighting
Premultiply works, additive does nothing.
The graphics quality settings are responsible for that
Thank you, that seems to have fixed the problem!
So, premultiply renders lighting and reflections on the whole surface regardless of alpha, like glass
Additive adds every pixel's color to what's behind it, so white is like bright light while black is invisible
Premultiply should be used only on Lit shaders while additive works best with Unlit
If you want a ghostly effect you may want to use some shader artistry as well, like fresnel effect for the emission, and probably some glowy particles to amplify the appearance of bloom
yeah i was thinking about some particles too ^^
Looks fine with Premultiply now ^^
Is it possible to use Mixed lighting, and exclude certain gameobejcts from baking and make them use realtime lighting?
Anything that's not "contribute GI static" will be excluded from bake and be lit only by realtime and mixed lights as well as light probes
Okay thanks
How big is your scene? 
What means big? .. 😄
100 units? 1000 Unity?
Whats in there?
What are you Baking Settings?
Infos pls
😄
Are you baking with CPU (slow) or with GPU (fast) ?
It's not recommended to use Enlighten over the Progressive lightmapper
I can't give any insight about what the common problems or expected bake times are for Enlighten
Practice baking in small test scenes first
There's so many things to go wrong that you'll want to familiarize yourself with the process to avoid the pitfalls and save time doing so
Spazi is an actual beast in this channel
Hello, I'm back still stuck with the same issue. Same asset, just rotated 180°
I tried to generate Lightmap and and change the resolution and retexturing the model. I can't figure out what's causing the light alteration. 
another lightmap question, am i meant to take the scale down or something? pretty sure i fixed the uv overlaps in blender but after baking it doesnt seem to be the case?
then it creates things like this


Your lightmap uvs look like they overlap. Make sure your 2nd uv channel has unique uv space dedicated to every surface. Don't use unity's "generate lightmap uvs", creating lightmap UVs is a 1 minute job with automatic UV layout tools. Check the lightmap view in the scene tab and the uv overlap debug view from the same dropdown menu.
Interesting warning in your Inspector. Is that level merged into a single mesh? I dont think a single mesh can have more than 1 lightmap assigned but you will have to test. Your resolution is very high indeed at 22.
Only the ceiling is all together
Which is pretty big and uses 3 materials
It may explain the pixelated look, I dont see the lightmap resolution grid on your ceiling. Try cutting it up.
I think your panels at the ceiling are overlapping (did you check this?) or they are very very tiny in your lightmap, so they only get like 1 pixel of light information.
how to bake 2D sprite light in unity ??
If you type in this 1:1 into Google, you get a ton of Information 😄
ya got nothng
even went on yt
Then provide us with more information and possibly some screenshots. That makes it easier to help
its a 2d SPRITE LIGHT
GAME FOR MOBILE
so how t bake a 2d light
I think URP doesn't officially support 2D light baking. Baking 2D lights is more of a complex process because you would have to bake the 2D light into your sprites, which Unity doesn't support as of now. (i think)
should I draw the light in photoshop itself ?
You could do this, yeah!
ok htanks for help
and vbtw
what if the I keep it real time
as its a mobile game ?
Sadly im not familiar with 2D.
Its depending in the amount of Lights.
You can easily deal with a few of them.
oh ok
i imagine you are not looking at 10 of them at a time? So they will be deactivated when you leave the screen where they are shown
4 light in total only
sprite light
That should not be a problem
and if it will, you can just change it later on.
You could fake the light with another sprite that looks like the light and lay it above the other sprites for example. Or paint the light into your sprite like you already said.
hm good idea
Did you try these
#archived-lighting message
Yes I did check and I fixed all of them so I think your right on them being too small
Will try this
I'm having trouble understanding APVs and just light probes in general. With a procedural world generation system something like this wouldn't be able to work because it is precomputed and requires baking right? but afaik, if you bake an apv beforehand and instantiate a prefab above it, would it not work?
if something like the above is not possible, what is the closest I can get to realtime dynamic gl? without using ssgl...
Baked probes pass their lighting information to dynamic objects within their range
That's not usually practical for entire procedural worlds though
is there a way you can instantiate lighting information, or just a way to bake during runtime?
Am I looking for something else or is this just not a thing u can do with unity atm
You can load in sets of pre-baked probes but otherwise no
Thanks, I'll try this
Yes I did
That doesn't really give any new info to work with
It still looks like a normals issue but rule out lightmap UV overlap first
Cool lighting trick
Hey friends! I'm trying to bake my lightmaps using Unity's built-in tool. It works ok, but when I change "Texture Quality" in settings, no matter how high quality I go while baking, "Low" texture quality always results in really bad lightmap. Any way I can prevent texture quality settings affecting my lightmaps? Cheers!
You have it set to low by default in your "player" category in your project settings for your current build target.
I'll check. Changing Texture Resolution in the in-game settings seems to make it look good, it's just when the setting is Low it does this weird compression thing. Would a combination of using Low URP (1/8th texture resolution) with Texture Quality (1/4th) produce this kind of result?
I'm not talking about global texture compression, but your lightmap texture compression specifically. your seems can be an artifact of mipmapping and lack of lightmap padding.
Thank you. I don't know much about mipmapping, is it something I should disable?
Try increasing padding as Sjors suggested, and/or lightmap resolution and bake again, and also check that your mesh lightmap UV generation settings have a minimum lightmap resolution that's at least what you're baking at, and a minimum object scale that's at least as big as your object scale in scene
trying now, thanks @deft fiber @lapis lion . Min Lightmap Resolution and Min Object Scale - are they ok to be bigger? Say, if I'm defaulting at 20, can I set Min Lightmap Resolution to 40 to be safe?
Yes, minimums only clamp the values if you're baking on low resolutions or small objects
Mip mapping is good to keep enabled as it allows you to reduce texture quality, and helps rendering in other ways
Got it, cheers
One last silly question, is Max Lightmap Size of 4096 ok or an overkill? 🙂
I guess it isn't, unless your target platform isn't good at dealing with big textures
Lightmap Size only determines if they get atlased onto a big texture or a bunch of smaller ones
The official guide suggests that a bigger lightmap atlas will take more up more memory, but I'm not sure how if you have just as many pixels with smaller atlases, just with more texture loads
Big textures can be occasionally half-filled, so memory will be wasted.
That makes sense, though in my experience lightmap atlases of all sizes are usually half-filled
Kinda hoping that texture compression knows to skip the repeated empty pixels, but I don't know how it works really
Hardware (GPU) supported block compression formats have fixed compression ratio. There is no dependency of image contents. It is better then uncompressed but still a waste.
I see!
Apparently variable bit rate formats only affect disk size
Doing some test bakes it looks as if the max lightmap size should be really low to force the lightmap not to waste huge amounts of space
Hey guys, after using area lights on my ceiling tile lights, there seems to be some weird things appearing on my walls/materials, and they look like wrinkles. How do I get rid of them? Is it a geometry issue, or material issue?
Compression artifacts, denoising artifacts, or both
Area lights require a lot of samples so the denoiser won't struggle
Which one of these values do I need to change?
maybe you can share your lightmap and directional lightmap debug views from this angle
does look like a filtering issue as Spazi suggests
Hmm, not sure which one you guys need so I'll send more:
I also use all the same settings on my lights
Have you tried with a higher value for direct samples? It's very low. Maybe try 512 there as well and see if it makes any difference.
(basically what Spazi suggests)
Okay thanks! Will post results once it bakes again.
Hmm, there are some visible changes, but It all looked perfectly smooth until it didn't do the compression step... I'm not sure what the issue is anymore. Is there a way to not do compression, or to change the value of the compression?
I suppose clicking on lightmap compression (not in the screenshot) and setting it from highres to none should do the trick..?
The hallway has been fixed, but the room still has weird artifacts on the walls. Not sure what it could be anymore...
what values do your area lights have?
they're all the same value, heres the inspector and the light layout in the room
ok that looks fine. so what you will want to do at your lighting tab, were it says "filtering", you are using auto. set that to advanced and you will be able to set filtering for several lighting stages, you will want to set more aggressive or wider range denoising filter settings for indirect lights.
Hello guys I imported this fbx model to my scene and got these weird shadows. Anyone knows why?
Yes, I'd try that to verify how big of an effect removing compression has
(if you change the compression settings of the lightmap asset directly, you do not need to re-bake)
If the artifacts persist, then I'd disable denoising/filtering, with compression also off that gives you a raw view of where the light rays hit
You said you increased samples, if so how much? I'd bump up direct samples to at least 256
Looks like it could be SSAO
Try disabling it in the renderer asset (assuming you're on URP)
thank you will do that!
thank you it was that and the normals. It was con calculate
anyone knows why my lighing bugs like this
Did you try the shadow blocker mesh as I suggested?
Could try extending one below ground to minimize shadow bias disconnecting the shadows
oh i could try
Does anyone know how to get like a border glow effect like the one in the picture?
I also have curved places where I want it to "glow", so I don't know what to use.
Do you bake lighting? Then you could do it with emission
I'm guessing that I need a separate gameobject down there with the correct shape right?
So that the entire model wouldn't glow
Yep, you can model yourself something that fits behind the doors and give it a material with emission
should give this effect
alright, thanks!
Actually one more question, will I only be able to see it once I bake the lighting?
Well, you see it like a bright gameobject.
After baking, the light should also be visible on the surrounding models, if they are static.
Alright!
Does it matter if the object has the Mesh Renderer on or will the glow effect still be there when it is invisible?
Since if the object is invisible then I believe that the game would run slightly faster
i think it must be on, but you can disable it after bake. Should work
the object has no impact to performance
Okay!
help why is this happening the lighting spreads across walls (photo) when viewed from certain angles even if said wall is out of range
i see nothing weird there
guys i need help
Uhh, there seems to be a problem, I have the emission on and set it to realtime, but no matter how high i set the intensity, anything around it isn't lighting up. I haven't tried using it with baked yet, since I fear baking takes a really long time for me, but surely the realtime thing should work somehow.
yeah fuck no I don't want to bake rn, my project is so small as well why does it take so long?
oh nevermind unity is just lying to me
Still tho, why wouldnt the emission show up in Realtime?
Is the emissive object set to static? And the objects that recieve light from that object need to be static too.
yes, they are
There is no 'real-time' way of emissive objects lighting other things, unless you use raytracing. So you'll need to bake the lightmaps.
what does the "Realtime" do then?
The documentation seems to suggest that it can be done in runtime tho
Hmm. To be honest I did a quick test with GI a year or so ago and really struggled getting things working. A direct light in a GI scene was working OK but no dynamic objects would recieve light, even with probes.
If anyone here knows what could be the problem and how to fix it then please tell me, but I'm going offline for the day soon so I might not respond til' tomorrow.
oh, never mind, I guess realtime only allows for the object it self to be lit and can't illuminate anything when set to 'Runtime'
as you can see my object looks way to bad in the shadow, normal doesnt show
how do i fix tyhis ? i assume it has something to do with lightning
the dark side off the object is also too dark imo
the red is on the wall on the left even though the range only reaches to the bed
looks like your going to have to rely on some other techniques to improve the lighting when in ambient spaces
with your scene lighting are you using the skybox ambient probe?
or just a single flat color
or a gradient?
?
split up the ceiling mesh (as suggested before in here) and still getting the same problem
ive fixed the uvs in blender, rebaked lighting etc still with the same problem
the ceiling is quite large so is there any other way to fix this problem other than sitting there for hours trying to cut it all up into pieces?
will changing the "scale in lightmap" fix anything? or increasing the lightmap size?
there also seems to be some lights that are not being baked properly or something? idk what that is or why
im using bakery to make my lightmaps, it looks great in most of the map but in some parts there are errors like this. Can anyone point me in the right direction into fixing this?
https://media.discordapp.net/attachments/1105135467701223518/1135452822150860880/image.png?width=1342&height=905
That wasn't a reply to you, I don't think
That many slices are problematic for lightmapping
I don't recommend going smaller than one continuous mesh per "room"
I believe the problem was caused in the first place by the geometry seams between your ceiling tiles causing lightmap seams, effectively flooding it with padding pixels
Which means you should use texturing for the ceiling panels and their borders, not different materials and preferably no extra geometry either
What are the properties on those lights that aren't being included in the bake?
There exists a bakery discord, where the developer (Mr. F) answers questions now and then.
When i bake the lightning in my scene everything turns black, it looks fine while baking, but after its done it just turns black
would it be possible to disable global illumination for all baked lighting? wouldn't removing the indirect multiplier on light sources do that?
i know i was just asking about it
What about it specifically?
they do have a little gab between them and all just use 1 texture
same uv maps
By shadow blocker I meant rather "light blocker" or just shadow mesh
Meaning any mesh for the purpose of blocking light, set to "shadows only" in the renderer
Usually cube or block shaped and with smooth normals
Because realtime shadow casting uses "bias" to shrink meshes to prevent self-shadowing, it may in some cases shrink them in the wrong way and cause gaps in the shadow to appear
The gaps between them are the problem
Yes in this case
same as the lights that do
hmm
what do you recommend i do about that? i could delete all the individual tiles, then make a large plane and position it where the tiles are
Yes I'd recommend that, large enough to cover one or two room areas, but probably not like, kilometers long
You can use a grid mesh to repeat a texture multiple times over a surface like this
okay
Then when generating a lightmap for the mesh in the second channel you'll get just one continuous UV region like this
This is what I expect Unity will generate anyhow, you can do it manually too but there's usually no big reason to do so
I guess manually crafting a lightmap UV map devoid of any overlaps or big unnecessary margins could be a solution, but I'd prefer to sidestep the problem entirely and save a bunch of polygons in the process
Wtf is happening?
It seems that when the angular diameter is higher than 1 it starts glitching
Can someone help me fix this lighting bug
found that the moment that i set my sprite material to sprite-default, i can no longer find the lit material, whats going on?
No idea
Can you make a new sprite, copy its lit material and paste into the old one?
can some one help please i cant use baked i wanna know why its doing this
Do you have URP and realtime lights?
this version of the bumper engine does something weird with the lighting, like almost all the shadows are pure black, the regular bumper engine doesn't have this issue, do y'all know how to fix it?
how do I get QualitySettings.shadows to affect shadows in URP? I am setting it at runtime and I cannot figure it out for the life of me. Any help is appreciated.
Never heard of this "bumper engine"
Maybe they have their own support channels
Whenever I try to bake unity gives me a warning saying that some UVs are overlapping. Does that mean that in blender I should leave a little space between each of the faces in UV editor? Or what exactly should I do?
Well, depends on 100 things 😄
What kind of models have overlapping uv?
I think it is this one, and variants of this (it's a display)
do you have prepared a second uv channel for the lightmaps manually?
ah, no wonder 😄
Check "Generate Lightmap UVs" in the import settings of your model
import settings?
if this doesnt help change the Min Lightmap Res. and the Min Object scale by hand.
lol
I have the blender file straight up as a prefab in unity so i dont export/import it
dont know if that matters tho
also sorry, im kinda new to blender
i dont know. Never using Blender files in Unity.
Click on your model in unity and then the inspector should show the import settings.
Down there is "generate lightmap UV"
if you hit this button and apply, it could already be done.
now i just try again and see if the warning comes again?
yep. If it does, you have to manually change these settings
ooh
the number went down from 35 to 13
i guess I have more assets i need to do this to
every model is listed in the console
oh also but is baking light supposed to look like this in the start?
(there are some objects with emission material)
no
okay. then wait
actually what the warnings are still there, guna fix them first
if I do 'Generate UV Lighmaps' does it generate it for all the children too?
since one of the child objects seems to be giving the warning still
If you dont provide a good UV map, you have to generate lightmap uvs for every model.
but i did generate them
.
There you have to type in which resolution you are baking (for example if you are baking with 10texels then write 10 in this field. Anf if your models have a smaller size than 0.5 then write in the minimum size you are using
what does the size contribute to? How high res the baking is?
This setting from your Lightmap is = Minimum Lightmap Resolution.
If you are Baking with more than 20 you dont have to change in in the import settings.
oh shit this is prob because the emission material intensity was on 50
And the transform of your model = min object scale ( you only have to change it, if your model is smaller than 0.5)
everything should have scales of 1 i think
anyways, do i play around with this number until it gets fixed?
@wispy dome Assuming all your meshes have lightmap UV generation enabled, you can also follow the steps here
https://docs.unity3d.com/Manual/ProgressiveLightmapper-UVOverlap.html
nope, you just to have a look how you use your models ^^
If you have a Model that has a scale of 0.3 in your scene, just type in 0.3 in your import settings of this specific model..
And if you bake with 10 Texels then type in 10 into the import settings.
Lightmap preview window and scene view GI draw modes help you locate the UV overlap issues
But it's possible your bake has other issues too
Well, you set it yourself in the lighting settings?
i didnt set anything there yet
yeah no i get i have to change that, idk just to what. imma put it at 10 for now
if you put it at 10, you have to change the import settings for every single model to 10 also.
try 20 , so you dont have to change every model.
and check if you still have overlaps.
If so, follow the guide from spazi
wait hold on this look different from mine
oh you cahnge it there
my bad
but do i keep it on 40 texels in the import settings on the models, or change them to 20 too?
if you bake your lightmap at 40 texels its fine
but i still change the lighting settings to use 20?
Also sorry for this many questions, I have just never done anything like this before
now the amount of overlaps wen from 13 to 26
holy fuck it is 57 now (i forgot to apply the import settings before)
so to answer the question, yes it does
then you have to look on each object and go through this
or ignore it, if you cant see a weird lightmap behaviour
so basically i have to leave a space between each UV thing?
This does the "generate lightmap uv" automatically
what
it is done automatically?
if so then what am i supposed to do? I thought the website told me to do it manually no?
How do I change the draw modes? I couldn't find it
It may help to locate and identify the issue first
And by that I mean it's crucial
yeah i went there, but i didndt find how to change the draw modes
am i supposed to look at them after baking?
or before