Light Up Your Game : Unity Lighting Essentials!

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • 🌟 Unlock the Secrets of Unity Lighting! 🌟
    🔦 Illuminate your Unity projects with this in-depth guide to lighting essentials! In this video, we delve into the world of Unity lighting, covering everything from how Unity simulates lighting using Global Illumination to what Light Sources Unity offers.
    🎓 What You'll Learn:
    Global Illumination: Understand the power of realistic lighting and its impact on your game's visual appeal.
    Baked Lighting: Dive into the process of pre-rendering lighting for static scenes, optimizing performance without sacrificing quality.
    Realtime Lighting: Learn how to dynamically adjust lighting in your scenes for a more interactive experience.
    Mixed Lighting: Explore the best of both worlds by combining baked and realtime lighting techniques.
    💡 Mastering Light Sources:
    Directional Lights: Mimic sunlight to cast long shadows and give your game a realistic outdoor feel.
    Point Lights: Illuminate your scene in all directions, simulating the effect of a light bulb or candle.
    Spot Lights: Create focused and dramatic lighting effects to highlight specific areas in your game.
    Area Lights: Achieve soft, diffused lighting for more natural and atmospheric scenes.
    Whether you're a beginner or an experienced Unity developer, this tutorial has something for everyone. Elevate your game's visuals and create immersive experiences with the power of Unity lighting!
    🍤Check Out My Patreon🍤
    / fistfullofshrimp
    🔗 Relevant Links:
    📃Written Guide Here - fistfullofshri...
    📽️Light Optimization - • Unity VR Optimization ...
    📽️Light Probes - • Unity VR Optimization ...
    📦Unity's URP Showcase Project - unity.com/demo...
    👍 If you found this video helpful, don't forget to like, share, and subscribe for more Unity tutorials!
    #Unity #GameDevelopment #LightingTutorial #Unity3D #GameDev #IndieDev #GamedevTutorial #Coding #IndieGameDev #UnityLighting

Komentáře • 46

  • @LucasBlizzard
    @LucasBlizzard Před 4 dny

    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!

  • @FarmBoyTech
    @FarmBoyTech Před 3 měsíci +2

    Straight to the point, no beating around the bush , you earned one subscriber.

  • @MarkKydiosRosales
    @MarkKydiosRosales Před 4 měsíci +3

    Bro that bunny at 4:16 scared tf out of me

  • @davestr2046
    @davestr2046 Před měsícem

    Great explanation. Helpful. Thanks.

  • @pht5-q9f
    @pht5-q9f Před 3 měsíci +2

    This is cool tutorial very insightful

  • @AkulaAviator
    @AkulaAviator Před 5 měsíci +3

    Very good tutorial. Quick to the point and with examples. Well done!

  • @TheMystogrigen
    @TheMystogrigen Před 6 měsíci +3

    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.

  • @vast634
    @vast634 Před 2 měsíci +2

    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.

    • @FistFullofShrimp
      @FistFullofShrimp  Před 2 měsíci

      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 😆

  • @A_walk_in_the_park
    @A_walk_in_the_park Před 7 měsíci +5

    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.

    • @Rollthered
      @Rollthered Před 7 měsíci +2

      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.

    • @MonkiiMousii
      @MonkiiMousii Před 7 měsíci +2

      Use reflection probes

    • @FistFullofShrimp
      @FistFullofShrimp  Před 7 měsíci +4

      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.

  • @MrKiraBR
    @MrKiraBR Před 2 měsíci

    Thank you soooo much!!!!

  • @ChronoCipher47
    @ChronoCipher47 Před 5 měsíci +1

    Which is better lighting or just adding a glow material and post processing most especially for small games like hypercasual games ?

  • @ShadicScarlet
    @ShadicScarlet Před 2 měsíci +1

    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?

    • @FistFullofShrimp
      @FistFullofShrimp  Před 2 měsíci +1

      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.

  • @siobhanpoulter455
    @siobhanpoulter455 Před 7 měsíci +2

    Great video - I have found lighting difficult up to now - beautifully explained thanks :)

  • @DeviousShadows
    @DeviousShadows Před 4 měsíci +2

    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?

    • @FistFullofShrimp
      @FistFullofShrimp  Před 4 měsíci +1

      This is caused by the UV maps being screwed up on the model/object. You can learn how to fix that with this video!
      czcams.com/video/zdHu69-_jrY/video.html

    • @DeviousShadows
      @DeviousShadows Před 4 měsíci

      @@FistFullofShrimp Thank you~!!

  • @64jcl
    @64jcl Před 7 měsíci +2

    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.

    • @FistFullofShrimp
      @FistFullofShrimp  Před 7 měsíci +2

      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!

    • @vast634
      @vast634 Před 2 měsíci +1

      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.

  • @captainofthewhitetower
    @captainofthewhitetower Před 5 měsíci +1

    How can I light up my fridge? I tried all. I tried point light but it gets over the object

    • @FistFullofShrimp
      @FistFullofShrimp  Před 5 měsíci

      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.
      czcams.com/video/zdHu69-_jrY/video.html

  • @MAGELLANIC-bd9eh
    @MAGELLANIC-bd9eh Před 2 měsíci

    How do i fix light bleeding through walls?

  • @Rollthered
    @Rollthered Před 7 měsíci +6

    360p gang

    • @FistFullofShrimp
      @FistFullofShrimp  Před 7 měsíci +2

      CZcams says it only needs 90 more minutes to get that sweet HD resolution out! 360p gang are the real ones. 🍤🍤🍤

  • @victor.novorski
    @victor.novorski Před 4 měsíci

    Need one video for reflections and custom reflection with only 2 camera projections or similar for performance 🙏

  • @alexleonardkrea
    @alexleonardkrea Před 6 měsíci

    Incredible video!

  • @captainofthewhitetower
    @captainofthewhitetower Před 5 měsíci +1

    I mean the ufo light gets into the saloon

    • @FistFullofShrimp
      @FistFullofShrimp  Před 5 měsíci

      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.

  • @gurudevgurudev8176
    @gurudevgurudev8176 Před 7 měsíci

    Please add one video for display in the scene. target- display a media in unity vr with trigger

    • @HipBlooD
      @HipBlooD Před 7 měsíci

      Can you explain a bit more what you mean exactly?

    • @FistFullofShrimp
      @FistFullofShrimp  Před 7 měsíci

      I'm a little confused with the question

  • @leonniar
    @leonniar Před 7 měsíci +4

    "Direct light where light bounces off of something..." My good sir that's not what direct means 😂

    • @FistFullofShrimp
      @FistFullofShrimp  Před 7 měsíci +2

      Hey! I didn't come up with this stuff. Blame the ones who figured this crap out!
      blogs.nvidia.com/blog/direct-indirect-lighting/

    • @SquidgeMakesGames
      @SquidgeMakesGames Před 3 měsíci

      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)

  • @raandomplayer8589
    @raandomplayer8589 Před 3 měsíci

    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?

    • @FistFullofShrimp
      @FistFullofShrimp  Před 3 měsíci +1

      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

  • @raandomplayer8589
    @raandomplayer8589 Před 3 měsíci

    im surprised that this barely helped me!

  • @biocronic2986
    @biocronic2986 Před 4 měsíci

    Far far away from a good learnig expierence. Another commercial videos as they all are :D