#archived-lighting

1 messages · Page 5 of 1

graceful shoal
#

After alot of testing, errors and re-imports, I kinda got the hang of it, there are so many things I need to do to get the right lighting... Which is good! Starting to get the hang of it.

But as I was testing I noticed how my spotlights needed up to 10k+ lumen, just to be visible, is this how it's supposed to work with hdrp?
I max the sliders in the inspector, and no light is visible, add a couple of 0s as the end and I just about see the light, add a couple more and I get the strengt I'm looking for, but the lumen is going insane

daring haven
deft fiber
#

@graceful shoal @daring haven In HDRP how birght a light is depends on its intensity relative to exposure
It's recommended you use real world light intensity values and adjust exposure to get the desired look

#

Different light units result in different light intensities depending on the type of light source

graceful shoal
#

I'll probably figure it out later today when I sit down, but if there's a complete step by step guide on how to do this, please let me know!

#

Also, there is a massive difference between the hdri and physically based sky when it comes to settings, right?

daring haven
#

I think the "right" way is look up wiki pages etc for "a street light is 5k lumen, roadways might get up to 19k, bright sun is 130k" etc. Then adjust exposure. But I still get weird effects - you cannot have too many lights near each other due to limits and shadows going insane etc. My exterior shot for example has the building reflection being way brighter than the building. Its a asset store asset for rain puddles - so not Unity's fault, but I have to work around it.

deft fiber
graceful shoal
#

Ty!

shadow zodiac
#

Alright thanks I'll check that

old nova
#

they both have the same material but its not visible on the other one

#

they both should be red

#

im generating the big mesh at runtime, why doesnt this work?

old nova
#

fixed didnt calculate normals

timber lichen
#

Hello, would it be possible to make this star shine like this star without using post processing layer?

timber lichen
chilly kettle
chilly kettle
#

well, i know nothing about your project, so i cant tell you how you could do it ^^
But in the end its just a sprite with a 2D Texture that you could lay infront or behind your star ^^

timber lichen
#

I have a 3D project, I can't use post processing layer because you can't see the details of the particles when you zoom in and it looks weird

#

And the star is made of particles

chilly kettle
#

did you try emission on the particles + postprocessing bloom?

timber lichen
#

Postprocessing bloom is the problem, you can't see the details if you enable it

#

It'll fix the shine effect but it'll make another problem

chilly kettle
#

i see

timber lichen
#

looks like this with the postprocessing bloom enabled

fathom bough
#

Is there a way i could render a light only on one camera?

twilit elm
worn tapir
#

not sure but either you simply have a light somewhere
or it might be unity reserving that extra slot for indirect lighting

gleaming inlet
#

Heya so I tried baking lightmaps but some of my models seem to have weird lightmaps? it seems to happen to regular cubes aswell only when these rocks are included. Any ideas? edgy_joy

deft fiber
gleaming inlet
#

This is the UV overlap view. Let me look into how to analyze this

real hill
#

a bit of a weird thing happening here to my shadows on URP, if you look at the edge

carmine saffron
#

Can someone please please help me. I have such a simple concept, but in execution seems virtually impossible. I've made a diagram in hopes of that helping someone understand. I'm using the 2D lighting system as a "field of view", for lack of a better word, and it works beautifully, but now I'm seemingly completely unable to add lighting to my scene because each god forsaken light just cuts right through the obstructed vision making the "field of view" technique useless. It seems that I either get my "field of view" or simple lighting in my scene, which isn't an option for the dream game I have and I'm contemplating just throwing it all away because nothing is working. Please, any ideas will work, I'm cool with implementing whatever, I just need a solution.

#

I practically just want to know if it is possible to draw shadows above lights, or some how decouple shadows from a certain light blend mode, or something. Because its not like I need those light nodes to cast shadows, the only shadowcasting "light" I need is the "field of view" the player is emitting

eternal pasture
#

URGENT SHORT QUESTION

I'm sorry, but this is really urgent. Is there a way to increase the brightness of a baked light map?

I need to make the whole scene brighter without changing the settings of dozens of lights and re-baking it.

little condor
dawn pawn
#

I want to have different lightmaps on different places in my scene (lets say building1 has lightmap 1, building 2 has lightmap 2 with different sun position)

How can I bake the lighting for just those game objects?
Right now it bakes the whole scene, which is not needed and will increase memory usage

dawn pawn
deft fiber
fringe plume
#

does anyone know why area light goes through walls (point light not) or is this why it's called area light?? very confused

daring haven
limber delta
#

Also interested in why area lights go through walls. Using v 2021 and URP. Baked lights only.

arctic pier
deft fiber
#

In this case lightmap resolution on the floor is too low to bake the shadow without leaking
You can increase it, but ideally for the light baker the floor and wall are geometrically connected, not just sitting atop each other

timber lichen
#

but I don't remember how I was just trying everything

arctic pier
#

Ok ok

jaunty thicket
#

What lighting do I apply to a UI? The white isn't coming out white enough

deft fiber
jaunty thicket
fringe plume
short isle
#

Reduced additional punctual light shadows resolution by 2 to make 216 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

I get this message in the scene view after implementing some point lights. I reduced shadow map resolution to make the error go away.

Am I correct in that if I had baked my lights, I wouldn't have received this message?

fringe plume
#

is this the purpose of area lights or a bug? i still dont know. I have shadows enabled and the light still goes through walls if they are in the range, with point lights i have no problems, it stops at walls even if the range is bigger

daring haven
#

I was using area lights for indoor lighting from the ceiling so I could get sun coming in through the window casting shadows on the floor using a directional light that casts shadows. I don't want to add to the brightness of everything outside the window. So I am scratching my head too. Point lights and spotlights were not a great way to generally improve illumination inside.

tight parcel
#

hello, when looking from the side the shadows look really low resolution, but looking from the top makes them crystal clear, does anyone know how to fix this?

timber lichen
#

I understand that shadow resolution and distance are tied and inversely proportional, but is there not a way to override this and just make the editor and game more demanding to run?

tight parcel
#

so

#

i wish there was

deft fiber
timber lichen
#

I want to increase both without degrading

#

that's the problem

tight parcel
#

because for me when i increase the distance the resolution gets worse

#

like the pics above

fringe plume
wheat wing
#

Anyone here have expereince with Bakery lightmapping?

#

Why would a bake cause something like this....

trim glade
#

Any idea why can't I see the my terrian in my Scene? I'm really new to unity

trim glade
#

moving it around the terrian does nothing...

#

Ohhh I got it fixed, I had fog on my bad 😅

chilly kettle
#

👍🏻

trim glade
#

wait is there a way to make it that I can't see fog in Scene but ingame I still see it? disabling and enabling it every time is kinda annoying

chilly kettle
trim glade
#

Wow, tysm!

chilly kettle
#

np

granite jasper
#

anyone can help me in making this type of result in unity.

#

working in srp

vague atlas
#

Hey! I have problem with casting dynamic light on my game. How can I make shadow NOT pass through the floor?

chilly kettle
chilly kettle
vague atlas
#

how can i block the light

chilly kettle
vague atlas
#

flat 2D

raven flower
#

you want this effect?

vague atlas
#

i want to achieve effect simillar to this

granite jasper
deft fiber
#

@timber lichen @tight parcel Increase both variables together
I don't quite see why this is a problem

#

Realistically you'll want to use cascades

#

if you want to have shadows far away, but keep resolution up close

trim glade
trim glade
#

it happens because I'm using a render texture (I found out by removing it) any ideas how to fix this?

daring haven
frank folio
#

Is there any option to get a smooth transition for lighting when objects move into the range of a light? Right now the lighting goes pretty much from 0-100 instantaneously for the affected object, which is very noticeable

daring haven
hidden void
#

need help figuring out why the left scene light is so bright

#

both direction lights are using the same stings

#

its 2 diferent projects

#

using urp in both

hidden void
#

in the left one the direction light does not have the "light appearance" option

#

any one know how to make that show up?

#

ok solution was to change color gama to linear in player project setings

heady veldt
#

Hello; for my game i would like to have a slider where you can change the Brightness. I was thinking to allow the player to adjust the Post Exposure property of the Color Adjustment override. What do you guys think?

trim glade
trim glade
daring haven
# trim glade and I also don't have a light shining forward attached to the camera

