#archived-lighting

1 messages · Page 15 of 1

subtle nova
#

That would be a little easier than what I’m doing now, in any case

#

Just duplicating the renderers and splitting them into meshes and shadows

deft fiber
#

Also don't crosspost I don't want to be repeating what others have said already

ivory crane
#

Is there's a way of preventing the fog from affecting a specific object?

main wolf
timber lichen
#

I've been having an issue with my lights and I REALLY need help from someone with experience with lights. I've been wanting to bake lights into my scene forever but no matter what I do it'll break some of the lights every time and they just wont generate, I used to have 128 UV Overlaps (lol), but the number is down to 46 now. I've tried so much and yes I generated Light UV

#

Here are the settings I used

arctic isle
# timber lichen I've been having an issue with my lights and I REALLY need help from someone wit...

Hello!
First, onto the settings: Use GPU Lightmapper if you can. It's (generally) 5 times faster. Turn progressive updates off for speed as well. After that, follow the instructions here (Chapter 9) --> https://forum.unity.com/threads/progressive-lightmapper-guide.1340936/#post-8467001 for getting rid of UV Overlaps. Hope this helps!

near plaza
#

Hmm can anyone tell me why I keep getting dark models when baking lights?

arctic isle
near plaza
#

Yes all of the floor tiles are static and have that box ticked. I set some objects with the issue to receive GI from reflection Probes as it seemed to be the only way to fix them. It seems random now though.

#

I've noticed that where objects are black, they are in the presence of multiple lights. I'm on URP. Not sure if this is a limitation?

arctic isle
near plaza
#

I rebuilt the lighting and it worked better this time. I think I found my main issue though 🙂

#

Thanks for the help

timber lichen
#

how can i fix the problem where when i baked lighting and there are random bright spots

quartz lily
#

Post screenshots of the issue to help people see the problem..

timber lichen
#

k one sec

gleaming shore
#

Hi! I'm a completely beginner in Unity and I keep struggling with lighting an indoor environment (for a game). Can somebody please explain me why lights pass through walls and tell me how can I fix it?🙏 I tried to use baked, mixed and realtime lights but the problem is still here....

arctic isle
# timber lichen

This is either due to bad UVs or due to backfaces in your scene. Look into the debug visualizations (there is a dropdown at the top of the Scene View) to take a peek at the Texel Validity and UV Charting to see what the problem might be.

arctic isle
gleaming shore
gleaming shore
timber lichen
arctic isle
#

If you're using earlier versions it may just say 'Shaded' or 'Textured'

timber lichen
#

yeah im on that

arctic isle
timber lichen
arctic isle
arctic isle
timber lichen
#

i hate reading its annoying

gleaming shore
arctic isle
# gleaming shore I just tried and it still doesn't work. Even if it worked, I can't use baked lig...

Sure. Mixed lighting could be used here, but you don't have to go through any complicated setup if you don't need it. Take a look at this thread: https://forum.unity.com/threads/realtime-lights-leak-through-walls.1012474/

timber lichen
#

im so confused

solar cosmos
#

If I change the mode of my Point Light to "Baked" without baking any lightmap will it do anything? Because from what I can see the the light is still there and works just as in the "Realtime" mode

arctic isle
# timber lichen im so confused

if you have backfaces in your scene, they will make the parts of the wall 'seeing' them invalid and so lighting will not be calculated for those parts of your scene but instead the neighboring geometry will be interpolated into it

arctic isle
solar cosmos
timber lichen
#

im soooooooooo confused

arctic isle
timber lichen
#

im so stressed my baked lighting have been broken for 3 weeks

#

whats a backface

arctic isle
# timber lichen whats a backface

So make a new scene and make a new Quad or Plane. If you spin around the Scene View, you can see that you can only see the Quad from one side.
The Quad will have one 'face' which you can see and one which you can look through. That's because it 'faces' in a certain direction and the opposite direction to that is what we call the backface.

deft fiber
#

Baked lighting requires a lot of knowledge about mesh rendering fundamentals like face normals, UVs and vertices

arctic isle
#

Similarly, if you go 'inside' a cube, you will be able to see through it because you're looking through the 'backfaces' of the quads that make the cube.

gleaming shore
zinc flume
gleaming shore
zinc flume
#

damn 120 is indeed overkill.

gleaming shore
#

Yeah I know, I just wanted to be sure that the problem doesn't come from the lightmap res

hot beacon
#

did anyone know how to fix this? i use GI bounce 5 and sample 64

gleaming shore
#

What does this error mean and how can I fix that?

dreamy hawk
#

Anyone know how to make the 2d lights pixelated

timber lichen
arctic isle
hot beacon
#

stand alone

arctic isle
# hot beacon stand alone

In the player settings for Android, there is an option for lightmap compression, you can turn that to high quality and it should resolve the issue

#

I see you're using Bakery, not sure if that matters

hot beacon
#

i see, thanks man, i forgot that setting exist UnityChanThumbsUp

timber lichen
#

I keep getting this error while baking, every second or so. I cleared cache and checked my memory tab and its around 70% while baking so there should be enough memory

#

any tips?

#

could this be because of GPU baking?

safe fox
#

gpu baking takes a lot of vram

#

afaik

arctic isle
# timber lichen

if you're trying to bake large translucent / transparent materials with the GPU Lightmapper it's possible that it can't fit them in the available VRAM

#

not necessarily translucent/transparent but most cases of this are with such materials.

timber lichen
#

🍰

timber lichen
arctic isle
tacit dune
#

I have 2 scenes where when i run them independently, everything works fine. But when i try to load into the second level using LoadScene, the whole map is darkened. and i can barely see any details.

timber lichen
arctic isle
#

you could also make your materials smaller 🙂

timber lichen
#

if it is, I have it on for all my materials it seems

#

I'm curious, what happens if I bake without those materials

safe fox
tacit dune
#

Oh thanks, i'll check it out

deft fiber
silk holly
#

does anyone know of a simpler lighting engine for Unity?
I don't want to use the fancy stuff and all, I'm looking for something dead simple like the Godot lighting style

#

I'm mostly looking for this because I want the sharp edges to be fine visible, just like on the other side

deft fiber
silk holly
#

something I do not want

deft fiber
#

It may help to provide and example of what you desire
Looking at Godot its shaders seem to be more complex than what most Unity's render pipelines offer

#

Speaking of, there conceptually isn't a "lighting engine", there are Render Pipelines which give rendering features for shaders to utilize
To have simpler shading you simply need simpler shaders that don't utilize complex or fancy lighting functions

silk holly
#

what I want to achieve is something like Blender 2.79 solid view with textures enabled
Ofcourse, I do want to have the shadows on the parts of the car hidden from the sun, but the sharp edges should remain visible

silk holly
deft fiber
silk holly
#

the sharp edges are still not here though

#

to show you, if I rotate that darkened part to the sun, you can see how the edges start showing up

deft fiber
silk holly
#

while now on the other side they are hidden

silk holly
deft fiber
#

You could implement some type of fake lighting, like a shadowless directional light pointing up or down, but I get the feeling that's not what you'd be happy with

silk holly
#

hmhh let me try something along the lines of that out

#

if it works, it works 🙂

#

it sort of works

#

it's hard getting the lighting intensity right now though, because else 1 area will be too much unlit, and when increasing it's way too bright

#

