#archived-lighting
1 messages · Page 2 of 1
What's an easy way to fix this?
No "easy" one
Look up what those things mean, figure out which one your scene is suffering from, apply fixes suggested by documentation (and optionally by forum posts)
Well, the fixes aren't difficult by any means but you still need to diagnose the problems properly
I see, thanks!
realtime GI
Hm. ok. i never used realtime GI
i'm reading now that unity's "realtime GI" is still basically baked GI, except now that your light sources can move around. your scene objects must still be static 😦
the shadow seems to be going onto the wall but also through it..?
the wall is about 0.3 units thick - is that just too thin?
Your walls seem to cast no shadow
yes that's intentional
How did you do the "walls cast no shadows" thing?
the wall is a gameobject (prefab specifically)
just click on it and you know what I'll show you
set cast shadows to off
How to control baked shadow intensity ? My shadows are too dark at some places
I don't understand why the mixed light shadow strength doesnt change baked shadow intensity
I could use a 2nd directional light but I feel like this should be possible to be handled some other ways
Shadow is the absence of light. You have to add a directional light without shadows, to fill this shadows, if you don’t want them to be to dark.
Because it's a setting under realtime shadows
As Kjarudi said you have to in some way add light where you want there to be light, as the baking process starts with a dark scene and simulates light rays in it
In addition to shadowless (realtime) directional lighting the other options are to give every material their own base color as an emission map with low intensity, or to manually brighten the ambient lighting via probes or cubemaps (a bit tricky if you don't know how the system works)
Hey everyone, is there a way to darken this room entirely while keeping my directional light?
Increase shadow distance, or bake the lighting
thank you
Hi all, is anyone available to hop into a VC suuper quick to help me figure out how directional lighting works in an enclosed space? My lights only work when set to realtime and I'm not sure what is causing this
oh... are there no VCs in this server?
I'm a lighting noob: why does my spot light only work when the mode is set to real time and not when baked?
I'm reasking this because baking the lights using the lighting interface didn't work
How would I go about fixing my shadows? This is the only place they look like this (URP)
I fixed it by lowering the max distance of shadows
Im assuming it just made the shadowmap or whatever able to have higher quality because it could increase the size of faces in it
well, thats my guess
I believe you need to mark it static as well as baked
(or at very least contribute GI static)
This works because shadow resolution is distributed in the shadow distance range
So increasing distance stretches the resolution out, lowering the quality
Shadow cascades can be used to alleviate this for a small overhead performance cost
Cascades let you divide the resolution into regions over distance, so you can have higher resolutions up close and lower resolutions far away, which ideally means you can have a larger shadow distance and visually higher resolution up close where it's needed the most
I set the light to static but as you can see, I still can't see the light
Nothing's been baked
Those sample counts are really overkill
I recommend creating new lighting settings asset to reset to defaults
What does that mean/what do I need to do to fix that?
Hit "generate lighting" to generate lighting
The screenshot was after I pressed "generate lighting"
It still says "No Lightmaps"
You should see a progress bar near the button
And a warning in console if something's off
Note that the level geometry needs to be contribute GI static as well, obviously
Ah ok, I guess it's because I didn't change the level geometry
I'm tryin to bake a simple wall/window onto a ground plane shadow map, but I'm getting this obnoxious noise on the lightmap. Any ideas what is going wrong?
Oh nvm, I think it's a problem with the GPU version... damn the CPU is so damn slow.
very interesting ! Thank you
how do I access HDRP light intensity multiplier in C# script? If I change the light.intensity it ignores the value set in inspector. I want to set the value in inspector using units like lumens, and then control the intensity multiplier using script to flicker it.
Hello, I have a light/shadow question.
As you can see in my screen, I have a "saturn like" planet with a ring.
The sun in the middle is a light, and you can see the shadow on the planet.
My question, how can I get the light through the ring and not blocked?
As you can see on the screen, on the outer side the ring does not receive light
Thanks !
There's no one easy way to do it I think
To best of my knowledge you'd need some kind of material which has extreme normal variance to catch light even from the flipside, or a shader which does albedo translucency
Both with shadow casting off to prevent self-shadowing
Some leaf/vegetation shaders have a similarly desired effect of duplicating the light hitting one side onto the other side
But it's kinda complex stuff in any case
I'm getting this weird lighting, It is supposed to be unlit and yet it's gone buggy
Edit: My Temporary Fix is to turn off Shadows for the Sun
On the MeshRenderer Cast Shadows can be turned off
Hope it helps
I'm trying to get an emissive material to light up the surrounding area, it's not working even though I turned on Realtime GI. The material itself glows, but doesn't effect the environment. Any help would be much appreciated
I'm using HDRP
Are both your emissive object and world objects 'Static'. It should work then.
Realtime GI can achieved either with ray tracing or Enlighten precomputed GI
Both have their own setup process you need to follow carefully
Really weird problem, when I add a canvas to my scene it makes the scene a whole lot darker, no matter where i put it.
Any words of advice ?
Darker how? What kind of canvas element?
Please dont post on multiple channels
You could actually take and remove the messages from all but one channel, its annoying when people waste their time helping on questions that are already answered etc.
sorry I thought that no one is talking here so i posted on another channel then i forgot to delete this one
btw how can I add the Post Processing to the scene
Which rendering pipeline are you using 🤔
Oh and forgot the other one too right?
If you go to www.youtube.com and type "post processing unity" you'll many tutorials on how to do this. You have to figure out which rendering pipeline you're using though, for example, URP or HDRP?
Alright, then there shouldn't be any issues if you find a tutorial that shows how to do it for the URP
i am not using URP
.
What does it say if you go to Project Settings > Graphics?
Hmm, this is a bit above my skill level, but I'm pretty sure you should be working with a render pipeline. You could probably google some info on that.
If there is nothing written, its most likely the "built in" render pipeline
Here's some info https://docs.unity3d.com/Manual/render-pipelines.html
Ah yeah, makes sense.
btw instructions in pinned messages of #💥┃post-processing
oh wait does my emissive object need to be static as well?
I turned it to static and it still doesn't work
nevermind, I've figured this out. Thank you for the help
how i make baked light work
Watching tutorials 😉
This channel is not for teaching the fundametals.
https://www.youtube.com/watch?v=KJ4fl-KBDR8&t=445s&ab_channel=Unity
https://www.youtube.com/watch?v=hMnetI4-dNY&t=2514s&ab_channel=Unity
In this video, we are going to take a look at Lightmapping in Unity 2020.1 to help you create fast and beautiful lighting in your scene.
Learn more about Lightmapping in 2020.1 from our Docs!
https://on.unity.com/2U7VQIX
Interested in the newest Graphics Features we added in 2020.1? Click here!
https://on.unity.com/2GHYGkR
Download the Spaces...
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...
these are great
Hello, i am using Unity 2020.3 and turned on the fog but it does not show up in the build.
Do i need to turn it on somewhere? i am using the Universal Render Pipeline in this project
i dont have damn lighting window
click on window then rendering and then you will see lighting
lighting settings is the window you want
it's just a little differently named but it's the same window
people say there should be bake button inside and there isnt
Baking could also be called Generate
Check if you have a generate lighting button at the bottom of that window
is it supposed to take forever
No
It can take a long time depending on the complexity of your scene.
The amount of objects you have that are static and all that will all influence how long it takes
Doesnt matter, every object that is static will be baked into lightmap
this will be a HUGE one
Yeah, it all depends on how many static objects you mostly have
it doesnt sound more optimal than dynamic light
well, it's better for low end devices since this data will not be calculated at runtime
lol.. lets go and render 100k shadows 😄
This will be a 1 FPS game 😄
you are calculating it right now once to save time during runtime on rendering all the lights
I have a question myself about the fog.
In the editor it's showing up like normal but it's not working in a build.
Is there any other setting i have to change to make it work?
I am using URP and 2020.3
i easily have 30fps with realtime
Did you build your game with high quality settings, or did you choose some low quality, where the fog is disabled?
and my bake is still not done
Then go for realtime. Looks like you dont even care for the benefits of baked lighting ^^
I think the high quality setting is selected i never yet touched the quality settings
that why im doing baking but i dont see why it would take more time than to render itself
while it takes 10mins already
There was a bug in some versions where exponential fogs just didn't work in builds
Try ruling this out by building with linear fog
Baking can take 1 minute or 1 hour.. depending on your settings and the amount of objects and lights.
ok i'll try that
so if i set smaller light angle it will be faster
why cant i just set limit to check only objects 10 meter away from light source
You can mark them as not GI Static if you dont want them to be baked
and they dont get baked
the only static thing i have is floor
and i still have like 10k floor objects for npcs to move on
Do you have a picture to give an idea of what kind of objects they are?
it looks like none of the fog's work
i tried all 3
yeah
It could be something related to shader stripping or deferred rendering path, but these are just stabs in the dark
Haven't heard of fog just totally breaking before
the renderer should be forward since it's 2020
i don't think 2020 URP has the option for deferred only 2021+
wait can i just disable all objects besides lights and then bake
as directional light seem to able generate that way
and can i mark objects in different way than static
as it colliders with navmeshagent baking
you can select individual settings as static
if you click the dropdown near the everything static or something
then you can uncheck some things you don't want in a navmesh
I have a box made up of six 'side' meshes, each separate as the box is destructable. But using HDRP, the light leaks around the 'gaps'between the sides. even though they are touching (even if I overlap them) is there some way to stop this?
Ok i found something with the fog, so my project right now first has a scene where some manager objects are in and then loads the level i test.
I turned on fog in that first scene and now it does show in build
I know what it is
It's because i have multiple scenes loaded and thus the first one overrides everything
baking lighting only affects certain objects?
what if new ones would appear in place of bake
ok so im having issue
normally when i baked with my main game area toggled off
just lighting on
then when i toggled it on i could see everything changing light based on intensivity normally
but for baking lamps i had to turn everything on
and now global light seem to not affect pure black tiles
thought i can cast dynamic light on already baked light
baked light like shader
how i make day night cycle with baked lamps
and non baked sun
You can use lightmap switchers for this or mixed lighting
but then lamps wont work when switching
i wanted something like baked lamps are always on but global light can cast additional light on it
how can i keep this light and allow global light light up these black tiles
You can use an additional directional light without shadows
one what?
i have one directional light
it affects everything except static objects that bake was performed on
how can i allow directional light light up baked objects
i might changed those
as i changed everything to minimum so it manages to bake
as you see it uses same light per tile
like in minecraft
lamp light is good already but i need make directional light and skybox light be able to light up these black tiles as well
where are settings for enabling it
anyoneee
can i make 360 light
so it will light up dark areas
it seem to only light up from up not from sides
and i dont want add 4 more directional lights i feel like it burn
Add some environmental light, if you want to brighten up the whole scene
1 isnt enough
i need to use like 5 to light up every side
and that might burn phones
dude.. Environmental light!
..useless to talk to you, sorry xD
You could just google for "Environmental light" and you would see, that this is not the same as Directional light
thats correct
i need light up parts that are baked already
Then add a Direct light that lights the dark parts and bake again
You can add infinite lights, when you bake them. Makes no difference. Only in the time you need to bake
oh i dont want baked
directional light i want dynamic
because i want day night cycle
that why im baking all lamps on map
lamps - baked
directional light - dynamic
so 5 directional lights might be laggy
i recommend, that you switch to another scene and try it very small..
Add some of your rocks, and a lamp.
Then adjust the Environment Light and bake everything
the environmental light will be baked into the lightmap
Then add one Direct Light (Dynamic) to fake the sun & shadows
you have to bake again if you change something like the environment light
but i never saw enviromental light being included to baking
Thats why i say, test your perfekt light in a scene where you get fast bakes
maybe i have some option off
i do have fast bakes here i have all options to minimum
Show me the Bake Settings
Well.. you should minimum add 2 bounces and a resolution of 5 texels.. otherwise this lightmap does not make any sense ^^
then light get different on same walls
i wanted whole side have same light level
i want make every object not affected by lamp to have exact same light level
this environment light is my only light source in this scene, and its baked into the map. You could use a color you want for everything in your map
Are you looking in reflections?
yes
why?
but i do need bakes for the lamps
you can bake again after this...
ok so now obviously everything has same color because lamp is only light source
but everything is dark as well
and you gave the environmet light a color?
Give it something like Red or Pink to test
switching lightmaps
but im making smooth cycle
it can be blended
if (c.hours == 21)
{
lightt.intensity = 2 - (c.minutes / 60);
}
else if (c.hours == 22)
{
lightt.intensity = 1 - (c.minutes / 60);
}
else if (c.hours == 7)
{
lightt.intensity = (c.minutes / 60);
}
else if (c.hours == 8)
{
lightt.intensity = 1 + (c.minutes / 60);
}```
i had something like this
how i get similar effect
Maybe you should focus on one thing after another ^^
so i make one white lightmap and other gray
You could.
I have to go back to work, cya later
Is there anyone here that is familiar with Bakery lightmapping that would be willing to help me look over my project and figure out what is causing my lighting problems when baking?
does anyone know why I'm getting such bad bakes?
the white is a separate plane mesh and it's still baking bad
the uvs look fine too
I'm even getting bad bakes with just a plane
could it be that my unity is broken?
I made a new project and a cube couldn't even get a good bake
Is this a Unity cube?
no it isn't a unity cube I imported it from blender but the picture of the plane above is a unity plane
I reinstalled unity and still have the issue
Did you check the Unwrap UV Lightmap in the import settings?
What you see there is just a UV problem ov the lightmap
Whats the setting of your light bake?
progressive gpu haven't changed any settings for it
and tried bakery too
enlighten is bad too
Ok, can you give me a screenshot of the lightmap and second: Are the edges of the cube marked as sharp?
Could also be a problem with the normals.
yes I've tried increasing the size
one sec I'll take a pic
yes they are marked
oh sorry I mean no
only seams are marked
idk I just marked them as sharp and tried again but still bad bake
unless I messed up a step
how does it look when you change the debug view to lightmap?
with the resolution checked
Yep.. okay, next thing to test is inceasing the padding in the generate uv setting in the import setting
!
idk if thats the right pic
I just looked in lighting data
also whats weird is unity is telling me I have overlapping uvs for an object but when I go check them in blender there are no overlaps
The Lightmap UVs
the pic above is from unity
check the preview and have a look on the shells of your cube
if they share the same texel they are marked as "overlapped"
they share one texel
ah okay so that bleeds then right?
I did but it got worse
also I don't have the margin method option
but idk if that matters
also I tried making the margins in blender really big and still bad
https://docs.unity3d.com/Manual/ProgressiveLightmapper-UVOverlap.html
Check the "identification" and "solutions" sections carefully
These are only for the texture.
If you activate generate Lightmap UV, Unity created a second UV Channel for the lightmap
you could deactivate generate lightmap UV to use the same UV as for your textures
I'll check those ty, I already did the things in there but i'll read carefully again
The main thing is to increase UV margins with automatic generation and make sure that's working correctly, and that you are using automatic lightmap UV generation, as in the screenshots it was obvious you had almost no margins
The minimum required margin size is relative to lightmap resolution of that object which in turn is relative to that object's lightmap scale
Low texel density causes wider color bleeding
I'm don't have the option to do it automatically
I'm on unity 2019 due to restrctions for game I'm making the assets for
Every editor version has automatic generation
https://docs.unity3d.com/2019.3/Documentation/Manual/LightingGiUvs-GeneratingLightmappingUVs.html
I don't have the setting
do I have to enable it somewhere?
or is it built into the pack margin?
because was assuming that if it was automatic I wouldn't be able to manually adjust the size
You may have to, as instructed by the page I linked
I didn't find any instructions to enable it on the page
also are you sure its for all versions?
here it says new 2020 feature
Please read the materials I am linking you more carefully
but also even if I just need to increase the margins why did the unity plane get bad baking too?
the problem with it might be unrelated but it could also be helping the problem
The documentation is specifically for your version of unity and has big sections about the lightmap margins
The new 2020.1. system is for automatically determining suitable margins
Overlap can happen within a mesh's UVs, or between multiple mesh's UVs on the same lightmap
This is complex stuff, with or without my advice you shouldn't be just skimming the resources you find
I just read through it word for word and it doesn't say anything about automatically generating packed margins
it only explains what they do
if you know where it is please just send a pic
because I didn't find anything in this page about automatic margins
unless you were talking about the lightmap which I already enabled and tried increasing pack margin
when you said "to increase uv margins with automatic generation" I thought you were referring to the automatic uv margin packing
That should fix the overlaps from within a mesh
The UV overlap troubleshoot page suggests increasing the resolution of the whole lightmap
If there's not enough space for the given meshes it may be that it packs them too tight together
The total resolution seems to be running low in general due to how big the overlap blotches are
If all else fails I expect you can do the process of authoring lightmap UVs manually and ensure there are "outer margins" that way
But that again increases the resolution effectively needed on the map for the mesh
its already set to 2k so I can't imagine that such a small scene with only a cube and a plane would need more than that
but I did adjust the pack margin to 15 and the results were better but still for a simple shape like a cube still not great and has some dark edges, more complex objects don't get any benefit from increasing the pack
but it is better so it's an improvement, I guess I'll just have to mess with the margins
how would I manually author lightmaps?
Just like normal UVs, but in the second UV channel with auto-generate turned off in unity
how hard is it? is it similar to uv unwrapping manually?
but also is this related in any way to margins? or is this the lighting not baking properly/not having enough samples/etc?
Same process
Looks that way to me, but you can make sure by checking UV overlap debug view as instructed by the "identification" section of my first link
It may be worth checking the other debug views too, such as "texel invalidity"
https://docs.unity3d.com/Manual/GIVis.html
Well, mainly just UV overlap and texel invalidity are the important ones
could there be uv overlap even if it's a unity plane?
also ty I'll check the validity
Not within the plane obviously, but it may be too close to another mesh on the lightmap
I'm not entirely sure what determines the margins between meshes, besides the overall resolution and how much extra room they have
alright ty I'll try messing with some things
tysm for your time you've helped me out a lot!
"Lightmap padding" in the lightmapping settings is the margin between meshes
hey guys I am posting this here as well, had it posted in HDRP but dont know if this could a good place as well,
this is only happening when I build my project
its 2 terrains
each separeted scene, (multi scene)
any quick thoughts?
when adding a scene via runtime you have to add the lighting sometimes seperatly. Depending on the kind of lighting you use.
the lighting is set up in the main scene
so basicly any texture that is in the 6'th slot of the texture paiting of the terrain does this
Hello. I have a problem with lightning. When I start my scene from scene 1 it looks like image one (The lightning im going for) whereas when i start scene 1 from another scene it looks like image 2. Anyone have an idea why the light from one scene affects another?
Sometimes it helps the thought process when asking the question. If anyone else have a problem with this it can be fixed by going to window-rendering-lightning. Chose the scene with the light you want and create a "new lightning setting". Then scroll to the bottom and hit auto generate. Wait for it to finnish and then it worked (atleast for me).
Thats because you have to bake the ambient probe which is calculated on run when on editor but not saved for later use
👍 someone here has this problem almost every day
Can you elaborate for me or link to the unity docs? It might make the solution better than what i came up with
Baking the ligthmap is the correct solution, i didnt find better resource than this by quick googling: https://docs.unity3d.com/ScriptReference/RenderSettings-ambientProbe.html
I thank you for your answer:) Ty
Baked lightmap is not necessary for generating an ambient probe, only to "generate" lighting with a lighting settings asset, I believe
Yeah ik, thats what i meant, the ambient probe is generated anyways when baking lighting but nothing more than that is baked if theres no static objects etc.
Figured so ^^
I usually recommend ticking off baked lightmapping so they don't start that whole process in case they have static objects
i have a level which has multiple render zones which intersect each other vertically in some places. this isnt a problem in normal gameplay but because all render zones are visible in the editor i cant bake lighting without getting shadows from other areas of the level (which i dont want). any solutions? last i checked u cant bake objects separately and i assume this hasnt changed
anyone know what could be causing a weird bake like this?
there's no overlap but it looks like the bake was really messy
same with me, wtf is up with unity 😠
I've been trying to fix that for like 3 days now lol, I've tried basically everything and the lighting is still blotchy
fuckin hate unity's lighting system
no idea how archviz assets gets his lighting to work
i know my model UVs are correct as well ://
lol yeah same, I gave one of my objects like a quarter of the lightmap and good margins and the lighting is just not good, if it's still a uv thing then I'm surprised
Does lightmap baking always use the first UV set on objects?
it never uses the first UV set
Hello I have made a material with white color and emission with highest intensity but it doesn't act like light, I want to know what i did wrong
Show me the Debug view (texel validity) of your scene.
Unitys lighting system is very good 😄 Mostly its the person infront of the screen that make the mistake 😄 But i feel you. Its hard to find out whats the problem sometimes ^^
Did you bake the light?
yes
Show the lightmap in debug mode
It wasn't tag static, but I am confused now the emission is set as realtime but act as backed backing light takes eternal, in the starting I though emission is low so I made it highest now this is what I get, is there any layman way to do this?
here is the lightmap
Emission intensity like 2 or something should be enough.
Also you can see that your UVs are stetched. Did you generate them in the import settings?
also your Chairs look, as if they have no lightmap uvs
Did you generate Lightmap UVs in the Models import settings?
Hi guys. Let's say I have an asset, a drawer, with both static and dynamic parts to it. The "main body" and the drawers are all part of the same mesh (FBX file) but separated. All the drawers are parented to the main body.
When I import into unity, should I check "Generate lightmap UVs" for that whole mesh, even though only the main body will be marked as static? Will lightmaps only be generated for that main body (and not the drawers which will not be checked "static")?
Hope that makes sense
Only static objects will be lightmapped
Did you bake this?
Which pipeline do you use?
Urp
Your bake is only just in progress here so the visual appearance is unreliable
Nice, thanks
The ceiling has an incorrect normal map, most likely
yeah possibly, looks like every face of the ceiling has a weird normal
Yeah probably it, other texture works fine
Does anyone use magic light probes? Are all your static objects in the same layer?
I do
I'm going through the quick start guide and it says "In real scenes, you need to select the layers in which your static geometry is located, use the drop-down list for this." which I didn't know was a condition for it to work.
At this point I have many many static objects in the scene their not all in the same layer
Have you made sure all you're static objects are all in the same layer?
Oh god damn it, haha, my mistake, you can pick mulitple layers in the drop down 😂
hahaha. wow. sometimes I'm wuite dumb
quite
Never used layers for MLP
I see
It's set on default, I guess all your static objects has been in the default layer
I just create an MLP Gameobject in the MLP Manager Tool and place it in the scene, generate the probes and thats it ^^
right 😄 maybe i'm complicating things unnecessarily
Either way, thanks for your help!
I have been having this problem for a long time does anyone have an idea of whats going on here? I have tried almost everything
the lighting is so off the walls all have their own shadows and the ground is split in squares for some reason
Is it baked? Do you have generated Lightmap UVs in the import settings?
yes I have baked it multiple times tweaked it each time always ends up looking something like this
also Im not quite sure what you mean by lightmap UVs sorry im a little new to lighting in unity
Show me the lightmap in the debug view pls 🙂
Like here
oh yeah that tab ill send it quickly
this is what it looks like
okay I think I see the problem as well now, its those lines that split the wallls isnt it?
the UVs are completely messed up?
Nope, they are fine.
oh really?
So..
- show me the import settings of your ground tiles.
- Lightmapper settings
okay give me one second
firstly the lightmapping settings
and the import settings
outch
its a model I made in blender
yeah big numbers I tried making it a lot smaller
I tried using 1024 lightmap size resolution way lower it didn't really change much
i send you some settings, wait a sec
alright thank you man
How big is your scene? it looks massive in the preview
so this area that you can walk around in is about 60meters x 60 meters
and there are maybe 40 lights?
I took the actually area lights out and stuck to an emission texture
also this is all done in URP
I tried it in HDRP but its even worse there
Im going to talk in the thread so we dont take anymore space here
Yes, but it also stayed in the final result. I've baked like 30 times yesterday and I knew it was going to turn out bad, so i just took a screenshot in the middle
Check viewport debug views for texel invalidity and UV overlap problems
Do smaller test bakes with some default cubes first to confirm you can get baking working at all
Okay I just have one more question if that's okay, Is it possible to use real-time spotlights on game objects with baked lightmaps?
Sure
wait you can??
It just adds light onto it
because I tried making a flashlight with a spotlight on the end and the light just did nothing only reflected off of the corner of the walls and acted really weird
As we already said, when something is behaving weird, try it in another scene to find out, what the problem could be
yeah i'm currently doing that right now i'm just going to do testing and fixing it
👍🏻
anyone know why this happens? if i let it finish my entire map is pure white and black
im just trying to get something half decent to start with
I have never seen this 😄
really...i swear i've had to deal with this several times
did you check all the debug views?
like what
maybe its overlap
overlap normally look different.. it should not create a black/white visual
did you generate the uv map correctly in the import settings of the model?
it happens to the terrain too tho
What happens if you just take the water part there with the statues and put it into a new scene and bake the light?
the water is pretty simple idk if it's causing any issues
alright this is a finished like bake
how is that even possible
wow
the unlit stuff in the back have screwed up colors/lighting too
How does the Lightmap Debug look like
this one?
there is a debug view whats called lightmap or something
"baked Lightmap"
looks better.. but what are this weird lines above the wateR?
ah. okay
idk if this helps but my map looks like hell after i clear lighting data too, until i change the reflection probe intensity
this is what they look like, if i change them at all the lighting goes back to normal
it's set to realtime instead of bake cause i thought that might be an issue
And the "Texel Validity" Debug View look also okay?
im not really sure what these are supposed to look like
You deleted the lightmap, so it has no infos there
oh
it could be texel invalidity.. but i think it would not infect the whole scene.
https://forum.unity.com/threads/faq-blocky-artifacts-appear-when-i-bake-a-scene-how-can-i-fix-them.951444/
only if your terrain is fked up
yeah
I have walls that intersect in an interior scene, there cause these dark edges no matter how I change the lights
in the scene, I'm sure I am doing something wrong but not sure what that is right now. Has anyone come across this lighting issue?
Could be something Ambient occlusion like or to low lightmap resolution, or overlapping UVs.
It also can be wrong normals of your room. But I think it’s more a resolution thing, because the shadows behind your pictures is also very blurry.
Does anyone know why parts of this model I have are black after lightmapping (I use bakery in this case)
Pics of unshaded view for reference
For some reason im baking lighting for a large map and it took 3 hours, once it got to 0, it said Baking and then 30 seconds, and then Baking, and then 30 seconds again, its been doing this over and over
Are the models static? Did you add bakery scripts to the lights?
Yes and yes, the generate uv option is also on, it seems to be just my light intensity, however it still is a bit weird, i can't really get the results that i want
Also i dont know how to explain this but sometimes when i press ctrl+s to save or do some other action such as tweak area light intensity it changes the brightness of the scene by a little bit somehow
And i get this "shadow" on the left side despite me not even using directional lights for this or anything like that
seems to be environment light from the skybox with environment lighting set to colour mode instead of skybox it still does that though
Are you sure you baked any light? ^^
fixed by turning off multiple importance
@chilly kettle It was the 'Intensity' and 'Radius' properties in the Universal Render Data that were off. After making some adjustments its looking fine. Thanks
What is multiple importance ^^
setting in the lighting tab is all i know about it
Trying to get good looking lighting in this scene I'm making. The bottom of this pool has an emissive texture. Is there a way to make it so the rim around the pool isn't so dark? I have 4-8 bounces in my bake settings. Do I need more?
if I turn off SSR, you can see some of it is completely black
What kind of material properties do the surfaces have?
If they're very smooth, the light won't scatter so much to areas which aren't facing any light
even with a smoothness of 0.5 it still doesn't change anything about the rim of the pool
it's also a completely enclosed interior so there isn't much for the light to bounce into
settings
How can I go about making the lighting better on the enemy without ruining the dungeon crawler/dark effect I'm going for?
Some more Emission on the eyes and a little bloom?
That only really helps show off the purple part of him, I was looking to get the rest of him illuminated a bit. Maybe just a weak spotlight/point light?
Maybe just a brighter texture? Or add an overall emission to hin. Just very low. Or is he not moving? Then you could add a light
I ended up using a spotlight for the moment during combat, looks okay but I'll come back to it later when I'm looking to polish stuff
I have a problem with lightmap data getting corrupted when entering playmode
Before play mode - 1st pic
After - 2nd pic
I am not sure what was it but i created a new scene and copied the model over, regenerated lightmap and it is fine now, maybe something got corrupted as it happened after i made a change to the model in blender
help, in the scene tab the light shows up, but in the game tab, or when testing, it doesn't
hey, i just want to say im an amateur when it comes to lighting , most things i did are from online tutorials,
my problem is the inside of the building textures looks really weird and not visible,this are my current light config, what im i doing wrong?
i change envirenment lighting Source from color to Skybox it looks better but there is this weird blue color tint applied to all objects, is there is a way i can edit that tint out?
The interiors are in shadow
Shadows are lit by Environment Lighting
The "weird blue tint" is from the blue of the sky
Nothing is "wrong"
i can only access Environment Lighting by changing color, is there is any other way?
is there is any way i can change the blue from the skybox? i want to keep the lighting but not the color
Try "gradient"
helped, thanks alot
It'd be nice if interiors could be shadowed from ambient light but for dynamic geometry that's practically impossible without ray tracing, and even for static geometry it requires precomputing of some sort
gradient worked alot better than with color, so i will settle with it for now, thanks again
my 2D shadows look like this for some reason
I've increased the shadow resolution to its max
this is unity 2020.3 LTS using the URP 10.10
anyone have a fix?
why this wall in the right appear black, while it is the same color to the one in front fyi I have baked the lights and added a area light faced toward the walls it didn't worked on the right hand side wall
I've looked online for answers, but haven't found anything that's quite what I'm looking for. Basically, I'm looking for the light blue part of the material to be unlit, to look like it's glowing.
I'm using the texture file below, where the light blue glowy bits are the 4 light blue color swatches on the right. I'm unsure what the best way is to have multiple effects on a model like this.
I'd ideally love if I could have this take a single material, if that's possible.
could just mask it with vertex color into the emission slot
or use the alpha channel of your texture to represent that mask
You want your light blue insets glow? or everything lightblue glowing?
I'm just looking for the light blue insets to glow. And by glow, I don't mean actually emitting light onto their surroundings, just being unlit, so shadows can't be cast onto the light blue parts, and they'll effectively glow in the dark.
the easiest way would be to use a second material for the insets.
Basically, I use this color palate for a lot of objects in my game, and having a single color palate material allows me to easily swap out certain colors (like switching the glow color to light green instead of light blue) by just changing the material of the object. Which is why I'd like to keep it at one material, as it just keeps my systems simpler.
In this case, you have to write a custom shader with vertex color like @tepid minnow said i think.
Alright, I'll look into that
could use the red channel of vertex color, then just take your color from the textures multiply it bu vcol.r then feed that into the emission
I've already posted this but no one replied sooooo
help, in the scene tab the light shows up, but in the game tab, or when testing, it doesn't
Make another texture with just the glowy bits (other parts black), use that texture as the emission map
I ended up making my first ever custom shader, where the glowing parts of the texture are at 50% opacity, and it'll render anything at 50% opacity as glowing
It may not be the cleanest solution, but it works, so y'know
yay!
Here's the before and after, if anyone is curious
gj
It's simple, but makes it feel way more polished
why this wall in the right appear black, while it is the same color to the one in front which is cream white fyi I have baked the lights and added a area light faced toward the walls it didn't worked on the right hand side wall
At first glance it looks like the side of that wall is not being drawn and the object is transparent. Maybe due to the face normal being the wrong way. Are these walls just cubes?
Can you show us the debug lightmap view?
By debug mode you mean baked light map right!!
Hmm. Strange. It's difficult to tell from just the pictures. It could be lots of different things.
Has the wall been UV mapped properly, and is the material on the wall the same as the others? That kind of thing.
Material is same to the wall infront, what do you mean by uv mapped is this about baking lights then yes i baked the lights
I mean, did you make this wall in a modelling program or is it just a normal cube? If it's an imported model, you can select the model in your Project folder and click the Generate Lightmap UVs.
It's an imported model, okay I check on this
With my interior lighting, I've found that shiny objects don't seem to have a specular highlight like they usually would. They have a slight reflection as expected by it's hard to tell they're actually shiny objects at first glance.
I assume this is because the environment is only lit by emission and not actual lights? Should I switch to area lights etc for baking?
Baked lights don't show up in reflections (mixed lights might, I don't recall the specifics)
Baked lights rely on reflection probes for specular reflections
Hard to see presence or absence of reflections in that image
I recommend testing using spheres with various chrome materials, with SSR turned off without the blistering over-exposure
I have an issue where my lightmaps render correctly in editor, but when I build to Android, lightmaps do not render, light probes however to seem to still be functioning. Any ideas why?
seems bakery has an option for my issue
is urp good or what should i use for lighting
Depends.
well i dont know anything about lighting so i cant
i cant give any more info
except tht i work in 3d
Take a look at this for more information https://docs.unity.cn/2022.1/Documentation/Manual/BestPracticeLightingPipelines.html
Than you have other tasks to do before you care for lighting 🙂
i know but i want to learn lighting im learning right now
ty
URP is easier, because you have not so many physical correct lights i would say
But HDRP give more realistic results
Why does my spot light seem to get cut off at a certain distance?
I upgraded the project from 2022.1.3f1 to 2023.1.0a6
everything is fine except the whole game got darker. any idea? before and after in the pic
Maybe clear lighting data and generate again?
Im not sure how unity handles Planes with a double sided material.
Is the lightmap applied with the same brightness on both sided? i think so, right?
bcause its the same UV
Yes
https://docs.unity3d.com/ScriptReference/Material-doubleSidedGI.html docs to the rescue ^^
Backface rendering is kind of weird as they seem to copy realtime lighting of the valid side likewise
yeah, i saw this on my grass where i just used x-crossed planes.. and the backside always look a little different 😄
I have a spaceship where u can walk around in and still fly so the object isnt marked as static, is there a way i can have baked interior lights on my ship, considering none of the lights move relative to the ship?
Just bake it while its static and remove the static after the bake ^^
oh, that makes sense 😄 , thanks
please help,I don't have baked lightning anyways, it's auto-generating and it's still darker than other pic
Looks like something changed with the ambient probe
I'd chalk it up to alpha/beta editors and upgrade weirdness
Unpredictable stuff can happen with them
I am in desperate need of help with 3D lighting
Is there a way to render baked lightmaps to a prefab? If not, how do I procedurally generate a 3D scene and still have baked lightmaps?
Baked lighting only works on static objects, so you'll need to place your prefabs in the scene first, then bake. You can't really a procedurally generated scene at runtime, then bake it.
Alternatively, you can bake the ambient light onto the model in Blender and just use the texture for all prefabs. It depends on what kind of lighting you want really.
Hmm, I didn't think of using Blender. Basically I'm just having fun trying to make a randomly generated Backrooms level. So I've tried a bunch of different ways to make the office fluorescent lights. But I'm generating it in 30x30m sections, so I just don't know what the best solution is for lighting.
Hey, is there a way to get rid of the bright spots where my light is, but keep the overall brightness of the light the same?
Like can i somehow change the lighting "Curve" (im on urp)
This requires HDR lighting and post processing tonemapping
Linear color space helps as well
After that there's many options for controlling lighting via post processing volume overrides, such as "color curves"
https://github.com/Ayfel/PrefabLightmapping
This supposedly works
But even if lightmaps are in prefabs, the seams between them can be a problem
Hey, question: How do i make a material be a certain colour, no matter the scene light or shadows. My case: i wont this yellow bar to be pure yellow on all sides
Use a unlit shader
Thanks a lot got it
👍🏻
Why there are black marks downside on the wall, is it because of lights?
@chilly kettle help please
do you have something in the texel validity debug view?
looks like it https://forum.unity.com/threads/faq-blocky-artifacts-appear-when-i-bake-a-scene-how-can-i-fix-them.951444/
Thanks
did you fix it?
Here goes a question: I created a terrain, textured it and put some trees down on it. I want my game to take place at night aswell. Once i crank down the skybox lighting multiplier to something like 0.25 or 0.5, everything goes dark except the painted trees which just remain as they were at "daytime".
Is there some way to get the trees to adapt to lighting other than placing them manually?
Thanks!
Show us some screenshots from the trees, the inspector, their material
Material of the trees pls.. maybe they have an unlit shader
you may change to a lit shader
there are several different shaders in unity
u can use a standard/lit shader, but you may need to assign the textures again.
Or your Tree asset comes with a lit shader which you can use
No actually this is the texel invalidity, I have changed the material to render both but it didn't helped, what should I do now? The Tree I am using is imported can edit it's material
⚠️ I have dynamic lighting from sun. if I enable occulision culling, those objects which are not drawn stop casting shadows.
is there a solid and performant solution for this issue? I can't be the only one encountering this 
You can copy imported materials and edit those
Did that no difference, what else I can do to make it right?
That is the correct solution
Then what I did wrong? my all materials are rendered both side what else can I do
I have a pretty interesting one:
In order to get more of a 2.5 look, I'm using custom projection matrix to put a skew on my camera (to make vertical surfaces take up more screen space)
One of the (several) issues I'm having is that shadows disappear when they're outside of the normal ortho camera bounds, even though they're rendered with my custom projection matrix.
Am I taking the totally wrong approach to this? Is there a way to tell Unity, "hey, render shadows outside of what should be viewable by the camera prism!"
How can I reduce lightmap convergence and size?
There is one more "add Lightmap Parameter and change the value of Backface tolerance" as every material in URP is set to rendered both side by default
Backface tolerance would reduce the artifacts from exposed backfaces, but if your materials are two-sided there shouldn't be exposed backfaces
I totally don't understand that but thanks for your support
Tried all the lighting, enviroment, and material settings. The only thing that affected the shadow was alpha. But i wish to keep the crystals transparent :/
After reading forums, guess the only option is to use soft, or just disable shadows
Which render pipeline is this and what shader is the crystal using?
I'm making a solar system but if I use a point light at the Sun, it ends up with the inner planets blindingly bright and/or the outer ones pitch black. Any ideas how to make it more even?
I assume you use URP or HDRP am I correct? Both uses inverse square fall-off which means light intensity decreases very rapidly when distance increases, that's how it works in real life too. id just make custom shader for the planets to simulate the lighting the way I want, that requires some basic understanding of shaders tho (that's not a surprise as all the lighting in unity is calculated using shaders)
HDR tonemapping helps as well to make the differences between dark and light less drastic
enabling double sided shadows for the trees could help, also decreasing the normal bias could help but it can cause some other shadow artifacts (shadow acne)
Both seem to work with the current setup yeah, but I guess I will need some testing once I have more objects
Thanks!! n.n
Tell me pls how to make an object invisible, but obj have a shadow?
You can set the Cast Shadows option to Shadows Only from the Mesh Renderer
does anyone know why whenever I bake my lights it just gets stuck at GI preprocessing. This is on a new project so its default settings on everything and I only have 3 objects in the scene. I also have these 3 warning messages which I suspect are the cause but Im new to unity and dont know how to fix them
Show the Lightmapper Settings and the Inspector of the objects written in the console
i tried disabling it and for some reason now it shows this error message after I render the lights
Assertion failed on expression: 'm_PendingLightmapHashes.size() == m_LightmapCompositeHashes.size()'
hmm.. i have no clue..
i fixed it I just cleared the GI cache
Hello! im trying to do something rather tricky and would like to know if its even possible in unity
my goal is to copy the exact light and shadow result from A to B
I would really appreciate if anyone could help me out with that 😅
hi, want to ask if there is a way to modify luminance of a light source (in nits/ apostilbs) in unity? thanks
Is lightmapping on cpu or gpu the fastest?
GPU
:0 ty
Does anyone know if Emissive Materials count towards lighting? I'm having an issue where with only 3-4 scene lights I'm getting glitching when looking in certain areas.
Nope
Hmm..
As it stands, I have all of my spot/point lights set to Low Shadow Quality, I have 4 cascades turned on in URP's Renderer, I've bumped up the Shadow Resolution, Shadow Atlas Resolution and Cookie Atlas Resolution in the Renderer to 4096 to the point where I don't get any lighting warnings in the console anymore. I have 4x flashlights in the game that I can pick up that are located in a small closed space, when I turn them all on and start looking certain ways the space lights start turning off.
"Additional lights per object limit" is the only relevant setting to that problem
The default value of 4 may still be in effect if this quality asset isn't actually active
I can confirm it's definitely the active one. I confirmed this by turning the Render Scale all the way down while I was in Play Mode and it did go pixel-y.
That's good
"per object" means per mesh, so if you have a big house model, all its geometry share the limit
Well for the house all of the parts are separate, it's not one mesh
I haven't experienced any lighting issues up until now to be fair. It seems like things only started happening once I was building my own UV, which ultimately just toggles on another Spot Light with a cookie.
UV?
UV Light
Ah
For that, the purple torch throws out a SphereCast with a layerMask, if it hits it, toggle the cookie light.
Still, sounds like a textbook example of mesh object falling inside too many light ranges
One of the few times I can recall that wasn't the case with those symptoms was when there was a custom lighting asset involved
So there's a light attached to the back of the player with shadows disabled, there's two point lights in the truck which provides the primary illumination, there's four flashlights, so naturally, 4 spot lights, that would put the count to 7 near that area
I could probably mark lights as important but I'd rather avoid that if I can
@deft fiber I managed to fix it. I'm not sure why I did this but the rendering was set to deferred, not forward.
Now I'm just having an issue with light bleeding between the meshes.
Deferred rendering is designed to avoid the light limit problem entirely so I'm not sure why it isn't the other way around
Yeah I do remember playing with lighting a little before and I'm surprised it works with forward and not deferred.
"Light bleeding" with realtime lights happens usually if there's no shadow casting to stop the light
Yeah, unfortunately in this case shadow casting is turned on for all of the room lights.
Who knows, maybe that works in inverse as well 😄
Haha nope! I've spent many-a-hours trying to fix it.
I believe combining meshes can fix it though, so I'm trying a resource from the store at the minute to see if that does it.
Why do you suppose that?
I read something that, by combining meshes you're pretty much eliminating any way that lights can manage to fit through any cracks that would cause bleeding.
If and only if the geometry is joined by merging vertices
What type of "light bleeding" is it anyway?
Combining meshes didn't work unfortunately, like you said. Or at least it doesn't merge any vertices.
I don't see any evidence of shadow casting here
In that situation I would try to confirm that shadow casting works with any mesh at all
There's light reaching under the table without casting any shadows, so that suggests there's also a shadowless light illuminating that room and probably the next rooms over
hey - total noob here
developing for low-end mobile devices here
am noticing some gains if i switch from "Lit" to "Unlit" shader on many props in scene which are static and are not moving anywhere
is there something like "baking" to bake whatever these objects would have looked like with Lit shader - to bake that in advance and leave them with the more performant "Unlit" shader?
Question about light baking.
I want to switch between two different baked lighting maps (there's a part where the lights switch off, and my scene is fully lit by only emissive materials). I know this is possible, but I'm not sure if light probes will respond to this change?
https://forum.unity.com/threads/solved-changing-lightmap-at-runtime.492830/ seems that its possible with the script posted in this thread
Have a look on the "Magic Lightmap Switcher" Asset.
Unlit shader cant contain any light.
If you bake the light with a lit shader, its also performant.
@thorn flower Baked Lit shader already does that to an extent that's practical
Though there's no system for it it would be possible to save all apparent lighting to an unlit texture, but in most cases it would end up looking really weird
A huge portion of lighting is dependent on viewpoint, such as specularity and fresnel, which cannot be correctly saved to a texture
Unless the viewpoint never changes, but at that point you could save that part of the level to a static image in the style of the original Resident Evil
Is there a way to make a light not cast shadows but not go through meshes?
Not really
If a mesh can block or occlude a light, that would result in a shadow of some sort, right?
Yeah
welp seems like I'll have to implement the lighting system the tutorial i was following has
Light layers are useful for blocking light in one room appearing in the adjacent room
ahh... didnt realize that...
this that is ☝️
i thought the result of the URP/Lit shader is possible to fully bake onto a model, but i dont know the first thing about 3D lighting so if there's anything about a lighting shader which dynamically shades different based on angle / viewpoint then ye forget about it
is there a way to light/brighten an individual object?
it would seem layers and a culling mask is the answer
can someone help with lights baking
i want every tile to have exact same level of light from every side
with the exception of tiles that are in range of lamp
Use Environment Light and only your lamps for additional light.
every tile has random light then
and i wanted all of them stay same unless near lamp
they dont look baked
show me import settings of the tiles
where that
Let me google that for you
The Unity Manual helps you learn and use the Unity engine. With the Unity engine you can create 2D and 3D games, apps and experiences.
a im using default unity light
???
i want to see the import settings of the tile, not of the lightmap ^^
Thats the texture 😄
I mean the Mesh / 3D Model
default unity quad
no idea how to access it i double click but dont show anythingh
okay. default unity quad has no import settings
for some other tiles i use default unity cube but it has same broken light
And your Baking Settings?
Well. Try it with Lightmap size like 1024 and a Resolution of 40
aw hour long generation
You should Bake with GPU (unless you dont have one 😄 )
Nope
because these have regular light
To have a simulation of baked light on dynamic objects you use Light Probes
Or bake them static and set them dynamic after bake
baking currently visible dynamic light would be best
because it affect all objects and dont have random light problems
it all dirty now
not looking as good as dynamic light
light look very smooth hoever
but i dont want light difference between static and non static objects
i noticed it gets better when i set higher enviromental samples
but it automatically gets darker when tile is next to wall
how i not make it darker then
i tried everything is there real no way of baking everything with same light level
is there any way of setting light bounce to 0 and still light up meshes
as they always get black then
how to fix <333 ? ?
something with transparency ? full alpha it not occur
Only happens in fog
disappears when closer
Try the Render Queue in the Material. Could help
For future reference this issue happens when lightmap resolution is so low that the padding between meshes consumes all their space on the lightmap so your tiles end up with a lightmap UV scale of 0
That's normally not a problem, but it's hard to guess all that could be wrong with your lighting settings
I tried increase/decrease no change :\
Change sky color to match fog color
no matter what color I change sky, it has no effect on windows :\
No fog
just to confirm, unity will use the second UV map for lightmap baking, correct?
Hey guys, quick question. How do I go about making it so only one point light is visible on one certain camera?
I set the Layer of the Point Light to LIGHT, and removed the LIGHT layer from the Culling Mask of the Main Camera - I figured that might of been enough but it doesn't seem to be working as expected when looking through the secondary. I'm not sure if it makes a difference or not that I'm using the Secondary Camera as a Render Texture through the First Camera.
For reference.
Well, i think it should work as you said
I figured it would too. I saw someone similar online say it wasn't working for them either and it came down to the conclusion that Unity's URP ignores layers for lights in particular.
Then you should test it with two simple cameras and two lights in a simple scene to figure out WHAT the problem in your scene is.
a bit of a new question but when baking lighting, is there any way to fully see lighting changes you make to lighting sources or do you have to generate lighting to see the full visual change?
normally you bake with low texel density when trying out things.
You could also hit the auto generate checkmark, to let unity bake automatically when changing things.
And if you are happy with the result higher the texel resolution and make a final bake
thank you!
Hello, Im having some issues with lightning on my 3d game. My game works perfect when i play each scene separetly but for some reason, when I try to play from the main menu every single scene becomes darker than it is. And it is worse when I play it from the build
How can i fix it?
You load a scene to your main scene?
what do you mean?
Do you load a scene to your main scene? 😄
or how do you change scenes while playing?
with a script that changes me to the next scene
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
tysm
Google first Entry.. 😄
i searched it and i found nothing
It says that if I play from the build that shouldnt happen
but it happens from some reason
well, this thread is 6 years old.
Check if this does what you want
https://www.youtube.com/watch?v=8-oXE2NWSLM
Hey everyone, this is just another quick fix tutorial showing how to deal with the lighting in Unity. In this video, I will show you how to fix the lighting in unity when loading to another scene and that scene comes out dark.
of course the scene i spend the most time on has the worst issues with baking 
letting generate lightmap UVs looks awful. Making them myself in Blender looks awful
trying to do different iterations with different settings is awful because it takes 5 minutes for it to finish baking
fun fun fun
if anyone has any idea on what I can do to make this easier (yes I have turned down resolution on my bakes for previewing. yes I am rendering with my GPU - my RTX 2080)
what exactly looks aweful?
And how does your scene look when baked?
i mean i posted an image
lol
thats what it looks like baked.
Well, thats not what normal bakes look like xD
Do you set them to static? 😄
yes
What are your light sources?
Its weird because i see no shadows or something 😄
Emissive materials.
which are emissive?
sky texture and the lights
every other scene I have has baked fine with no lights and just emissive materials
all objects I want to have baked lighting have second UV maps for lightmaps. for example:
Well.. hard to tell.
So whats the difference between your scenes?
They have complete different style. Do you use some asset store props in your scene where the light is not working?
a weird shader? or something?
what happens if you put some of your models from the weird scene to the good scene and bake it?
try to figure out where the problem is.
apart from the water objects which aren't marked to be used with baked lighting
yeah props (like this slide) seem to render fine in the other environments
looks better
recommended margin for baked light map UVs? I'm having a lot of seam issues
how to fix 333
You shouldn't have UV seams between every quad
Trying to fit in margins for all of them is impossible
thats.. just how lightmap unwrap works?
Yea
I can't think of any practical use for it in an asset creation workflow
literally everything I see about making UVs for lightmap purposes tells me to use lightmap unwrap.
And you saw the problem it creates
Having the mesh littered with UV seams is bad for more reasons than just that, too
so what else am I supposed to do?
Usually it's perfectly adequate to let unity auto-generate lightmap UVs
If you must make them manually you could use smart unwrap or even better unwrap manually
where can I find 2d point light? there is no 2d point light in the lightning part
nvm they rename it
add lights with shadows and post processing
also bake the lighting for best results, there will be gorgeous light bouncing
Idk if I can bake
Lights
I've done that (also I'm 90% sure unity autogenerated lightmap UVs use lightmap unwrap) and it looked awful, hence why I'm doing it manually. I've literally never heard of anyone saying that you should be using smart UV/manual UV unwrap in lieu of lightmap unwrap
Unity's lightmap UV generation is very much different from Blender's
It's based on angle, instead of naively tiling all quads together
Indeed considering Unity has no concept of quads
The lightmap UVs can be perfectly fine and it can still end up looking messed up due to a number of other problems, such as wrong object scale, UVs that don't fit the total lightmap resolution or margins that are too small/big
Or problems entirely unrelated to UVs
Is there an easy way for culled mesh to still cast shadows?
OK nevermind, setting the mesh renderer lighting cast shadows option to two sides fixed the issue. Just need to figure out how to not get this weird not shadow area just next to the wall.
One solution suggested by Unity is to shrink the UV map a little but it's a bit of a hassle to handle floor tiling this way
Found again, Slope Scale Depth Bias on my directional light fixed the issue too, nice 😄
you bake the lighting information
you have to set the mode to baked , set it to mixed if you also want it to cast realtime shadows on moving objects
You'll want to use "shadows only" box meshes (preferably with smooth normals) which would have some extra thickness to prevent light leaking
This type of light leaking is not related to UVs at all, but rather how shadow casting renders mesh geometry less connected than it visually appears
If the light leaking is happening specifically in baked lighthmapping specifically because there's no margins between UV islands, then changing UV size would help
i ment that i don't know if i can bake light due to my computers specs
it dosnt matter, it might just take a little longer
plus, you can always lower your baked lightmap res to make it faster
i have an integrated iris plus
i have never heard of that
im on a laptop
here, on the lighting window
i used to bake high res lightmaps on a 10yo laptop in urp, it dosnt matter
is there a way to disable texture filtering on shadows?
Would anyone like to assist me in fixing my lighting as it seems no point lights or pretty much every other light besides directional doesn't work.
Put the details here, (screenshots help) so we can all see what the issue might be. Let us know what pipeline you're using too (LWRP, URP, HDRP)
URP
Uh I can get in a call but thats the thing I have no idea what to take screenshot of
I've been at this for several hours with no help from google
No point doing a call because I might not be able to help and it'll be a waste of both our time. Take a screenshot your Unity editor where you have selected a light that isn't working as you expect.
If you're baking and there is no light map showing, are your objects set to Static and your light set to Mixed or Baked?
After the bake, can you see anything in the debug 'Baked lightmap' view? You might have to increase the lightmap expose to see the lit parts.
dubug Lightmap View ?
What am I looking for here
It should show you a sort of black and white image of your baked map, i.e. the lit and shadow parts.
If you just have a single spot light, try increasing the power of it, and maybe increase it's range too. Bake again and see if you can see any effect.
Also, use that slider to increase the expose of the lightmap as the lightmap might be really weak and can't be seen clearly.
But if your light is set to Bake and your objects are set to static, there shouldn't by any issue. The texel density on your meshes look a bit odd, but that shouldn't be the reason for no light showing.
Texel density?
Yeah, don't worry about that at the moment. Can you increase the intensity of the light to 400 and increase the range to 30, then re-bake? Just want to see it 'some' light appears.
Done\
And did you see any light in the lightmap?
d
Is only lighting the acid under the ramp
That's really weird
the only light on any thing else are the reflections on the ramp
I don't know why it wont light anything else though
pain
is this important There are 1 objects in the Scene with overlapping UV's. Please see the details list below or use the 'UV Overlap' visualisation mode in the Scene View or Lightmaps in Lighting Settings for more information.
- default: 267 texels
I think I might have fixed it I changed my model from fbx to obj and seems to fix the problem
Okay, so i was told to use area lights to make my windows look more realistic, but my area light on my emissive object, isn't emitting any type of light.
Could any other type of light work?
If you're using URP, area lights are baked only.
ok
You could also use a directional light to simulate light coming through the window too. That will work in real-time and baked.
But you need to update your window objects so the light can pass through.
Overlapping UV's are important on baked lightmaps as it can lead to incorrect shows being applied to models. For example, if you had a model of table and the top and bottom of that table had overlapping UV's then you would find that underside which should all be shadow might have light artefacts on it, and the top of the table might have shadow artefacts.
When you imported the Obj file, maybe Unity recalculated the lightmap UVs for you. You can manually do this if you select the model in your Project window and in the inspector select the Model tab and scroll to the near the bottom of the properties. There's a Generate lightmap UVs option in there.
Turn off "cast shadows" in mesh renderer component
If I turn it off, the frame won't cast shadow either.
In the end I found the option under Alpha Clipping -> Use Shadow Threshold which allowed me to only hide the glass part of the window, thanks 😉
Only downside is this option seems to use alpha from the texture only, but my texture is actually fully opaque and it's the color which makes the glass transparent. But that's ok for my use case
I would separate the frame and pane meshes
Yes, that's one solution indeed
what could cause black boxes randomly popping up on screen? It happens when I add a lot of light sources, it's kind of annoying
any idea why?
I believe this happens in hdrp when using forward rendering, due to light limits per object per screen "tile"
any idea how to fix it? I wouldn't really want to decrease the current graphics level I have