(1) buyer beware, I don't claim to be an expert - just learning too! (2) I have not used render textures before, so just reading the docs now. I am looking for anything that sounds "temporal". E.g. TAA for antialiasing looks at the previous frames, which can result in shadowing if the contrast changes too much too quickly. But I cannot see anything. Does anything else have that effect? Like its not bloom or some other post processing effect that is combining with the render texture to cause the problem? (3) Basically I don't know. I would try turning more things off bit by bit to see if it is some interaction going on.

#

Do you have chromatic aberration or something on? Why is there a "glow" sort of effect around the material?

trim glade
daring haven
#

Sometimes just talking it through helps.

trim glade
#

really weird 😅

trim glade
daring haven
#

That is, ummmm, well, yeah! Have you considered an exorcist? That is... different!

#

At the end of my knowledge sorry!

trim glade
#

Alright... ):

#

@daring haven do you happen to know anyone that is able to fix that issue?

#

someone with a lot of knowledge..

#

or either, another way to make the sky black instead of setting it to Solid color and to black?

#

Solid color is also a cause to this

knotty shadow
#

hey guys, I've been having trouble getting my lighting right.. I want to bake the directional light (sun) and that works with the "baked indirect" mode and setting my directional light to baked only, but that obviously removes the dynamic shadow that my player has from the sun. So I'm trying mixed mode for my directional light but that doesnt give my static objects the nice shadow as if I baked them before.. I get pixelated ("realtime") shadows for everything.. my entire environment is set to static so I assumed that only the static objects would get the nice baked shadow and that only the player would get a dynamic one (which is lower quality, but that is fine for now)

#

so how can I bake my entire scene with the nice baked lighting, and only have a dynamic shadow for my player?

daring haven
#

There are some good people here, but I leave it to their time availability rather than calling them out by name.

trim glade
#

Alright thanks man

little condor
unique terrace
#

I'm having an issue where the light probes just don't do anything. I can place them into the world, but they ignore anything I pass between them, like they aren't even active. They are physically there, but that's all. I've baked and rebaked but nothing changes. I could really use some info on what might be causing the light probes to just stop working.

trim glade
trim glade
daring haven
warm hemlock
#

I have put a composite collider on the wall as well as a composite shadow caster, but the player light (shown in image 2) is still simply going through the wall instead of being blocked by the shadows. As you can see, it is set to receive shadows. Does anyone know why this may be?

trim glade
#

anyone knows how to make dots in the screen like that? (these tiny pixel dots)

unique terrace
#

I'm hoping someone can give me some ideas as to why the light probes seem to be unresponsive. I've placed them and baked them, but see no reaction between the light probes and the non-static object in the scene. It behaves as if they are not even present.

#

I've built MANY worlds with light probes, and I've never seen this problem before now.

winged elk
#

nm i had shadow type turned off im dum

lunar dirge
#

Hello, I am facing this issue where, in HDRP, i need to crank up my point light's intensity to 9999999 Lumen to even start seeing any light. Does anyone know why this could be happening ?

crimson orchid
#

can someone teach me how to make good world lighting

#

a bit realistic too

#

lens flares all that stuff

little condor
# lunar dirge Hello, I am facing this issue where, in HDRP, i need to crank up my point light'...

HDRP uses physical light units based on 1 unity unit equalling 1 meter. So you need to keep you models to scale.

If you create a cube and don't scale it, does the point light look correct when next to it?

You may have to post a screenshot of your setup so we can what you're doing.

Also, please don't post questions in multiple channels. It gets confusing when people start replying in different places.

lunar dirge
little condor
#

Hmm that sounds odd. To replicate a lamp, for example, should be around the 400 mark.

Is this an empty project, ie you haven't got any fog or other post-processing going on?

daring haven
#

I have found as soon as I have gone crazy with the strength of one light, I start cranking up everything else - when the real solution was to reduce the strength of the other light (and adjust exposure instead).

crimson orchid
runic quarry
#

this fresnel effect in URP is way too intense, it seems like the edges are glowing (even in shadow areas)

#

any way to get rid of this?

#

this is apparent in the eyes, where increasing the smoothness worsens this reflection

runic quarry
#

here's one very serious example

#

expected result (blender)

daring haven
daring haven
# runic quarry expected result (blender)

I don't know if its the same, but I had problems a bit similar (white like that) due to "smoothness" being too high after importing into Unity. Cranking down smoothness in the material solved it in my case (for leaves on trees).

runic quarry
#

turning down the smoothness dims it slightly but doesn't quite solve the issue

thick burrow
#

hello, i recently started using Enlighten for lightmapper, and i'm using unity 2021 and it takes at least 5 hours to bake, is there any way to make the baking process faster? like 15 minutes maybe?

chilly kettle
#

Reduce Resolution

thick burrow
chilly kettle
thick burrow
#

it is available in unity 2021

thick burrow
#

but takes hours to bake, but the results are flawless

chilly kettle
#

Yes it is..and it says that its deprecated ^^

#

you should use Progressive GPU for Lightmaps

#

this will speed it up very well

thick burrow
#

at least for me

deft fiber
#

Different tools for different jobs
If you're getting worse results with progressive lightmapper you probably haven't configured it right

thick burrow
thick burrow
thick burrow
#

oh i see

chilly kettle
#

thats the thing how detailed your lightmap is.. and how big and how long it takes ^^

thick burrow
chilly kettle
#

The Resolution depends on the scene, the amount of lights etc.
You want to keep it as low as possible.

#

and as high as you need ^^

thick burrow
#

but yes i was messing with these values in GPU and i forgot i change them

#

thanks for the help anyway

warm hemlock
#

I have put a composite collider on the wall as well as a composite shadow caster, but the player light (shown in image 2) is still simply going through the wall instead of being blocked by the shadows. As you can see, it is set to receive shadows. Does anyone know why this may be?

warm geyser
#

hey guys, so im making a game that i want to be pc/vr and im using the universal render pipeline for a good balance of performance and visual quality, but the lighting is just so off

#

its like, they used the realistic formula for light falloff but didnt use it right so lights are far too bright up close and very dim at a distance

#

even when baking

#

i found that the only way to get it to look good is to use linear color space, but i know this decreases the performance considerably

#

does anyone know how much worse linear color space is? is it worth using for a game that will be demanding in other aspects (pbr textures, extra cameras rendering with post processing)

#

should i just bite my tongue and try to make gamma look as good as possible

chilly kettle
warm geyser
#

is it performant?

#

i dont want my players to get nauseous

#

is linear performant**

fickle needle
#

pretty sure there's little to no GPU/CPU performance cost to using linear over gamma

warm geyser
#

oh okay lmao

chilly kettle
#

Maybe 10%

#

But you will have other problems in performance than the lightmode

warm geyser
#

wdym

chilly kettle
#

Drawcalls, Polycount, Materials, Realtime lights etc.

#

thats the stuff you should care about, not gamma/linear ^^

warm geyser
#

aight

#

im going for a phasmophobia-style look so most of my models will be lower poly with the detail in the textures, and the only realtime lights will be flashlights

#

i think thats manageable

chilly kettle
#

yep

shadow horizon
#

Baked a pointlight (set its mode to baked) but once baked, it produced no light. is there common things i need to check so i dont waste time baking and not getting results i want?

deft fiber
#

As always, bake on the GPU and at the lowest resolution you can get away with for test bakes, and a simple test scene is ideal for ironing out the kinks in the process so it's more likely work the first time in the big scene

tiny mesa
#

hey guys any idea why the light keep passing through the interior?

deft fiber
tiny mesa
#

is it somthing i should edit in my importation option?

deft fiber
timber lichen
#

Im wondering what this lighting glitch is called, this is not in Unity

daring haven
#

"Pretty in pink"?

olive hinge
#

Hi, How can I achieve lighting quality like this Unity's VR example? My lighting is somewhat blurry.

timber lichen
#

can anybody help me with makin room dark?

stone cargo
timber lichen
timber lichen
#

like i have a sphere and i want to paste the light inside of it

stone cargo
#

is the sphere translucent like a bulb

chilly kettle
timber lichen
stone cargo
#

and put the light as child under the sphere

chilly kettle
timber lichen
timber lichen
#

i mean i need a sphere to glow

#

so it will produce light too

stone cargo
#

yeah but if the material is translucent the light should go through it

timber lichen
#

annoyin💀

stone cargo
timber lichen
#

i swear its for everyone

stone cargo
#

then its not a problem

timber lichen
stone cargo
#