but I'll stick to this for now, if you have any other solutions you could drop them below, I'd be happy to try out if that works better

deft fiber
#

You may be able to reduce environmental lighting from the Lighting window to compensate

silk holly
#

that doesn't really help it seems, only increase the issue of overlighting

deft fiber
silk holly
night shell
#

you want a simple lighting style?

#

i.e. just diffuse light and flat ambient?

night shell
#

I would bet that using like an HDRI that has strong contrast would get you close lighting wise

subtle nova
#

Is there a way i can make a shadow 'diffuse'? like, blur the edges of a shadow

#

i want to sort of blend the edges of the shadows being cast on my fog

remote hinge
#

Hello all! I'm creating a game from and isometric perspective, in order to have an isometric camera I had to set my camera clipping near to -100 and turn fog off. However this caused my shadows to become all wonky as you can see below. Any ideas on how to fix the shadows?

deft fiber
deft fiber
remote hinge
arctic isle
cold jungle
#

hey how do I enable scene lighting/bloom or whatever is needed to make this work? The orb is supposed to glow

timber lichen
timber lichen
#

However, in my prefabs of the same object, these are the settings

arctic isle
cold jungle
timber lichen
#

the whole object?

arctic isle
#

The material attached to that mesh

timber lichen
arctic isle
timber lichen
#

also sidenote: I really appreciate you giving me this much of your time to help me solve my issue :) <3

arctic isle
#

Generally a really big lightmap resolution will lead to the lightmaps not fitting in GPU memory or taking an inordinate amount of time to bake.

timber lichen
#

That makes a lot of sense, let me see if I can fix by changing the Scale in Lightmap on the mesh renderer

timber lichen
arctic isle
#

There's no right answer for this, 2 will make it twice as large 🤷‍♂️

#

You're talking about the scale right? The anti-aliasing samples will just make the size of the data passed to the GPU larger or smaller, but won't fix your UV issues.

timber lichen
#

Yeah the scale

#

hmm

#

I've had this on all my gameobjects since day 1

#

god bless

#

Alright well, it's baking time 🍰

#

Thank you once again gio, I will give you a large chunk of the cake once its done

arctic isle
#

Can't wait to get the slice of cake in the mail 😄

#

Good luck finishing the project!

timber lichen
silk holly
tight seal
#

how do i increase shadows render distance

deft fiber
unique prism
vital widget
#

Hi guys, Im having this strange unity glitch where my room ( Which is not at all open to any sort of light) has some strange lighting when looking from far away, the light is alays in the shape of a circle

cold jungle
#

so when I use enlighten on URP for RTGI, how much perfs do I lose?

deft fiber
cold jungle
#

I see

deft fiber
#

If you're worried about Enlighten support, you're safe to upgrade editor versions at least up to 2024.3.

cold jungle
#

good to know

#

and the next LTS will be by then?

#

if it was even announced, idk

whole bramble
#

what is needed in a shader ,for reflection probe to work?

#

except standard shader , which are the other shaders what supports reflection probes on the surface?

arctic shard
#

Hi... Is it possible to make reflections from an HDRI image but also use a different skybox without the HDRI - I don't want the HDRI image to be seen (I am using URP)

vestal canopy
vital widget
vital widget
#

Thanks so much! I fixed it

#

But I still have a question, How do I light a room properly?

My scenes keep looking dull, i want a simple scene, just a white room with proper lighting like this:
A nice Bright room like this

#

But all of mine look dull, dark, increasing the intensity of the directional light dont make a difference at all

night shell
#

but also understanding how the reference here is lit is key

#

for instance its way more than a directional light

#

and if I had to geuss I don't think its a directional light

#

but there is tons of bounce lighting going on here

#

and in addition to that, there looks to be some SSAO in use

subtle nova
#

Is there a simple way to increase the intensity of shadows in a shader's lighting model

deft fiber
subtle nova
#

im using a surface shader with a custom lighting function, which is this:

fixed4 LightingBackFace(SurfaceOutput s, half3 lightDir, half atten) 
{
    half NdotL = abs(dot(s.Normal, lightDir));
    half4 color;

    color.rgb = s.Albedo * _LightColor0.rgb * (NdotL * atten);
    color.a = s.Alpha;

    return color;
}
#

just not sure what i'd need to change in something like this to darken shadows

night shell
#

I'm with Spazi, shadows are the absence of light, if your shadows are not dark enough its because you have too much enviormental light

deft fiber
#

I don't know anything about surface shaders but if your shaders are not dark, those areas must be getting light from somewhere

vital widget
night shell
#

yeah thats the farthest thing from that image

night shell
#

I really doubt that world is even lit with a directional light

#

sure there are shadows being cast directly down, which could be done with a directional light as well.... or with light sources placed vertically

#

but the biggest thing also with the lighting in that reference image is bounce lighting

vital widget
#

I tried a directional light but even that isn't that great either, it did not light up the indoors at all

night shell
#

bounce lighting can only be achieved either with light baking through progressive lightmapping, or enlighten realtime GI

night shell
#

its not really as simple as enabling a button I'm afriad

vital widget
#

Ah

#

I'll search up a tutorial on light bouncing

night shell
#

search up a tutorial on lightmapping first

#

lightmapping is how you achieve bounce lighting

#

realtime lighting cannot do bounce lighting

#

(unless you use enlighten)

vital widget
#

Also any other way to just light up an entire scene brightly?

#

I see

night shell
#

use a skybox

vital widget
#

Even for indoors?

night shell
#

oh your shooting for an indoor enviorment?

vital widget
#

Yeah

#

Like a portal 2 type of place

night shell
#

then yeah you don't have much options really, either use enlighten realtime GI, or I would suggest using lightmapping

vital widget
#

Alright

#

Thanks for your help!

night shell
#

In this video, we are going to take a look at Lightmapping in Unity 2020.1 to help you create fast and beautiful lighting in your scene.

Learn more about Lightmapping in 2020.1 from our Docs!
https://on.unity.com/2U7VQIX

Interested in the newest Graphics Features we added in 2020.1? Click here!
https://on.unity.com/2GHYGkR

Download the Spaces...

▶ Play video
#

damn you dyno

#

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
vital widget
#

Also about the directional light I placed it inside of my room, and increased it's intensity, but the room lighting wouldn't budge

night shell
#

you should not be using a directional light for indoor scenes at all...

#

directional lights are for suns/moons and general outdoor lighting

#

I think you need to learn about the different kinds of lights first - https://www.youtube.com/watch?v=p13tuFdKwP4 @vital widget

Unity Tutorial exploring the different light types you can use within the editor. This will work in all versions of Unity including 2018.3
✦ Subscribe: http://bit.ly/JimmyVegasUnityTutorials
✦ Patreon: http://patreon.com/jimmyvegas/
✦ FREE Assets: http://jvunity.com/
✦ Facebook: https://www.facebook.com/jimmyvegas3d/
✦ Twitter: https://twitter.c...

▶ Play video
vital widget
#

Ah damn, alright thanks man

olive iris
kind kraken
#

Why after generating lighting on the lighting panel it creates these weird things?

#

im using urp

#

and i made static all the objects that will not move in the game

#

I also generated lightmap uvs on the models that hadnt them

#

the only thing that stayed ok is the playground slide

#

idk why

kind kraken
#

im also not using the Lit shader for my materials but a custom one (not written by me)

