This video is very informational. Ive been doing unity for a year now and thought I new a lot about little details on lighting, but this video taught me other wise. You earned a subscriber and a like!
Every tutorial I've seen so far was teaching Baked lights, but I really needed realtime lights for my scene. I didn't know that i needed realtime lights until this video showed it to me. I suppose because of its high performance requirements that people didn't bother to teach it, but I really needed it. Thank you!
I'm glad it helped! A mixture of realtime and baked lights are needed in most projects to balance between dynamic elements moving through the light, while still getting great performance. Real time lights are great, but the cost is very high. Happy deving!
13:08 I noticed that the spotlight from the UFO is seeping through the roof and lighting up the interior as well even after baking. Is there a reason for this? Was it because the baking was applied only to the blue area light?
This is caused by the UV maps being screwed up on the model/object. You can learn how to fix that with this video! th-cam.com/video/zdHu69-_jrY/w-d-xo.html
Is this URP? Because URP has that cap of 4 lightsources affecting an object at a time. You can adjust this up to 8? in the RenderPipeline asset, or even change it to Forward+ rendering to remove that limit altogether.
how to create the object as the light shell? Such as the sphere for the UFO spot light? Do I need a transparent material or anything so that the light can look like it emits from the inside of the object?
Hey man, awesome tutorial as always! I noticed that when dealing with lighting, sometimes metal objects inside closed spaces still reflect the directional light, even though, light actually doesn't reach them. Why does that happen and how to fix this? I tried baking again, and it doesn't fix a thing.
A few things you might want to consider checking out. Like comments have mentioned, you may want to play with reflection probes. I think Rollthered's comment might also be interesting to explore. If your entire scene is "indoors", I'd also consider just getting rid of directional lighting all together and maybe just use Area Lights.
Do you know if real time lights are automatically activated and deactivated based on distance to the camera if you have more than what it allows? Or is that something you have to code yourself? I never liked baked lighting as it means the scene is static. I want everything to be dynamic and move about so I have decided to only use real time lights but spread them out so that any single area that a user would normally see doesnt go over the limit (in addition to directional light). Another problem with lighting in Unity I have had is that the environment map that the skybox provides even reflects on surfaces that are occluded. If you make a closed room and put objects in it, it is still reflecting the skybox. I have wondered how hard it would be to to generate a skybox on the fly and have it change dynamically so that when you e.g. move from an exterior to an interior or between rooms, each room has its own skybox to make it more realistic. Naturally it wouldnt be super-realistic as that would require some kind of raytracing for this, but a better approximation would go a long way over the fixed static skybox that is so often used.
From my understanding, real time lights do not automatically activate based on distance from the camera. You'd probably have to use scripting to determine the distance from the camera and manage the lights that way. For your second part of the question, I've also struggled with using a skybox and having a closed room reflect things as if it wasn't inside of the closed room. If I can avoid it, I just do indoor scenes without any skybox altogether and use only point, spot and area lights. You might want to consider playing with reflection probes to see if that helps. As far as avoiding all baked lights, you might find some good compromise with baking them and using light probes. *edit* - forgot to mention, you should be able to change the skybox dynamically through code!
You need to use reflection probes to remove the specular light from the skybox when indoors. The reflection probe defines a volume where it overwrites the "global" reflections. You can dynamically update the reflection probes on demand that are indoors, or even set a precomputed cubemap to it.
Hey! I'm replying to the other comment now! You might want to look into playing with depth and normal biases and also possibly fixing UV maps if they're funky on your fridge. th-cam.com/video/zdHu69-_jrY/w-d-xo.html
I loved the video and I'm learning a lot, but I have a question, if I make a switch to turn lights on and off, which one would be best? I thought about real time lights, but are there other lights that would work better?
If you're not too worried about performance, then you should be able to use real time lighting for any of your lights that you can toggle on/off. Just don't go too crazy with amount of lights that you're turning on and off. If you need to save on performance, you may need to work some magic using mixed lighting or consider reducing the number of lights that toggle on/off.
Unity is really missing a proper realtime GI solution, that works on the fly without baking or manually placing probes. And that works on really large or procedural levels. In the Godot, there is SDFGI and Unreal has Lumen.
I think Unity is missing many things at the moment, but I'm hoping they can turn things around at the company and continue to implement more features like you mentioned... but man, they really do need to get the company back in order 😆
Well this made me hate Unity even more xP great tutorial and really understand more about the lightings but damn i hate the limitations on some of them :P lightings have always been a weakness for me when it comes to Unity. Used to work alot in UE and wanted to widen my horizons so yeeey learning is fun
I thought of it as more of an artistic choice! Also, fixing it would require me to go into fixing UV maps and I wanted to keep this video shorter. Going to answer your other comment now to try and help out.
Before baking turn of all real time lights except the sun, bake then turn the lights back up. Intensitive of a light source that is set to “baked” should not exceed 2.
Good job the basic lighting the hundreds other yters did. how about actually applying it like in the thumbnail? how about you stop copy pasting the same content and tutorial over and over again?
You honor me with your kind words. If you don't like my lessons and want to advance your learning, you can always read the manual mi amigo 😉 docs.unity3d.com/Manual/LightingOverview.html
Straight to the point, no beating around the bush , you earned one subscriber.
This video is very informational. Ive been doing unity for a year now and thought I new a lot about little details on lighting, but this video taught me other wise. You earned a subscriber and a like!
I appreciate your kind words!!! Thanks for the sub!
Every tutorial I've seen so far was teaching Baked lights, but I really needed realtime lights for my scene. I didn't know that i needed realtime lights until this video showed it to me. I suppose because of its high performance requirements that people didn't bother to teach it, but I really needed it. Thank you!
I'm glad it helped! A mixture of realtime and baked lights are needed in most projects to balance between dynamic elements moving through the light, while still getting great performance. Real time lights are great, but the cost is very high. Happy deving!
13:08 I noticed that the spotlight from the UFO is seeping through the roof and lighting up the interior as well even after baking. Is there a reason for this? Was it because the baking was applied only to the blue area light?
This is caused by the UV maps being screwed up on the model/object. You can learn how to fix that with this video!
th-cam.com/video/zdHu69-_jrY/w-d-xo.html
@@FistFullofShrimp Thank you~!!
Thanks man! It's very useful!
Which is better lighting or just adding a glow material and post processing most especially for small games like hypercasual games ?
Very good tutorial. Quick to the point and with examples. Well done!
Glad it was helpful! 🍤 🦐 🍤
Is this URP? Because URP has that cap of 4 lightsources affecting an object at a time. You can adjust this up to 8? in the RenderPipeline asset, or even change it to Forward+ rendering to remove that limit altogether.
What if I make a terrain world but want it to be kinda of a sunset vibe and have the trees and plants moving, would I use mixed?
how to create the object as the light shell? Such as the sphere for the UFO spot light? Do I need a transparent material or anything so that the light can look like it emits from the inside of the object?
Hey man, awesome tutorial as always! I noticed that when dealing with lighting, sometimes metal objects inside closed spaces still reflect the directional light, even though, light actually doesn't reach them. Why does that happen and how to fix this? I tried baking again, and it doesn't fix a thing.
You might want a shader with specular occlusion, or you can set a culling layer in the directional light to ignore the layer the sphere is on.
Use reflection probes
A few things you might want to consider checking out. Like comments have mentioned, you may want to play with reflection probes. I think Rollthered's comment might also be interesting to explore. If your entire scene is "indoors", I'd also consider just getting rid of directional lighting all together and maybe just use Area Lights.
Do you know if real time lights are automatically activated and deactivated based on distance to the camera if you have more than what it allows? Or is that something you have to code yourself? I never liked baked lighting as it means the scene is static. I want everything to be dynamic and move about so I have decided to only use real time lights but spread them out so that any single area that a user would normally see doesnt go over the limit (in addition to directional light).
Another problem with lighting in Unity I have had is that the environment map that the skybox provides even reflects on surfaces that are occluded. If you make a closed room and put objects in it, it is still reflecting the skybox. I have wondered how hard it would be to to generate a skybox on the fly and have it change dynamically so that when you e.g. move from an exterior to an interior or between rooms, each room has its own skybox to make it more realistic. Naturally it wouldnt be super-realistic as that would require some kind of raytracing for this, but a better approximation would go a long way over the fixed static skybox that is so often used.
From my understanding, real time lights do not automatically activate based on distance from the camera. You'd probably have to use scripting to determine the distance from the camera and manage the lights that way.
For your second part of the question, I've also struggled with using a skybox and having a closed room reflect things as if it wasn't inside of the closed room. If I can avoid it, I just do indoor scenes without any skybox altogether and use only point, spot and area lights. You might want to consider playing with reflection probes to see if that helps.
As far as avoiding all baked lights, you might find some good compromise with baking them and using light probes.
*edit* - forgot to mention, you should be able to change the skybox dynamically through code!
You need to use reflection probes to remove the specular light from the skybox when indoors. The reflection probe defines a volume where it overwrites the "global" reflections. You can dynamically update the reflection probes on demand that are indoors, or even set a precomputed cubemap to it.
How can I light up my fridge? I tried all. I tried point light but it gets over the object
Hey! I'm replying to the other comment now! You might want to look into playing with depth and normal biases and also possibly fixing UV maps if they're funky on your fridge.
th-cam.com/video/zdHu69-_jrY/w-d-xo.html
Bro that bunny at 4:16 scared tf out of me
Big chungus haunts the dreams of everyone
Great explanation. Helpful. Thanks.
This is cool tutorial very insightful
Glad to hear it helped! 🍤
Great video - I have found lighting difficult up to now - beautifully explained thanks :)
I loved the video and I'm learning a lot, but I have a question, if I make a switch to turn lights on and off, which one would be best? I thought about real time lights, but are there other lights that would work better?
If you're not too worried about performance, then you should be able to use real time lighting for any of your lights that you can toggle on/off. Just don't go too crazy with amount of lights that you're turning on and off. If you need to save on performance, you may need to work some magic using mixed lighting or consider reducing the number of lights that toggle on/off.
You can increase light counts ... There is an option in unity ofcourse cuz no one wants to put only 6-8 lights in games at a time
Thank you soooo much!!!!
How do i fix light bleeding through walls?
Unity is really missing a proper realtime GI solution, that works on the fly without baking or manually placing probes. And that works on really large or procedural levels. In the Godot, there is SDFGI and Unreal has Lumen.
I think Unity is missing many things at the moment, but I'm hoping they can turn things around at the company and continue to implement more features like you mentioned... but man, they really do need to get the company back in order 😆
Please add one video for display in the scene. target- display a media in unity vr with trigger
Can you explain a bit more what you mean exactly?
I'm a little confused with the question
Incredible video!
Well this made me hate Unity even more xP great tutorial and really understand more about the lightings but damn i hate the limitations on some of them :P lightings have always been a weakness for me when it comes to Unity. Used to work alot in UE and wanted to widen my horizons so yeeey learning is fun
Need one video for reflections and custom reflection with only 2 camera projections or similar for performance 🙏
360p gang
TH-cam says it only needs 90 more minutes to get that sweet HD resolution out! 360p gang are the real ones. 🍤🍤🍤
I mean the ufo light gets into the saloon
I thought of it as more of an artistic choice! Also, fixing it would require me to go into fixing UV maps and I wanted to keep this video shorter. Going to answer your other comment now to try and help out.
"Direct light where light bounces off of something..." My good sir that's not what direct means 😂
Hey! I didn't come up with this stuff. Blame the ones who figured this crap out!
blogs.nvidia.com/blog/direct-indirect-lighting/
That’s how we see light, so while it seems counterintuitive it is actually direct lighting (light needs to hit an object for our eyes to see it)
baking always make disgusting result... :S idk how should i do
Before baking turn of all real time lights except the sun, bake then turn the lights back up. Intensitive of a light source that is set to “baked” should not exceed 2.
Good job the basic lighting the hundreds other yters did. how about actually applying it like in the thumbnail? how about you stop copy pasting the same content and tutorial over and over again?
You honor me with your kind words. If you don't like my lessons and want to advance your learning, you can always read the manual mi amigo 😉
docs.unity3d.com/Manual/LightingOverview.html
im surprised that this barely helped me!
Far far away from a good learnig expierence. Another commercial videos as they all are :D