it has to definately do something also with the textures

timber lichen
#

help-

stone cargo
timber lichen
#

i made it how i wanted

timber lichen
stone cargo
#

what did you did then there was it on the textures

stone cargo
#

how did you fix it

timber lichen
#

and now i need to make this bloom but i cant because tutorials are outdated

#

why is unity changing so fast

#

can you help me-

timber lichen
#

donee

#

thanks

#

this grid inhibiting.... how can i hide it?

deft fiber
timber lichen
twin sun
#

Hey, can anyone confirm what light falloff lights in the built-in renderer uses?

deft fiber
pure kindle
#

How can I become better at lighting?

#

I feel like this looks okay but it's not quite perfect

#

is it just because the walls and floor are missing textures and environment?

pure kindle
#

Textures seem to help a bit

limber delta
# pure kindle How can I become better at lighting?

As with anything else you just need to study it and then apply what you learn. Over and over 😊 There are probably books and videos on YouTube to check out but my tips would be to study real life as well as games and movies. Perhaps grab a still from a movie you like and then try to recreate the lighting in that shot.

You should also study color theory and composition as they kind of go hand in hand.

For your environment some tips would be to start simple. Perhaps apply some kind of hierarchy to the lightning. Right now everything is evenly lit and its very light as well.

For example, you could first establish a feeling you want to convey, then try to work towards that. Keep it simple.

deft fiber
# pure kindle How can I become better at lighting?

Learn all the ways the engine / render pipeline can do lighting and how to best use them
Beyond that it's just studying references from real life places, photography as well as art by more experienced artists
With lighting the subject matter is really important
The room you have would look strange no matter how "good" you were are at lighting
How often have you seen a featureless chamber dotted with industrial lamps? Always think about what purpose the space is meant to serve and what feeling is the scene meant to convey

little condor
# pure kindle How can I become better at lighting?

And often, less is more, so reduce the number of lights, reduce the amount of AO and reduce the reflections.

As mentioned above, find a reference photo of a simple scene to try and replicate and learn the various tools Unity has for lighting, there's no single solution unfortunately.

Also, if you want to learn realistic lighting the you'll need to understand how PBR materials work and interact with lights.

pure kindle
#

Thank you all for your tips! I’ll check all of them out 🙂 happy thanksgiving!

oblique crown
#

guys, does anybody knows why I am not seeing the probes created by apv? i can see the bricks, cells just fine, but there are no probes

pure kindle
#

@limber delta @deft fiber @little condor I think I made improvements. What would you all say?

little condor
pure kindle
candid drum
#

Hi, what is causing this square shadow in URP?

chilly kettle
candid drum
#

I'm 100% sure there is nothing, I think it's related to light settings

limber delta
pure kindle
pure kindle
#

Since I'm on the topic of lighting, is anyone familiar with trying to get a mirror to work with HDRP using a Planar Reflection Probe? Or do I have to create a custom shader and render a camera onto a quad?

chilly kettle
#

Have a look on Screen Space Reflections

pure kindle
#

Screen Space Reflections don't seem to work for me

#

they don't work with the decals I'm using plus it loses color in the reflection

deft fiber
grave edge
#

what does this mistake mean?

#

I did generate lighting in workflow through lighting

pure kindle
#

There’s no tutorials on it really, and I followed the Unity steps for it and it didn’t work

pure kindle
#

Okay I got the mirror working

#

However, if you look I have 2 lights per fluorescent light

#

I have an area light which is for general lighting and a point light for specular highlighting and making the area above the light brighter

#

However on the mirror you can see the point light floating because it shows up as a specular light

#

Is there a way to remove specular highlights in HDRP on a per-material or per-object basis? I tried disabling specular highlights all together but I need them for wall reflections of lights to make it more realistic

#

do I have to write my own shader perhaps?

safe moat
#

Hi! the lighting in my scene was fine for months and suddenly one day I got an error saying "lighting data asset ‘lightingdata’ is incompatible with the current unity version. please use generate lighting to rebuild the lighting data. realtime global illumination cannot be used until the lighting data is rebuilt. unityengine.guiutility:processevent(int32, intptr)"

#

So I did generate the lighting and now it looks super weird

#

what would be the best approach to fix? Should I have been using the latest unity version?

safe moat
#

And another scene has this lighting now:

deft fiber
deft fiber
safe moat
safe moat
crisp helm
#

im trying to have a light shine where the cursor is pointing and the pointing part works fine but the spot light isn't lighting anything up. anyone know if this is a common issue or what i could do to troubleshoot?

crisp helm
#

nvm

snow pollen
#

hey guys im using bakery to bake my lights, but im getting these weird artifacts, what settings in bakery would change this?

deft fiber
#

Without which color and compression artifacts will bleed over from adjacent UV regions

#

Voxel modeling software have the bad habit of creating extra edges and UV seams absolutely all over

#

If you can't modify the lightmap UV unwrap, you could disable lightmap compression and increase its resolution

#

Also, in practical scenarios having textures on surfaces helps hide lightmap compression artifacts and other imperfections

timber lichen
#

I keep running into an issue where my bake keeps stopping at one specific point and the time perpetually increases.

Do you guys know how I can fix that?

whole bramble
#

lightmapping breaks static batching

#

whats the solution\

deft fiber
safe pewter
#

Getting shadows like this, not really understanding why.

#

No baked light maps (disabled in project). Default unity sphere (so probably not a geometry problem)

#

Changing cascades/bias/etc does little to fix the problem

deft fiber
#

Normally that jagged edge is hidden by diffuse shading

safe pewter
#

i assume that means that it isn't possible to solve since I'm not using diffuse shading (unlit material)

deft fiber
cunning lake
#

im having issues with lighting

#

because idk how it works

#

9 point lights, its all nice and good

#

i add 3 more and things get dark and buggy

daring haven
#

It depends on the render pipeline, but for HDRP I think point lights are like 6 lights (6 surfaces of a cube), and there is a limit in project settings (which is 24 lights per tile). So 9 = 27 (wont notice a bit missing), 12 = 36 (more likely some will be lost). Spotlights use just 1 if you can get away with it. But if your camera is using automatic exposure, the other thing that can happen is parts go darker because other parts are now lighter.

sonic mason
#

when i bake this , it looks like this

#

is there a way to bake something with this type of uv unrap using atlas ?

deft fiber
#

You should specify if you intend to bake lightmaps in Unity or in Blender

mellow sierra
#

@timber lichen You've been told before not to crosspost. This is your last free one.

timber lichen
#

oh true

timber lichen
#

How do I fix this?

chilly kettle
timber lichen
#

Light colour objects become black when a light its hitting them

limpid ivy
#

hey there, I'm having an issue in my game where the lights I have in the scene for some reason render in big square areas on the terrain. I'm not really sure why it's doing that. I'm sure it's some setting or something but I don't even know where to begin, if anyone has any thoughts i'd be super grateful! thanks

haughty trail
#

Hi, I'm working on a project where I'm using a skybox I found on the unity asset store. I'm a little new to lighting in Unity and I'm not sure why it's displaying so weird, can anyone point me in the right direction?

limber delta
deft fiber
#

@safe moat You don't need baked lightmapping enabled to generate lighting if you only need the ambient probes

#

I should have mentioned that earlier

coral talon
#

How do I decouple ambient lighting from directional lighting (hdrp)? The directional light seems to have its own ambient light linked to it

deft fiber
#

If you make a new "indoors scene", you'll have Volume settings that do not add any ambient lighting regardless of directional light's presence

safe moat
deft fiber
safe moat
deft fiber
# safe moat

The gentle blue hue seems to be what I'd expect in those conditions, and since it isn't pitch black anymore the original problem is eliminated
I didn't see what it looked like originally

safe moat
#

not the exact location but close

deft fiber
#

I see, you could double check Environment Lighting settings, the Source and Intensity Multiplier

safe moat
#

I might have to ask the terrain creator

deft fiber
# safe moat

If you use gradient, you control the brightness of the ambient lighting with those color fields
And if you use skybox as the source, it'll be the sky multiplied by Intensity
Just remember to Generate afterwards to make sure the changes stick

safe moat
deft fiber
safe moat
deft fiber
#

Pretty important to mention if you're using custom assets that take control of these things

proper viper
#

Hi I need help with something, so when I put a light looking at the positive number of the Z axis the lights just don't work correctly, but when they look forward negative Z the do light correctly, both in the same object and same material.