kind kraken
deft fiber
kind kraken
#

The asset was meant to be used in HDRP but i converted the shaders to URP and it worked as it would until i baked the lights of a scene the first time with this shader applied on some materials and they cause weird artifacts. I use this shader for all my objects on my game, and the artifacts are shown only in a few of them

#

the shader provides some fields like Saturation, contrast a thing where you can drag your ORM map and use multiple normal maps or albedos

#

And if i drag down the contrast field of the objects that are glowing asf then it fixes, but the colors are not the same

deft fiber
#

If so, avoiding the problem at least would be simple

kind kraken
#

it only happens on these 3 coloured chairs, books and papers

#

nothing else

deft fiber
#

Something has to be different between working and non-working meshes
Probably either mesh renderer properties or material properties

kind kraken
#

the material of the papers books and chairs are different

#

but they use the same shader

#

I should investigate more on the fields

#

on what the creator of the asset put into these fields

#

and the most odd fact is that they have only a normal map and albedo

#

maybe a ORM map

#

but im not sure

#

i have to check

halcyon trench
#

@timber lichen is it kind of "popping"?

#

like it happens

#

very quickly

#

when viewed at different position/angles

#

it pops

#

its not like a gradual change

#

idk if u tried this yet but theres a limit to how many lights an object can be lit by

#

so if u disable a few of them

#

see if it keeps happening

#

u can increase the limit in settings

#

but I'd say its better to just break up ur floor into multiple parts

#

yeah u can check in settings for it and turn it up but that confused me for ages

#

even on terrain like if u have a big ass map made it cant handle more than 7 lights

#

ye no worries

#

uhmmmm 1 sec lemme find it again

#

oh ye I think thats it I'm pretty sure the limit is like 8

timber lichen
#

My avatar in vr chat lights up an entire room literally, im not sure how to fix this, she has emissions but i lowered them, it sucks because dark worlds suddenly turn bright

deft fiber
jade kernel
#

Hey folks, is there any way to get a tube light? I googled but could only find threads from 2015

#

Or a line, really

#

Just a looong point

deft fiber
twilit osprey
#

so... I have a scene in a desert...

jade kernel
#

Can emissive materials actually emit light? I tried but it just looked like it was glowing

#

I'm new to this, sorry 😄

twilit osprey
#

the shadows are being too strong for my liking... can I adjust the light or shadow setting so it doesn't make it that dark?

mild quiver
twilit osprey
#

Mine looks like this

#

Reducing the resolution kinda works but... it created weird artifacts at higher distances

#

Okay... found the issue...

deft fiber
deft fiber
dark jay
#

hi, how could i add shadows to tube area lights

#

or, if theres a way to do this without using shadows, how would i fix the light bleeding through the objects and reflecting off of stuff in other rooms?

deft fiber
#

Or possibly with per-room reflection probes but only with baked lights

dark jay
#

alright

dark jay
#

nvm, i figured it out. but thanks, that worked. now i just gotta do it for everything in the game😄

#

but yeah they work amazing for what i needed

timber lichen
#

Hello, question. Could UV overlaps such as these be the cause to lights breaking when baking?

night shell
#

if you are authoring your own lightmap UVS then yeah just make sure nothing overlaps

#

but if you arent, and are trying to bake that

#

you can actually have unity generate lightmap UVs for you

timber lichen
night shell
#

yes

timber lichen
#

I had done that already and still faced all these issues

night shell
#

are you putting your scene in one giant model file?

#

or are these seperate model files you have?

timber lichen
#

ah they're all separate

#

each object

fresh harness
#

Good night everyone! Could someone help me find what could be happening with this light maps? This dots on the wall weren´t supposed to be visible or even baked in the light maps, because they are far from the the point light range, does someone knows any fix for this?

#

this are the inspector of the candle light

#

I´ve tested and they are coming from the candle lights for some reason

night shell
#

try enabling importance sampling

night shell
#

because "all these issues" can be due to a number of things

timber lichen
#

yeah defo

#

do it again as in bake or the lightmap generation?

night shell
#

both

timber lichen
#

because I can't do much beyond check and uncheck the box no?

night shell
#

unity will give you options though when ticking that box

#

but generally by default it should do an okay job

#

but yeah do both, I want to see what issues that you are referencing

timber lichen
#

should I generate with low quality for now just to show?

night shell
#

what are your lighting settings?

night shell
# fresh harness

also just to rule it out I would make sure that isn't cuased by texel invalidity, even though it doesn't look like it

timber lichen
#

wait no these are old

#

one second

night shell
#

ehhh...

#

ok

#

for speed do the following

#
  • direct samples = 16
  • indirect samples = 16
  • enviorment samples = 16
  • light probe sample multiplier = 8
  • min bounces = 1
  • max bounces = 4
  • filtering = advanced (and set the denoiser filters to open image denoise)
  • max lightmap size do NOT set it to 4096, I would set it at most to 1024
timber lichen
#

alright baking now

fresh harness
night shell
#

that does not look like a padding issue to me

#

but I want to rule out texel invalidity just in case

fresh harness
#

I´m a bit new in this topic sorry

night shell
#

there should be a scene view mode for texel invalidity

#

if you see alot of red then thats bad, but otherwise it should all be a nice green

#

in the texel validity view mode

fresh harness
#

you mean this view?

#

There doesn't seems to have many problems with the texel validity I think...

#

or it is just not showing

night shell
#

for texel validity you have to have recently baked your scene

#

since unity will discard the data when you close your project

#

or load a new scene I think

fresh harness
#

sorry, needed to restart my pc because unity sometimes stay stuck at the "preparing bake" stage 😓

#

but gonna try with a new bake now

night shell
#

hmm

#

I will say

#

the artifacts look like fireflies

#

again it could be texel invalidity, but I doubt it, but also

#

on your filtering settings

#

make sure that you are using a denoiser

#

low sample counts will cause these fireflies to appear on your lightmap ESPECIALLY if you are not using any denoising

fresh harness
#

here, you mean?

night shell
#

yep

#

thats probably why actually

#

for the direct/indirect and ambient occlusion if you are using it

#

use Open Image Denoise

#

or OptiX

#

you should always be using a denoiser on your lightmaps

#

(unless if you know what you are doing and are intentionally having them off)

fresh harness
#

sure! I'm trying with Open Image Denoise right now

timber lichen
#

@night shell this time I got much less UV overlap

fresh harness
timber lichen
fresh harness
#

it has to do with the textures on the wall

night shell
timber lichen
#

the lights look fine too to me

night shell
#

in my experience I always get UV overlap issues, but if you final bake looks totally fine then you should not be stressing about it

fresh harness
#

they where reflecting on the textures

night shell
#

if the final result looks completely fine then don't worry about it

timber lichen
#

any adjustments I can make to the lightmap and bake again or should I keep the settings as you told me?

night shell
#

how does your scene look baked?

timber lichen
#

pretty close to the original

night shell
timber lichen
#

almost identical

night shell
#

screenshot?

timber lichen
#

it actually seems a little darker

#

shall I send the screenshot here?

night shell
#

go for it

timber lichen
#

actually is it ok if I send it in Dms?

night shell
#

I have my DMs closed

timber lichen
#

alright no problem

#

ill send here and remove it later

#

ill send baked screenshots first

#

