#archived-lighting

1 messages · Page 70 of 1

deft fiber
#

Usually yes
When using purely realtime lighting, the ambient light from the sky cannot be blocked out by structures
When baking lightmaps and probes, the sky is properly occluded from interiors

somber acorn
#

Usually yes

night cobalt
#

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

upper fable
night cobalt
#

@upper fable Where is that setting located? I'm not seeing that anywhere on my camera, preferences, or light

upper fable
#

Depends on render pipeline. Google will tell u

chilly gazelle
#

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

thorny goblet
#

Hey can anyone help me with this?

#

What is this whiteness on the wall?

upper fable
upper fable
broken quiver
#

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.. 😦

late wolf
#

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

summer igloo
#

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

deft fiber
summer igloo
#

oh! let me have a try

summer igloo
deft fiber
summer igloo
#

awesome i'll give it a try thanks!

summer igloo
#

any idea what i'm doing wrong here? global light colour doesnt seem to be adjustable

main wolf
broken quiver
#

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?

main wolf
#

I've never seen reflection on terrain actually, do you have any screenshot just to make sure it's reflection?

broken quiver
#

it is very annoying because it is all over the terrain

main wolf
#

It looks like specular, try lowering smoothness in your terrain material if there's one

broken quiver
#

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

main wolf
#

How about go to your texture importer setting and set alpha source to none or grayscale?

broken quiver
rigid kettle
#

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

chilly kettle
#

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?

chilly kettle
#

looks not really great 😄 i think its because light baking dont care about the shaders alpha value of the leaves

chilly kettle
#

Added a Skylight now. Looks way better. But the shadows are horrible ^^ Any Ideas?

upper fable
# chilly kettle Added a Skylight now. Looks way better. But the shadows are horrible ^^ Any Idea...

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)

dusty parcel
dusty parcel
#

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.

chilly kettle
#

and the _TransparencyLM would be the alpha of the base texture?

dusty parcel
#

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)

chilly kettle
#

Hard to say how it can work with shadergraph. Plugging it into the alpha doesnt do it

dusty parcel
worthy pendant
chilly kettle
dusty parcel
chilly kettle
#

and i multiply it to the alpha or something?

dusty parcel
#

No

#

Just have it as a property, you don’t need to do anything with it

chilly kettle
#

Mhh. Not sure, if this works in Shadergraph. As far as i know you have to plug everything in somewhere

dusty parcel
#

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

chilly kettle
#

😄

somber acorn
# broken quiver Nope, after applying nothing changed (sorry for taking so long, it crashed twice...

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.

somber acorn
green ridge
#

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?

upper fable
green ridge
#

sorry bout that

#

and for reference the lights look like this now

upper fable
# green ridge

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

green ridge
#

that worked tysm!

rigid kettle
#

thank you!

ocean stone
#

Does anyone know how to make the scene pitch black in Unity 2021.3.2f1? All the old methods don't work anymore :(

#

(urp)

carmine flare
#

don't crosspost

ocean stone
#

sorry, don't usually get replies here

#

I'll remove the other

ocean stone
#

Done

upper fable
ocean stone
#

the entire scene

#

so it's globally dark unless there are lights

ocean stone
#

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)

ocean stone
#

and the lights are at 2x intensity - no bloom

uncut mural
#

uh

#

anyone know a fix? for some reason it's glowing weirdly

#

is this just a thing with transparent materials?

shadow horizon
deft fiber
#

Every cascade twice as wide as the last one has given the best results in pretty much all situations for me

shadow horizon
deft fiber
#

The power of two distribution should be the exact same in percentages

#

well, roughly power of two

shadow horizon
#

i dont have this Last Border setting

deft fiber
#

I don't think it matters in this situation
It only affects how the shadows fade out at the very limit

shadow horizon
#

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?

deft fiber
#

Yea

shadow horizon
#

some of my foilage loses its shadows so thats what makes it obvious

deft fiber
#

Though those are a bit of a hit or miss

shadow horizon
#

Do you think the settings you provided are good for all quality settings? (low through to "ultra" ?)

deft fiber
#

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

