#archived-lighting

1 messages · Page 4 of 1

misty lynx
#

Why are these two boxes using the same lightmap? I mean, it's good the engine determines there's enough space for both, but I'm not sure if that's something expected or configurable

#

Also I'm not sure why and how does this happen for built in primitives that aren't imported and can't have the resolution tweaked

deft fiber
#

You can control the parameters for lightmap UV compilation in the lightmap settings, namely the margins and resolution

misty lynx
deft fiber
misty lynx
deft fiber
misty lynx
#

Ok, now I see what's going on after playing with the paremeters, the lightmap resolution is what is always preserved, while the lightmap size is like a "target", if eveything fits in one 1024 map, everything goes there, if you need a little more space, another lightmap with the minumun necessary resolution is created.
Turns out my imported fbx mesh fell into that last "slot" with different resolution, nothing to do with different import settings

deft fiber
timber lichen
#

having a problem with the shadows where they just do not line up on my models and make them look terrible

uncut coral
deft fiber
#

Could be more problems besides that, though face orientation looks okay to me

timber lichen
#

alright thanks

#

ill give smoother normals a try

crisp hatch
#

Does anyone know why every time I bake the lighting these show up in this corner?

crisp hatch
deft fiber
# crisp hatch The lines on the wall

If you mean specifically the faint diagonal lines, to me it looks like there's a lightmap UV seam running across there for some reason, which bleeds over a bit due to padding and/or compression

#

The automated lightmap generation normally never splits continuous faces like that
But I would guess that generation isn't being used here

crisp hatch
deft fiber
crisp hatch
#

I'm using probuilder I have no clue

#

@deft fiber

deft fiber
# crisp hatch I'm using probuilder I have no clue

So, that's probuilder generating its own subpar lightmap UVs
It's intended for prototyping so it doesn't go all in on that kind of quality
If the level is exported as a mesh I expect you'll be able to use unity's usual lightmap UV generation for it

crisp hatch
#

I'll try this in a bit thank you.

deft fiber
rocky peak
#

In my humble experience, ProBuilder is really good for fast prototyping of levels and such, but it's not good once you harden your assets, and most of the time it's for reasons you're stating @deft fiber - it doesn't allow you precise control of things.

However, this could be my lack of experience on ProBuilder. And since I build my own assets from scratch in Blender/Max, I just never bothered to learn

crisp hatch
#

@deft fiber it was because an overlapping face

lost granite
#

Hey guys, I would've googled this but I'm not quite sure how to word it
when I have a scene like this, and I want to use reflection probes, how do I handle awkward fading like this where it begins reflecting the skybox awkwardly? do i just need to litter my scene with baked reflection probes or is there a better way?

#

or would this actually just be resolved by building the scenes lighting

#

i'd do that but it takes like 30 minutes to regenerate and i'd need to do that every time I make a small change

deft fiber
#

You can bake reflection probes separately from other lighting
If you use baked lighting it's usually best to use GPU baking and bake with low resolution before the final bake

lost granite
#

yeah that is what I do

#

i guess i need to bake the lighting at least once

#

this is a relatively large scene so even with the 3090 and gpu baking it still takes like half an hour

#

these are my settings

#

there are a lot of static objects in the scene because the asset im using is modular

#

im gonna try the lightmap parameters set to very low and see if its more bearable

#

oh i think im seeing part of the issue

#

it keeps restarting

#

i think?

#

nevermind its just only showing the progress for each individual lightmap

#

oh i think i see the problem

#

i reduced the max lightmap size but all that meant was that it was trying to fit the same resolution lighting data into more, smaller lightmaps

#

the ETA is always so inaccurate

#

it still takes forever to bake all this data

deft fiber
#

10 resolution is much better for a temp bake than 40
You can also to halving the three sample values

lost granite
#

right

deft fiber
#

Even if an object is static, you might not want it to be lightmapped if it's small or has a high polygon density; for example crates, barrels and non-emissive signs

lost granite
#

thats probably the case

#

theres a tonne of those in this scene

#

though

#

what do I do about modular walls that are quite small

#

but do make up entire large walls

#

like these segments are small

deft fiber
#

I don't think the size alone is a problem, but small size usually correlates with high polygon density

lost granite
#

ah yeah dont worry i think these are fine

#

these walls have LODs for 90 tris up close, and 2 at a decent distance

#

ideally from furthest away you could reduce the entire wall to very few tris

#

but thats not practical for a project like this being done by someone like me who is incredibly unskilled with blender

deft fiber
#

I think LODs also increase baking time since each LOD would have to be lightmapped separately
But I'd have to verify that

lost granite
#

that might explain it

#

the 3090 ti should be fairly beefy

#

oh there we go

#

it finished

#

honestly the scene does not look very different

deft fiber
#

With small objects you can allow them to contribute global illumination but use light probes instead of lightmapping to cut the cost

#

Or not have them contribute at all

lost granite
#

catYep thats something ill go and do

#

it still hasnt fixed the issue with like

#

all the very shiny and wet floors are reflecting the skybox

#

which looks very wrong

#

somethign the reflection probes make incredibly obvious

deft fiber
#

Decorative geometry like wall panels and edges of sidewalks are kind of bad for the lightmap workflow, compared to simple flat surfaces since you need so little calculations and data to represent them

lost granite
#

oh ive got screen space reflections in the project thats why you can se the somewhat-accurate-seeming reflection of that hexagon pattern

#

which might actually mitigate the need for reflection probes at all???

#

i do want to retain the option to turn it off since its fairly expensive

lost granite
#

on what I'm capable of by myself

deft fiber
#

Usually you'd want to use decorative geometry that looks okay even with just light probes, and which can be LOD faded/culled without breaking the surface

lost granite
#

im not sure i fully understand sorry

#

hang on i need to clear my definition of light probes

deft fiber
#

You want details to be non-critical for any lightmapping

lost granite
#

ive been inferring based on context so i dont have a concrete understanding

deft fiber
#

Reflection probes store reflection data, light probes store ambient light

lost granite
lost granite
deft fiber
#

Ideally also you want the decorations to be non-critical to the silhouette of the structure, so you can cull them over distance without making a hole

lost granite
#

sorry im back

lost granite
#

structures are prefabs and have lods and everything all good

#

but imma keep this for other scenes I may work on

deft fiber
lost granite
deft fiber
#

I don't see what's "wrong" about the image

lost granite
#

its just that theres a very clear point where the reflection probe fades

#

and it start reflecting only the skybox

#

which is especially terrible indoors

#

and like

#

if the solution is to carefully place reflection probes everywhere

#

thats fine

deft fiber
#

Ah, the dark square there?

lost granite
#

i just wanna know if thats okay

lost granite
deft fiber
#

Yes, you'll likely need to use more reflection probes than just one
But I wouldn't bother trying to place them everywhere

lost granite
#

another problem is kinda how innacurately things line up with reflection probes but I suppose in this case the thing I need to do is bring the reflection probe to a better spot

lost granite
#

just like crop the boxes?

#

that would be a lot easier if the editor UI for adjusting the boxes didnt stop showing up 😬

#

and the canvas frame too

deft fiber
#

Use a smoother blend distance, use as large as possible reflection probes

#

If you have a lot of them in small spaces, you'll have many seams between them

lost granite
#

i see

#

so for example

#

in this case I have a lot of objects to the left of this very shiny object

#

what do I do about the objects to the right

deft fiber
lost granite
#

do I just put the refelction probe in the middle?

lost granite
#

the elements are still visible

#

oh unles its only the canvas thats hidden right now

#

oh well

#

i have 3 canvases

#

i dont know for sure if thats what you're meant to do but I thought I read somewhere that it was what you were meant to do

#

yeah it definitely just stopped showing up

deft fiber
lost granite
#

woah really?

#