this is the closest its been to the original, still buggy

#

original looks like this:

night shell
#

some of those artifacts are texel invalidity artifacts

#

I can show you how to fix those

timber lichen
night shell
#

those appear when you have backfaces exposed

timber lichen
#

I'm not sure what that means to be honest

night shell
#

gimme a sec

#

texel invalidity artifacts

#

like I said, these are caused when you have exposed backfaces

#

case an point, my wall here is not fully modeled

#

and therefore the backfaces are exposed

#

i.e. backfaces are basically geometry or polygons that is culled

timber lichen
#

Oh I see.. though I dont remember importing anything like this

night shell
#

there are a couple of fixes you can do

timber lichen
#

could this happen with occlusion culling?

night shell
#

no that is unreleated with lighting

timber lichen
#

okay I see

night shell
#
  1. you can enable double sided GI on the materials for objects in that area
  2. with your geometry, double check for exposed backfaces and if there are then add geometry so that those backfaces are not exposed
#

case and point in my example

#

here is with double sided GI turned on

#

the problems are fixed

#

but also in this example I turned culling off since I was demonstrating some issues to someone else as to why you shouldn't always do it

#

and the other fix

#

just avoid exposing backfaces

timber lichen
#

ok so if my issues are all around this wall thing

#

can I just put a large cube behind it

night shell
#

no that wouldn't really fix it

#

since your geometry in that instance is rather complex I'd probably just enable double sided GI

timber lichen
#

from the original mesh?

night shell
#

on the material settings

#

the material that you are using for that object

#

enable it

timber lichen
#

aha okay

night shell
#

I'm going to geuss you are using URP arent you

timber lichen
#

yep

night shell
#

ah, then in that case you'll just have to set the culling from back face to off

#

or whatever the name of the option is

#

just as a warning though, don't set this for all objects

#

it will typically fix alot of issues

#

but it will also have a side effect if you are not careful

#

top is with it disabled, bottom is with it enabled

timber lichen
#

ooh okay I can deal with that for a few objects

night shell
#

and no ambient occlusion is in use

#

so enable it only for the areas/materials that need it

#

and do a rebake

#

and that should fix alot

timber lichen
#

Alright will do

#

also let me show you how my scene looks like with realtime lights

#

or before baking I mean

#

you'll notice I have this weird cutoff on some lights

#

with the purple one

#

much brighter before the bake

#

the bake always makes everything dimmer and some lights disappear straight up

night shell
#

when baking lighting, one thing you will lose out on is specualrity which is why some things might appear a bit darker

#

as for some lights disapearing

#

that can be due to a number of things but most likely

#

you just have lights that are set to shadow casting, and while they look fine in the scene view, in actuality you have placed them inside of objects that you are also marking Contribute GI static

#

which means that during the bake they will be completely occluded and therefore not show up

#

this isn't an issue with baked lighting, its an issue with realtime lighting and shadow casting being inprecise

timber lichen
#

ha

#

thats insane

#

for unity to do that to me

night shell
#

technically it would happen in any other engine as well

timber lichen
#

I also get weird issues like:

#

no light under sign

#

light under sign (I zoomed in)

#

or just got closer in the scene

night shell
#

are some of those lights realtime?

#

if they are you are most likely running into a per pixel light count limit

timber lichen
#

I triple checked that every light is baked

#

even directional lights that act as sun / moon

night shell
timber lichen
#

nope, before baking

night shell
#

and after baking the light appears?

#

bit confused there

timber lichen
#

baking aside, there is a light there above that sign that doesnt show up until I get very close to it

night shell
#

that sounds like the light is realtime and again its a per pixel light limit your hitting (since the light is closer to the screen it gets priority)

#

turn gizmos on and check that light

timber lichen
#

its a baked light

#

this happens in many cases across the scene

#

sometimes one light will turn off if i move another light too close to it

#

I guess if they're near the same object?

#

I have videos of this happening if it will help make it clearer

night shell
#

sure go for it

#

baked lighting has no limit on the amount of lights you can have since its all getting baked down into a texture

timber lichen
#

yeah but then I have all these issues with it

#

if I could bake while getting the same visuals I would in a heartbeat

#

trying to fix them one by one

night shell
#

yeah again that issue sounds like the light is still realtime, thats the only case a light like that would exhibit such behavior

#

realtime or mixed

timber lichen
#

all the spot lights in my scene selected

#

same for the one directional light on top

#

all baked

night shell
#

I see the text is bolded white

#

which usually happens when a value is different then that its supposed to have in a prefab if I recall?

#

I suppose lets try this to verify it even though I think my gut feeling is correct

#

bake your lighting

#

and then once you do

#

disable all of the lights in your scene

#

and dont rebake

night shell
#

yep

#

those look like the telltale realtime light culling issues

#

I can even see when selecting

#

that they are realtime

timber lichen
#

huh

#

old video maybe before I switched back to bake I suppose

#

so changing the mode to baked doesnt do anything until I actually bake?

night shell
#

yes

timber lichen
#

okay makes sense

#

I'm baking right now then ill disable all the lights

#

disable them from the actual objects not from the scene correct?

night shell
#

sure yeah

night shell
#

you probably don't need to do the disable step

#

since it sounds like just a misunderstanding on your part assuming that they would be changed instantly, instead of they only change when you bake

timber lichen
#

so what am I supposed to do once they bake? they'll still look broken

night shell
#

they shouldnt be broken

#

not if all of the lights are set to baked

timber lichen
#

ok baking is done

#

are these not working because they're inside the object?

night shell
#

yes

#

I mentioned this earlier

#

because baked lighting is more precise than realtime, any lights inside geometry that is being baked will be occluded

timber lichen
#

mhm I see

night shell
#

so you need to move them so that they are not inside the baked geometry and rebake

timber lichen
#

the issue with the weird walls here is fixed

#

the scene is just very very dark compared to the original

#

massive difference

night shell
#

makes sense to me

#

with baked lighting you are also simulating the bounce of indirect lighting and shadowing

#

realtime lighting doesn't simulate any of that because its too expensive

#

so therefore the lighting model in realtime is more simplified, and in your case your scene looks brighter because of it

timber lichen
#

so to counteract this I would need to increase the intensity of the lights overall? or maybe just the big one above?

night shell
#

increase the intensity of your lights

timber lichen
#

I'm a little confused

#

as to what i'm looking at

night shell
#

I'll explain

timber lichen
#

also with increasing the intesity, i guess its just trial and error? increase, bake, check, repeat?

#

until its right

night shell
#

but given the nature of baked lighting being precomputed, you have the huge advantage of being able to do more calculations to make the lighting look proper

#

like I mentioned you get things like indirect shadowing and bounce lighting which you can't get with realtime

night shell
# night shell

the image in the center here, the dark one with the light coming from above is an example of pure realtime lighting

#

I'll show another example

#

heres a scene with baked lighting

#

realtime here

night shell
#

notice how the lighting looks alot more natural, realistic, and even darker than the realtime one?

timber lichen
#

mhm

night shell
#

and from your screenshots I can tell why your scene is darker than normal, because its all under a large peice of geometry/ i.e. looks like an underpass

#

which is blocking most of the skylighting and moonlight

timber lichen
#

it does more bounces off things and includes colour for shadows as well because it doesnt have the issue of having to deal with a lot of processing so it can do whatever it wants quality wise, realtime doesnt get the same luxury, correct?