shadow horizon
#

I see, thank you 🙂

ocean stone
upper fable
#

I dont think I know

ocean stone
#

Does anyone know how to use the new 2D lighting?

ocean stone
#

Anyone?

uncut mural
#

imported a model and got this lighting error

#

i don't even know how

#

i just think it's a unity moment imo

upper fable
# uncut mural

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)

uncut mural
#

oh okay, thanks!

uncut mural
#

is it just the area light that's causing the problem?

upper fable
uncut mural
#

nope

timber lichen
#

this is the spotlight settings

#

the objects mesh renderers in the scene have cast shadows set to on

boreal merlin
#

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.

timber lichen
timber lichen
#

why would a light clip through objects only at an angle?

boreal merlin
#

I ended up using volumetric lighting effects, and it works for me. Thank you though!

ocean stone
#

except i can't make it all dark

#

how did you do that again?

timber lichen
#

i also removed the skybox from SkyboxMaterial , and changed the camera's clearflags to Solid Color

#

thatll make the whole scene pitch black

ocean stone
#

the new one?

ocean stone
#

im making a game almost exactly like that but side scrolling

#

the person has a flashlight so i've got the exact same issue

ocean stone
timber lichen
#

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

ocean stone
timber lichen
ocean stone
#

hmmm

#

i might stick with urp

#

ill just use color correction to make normal lighiting dark

#

then i can use shadows

timber lichen
#

one thing i noticed, is that any object without materials wont let light clip through it

timber lichen
#

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

olive python
upper fable
#

That doesnt work if the area needs to be seen dark from further distance too

deft fiber
lament barn
#

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?

uncut mural
#

why is this happening?

#

is this a uv error?

lament barn
#

what the hell is happening with the progressive GPU preview mode

deft fiber
timber lichen
gritty garnet
#

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

deft fiber
# gritty garnet

Too many lights affecting the mesh
Look into "pixel light limit per object"

deft fiber
gritty garnet
#

...

deft fiber
#

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

gritty garnet
#

ok

deft fiber
#

That's why you should find more detailed instructions how to implement the potential fixes and when they're appropriate

gritty garnet
#

ok thanks

mighty grotto
#

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

near bison
#

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.

main wolf
near bison
#

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.

wispy brook
#

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

near bison
wispy brook
past osprey
#

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

regal urchin
small gorge
#

Hi, how can I make this edges smooth? Not this flat

upper fable
#

Recalculate may not work if edges are split already

small gorge
#

Ok, thanks

verbal folio
#

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?

verbal folio
#

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

upper fable
#

define "things"

upper fable
#

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

spice storm
#

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

upper fable
spice storm
#

I now know why it was like that

#

Im using URP and it only allows 8 point lights I think

upper fable
#

So you have to use deferred if you need more than 8 point lights atm

spice storm
upper fable
spice storm
#

oh... I have Unity 2020 xD

#

is it a good idea to use the newer version on my project with the older version?

upper fable
spice storm
#

alright I will try it

#

Thanks for your help :D

deft fiber
#

@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

solid basalt
#

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

timber lichen
#

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?

timber lichen
#

Remove that in light settings

solid basalt
#

Thanks

#

It works, I didn't even know that was a setting

deft fiber
timber lichen
#

Oh nice, alright thanks

chilly kettle
#

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.

idle schooner
main wolf
viral osprey
#

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.

upper fable
viral osprey
#

@upper fable it doesn't work.

upper fable
#

Maybe the shadow near plane is too high and he shadows leak through the walls?

viral osprey
#

It isn't about the shadow, I'm trying to get the reflection not to go through the wall.

idle schooner
#

baking reflection probes might help with that

#

or maybe using screen-space reflections

idle schooner
viral osprey
viral osprey
idle schooner
viral osprey
#

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

rancid axle
#

Hi all
I'm trying to achieve these:

  1. Day/night
  2. Moon phase (variable intensity of baked night lights)
  3. 3D camera (means gotta handle very far vision)

Possible solutions for each (and the hurdle):

  1. 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)

  2. Enviro (but it doesn't have LM blends. There is MLS integration with Enviro but... Enviro side haven't replied to some questions yet)

  3. 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