merry abyss
#

Im trying to set up lighting for the first time following various online guides but I am not havinh much progress with it.
Is there a way to cast light from the skybox itself? the objects reflect the skybox despite there being no lights in the scene, but the reflections are dull and muted and also there's no light in the scene

worthy relic
#

Is there a way to evenly distribute the light so everything has the same brightness?

#

those are the light settings

merry abyss
#

How do I get my skybox reflections to not be so dull? the white is supposed to be light sources

#

the reflection probe shows it correctly

#

but the mesh/material does not

proper viper
#

Hi I need help with something, so when I put a light looking at the positive number of the Z axis the lights just don't work correctly, but when they look forward negative Z the do light correctly, both in the same object and same material.

limber delta
worthy relic
#

So how would I go about baking the area light

limber delta
#

Start with this: https://youtu.be/hMnetI4-dNY
Then just search on YouTube: "unity light baking" for example

In this video, you'll gain an understanding of how lights and shadows work in the Universal Render Pipeline, as well as how to set up a scenario with a mix of real-time shadows, Light Probes, and baked GI.

Speaker:
Ciro Continisio

Ask your questions here: https://on.unity.com/2UmP9TE
Did you find this video useful? Room for improvement? Let us...

▶ Play video
#

For a quick summary of light baking. Mark you object as static, then click generate.

worthy relic
#

thank you 🙏

limber delta
#

No problem!

timber lichen
#

does anyone know how to get rid of this weird blockyness?

#

I don't think it's a resolution issue, unless the resolution neds to be ubsurdly high, because rn the resolution is sety to 800

#

and it's still blocky

#

and only does this on surfaces close to the light though so idk

#

also standard render pipeline/build in render pipeline

#

my settings

#

like this is really really annoying

crude lintel
#

Also min chart size param

#

Also just share the lighmap data of that object.

crude lintel
# timber lichen wdym

The mesh renderer should have info related to the light bake. Share it here. Take a screenshot and share it.

timber lichen
crude lintel
#

Expand "realtime lighmap"

timber lichen
crude lintel
#

That's pretty small

timber lichen
#

how do I increse it?

crude lintel
#

Try reducing the "min chart size". Also, was scale in lighmap set to 100 when you last baked?

crude lintel
timber lichen
crude lintel
#

Try the min chart size thing

#

How many objects are you baking? Can you share the whole lightmap?

timber lichen
#

but the ground the wall and the neon lights are the only thing that are marked as static and to use global illumanation

crude lintel
timber lichen
#

also i am currently bakling

#

I reduced the min chrat size and started baking soz

crude lintel
#

Okay.

crude lintel
timber lichen
crude lintel
#

That's not a lot. I guess you're doing something wrong. I suggest looking up some tutorials on lightmapping.

timber lichen
#

this bake is taking a very long time so maybe itll work this time

timber lichen
#

theres not a lot to bake...

#

literally it ded

#

it did not fix it @crude lintel

crude lintel
timber lichen
crude lintel
#

Me neither. I just see that your baked texture is really small, causing the issue at hand. As for why, I'm not knowledgeable enough about the lightmapping myself, and there's probably a lot of settings and context involved, so I can't really say what it is.

crude lintel
timber lichen
crude lintel
#

What other tabs are there?

timber lichen
crude lintel
#

Ok, then you didn't read my message properly. I asked to take a screenshot of the whole lightmap and specified that it should be in one of the tabs in the lighting window (tab).

timber lichen
crude lintel
#

Okay, then what other tabs are there? In the lighting window. Not the whole editor.

timber lichen
#

this is baked

crude lintel
#

And realtime?

timber lichen
crude lintel
#

Ok, so what you have is not really baked lights. It's data for realtime global illumination, which I'm not entirely sure how it is applied to the objects.

crude lintel
#

Take a screenshot of the lighting settings asset.

timber lichen
crude lintel
#

Scroll it down so that all lightmapping settings are visible.

timber lichen
#

I did it!

#

I did the same thing I did with the neon lights to the wall, and then tthat fixed the blockyness

crude lintel
#

Wait, were you not showing the wall all this time..?😅

#

I guess it's my fault that I didn't specify which object you should adjust...

timber lichen
covert flower
#

im trying to use a skybox, im not sure why but this mesh is not affected by the environment lighting at all, every other object is fine as can be seen from the blown out lighting, does anyone know how to solve this?

deft fiber
#

@merry abyss I assume you've made sure the test materials here are perfectly smooth, metallic and have purely white albedo
If that's the case, you'll probably want to increase the cubemap's exposure
Or better yet use a cubemap texture that's stored in HDR format

#

Cubemaps that capture lights need to be really bright in the light parts

waxen hull
#

I have something weird going on with the lighting in my game scene. When I load the scene in unity and click play everything is lit properly, but when I load the scene from the "play" button in the main menu, the side of the buildings aren't lit and the color isn't right. I'm not sure what's happening

#

This is what the scene looks like when I load it through unity

#

This is what it looks like when I load it through the main menu

astral escarp
#

why in my reflection probe texture, metallic materials turn black?

waxen hull
candid sundial
#

Hello, not sure if this is the correct place for my question because I'm pretty new, but any assistance would be appreciated. I'm trying to create 2d lights/shadows for a top-down game.

I would like to simulate a sun at the top right casting a shadow on all objects in the scene. It would be a big scene and the camera will follow the player around, so a point light doesn't seem to work.

Similar to https://www.youtube.com/watch?v=slT_ArW60Xs&t=6s

I was wondering how to achieve this with the URP lighting system that Unity has, or do I need a custom script or asset from the asset store?

sharp goblet
#

Anyone have suggestions to improve the GPU usage of the GPU lightmapper? I've got a 3080 reporting 350 mrays/sec (not sure if this is low or appropriate for this hardware), but the GPU usage in task manager never goes above 10%, which the CPU usage is 60%+

worthy relic
#

How can I light up the entire indoor scene at once? I'm trying baked area lights because I heard they were good for it but as you can see they didn't work out too well and they overlap

daring haven
river parrot
#

Somehow my terrain is dark no matter what i Do

#

URP

worthy relic
limber delta
warm scroll
#

is there any way to make pockets of darkness with a global light activated?

#

i have a 2d world and want the deeper parts of forests to be exempt from the global light

rustic fable
#

Does anyone know which parameter (URP) causes my shadows to have this strange shape? Compared to a straight line, since the light comes from the column

silver grove
#

nice painting

#

try increasing the shadow resolution

deft fiber
rustic fable
#

I see. That makes sense. The lightmap are pixels, not lines

idle hinge
#

really simple question here: where is the setting to increase the distance that shadows lower resolution in HDRP

timber lichen
#

I have this problem with light that I really cannot fix. When a light touches a light colour it becomes black

#

I couldnt find the solution last day

worthy relic
limber delta
#

I don't know why they act as spotlights though, never found an answer for that. Think it has to do with URP, but I don't know

worthy relic
#

Interesting, I’ll give it a try later

worthy relic
night shell
#

because in the first bounce, the metallic material doesn't have any reflection probe assigned to it basically so it appears black, if you increase the bounces to 2 then the reflection probe will be baked twice essentially to where that reflection is actually included in the actual reflection probe so to speak

#

think of it like layering basically

#

the bounces also can be found here in the lighting tab

tulip meadow
#

Hello everyone, I was hoping if I can get some help achieving a very similar lighting with my project compared to another I found of the internet? I understand I don't have the proper visuals such as the walls for my project right now and how that might affect how the overall look of the lighting will have on my project. Help will really be appreciated, thank you.

night shell
#
  1. whats your platform target
#

because there are two ways typically one could go about it, either fully "baked" lighting (which means lights are baked to textures, which are typically way faster and higher quality but are not dynamic), or fully "realtime" lighting which is fully dynamic but not quite as high quality

tulip meadow
night shell
#

basically my question boils down to whether or not you want potentially laggy but dynamic lighting, or if you want fast but static (non changing) lighting

#

platform target by that I mean is it for mobile, vr, desktop, etc.

#

each platform demands differnet things, some have alot of raw power, but others don't have alot of raw power which means your game needs to run efficently

tulip meadow
#

ah ok I understand. My target right now is Windows, Mac, Linux.

night shell
#

so as for replicating the lighting style they have in the scene its worth studying what you see within it

#

your scene first of all is lit from top down, but its harsh lighting and there is also no "ambient" lighting so everything in shadow is basically black