night shell
#

yes

timber lichen
#

makes total sense

#

yeah the underpass causing a lot of darkness, ill try to increase the overall intensity and rebake till its right or even better than before

night shell
#

if you've been using realtime lighting and never touched baked lighting I can imagine it might be quite the change especially if your used to how realtime lighting looks

#

but realtime lighting is not fully "accurate" compared to bake

timber lichen
#

truth be told its my first time touching anything 3d or lighting

night shell
#

yatta yatta you get the point

timber lichen
#

mhm it makes lots of sense

#

David I have a huge amount of gratitude for you

#

and I've been waiting to express that

night shell
#

no need

timber lichen
#

I've been trying to fix my lighting for around 4 weeks now

#

I'm mentioning you by name in my thesis lol

night shell
#

lmao no need

#

if it wasn't me it would have been someone else

timber lichen
#

I will, its the least I can do

#

you helped me more than you can imagine

#

and in a very crucial time for me

#

god bless

fresh harness
#

The light were reflecting on the normals of the wall

night shell
#

I meant screenshot for the other guy not you but ok

fresh harness
#

Oh sorry...

night shell
#

is that before you applied denoising in the lightmap or after?

fresh harness
#

It was before I've applied the denoiser, after reducing the smoothness of the material the problem seems to be solved also... but not as well as with the denoiser turned on

night shell
#

well show me how it looks now with the denoised results

#

its hard to see in that screenshot since its so low quality

fresh harness
#

it's much better now!

night shell
#

what issues am I looking for?

#

I don't see any

fresh harness
#

Ah sorry, there is no issues, was just giving the feedback...
I'm sorry if I've made a confusion

night shell
#

oh

fresh harness
#

But thanks so much for the help

night shell
#

your welcome

timber lichen
#

@night shell do you mind if I use a couple of your screenshots as reference?

night shell
#

go for it

timber lichen
#

thank you very much

ocean yacht
#

Is it normal for lighting to take 10+ mins to bake? I've only got a single area light I'm trying out

night shell
timber lichen
#

But then again that depends on other factors

#

just thought id drop this here

ocean yacht
#

these are my settings

night shell
#

but @timber lichen is right, the GPU lightmapper is faster on average, but even if its still slow then there are ways to speed it up and get good results

#

lightmapping speeds will slow down when you have tons of objects that you are lightmapping, not really when you have tons of baked lights

obsidian ether
#

Hi guys, is there a doc or any kind of ressources that contains some hexadecimal codes examples for light color based on environment ?

timber lichen
#

Hey Guys and Ladies -- Can someone please point me to the documentation on how to make an emissive object -- This is the emissive material I have set up, its not doing anything that I can tell -- my area light in the same room is doing the lighting -- I'd like to get it right

night shell
timber lichen
#

yes

night shell
#

and you want it to make it appear like its emissive, then just swap the material on that light mesh you have on the ceiling

timber lichen
#

the white panel is the piece thats supposed to be emissive

#

I can make the emission work seems to be the problem

#

im using built in renderer

night shell
timber lichen
#

I set it up as an emissive object, and it does not increase the light in the room

night shell
#

probably because the emissive material is not assigned

timber lichen
#

oh

night shell
#

I can see in your example that "light" mesh does not have that emissive material you created

timber lichen
#

Oh -- ok

#

I understand

night shell
#

just as a small note, I would advise not to use emissives as a primary source of light in your scenes.

#

even though that isn't what your doing in your scene since you have an area light that is the main thing that is outputting the lighting for that room in that spot

#

but it's not a good idea to use emissives for your lighting ONLY, and not using any unity light sources to back it up

deft fiber
obsidian ether
#

Where can i find that ?

tight moss
#

can someone explain something to me about shadows that is kind of irrelevant to unity but:
I get raytraced GI, reflections, etc... but what exactly really, are raytraced shadows? Aren't all realtime shadows, traced by rays?

night shell
#

no

#

realtime shadows come from basically a rendertexture from the lights perspective

#

think of it like another camera that is rendering the world, but from the perspective of the light

#

there is no "tracing of rays" that is happening

night shell
#

which gives you the appearance of shadows

#

a bit of a rocky and hacky explanation but does that help @tight moss ?

tight moss
night shell
#

again no "rays" are cast in this process

#

but basically the depth buffer is used from the lights perspective

#

so what happens sort of is that the world from the light is rendered

#

and we get the depth buffer of the scene from the lights position

#

then that is projected onto the main scene camera using matricies

#

and to determine if something is being shadowed

tight moss
#

the depth buffer, that makes sense

night shell
#

a depth test is done, so basically comparing what the depth value at a certain spot in the scene is compared to the main scene camera

#

and if it doesn't pass the test, that pixel is occluded and therefore in shadow

#

I'm probably butchring the explanation since it's been a while that I've messed with shadowmapping

#

but that is sort of the esseence

#

this will help you learn the nitty gritty

#

but all throughout that process no "rays" are cast

#

the problem with shadowmaps obviously is that they are a set resolution

#

so how well shadows can resolve details is dependent on how much resolution there is for the shadowmap

tight moss
#

so the benefit of raytracing is more resolution basically? and is it cheaper to have more shadow casting sources if you are doing raytraced shadows?

night shell
#

the benefit of raytraced shadows is yes effectively more resolution (pixel perfect, almost like the stencil shadows from doom 3 YEARS ago), and for that last point I'm not too sure but my gut says that there still will be a cost

tight moss
#

that was a great explanation though thank you. comparing the depth buffer of the camera and the light source makes sense

night shell
tight moss
#

i think it was tomb raider

night shell
#

well technically in a sense they are not wrong

#

because you don't have to render the scene multiple times effectively from different angles from light sources

#

but its not like they are free neither, have too many objects in the scene structure that the rays will trace against that will slow things down surely

tight moss
#

ohhh because you're casting rays from the camera, not the lights

night shell
#

yesss

#

from the camera, not the light

#

but in short, they are not wrong it is cheaper, but its not completely free

tight moss
#

thanks so much! I feel slightly more knowledgeable now 👍

limber stump
#

I am new to unity and game development, thus not have good knowledge. I am confused about lighting.
Is mixed light the same as baked lighting?
In my unity project baked lighting is a lot darker and dull than the realtime lighting after baking. And spotlights doesn't work when i use baked mode in it and generate the lighting.

I have everything that's none moving to be static, like walls, floor, roof, and other prop items.

surreal crown
#

Hello everyone, am I the only one that can't get a proper bake in Unity V 2022.2.21?

#

Baking process remains stuck at 5% and "Preparing Bake"

#

baking with v 2022.2.7 works fine

arctic isle
surreal crown
#

thank you for the info i was that close to throw away my pc ahahah

arctic isle
# limber stump I am new to unity and game development, thus not have good knowledge. I am confu...

Hey! Baked lighting exists only on disk (in the form of Lightmaps, Light Probes, and Reflection Probes) whereas mixed lighting uses some realtime components as well. You can check the documentation for the exact details of this, as there are different use-cases for each of the light types.

As for the lighting seeming darker after baking, sometimes that's expected, as realtime and baked lighting use different methods (math) for calculating the shading of your geometry. In general, baked lighting is much more physically precise and smoother than realtime lighting. It also supports indirect lighting (bounce lighting).