magic sky
#

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

winged tangle
#

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

fickle needle
#

then press bak

#

bake

rancid axle
deft fiber
lament barn
#

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.

deft fiber
lament barn
#

true

deft fiber
#

Did you check texel invalidity debug view?
Also, do they appear on CPU baking or just GPU baking

lament barn
#

just GPU baking, so i guess ill just have to settle with CPU baking, but man thats sooooo much slower

#

also what debug view?

deft fiber
deft fiber
#

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

lament barn
#

oh i didnt mark the floor as static

#

so it was using old lightmap data

jaunty plank
#

I'm a beginner at this, anybody know why? (not sure what word to said)

upper fable
lament barn
#

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

strong python
#

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)

gilded mantle
#

i have a question, why do too many lightning scources cause all the lights to flicker

upper fable
jaunty plank
#

this could be a very newbie question but, how can I fix this

#

the light "bleeding" thought 0 width gap

upper fable
jaunty plank
#

the weird thing that it only happen when I entered playmode

upper fable
upper fable
jaunty plank
#

sorry for the low quality (it have artifacts in Hard Shadow as well)

summer aspen
#

Did you setup cascading shadows to your preferences?

jaunty plank
#

I left it at "default" when creating the project, not sure anything wrong or not

summer aspen
#

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

jaunty plank
jaunty plank
#

I have no idea how to fix...

upper fable
jaunty plank
#

@upper fable so anyway, it didn't fix anything

deft fiber
#

Shadows must always be "smaller" than the object they're being cast, otherwise the shadow can be seen on the sunny side

deft fiber
#

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

main wolf
#

so then you can fix the shadow banding by adjusting the normal bias without worrying the light leakage

jaunty plank
#

0.1

carmine flare
#

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)

marsh dust
#

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 🙂

modest patio
# marsh dust Hi Thorsman! I asked about reflection probe rotation way back in April, and our...

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.

marsh dust
# modest patio Seems I've been mistaken and you cannot actually rotate reflection probes, even ...

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 🙂

modest patio
marsh dust
neat cloak
#

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?

sharp heart
#

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! 👍

timber lichen
#

How can I make a section of a map appear dark?

visual belfry
#

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

proper viper
#

How do I make bakes faster, It says about 11 hours to complete when I have an RTX 3060

visual belfry
#

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

proper viper
#

for 750€, now it's 500€

#

So you can guess the answer to getting an RTX 3090 in half of 2022

visual belfry
#

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...

▶ Play video
misty dirge
quick saddle
misty dirge
#

These are my pipeline settings

#

oh, it's showing up in game window but not scene window

quick saddle
#

Enable post processing/shaders

misty dirge
#

cool that fixed it for my other scene. Is it only visible in game window?

quick saddle
#

No

rancid axle
#

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?

deft fiber
rancid axle
#

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

glossy hemlock
#

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

deft fiber
rancid axle
#

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?

sharp heart
quick saddle
#

Check the 2d forums, theres lots of threads abt that issue

#

@sharp heart

glossy hemlock
deft fiber
glossy hemlock
#

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?

deft fiber
#

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

simple zinc
#

the normal map in my project was working in the past but now it doesnt work anymore.. any ideas?

#

(2D URP)

glossy hemlock
glossy hemlock
#

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

deft fiber
grizzled warren
#

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?

carmine flare
#

no

#

you have to rebake

grizzled warren
#

that makes it unusable, doesn't it?

carmine flare
#

well generate lightmap uvs helps, but because the uv for the lightmap is changed, it will look wrong

grizzled warren
#

ah, I'm asking if it will change

#

is the operation deterministic

carmine flare
#

i only know about the uv part of your question

strange delta
#

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?

strange delta
#

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

cloud wing
#

these walls are giving me a headache

#

i have generate uvs on for the models

#

but for some reason they just look awful

strange delta
#

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?

dull marlin
#

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?

cloud wing
#

bloom :)

dull marlin
#

On the post processing?

#

I was playing with that but can't seem to get decent results.