#

you are also missing little point/spot lights that are mounted to the sides of the wall like in that image to give little hotspots of light/intrest

#

first thing I would do is within your unity lighting tab to switch your enviorment lighting source to something other than skybox (because in your scene it looks like there is no skybox and therefore no ambient lighting)

#

this will brighten areas in shadow and make it so they are not pure black

#

you can also switch it to color mode which is simpler (but doesn't look as good)

#

I would also just remove the directional light you have in the scene as well

#

and with those changes that should get you most of the way there minus the wall lights

tulip meadow
tulip meadow
night shell
#

you can increase the intensites of those colors also to brighten it up since that is overly dark

#

since they are HDR colors, there is an intensity field on the bottom that you can adjust

tulip meadow
#

ok one moment

tulip meadow
dense wing
#

how can i make lights react to sound in unity pls tell

deft fiber
astral escarp
fluid elbow
#

Hi, sorry ahead of time if this is a question you get a lot. I'm working on an assignment I set for myself to learn basic lighting fundamentals in Unity for 3D level design – stuff like leading the player onto the right path with a spotlight or godrays – but I feel like I'm pushing against a brick wall with how little progress I'm making with the actual lighting tools.

I'm following Brackey's 2018 Lighting guide and various other guides and I've learned a few neat things, like making a new material for the skybox to adjust its properties or how to add PostProcessing. But the simple act of adding Emission to a material and then putting that material on a surface is giving me extremely weird results. In Brackey's video he simply dragged the emission material onto a surface, marks everything as Static, and then it begins lighting things as expected. Yet I do the same and...nothing.

I tried fiddling around in the Lighting Settings too and it gave a bunch of very odd results, but nothing that actually resembled the simple lightbulb-glow I was trying for.

I'm currently not at my computer but I'd love any kind of guiding advice or leads like tutorials or documentation.

TLDR: The basics arent working for me and I have no idea where to get started to make things work.

timber lichen
#

When a light overlaps another one the object becomes black

#

like if there is a light and another light hitting the same object with a light colour it becomes black

#

any idea?

#

the point in wich both of the lights iluminate it becomes black

#

also if there is global light counts as a light

#

hitting it

safe moat
#

Perhaps you re using a custom asset that

deft fiber
# fluid elbow bump, sorry

Emissive materials only light up surroundings if the lighting is baked or precomputed
Both are pretty involved processes with a lot of moving parts and things that can go wrong
It'd help to know which system you're calculating the lighting with, and what the problems visually look like

#

Brackeys tutorials are easy to get into but they tend to skim over important details, and sometimes get them wrong altogether

warped roost
#

I'm using Emission plus Post Processing to create a neon strip effect, and it looked cool until I switched to baking my light instead of real time; now it looks... blurry when you stand near the light

#

I assume its something to do with bouncing, although I've disabled baked global illumination, so i cant change the bounces, or any setting really (if i enable it, the light just doesnt bake for some reason) and the quality is as high as I can put it with the same issue

fluid elbow
fluid elbow
#

currently the outside of my scene (indoors) looks like so - I made the skybox a bit funky color-wise on purpose partially because I like how it looks and also because I want to make sure I know when the light is coming from the outside

#

once indoors, the idea is for the square lamp in the roof to emit a basic yellow glow. Even with light turned on in the scene view though...nothing, no shadows cast.

#

i went into the Rendering -> Lighting tab to experiment with what may go wrong, and turned on RGI just to try. It did at least make the indoors of the room dark, but the lamp still doesn't seem to actually emit any light and there's still unnatural green lighting from the outside inside the house

#

lamp material looks like this for the record - completely basic, just following Brackeys, but has an Emission

arctic isle
#

@fluid elbow Hey! I can help you debug this. Can you change the emission setting to baked?

#

"Global Illumination"

#

Under the material properties

#

Then turn off Real-Time GI in your Lighting Settings and add a Point Light where your lamp is

fluid elbow
#

Ah, is an actual point light asset needed?

#

i figured (again from Brackeys) giving the material emission quality would make it function as a point light

arctic isle
#

Yes it more or less will but emissive materials can be noisy when path-traced

fluid elbow
#

i see

#

So what does the material placed on the lamp-cube do?

arctic isle
#

So add a point light and make it Baked

fluid elbow
#

ah yes was gonna ask about that too, thanks

#

now the room does have that faint PointLight-y glow, but its still not dark and seems to be affected again by the skybox outside despite being an interior

arctic isle
#

ok lovely! Can you select all your mesh renderers here and turn on the static checkbox at the top right of their inspector? this will make them be "Lightmap static" and so then you can bake lighting into them

deft fiber
#

@fluid elbow You need a reflection probe indoors to prevent reflections from the outside from being seen indoors
In some render pipelines, a mesh can be affected by reflections from only one probe so if your wall is seen both inside and outside, it may not be able to determine which reflections it should be displaying
I think rather than hunting one by one all the things that are amiss or which Brackeys neglected to mention, it may be better to follow some more tutorials
https://youtu.be/KJ4fl-KBDR8
https://youtu.be/okYhs6kQ0xw
Either or both of these for example

arctic isle
#

we'll get to the reflection probes 😄 but yes @deft fiber is correct

fluid elbow
deft fiber
#

In my experience there's so many things that could go wrong that you learn this process mostly just by repeating it enough times until you start getting the idea of what the importance of each setting is

fluid elbow
arctic isle
#

Yeah it takes a while to wrap your head around all this

#

If you decrease your direct and indirect samples in the Lighting Window and turn off Real Time Global Illumination

#

and then press "Generate Lighting" things should start to work

#

and we'll get to reflection probes and light probes next

arctic isle
#

(GPU Lightmapper is faster if you have a nice GPU)

fluid elbow
#

indirect samples to 64 too?

arctic isle
#

Yeah

fluid elbow
#

gotcha

#

its looking nicer!

arctic isle
#

Very good!

#

Ok now let's get rid of those environment reflections

#

Create a new ReflectionProbe

deft fiber
#

You could make a thread, looks like it'll be a while

arctic isle
#

Yep thanks

deft fiber
pure kindle
#

Is it possible to get volumetric lighting with area lights?

#

My scene really needs volumetric lighting to feel a lot more creepy and foggy

#

but the area lights don't seem to be supporting it

timber lichen
#

When I try to bake my lighting, this happens:

Shader error in 'BOXOPHOBIC/The Vegetation Engine/Default/Prop Standard Lit': Couldn't open include file 'Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl'. at line 1332

[PathTracer] InitializeLightmapData job with hash: 30331b40bd6293dee3e1e32b25a3fc49 failed with exit code 2.

Line 0 in (null) - OpenRL reported error code 505: OpenRL error occured: RL_OUT_OF_MEMORY: fbd375255ca62aa482ca6b24af5a1e4c:0 exceeded available memory

Line 0 in (null) - OpenRL reported error code 508: OpenRL error occured: RL_INTERNAL_ERROR: A fatal error has occured.  (Error is non-recoverable, OpenRL context must be shutdown)
night shell
pure kindle
timber lichen
#

dang... I have 16gb ram and 8gb vram though :/

night shell
timber lichen
#

I guess I'll have to get more or make my scene smaller

pure kindle
night shell
#

or built in?

timber lichen
#

oh hey moddingdudes

pure kindle
#

what's up

night shell
#

ah then in HDRP i'm not sure, but if you know shaders then you might be able to do something similar

#

I wrote a baked volumetrics solution that supports all

#

though that is only built in pipeline, you'll have to port it or find a way to make it work in HDRP even though I know HDRP has its own volumetric solution

#

but if it helps you and you know a thing or two about shaders then looking into that might help

pure kindle
#

yeah I tried getting into shaders but I'm not too good at it yet

#

in HLSL/ShaderLab at least

night shell
#

if not then I think current solution would be to somehow fake the light cast from an area light by mabye using a spotlight that affects the volumetrics

#

I know in HDRP you can actually make lights that are basically only "voluemtric" if you disable both "affect diffuse" and "affect specular" on them

pure kindle
#

Hmm. I'll have to look into that. I ended up using 2 spot lights for now and it looks okay

flint zinc
#

Super basic Q:
I've added some objects and a directional light, but get no shadows:

... What am I missing here?

deft fiber
flint zinc
#

And I'm not sure whats different

#

making a new project with 3D tempate

#

to see if it fixes it

pseudo ember
#

General question regarding lighting:
I'd like to use spotlights more, due to better performance.
But my rooms always end up to dark, when I use spotlights exclusively.

Anyone want to share their tipps for lighting rooms?
Placing a single point light in the middle of the room, just to increase lighting
works, but doesn't look that great (because lighting is not even inside the room).

flint zinc
flint zinc
flint zinc
#

trying to look for them and google

deft fiber
deft fiber
# pseudo ember General question regarding lighting: I'd like to use spotlights more, due to bet...
  1. Only shadow-casting point lights are significantly more expensive than shadow-casting spot lights, afaik when shadowless there isn't a huge difference
  2. Don't optimize unless it's causing a performance problem. Don't generally put too much effort into solving problems that aren't problems.
  3. If you've got ceiling lamps or standing lamps, I find it handy to point one spot light down, and another weaker one up right below it (without shadows) to simulate bounce lighting from the floor. Still more expensive than just one shadowless point light though.
  4. Consider baked lightmapping workflow if you can work around its limitations. It simulates shadows and bounce lighting and is cheaper too.
flint zinc
deft fiber
wispy slate
#

Hey does anyone know how to stop the directional light lens flare from appearing in front of terrain?

warped roost
lapis sphinx
#

does anyone know how to fix this when i generate light

night shell
#

@lapis sphinx looks like you don't have lightmap uvs

lapis sphinx
#

oh ok thanks

limber delta
limber delta
night shell
#

i.e. how your lighting is setup, if your using realtime/mixed/baked lights or etc.

edgy yacht
#

Is there any way to get an enclosed box completely pitch black (without lights), while having the outside be normal lighting?

night shell
#

yes

proper saddle
#

whenever I start my game the skybox turns white. I am using unistorm and I believe I set it up correctly. The setup process was a lil wierd for this plugin, but I do not know what is wrong...

edgy yacht
#

how would I do it then?

#

nvm figured it out

autumn night
stray pike
#

I'm new to unity (especially 3d), so I dont know whats the problem :(
at some angles my spotlight breaks and at some angles they are just fine (this started to happen only when I have more than 4 spotlights in my scene)

stray pike
#

no

chilly kettle
#

Which render pipeline do you use?

stray pike
#

I use unity's built-in renderer

chilly kettle
#

normally this is a URP problem. You can only use an amount of up to 4 (standard) or max. 8 lights per object.
But built-in should not have this limit.

stray pike
#

is there anything I can do about it?

timber lichen
chilly kettle
#

Have a look into he renderpipeline settings.
Im not sure if this setting exists there

stray pike
arctic isle
#

where is it cant seem to find it

night shell
# stray pike is there anything I can do about it?

The issue your running into is that by default the built in render pipeline has a limit of 4 per pixel lights. When that limit is reached then realtime lights are shaded per vertex. That is why your seeing that strange issue. There are many ways to go about fixing it but the most obvious is to go to the quality settings and increase the per pixel light count

#

I.e. the quality tab under project settings, in there if your on the built in pipeline you'll see a field for per pixel light count

#

Whoops should have looked in the thread lol your question was already answered

#

But lots of per pixel lights can be taxing so like was suggested i would recomend baking... Or you could switch to deferred rendering which has no limit and is very efficent in regards to being able to have 100s of per pixel realtime lights

sonic mason
#

this is my blender version, my normal maps look great

#

but in unity , the normal maps ,specially when baked , its very hidden

night shell
sonic mason
night shell
#

yep I think your running into there issues with the unity standard shader when it comes to baked lightmaps

#

one more question though, are you baking with directional lightmaps?

sonic mason
night shell
#

I see there directional mode is none

#

what are your options?

#

I don't use bakery so I'm not familiar with it

night shell
sonic mason
night shell
#

yeah bake with a directional mode, mabye try dominant direction

#

baking with directionality means that if your materials have normal maps, it can shade using that directionality

night shell
sonic mason
sonic mason
#

its far from the blender version still , :/

sonic mason
night shell
#

yeah I'm aware, and there are ways to bring that detail back

#

I would try the different directional modes and see which ones brings back the detail you want

young plover
#

Why is this limited to 8? I can't seem to find the ''Pixel Light Count'' since it says there's a ''Scriptable Pipeline'' in use and I don't know much about that, then I went to the HDR settings and found this alternative, yet I need more than just 8 for the project that I'm working on. Can somebody explain how can I expand the limit to at least 12 or more?

night shell
young plover
#

What's that?

#

My issue is actually that every time I look down, the light turns off, which is odd.

night shell
#

huh, looks like URP is forward only so looks like you might be out of luck

#

the reason why its capped at 8 is because per pixel lights are expensive

young plover
#

Wait no

#

I'm wrong.

#

Everytime I look down the lights turn ON

night shell
#

probably because they are being culled

#

but I would ask do you need 8 realtime per pixel lights?

#

can you get away with baking lights for your project

young plover
#

I just thought it was a quick fix for it, but I guess I was wrong.

#

Do I use the deferred rendering?

night shell
#

if you need alot of realtime per pixel lights in your project then your probably going to need to use a deferred renderer

#

otherwise if you can't, then you need to cut down on the amount of realtime per pixel lights in your project

#

baking is one way to do that

young plover
#

Ooooh.

#

Thanks, I'll give the deferred rendering a try, I'm not really sure about baking though, I've heard its helpful most of the times but never used it or had any knowledge to use it before.

night shell
#

baked lighting will often times lead to way higher quality results than you can achieve in realtime, and its all very performant because its basically "baked" or "static"

#

just to illustrate the point, here is an example on a pretty old project of mine comparing realtime lighting and baked lighting for a VR project

#

realtime

#

baked

young plover
#

Thing is I don't have any knowledge about lighting or any other category. I've come back to Unity after a few years of owning a system that was built in 2006. If you look for my old messages here you might see the idea I was using Unity 4.x, which really demotivated me from learning much more about unity and/or using it at all. I got a new system and I'm looking forward to learn much more about Unity, thank you for the help, I'll try to find information about the baking system and deferred renderer, since I don't have any knowledge.

young plover
# night shell

This actually looks gorgeous. Might give it a try honestly.

night shell
# young plover Thing is I don't have any knowledge about lighting or any other category. I've c...

Let's learn some basics of light mapping in Unity 2020.1 using Universal Render pipeline (URP).

You will also learn some Unity tips and techniques to improve and speed up light baking workflow.

☑️Old House 3D model : https://bit.ly/2xQSeU4

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

☑️Quick Links :☑️
Introduction - 00:00
Part 1. How to bake lights ...

▶ Play video
young plover
#

Thank you!

stray pike
#

I actually dont know where to send this, but it looks like a lightning issue to me
my walls have these stripes for some reason, how do I fix it?

#

its not a material issue because with no material its the same

chilly kettle
#

of your light

stray pike
#

thank you

limber delta
#

Oh, and I learnt about filtering 🙂

#

Never experimented with that

ruby urchin
#

I'm new to Unity and this could be a silly question. Only a limited number of lights are affecting my objects (8 point lights + a directional light). 4 point lights aren't reflecting with the ground. How would I change it so these lights reflect with objects in my scene?

ruby urchin
chilly kettle
#

The URP (Universal Render Pipeline) hast a light limit per Object of 8

ruby urchin
#

Is it something I can change or would I use another pipeline?

chilly kettle
#

As i can see, you are doing some VR Chat stuff.. so it would be smart to bake lighting.
Because realtime light is heavy and not recommended performancewise when you do mobile/VR Stuff

ruby urchin
#

Ah okay! Thank you I'll look into how to bake lights

chilly kettle
#

Does your train move?

ruby urchin
#

No

chilly kettle
#

okay ^^

karmic crown
#

My URP 2D Light is showing gray and it’s creating like a beam of light that in the corner kind of works as a mini map because shadows that are casted with the main one show up as a mini version in the circle, if I can’t get rid of the circle I can just move the camera in, but I want to be able to have the light not gray out everything

unreal ember
#

hey does someone know what this causes?

deft fiber
edgy yacht
#

Do mixed lights bake for static objects, and use realtime for non-static objects?

#

Are they more performant then?

sleek notch
#

Hey i don’t know why i didn’t ask here straight away, so i made a day and night cycle which just rotates the directional light along the x axis over time, one thing i noticed was that when its fully dark, the items somehow still get lit from underneeth by the directional light

#

any fix to that?

#

like the light is going through my terrain

#

the mesh

#

^ also im using auto generate lightning if that makes a difference

raven flower
raven flower
edgy yacht
#

Does anyone know how to fix this with the directional light? I have a reflection probe around the cube but for some reason the directional light still goes through?

sleek notch
unreal ember
cinder raven
#

Hey people. For some reason, shadows aren't being rendered in my scene view, but they exist in the game view. What's the matter?

deft fiber
deft fiber
cinder raven
#

I have lighting, just, not shadows

#

I've never seen anything like this before

#

It works in another project, but if I just copy the lighting settings from it I still get no shadows

#

in scene view, of course. I have them in game view

unreal ember
quartz jetty
#

without using scripts btw?

wheat pecan
#

hi! i'm making an experimental minecraft clone and i'm getting some really strange lighting with my block textures. it seems to happen when i change the texture filter mode from bilinear to point. i'm using a single texture sheet with each block texture as a 16x16 section in that sheet

night shell
#

fog basically globally obscures anything beyond a certain distance like in your example, if you wanted the light only to reveal what is beyond the fog then you need to make some kind of custom fog solution, where you do fog as normal, but you also (just geuss work here) raymarch a cone shape in the same exact position that your current flashlight is in, and use that to lerp between fog and no fog. so the end result is that areas that are not within that raymarched cone are obscured by fog, anything inside is not

daring haven
#

Not at computer, but could you use separate light layers? (Can you bind fog to some layers and not others?)

#

Light layers allows some objects to not pick up some lights, so was wondering if useful here too.

marsh fiber
#

this point light gets cut off with a hard line when it shines on to this grass material here. if i take the material off and put a different material on the object then it shines correctly. looking for some help understanding why my grass material is causing this cutoff

#

with the grass material replaced by a different material

#

no cutoff

quartz jetty
little condor
tight parcel
marsh fiber
edgy yacht
#

Why does this happen? If I remove the Skybox material it works, but I want the skybox material? I also added my reflection probe in the image. The walls and ground and ceiling are also marked as static

edgy yacht
#

Setting the near plane to 1 fixes the issue, why would that be? I thought that the near plane is supposed to make it worse if I increase that?

marsh fiber
#

okay so its sort of the issue

#

if i remove the normal map then the light doesn't get cut off any longer, however, this seriously messes with the material because it drastically changes how it looks specifically in the color department.

little condor
marsh fiber
marsh fiber
# little condor Can you take a screenshot of your material settings. Perhaps the normal map is ...

so marked with the T and the 1/2/3 on top are 4 different planes in blender that are individual objects. The "T" marked one is the "template" object with the "template plains" material on it - this is not actually a concern as I don't use this material in Unity. the 1/2/3 ones are the concern, they are to be used in Unity and are the materials I am having an issue with. These materials each have a slightly different color than each other (doesn't look like it in Blender but its much more pronounced of a difference in Unity) but otherwise have the same setup. The shader you see in the bottom half of this image is pre-baked, I will post the baked half in a moment.