Check out the pinned messages for resources on lighting in Unity, and feel free to give any feedback on the learning process. We're in the midst of discussions of how to make lighting easier to work with for beginners, so any feedback is appreciated.

surreal crown
arctic isle
surreal crown
#

when will it be available for downlaod?

arctic isle
#

I would say by the end of the week if things go according to plan. I don't control the release dates/times so I'm not 100% certain.

surreal crown
#

cuz bake used to work with v 2022.2.7

arctic isle
#

Yeah it's a regression we introduced in trying to 'fix' caching/hashing of shader globals in the bake. Technically, you shouldn't be baking animated materials, but we're making it possible just because it's completely unreasonable to make such a change in an LTS.

surreal crown
#

thank you @arctic isle

arctic isle
#

you got it 😄 UnityChanThumbsUp

tall steeple
#

if I make a hole in a terrain using the hole brush, will a real time light hitting only that hole still count as hitting the terrain?

limber stump
# arctic isle Hey! Baked lighting exists only on disk (in the form of Lightmaps, Light Probes,...

Thank you, I was able to figure out the issue and now the scene looks much more better than before, i also made some lighting improvement to make look better than before.

In terms of the feedback, the docs are really in-depth and teaches you everything you need to know. However, it's my personal opinion, it would be really helpful if there are official step by step guide of getting started with unity video series available that's official made by unity instead of a third person. Mainly because 3rd person always have their personal opinion and touch to them.

Along with it, there's a YouTube channel on YouTube that does 100s of programming stuffs (Fireship.io). I would much appreciate it if there's quick and easy to understand breakdown of different things that unity has to offer. I ended up watching a video called Lighting in Unity in 1 minute which helped me understand couple of things which got me confused.

arctic isle
arctic isle
surreal crown
#

thank you @arctic isle gogogo guys ❤️

arctic isle
surreal crown
#

yep doesn't seem to be fixed

#

tried it rn

arctic isle
# surreal crown yep doesn't seem to be fixed

Welp the solution right now is still to not include animated materials in the bake. This particular functionality of the lightmapper is something that is particularly troublesome to bugfix, we're working on it atm

surreal crown
#

yep found out that turning them off as you said allows the bake to proceed normally. Since they are emissive too, in my specific case, i don't really need them to have lighting baked on those meshes.

arctic isle
scenic flume
#

having issues with my lightmaps, some objects are way to bright and some are way to dark

#

they are all static meshes

scenic flume
#

adding lightprobes helped

timber lichen
#

So im trynna bake my lighting in my game and its not even using my GPU. It did before but now its at like 1% usage. I do have GPU lighting selected and yet its not even using it. Nor is it using my CPU. And its making the lighting having a previewed bake time of 3 days... which is insane

night shell
#

objects have an anchor override

#

on the mesh renderer component

#

which allows you to pick specifically what probe you want to use for an object in space

frozen geode
#

So I work with procedurally generated scene which has a lot of lights in it. The problem is light bleeding artifacts that i have no idea how to fix. Is there any way to make dynamic light culling? Or should i use something else?

#

Reducing the amount of lights is not my solution.

deft fiber
frozen geode
deft fiber
glossy pulsar
#

Hello everyone, I have a plane that receives light, I want it to have both sides illuminated. How do i do that ? I'm working in HDRP, and the light is a directional Light.

arctic isle
glossy pulsar
# arctic isle Check the `double sided` checkbox in the material

I'm sorry I didn't explain my problem properly. I've checked the "double-sided" box for my material, but my plane is only lit on one side at a time. The illuminated side is correctly lit, but the other side isn't because the light doesn't touch it, so the material is darker on that side. I'd like to know how to get both sides of my plane to have the same color, regardless of which side is lit.

deft fiber
#

HDRP may have some translucency option that can transmit light from one side to the other without using any workarounds, but I'm not fully aware of them

narrow estuary
#

What does area lights do

night shell
narrow estuary
#

okay

deft fiber
#

Which render pipeline?

#

Not practically
You could change ambient lighting with triggers by player/camera position

#

Why is it a problem to "pass the lighting to a player"?

#

If you have a GPU to bake on, scenes rarely should take that long to bake

#

Yes, Indirect Lighting Controller volume override
But baking will give you superior results in both cases

#

You might not even need a lightmap, just baked reflection and light probes if you don't need accurate bounce lighting in- or outdoors

#

If bakes take a long time that's usually if you're not baking on GPU, your lightmapping settings are too high, and/or you've included too many small or too complex meshes in the bake

#

Reflection probes are necessary in pretty much all lighting scenarios, light probes are necessary when you also want baked lighting to affect dynamic meshes
Light probes can also be used to cheaply illuminate static meshes as well
I don't see what exposure has to do with this specific issue

#

I think I would avoid any drastic changes to exposure, trying to get the lighting conditions right first

#

It may make it easier to have your emissive materials use a black base color/texture for the emissive parts, so that direct and indirect lighting don't add to it

#

Unlike URP, HDRP uses standardized exposure, and I think it also has an option for exposure-independent emission intensity

#

If you have no particular reason to stick to URP, maybe HDRP could be a better option
Still this problem seems mostly stem from unfamiliarity with how all the parts of the lighting system work together, and HDRP is guaranteed to be more complicated in that regard

#

I think lighting is best learned by practicing and testing one thing at a time, then two things at a time and so on

arctic isle
#

Didn't follow the entire conversation, but just FYI that ambient lighting is practically a single light probe and a single reflection probe

#

Bloom is usually just blur, but you can control how 'fake' it looks

deft fiber
#

I don't think bloom itself blurs the image below it in either RP, you could be seeing TAA or something
The look can be fully customized likewise but that requires familiarity not just with lighting but HDRP itself as well

deft fiber
arctic isle
#

But it's not a very user-friendly way of doing so

#

In 2023.2 you can move probes after a bake, in the future we're working towards being able to procedurally create them with some nicer APIs.

frozen geode
#

guess i just need to occlude light

frozen geode
#

yes

deft fiber
arctic isle
deft fiber
#

It'd be really cool if SHs were a type of asset which you could assign to probes in the inspector sparkleclassy
SHs seem like they could be used for many different things too

arctic isle
#

That was one of the reasons I originally blocked the positions api because there was no way to tell. Now you can access probes per scene and that's enough for now.

deft fiber
# frozen geode yes

I thought I was looking at lightmapping issues
It may help to demonstrate the light bleeding issue with more precise information or pictures
Usually only realtime shadow casting or baked lightmapping can solve light bleeding effectively
Light layers work in some circumstances but it's hard solution to use systemically

arctic isle
# frozen geode yes

Then Lightmapping has nothing to do with it. Try reducing the size of the map and make sure that all these lights are not overlapping hence becoming vertex lights. Switch to deferred if you're seeing weirdness still. Make sure your geometry and lights have shadows and proper normals. Once a smaller sized map works, scale up and see.

frozen geode
#

thanks

#

will try everything

arctic isle
lavish yarrow
#

I need sum help. I have a flashlight that has a spot light, but the light of the spotlight only hits furniture, but not the walls nor floor

#

any help?

#

light only hits the locker

royal mantle
#

I baked lights using Bakery, but want shadows, too, is there a way to have a point light only cast shadows?

little condor
twilit hound
#

how do i bake it so it actually looks like the light has a spot light?