upper fable
deft fiber
grizzled warren
deft fiber
lone dune
#

why do my cameras look like this

simple zinc
#

why doesn't my normal maps work?

jovial river
#

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?

simple zinc
#

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

deft fiber
jovial river
#

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.

broken quiver
#

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...

deft fiber
#

Jugding from the total bake time I doubt any of those buildings are included in the lightmap

broken quiver
deft fiber
broken quiver
#

Yeah they had those

deft fiber
# broken quiver 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

trail arrow
#

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?

timber lichen
#

is there is any way to get reflaction on the objects after baking ?

upper fable
# jovial river I guess I mean blob shadows but not the kind that is just a circle, Ive tried us...

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”

trail arrow
#

this is URP btw

chrome dome
#

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.

timber lichen
timber lichen
main wolf
# strange delta

are the lights static and their mode is something else than baked?

trail arrow
#

Yeah I still couldn't find a solution, I think it might be a unity bug

#

Because the lights are all identical

chrome dome
timber lichen
#

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

chrome dome
#

This is driving me mad

#

Same goes for reflections

#

How tf does one achieve nice looking not completely performance destroying reflections

timber lichen
#

I don’t know lol

Why do some projects take up more of my CPU than others lol?

deft fiber
deft fiber
deep blaze
#

anyone know why my pointlight turns off when my player flips?

#

oh wait nvm was using rotate

trail arrow
#

Nvm it broke again

#

Ughhhhhhh

quick saddle
#

yah, urp 2d lights are glitchy

#

Best to use an asset pack for 2d lights

trail arrow
#

I'd appreciate your help cause I am stuck

quick saddle
#

Asset store 2d lights

trail arrow
#

Oh they are paid assets, I see

#

nvm then, no shadows for the game

lethal star
deft fiber
#

@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)

trail arrow
#

Shadows aren't important

wraith cradle
#

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)

wraith cradle
nimble ridge
#

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

steady terrace
#

does someone know by what name I can refer to this phenomena where shadows at glancing angles show odd lines

glossy hemlock
#

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

nimble ridge
#

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

steady terrace
#

is it because at 0 angle it comes down to the sample size?

#

so sometimes its shadow and sometimes its not

nimble ridge
#

Yeah it cant compute what to do

#

Its like z fighting

steady terrace
#

ah

nimble ridge
#

I am saying these from my knowledge in general rendering used in softwares

#

Its not specifically unity

steady terrace
#

yeah it seems to show up all over the place, i assume its been solved somewhere but just takes too much compute

nimble ridge
#

I dont think its too much, its probably trying to do both

#

¯_(ツ)_/¯

glossy hemlock
#

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:

nimble ridge
#

Wdym surface area

#

Do you want smooth shading or something

glossy hemlock
#

But as far as I can tell it does

nimble ridge
#

Maybe check the face normals

glossy hemlock
#

I can't bake lightmaps until I figure out what it wants from me on this one

nimble ridge
#

Not sure with this one

#

If the face normals are flipped wrong side

#

It might cause that

glossy hemlock
#

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?

wet summit
#

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?

glossy hemlock
nimble ridge
#

Idk at this point

jaunty plank
#

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

chilly kettle
sacred sail
#

I always seem to run into this issue, Does anyone know how to get 3d text / textmeshpro to match environmental lighting?

glossy hemlock
#

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

glossy hemlock
#

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

deft fiber
# glossy hemlock So, I left my lightmap baking over night, and after sixteen hours it still wasn'...

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

glossy hemlock
#

I think I might just be able to exclude my fences, they're about 12000 of the polygons.

drifting panther
#

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

fossil cosmos
#

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.

fossil cosmos
#

Changing the environment lighting from skybox to a color does fix this but I would like to use the skybox colors if possible.

deft fiber
sly oak
#

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

deft fiber
sly oak
timber lichen
#

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

summer aspen
#

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

timber lichen
#

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

summer aspen
timber lichen
#

how can i do that

#

i am begginer

#

sorry

summer aspen
#

Make sure both scenes have the same environmental settings

timber lichen
#