#

so really the only difference between 1/2/3 is the "pos" value of the right side slider in that ColorRamp component you see there. plains 1 is set to 5, plains 2 is set to 5.5, and plains 3 is set to 6.

#

but otherwise shaders are exactly the same. from here i bake the materials.

#

to get this.

#

notice that on the right side on the material list i switched the material from "plains 1" to "plains 1 baked"

little condor
#

But this blender, the issue would be with Unity, so what is the Unity shader settings? I thought you were just using a Standard shader to be honest.

marsh fiber
#

from there i export each object as an individual .fbx to unity, extract textures, slap in the scene, turn them into prefabs, and assign those prefabs in the inspector to the script that handles creating them when i run the scene.

#

one second

#

first some more detail as this may be important. notice the dialogue on the top left after i import the model to unity, it mentions osmething about the normal.

#

this is the material itself in unity

little condor
#

Ok, so select the normal texture and make sure it's set as Normal map

marsh fiber
#

that it already seems to be

little condor
#

ok, cool.

marsh fiber
#

sorry for all the extra explanation but i just figured if i provide more details that may illuminate the issue

#

pun not intended.

little condor
#

Well, everything looks ok. Apart from the normal map being in Directx format, I can't think of any other reason for the light cutting off like that. Perhaps try a different normal map as a test to see if that fixes the lighting and keeps the colours the same?