but wont lightr sources like not align at all

#

is box projection not meant to be ticked or something

#

or am I seriously overestimating the importance of lights alligning

deft fiber
#

I mean when not using box projection
If you do use it, then the probe bounds need to match the walls of the area

#

But in an open outdoors place like this that seems entirely unpractical

lost granite
#

ah okay

#

one more question

#

for now

#

thers supposed to be a box within the area the probe includes right

#

or at least when you press either of these two buttons

#

because im not seeing a box appear

#

and it would make editing the box size monumentally easier

deft fiber
#

The boxes may be hidden due to visibility toggle in hierarchy, or because of gizmo visibility settings or probably for other reasons too, hard to guess
The inspector shows what the bounds should be as values to give you an idea where they're supposed to be

lost granite
#

oh wtf it was off in the gizmos

#

my bad

#

i was sure id toggled everything on

#

stuff like these totally detatched red light reflections are definitely kinda odd tho

#

cos box projection is definitely making that light line up with the billboard that its reflecting slightly more believably

#

but it also does mean i gotta make tyhe reflection probe area smaller so it doesnt appear in places the billboard wouldnt be visible from

deft fiber
#

Yes, that's the big advantage of box projection
But then you have much more seams to deal with

lost granite
#

is it alright to be picking and choosing when to use either in certain areas

deft fiber
#

You would place the center of the probe in a place that doesn't have extremely distinct light sources, if it's meant to be used in many places

lost granite
deft fiber
#

You already have SSR for handling the direct reflections though

#

Consider that even triple-A games don't bother getting this part perfectly right

#

As long as the lighting looks right enough for the area, players won't care that they don't match the light sources

lost granite
#

yeah it seems to be fine as long as i'm careful with calculations

#

the one on the left is box projection enabled

#

the fade distance is only 2

#

should it be higher

#

hmmmmmmm that being said its still pretty clear when the reflections begin actually lining up with the objects theyre coming from even at this distanbce

deft fiber
#

Which is why I recommend big probes without box projection and without really bright lights on the cubemap

#

The more vague they are the more forgiving they a re

lost granite
#

yeah

#

unfortunately bright lights is kinda of the aesthetic

#

lmfao

#

so its kind of a tough situation

#

now I know how the cyberpunk 2077 devs felt
ignoring the time crunch and also literally every other thing they had to get done in the 3 minutes they had to produce that game

deft fiber
#

You can cheat by having the brightest lights disabled when baking the probes and then enable them back on
The player will see the lights in the scene as well as their SSR reflections and it'll look okay

lost granite
#

oh true

#

man that is really frustrating though

#

having to manually disable things when you are baking whatever

deft fiber
#

The main thing the probes are responsible for is to occlude the sky in the streets and alleys

lost granite
#

atm its looking like im gonna need to create blocks to build the navmesh for my game

deft fiber
lost granite
#

true

deft fiber
#

Reflection probes can be used for realistic and accurate reflections only in the most ideal situations

#

Which is namely box-shaped rooms that can match the box projection perfectly

lost granite
#

another question actually, if I have a reflection probe within another, and that reflection probe is marked as more important, will it properly fade between the two at the edges of the overlapping area

deft fiber
#

So I would presume

lost granite
#

okay so i should just save box projection and stuff like that for ideal situations

deft fiber
#

That's what I'd recommend

lost granite
#

like a little area like this??

#

ignore the endless void

deft fiber
deft fiber
lost granite
#

i guess its trial and error

lost granite
#

since im only just getting started and this is my own personal thing i figure its better to take my time and learn the right way to do things

#

"only just getting started" being 3 and a half years in but regardless

shut dawn
#

i don't know if this is the right place to ask this as a beginner, but when i get too close to a wall, the flashlight's light makes a line, how can i fix this?

#

the line is always there but it doesn't show up if i don't get close to a wall

unique mango
#

Im beggin for help... I hate lighting in unity. What can I do to fix this shit. The funny thing is that when I move camera in the different direction shadows are kinda working...

#

the map is connected perfectly and there are no gaps between the walls

#

this is directional light from the outside

#

but this is not the only one problem I have.

#

those are shadows from point light

chilly kettle
#

First: Use Shadow caster Geometry
Second: Shadow Bias of your Lightsource

unique mango
#

those are settings for the point light

#

this is directional

unique mango
#

what is that btw

#

and where

chilly kettle
#

Geometry that avoid light from hitting your 90° edges there

#

its typical problem and can be solved easily by using additional geometry that blocks the light there

unique mango
#

hmm. so there is no other way to fix this?

chilly kettle
unique mango
#

well... still not sure what can I do.

chilly kettle
#

Go into Blender, import your model and build a cage outside of it that blocks the light from outside ^^

#

Or do it with probuilder in unity

unique mango
#