this tutorial helped me

#

thanks for giving me idea how to find it you helped me

raven escarp
#

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.

main wolf
raven escarp
#

I'm not familiar with those settings. Where do I find them?

deft fiber
raven escarp
#

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.

modest patio
burnt jay
#

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

chilly kettle
burnt jay
#

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

broken quiver
#

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?

chilly kettle
broken quiver
burnt jay
#

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.

tawdry wadi
#

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).

upper fable
# tawdry wadi Which lighting/shadow technique have commonly been used in city building games l...

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

tawdry wadi
upper fable
#

yeah, only forward would work on mobile

tawdry wadi
#

Maybe, we should use fake lights for emissive lights

chilly kettle
#

Its possibly mostly texture work and emissive materials with bloom like @upper fable said

tawdry wadi
#

To have day/night cycle, one approach is to sample a texture (sun color, etc.) and add them to base texture some kinda?

chilly kettle
#

i see only one directional light shadow

upper fable
chilly kettle
#

yeah bloom has a big effect on faking lights

upper fable
#

these seems more like actual light sources but those could be faked/rebaked somehow

tawdry wadi
#

As a result, it is OK to add one directional light + fake emissive lights + bloom effect? (mobile)

upper fable
#

realtime lights on mobile needs to be super simple. using the default shader even with one directional light + shadows sounds expensive for mobile

tawdry wadi
#

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?

upper fable
# tawdry wadi but lighting in this game is realtime. Shadow direction changes

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

broken quiver
#

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

chilly kettle
#

looks like your house do not receive any lighting at all

broken quiver
#

but when it is set to realtime it does...that's what I find strange

chilly kettle
#

Is your House static?

broken quiver
#

yes

chilly kettle
#

your light set to baked? ^^

broken quiver
#

yes

#

Like this is how it should look like, with a shadow right there

chilly kettle
#

how does it look when you change the shading mode?

broken quiver
#

now I've disabled the baked light to show how it should look like😅

chilly kettle
#

looks like your whole front-face is only 1 pixel in the lightmap

broken quiver
#

what

#

I don't even know what that means or how to solve it sorry

chilly kettle
#

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.

broken quiver
#

oh

#

any known fix for that?

chilly kettle
#

Check in the import Settings of your house, if "Generate Lightmap UV" is enabled:

broken quiver
#

nope it isn't

chilly kettle
#

there you go

#

check > apply > bake lighting

broken quiver
#

okay I'll try to bake again. I'll see if it has worked in around 20 minutes or so when it finishes

#

thanks!

chilly kettle
#

you can bake with lower texel count to iterate faster

#

lightmap resolution like 5 or 10 is enough for testing

broken quiver
#

yeah now the squares are smaller

#

well but now the baking time has gone up to 5 hours lol (now it says 3)

chilly kettle
#

Are you baking on a Nokia 3310?

broken quiver
#

nope

#

gtx 960m rn

chilly kettle
#

show me your baking settings ^^

broken quiver
#

okay now time has dropped to 15 minutes again

chilly kettle
#

thats ok

broken quiver
#

okay I can see it is working now. It hasn't finished, but the building are getting shadows 😄

chilly kettle
#

Yeah 🙂

broken quiver
#

what are the texels per unit btw? Like, what does it mean exactly please?

chilly kettle
#

Texel -> Texture Pixel
Unit -> 1 Unity "Meter"

#

5 pixels per Meter

broken quiver
#

ohhh okay

#

thank you so much for your help

chilly kettle
#

no problem 👍 just msg me if you need any help

broken quiver
#

thanks!

tawdry wadi
upper fable
upper fable
whole frost
#

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

buoyant kraken
#

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

burnt jay
#

tried baking lighting for my scene with progressive inseted of enlighten but it caused these black streaks any idea what caused them

whole mural
#

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?

chilly kettle
chilly kettle
chilly kettle
deft fiber
buoyant kraken
buoyant kraken
burnt jay
deft fiber
chilly kettle
deft fiber
whole mural
languid falcon
#

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 ^^

hoary fossil
deft fiber
languid falcon
deft fiber
languid falcon
#