#

i enabled the uv auto make on all models

glossy pike
#

dont use point lights, use emission

#

you can turn up the emission intensity to light it up more

hybrid condor
#

For reference each line is a mesh, and the black shapes are 3d objects that cast shadows.

#

I thought it was the urp messing up at first, but I made a fresh project, and it is still happening.

#

I changed every lighting/graphics setting also, though I am %90 sure it is the mesh as if I rotate it the ine rotates as well.

#

If I turn off shadows it still happens also

#

Doesn't seem to be a specular thing.

#

Imagine it is normals

#

Solved: I got the fbx exporter package, and set normals to calculate, and it was fixed. Does anyone know of a script that can recalculate normals on a mesh inside a scene?

deft fiber
# twilit hound how do i bake it so it actually looks like the light has a spot light?

The lightmap is being repeated across meshes so that implies they don't have lightmap UVs
A lightmap resolution of 1 is way too low to represent spot lights, or any kind of lighting accurately
If you want to speed up baking, bake on the GPU and decrease the sample counts proportionally, but don't make the resolution too low
The correct resolution depends on the scale of your meshes but assuming real world scale, 5 to 10 are pretty low but not too low usually

hybrid condor
# deft fiber What's the context to this?

I combined submeshes together, and the new mesh wasn't getting lit correctly. I made a script that re-calculates the mesh normals like importing fbx does so not a problem anymore.

frozen valley
#

Do someone know why this wierd shadows appear above the mesh, I am also using urniversal render pipline, Thanks!

narrow estuary
narrow estuary
#

I used the normal map, but after switch the scene, it happened

deft fiber
deft fiber
onyx sorrel
#

is there an 2d global point light in urk or i need to do it myself?

arctic isle
#

global and point are kind of conflicting ideas

onyx sorrel
#

well directional light is global by itself so yeap 😛

#

alternative of directional light for lights 2d

#

because global light only uniformly lits object, doesn't cast shadows

arctic isle
#

then yeah there isn't anything like that in 2D URP, most likely for performance reasons

#

you can easily make one by just making a huge point light though 🤷‍♂️

onyx sorrel
#

well not really

#

futher point lights gives low res shadows

#

not sure, does all perpixel 2d lights use cascade shadows?

#

imo i'd better write my own shader than, but im not sure if unity exposes lighting code

arctic isle
arctic isle
#

but yeah writing your own shader is a solid option if you're up for it

upper fable
dense kindle
#

spawningg that at runtime

#

a bit of a bench test on hdr lighting

#

didn't go well

#

got rid of the edge clipping

#

with the universal pipeline i would get edge cipping spawning this way

#

it ran properly but the entire set of prefabs would differentiate

#

i read a few possible solutions, one being programmatic edge smoothing

narrow estuary
deft fiber
narrow estuary
#

How to fix it

potent onyx
#

can i make my 3d project without lighting like cn i remvoing the lighting while everthing is still visible?

potent onyx
#

how is that done?

arctic isle
# potent onyx how is that done?

you create unlit materials (right click in the project view, create, material) and then assign them to your mesh renderers (scene objects) from the inspector

#

It may be slightly different for each of the different rendering pipelines, but that's the gist. I suggest looking it up on google if you don't understand any of these steps and read up on docs / watch a tutorial to understand materials, shaders and light.

potent onyx
#

also i m working with default core

arctic isle
potent onyx
#

the color of the object

arctic isle
#

you probably want to assign a texture to it / change the color from the material inspector

potent onyx
#

See like

#

Let's assume i have a 3d character

#

I made a unlit material

#

Do i drag it on the char or what?

arctic isle
#

yes

potent onyx
#

Yes but then it removes my characters textures as well

arctic isle
#

in option 1 you will likely have to to re-assign the textures as well, not sure

potent onyx
#

What is easier?

arctic isle
#

both are the same amount of work more or less

potent onyx
#

Isnt there any other way to remove lighting?

arctic isle
#

if you're using materials that expect light, no

potent onyx
#

Hm let me think

#

cn i do something with these?

potent onyx
#

also is this my texture issue or is this cuz of somelight settings?

arctic isle
potent onyx
arctic isle
#

I would strongly suggest going through learning resources instead of trying to change one setting at a time, it will really help if you have a solid basis of understanding for this stuff. Spoonfeeding you answers now won't really help.

#

check the pinned messages if you're motivated to do so

potent onyx
#

sry sry well changing the skybox to custom worked

#

tqtq

dense kindle
#

got the lighting worked out

arctic isle
dense kindle
#

heh the map gen is more fleshed out than that now

deft fiber
#

Mesh or more likely texture normals issue
My guess is the normal map is in DX format instead of GL

deft fiber
#

If it's not the texture then it could be that the mesh normals are inverted with a two-sided material

#

Even if both sides are rendered only the front face would get lighting, which the backface duplicates

spiral frost
#

Hello guys!
Im working on open-world RPG game and i have a real-time direct lighting with day/night cycle, i'm using a Realtime Global Illumination and on environment it looks very good
But i can't understand what sort of light i need to use in indoor. For example, i created a small village. I have some torches that lighting space around houses. Here logically i need to use real-time point light to cast dynamic shadows from NPCs and so on.
But what sort of light should i use inside buildings? If i use real-time light it costs too much FPS, if i use baked lights it looks strange during day (plus some people in videos on Youtube said not to use both Real-time GI and Bakes Gi together)
Is there some techniques or rules that i should use in these kind of project?
p.s. sorry for maybe a dumb question, im new to unity
pps and sorry for my bad English 😀

deft fiber
#

Not really, only mesh and shader normals affect lighting
The plugin could be making normals that are pointed in the wrong direction in some way

surreal crown
#

@arctic isle hi, i don't know why but i disabled dynamic material renderers and bake still doesn't work. Any idea on how to solve this?

arctic isle
surreal crown
#

@arctic isle thanks i will check tomorrow 🫶🏼

night shell
maiden axle
#

Hey everyone, as you can see the shadow is passing through a static object, how can I make it not pass? (the vase is not static)

(For anyone who is searched for this message, i used "Dynamic Shadow Projector" from the asset store to fix it.)

maiden axle
#

Thanks for your answer, I'll try it now

deft fiber
#

@maiden axle @timber lichen Not the fault of subtractive mixed lighting mode, rather receiving double shadows happens when the table is set to not cast shadows

#

Those individual floor boards are wasting huge swathes of lightmap space and really making the lightmapper struggle in this case

maiden axle
deft fiber
#

The rug is showing no baked shadows at all

#

Your true issue probably isn't even the shadow casting, but various problems with the lightmapping itself including UV overlap and too many mesh seams

maiden axle
deft fiber
#

Good to know
I suspect the normals must've been put sideways by the mesh generator, or something weird like that

pallid bear
#

Is lightmapping and baking lights worth the hassle? My project is kinda done but I notice the biggest impact on performance are the shadows

#

no shadows performs great but I can't have that

#

How many things can break if I go this route? I'm assuming lots

deft fiber
#

Baked lightmapping is a tradeoff to reduce realtime rendering cost to instead store and load textures which take up space on disk and in memory
It produces much better results in some cases than realtime lighting, yet worse in others

#

Nothing can "break"
If the bake goes poorly then the lighting won't look good, but you can always clear the baked lighting cache