marsh fiber
#

I actually switched it over to the OpenGL format that came with the texture.

#

and is the basis for 1/2/3 with just the variation in the color

little condor
#

I'll try it out quickly. One sec.

marsh fiber
#

thank you much

#

maybe i just need to create the material directly in unity and not in blender but i wouldnt know how to get that color variation going there that alters the color texture.

#

never made materials directly in unity before.

#

and btw i used the 1k .jpg option.

little condor
# marsh fiber thank you much

I couldn't replicate the issue. On the left is a material using the DX normal map, on the right is a copy but using the OpenGl. They both look fine to me, which in itself is odd.

I tried both the png and jpeg textures and it didn't affect anything.

Sorry, I'm stumped 🤨

marsh fiber
#

or did you make it in blender, expport, etc

little condor
#

Yes, just created a standard lit material and added the~~ albedo~~ base and normal textures.

marsh fiber
#

Using URP or built in?

#

or would that even really matter?

#

so i just did the same as you and yeah it works. when i swap out the color that comes with the source with the color that i export from blender it still works but the color does not look like what it should on the end resulting objects its way too light in color.

#

im guessing the normal has something to do with how dark the color comes out.

#

and also the normal in the source isn't the same size as the normal in the blender export as i scale things to 2x to make the grass look smaller.

iron gyro
#

hello guys, i really need to your help. I will show few hours later my game demo but urp lights have a problem on terrain. looks like a terrain is divided into squares

deft fiber
iron gyro
tawny skiff
#

Hello, I bought VR/Metaverse Space Station on unity marketplace and I have a small problem I can't put the ship textures. I have the last version of unity when I try to put the reflections probs in the rooms of the ship it takes the colors of the base ship which is pink and not the relfexion probe that you made. Can you help me please, thank you very much.

slate latch
#

Anyone know why the ui for my lights seems to be locked? If I change the light source to a baked light I can change the intensity and what not, but when I change it to a realtime point light all the properties in the ui stop working, I can type in the intensity of the light and it resets to its previous value...

This light is in the root in the heirachy, it's not within a prefab or anything, it started happening recently, starting to wonder if it's because I upgraded to the 2022.2.0b16 beta

deft fiber
tawny skiff
deft fiber
tawny skiff
# deft fiber Then I don't understand the question

I bought an asset in the marketplace and there was a scene already made it's a ship except that there are no textures but there are reflections except that when I try to project the light in the room it does not work

slate latch
#

Anyone know why the ui for my lights

chilly kettle
#

is there a reason, why the scaling of my crystal is not 1 like i set it there?

#

The Terrain is correct

deft fiber
chilly kettle
#

No.. its 0.34532 also...
i see, that this is the same 😮

#

is this also the reason why i have overlapping lightmap uvs there?

deft fiber
#

That alone shouldn't cause UV overlap, but I guess it might if some objects have wildly large scale that's taking up space from other meshes
The more common causes are the lack of lightmap UVs altogether, and problems with margins

deft fiber
# chilly kettle

The overlapping areas here are so large I'd be surprised if it's not because lack of lightmap UV generation

chilly kettle
#

it should be okay

#

im baking with 20 texels

deft fiber
# chilly kettle it *should* be okay

Then I'm not sure
I'd look at the whole lightmap using one of the views that shows you where everything is as wireframe to see what the overlaps are and to spot anything suspicious (shaped, sized or located weirdly)

chilly kettle
#

dont know why its not using the space of the lightmap :/

deft fiber
#

I don't know why it sometimes does that
Still, for whatever reason there's too many islands compared to required margins, relative to the space it's using

chilly kettle
#

yeah, it should take more space for placing the islands correctly

#

for other objects, it does perfectly 😄

deft fiber
#

That doesn't look right to me either, the margins take up more space than the islands

chilly kettle
#

yes, there its to big.. xD

chilly kettle
chilly kettle
night shell
winter cave
#

Why do I always get these horrible artifacts when baking?

#

This happens in URP and HDRP

winter cave
#

Is it normal for objects to turn entirely black when a lightmapped light is turned off?

#

When I turn off the light, some but not all objects turn pure black