The orbiting donut is much more clear

languid falcon
#

forgot to say thanks @deft fiber .. thanks 🙂

inner hollow
#

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

chilly kettle
#

Because you baked them? ^^

inner hollow
#

like they are deleted

#

but it's still showing

#

how do i fix

chilly kettle
#

Did you bake them?

inner hollow
#

i think the asset did

#

how do i "un-bake" them

chilly kettle
#

Lighting Tab at generate lighting is a drop down where you can delete it

midnight wyvern
#

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

hearty mulch
#

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

midnight wyvern
#

yes

limber delta
modern wing
#

can't enable ssr in post proc volumn. I have enabled ssr on global frame setting and pipeline asset setting.

modern wing
#

solved

snow meadow
#

Does anyone know of a tutorial on how to make light maps like this?

viral osprey
#

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?

viral osprey
#

@lunar mauve

silk knoll
upper timber
#

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 😭

viral osprey
#

It is ticked just like I shared above lol

#

@silk knoll

viral osprey
silk knoll
#

And your room is still black?

#

Check your lights. Are they set to baked?

viral osprey
#

Yeah, let me bake it again

#

okay checking

#

Yeah, it is on Baked

silk knoll
#

I prefer using emission for lights but it's up to you

silk knoll
#

Check your Lighting settings

viral osprey
#

The emission on the material right?

silk knoll
#

Yup

viral osprey
#

Got it on checked to make it looking bright in the scene

#

I'll check the light settings

silk knoll
#

Ok

viral osprey
silk knoll
#

Yea might be hard for me to resolve since I'm on Mobile

viral osprey
#

No worries lol

upper timber
silk knoll
#

Ok so is the room just a cube or did u import it from a modeling software?

viral osprey
#

@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

silk knoll
viral osprey
#

kk

silk knoll
#

Hm

viral osprey
#

baking rn

silk knoll
#

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

upper timber
silk knoll
#

Have you tried it?

upper timber
#

yep

#

but still

silk knoll
#

What are the lights set as?

viral osprey
#

go to Edit > Project Settings > HDRP default Settings then scroll down a little to see Volume Components.

silk knoll
#

Realtime or Baked?

viral osprey
#

the question is for me? @silk knoll

upper timber
silk knoll
#

Ok try switching it to baked

silk knoll
#

That u imported

viral osprey
#

I have done that D:

silk knoll
#

Oh

silk knoll
#

You are using URP I think that's why

viral osprey
#

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

upper timber
viral osprey
#

Do you have any pictures of your scene?

upper timber
viral osprey
#

Yeah, so the problem was it too dark and light too bright?

upper timber
upper timber
viral osprey
#

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.

upper timber
hollow skiff
#

After baking lights, my tree model is showing a few white spots

#

any clue what setting is causing this?

#

mesh settings

#

lightmap settings

feral patrol
#

Would anyone know why this happends and how i can fix it?

steel onyx
#

why is it so bright

#

how can i lessen it?

#

make it less bright?

chilly kettle
steel onyx
#

idk this is default settings

chilly kettle
#

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

burnt jay
#

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

covert crag
#

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.

sage talon
#

it worked for me when my voxel ball had some weird lines in the shadow

#

🤷‍♂️ I am not good at unity yet

burnt jay
sage talon
#

like, midway down

#

in the inspector

burnt jay
#

It’s an emissive material creating the light

sage talon
#

oh, hmm

inner hollow
#

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

inner hollow
#

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

olive python
inner hollow
#

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

deft fiber
# inner hollow after i deleted all the lights from the scene

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

deft fiber
#

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?

rigid ether
#

wuts could be causing dis weird culling sorts of effect?

inner hollow
#

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

deft fiber
inner hollow
#

how do i bake each game object

#

cuz it's like disapp lit

deft fiber
#

What?

inner hollow
#

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

inner hollow
#

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

deft fiber
# inner hollow and the objects are weirdly baked

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

main wolf
half viper
#

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

half viper
#

An example of what I'm talking about

compact vector
#

👀 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

burnt jay
brisk bloom
#

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

