#bring my light back, unity
1 messages · Page 1 of 1 (latest)
gimme a sec i'll get with you
okay
so first things first need to understand how your scene is setup
can you do me a favor and show me what your scene looks like in the baked lightmap view
okay
here
just this but in baked lightmap view is fine
i dont know wdym
im a real beginner
(sorry)
its alright
in unity within the scene tab, you have a dropdown menu that shows you different modes in which you can view your scene in
this right?
yes
oh
there is a dropdown menu that shows you all of those options
switch to this
and make sure
that this is also on in the menu
it wont look exactly like mine
okay, wheres my scene
did you toggle this
if you did
your scene should look something like this
i did
so you toggled it and thats how it looks in your scene view yeah?
well that tells me that you haven't marked any static geometry in your scene, leading to those really ugly results
what~
its alright i'll give you an overview
so just for a general overview, when it comes to lightmapping it goes like this for a scene
-
mark static level objects as static (specifically marking the contribute GI flag). In here you are specifically marking objects that don't move or are interactable in the sense that they can be moved out of place or destroyed. Generally in most scenes your level geometry will always stay the same so that is typically the one that gets marked static
-
changing your lights that you want to include in the bake to either mixed/baked mode (for demonstration and teaching I will have you switch the lights to fully baked)
-
then finally its as simple as generate lighting, and then from there we will likely run into some issues that I will show you how to solve and make it look better
got it? @grand chasm
so i just need to make all my objects that doesnt move static?
yes
all that doesnt ever move
yes
this is important as I showed a previous person yesterday, if you mark everything as static via the contribute GI flag
you'll run into issues like this...
finding the screenshot give me a second...
here I have a lightmapped scene, but this stack of pallets are dynamic and moveable
when they get moved, you get issues like this
this is why you only mark objects that don't move or change as static
when it comes to marking an object as static
this is how
im changing something on the scene
like moving furniture
how do you mean?
look
i have a christmas tree there
what if i want to delete it
and place something else there
ahhh, lightmapping stuff is not permanent
if you still need to change objects in your scene you still can
i did contribute GI tho
oh oke
I'm only saying that you should mark objects static that dont move within runtime, or within the actual gameplay
if you need to change or move objects while you are designing the level within the editor then you still can, you'll just have to rebake lighting when you are done
do you understand?
ok
so your lights are switched
yup
have you also marked your objects with the contribute GI static flag?
i.e. here?
not moving objects yes
well with that all set, show me how your scene looks in the baked lightmap preview
wait wait wait
you should see something similar to this
how do i bake properly
oh
we are just setting up your scene first
i missunderstand
i need to show you like this?
yes
there we go
yeeee
so the purpose of why im wanting to see that
is because
I want you to do a flyby of the scene
and make sure that everything looks good
how?
make sure that the checkerboard pattern you are seeing
is mostly consistent size wise
across your whole scene
this is important to ensure that everything looks good
each little square is a lightmap pixel
if they don't all look consistent then we'll have problems later that we need to solve
so some things we need to watch out for
if you have a case like this
where surrounding geometry has alot of lightmap pixels
but objects like this don't
then there will be problems in the bake, but we can fix it
the next thing also to watch out for
erverything is okay
might be hard to see but you can see these rings are too small
they are as big as one of those squares
which means those objects are too small to be lightmapped
so you should not mark it as contribute GI static
nah i dont have anything small on my scene
should i switch back or smth
yes you can switch back to shaded
what do i do to bake normally
create new lighting settings for your scene
which should show you all the options of the lightmapper
ye
im aware
i should set this settings?
nah not yet, just showing you all of the options are no longer greyed out
but since your project is for VR
and I assume you want maximum performance
we'll set the settings with that in mind
yea
we can always change these later
done
😭
yep
you do have access to the CPU version as well, the reason why that exists is that the GPU lightmapper can fail
the cpu version is slower but it is reliable
but for speed and saving time in our life
go for GPU
and for these settings for a first time bake I generally set them to the following
i made it GPU
done
oke
if you have this option I suggest setting it to this
done
done
what is it
yeah i regret
change the directional mode to non directional
done
make sure when its enabled also
to go back in here and set the filtering for the ambient occlusion
done
now save your scene and click generate lighting
done
shouldn't take too long, though im not sure what hardware you are currently using
god help me...
Ruzen 7 5600H + RTX 3060 good?
yupiieee
whats the estimated time for your bake
says 2 minutes
should show you on the bottom right of the unity window
not bad
send me screenshots of the scene when its complete
its alright, those issues can be fixed
just let it run
god help me pleasee
?
done but
its a start
fixing the issues that we have at hand now
its not the end of the world though
the result is closer, but we can get even closer to your original
but the good news is that your results are better than they previously were
agree
so first thing to check
what do i do now
I know you had a light on the right for that equipment area and now its no longer in the bake
which can be due to a couple of things
but is there a light there?
or are you using emissives
first thing is to click that emissive material
and show me a screenshot of the material settings
thats your color settings, not your material
and that is not the emissive in your equipment area
the bulb has emmission
that is what I was referring too
and theres light above bulb
actually
map looks ultra good
emmisions need to be fixed only
so looks to me why your light might not be showing
is that its actually inside an object
in a lightmap if your lights are inside objects they will not appear in the bake
so if your light for that equipment area was inside the bulb it needs to be out of it
yep
for some reason lighting overall still looks odd
are there shadows enabled for your lights?
emmision
no
enable them
yes
we are baking lightmaps so it wont affect performance
but it'll certainly help make it look alot better
gonna have soft
done
no because we haven't fixed it quite yet
but it looks like for some of your materials your emission mode is set to baked which is what I wanted to check
if the emission mode is not set to bake then it won't be shown in the lightmap
if it is set to baked, and the emission is still not lighting up anything then that is because the intensity of said emission is too low
so then the emission intensity is too low
wdym
the color is not bright enough to light the enviorment around it
in here you adjust the intensity with the slider on the bottom of the color panel
well well, nice and moody
.
for how much
it could also be that emission object is not marked static
not sure
so just adjust intenstiy?
yes
if the intensity at its current value is too low and not lighting up anything, then increase it to a higher value
you can always reduce it later
but also make sure that emissive object
is marked static
that could also be potentially another reason it may not be affecting the enviorment
sure, just @ me
my eyes hurts
might also help to look at tutorials next time 😛
lmao
Okay what did you do between the two steps
thing which is up
so i baked the light
and i need realtime back
this?
wdym?
i have Baked option selected everywhere on my lights
Okay great, can you turn them all to Mixed? We can try to bring back the Realtime shadows while preserving the optimization from the baked lighting.
Can you bring up Window > Rendering > Light Explorer?
is this okay
i changed to mixed..
also all my static object is set to contribute GI
Okay fantastic
Can you click on New Lighting Settings?
Choose GPU and choose Direct Samples: 32 / Indirect Samples: 32 / Environment Samples: 32 and Lightmap Resolution: 8
want to mention that my project is for vr
Yep, we're gonna make it look great 🙂
For now we choose low lighting settings so we can get quick bakes, we will increase the quality later
done
okay
Okay click Generate Lighting so we see what happens
What is that redness
No no let's keep working
oh okay
I see a lot of emissive materials here
yea
dont understand
im beginner sorry
im stupido
Do you have Light objects in your scene?
you mean this?
Yes
46
So for this particular room you showed me with the christmas tree
whats my light for this room?
can you show me the Scene View so I can see where the Lights are
Yes!
Are you only lighting it using the emissives?
theres only 1 for it, and its a point light
im using emmision so it look glowy
Where is that one light? Is it the ceiling lamp I can see?
Okay can you select the object with the Light component?
Can you increase the Intensity to maybe 2 and do Generate Lighting again?
okay
It is probably going to be too bright but I just want to see whether it works at all
holy..
Spot Angle should also probably be something like 90 or less
here
with intesnity
but other areas is red
only some parts which is above seems to be ok
I am not sure what all this redness is, it doesn't look like a Lighting issue maybe a shader/material issue? It looks like you added emission to materials that shouldn't have any or something
i have emmisions to objects that needs it
should i restart
Okay can you select something that is red
red color?
Okay these are supposed to be red I suppose
Can you select something that is red that shouldn't be red
😄
maybe i should try to delete red materials
i didnt understand about select something that is red that shouldn't be red
this for example?
No, the rest of your level which I can see in the screenshot above
Yes
Okay that looks fine 🙂
Let's work on your level area-by-area then to troubleshoot it
Are you happy with how this christmas tree room looks?
More or less? 😄
Okay I think it's just a matter of tweaking some of the settings.
Select your Point Light like before
yup
Use 1 for the intensity and reduce the spot angle to 90
done
click Generate Lighting
Instead of Mixed ? Okay that's interesting. Probably has to do with your emissive materials
i can try to disable emission
You can use Baked for the Lights if it solves your issue
Okay go for baked then
can i ask a question
Yes
as i understand theres no way to bring this kind of a light? thats before i baked all for my first time
There is- what you saw here was the realtime light. You can get the same look with baked lights
i need to get realtime
🥹
do you need that object to be lit with realtime lighting? does it move?
no
Okay, if you need to get all the realtime lighting back, you need to revert all the lights back Realtime, clear your baked data and also make your emissive materials realtime as well.
In my experience you would get much nicer lighting if you bake it and much better performance as well. If you don't know how to work with it, however, it can be overwhelming to troubleshoot...
i just want to preview how lighting will look
also, how do i clear baked data
thanks
lemme move my lighting
so it will be in position how it should be
so it will look good when baked
that makes a lot of sense
let's just focus on placing the lights, you can't really get a perfect preview like this
😔 4
so i wont be able to bring old light back at all🥹
its 12 now
23
okay
done
1 minute brb
im here
@mint quest sorry for ping, are you here?😅
Yep
This light you were showing me?
Does it look any better?
yeah mayb
Can you click on the checkbox next to "Draw Halo" ?
It should show you where the light's effective area is
Can you click on the gizmos button at the top right of your scene view? Is it toggled on?
Only send screenshots from the scene view (not game) so I can see the gizmos
You can turn off the text mesh pro gizmos if you want
Click on the downward arrow next to the gizmos button and deselect anything that has text mesh pro
yupp
ok so maybe we can focus on just this one light and then you can take the knowledge and apply it to everything else
you said that all the geometry is static?
yep
ok cool, can you turn that light to baked and click generate lighting?
only this light?
yea
okay
everything else will probably turn black, don't worry
brb a sec
oke
Hey I'm back
ok im gere
so whats that
it's the "Halo" that I asked you to check before. If you uncheck the checkbox it will go away
you can increase the sample counts and lightmap resolution in the lighting window to get a nicer image once you're happy with the overall look 🙂
(remember we set them to 32 and 8 before for quicker bakes)
don't go too high though, as that will lead to very long bake times
maybe 64 for direct, 2048 for indirect, 256 for envirnonment
then 32 or 48 for the resolution
your recommendations?
Happy to help, hope all goes well!
increase intensity and indirect intensity
thats how it should look
oh then don't touch it!
thanks
@mint quest sorry for ping.. Ive tried my game now. Performance looks awesome! But..
Since light is baked my player is black. just black
also i cant identify what and how covering my left eye. its just white..
I cant fix this today, i gtg sleep. I hope you can help me tomorrow
Hey, you need LightProbes for this 🙂
Thanks for filling in @mint quest , our time zones are very different lol
Though suprised you suggested changing light mode to mixed
He mentioned his target platform was quest 2, and i know with mixed lighting there is still a realtime lighting component with it
I was still trying to figure out what exactly they wanted
Yeah baked is definitely a better option for performance reasons
But they did say "I want the realtime back" so I wasn't sure what to suggest 😄
Well i see hes almost there now so 😛
Yup!
Performance is just great😊
What’s that?
Light probes assist with lighting dynamic objects in your scene
So remeber when I mentioned to only mark static geometry and not dynamic geometry?
Yea
Light probes are a way to bring the lighting back to those dynamic objects and make them properly blend with the baked lighting of the scene
It works by basically having an array of points all throughout your scene, and when lightmapping these points are used to sample lighting at specific points in your scene so that they look correct
For placement there are alot of tools on the asset store you can use to automate the placement of these light probes since it can be tedious to setup
Specifically LightProbes are for indirect lighting (aka light that has already bounced at least once)
Which is why I had mentioned Mixed lights which have a realtime direct component
So now it's a bit more complicated than with just baking a static scene... You can feel free to place Light Probes all over your scene (GameObject > Light > Light Probe Group I believe)
Click Generate Lighting and make sure your player mesh renderer (and any attached objects) receive lighting from Light Probes
I probably won't be around tmr but here's the manual page- not too complicated to place the probes and do a bake https://docs.unity3d.com/Manual/LightProbes.html
It may be enough for what you need
okay thanks
like this?
@mint quest ive tried but its still black..
sorry for ping tho~
is that because of Mixed setting?
like do i need to set mixed for this
no
generally you should be placing probes where there are changes in lighting
but also for your probes, do not place them inside geometry because otherwise they will be black
notice how the probes are placed here
mostly in lighting transitions
but honestly that can be hard to get right, so the other thing you can do is simply place probes in a consistent array through the entire enviorment
like here
or here
okay
@mint quest sorry for ping but.. do I need to switch to Mixed setting for lights?
Hey, if you need the realtime direct lighting yes, if you're ok with just the indirect from the probes then no
Okay thanks! Also, do you know how to export VR game for standalone (android) properly? I just have my left eye covered white other one is good. Maybe when I’m exporting for android it thinks that I’m making this game for a smartphone so it uses 1 display only?
I would try to post in a relevant channel about that, it's been some time since I've worked with VR. To my knowledge, if you have the right setup with the XR package it should work
(you can also connect your headset and build directly to it to test)
okay, thanks
@trail swift seems like things like "flashlights" doesnt work with baked light or probes causes it.. Do you know something about it?
also sorry for pinging you if youre busy..

im going to assume that mabye by accident you set your "flashlight" lights to be baked/mixed instead of purely realtime
but if its set to realtime, it should work right?
Yes
okay, thanks a lot!
(Direct light only, but it's all you need I think)
you might have to rebake if the flashlight was baked prior