pallid bear
#

hmm

#

well

#

I get like 15-20 FPS if I disable just the directional light

#

assumption is the same thing would happen if I baked it

#

I could see getting 30+ fps if I bake everything

deft fiber
pallid bear
#

I haven't done it tho

#

so I'm not familiar with it

#

why is it a steep learning curve?

#

also, question: Why are shadows hard on both the cpu and gpu? Shouldn't they have a negligent impact on GPU?

deft fiber
deft fiber
pallid bear
#

Yea but they're calculated by the CPU

#

They don't really have polygons etc so idk why they're so hard on the gpu

#

and that link scares me

deft fiber
pallid bear
#

oh

#

I thought the positions of the shadows are calculated by the cpu

#

why are they taking a toll on the cpu then

deft fiber
pallid bear
#

ok thank you mr instructor

#

I will try and see what I can do

#

right now instantiation can cause a stutter but otherwise it runs ok on my pc

#

the game is kinda shit so I think it should run fine on weaker PCs as well

#

so I will try my best

#
  • it's urp
deft fiber
pallid bear
#

btw I just remembered. My zombies can't be pooled per se cause they get ragdolled, altered, body parts missing etc. But theoretically, wouldn't it be helpful to pool the zombies with all the scripts, then when they get killed, I could instantiate a destroyed, ragdolled version of the zombie

#

that might help with the stutters I get when the zombies get instantiated, yea?

deft fiber
# pallid bear that might help with the stutters I get when the zombies get instantiated, yea?

Possibly
Instantiating in my experience shouldn't cause stutters, but if they're super heavily loaded with components maybe pooling can't improve that specific issue
Maybe better to investigate the precise cause of the stutter by profiling
(Being ragdolled or modified shouldn't prevent pooling either, though if you add or remove components or gameobjects in the hierarchy that could make it much less convenient)
Better to ask in coding channels, this is outside of my wheelhouse

pallid bear
#

profiler says instantiate is responsible for the spike

#

but I will investigate further

deft fiber
#

Why could you not use realtime reflection probes with deferred rendering?

timber lichen
#

Hi there, anyone knows why baked light creates those weird brighter and darker spots?

opal chasm
#

Hi ! I have a very strange problem with unity lightning, if someone is avaible to help me :)

arctic isle
arctic isle
opal chasm
#

I have a problem with lights probes when loading scenes additively and asynchronously, they dont work anymore after that

arctic isle
#

you have to call LightProbes.TetrahedralizeAsync();

opal chasm
#

In the scene I want the light probes? Or anywhere ?

arctic isle
#

after the two scenes have loaded just call the function from anywhere

opal chasm
#

Perfect, thanks !

arctic isle
#

oh and @opal chasm if you're loading multiple additive scenes (3+ total), tetrahedralize after all are done loading for best performance

opal chasm
#

noted, and thanks a lot, it solved the problem after 2h of messing up lol

timber lichen
#

i already tried to increase the bounce, the texels, the lightmap size, checked create Lightmap UVs

#

turns out to be the same result

verbal root
#

Does anyone know how I could bake a light map to a non static object? I would like my object, which is moved by a script, to have the same lighting regardless of where it is using the lightmap instead of using dynamic lighting.

arctic isle
arctic isle
# verbal root Does anyone know how I could bake a light map to a non static object? I would li...

no, but there are ways around this. just off the top of my head

  1. Make the object static. Bake the lighting.
  2. Take the lightmap and turn it into a texture for your object. Composite that over the existing textures
  3. Using an unlit shader, use the new texture as your object's texture

Based on which modeling / DCC program you use, you may be able to do that there: https://docs.blender.org/manual/en/latest/render/cycles/baking.html

arctic isle
timber lichen
verbal root
#

Does anybody know how to disable reflections on a metallic material?

pallid bear
spiral glade
#

hey guys i am getting very weird shadow bugs in build mode, but not in the editor

ocean yacht
#

What could I do to fix this? The floor of the room just turns black after baking

chilly kettle
#

Hey. I am wondering if someone have an idea how i can get rid of this different lighting.
The Maze is build via runtime.
The only idea i would have is give them a "Anchor override", so they all get their lighting information from the same tile.?

#

Is there something smarter?

fervent swift
#

Hi there, question…
I am unsure how shadow max distance is being calculated because if I set it to 500 for example, a shadow doesnt appear when a camera is only 50 units away from the object - would appriciate any guidance on how it is measured. Thank you!

fervent swift
chilly kettle
#

Are you using the same setting that you are editing there?

#

Will not do anything if you adjust the "HIGH" Settings when you are displaying the "MEDIUM" Settings

fervent swift
chilly kettle
#

Yep

fervent swift
#

Ok thank you!

#

You could probably set some type of culling mask on each of the lights

#

i am not sure

gritty fox
arctic isle
gritty fox
#

ah i thought so

#

im using volumetric fog and the depth of field which was what i first thought it was

arctic isle
#

it's some sort of interaction between these systems. I think if you tone down the ambient occlusion this effect may be toned down as well

gritty fox
#

may also be the fog heres with and without

arctic isle
#

why do you have fog indoors is a separate question

chilly kettle
#

let s say I have 2 light

upper fable
arctic isle
upper fable
#

Though I think the limit is currently at 63 or something so maybe not the light count

gritty fox
#

i have about 320 point lights in this scene btw

upper fable
arctic isle
#

so maybe the perspective and the fact that you can see down the hall causes this?

gritty fox
#

it is

#

just used for the big halls and really long corridors is why i have the fog

#
  • the depth of field since its a helmet cam/bodycam style fps
gritty fox
upper fable
gritty fox
#

if the max lights are 512 im still quite under the limit

upper fable
#

Its currently 63 per 8x8 pixel tile

#

But doesnt seem likely you are hitting that either

arctic isle
#

one person says they fixed it by reducing the range of the lights

upper fable
#

That would make single light affect less tiles

#

So makes sense

gritty fox
#

turned it down to 10

#

but its super dark

#

i had it on like 25 before lol

#

now i cannot bake lighting wtf

arctic isle
gritty fox
#

idk pressed the button 2 or 3 times does the spinny circle thing and das it

#

stops

arctic isle
#

that probably means that it doesn't see any changes in the bake input (lights/meshes/materials/settings)

gritty fox
#

ffs

arctic isle
#

you can clear and rebake if that helps

gritty fox
#

i need to learn unreal engine starting to get sick of this engine

gritty fox
#

many times and no change

arctic isle
#

are the lights set to baked / mixed?

gritty fox
#

just changed all lights from baked to mixed and it aint giving me no light at all no matter what settings

#

fixed had to clear, change to realtime and change back to mixed

gritty fox
#

the lighting in this engine

#

is my worst enemy

#

right

#

changing everything now

elfin dock
#

Hey guys, I'm trying to create a dimly lit moody mansion setting and wanted to bake my lighting to reduce lag. I didn't think it would be a problem, but I'm having a really difficult time generating the lighting to match what my scene looked like using realtime lights.

What I'm dealing with now is the lights are appearing waaay brighter in the baked version than the realtime version, completely different vibe.

Does anyone know what I can change to get the baked lighting to more closely resemble the realtime lighting? For example, is there a away to reduce "exposure" when baking so that the lights appear dimmer?

Here are my images of realtime and baked, including the lightmapping settings.