summer aspen
#

Might want to search this channel for bleeding light solutions as well.

brisk bloom
#

it's different bleeding light upload on website webgl and on pc with out webgl but i can try look up webgl bleed light.

summer aspen
#

Don't remember if baking options cause this or faces without sides.

deft fiber
brisk bloom
brisk bloom
deft fiber
brisk bloom
summer aspen
deft fiber
#

This problem happens usually when using planes or quads for walls instead of something with thickness, like boxes

brisk bloom
brisk bloom
#

Not a planes

deft fiber
#

@brisk bloom Another option that should work is to make the walls overlap each other at the edges, so the seams are covered

brisk bloom
#

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

deft fiber
#

@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

brisk bloom
#

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

deft fiber
#

The quality of many effects on webgl is limited, but the principle is the same

brisk bloom
#

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.

near bison
#

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.

near bison
#

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.

mint sierra
#

Hi, where can I learn lighting in unity?

brisk bloom
mint sierra
#

what channel do you recommend

brisk bloom
mint sierra
#

Ah ok

brisk bloom
#

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

elfin breach
#

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

deft fiber
#

@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?

elfin breach
#

Is there a particular setting I'm missing?

deft fiber
elfin breach
#

test case

elfin breach
#

shouldn't take too long

elfin breach
deft fiber
elfin breach
deft fiber
elfin breach
elfin breach
#

should I try reducing backface tolerance?

deft fiber
#

Backfaces shouldn't ever be "reachable by the light rays" or they "absorb" the light

wary spindle
#

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?

deft fiber
wary spindle
near bison
#

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.

slate ocean
#

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?

elfin breach
slate ocean
elfin breach
#

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 :\

slate ocean
#

Yeah, I'm in the exact same boat haha. I appreciate the suggestions. I will try to experiment with that.

slate ocean
#

@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.

#
  1. 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

elfin breach
#

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

slate ocean
#
  1. 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

elfin breach
#

I'm restricted to using the built in pipeline, so I'm not sure if I have those same probe options

slate ocean
#

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

deft fiber
#

@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

elfin breach
deft fiber
#

Yes, always have to be mindful of object origins / anchors at probe intersections in those situations

placid magnet
#

hrmm waited 2 hours for a lightmap only for it to have somehow ruined my game lol

deft fiber
#

And when something goes wrong use the scene view lightmap debug modes to investigate

placid magnet
#

i thought it was kinda low

#

also am i going to have this 500mb lightmap bloating up my 200mb apk?

deft fiber
# placid magnet i thought it was kinda low

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

placid magnet
#

i think i mostly made it only roads and buildings. ill cut it down some more and have a play around. cheers

placid magnet
#

hrmm still sucks

deft fiber
placid magnet
#

like the console?

deft fiber
#

Texel validity and UV overlap views are usually the important ones

placid magnet
#

hrmm yeah it looks as patchy as the baked lighting

#

also i only have 1 light in the whole thing. just a directional light

near bison
#

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.

placid magnet
#

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

deft fiber
# placid magnet

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

placid magnet
#

texel and uv overlap are the same

deft fiber
#

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

deft fiber
placid magnet
#

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

barren crystal
#

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

upper fable
grizzled warren
#

Does enlighten work without baked lightmaps? I know it can work with them, but can it work on its own?

deft fiber
grizzled warren
#

Thank you Spazi

paper orbit
#

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?

paper orbit
barren crystal
#

Any tips for using masks as lighting?

silk ledge
#

keyboard model before and after baking. any idea why this effect was created? with some keys darkening

#

Thanks in advance!

stark temple
#

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.

silk ledge
#

got yeah so just add probes and rebake?

stark temple
#

Yeah, and make your object non-static and lit by the probes

silk ledge
stark temple
#

If the model is like this without any baked lighting then the normals are probably off

silk ledge
#

meant to say taht

#

any idea why the probes aren't efecting

#

the model?

stark temple
#

I wouldn't put the probes through the walls or floor

silk ledge
#

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

stark temple
#

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)

silk ledge
#

got yeah. Is that generally a good way to position them?

stark temple