if anybody have any other ideas please answer :((

limber delta
#

Shadowcasters are the way to go

deft fiber
unique mango
#

it's even worse

#

well... no matter how i set this it's not working

deft fiber
# unique mango

Well yes, this is what you need shadow casters for, as mentioned

#

Extreme bias values can make it seem like it fixes that issue, but it doesn't and causes more issues in turn

unique mango
#

yeah i see

#

I know how individual values work, but for years I have not been able to deal with this problem.

#

I tried lot of solutions and didn't find the right one...

deft fiber
unique mango
#

I mean that for example someone sugested to put some walls behind but you know doing this isn't the best option.

unique mango
#

trust me it's not...

deft fiber
#

What's a better one?

unique mango
#

idk maybe writing my own rendering engine XD

#

but how....

#

we all know unity sucks

#

at lighting

#

I don't want to play around with "fixing" sunlight as then complications will come out of it as I want to create a scene with an open environment. just as I do now.

#

point lights are even worse...

#

shadows are not casting from actual object.

#

none of those funny values can solve that problem

deft fiber
#

The reason this happens is because when the light renders objects again for shadow casting it shrinks its geometry, so that the shadows don't poke through the surface, which consequently means seams at edges where vertices are disconnect or have sharp/split normals
Which means you can also

  1. Use smooth-shading for all corners
  2. Have another variant of the mesh that's smooth-shaded which you use as shadows only, whereas the visual mesh casts no shadow
#

Extra shadow caster meshes are likely the best solution out of these three

#

You could automate solution #2 pretty trivially if you have the know-how
Not sure why it isn't already an option

unique mango
#

yeah

dawn cape
#

Does this look decent if not any tips u guys can give

arctic pier
#

Looks cool but in my opinion there is too much bloom

dawn cape
#

Will change then thx

quasi copper
#

hi i have a problem with 2d light... the light go through the player

#

how to fix that...

#

i want the light to affect the player but when the player is over it, it should not go through the player

quasi copper
wanton rune
dawn cape
#

lighting goes a really long way if u do color theory 🙂

quasi copper
dawn cape
#

not entirely sure how to do some of those but will try

dawn cape
#

Thx will do

#

those buildings were placeholder anyway

loud laurel
#

last i checked, lights arn't supposed to work like this

unique mango
#

there is NO WAY TO FIX IT

#

and YES i tried to play with those bias/normalbias/nearplane options, it's getting worse and worse

#

quality settings are the highest.

#

shadow res HIGHEST

#

well... im 101% sure there is a solution to this but noone on this server won't tell me ;))

#

and I don't mean additional geometry or another fckng sht

#

idk what i want new screenspaceshadowsshader if needed

#

whatever what, some experts please help

#

with this shadows I CAN'T RELEASE MY GAME

#

I tested EVERY SINGE SETTING in quality/light etc

#

every singe one of them are not working correctly

#

so where is the solution

deft fiber
#

Projects never really "just work out" without having to resort to workarounds in some way or another

unique mango
#

sadly but another geometry increases performance cost

#

and I tried to make it

#

but it's working even worse or the same

#

any other ideas?

deft fiber
limber delta
deft fiber
#

Geometry is cheap

#

The only option I didn't remember to bring up is a shader that renders smooth shaded geometry with flat normals, so it appears as smooth for shadow casters but not the camera
But that one is probably not worth the trouble over simple shadow caster geometry

limber delta
#

Yes, I use one prefab and copy it over and over (while adjusting its size when needed)

#

Does anyone have any idea why those tiny lines of light appear? They go away when I get closer to them. I use a mixed light to lighten that area. Unity 2021 and URP.

limber delta
#

I feel your frustration.

unique mango
#

good

limber delta
#

ok.

unique mango
#

the same problem for about 4 years

#

no solution

#

unity can't fix it

limber delta
#

Right. Have you tried creating a test scene and isolating the problem?

unique mango
#

yeah many times man

limber delta
#

ok ok

unique mango
#

the same problem with shadows on fricking default cube and plane

limber delta
#

Right, and just to be clear. You haven't tried creating a shadowcaster yet?

unique mango
#

maybe i tried or maybe not. i tried many things

limber delta
#

ok

deft fiber
chilly kettle
#

Can you PLEASE open a thread?

limber delta
deft fiber
limber delta
#

I tried without the normalmap on the floor asset (also with generate mip maps off) but it didn't make any difference. I'll see if shadow distance affects it.

#

Oh wow. Ok, I removed the emission map and that made the "error" go away. Hmm. Maybe my white emission UV island is too close to the floor one.

#

Thanks man!

mystic raptor
#

Encountered a weird bug (or rendering quirk?) with using realtime reflection probes and an HDRI sky. This room is supposed to be pitch black, but a realtime probe samples the skybox across all surfaces, making the room overly bright, while a baked probe renders it correctly

#

I can tell its not a shadowmap problem cause I can disable it in the custom frame settings and you'll see the direcitonal light affecting the room now

#

none of the custom frame settings let me toggle off the skybox lighting it up like this though

#

disabling the volume does return it to being black so I know for sure HDRI is affecting this

limber delta
#

Actually, I solved it by giving my UV island-- for the geometry that emits light -- a bigger margin.

That is interesting though, as I actually still see that type of super thin light flickering sometimes in assets. Making a VR game if that makes any difference.

red pagoda
#

hey! I am having tons of trouble today buthow do I make this area light larger 🤦🤦🤦

daring haven
#

(and area and spot lights)

red pagoda
#

noo i came here so i wouldnt bug you more xd but my intensity is max

daring haven
#

No, you can edit the numeric field and make it bigger. The slider is at its limit. You can also change the units.

red pagoda
limber delta
#

right, you probably have to balance it with intensity and range

red pagoda
daring haven
#

I keep adding zeros to the end until its about right, then start fiddling the leading digits. (Yes, I am a hacker! lol!)

#

Just under the slider is a numeric field with drop down for units - I add zeros to the numeric field until it looks good

limber delta
#

A tip, when testing, really exaggerate values. then later make finer adjustments

red pagoda
#

ahh can you show me which one is the numeric field lol i am so dumb xd

#

i feel so bad making you show me everything a-z

limber delta
#

Are you using HDRP?

daring haven
red pagoda
#

got it thanks

#

that worked amazingly I cannot thank you enough I promise this is my last one

daring haven
#

One of the drop down values next to it (EV 200?) shrinks the numbers to more like 20 to 30, which might be easier to fiddle with. Not at computer to remember the value

red pagoda
limber delta
#

For sure, just wondering. Because in URP you can't use realtime area lights

red pagoda
#

yeah that seemed to do the trick

red pagoda
unique mango
#

and by the way, has anyone realized that the Normal Bias option in spot lights does not work?

#

no difference when manipulating this slider

#

point lights are so f*ckd up.

#

this is when i leave them on default

#

and this is what i want

#

but

#

im using negative bias values

#

by my own script

#

and this creates a problem

deft fiber
unique mango
#

that's what i want to achieve(idk the spelling)

unique mango
deft fiber
#

Use the bias values only as recommended
Don't try to bruteforce this light leak problem with bias values, it's not the solution

unique mango
#

I know it's not

#

used this only for demonstration

deft fiber
#

Spot light normal bias value seems to function just the same as for any other light, so it's not universally broken anyhow

unique mango
#

um I think it doesn't work.

#

no changes when manipulating values

#

in directional light of course it's working

#

but in point lights it's not

#

u know what am I talking about or not...

#

haha so yeah I checked one more thing.
in directional light: working - bias and normal bias
not working - near plane offset XD
in point light: working - bias, near plance offset
not working - normal bias XD

#

working I mean when you change those settings the changes are visible somehow

red pagoda
#

https://www.youtube.com/watch?v=nYIbDAW950s the first 5 seconds of this video show exactly what I am looking for is if anyone knows how about I could make that almost no shadows effect? Thanks! (I use hdrp so some stuff wont work... I think)

limber delta
#

@deft fiber i saw you mentioned in the thread above that the shadowcasters should be smooth shaded. Do you know if the box mesh in Unity is smooth shaded? Or how to achieve that.

little condor
# red pagoda https://www.youtube.com/watch?v=nYIbDAW950s the first 5 seconds of this video sh...

That's quite easy to achieve in HDRP as the lighting in the room of that video is very basic. It looks like it's just ambient lighting with ambient occlusion post processing.

So in HDRP, add a Volume > Global Volume gameObject. On the Volume component add in 4 overrides; Ambient occlusion, Exposure, Visual environment, and Gradient sky.

Disable your directional light. On the Visual environment, enable Sky Type and select Gradient sky from the drop-down. On the exposure settings, set the mode to 'fixed' and then play with the Exposure slider, maybe around 2.0.

That should start to look a bit like what you want, but you will need to experiment with the various options.

red pagoda
#

what is overrides listed as?

#

wait I think I get it

#

nope lol is it children

little condor
#

Ah, create a new profile first.

red pagoda
#

ahhh thanks

#

I think my lighting is reverse? the lower the exposure the brighter it is?

little condor
#

Yeah, I might have a different setup on my project, but you just need to adjust the exposure until it looks right. Or, if the exposure override makes it worse, just disable/remove it.

red pagoda
red pagoda
little condor
#

The exposure setting tries to mimic how a camera works. In low light levels the exposure (how long the shutter is open for) is increased so more light can get in and brighten the image, ideal for night-time scenes or dark rooms.

red pagoda
#

ohhh got it

#

would there be a way for the textures to show without blinding me lol

#

this is what it looks like without global volume

#

also if its too much of a bother to fix I could just remove hdrp and put 2 directional lights

silver grove
#

So I've had this grudge with directional lighting for a while and can't figure for the life of me how to have both directional lighting whilst having completely dark areas without having this weird specular reflection:

#

How do I fix it?

silver grove
#

evident when he looks at the glass and its reflecting light from exactly where the player is

little condor
red pagoda
little condor
#

That would do it too 😁

peak pilot
#

How can I smoth out these sharp lighing errors

hard grail
#

Hey, can anyone tell me why I'm randomly getting some lights in my scene that I can't delete or change or anything?

#

When I press them, they do not exist in the heirachy yet they affect my scene

deft fiber
# limber delta <@166982635950702592> i saw you mentioned in the thread above that the shadowcas...

It's not
If you can somehow get to the cube's import settings, you could set the normals to be recalculated as smooth
However that only works with geometry that shares vertices, not if the faces are entirely separate /unwelded
Also, Unity hides its built-in assets so well you might not be able to access it
It's probably easier to just set the Blender's default cube to smooth shaded and export that

limber delta
deft fiber
limber delta
deft fiber
#

If that setup works without issue, I probably wouldn't worry about changing it

limber delta
shadow horizon
#

How do i fix this light bleeding?

limber delta
deft fiber
#

Shadow caster geometry are one solution

shadow horizon
#

i "solved" it with editing the lights bias etc, but then it adds artefacts in other places

#

one step forward, one step back

deft fiber
#

Though first it's important to diagnose what the exact cause is

shadow horizon
#

my experience with Lighting is nearly negative, i constantly have problems with this type of thing and never learn it, because frankly, it's quite tragic

#

the whole system

#

Why is it so jagged, its 4096 resolution 😅

deft fiber
#

That type seems to be fixed by bias values, but you can't ever tune them enough for it to work without other problems

deft fiber
shadow horizon
#

reducing the "outer spot angle" produces very little jagged ness

#

at the expense of smoothing out the insensity across the light projection 🥹

deft fiber
shadow horizon
#

this is the best i can get it

#

Could it be because the object im trying to cast a light on... is 100 scale

#

would changing the scale factor of it fix that

timber lichen
#

as far as i understood "Mixed" light means it acts as a baked light for rendering lightmaps for static objects but also as a realtime light for dynamic objects

#

but putting it as mixed doesnt seem to affect any dynamic object if i change the intensivity

limber delta
#

Basically I want a particular light to only affect some of the geometry in the scene.

deft fiber
daring haven
#

No idea when introduced, but you have to turn them on in the project settings I think for them to appear elsewhere.

limber delta
#

I see. Thanks

timber lichen
#

is there still a light limit as in how many lights u can have on in a scene?

chilly kettle
#

In URP there is a light limit per Object

uncut coral
#

What is the optimal lightmap size for android game?
Is 3 lightmaps of size 2048x2048 good for a scene in android game?

pine zodiac
#

I want to have multiple objects with their own assigned light sources, and only have them be affected by their assigned light sources. How would I go about this?

#

Nevermind I think I need to use layers

hard grail
#

Can anyone explain why I'm getting these SceneLights?

#

I can't disable them or anything

#

I can delete them by removing the 'light' component but then my scene view goes all white. If I then reload the scene view panel, it regenerates these lights again!

deft fiber
hard grail
#

They are not

#

They seem to be present in every scene

#

And they actually are affecting the lighting lol

#

I get specular off my material from it

#

Here I've created a completely empty scene and unloaded all the other scenes

#

I just can't seem to get rid of them at all

#

They also seem to be untouchable and act like they're checked out lol

#

We are using Unity 2021.3.12f1

deft fiber
#

I think there's only meant to be one set of three, so there being two sets of three might be an editor glitch

#

Try to catch a moment when Remy is active in the HDRP channel, they usually have answers to all these mysteries right away ^^

silver grove
#

love how light probes dont work with progressive cpu

deft fiber
wraith mica
#

I seem to be having some trouble with my fill lighting in my scene. These white "cracks" seem to appear on the ground of my scene here, built out of cubes with some of them overlapping. Is there a reason to why this happens and is there a fix? When I turn off the Fill Light the cracks do not appear. The cracks change location/direction upon moving the camera

thin cradle
#

Hey, how can I make lightning like this guys here https://youtu.be/nmtBq4Z9sD4?t=246
I tried to make spotlight too but I dont see the "Spot Angle" lighted out like in the Video at 4.06
Is it just dust particel system or how can I make this happen ?

Play No-Snake Hotel: https://two-star-games.itch.io/no-snake-hotel
Watch Barjis video: https://youtu.be/8y2pXdXcZyA
Wishlist Choo-Choo Charles on Steam: https://store.steampowered.com/app/1766740/ChooChoo_Charles/

WHO WON THE CHALLENGE? https://youtu.be/g4SgRr6nA5Q

------------------------------------------------------------------------------...

▶ Play video
#

like this here

#

Is it a bloom effect?

thin cradle
#

And How is it possible to get the Lightning around the lights on the Roof?

I know the light is a Spotlight But How does he get the light Circle on the top of the light and How can i get the rays of the light Like he does ?

silver grove
silver grove
silver grove
# thin cradle

not sure what you mean by this, like how he made it wide?

thin cradle
thin cradle
thin cradle
#

This it the circle on top around the light I mean. Does he use another light Object to get this?

upper fable
# thin cradle like this here

No its not bloom alone, there is clearly bloom pp effect enabled but in addition to that you need to get some sort of volumetric lighting system or just fake it in some way like having this type of cone shape and making/getting a shader that draws the mesh in a way it looks like that

silver grove
#

ah yep thats right as well

#

volumetric lighting is in affect

silver grove
#

it doesnt create the light rays itself

#

three elements to it, the spot light to cast the lighting, the lightbulb model with emissive, and volumetric lighting

silver grove
thin cradle
thin cradle
silver grove
#

you can do that by making a white emissive texture and assigning it to a round shaped model like that

upper fable
deft fiber
silver grove
#

I'll try updating and see what happens

#

cheers

#

I think unity just doesnt handle planes very well, making my meshes not as tiles seems to fix many lighting issues

deft fiber
unique mango
#

just normal looking point light shadow right?

#

nah fck u btch LOOK CLOSER. and there is NO WAY to fix it

#

quality settings are the best resolution and every fckn sht

chilly kettle
#

Did you adjust the Bias settings of the light?

unique mango
#

of course

#

even the value of 0 is same sht

chilly kettle
#

im quite sure i have read a way to get rid of this a while ago. let me look

#

What size does your building have there?

#

in unity units?

unique mango
chilly kettle
#

ok

#

Ok what i found what can help is increase the cascade count of shadows or the shadow resolution if you didnt try this

unique mango
chilly kettle
#

looks okay as well

deft fiber
#

Thread

wise hawk
#

Does anyone know where exactly in the cgincs the lighting from the lightmap is mixed into the gbuffer in deferred with baked lighting? It seems the baked lighting is premixed into the gbuffer's albedo by the time the deferred shader can do anything

#

(I'm trying to do texel lighting with the lightmaps)

glacial heron
#

This happens to my scene when i load it. Is there a way to light every face of the 3D objects?
I can't find anything working besides the directional light.

unique mango
#

Does anyone know how to tweak or comment out mydist parameter in UnityShadowLibrary.cginc built-in shader?????

#

i found something that can be a good solution for weird point light shadows

#

but im not exactly sure what to do and where

#

this is the possible result

deft fiber
crisp rapids
#

not entirely sure where to put this but when I make my own procedural skybox to customise the colour over time it goes orange even though the atmosphere tint is white, anyone know why this happens?

silver grove
#

@crisp rapids have you tried turning down exposure?

unique mango
#

left shadow: point light
right shadow: directional light

Directional is just fine I don't want anything more from that. But it's not the best.

Point light is close enough to be fine but it's not really unity's job but mine. I made script for that. Of course I won't let it be as it is because it's not the proper solution. But if someone can help me get similar result without writing any new code and hacking nasa's systems I'll be really grateful.

#

well... this is without the script

crisp rapids
silver grove
#

either that or, you mess with the atmosphere thickness

#

the exposure thing is for when you have it as dark as possible, itll have this red glow to it which is fixed by turning off exposure

crisp rapids
#

ok

#

its weird how this is happening since the default skybox works fine but this one doesnt?

crisp rapids
#

wait i only seem to have half the settings im meant to have

#

fixed it, i seemed to have 2 shaders with the same name, the second one overwriting the default one, deleting that one fixed it

timber lichen
#

whats the light limit

deft fiber
timber lichen
#

thar i need unity pro?

#

yea idk

amber arrow
#

Hey, I'm using 2019.3.11f1 and everytime I go to click 'generate lighting' it gets stuck on 'Create Geometry 0/11 1 Task' and will not budge, I've left it for an hour at this point and tried a lot of configs on the lighting tab. So stuck

#

2019.4.31f1* version number

#

nothing in the console, just nothing happens

deft fiber
amber arrow
#

tried that multiple times

deft fiber
#

@amber arrow Just to make sure, you are trying to use baked lightmapping, not just generating lighting to save environmental lighting?

amber arrow
#

um...not quite sure what the difference is, it is for a VRChat world.

#

I'm a total novice

#

I guess baked for GI and dynamic for shadows

deft fiber
# amber arrow I guess baked for GI and dynamic for shadows

Baked lightmapping means using a raycasting process to produce lightmaps that represent bounce lighting
Generating lighting can include that, but doesn't necessarily have to, in case all that's necessary is to generate ambient and reflection probes from the environmental lighting
I assume baked bounce lighting is what you want though

amber arrow
#

yes

deft fiber
# amber arrow yes

What I'd do in that situation is try to make a super simple test scene for light baking to see if it works there
Static geometry with too high polycount can cause the baker to hang up
If 2019 has the option for progressive GPU lightmapper, try that instead of CPU or vice versa

amber arrow
#

that was using the GPU lightmapper, have a 2070super. Ended up grabbing Bakery as many people have recommended it and baking fine, just need to figure out dynamic shadows with it.

deft fiber
#

Usually if CPU baking works but GPU baking fails, usually means the editor has failed to access the GPU properly
Every time that's happened for me it's worked to restart the editor and make sure the GPU drivers are up to date

#

Dynamic shadows together with baked lighting are used via "shadowmask" and mixed lights
Don't know what the Bakery equivalent is

silver grove
#

anyone know whats causing this botched lightmapping?

#

the right side especially, its not as close as the left side yet reflects indirect light like its close

deft fiber
silver grove
#

damn not enough bounces can cause that?

deft fiber
#

The light rays bounce from the far wall to the side walls, but will have to bounce again to reach the far wall again, so the limit may be terminating them prematurely

silver grove
#

makes sense, Ill give that a try thanks

rapid crow
#

anyone know how to fix this problem? In game (after I clear cache) the lighting looks completely fine but as soon as I press play I guess something disables??? not exactly sure what's wrong here

lament barn
#

Does anyone know why it seems as if parts of my model are lit from the outside instead of the inside?
its especially weird considering the mesh normals seem to be oriented the right way (its one sided and shows no face on the outside)

silver grove
#

yeah so... outside faces dont block lights @lament barn

#

you can try double sided shadows

#

although you will run into shadow seems

lament barn
#

I don't need them to block lights, im only lighting from the inside

silver grove
#

the other option is to make it a 3d cube

#

oh?

#

You mean the desk?

lament barn
#

the problem is that the room is not being lit from the inside

silver grove
#

oh right

#

are the walls and floors static?

#

also depends what the lighting setup is

lament barn
#

the walls and floors are all part of one big mesh

silver grove
#

ah yep... okay so that may be a problem

#

I've tried combined meshes and that completely fucks up the lighting

#

probably something similar there?

#

might want to try making the pieces modular as walls and floors

#

probably will get better results

lament barn
#

I did just fix the problem by recalculating the inside normals on every room actually

silver grove
#

oh awesome

lament barn
#

however im still curious as to why that would fix the issue at all, considering they were already oriented correctly

#

otherwise you couldn't even see the room

lament barn
#

every seam would visibly show up

silver grove
#

yeah... not too modular to the point where you have multiple pieces for one side of a wall

lament barn
#

even if I scaled them to snap to the absolute grid in Unity

silver grove
#

can I see the after?

lament barn
#

baking :p

silver grove
#

fug aight

lament barn
silver grove
#

wow

#

its fucking beautiful

#

Im gonna try making rooms out of one giant mesh now lol

#

Ive been putting it off because Im not sure if the effort is worth the risk of it going awol

lament barn
#

I mean I wouldn't do it for anything non-low poly tbh

#

texturing can become a mess doing it that way

#

luckily in low poly i can just use flat colouring

silver grove
#

yeah true

#

lighting becomes more important the less detail things are

lament barn
#

so I can get away with this amazing uv map lol

silver grove
#

oh god

#

yeah alright

deft fiber
#

Then check if it persists in build

rapid crow
#

@deft fiber it just looks like this now

deft fiber
rapid crow
#

no now they just dont work at all

#

nvm I got it working

silver grove
#

what did you do?

rapid crow
#

thank you 🙏

rapid crow
#

so I just clicked chose the lighting data asset that looked the best to me in "Baked Lightmaps" in the lighting window

#

and that seemed to fix the problem

deft fiber
#

@rapid crow Helps to be specific about what kind of lighting (baked, precomputed, realtime, whatnot) you intend to use, so I don't have to guess

rapid crow
#

I'm extremely new to lighting

silver grove
#

@lament barn my room already looks 100%+ less buggy as a full mesh, thanks for the inspiration lol

unique mango
daring haven
#

That image! What is it? Halloween? ... oh, hang on....

acoustic tartan
#

So another "help light is bleeding through" issue

#

The meshes are generated with pro builder

#

The hallway mesh and the room mesh are two seperate objects

#

The light is confirmed to be 100% inside the hallway and I've confirmed that it's the closest light source to capsul that's causing the issue. Two-sided shadows have been enabled for the meshes.

#

Also this issue only appears in Play mode, when in Editor mode the lighting behaves as expected

#

Any idea what could be the cause?

silver grove
#

As I found out yesterday (you can scroll up) making the rooms as entire meshes would make it much easier for the lighting in unity to be accurate

#

I too had massive issues with choppy lighting or leaking lights when using probuilder

#

that being said, full meshes can have leak issues as well, just make sure there are no split edges

acoustic tartan
#

Unfortunately that's not actually practical as doing so will get you wrecked by the 6 max light sources per object limit

silver grove
#

is 6 max light sources baked or realtime as well?

acoustic tartan
#

Only realtime

silver grove
#

if you're able to find a resolution to getting accurate lighting results with probuilder, I have a vested interest

#

otherwise I just found it much easier to use mesh rooms and design around the light limit

acoustic tartan
#

Sure, though in this case I have assume it's something silly, since the lighting DOES actually work correctly in edit mode

languid violet
#

this is scene and camera view. Looks a bit different. Why are there no shadows on the cam view?

silver grove
#

is the light coming from where the camera is?

languid violet
silver grove
#

it may be a case of perspective, does it show if you move the camera to the right, away from the light?

languid violet
silver grove
#

then its probably doing it correctly

#

your camera will not see the shadow its casting

languid violet
#

why?

silver grove
#

because perspective

languid violet
silver grove
#

if your eyes shot out rays of light, you will never see shadows in your entire life

languid violet
#

ah i see

hybrid pebble
#

Does anybody have ANY idea of why this looks like this?

#

i`ve been follingaround

#

with every single possible setting i can think of

#

and nothing works

#

to fix this

#

idk what to do anymore

#

anyobjet i add to the scene has hard shadows like this

#

i turned off every single light on the scene

#

yet this still remains

#

and idk why

#

it looks like i mixed two separate objets, but this is basically the inside of a cube, it shoudln`t look like this, all the shadows are messed up

deft fiber
hybrid pebble
#

alright

hybrid pebble
#

sorry

deft fiber
hybrid pebble
#

urp

deft fiber
hybrid pebble
#

ok

#

ok

#

found it

#

and trying to change things within this, doesn`t solve this

#

i am

#

stumped

deft fiber
#

It looks like baked GI and "auto generate" are on, but there's reported to be no lightmaps so I'm not certain what's going on

#

Perhaps you're attempting to bake lighting on non-static meshes
Could also be that you have several renderer assets and you aren't changing the right one

hybrid pebble
#

I do have several

#

I guess i need to look into every asset to figure out the correct one

deft fiber
hybrid pebble
#

Thank you
I has no idea

spark pawn
#

Anyone have any idea why my baked Lightmap UV charts look like this? I would assume one color per chart (UV Island/shell)

silver grove
#

looks beautiful though

hollow dagger
final lance
#

this engine is very strange sometimes

#

does anyone know the reasoning behind why bloom PPEs affect every object in the scene?

deft fiber
#

Bloom in particular has a "threshold" value which ignores pixels below certain brightness value

final lance
#

and bloom is achieved through HDR right? so wouldn't giving an object a material with a color mode prop set to default make it ignore the bloom?

#

or am I misunderstanding something

upper fable
final lance
#

essentially I want to exclude some objects from the bloom effect

final lance
#

what property would that be?

upper fable
#

color

#

also emission if thats in use

final lance
#

I realize I'm asking a lot of questions so I apologize, but I'm just trying to clarify some stuff

#

I DO notice that a color's value impacts the bloom intensity, which makes sense, but what if I want a high value color without the bloom?

#

I would change the threshold on the override?

upper fable
final lance
#

hm.

#

that's not ideal but if it works it works

upper fable
#

PP effects are always added to all pixels on the camera

final lance
#

thanks for your help. That was extremely useful

deft fiber
#

Normally the albedo color cannot go higher than 1 or 100%, so with a very bright coloured object whether it surpasses your bloom thershold or not is dependent on how much light it recieved

#

A sufficiently high bloom threshold in most scenarios will let you display fully bright albedo colors without blooming, and where you want blooming use a very intense emission color

#

This gets tricky to fully control if the player can stick objects really close to lights to make them really bright, or if you're working with adaptive exposure

primal rover
#

I'm having issues with the lighting in a house I'm using. I'm basically trying to make the house darker, I was recommended deleting lightmaps which I've done but now it gives me an off-color kinda look. I was told I needed to bake light probes with new settings and bake the reflection probes. But I can't really see where I'm supposed to change the light probes.

#

It looks like this:

#

But i want it to look like this:

#

i just dont understand lighting i guess right now, and looking for someone who might know something about whats going on

silver grove
#

you need lightmaps

#

thats how it tells light to bounce and illuminate stuff

primal rover
#

i was told to remove the lightmaps

silver grove
#

you'll need to modify the lighting parameters to get it the way you want them to look like

#

there is no way you're going to achieve the second image without global illumination

#

either that or ray tracing

primal rover
#

ytea im very new to all this and like

#

lighting seems so tricky dude..

silver grove
#

yeah...

#

it is

#

very finnicky

primal rover
#

yeah

silver grove
#

its worth spending days on, so get your gameplay loop first before being concerned with lighting

#

and art stuff in general

primal rover
#

worth getting gameplay down before lighting

#

?

#

maes sense yea

#

good advice

#

ill read that forum, might as well ask this rq if u know can u just simply darken lightmaps or does it not work that way

silver grove
#

do you use directional lighting?

primal rover
#

yeah

silver grove
#

mega problem

#

it likes to highlight dark areas

primal rover
#

does that affect the INSIDE tho

#

cuz i have it outside

silver grove
#

yes

primal rover
#

ohh

silver grove
#

dark shadows

primal rover
#

should i disable it entirely?

silver grove
#

If you make it a gradient, you can modify equator and ground colour

#

if you turn that black you will see how dark you can make things

#

welll

#

if you need day night cycle then not really

primal rover
#

nah just needs to stay night

silver grove
#

makes it easier for you then

#

yeah so instead of using colour lighting from skybox, change that to gradient

#

sorry actually, directional lighting isnt the problem

#

its the skybox lighting that is

#

which is affected by directional lighting

primal rover
#

in the actual lighting settings

silver grove
#

yeah

#

where you assign the skybox and sun

primal rover
#

yee

#

i see

#

hm, that doesnt rly seem to actually change a lot

silver grove
#

did you bake the lightmaps?

#

no lighting thing is going to change a lot if theres no light mapping

primal rover
#

ye theyre baked

silver grove
#

you'll need to mess with the intensity parameters and such

primal rover
#

here can i tell u exactly what the creator said to me? it seems we're on opposite time zones thats why its hard for me to talk to him about it

silver grove
#

sure

primal rover
#

so for pre-context here I had sent him the 2nd image that u saw (the actual good looking one)

#

and i really just dont see what he means i cant rly find options hes talking about

#

i can remove the lightmaps like he said and it gets closer

#

but not quite u know what i mean?

#

when i do that it removes the lightmaps

#

but u said theres no way u can do it w/o lightmaps

silver grove
#

oh this is stoer asset?

primal rover
#

ye

#

me and a buddy were like fuggit and we tryna learn stuff and we found this one

#

it had a lot of learning potential ig u can call it

silver grove
#

so what if you just deleted it all and created it again

#

open another unity project

primal rover
#

just like completely start over with it?

silver grove
#

solely for that

#

and mess around with it

primal rover
#

shouldnt be too bad, id just have to re-apply a couple scripts but

silver grove
#

well not even

#

you can keep this one

primal rover
#

but make another one?

#

like a duplicate

silver grove
#

just make another one so you can exzperiment with the lighting

primal rover
#

purely to fuck with

silver grove
#

yes

primal rover
#

hmm ig i havent thought of that rly

silver grove
#

I hav like 10 projects full of trash

#

just so I can experiment

primal rover
#

yeah i never thought of that

#

not a bad idea

#

i still wouldnt rly know what to do exactly but

#

i WOULD be more comfortable messing with stuff

silver grove
#

ye

primal rover
#

cuz rn im kinda like afraid ima destroy some thing major

#

and its all fucked

#

that is a good idea though dude

silver grove
#

have fun bro

#

dont be afraid to start over

#

good thing scripts can be just copy and pasted over

#

but if you have a project with lots of worldbuilding and such already

primal rover
#

yeah exactly

silver grove
#

dont import stuff you dont know

#

I think its good practice to just import stuff into dummy projects first just to see if they actually work first

primal rover
#

yeah

#

that sounds like a good idea

#

also ig i can ask this but im p sure i know the answer lol

#

u just obv know more than me but

#

ok so

#

this asset has a URP & HDRP versions

#

so when creating the project, i can still just create it as a 3D (core) project right?

#

or do i need to do any bs special shit

#

like just, bam right

silver grove
#

3d Core is bult in

primal rover
#

ye

silver grove
#

you want the (URP) or (HDRP)

#

there's three render pipe lines by default

primal rover
#

bottom one

silver grove
#

Built-In, URP, and HDRP

#

URP is more lightweight and performance friendly than HDRP

primal rover
#

but HDRP just looks better?

#

id guess

silver grove
#

HDRP has better graphics yeah

primal rover
#

yeah

#

while i dont need it to be triple A

#

style of graphics lol

#

i dont want it looking bad

#

is there a big diff between the 2?

#

is it WORTH using HDRP version if ur not going for like an insanely beautiful game?

silver grove
#

imo not really

#

not too familiar with HDRP tbh

#

but pretty sure you can dial it back to URP levels

#

just need to mess with it

primal rover
#

yeah

#

hmm

#

ig ill just load into the hdrp one

#

cant be too harmful

silver grove
#

its all free

primal rover
#

yea

#

wait so

#

could the house have been affected because i wasnt using the hdrp one?

#

cuz i imported the HDRP house, but i only used 3d core

#

or is that kinda irrelevant ?

silver grove
#

that is likely

primal rover
#

oh

silver grove
#

if an asset is not designed for a render pipeline, anything can go bad

primal rover
#

yeah

silver grove
#

and it will go bad

primal rover
#

anything that can go wrong will go wrong lol

silver grove
#

shaders especially

primal rover
#

so i wonder if like

#

my problem could just be solved by this?

silver grove
#

yeah maybe

primal rover
#

my brain is telling me thats not the case

#

but im hopeful

#

and optimistic lol

deft fiber
#

@silver grove @primal rover Remember that discord threads are good if it seems that a topic drags out

lone pier
#

Whenever I set my structures to static and try to build the lighting, it throws these errors in the console and leaves these visual artifacts everywhere.

#

Does anyone know how I can fix this?

lone pier
#

Figured it out, I had to make sure that Generate Lightmap UVs was checked on my models

manic vector
#

i have lights in my scene liek area lights spotlight etc but they arent emitting any light

#

does anyone know why its happening

#

i am working in a 2d project btw ive seen that it might have somethnig to do with it

serene basin
#

I've created this simple map with probuilder. I built out the red side as a single probuilder object, then duplicated and mirrored it (so I have two probuilder objects that compose the level). However, I'm having this issue where the baked light seems to be sharing between the two probuilder meshes. Clearing all baked lighting data and regenerating doesn't do anything. The two objects have two different mesh names when I inspect them in the editor, so why is this happening and how can I fix it?

#

In this pic the issue is that the blue room has the same baked indirect red lighting on the walls as the red room

#

and here's after i cleared bake data and baked again. this time the blue indirect light is on the red room walls

#

it seems to randomly switch between the two

deft fiber
#

Probuilder generates meshes by its own rules so I'm not entirely sure what affects it
If all fails you should be able to export them into non-probuilder meshes so Unity can do the lightmap business uninterfered

whole bramble
#

well

#

in case of LOD group

#

how can i make the second LOD objects get lightmapped by baking?

whole bramble
#

whenever i am baking lighting, i see that the gameobjects of the second LOD group i.e LOD 1, is getting UV overlapped

#

but when i am baking that game object individually without LOD , then it is getting normally baked without any UV overlapping warning

#

a big depression

whole bramble
#

well....kind of solved

#

i just probuilderized those objects

#

and on the exported mesh i checked 'generate lightmap UVs'

#

then those noisy/dark artifacts went away

#

and got a healthy baked lightmap

stable patio
#

Is there any way of passing my own shadowmap into the Unitys _ShadowMapTexture and enabling SHADOW_SCREEN keyword so it will render the shadows? trying to enable keyword but it simply wont take it, and cant find any information of overriding unity's shadows

orchid rampart
#

is there any method of making skinned mesh renderers receive light maps? I have a cardboard box rigged for modularity, no movement would be happening in the scene. However, stuck using a skinnedmeshrenderer instead of a normal mesh renderer due to this. Sorting out the bake lights for my scene but the boxes kinda stand out not being able to receive the bake lights.

silver grove
#

Anyone know whats going on here? the mesh render of the mannequin is messing up the lighting very badly

deft fiber
silver grove
#

Sure I can do a control test, but there is no fog involved, just tried assigning a different material, no difference

#

this is what is behind it

#

nothing

#

that is not correct, aka messed up

deft fiber
#

@silver grove is the problem w ith the mesh or with the shadows of the surroundings?

silver grove
#

definitely something with the mesh

#

if I disable the mesh render, all is well

atomic monolith
#

How bad do point lights bog down a scene? Say I have a city background and i want to put point lights in the windows to make them glow a little.. would that like really slow things down? Id say there are about 100 windows. Is there a better way?

deft fiber
#

Baked lights or deferred rendering path don't have that specific limitation, but they have their own

atomic monolith
small fulcrum
#

Howdy folks. I am using the Light 2D experimental for Point lights, and have noticed they add when overlapping. This can lead to wash-out when a large number of illuminated sprites are close together. Do any toggles or strategies exist for mitigating this?

deft fiber
small fulcrum
#

I wonder if perhaps that is related to my using 220.f.36f1. Been hesitant to upgrade given how quickly old packages are deprecated, and I'm still learning the ropes.

#

"3. For Unity v2021+: Right click in your project window, Create > Rendering > URP Asset (with 2D renderer). For Unity v2020: Right click in your project window, Create > Rendering > Universal Render Pipeline > 2D Renderer (Experimental)." So yeah, I'm just on a much older build I suppose.

#

The only light blend styles defined are multiply, additive, subtractive... nothing I can fine tune really?

#

The URP Asset itself has fields for maximum lights on a pixel, but they don't seem to be considered.

daring haven
upper fable
# daring haven Didn't someone say they are like a cube - 6 faces of light - so 6 times more exp...

That doesnt seem right. First of all, the math behind spot light is bit more complicated. The faces doesnt really matter, I think this was referring to shadow maps which is problem only if the light casts shadows. Even then the "6 times more expensive" isnt exactly correct, its true each side is rendered to their own shadowmap texture (/part of texture atlas, using single pass tho) but what matters more is the amount of objects that gets affected by the light/shadow so light range can have major impact on the performance. In general spot light is cheaper than point light but 6 faces = 6 times faster isnt true (https://forum.unity.com/threads/what-is-the-most-expensive-light-type-in-unity-3d.56490/)

small fulcrum
#

I am all updated to Unity 2022 and although the naming is different, and the experimental is gone, nothing much else has changed regarding point lights overlapping and washing out the scene. It is interesting reading posts over the years detailing the same issue I'm having with point lights, yet no real viable solutions. It apparently is a much larger issue in 3D due to the "realistic" falloff range of light that makes it very difficult to do flashlights properly w/o tonemapping. Generally there folks expect static scenes so bake the lightmaps and move on. One recommendation I tried had me adding a post-process tone mapping shader. It dimmed the overall scene but didn't actually help the problem. And I'm not really setup for writing my own shader. Just surprised to see this is a common issue and the recommended solution is don't use lights if they could possible overlap. If I could simply limit the number of light sources acting on a pixel simultaneously it'd be fine, but those settings don't seem to affect this.

whole bramble
#

any solution for lightprobes breaking the static batching?

whole bramble
#

bump!

edgy stream
#

Hey guys!
Im having shadow issues, how do I stop shadows that occur when the light source is coming from underneath the geometry? The terrain is casting a shadow onto the pillar

Some extra details is that the shader for the terrain is a custom shader where I have custom code that enables shadow casting / recieving on instanced indirect meshes.

whole bramble
#

u can just keep receive shadows off on the cube...

#

The culled geometry surface let light pass through a mesh

edgy stream
#

yeah I figured as much but was hoping for a solution to fix for all cases, stopping the shadow cast on the cube still allows the shadow on the terrain gemetry in weird places

whole bramble
#

those shadows are not from the cube

#

If you turn off cast shadow on your terrain as well...it fixes the problem

edgy stream
#

its like a lose lose situation then lol, no shadows from the mountain tops, ill just look for another solution

edgy stream
#

a middle of the road solution was to check the angle of the light and bsaically clamp it between 0 and 180, essentially forcing the light to always stay above the ground. OFC its not perfect, but another solution I thought of was maybe to have two directional lightsources that alternate depending on the time

cobalt hound
#

So I clearly must be doing SOMETHING wrong but when I use mixed baking with a directional light to bake a lightmap it seems to cause an issue where when there is no light at all afterwards some top faces begin to glow to an extreme level

HDRP stuff I guess. Is there an obvious reason this would be happening?

timber lichen
#

So, I have a really larged scale world that uses a day and night cycle. Is there a way to bake the lighting for only the emmissions on the materials being used in the world and not the shadows?

wise hawk
#

I know it sounds counterintuitive because you're adding geometry that will never be seen, but think of it from the perspective of the light: it culls backfaces as any normal camera would, so you get the effect where only some of faces (the ones that are inclined towards the light) cast a shadow and you get zebra stripes

silver grove
#

anyone know what this is?
There's this circle that resizes based on how far from the wall I am

#

disappears if I turn rendering culling mask to nothing, but then the sun light stops casting on surfaces

#

so is it something to do with light optimisation?

#

(this comes from directional lighting)

silver grove
#

fixed it 🙂

#

shadow distance

wise hawk
#

You can make it a seperate object and set it to shadow only if you want, although it honestly shouldn't matter really

little condor
wise hawk
#

That might be it but I've had problems before where lightmap errors result in extremely overbright pixels

#

I dont remember exactly what it was or how it was resolved but they were technical mistakes in the vein of having exposed backfaces

lyric gull
#

Why? And how to fix? What I meen is making the baked one look actual good

deft fiber
#

You'll usually want to use baked lighting in situations where there's many light sources and/or a lot of bounce lighting, so there are no terribly sharp shadows

#

Having some natural texturing on the floor also practically hides compression artifacts and other imperfections

#

I probably would use mixed lights with shadowmask mode to get both sharp shadows and bounce lighting, but that's only if I really need the sharp shadows and increasing texture that much isn't preferable

lyric gull
deft fiber
silver grove
#

settings

deft fiber
#

At low shadow resolution and a moving light source the shadow would be snapping from pixel to pixel

silver grove
#

yeah sounds about right, I'll try upping that, forgot I was using baked GI, so that may be affecting it

#

cheers

deft fiber
hexed portal
#

Hey, im attempting to color a mesh using a shader and c# code, but it turns out extremely weird, and i cant see any shadows or depth on the object?
Im setting the colors of each vertex using mesh.Colors[vertexIndex].
Material is shownon the 2nd picture.

#

mesh has a structure like so

#

I would assume the issue is me using baked lights and changing the baked mesh's vertices at runtime??

#

Okay i just solved my own problem nwm

hexed portal
#

Now im having issues with everything being great in editor, but when i build it it looks like shit and there are no shadows?

deft fiber
deft fiber
hexed portal
#

Fixed that as well, 1st issue was due to me using baked lights whilst changing mesh;s structure which broke it somehow. So i changed it to realtime and it worked.
2nd issue was due to the quality level being at 5 in the editor and for whatever reason being set to 2 in the built game.
So i just made a script to force quality to 5 at load.
And now everything is as it should be

modest ledge
#

Hi all, I'm having some dumb results with lighting in my VR Chat world.. there's some pre-existing stuff I've been able to look past but I've just a made a new spawn room and I can't figure out why I'm getting these results.
As you can see the walls aren't receiving any light at all, and the door frames are wildly different from one another?? Any ideas what's going on?

https://cdn.discordapp.com/attachments/841232199415758878/1039786819409150003/image.png
https://cdn.discordapp.com/attachments/841232199415758878/1039786304721915985/image.png

silver grove
#

@modest ledge tried rebaking the lightmaps?

modest ledge
#

Yup, a few times, I get varied results but nothing I'd consider passable.

silver grove
#

what happens if you recreate the walls?

modest ledge
#

As in reimport the mesh?

silver grove
#

yeah, in that case it could be a problem with the normals

#

did you make it?

#

or downloaded?

modest ledge
#

I made it, the normals are all in the correct orientation.

silver grove
modest ledge
#

I'll have a looksie, thanks

silver grove
#

nice 🙂

umbral elk
#

Why is my image burning when setting the rotation of the sun to midday?

#

This is the default one, but I want the shadows from the top

deft fiber
#

At other angles it's reflected away

umbral elk
#

@deft fiber Oh, it was that hahaha, thank you! ❤️

peak pilot
#

Hello, my Angel object is black without a skybox and in my scene i cant have a skybox because it will mess upp the lighting. The light you see on the walls are all baked. so I have no real time lighting. Is there a way I can make my object show its texture without skybox

modest ledge
peak pilot
deft fiber
#

@peak pilot Dynamic objects can also receive baked lighting via light probes

#

Also useful for non-lightmapped static objects

peak pilot
#

ok

vestal basin
#

Anyone know if there's a way to share environment lighting between scenes, or even just copy the values over in some convenient way? It's very tedious to have to go through each one just to make one change.** **

deft fiber
silver grove
rapid hazel
#

is there any way to globally light a scene?

#

with out directional lights?

serene tartan
#

Is it possible to programatically set the directional light values (direction and color) only for specific material? I am using DOTS renderer so using separate layer and separate light source for this material is not an option since DOTS renderes currently supports only single layer

serene tartan
#

I tried setting light color globally like this but it doesn't seem to be working:
public static int _MainLightColor = Shader.PropertyToID("_MainLightColor");
public static int _LightColor = Shader.PropertyToID("_LightColor");
...
Shader.SetGlobalColor(_MainLightColor, Color.green);
Shader.SetGlobalColor(_LightColor, Color.green);

deft fiber
rapid hazel
#

I just want to light a scene up

#

like I'm using an unlit shader, but not quite flat

deft fiber
rapid hazel
#

doesn't work quite right

deft fiber
#

Environmental lighting is highly customizable though, so it's still likely the solution
Good luck

deft fiber
# silver grove Do you know if there is a performance hit when using light probes vs lightmaps?

I guess some, as they're evaluated in realtime, though it's still baked data being sampled
I haven't heard of any performance considerations with light probes so I assume the impact is negligible in most circumstances
It rarely makes sense to compare them directly since you would almost always prefer probes for any object that doesn't specifically need baked lightmapping
Small objects for example tend to be a total waste to bake lightmaps for

#

Lightmaps tend to have a much bigger filesize

glass shard
#

Not sure if anyone has seen this before, but my realtime lighting works fine in editor, but in build there is 0 lights rendering. So its pitch black. Any idea what this could be?

fluid musk
#

Hi, I am using URP 12 and Unity 2021.3.4. I have some custom shaders from an asset and I'd like to use a cookie on a spotlight, when shining on this shader(left), my cookie doesn't show. When shining on the standard lit it works fine. Any clue on how to fix this?

deft fiber
#

It's quite rude

silver grove
primal slate
#

using unity solely to convert 3d models, so i don't have much in the scene
there's a weird shadow cast over the entire scene around the horizon line
it moves when i move the camera and appears to cover the entire scene
this is when i have turned off the directional light
how do i get rid of this?
there are only 2 objects: the model and the light (turned off)

daring haven
# primal slate using unity solely to convert 3d models, so i don't have much in the scene there...

Are you using HDRP vs URP etc? There are project defaults you can set (varies per pipeline). E.g. what skybox is being used, are you using physical sky, HDRI, any fog, ... some of them can be done in the project settings rather than the scene, so I would be looking through those. (No, I am not an expert, but I found some of the defaults were not what I wanted with HDRP for example - there was a ground tint shining light upwards by default for example)

shadow zodiac
#

Can someone explain to me why changing a layer on an object removes it's shadows?

#

Default Layer

#

Other Layer

#

I'm using HDRP

graceful shoal
#

I'm palying around with the HDRP lighting settings... Under Project Settings > Graphics > HDRP Global Settings. Are these settings the same as if I made a Volume component one an empty?

#

If I wanna create a scene, with one global light setting, should I just use the settings in the Project Settings tab?

wicked orchid
#

Is there a way to include more than light layer 0 as the default? I'd like light layer 1 to also be checked by default... very tedious to go through all my renderers and turn it on (and prone to me forgetting)

small fulcrum
#

Hey folks. Figured I'd ask again... I'm making a Unity 2022, 2D game with Point Lights using the latest URP. When too many overlap, the scene gets incredibly washed out. Does any method exist to prevent this from happening? This is a particularly bad problem when AI units are emitting glowing effects and begin to clump up

#

I tried using a Tone mapping shader on the scene but it only added perhaps another 10% margin before it washes out.

daring haven
daring haven
# shadow zodiac I'm using HDRP

The manual says "Shadow Light Layers - When using Light Layers, Meshes only cast shadows for Lights on the same Light Layer as them." So I would check the layers for the lights and objects to see if there is some difference going on.