#

nvm, material was weird

chilly kettle
chilly kettle
tawny skiff
#

Hi, how do I project in the room what is in the sphere? Thanks in advance

night shell
# chilly kettle What means max size? i have massive space in the lightmap, and like you can see ...

because like I said, its possible that the object has reached its maximum size in the atlas, it might appear to have space in the atlas but if you are changing the scale in the lightmap and the object scale doesn't change then its as big as it can be. This can be a case if the object has improper lightmap UVs with too many uvs elements, or in your lightmap you might have say too many small objects just taking up space in the lightmaps.

#

its worth noting also that the field there I think actually works like a multiplier instead of a definitive number.

#

I don't think you can make an object ever 1.0 size in a lightmap, as depending on the scene it can also be very inefficent because that means for every object in your scene it will need to have a unique lightmap because at the requested scale you want it at, means there is no room in the lightmap atlas to fit in any more objects to save on space/memory. Lightmap atlases always have multiple objects within them at different scales depending on how large they are in the scene

#

||(someone correct me if I'm wrong on this please)||

fringe notch
#

My light seems to overlap, when one is on, the other one is off, anyone know why?

night shell
fringe notch
#

when i move in the scene they alternate

#

they interfere

night shell
# night shell I don't think you can make an object ever 1.0 size in a lightmap, as depending o...

im not sure how internally unity computes this (again if anyone knows please correct me if im wrong), but say you are baking lightmaps at a max resolution of 1024, and you are baking a world with say mabye 5000 objects. with unity defaults it might only bake mabye 10 - 15 lightmaps. Thats basically 5000 objects fit into 10 - 15 1024x1024 atlas. If you try to increase the size of objects in their lightmap that means objects will have to be moved to other new lightmaps because a new one has to be allocated. And objects at their biggest scale i.e. 1.0 means that for that single object it has a 1024 lightmap for itself. for 5000 objects in a scene where if their set scale was 1 in an atlas that would mean 5000 1024x1024 lightmaps...

night shell
#

and light overlapping as in one light appears to turn off or flicker when a new light is moved into an area/scene?

fringe notch
#

yes, right on your money

night shell
#

well that tells me that you've reached the limit of the amount of realtime lights you can have lighting an object

#

probably because your on forward rendering

#

if you don't know what I mean I can translate that to english lol

#

but if im right on the money then that is what that means

fringe notch
#

i dont remember how to change it tho

night shell
#

are you using the unity built in pipeline? or are you using urp?

fringe notch
#

urp

night shell
#

its always urp 😛 but anyways

#

there are ways to fix it

#

the quickest and fastest way is to go into the URP settings asset you have and increase the per pixel light object limit

fringe notch
#

oh? hold on then i can try

night shell
fringe notch
#

but will this permanently fix it?

night shell
#

it depends

#

which is where im gonna get into the other fixes, but also explain some notes that you'll need to be weary of

#

your running into that issue because there are too many lights per object in your scene

shadow horizon
#

Why would this happen? Some of my objects are not receiving lighting data at all (The Door) (I removed my bake data to verify, so now everything is real-time)

night shell
#

and if you read the settings carefully it says in URP you can only have a set amount of lights per object

#

any more than that and it starts to get expensive

fringe notch
#

ill try that setting rq hold on

night shell
#

there are a couple of ways to fix it

#
  1. is you can actually split up your level mesh basically into different objects
#

each room can be its own object

#

instead of an entire level being one mesh, you'll hit the limit on that much quicker

#

so splitting it up into different meshes and objects is one way also to get around it

#

but the other and most common and recomended way is to use baked lighting

fringe notch
#

i was thinking of baked tbh

#

is there a quick way to switch or is there a procedure

night shell
#

a quick way to what

fringe notch
#

to switch from realtime to baked

#

do i literally just change it in the light obj

night shell
#

yeah that can do it but that won't immedieatly change the look of it because the scene then has to be baked

#

think of the mode as "marker"

fringe notch
#

how long does it take to render (i guess would be the right word)

night shell
#

depends

fringe notch
#

/generate

#

usually

#

its a small map

night shell
#

well it depends on alot of things, your computer hardware but also how large your scene is

fringe notch
#

ooh yeah right

night shell
#

if its a small map, but you have a powerful PC it might take a minute or more to bake depending on the lightmapping settings that you set

#

but if its a small map and you have a crappy PC it could take a while

fringe notch
#

so i'd just switch in the object

night shell
#

I wish I could give a definitive answer but it just depends on alot of things

fringe notch
#

no worries

#

but is there a way to switch all lights to baked at once

night shell
#

there isnt a dedicated switch but there is a way to do something similar

#

in your scene hiearchy tab you can do a search

#

t:Light

#

and then select all the lights

#

and change the mode to baked

fringe notch
#

ooooh

#

thats neat

#

and is that all?

#

no other step?

night shell
#

alright gimme a second, Im assuming that you haven't lightmapped before so I'll send some tutorials your way

fringe notch
#

i havent really

#

ooo

night shell
fringe notch
#

i'll check them out

#

thank you

#

the baked generated in .1 sec lol

night shell
#

you also need to when changing lights to baked

#

you need to have objects that are static

#

or contribute GI

#

in the static flags

fringe notch
#

im not sure what that is actually

night shell
#

whoops sent in the wrong order

#

but you can set the contribute GI flag (or just checkmark the entire object as static) which means that the object will be marked for "baking"

fringe notch
#

ahhh

#

could i select every object and do that?

night shell
#

hmm?

#

why would that be bad?

#

ohhh

#

yes

#

it can be bad

#

when it comes to lightmapping generally you only bake objects that are static or don't move at all

#

for example your level geometry would be static

#

but dynamic objects like doors or anything interactable would not be static

fringe notch
#

what would happen if i baked them?

#

or marked them

night shell
#

if you marked then and then baked them, they would have lighting but the problem is when the object moves or gets destroyed then the lighting is going to be the exact same on the object, almost as if its stuck in place. not only that on other surfaces there will still be shadows inplace of where that object used to be

fringe notch
#

i see

night shell
#

i'll just show what I mean visually so you understand

fringe notch
#

which lighting is generally the best looking in your opinion?

night shell
#

you combine realtime lighting with baked lighting

fringe notch
#

ooh

night shell
#

heres a lightmapped scene

#

and I have this stack of objects baked as well

#

if these objects were say dynamic physics props and I could move them

#

then you'll see these issues when these objects are moved out of place

#

or if I rotate the stack also

#

you can see the lighting is literally stuck on it

fringe notch
#

ahhh

#

i see

night shell
#

thats why you only bake objects that don't move

#

now I actually talk about this in the lighting tutorial I wrote here

fringe notch
#

also, is there a way to make light not pass through walls?

night shell
#

so for an objects like the stack

#

you don't mark then contribute GI if they are dynamic and move

#

which that creates a problem later on which needs to be solved

#

case and point here

#

these clothing items here are not included in the bake for various reasons and they stick out

#

the positive is that one they don't mess up the lighting of the overall scene, but of cours they don't blend in

#

when you get more into lightmapping

#

this is where something like lightprobes come in handy

#

and they can be used to blend your dynamic objects back into the scene

#

these yellow balls are light probes

fringe notch
#

actually i have a similar situation in my game

#

hold on

arctic isle
#

@night shell @fringe notch can you use a thread?

night shell
#

sure yeah, my bad

arctic isle
#

No worries 😄

night shell
#

lightmapping

#

can you join the thread @fringe notch

#

don't really use threads so not sure how they work i ndiscord

fringe notch
#

sure

loud pecan
#

For some reason the compiled version of my game does not use the correct lighting.
In the editor (first image) the "wall/ground" tiles are lighted by a global light in a darkish purple.
The compiled version (second image) seems to completely ignore this and gives it bright color (I guess unlit?)

deft fiber
polar wadi
#

Hi, could anybody tell me why some walls are fully lightened wile others are not ? You can see the light coming from the windows and casting shadows properly, same with furniture. But I can't figure out why the opposite walls are fully lightened as if outdoor? There is an outer face which is supposed to block the light

#

another example here. Wall fully lightened while it shouldn;t

deft fiber
polar wadi
#

For the HDRi skybox, why would it make walls so flat but not the floor ?

deft fiber
#

Rough surfaces appear brighter when facing a source of light

polar wadi
#

OK thanks for your explanation, I'll check my lights and skybox then