#archived-lighting
1 messages · Page 70 of 1
Usually yes
Does anyone know why my shadows are getting cut off in the bottom left and bottom right only in game view?
I'm just using the default in scene directional light. I have changed all of the settings on it, but none of them fix the shadows.
If I change it to a point light, the shadow is correct. Even if I make a new directional light, it makes the same shadows
Scene view has the shadows correct as well
Seems like shadow max distance is set too low
@upper fable Where is that setting located? I'm not seeing that anywhere on my camera, preferences, or light
Depends on render pipeline. Google will tell u
How many point lights is too many point lights? I'd love to go wild with the built-in lights, but what's the most common threshold in a given scene that starts affecting performance
Seems like a fog
It depends on the platform but you dont want to have dozens of lights lighting single object. If you want a lot of lights, you may want to take a look at deferred rendering
Hi. Is there any way of just baking shadows please?
or at least a way of baking a bit faster please? It says it will take 10 days.. 😦
Hey guys, got this bleeding/artefact issues when using baked GI. Scoured the unity forums trying all their fixes but still have the issue. Got any recommendations ? (screen below is baked lightmap scene view)
here's my lightmap settings
mesh import settings
and as you can see packing margin is pretty big
hi! does anyone know where this is in unity 2021? i've already got all the necessary render assets set up but i still can't find this
this picture is from unity 2020
window>rendering>render pipeline converter
oh! let me have a try
im assuming i have to change it to 2d urp?
If you want to convert from built-in to 2D urp then choose that option
awesome i'll give it a try thanks!
any idea what i'm doing wrong here? global light colour doesnt seem to be adjustable
When I need to bake fast (like, for testing maybe), I usually bake at scaled down level. Like put the whole level in one parent and scale down the parent by 0.1
But you'll also need to scale all non-directional static light distance by the same scale.
Note that this wont work with lightprobes and reflections.
Oh, and dont forget to return the world scale back to 1 after baking done of course
okay thanks for the tip
also, idk if this is related to light or not, but do you know if it's possible to remove the reflections from the terrain please?
I've never seen reflection on terrain actually, do you have any screenshot just to make sure it's reflection?
this thing
it is very annoying because it is all over the terrain
It looks like specular, try lowering smoothness in your terrain material if there's one
there's nothing in the material settings, because it has to be a terrain lit material type in order for the textures to work
there are a bunch of people that have asked that before, but no one seemed to answer
How about go to your texture importer setting and set alpha source to none or grayscale?
Nope, after applying nothing changed (sorry for taking so long, it crashed twice)
hey guys, so i tried using this projector to cast this drawing on a flat cube ( i'm shooting for a prerendered background )
and the image quality looks pretty rough.
this is the original
like on unity i can barely see the lines, they get erased
i'm trying to mess with the far clip plane but not much luck, it still looks kinda rough
Does someone have an Idea how i could Bake LOD Objects correctly?
I was thinking about disabling the "Cast Shadows" in the Low-Detail version and bake them together?
Is there a best-practice way to do it?
looks not really great 😄 i think its because light baking dont care about the shaders alpha value of the leaves
Added a Skylight now. Looks way better. But the shadows are horrible ^^ Any Ideas?
have you tried this ⬇️ ? https://forum.unity.com/threads/shader-graph-alpha-testing-issue-with-selection-outline-shader-and-lightmapping.712925/ it seems light mapper doesn't care of the shader but rather uses some basic properties of the material/shader which has to be named properly (I believe it just uses the alpha from the main texture then so you can't have complicated shader logic calculating the alpha value which doesn't seem like problem in your case)
What shaders are you using? You need to plug something into _TransparencyLM for the lightmapper
Using a Shadergraph
Not sure if you can do that with Shadergraph. PLM needs a _TransparencyLM texture property to let how much light to go through transparent meshes.
and the _TransparencyLM would be the alpha of the base texture?
Yes, but instead of black and white you could also use a bit of color if you want slightly colored shadows
(so the leaves could be a very very dark green or something instead of pure black)
Hard to say how it can work with shadergraph. Plugging it into the alpha doesnt do it
Can you add shader properties in shadergraph? If you can, just add a texture property called _TransparencyLM
Why some of my walls are pure white like that i know its something with the lights
You can. But what do i do with the property "_TransparencyLM"
Add a texture to it that is white where you want light to go through and anything else where you want less light to go through
and i multiply it to the alpha or something?
Mhh. Not sure, if this works in Shadergraph. As far as i know you have to plug everything in somewhere
No you don’t
It’s just so the Lightmapper reads the property
PLM looks for that name
It’s a stupid concept, but hey, that’s most of Unity
😄
If I recall correctly, I fixed this by adding black to the alpha channel of the albedo. The terrain shader reads smoothness from the albedo alpha. Simply disabling the alpha didn't work. It seems if no alpha is provided a default value is set such that you get the effect in your picture.
To verify, hover over the texture slots in the terrain material. The tooltip describes how the RGBA channels are used.
I edited the texture using gimp.
Could be related to mip maps? It helped with a similar issue for UI sprites.
Hey i've been using URP for my unity project but i'm getting messages in the console I don't normally get and now the lighting is being really weird. Anyone know why this is happening?
Knowing what the console messages are would help a lot
It seems youre having too many too high resolution shadows maps to fit in the shadow atlas. Try to increase the shadow atlas size from urp asset or decrease the individual light shadow resolution
that worked tysm!
thank you!
Does anyone know how to make the scene pitch black in Unity 2021.3.2f1? All the old methods don't work anymore :(
(urp)
don't crosspost
Done
Whole screen or single object?
This is the scene and this is it with color adjustments - I've been using them to simulate "fake" shadows.
All the objects use this shadow caster
And as another thing, anyone know why this is happening with some objects (these are two seperate objects)
It only ever renders a shadow of one of them
not both
help is very much appreciated - all the youtube tutorials are outdated and none of them work
at least, none that i could find anyway
(just saying again, this is using universal render pipeline)
update on this, sorry, they don't use the "self shadows" setting so you can see surfaces that are lit up
and the lights are at 2x intensity - no bloom
uh
anyone know a fix? for some reason it's glowing weirdly
is this just a thing with transparent materials?
I've been messing with these values for... 2 days now i think, And i cannot get it to look normal / not such a harsh change at such a short distance. increasing the distance to 1000 yields the very same result. i dont know how to do it, does anyone know?
What do you get if you spread the cascades out more evenly like this?
Every cascade twice as wide as the last one has given the best results in pretty much all situations for me
at what max distance value?
Mine is 27 but that's always situational to scene scale
The power of two distribution should be the exact same in percentages
well, roughly power of two
i dont have this Last Border setting
I don't think it matters in this situation
It only affects how the shadows fade out at the very limit
power of 2 rule does look better yea, though i can still see the line in which it changes from high def to lesser def, but it is further away now. is that normal?
Yea
some of my foilage loses its shadows so thats what makes it obvious
You could try tweaking depth and normal bias to try to get low-resolution shadows to better hit the thin geometry
Though those are a bit of a hit or miss
Do you think the settings you provided are good for all quality settings? (low through to "ultra" ?)
These cascades are usually the best for all situations and quality levels
However, if the quality level changes shadow distance, the physical distance of cascades changes also, so if you want to keep the cascades at fixed positions regardless of total distance you'd have to use the metric units and copy the specific values
But that's not usually necessary
Since we don't have fading between cascades in URP it's never going to be totally perfect
Another thing that may just help with the foliage is their texture's import settings
this part specifically
if it's not enabled, foliage can start "shrinking" over distance, thus casting less shadows as well
Alpha cutoff value can be tweaked to compensate
I see, thank you 🙂
Do you know how to create / simulate shadows for this scene?
I dont think I know
Does anyone know how to use the new 2D lighting?
Anyone?
imported a model and got this lighting error
i don't even know how
i just think it's a unity moment imo
it's probably just super emissive and post processing (bloom) is making it super glowy. try to disable post processing and make new material that's not that emissive for the object (you can then enable post processing again when you have confirmed it's post processing that's causing the issue). the automatic fbx/obj/whatever importer isn't very good at importing shaders (or rather the file format doesn't save enough information of the shader ig)
oh okay, thanks!
and while i'm at it, any reason why this happens?
is it just the area light that's causing the problem?
does that disappear too if you disable bloom pp effect?
nope
for some reason, after switching my project to use URP, my lighting has gone completely whack. A problem im facing now is the players spotlight ignores any object in the scene, and goes right through them.
https://i.gyazo.com/9264fcf6355dfa7759d02484ec55a0d6.mp4
ive tried searching for answers on the web, with no success.
this is the spotlight settings
the objects mesh renderers in the scene have cast shadows set to on
I have been working on a scene that a soldier is shining a light in a field in the night, but the light seems way too dim for its settings. Does anyone know an answer other than adjusting range or intensity? (I tried both of them) I am also using URP.
figured it out. Cast shadows wasnt enabled in the URP asset settings
ok so i got the objects to cast shadows, but now something even worse is happening.
why would a light clip through objects only at an angle?
I ended up using volumetric lighting effects, and it works for me. Thank you though!
I've got this problem too
except i can't make it all dark
how did you do that again?
i disabled the directional light, and tweaked the environmental lighting settings
i also removed the skybox from SkyboxMaterial , and changed the camera's clearflags to Solid Color
thatll make the whole scene pitch black
what version of unity are you using?
the new one?
idk, maybe it can only render one shadow at a time or fails at close range
im making a game almost exactly like that but side scrolling
the person has a flashlight so i've got the exact same issue
this is the game
and some examples of weird lighting and shadows
2020.3
i just resorted to using the built-in pipeline for now
i wont break my brain for more than a day trying to fix the main mechanic to my game when im only prototyping
does it have post processing?
yes, you can install it from the package manager, though its not as intuitive as what you get with the URP
hmmm
i might stick with urp
ill just use color correction to make normal lighiting dark
then i can use shadows
one thing i noticed, is that any object without materials wont let light clip through it
how can I make a certain area of my scene dark while the rest is lit? I.e. a graveyard in a mostly sunny map
reduce the skybox/ ambient reflection to like 0 or similar low number , enclose the area.
That doesnt work if the area needs to be seen dark from further distance too
This really depends on how dark it needs to be compared to the rest of the scene and whether the graveyard needs to be viewed together with the rest of the world
Hey does anyone know why I'm getting these artifacts when I bake my lighting using high settings?
the white squares on the ceiling and the pink/blackish thing on the floor
if I bake using low settings/not a lot of bounces etc, I don't get these
The artifacts don't appear in the baked lightmap view either?
Preview mode? The "preview" in the name means that the GPU lightmapper isn't bug free enough for them to recommend it for production use
So make a sphere around it, attach a script that changes the light settings within the area?
It hasnt been acting so bad
hi, i have a problem when i look somewhere , light is not the same that when i look at an other point
sorry if my english is bad
and ping me pls
Too many lights affecting the mesh
Look into "pixel light limit per object"
where is it?
By "look into" I mean search for info on the internet
...
It's a complex issue
In some render pipelines you can't increase the light limit by much, and if you can you probably shouldn't because it gets expensive to render
So for that there are better solutions like limiting light ranges, dividing meshes or even switching to deferred rendering
ok
That's why you should find more detailed instructions how to implement the potential fixes and when they're appropriate
ok thanks
Hey there i got a question about my Ambient Occlusion not Effecting my Grass Textures when its in Billboard mode.
I'm using unitys URP and setup a working Post Processing (well at least for all the imported meshes besides the grass textures)
So: I've imported a 1024x1024 Texture and set the Alpha is Transparency to true.
I went to Unitys Terrain Editor's "Paint Details" Tab and added the Texture in and gave it a color. Now when i check Billboard, my Setup Ambient Occlusion does not effect the grasspatches at all as seen in the Screenshot - no matter how Much it turn it up
Whenever i turn off Billboard tho, it instantly gets the right effects. As seen in the 2nd Screenshot. Any ideas?
Billboard on
Billboard off
I'm really out of ideas here - tried looking through the entire settings of my forward renderer - tried looking on google/Youtube for a video covering the entirety of adding different grass but didnt really find anything regarding AO in urp
Hopefully i posted this in the right channel - if not please notify me and ill remove it immediately 🙂 Thanks for reading through
Why am I getting a Max Atlas Size error if I increase my scale in lightmap from 16 to 32?
As you can see the object isn't even taking up half the lightmap at 16. So it should still fit at 32.
And I can increase it to 24, but the size of the polygons in the lightmap doesn't change in the preview when I do that, which makes no sense.
Unless I have to re-bake my lighting to see the change?
Refreshing the checker in Bakery is equivalent to re-baking the scene, but faster so I just tried that with it set to 24 and it got a bit larger, but it doesn't seem like its fully 1.5x the size, and there's still plenty of room for it to grow but of course the error is still there.
Here I have ignored the error and set it to 64, and it got as large as I'd expect it to be at 32, but it's still not filling the whole lightmap.
Setting it to 128 does get it to finally take up the entire lightmap, but still... Why the error? The lightmap size in Unity's lightmapper settings and bakery's are both set to 4096. The object is scaled, but that should not make a difference, because clearly that is not impacting the size of the object in the lightmap to such a degree that it does not fit at those smaller sizes.
chance is the billboard grass doesnt write to zbuffer properly (if not at all), and AO use zbuffer to determine which area is darker/occluded
I keep having this issue with my baseboards, like the one along the left side of the stairs here, where some of the polygons aren't lightmapped properly:
The thing you should be looking at here is how a couple vertical strips there have no checkerboard pattern on them.
If it were mapped properly, I'd expect there to be light and dark stripes as on the polygons directly adjacent to them.
It's not just this one baseboard either, it's happening all over the house. I've even baked all the scale and rotation information into the model when exporting it to blender so all my objects have a scale of 1.0, but it still happens.
any advice on how to fix something like this im using bakery to bake my lighting and i seem to have no luck with couchs always having black spots
That looks like the shadows from the pillows on the right are being repeated. Perhaps your lightmap UV's are repeating (outside the 0..1 range) when you created them in your 3D package? That shouldn't be able to happen if you checked generate lightmap UVs on import so you would have to have modeled it that way.
i generated a new uv lightmap and it kinda fixed it besides a few spots
Is there a way to use the LOD system in unity without having the LOD group component?
I have an object that can be destroyed which enables another gameObject but without lighting data.
I'm using bakery and it supports LOD light baking. So it would be nice to use LOD's for that object so the lighting gets baked on both objects.
But I do not want the LOD group behavior that changes according ot the camera distance
Does anyone know why my light is behaving this way? I used spotlight since it illustrates the problem the best, but every light type has the same problem with a hard edge on one direction in world space https://gyazo.com/6e8c72d8948d08435abc25d20f7e24db
Hi, how can I make this edges smooth? Not this flat
Recalculate may not work if edges are split already
Ok, thanks
any reason why this is happening? I have a pink light that covers the entire white thing but why is the lightmapping issues only affecting around the sign?
found the issue, the lighting was bouncing between the sign and the white banner millions of times causing that effect, changing the sign to non-static solved it
define "things"
is the light source making that shadow moving along the camera? shadows shouldn't really change depending on the camera angle if the light isn't moving
Hey I got a little problem with my lighting. I wanted to put some point lights into my scene but some lights seem to disappear from certain angles/distances and reappear sometimes
Sounds like too low per pixel light count
I now know why it was like that
Im using URP and it only allows 8 point lights I think
With forward rendering yes, thats true. Deferred rendering doesnt have any limit and the upcoming forward+ (no idea when it will be released) should have a lot higher light count than regular forward render path
So you have to use deferred if you need more than 8 point lights atm
ah okay and how can I use deferred rendering?
I think you can enable it from the camera. Deferred rendering is quite new feature, you need unity 2021 in order to use it
oh... I have Unity 2020 xD
is it a good idea to use the newer version on my project with the older version?
You can upgrade to newer version. Make sure to make backup before that in case you get some problems with the newer version. 2021 is the latest lts version so it should be production ready
@spice storm Instead of upgrading your other option is to decrease light ranges, reduce their number and cut environment meshes into smaller slices so that the amount of lights affecting any one mesh is as low as possible
How do I disable my material from being visible in no light?
this is how I am trying to do things and it doesn't look how I want it because the light isn't working properly
because I want the scene to fade out with no light
but it won't really work because its still visible at the absence of light
I think I asked this question long ago, no one seemed to know though
So is it possible to have like a room, bake lights in it, make it into a prefab and still have the light map on it?
You still have the skybox
Remove that in light settings
All threads I've found on google seem to link back to this
https://github.com/Ayfel/PrefabLightmapping
Never tried it but guess it works
Oh nice, alright thanks
Does someone know a Tutorial or Documentation, how to bake lighting for LOD Objects?
My low-res LODs are very dark like its getting shadowed from the high-res one
looks good from near, but bad from far away, when the LOD kicks in.
I don't have much experience with lightmapping for LODs, but here's some official documentation on the topic: https://docs.unity3d.com/Manual/LODForBakedGI.html
I use the prefablightmapdata script, it should still work with unity 2020
Hi, is there any solution to those lights in the other room reflecting through the wall to my shelves? (HDRP)
Just like this, these lights in the hall still traveling through the wall to the reflective floor.
You have to enable shadows to prevent that
@upper fable it doesn't work.
Really? Does that make any difference?
Maybe the shadow near plane is too high and he shadows leak through the walls?
It isn't about the shadow, I'm trying to get the reflection not to go through the wall.
baking reflection probes might help with that
or maybe using screen-space reflections
do you have reflection probes in the scene?
I have been trying to get the Screen Space Reflection but couldn't because it says "The HDRP asset does not support SSR"
Yes, I have a Reflect Probe in the specific area but never got it to work. Am I missing something?
what's the issue specifically?
There are 3 lights in the hall that I couldn't eliminate the visible reflections on the floor in the dark room with Reflection Probe.
When I mess with Reflection Probe > Render Settings > Light Layer Default and then adjust the Multiplier under it, it only darkens/lighten the room but the reflections still exist.
@tough wolf I just adjusted the light range after you mentioned it and it does work a bit better, kinda hoping to keep it as is since it pops the hall :/
Separated Light Layers?
Looking into that now
Hi all
I'm trying to achieve these:
- Day/night
- Moon phase (variable intensity of baked night lights)
- 3D camera (means gotta handle very far vision)
Possible solutions for each (and the hurdle):
-
Lightmap blending with Magic Lightmap Switcher(MLS) (but only supports blending in 1 factor. Rotational and/or intensity, but not rotational AND intensity blending additively to handle all moon phase scenario. Also moon phase directional offsets along the month, MLS can't have multiple additive lighting scenario)
-
Enviro (but it doesn't have LM blends. There is MLS integration with Enviro but... Enviro side haven't replied to some questions yet)
-
Far distance shadows is generally solved with baked LM (but LM variations via blending or Enviro has some limitations too)
Anyone got experience trying to achieve something similar?
I really don't mind low res quality, not aiming for photorealistic. Just wondering if these 3 is possible together
Hello, yes it is possible, in some way
to make a day/night cycle, just use Mathf.Lerp to interpolate smoothly and slowly between day and night settings, you know, changing the light's intensity, etc...
For the moon phase, i don't think baked lightmaps can be variable and changed at runtime, but for the visual aspect of the moon, you can use sprite animations
For the very far camera
you can increase the camera's far clip plane
does anyone know why unity is not generating realtime lightmaps?
I've tried setting all lights to realtime, all reflection probes to realtime, unmarking everything as static, clearing and rebaking lightmaps, I can't get it to work
did you enable enlighten realtime GI in "scene" lighting tab?
then press bak
bake
MLS can blend between lightmaps
This is what shadows do, they block reflected light
both diffuse and specular
These are realtime lights, not baked?
why am I getting all these lighting artifacts
the baked map looks fine..
I already generated lightmap UV's for my models
the floor is a unity standard plane too and it also appears on that.
The floor seems way brighter here than everything else, and almost entirely lacking shadows?
true
Did you check texel invalidity debug view?
Also, do they appear on CPU baking or just GPU baking
just GPU baking, so i guess ill just have to settle with CPU baking, but man thats sooooo much slower
also what debug view?
Right after baking you can use viewport modes to debug lighting
https://docs.unity3d.com/2022.2/Documentation/Manual/GIVis.html
(the info will be lost if you close the editor, until you bake again)
Only final bakes need to be accurate and look good, so you can use low samples for temp bakes, and/or GPU baking and just live with the artifacts until the final one
That said, I think there's something wrong with your floor in general
The baked map doesn't look "fine" to me
But that's another thing you can use the debug views to investigate
I'm a beginner at this, anybody know why? (not sure what word to said)
If you mean those shadow artefacts, thats called "shadow acne"
Im doing a final bake on CPU right now as the GPU preview has those artifacts
And since my lighting settings are quite extreme , its gonna take a while
But its been stuck at 0% for the past 10 minutes
Doesnt seem to give an ETA
so im not sure if its actually baking
Hi! I am building my level in blender and sometimes i have these strange artifacts when light is baked. No mesh import settings have effect. My UV's are overlapping but it does not seem to be a problem. I use progressive gpu. Using enlighten lightmapper brings a good result but my whole scene can not be baked with it (my pc and baking freezes)
i have a question, why do too many lightning scources cause all the lights to flicker
Because youre running out of pixel lights. You can change Pixel Light Count from quality settings
Allright thank you!
this could be a very newbie question but, how can I fix this
the light "bleeding" thought 0 width gap
You can also enable two sided shadows from the mesh renderer
I can't seem to fix it, spending hours 😢
the weird thing that it only happen when I entered playmode
You have to increase the bias values
Thats interesting… have you tried completely disabling all shadows? That way you can make sure shadows are the problem
yes I just did, it look normal when I set the directional light to no shadow
sorry for the low quality (it have artifacts in Hard Shadow as well)
Did you setup cascading shadows to your preferences?
I left it at "default" when creating the project, not sure anything wrong or not
You can tweak them and see the effect real time, try switching around
That and bias settings on the light what creates/responsible for banding like that
switching between Shadowmask & Distance Shadowmask seem to fix it (Idk what are they atm)
#archived-lighting message
#archived-lighting message
so by tweaking Light -> Soft Shadows -> Realtime Shadows -> Normal Bias make the problem transiting between this
I have no idea how to fix...
Did you try using two sided shadows to fix the first issue?
I'll test it now since it doesn't available on Progressive GPU lightmapper
@upper fable so anyway, it didn't fix anything
Don't have 0 width gaps
simple
Shadows must always be "smaller" than the object they're being cast, otherwise the shadow can be seen on the sunny side
like this
The bias settings control the thickness of the shadows being cast
Also, edges with sharp normals are seen as 0 width edges by the shadow casting
just add another block/cube/mesh into the corners to block the light 😄
so then you can fix the shadow banding by adjusting the normal bias without worrying the light leakage
0.1
anybody know how to fix this weird shadow? and to make the merged mesh looks like its former self (meshes put all around the warehouse)
Hi Thorsman!
I asked about reflection probe rotation way back in April, and our team has recently upgraded to Unity 2021.3 and URP 12.1.6. You mentioned that it was possible in URP 12 to rotate a probe, however, I'm unable to set up the reflection probe in the way that you showed in your paint over of my example.
I have the probe set to 'box projection' but when I try to rotate it to fit the bounds of the building, nothing changes. I've got to be missing something and I'm hoping that you might still be able to help me with this 🙂
Seems I've been mistaken and you cannot actually rotate reflection probes, even with box projection enabled, sorry about that....But I think I have a solution to your problem after reading the documents and I cant believe I didnt think of this before. use the culling mask option. Assign anything surrounding your building (outside) a layer and then on the reflection prob inside your building cull that layer.
Ah, shucks. I don't think the culling option would work for my situation, if I only have one probe for the interior. Since the probe still extends beyond the bounds of the building, there are still are few areas where the interior reflections are being picked up instead of the "global" exterior probe.
It seems like I'll have to go with a few smaller probes for interiors, and try to have their bounds not extend too far beyond the walls. At least probe blending is working in URP 12, haha!
Thanks for replying! I really appreciate your help 🙂
I mean it shouldnt? if the exterior is on a layer and is being culled by the interior reflection probe, nothing on that exterior layer should be effected by the interior reflection probe
@modest patio https://forum.unity.com/threads/2021-reflection-probe-blending-in-urp.1121632/#post-7581529
This person seems to have been able to do, but they modified URP somehow, which is far beyond my abilities 😄
for what reason if the NEAR of the camera is low (let's say 0.3), and the FAR is high (in my case from 400 and above approximately), do the shadows tremble?
URP | 2D | Unity 2021.2.2f1 | Shadows
In my scene you can see shadows that disappear, and i desperately need you to tell me why, and how to disable/fix it.
For some reason, the first light will disable all shadows when main camera is outside its radius (something makes the light a main light for some reason).
The second light disables shadow of an object when the center of that object is outside the light radius.
The video is almost necessary to watch, its really hard to describe.
Feel free to DM me! 👍
How can I make a section of a map appear dark?
put a tree in it so it gets some shade
haha it depends how you want to do it. You could just turn down the intensity of the directional light if you're using one
How do I make bakes faster, It says about 11 hours to complete when I have an RTX 3060
lower the direct/indirect samples, make sure it's set to using the GPU not CPU. There are bugs where sometimes it resets to using the CPU.
lower the quality in general
give up, switch to realtime lighting
buy an RTX 3090, wonder why it still takes forever
I got the last 3060
for 750€, now it's 500€
So you can guess the answer to getting an RTX 3090 in half of 2022
what I gathered from this video was that baked lighting just isn't really feasible for larger games--not saying yours is, but just his 2 cents https://www.youtube.com/watch?v=kML67qB9Chk
Making huge games in unity can quickly lead to problems - hopefully this video can help you to avoid them.
Links:
CrossScene Reference / GUID Based Reference:
https://github.com/Unity-Technologies/guid-based-reference
Material Property Override:
https://github.com/Unity-Technologies/FPSSample/tree/master/Assets/Tools/MaterialPropertyOverrid...
anyone tried using a flare in URP? I've followed the tutorial and checked that scene lighting is enable, but I cannot see the flare. I opened a fresh project and still no flare. https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@13.1/manual/shared/lens-flare/lens-flare-component.html
Theres a working flare in urp samples package
Thanks for the tip, I opened up the lens flare sample scene and saw this
These are my pipeline settings
oh, it's showing up in game window but not scene window
Enable post processing/shaders
cool that fixed it for my other scene. Is it only visible in game window?
No
Hi all
Reduced additional punctual light shadows resolution by 16 to make 209 shadow maps fit in the 4096x4096 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame
Can baked lightmaps have realtime shadows? If so, these shadows is part of this shadow atlas?
Or is shadow atlas only about realtime shadow and i got it mixed up?
I plan to use Shadowmask bake
..Also i'm pretty new to lighting so this is a lot of terminologies/mechanics i'm not fully getting it yet. Oh also i recently switched to URP
I do have a lot of lights in total in the scene (spread out), i plan to use those for baked, but baked means no shadow?
Would Mixed work?
Realtime lights use shadow atlases, baked lights use lightmaps
Shadowmasks are ways to mix baked and realtime shadows when using mixed lights
https://docs.unity3d.com/Manual/LightingInUnity.html
All the terminology is explained in these pages
Halo
So shadow atlas and baked lightmaps are stored differently?
I'm just trying to get rid of the debug logs above. Switching all my scene lights either all to realtime, mixed or baked still pops the same error
I'm trying to maintain the amount of lights but reduce the quality to get rid of those logs, but no matter which settings i lowered this log still shows with roughly the same numbers (only affected by how many lights are on the scene view)
Oh actually i think it's Shadow Resolution Tiers.. i guess i just found it
Is it normal to need obscenely high intensities for lights in URP? Even just to get this moderate amount of light on these buildings here I need over 100,000 intensity
Are the buildings in real world scale?
The most common cause for that problem would be that the world compared to the lights is huge
If i split my game to multi scene, does that mean i can have as big of a lightmap in total?
Shadowmask tex is also per scene and can be multiple if using multi scene?
Anyone knows the answer for this please
Yes, the light is about 20 units above the ground here. So, nothing out of the ordinary then? I'll just have to use very large intensities for this?
It doesn't seem ordinary to me, usually light intensities in 1-10 range are plenty enough for most purposes
The only causes I could think of would be a really big off-scale scene, or really dim post processing exposure
The scene is quite big, I believe it's in feet and it's about 2500 quare units. It could be the post processing exposure thing? How would I check or edit that?
Overall scene size wouldn't matter as long as you're aware of the actual scales of objects and distances between them, 20 isn't a lot
Here's what 200 intensity, 35 range point light probably should look like at 20 units above the ground
Exposure is set in post processing volume in "color adjustments" override
You should be able to disable the override to get a "neutral" view
Have you upgraded the project's editor or changed pipelines? That sometimes can cause weirdness
the normal map in my project was working in the past but now it doesnt work anymore.. any ideas?
(2D URP)
In the past but not recently. I'll try that post processing thing when I get to the office in an hour or two
No post-processing on the scene at all. Another issue: Metallic materials seem to just be lit always. There are no lights in this scene at all, I've turned off the skybox lighting in the lighting settings and gone indoors. Shouldn't this be pitch dark?
I feel like there's some sort of global illumination settings I'm missing that might be the cause of all of this
It looks like you still have ambient lighting
Make sure environment light source is set to a black color to fully disable it
If I use Unity to generate lightmap UVs, will they always come out the same? Assuming settings are kept the same? if not, I'd have to rebake everything.. Unity's lightmap generator is deterministic, right?
that makes it unusable, doesn't it?
well generate lightmap uvs helps, but because the uv for the lightmap is changed, it will look wrong
i only know about the uv part of your question
so i have this ship in unity, and its shader is derived from URP/lit, but lighting has not effect on it
how do i fix this?
ive tried going through my graphics settings, the lighting menu, everything appears to be set up properly
i dont think its the shader on the ship, i added a standerd 3d ball and that didnt have lighting applied to it iether
these walls are giving me a headache
i have generate uvs on for the models
and i have this on https://everybody.wants.solutions/snap_402181a1.png
but for some reason they just look awful
also, in my lighting window, it says i have 0 non-directional light maps, even though my scene contains a spot light and an area light?
Hey @cloud wing unrelated but it's the first thing I noticed, how did you get your windows/light sources to look kinda faded/overexposed?
bloom :)
On the post processing?
I was playing with that but can't seem to get decent results.
Set threshold to 1, decrease the intensity and try different scatter values
I would assume they're deterministic as long as all the objects remain the same
But if you test it I'd like to hear the results
I have been unknowningly testing, it seems to be..
Don't use "skip iterations" unless you specifically want to
why do my cameras look like this
why doesn't my normal maps work?
So im working on a 3d platformer does anyone know how you add shadows to entities that cast straight down kinda like how it is in kirby forgotten lands?
rtx maybe?
you shoot a ray at the ground and then straight up and if it collides with an object then mark that place as a shadow
i am probably complicating things
These look like ordinary shadows cast from a directional light
The other type of shadow that projects straight down that you may be thinking of is called "blob shadow"
I guess I mean blob shadows but not the kind that is just a circle, Ive tried using an additional directional light for these shadows problem is I cant have lights just cast shadows.
Why does my baked lighting look so bad please?
Like, why aren't shadows being applied to buildings, street lights aren't giving correct shadows...
There are many steps to baking lighting so following instructions is important
First off everything to bake needs to be lightmap static and have lightmap UVs
Jugding from the total bake time I doubt any of those buildings are included in the lightmap
I have them set to static, does that count?
Needs to be "contribute GI" specifically and have recieve global illumination: lightmaps
Yeah they had those
Lights need that as well
Follow all the instructions and do some test bakes in a simple scene until you get the process down
That's how I learned it
Can I make a tile object have a built in point light?
Or atleast can I make a light object that can be placed in a tile palette?
is there is any way to get reflaction on the objects after baking ?
The reason you cant have lights just casting shadow is because it doesnt make any sense… lights tends to make everything around them brighter except objects that are blocked by other objects (shadows), in which case those stays the same as if that light source didnt exist. Lights never makes the surroundings darker (in real life). You can make that effect yourself by using complicated shaders that only darkens areas in shadows but that feature doesnt exist on unity because thats not how lights works. In the game example you showed earlier, it seems all the objects are brighter from top which indicates that the main light source (directional light) is actually casting the shadows and brigthening all the objects as well, there doesnt seem to be any magical light source that ”just casts shadows”
anyone have any idea why the shadows glitch out like this? all the lights are identical, it's weird
this is URP btw
So can anyone enlighten me (pun intended) on how to do lighting right?
I am having insane struggles with having good looking lighting without dropping my game performance down by 100FPS.
I have 2 spotlights for headlights on a car set to Important, because when its using vertex-based lights it looks bad and laggy, but two lights alone kill the performance, cant even begin to imagine how any more would end up working.
I have no clue about the problem But that’s a beautiful looking scene lol
Are those 2 point lights the only lights in the scene ?
are the lights static and their mode is something else than baked?
Thank you
Yeah I still couldn't find a solution, I think it might be a unity bug
Because the lights are all identical
No, there is another car also with 2 important headlights, and both cars have 2 not important taillights. There is also 2 baked lights.
Weird, not sure why it would lag so much, I can have up to 26 real-time lights in my scene and it’s fine
This is driving me mad
Same goes for reflections
How tf does one achieve nice looking not completely performance destroying reflections
I don’t know lol
Why do some projects take up more of my CPU than others lol?
Performant, realtime, nice looking reflections
Pick one
If you're on forward rendering path, all meshes in a shadow casting light's range will be drawn multiple times
That's usually the biggest cost of it
Help, anyone?
anyone know why my pointlight turns off when my player flips?
oh wait nvm was using rotate
Fixed it, solution was to not be dumb like me and put the light on a different z level than the map
Nvm it broke again
Ughhhhhhh
How do I go about doing that?
I'd appreciate your help cause I am stuck
Asset store 2d lights
What you had is really nice, the glitch is not strongly noticed from a players perspective, only picky people will see it. I would keep it how it is in my opinion
@trail arrow Before you make any drastic decisions about it confirm that the bug occurs in build
Some graphical glitches only happen in editor (and some only in build)
They do occur in build.
I won't keep shadows that work half the time, I'll just keep the lights in there and instead add normal maps to some objects to compensate
Shadows aren't important
I have a bunch of dynamic objects which are lit by light probes, but as I move the camera around, the lighting on the objects flashes between different brightnesses, like it's swapping between being correctly lit, almost unlit, etc, like it's chosing completely different light probes when I pan the camera around (only the camera, not the object). Any idea what's going on there?
(there are no pixel/realtime lights in the scene that could be affecting things)
Here's what I mean in action.
how do i make the normal maps work like this on tilemap
textures
like here
on the bg and other stuff
not sure if this is the correct channel for this
does someone know by what name I can refer to this phenomena where shadows at glancing angles show odd lines
My lightmap has been preparing for bake with one minute left for like two hours now. Is that normal?
It is a pretty big scene
Probably shadow bias
And angle
If the light coming with 0 angle on the face
It usually creates that artifact
Maybe angle the light a little
Or change the shadow settings
is it because at 0 angle it comes down to the sample size?
so sometimes its shadow and sometimes its not
ah
I am saying these from my knowledge in general rendering used in softwares
Its not specifically unity
yeah it seems to show up all over the place, i assume its been solved somewhere but just takes too much compute
I notice a lot of my meshes are coming up as having 0 UV Surface Area, but they seem to have UV mappings just fine for textures? What would I need to do for these UVs? I think that might be what's taking so long for my lightmaps to bake
The mesh shows that it does have UVs:
The warning message in the inspector. Says I don't have any UV surface area
But as far as I can tell it does
Maybe check the face normals
I can't bake lightmaps until I figure out what it wants from me on this one
Not sure with this one
If the face normals are flipped wrong side
It might cause that
Pretty bad at reading normals from color, but the fact that there are normals on the outside, and none on the inside means it should be working, right?
Hi, I'm new here but I need some help. I can't get shadows like period, in my scene. I picked up the program yesterday and have trying to follow tutorials but I'm stick and need some help with lights. Really, came to a point where I tried Post Processing and realize I had a problem. Anyone mind doing like a call, and talking me through this?
I went ahead and got a script that shows the normals visually, they all seem to be facing the right way.
Idk at this point
It seems okay
I only have 1 directional light in the scene and a room (primitive walls and roof) with 1 entrance, the texture inside are "pixelated" when I'm had a baked lightmap, what could this be? I can't figuring out the problem
default material with no texture maps
also using tool to place light probes
How does the lightmap itself look?
I always seem to run into this issue, Does anyone know how to get 3d text / textmeshpro to match environmental lighting?
So, I left my lightmap baking over night, and after sixteen hours it still wasn't done. It remained stuck at 96%, where it was about five minutes after starting it. It is a rather large scene, but is this expected behavior?
It does have about 33,000 meshes in it
Does anyone know a way I can modify the rect of an Area Light one side at a time? I would like to be able to position this based on the edges instead of center and extents, but the rect tool doesn't do that, moving one edge also moves the opposite edge
If it's stuck at "preparing to bake", that may suggest that the process has borked itself due to scene complexity
33000 meshes sounds like a lot
Normally you would exclude from the bake anything that's too high poly or too small to be baked meaningfully, for example items placed on tables
And if your world is huge in size, you'll run into problems if you don't use some kind of chunk system or asset streaming
Practically any game out there with an open world (or a closed one, for that matter) keeps most of the world entirely unloaded before you get close, only using very low poly LODs for everything that can be seen from afar
I think I might just be able to exclude my fences, they're about 12000 of the polygons.
somehow I made it so directional lighting doesn't have any part in lighting?
it's realtime so I'm not quite sure why it does not appear to work
Looking for some help with a lighting issue I'm having in my game. Whenever I build the game with a scene loaded in the editor the lighting works properly in that scene, but every other scene's lightning is broken and much darker. I think for some reason the skybox lighting is only working if I have the scene loaded when I build the game. Does anyone know how to fix this or have they experienced it before?
Any help is greatly appreciated :D.
Changing the environment lighting from skybox to a color does fix this but I would like to use the skybox colors if possible.
You need to hit "generate" in the lighting window for every scene to make the lighting persistent (baked lightmaps do not need to be on for this)
The editor generates temporary lighting for the current scene, but this does not persist in scene change or build
Hi, I tried to bake a lightmap but the result is way darker than the realtime counterpart. I checked all the light gameobject in the scene and found out it was actually from the environment lighting. Does anyone know how to fix it?
this is the realtime lighting
this is after baking
this is the settings for the environment lighting
and this is the lightmapping setting, i used shadowmask lighting mode
The light baking has correctly blocked ambient light from entering the enclosed room, which realtime lighting cannot do
There's no "fix" as it's working as intended
If you want for dark places to light up, you need to add light sources or make the surfaces emissive, or maybe override the reflection probe with a brighter cubemap
thanks a lot for the suggestion, i'll try it
i have 2 scenes in unity, and when i start each scene they look bright and good lightning like i wanted, but when i start scene 1 and get to trigger point and go to second scene it becomes way darker than usual
Each scene has to have lighting configured
There's also a bug that scenes do not inherit the light in the editor, if that's it. Test in build
here is how it looks when i start that exact scene
then how it looks after i get from other scene
when i swap scenes my lightning looks diffrent
Already answered you. Scene is missing environmental light settings original had. #archived-lighting message
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.
this tutorial helped me
thanks for giving me idea how to find it you helped me
Not sure if this is the right place to post this question, but I'm having a weird problem where my terrain image renders in layers of resolution that gives it a bizarre cel-shaded look I don't want. Can anyone help me figure out what might be causing it? This is what it looks like:
That thing that looks like a shadow is actually part of the problem I'm having. Nothing is there casting a shadow, and when I turn the orientation of the view camera, the shadow follows it.
seems like mipmap problem to me
try changing mipmap to kaiser, or turn on anisotrophic filter / aniso level, in that rocky texture
I'm not familiar with those settings. Where do I find them?
Texture import settings
Your normal map strength is probably too high which causes weirdness with the shadows, but hard to tell
I checked it without my normal map, and while less pronounced, I could tell the effect was still there.
This is what it looks like with no normal map. It's difficult to see, but the layer effect is still there on the grass if you look closely.
try turning off multiple importance sampling, see if that makes a difference.
So i made this scene that isn't completely finished yet but the stairs in the middle of the scene have an emissive material on them cause i thought it would allow for the player to more visibly see the stairs when standing on top of them but it doesn't seem to affect any of the stairs or surrounding area an dive baked the lighting and set everything to static
Hard to see anything on this screenshots... 😄
In the first one it’s a set of stairs that have an emissive materiel on the side and the second one is a top view of how the material is not affecting the steps
How can I make bakes light look exactly the same as realtime light please? Like, just for it to look the same and not use performance like the realtime light does. Is that even possible?
You could try to set bounces to 0. But why would you do this? Baked lights look so much better 😄
because I can't make it look anywhere better. Shadows just don't seem to work on some objects although they are set to static and all
Let me rephrase my question cause it was a little confusing the first time the side of the step(red arrow) is an emissive material i have the bloom turned up a bit so it glows. The step(blue arrow) is not getting affected by the emissive material even though it is set to static and ive bake the lighting.
Which lighting/shadow technique have commonly been used in city building games like industries of titan.
It is runtime as well.
I guess standard lighting is heavy because the camera view is wide and the camera itself is far away (isometric).
I'm not sure why wide camera view/camera being far away would be heavy for performance. I'd imagine the biggest problem with these scenes is the light count (and most likely batch count) which seems very high. i'd imagine most of those "lights" are just emissive material and glow post processing effect. if many of the lights needs to be actual light sources lighting up the environment, deferred/forward+ renderer would be appropriate
It is only in pc but I want a generic approach to be OK in mobile devices as well.
There is only forward rendering for mobile devices
yeah, only forward would work on mobile
Maybe, we should use fake lights for emissive lights
Its possibly mostly texture work and emissive materials with bloom like @upper fable said
To have day/night cycle, one approach is to sample a texture (sun color, etc.) and add them to base texture some kinda?
i see only one directional light shadow
I think all of these "lights" aren't actual light sources and they are just emissive material + bloom
yeah bloom has a big effect on faking lights
these seems more like actual light sources but those could be faked/rebaked somehow
As a result, it is OK to add one directional light + fake emissive lights + bloom effect? (mobile)
realtime lights on mobile needs to be super simple. using the default shader even with one directional light + shadows sounds expensive for mobile
What about baked textures?
but lighting in this game is realtime. Shadow direction changes
I think of a simple day/night cycle (sample a predefined texture and blending with base texture + color) for lighting and use directional light only for shadows
What about fog? WTH it is really awesome.
It is a custom shader based on height? vertical fog + gradient?
afaik shadows can be quite heavy on mobile devices. in theory you could use simplified meshes as shadow casters (so only the simplified meshes will cast shadows with Cast Shadows option set to Shadows Only). simplified meshes could be like a single box per building (smooth shaded, flat shaded objects tend to leave gaps in shadows)
you could also combine the shadow casting objects into fewer meshes to eliminate need for huge amount of draw calls when rendering the shadow map
in case you didn't know, every object that can potentially cast shdows to the screen needs to be rendered once (without any shading) to the shadow map
in general, you must keep the level of detail on the buildings as low as possible when doing mobile games. with textures/normal maps etc. you can get pretty solid looking buildings without having too many triangles on each
Hi. Does anyone know why when I bake the light there's no shadows there but with realtime light there is a shadow there please? Like, the shadow is created by the balcony in realtime light, but not in baked
looks like your house do not receive any lighting at all
but when it is set to realtime it does...that's what I find strange
Is your House static?
yes
your light set to baked? ^^
how does it look when you change the shading mode?
now I've disabled the baked light to show how it should look like😅
looks like your whole front-face is only 1 pixel in the lightmap
you see the checkerboard on the ground? thats how it should look like.
The Front of your house is just one color. thats not good.
Check in the import Settings of your house, if "Generate Lightmap UV" is enabled:
nope it isn't
okay I'll try to bake again. I'll see if it has worked in around 20 minutes or so when it finishes
thanks!
you can bake with lower texel count to iterate faster
lightmap resolution like 5 or 10 is enough for testing
yeah now the squares are smaller
well but now the baking time has gone up to 5 hours lol (now it says 3)
Are you baking on a Nokia 3310?
show me your baking settings ^^
thats ok
okay I can see it is working now. It hasn't finished, but the building are getting shadows 😄
Yeah 🙂
what are the texels per unit btw? Like, what does it mean exactly please?
no problem 👍 just msg me if you need any help
thanks!
Thanks
Yes, but how can I combine them at runtime? I mean shadows
They are added dynamically during the game. Players can build buildings, etc.
You could in theory just create the mesh procedurally by combining the meshes but depending on the amount of shadow casters, it may not be needed. Id not bother at first and then try that if you get poor performance
That seems to only work for blob shadows, i dont think you can use that for directional light shadows
hey! so i've been messing with URP now and it seems that the object i've made an unlit shader material for still has its faces get darker when i walk away from them for some reason? i'm not sure why this happens, or how to disable it and i'm not sure if it's a lighting issue or an issue with my shader. here's a short vid kinda demonstrating what i mean
if this is a shader issue i'll be glad to ask in that channel, but as for now i'm not really sure if it even is or not
Heya, I'm struggling with getting my head around reflections atm. I'm trying to make a planar reflection (will be for an implementation of a rainy environment with wet flooring) but using reflection probes, it's impossible to get them in the right place so the camera sees the reflection properly. Is there a better way to go about it?
generally reflections from reflection probes seem to just never line up how you'd hope they would
tried baking lighting for my scene with progressive inseted of enlighten but it caused these black streaks any idea what caused them
This is driving me nuts, every now and again we get these artifacts in our light bake, and I have yet to figure out what causes them, anyone have any idea?
You cant get reflections like this from Reflection Probes
You need Screen-Space-Reflections:
https://docs.unity3d.com/560/Documentation/Manual/PostProcessing-ScreenSpaceReflection.html
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.
There must be something wrong with your Material or Lighting setting.
"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/
Is that a planar reflection probe or an ordinary reflection probe? If your render pipeline doesn't support planar reflection probes by default you need a custom solution for it
Ah I didn't even know planar reflection probes existed, seems they're HDRP only and I'm using URP. I found a custom solution in the form of boat attacks planar reflections but I can't figure out applying it to anything other than their water that's pre applied
Thanks for your response, I'm using URP (should've mentioned) and I think that's a built in pipeline feature
these are the settings and what the mesh looks like from above
Check for lightmap UV overlap errors
Not sure if its even possible in URP to do reflections like this
It is
The Boat Attack demo has one implementation of it, as mentioned here
Many thanks for this great article 😊
Hello everyone, I guess you can help me my problem seems trivial but i'm having trouble lighting my 3D scene (URP)
Here it is, I have 1 spheric mesh that acts as the sun, with bloom effects and other shader graph
The problem is the lighting, i've put a light on the sphere like this, but any changes that i make doesn't change a thing on the planets around
(yes it's a donut)
If you want more infos on the configuration i can provide it
lighting settings
The effect i'm trying to have is .. to light up the system like a sun would ^^
Lighting test, HDRP is looking so good and running so well
How far are the planets from the sun? If they're kilometers away like the range implies, intensity needs to be much, much higher
closest one is at 500 units, the sun shines at a radius of 10.000 isn't it enough ? maybe i'll play with intensities
Try to overblow the intensity to confirm that it does have an effect
yup, that was it ... i feel so stupid ^^
The orbiting donut is much more clear
forgot to say thanks @deft fiber .. thanks 🙂
why aren’t my lights going away once i delete them
like
the actual spotlight and point lights are deleted, but in the game it still shows the lighting
Because you baked them? ^^
Did you bake them?
Lighting Tab at generate lighting is a drop down where you can delete it
here
?
Can someone please help me figure out how to properly install Universal Render Pipeline for 2D?
every tutorial I watch shows all sprites turn black after they Upgrade to URP 2D
but mine dont and I dont know why
Please someone I really need this done as soon as possible
How does one generate light map UV for high poly Z brush models?
I have a brick that takes an eternity to generate the light map
The upgrade materials option
yes
Yep. Click that white little arrow
can't enable ssr in post proc volumn. I have enabled ssr on global frame setting and pipeline asset setting.
solved
Does anyone know of a tutorial on how to make light maps like this?
Hi, I am doing the light baking with HDRP on the test scene for nighttime to see the result and trying to figure out why I am not getting any good results. Pictures Below - left before bake and right after bake
Do you have any suggestions?
are the walls marked static?
@lunar mauve
If you select the walls and look in the top right of the inspector make sure the box next to static is ticked
Hi, i have a problem, and its that the only way to see the lights in my project is with insane numbers of intensity, anyone know what would be ? please 😭
Can that be the intensity of the direction light, or any kind of lighting settings in your Hierarchy?
I prefer using emission for lights but it's up to you
The emission on the material right?
Yup
Got it on checked to make it looking bright in the scene
I'll check the light settings
Ok
Yea might be hard for me to resolve since I'm on Mobile
No worries lol
It happens with all types of lights (if thats the question?
Ok so is the room just a cube or did u import it from a modeling software?
@upper timber Did you adjust exposures through Volume Components?
@silk knoll I imported a few parts like trim on the floor and door trims and then the rest of it using Pro builder with materials I picked.
The current scene are pretty simple 4 walls and floor for the baking test
Go to your light settings and click auto generate at the bottom
kk
Hm
baking rn
So on the models that u imported on the first tab (I forgot what it is) there should be generate light maps
But Idk what to do with ur current problem
no no , I can see the lights its just that they are like weak or sum
Yea but that should fix the issue
Have you tried it?
Idk where to change that 
yep
but still
What are the lights set as?
go to Edit > Project Settings > HDRP default Settings then scroll down a little to see Volume Components.
Realtime or Baked?
the question is for me? @silk knoll
No
realtime
Ok try switching it to baked
I think you need to Generate Lightmap UVs on your prefabs
That u imported
I have done that D:
Oh
I think i dont have that
You are using URP I think that's why
Probably yeah, sorry I keep forgetting I am using HDRP for a while now.
Let me look up if I can find anything @upper timber
okey, thanks 
there's no change switching those btw 
Do you have any pictures of your scene?
this works?
Yeah, so the problem was it too dark and light too bright?
the intensity I have to use on the lights
those in the back are just materials with emission and bloom effect
I am thinking that has to do with post processing but other than that I am not sure. I'll look and you can try the URP group.
I kinda fix it downscaling everything, but i still think that is not normal or there is a way to change the power of the intensity or sum like that, ty for the help tho 
After baking lights, my tree model is showing a few white spots
any clue what setting is causing this?
mesh settings
lightmap settings
Would anyone know why this happends and how i can fix it?
How do you lighten the scene?
idk this is default settings
Maybe you should do some basic tutorials when you start using unity ^^
But in this case, you should have a directional light.
Just decrease the Intensity
I asked this question a while ago and was told to check for uv overlapping and i finally did but the uv isn't overlapping(the second image is uv overlap mode for scene veiw) So i cant find why there are black lines
Hey, does anybody know why my shadows looks a little "edgy". When i zoom in the shape doesnt change and ich i zoom out it also isnt a straight line. I use unity2d URP.
have you tried reducing the bias of the light source
it worked for me when my voxel ball had some weird lines in the shadow
🤷♂️ I am not good at unity yet
How dose one do this
its in the light source settings
like, midway down
in the inspector
It’s an emissive material creating the light
oh, hmm
how can u get the interior of a house to be completely dark
like I'm making a flashlight type game, so I want the interior to be dark, how can I do this
wait is it normal if it's taking over 7 hours to bake the light
@olive python
like global illumination
after i deleted all the lights from the scene
no but idk how complex is ur scene atm
it's kinda hard to see
but it's an asset i got for free on the asset store
im j removing alll the lights from it
What's the point of baking global illumination if you've deleted all the lights?
You can clear baked data to remove a lightmap, or generate lighting with lightmapping disabled if you still want some lighting data (such as ambient and probes) without GI
I can still see some light sources in your image though
It's trivial to override reflections globally with a reflection probe which can be baked individually
But apparently the ambient light probe is generated from the skybox and there's no options to generate from specific cubemaps?
wuts could be causing dis weird culling sorts of effect?
i have reflection probes
but i turned it off
i just want everything to be blakc
and dark because im making a flashlight game
but moreover i want to be able to see the scene perfectly through scene view, but from the scene view everything is dark how can i change it
i have this problem now
the objects in the scene are disapprioatly lit
and i can't see my own like color of skin of the fps hand and flashlight
Light bulb icon in scene window
ok sounds good
how do i bake each game object
cuz it's like disapp lit
What?
like from the picture
you can see that the objects in the game
are like lighted different
like they are not correctly lit
and baked
does anyone know how i can make a scene like this
completely dark
i tried changing the skybox
to dark but it doesnt do anything
and the objects are weirdly baked
im trying to make night themee
You need to practice baking in a simpler scene and study the lighting window more to understand the pitfalls of that process
The parts that contribute to lighting are: active light sources, environment lighting, light probes, environment reflections, reflection probes and baked or precomputed lightmaps
If all of those are fully dark, the scene will be as well
Lighting needs to be regenerated to update most of those, but that doesn't necessitate baking or using lightmapped GI at all
Check your lighting setting, if you are using Environment Lighting Source = Skybox, make sure that the skybox is black, or just use Environment Lighting Soure = Color and set it to black
Is there an ideal method for setting up lighting for a space scene in HDRP? I'm having a hell of a time... I basically want the ability to have a sky with no ground, but still be able to have a sun (or star rather).
I'm also encountering issues with the exposure being completely blown out, but overriding it with Fixed exposure doesn't seem to work cuz if I want a reasonable exposure, it ends up fading out the sun completely in the process.
I don't see any guides or tutorials whatsoever for setting up space scenes in HDRP online
I figured since this is more lighting focused I'd start here vs. the hdrp room
An example of what I'm talking about
👀 Anyone know what's up with my shadows? It glitches out at specific angle between the camera and in a specific scene. Other scenes are fine
i still haven't found the thing that's causing this problem if someone could help me i would appreciate it
So it's webgl 2.0 API how can I fix the white light line?
It's on my website on my host with webGL 2.0 API
Might want to search this channel for bleeding light solutions as well.
it's different bleeding light upload on website webgl and on pc with out webgl but i can try look up webgl bleed light.
Don't remember if baking options cause this or faces without sides.
Try giving your walls some thickness
they are full thick
i'll switch real time to bake to see if it work?
How thick exactly?
I dont know how to tell how thick based on computer lol
I just remember that its fixable...
This problem happens usually when using planes or quads for walls instead of something with thickness, like boxes
if I am in that digital studio. I would say maybe 7 inch?
it build mesh from Maya 3d poly
Not a planes
@brisk bloom Another option that should work is to make the walls overlap each other at the edges, so the seams are covered
I think my planes is over the wall I am gonna test it make it smaller make sure it's inside not though the wall.
it's uploading right now.
Sometime there other way to trick it to adjust something make it work.
Can i send you the obj work of that 3d studio you can see if it's thick or soemething wrong with it?
maybe i can try remove the point light and use baking emission
@brisk bloom Your problem is that the corner geometry isn't enough for shadowing the inside from light
If you can't thicken the walls enough for that, you can just add "shadows only" meshes outside of the room to block the light
oooh! it's similar!
but it's not look like on real time on my unity the result different when it's on webgl 2.0 API when I upload on website
The quality of many effects on webgl is limited, but the principle is the same
When i remove the point light and use bake and emission . Still same. lol
It's something wrong with my 3d box
make it more thicker or what?
it seem like I have to re design the studio make it clean.
I have distance shadowmasking enabled in my game. What settings do I need to use on an object to make it bake a shadow into the lightmap, but not cast real time shadows? For example, I have these settings on a bedside table:
But when I move the table into the sunlight coming in through the window in the editor, I can see the baked shadow it left behind, but it is also casting a real time shadow from the light, which I assume is hurting the performance of my game. I want to disable that dynamic shadow generation for these static objects, without having to go through thousands of objects to enable shadows for baking, but disable them during gameplay. I would assume Unity has a way to tell it these objects are static and should not cast real time shadows but I don't see it.
I should probably also mention I'm using the standard pipeline.
Hm, I think I found my answer:
https://forum.unity.com/threads/why-static-lights-create-real-time-shadows-from-static-object-to-other-static-object.732413/
In short, Shadowmask calculates shadows on statics and uses them for rendering. Statics can only cast shadows on dynamics via occlusion probes, so occlusion will be at the density of your light probes. Distance shadowmask does full realtime shadows within the shadow distance. You'll have to pay the cost of rendering statics into the shadowmaps so they can cast proper shadows on dynamics, and you still have to pay the cost of sampling the shadowmap when rendering statics to get shadows from dynamics on statics.
So basically...
Shadowmask will be higher performance, but shadows cast from static objects onto dynamic objects will be at the resolution of your light probes.
Distance shadowmask on the other hand treats everything as a dynamic shadow caster when it's up close. This provides sharp shadows cast onto dynamic objects, but at a high performance cost.
Unfortunately it seems like changing the shadow distance in your project settings doesn't merely affect static objects casting dynamic shadows, it affects dynamic objects as well, which means if I were to set it to a short distance to reduce the number of static objects in my scene casting shadows it would also prevent my characters from casting shadows in the distance, and since they don't have baked shadows to fall back to, that looks bad.
I'd thought Distance Shadowmask was harder to set up, but usually the way to go, but now that I understand it better, it seems like Shadowmask might be better. At least, for the game I'm working on now.
There is one big problem with plain old Shadowmask though. If I were to have a large field with groups of trees, I'd want those trees to cast shadows onto the terrain in the distance, but use real time shadows up close. So that would be a case where I'd need Distance Shadowmask. But here, I have only a small yard the player is confined to, so I can use real time shadows for my trees so the leaves moving cast nice shadows on the ground, but my house and fences would use baked shadows. I guess I'll have to up the resolution of the bake for the ground though, so the resolution matches the real time shadows from the trees well.
Hi, where can I learn lighting in unity?
Youtube?
what channel do you recommend
Just type lighting unity tutorial?
Ah ok
I fixed the box wall thicker and i did few other trick to fix problem but nothing. Should I make it more thicker or ?
Or it is just the setting need to be right?
wow when i make it waaaayy more thickeeer and it worked!
problem solve
I have a small question. I'm still fairly new to working in unity, and I'm cleaning up one of my very first bakes.
Does anyone know how to remove the shadows produced by having two adjacent meshes casting shadows onto each other like the blue image below? All I've done is separate them so that I can take advantage of occlusion culling.
I've included:
My original UV
The image of the artifact
My light settings (using progressive lightmapper)
The lightmap UVs
Here's the mesh I'm trying to correct
@elfin breach It may be enough to increase lightmap UV margin size just a bit, in case it's bleeding over
Can you see anything off y using lightmap UV or texel invalidity debug views?
I will give an increase in margin just in case. Texel validity is valid in my test case. I haven't been actually able to see anything in my actual map? Like I would expect to see green
Is there a particular setting I'm missing?
The debug views only work if you've baked the lightmap during current editor session, for that specific scene
test case
Going to rebake and see if there is any issues with validity.
shouldn't take too long
I haven't fixed it yet, but thanks for the help 💜
The mesh didn't have any texel invalidity but I did notice the rest of the map had UVOverlap, so I'm redoing the Light UVs
Good luck! Note that there's no point in making a lightmap UV map if you're going to use the automatically generated one
You can define margins for the automatic one ...somewhere
I've been avoiding the automatically generated lightUVs. It just seems like if I make a mesh into two separate objects, it's suddenly a problem no matter how close they are.
The vertex snapping gizmo you get with V key is probably the best way to ensure objects are close with no gaps (aside from using exact numbers)
Definitely giving the vertex snapping a shot. I haven't actually tried that within unity before
found this
should I try reducing backface tolerance?
Usually these should be fixable by perfectly aligning mesh edges
Backfaces shouldn't ever be "reachable by the light rays" or they "absorb" the light
how can I handle light in 2D. I have 2 basketballs(as example) that I want to have a highlight from a "sun".
I can of cause add that to the sprite but then when I rotate the highlight will move?
You'll probably need a shader for that
A light texture that's always rotationally stable, multiplied by the base texture
ok, thank. I will look into something like that.
Why do I need to set scale in lightmap to 0 to get my object to stop being lightmapped, if I have selected light probes as the source for global illumination? Could this perhaps have something to do with my using Bakery to bake my lightmaps? I wouldn't think Bakery would be able to override this setting in the scene.
The floors and walls in the interior of my house seem to be reflecting the skybox. I believe I need to use reflection probes to fix this, yes? Should the bounding box cover all objects, including the walls/floors?
I've actually been having issues with this myself, and the only solution I've found so far is to remove the lighting produced by the skybox. Do reflection probes fix this problem?
It does, but it introduces issues on the exterior now. I believe I need multiple reflection probes but I'm unsure what the proper workflow for this is
My guess would be that once you add a reflection probe to the interior, a second reflection probe should be added to cover the exterior area along with any light probes. Still looking for what the workflow is suppose to be and how that workflow should affect my model work :\
Yeah, I'm in the exact same boat haha. I appreciate the suggestions. I will try to experiment with that.
@elfin breach Okay. I think I have it figured out.
Light probes doesn't help in this situation, it's all about the reflection probes. If your scene is has both interiors and exteriors like mine does, then you'll need to do two things.
- Your interior walls and exterior walls can not share the same mesh. You have to make sure you separate them into their own meshes
That ensures your reflection probe can only affect one at a time instead of both
I accidentally said lightprobe when i meant reflection probe haha. I actually have separated my exterior and interior walls for all the wrong reasons, but I'm glad that seems to be the right approach
- You need to use Box Projection. I'm using URP and this is disabled by default. I'm not exactly sure how it works, but I believe it projects the probe bounding box outwards, so anything with opposite facing normals isn't affected.
If I'm understanding it right, then with projection, probes on the interior shouldn't affect the exterior because the normals would be facing away from it
I'm restricted to using the built in pipeline, so I'm not sure if I have those same probe options
Ahh I see
If I were using teleporting, I don't think I'd have as much issue haha. It's more of a seamless transition
I didn't know about anchor overrides. I solved my issue already, but this might help me in the future. Thank you
@slate ocean @elfin breach The documentation is kind of vague about this, I think
URP in Unity 2020.3. has no probe blending at all
URP in 2021.3. has probe blending per-pixel
BiRP has probe blending by object origin point (or anchor override) in forward rendering path, and blending per-pixel in deferred rendering path
If you don't have per-pixel blending, then interior and exterior walls need to be separate objects
If you do use it, anchor override / object origin can't be used for influencing the probes at all
Kind of weird is that new URP seems to have the fancy kind of per-pixel blending but not the simpler origin-based type
This is incredibly helpful thanks <3. I assume that if you do not have per-pixel blending, this also applies to walls between interior areas
Yes, always have to be mindful of object origins / anchors at probe intersections in those situations
hrmm waited 2 hours for a lightmap only for it to have somehow ruined my game lol
It's recommended that when doing non-final bakes you start with low samples / resolution, use GPU baking and do test bakes on select areas of your level
And when something goes wrong use the scene view lightmap debug modes to investigate
i thought it was kinda low
also am i going to have this 500mb lightmap bloating up my 200mb apk?
I'd at least halve samples and resolution still
Progressive updates also can slow it down a bit
You can compress lightmaps, and note that their size on memory is not the same as size on disk
Either way, baked lightmaps save processing power at the cost of file size, as you're precomputing lighting and storing it as images
If you have a lot of repeating assets that don't necessarily need to care about each other in the baking process, it's also possible to store lightmaps in prefabs and re-use them
What's more important is to exclude any small objects from the lightmaps, such as the windows and street lights so they don't all take up space on the lightmap and inflate the baking time
They should be lit by lightprobes instead
i think i mostly made it only roads and buildings. ill cut it down some more and have a play around. cheers
hrmm still sucks
Did you use the scene view debug modes to look for issues?
like the console?
Texel validity and UV overlap views are usually the important ones
hrmm yeah it looks as patchy as the baked lighting
also i only have 1 light in the whole thing. just a directional light
How would I set up an object like a table, so that it casts shadows into the lightmap, but is not included in real time shadow calculations?
I need to do this for every object in a house, so having to manually disable shadow casting after baking isn't a great solution. I suppose one could create a script to do this but then I'd have to tag or assign a special layer to every object in the house and every time I load my world it would have to toggle that, and my stuff would look different in-editor.
Actually I think Unity has a bug where toggling shadow casting doesn't actually appear to do anything if an object has had shadows baked from it. At least when I set my trees to not have global illumination the dynamic shadows didn't appear until I re-baked. Then again perhaps that's indicating to me that once an object bakes a shadow with Shadow Masking enabled, dynamic shadows for it are not calculated for it and there's some hidden parameter I can't see controlling that?
I'm trying to do this for performance reasons. I have a sun light that casts real time shadows from avatars outside, but inside the house, there's no point in objects casting real time shadows because they are within the baked shadow of the house. But I don't need all the objects to bake shadows either because the tables they're sitting on aren't lightmapped.
the art and shadows all work perfectly how i want them to before i started messing with baked lighting
i'm just trying to get it to perform better
this was before it all got messed up
Which draw mode is this meant to be? If you only see dark grey there may not be any valid data to debug
The data is stored only for that editor session for that scene right after a bake
texel and uv overlap are the same
If you want to get rid of baked lighting you can click the arrow on the "generate" button and choose "clear baked data"
You might have to generate again with baked global illumination off to get fully back to realtime ligthing
As you can see on the documentation they should be green/red and white/red if they're working properly
ah well that's not good then
realtime ligthing it is then! suck a dick anyone whos phone is from before 2018 lol
cheers for the help @deft fiber appreciate it
What is a good way to do lighting in a very low res 2d pixel game?
For now I need a day night cycle and a campfire to be lit up
Are you using urp 2d renderer?
Does enlighten work without baked lightmaps? I know it can work with them, but can it work on its own?
No, it's precomputed by its nature
Thank you Spazi
I'm working on a topdown game with realtime lighting. When a unit enters a building, the building's roof is hidden simply be disabling the renderer of the roof but it then also "lets the light in". What would be a good/correct way to make the interior lighting act as if the roof was still there?
duh nevermind.. instead of disabling the renderer, I simply set the ShadowCastingMode to ShadowsOnly and done
Any tips for using masks as lighting?
keyboard model before and after baking. any idea why this effect was created? with some keys darkening
Thanks in advance!
Something with geometry of that scale might be better served being lit by light probes.
If you do want to stick with lightmaps you'd probably have to put in work adjusting the pack margin settings for the model, but with geo like that it might just balloon out its size in the lightmap.
got yeah so just add probes and rebake?
Yeah, and make your object non-static and lit by the probes
If the model is like this without any baked lighting then the normals are probably off
I wouldn't put the probes through the walls or floor
this betteR?
sorry new to this stuff haha appreciate! the help!
do I have to rebake to see changes?
or should the probes be affecting right away
You do need to rebake to update the probes, as they take the information from the lightmap (or, well, from that point in space when the lighting is baked)
got yeah. Is that generally a good way to position them?
https://docs.unity3d.com/Manual/class-LightProbeGroup.html
Choosing Light Probe positions