How to bake lighting in Blender for Unreal, Unity or Sketchfab

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 73

  • @HATL201
    @HATL201 3 ปีที่แล้ว +8

    Thanks a lot Alex! Extremely helpful tutorial. I started using Unity again and I dislike the light baking there a lot, I get issues with UV overlapping, scene looking vastly different from realtime, ambient lighting not being baked in etc. So I finally decided to bake lighting in Blender instead, your video was really helpful :) I'm getting just the desired baking results.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว +1

      That's great to hear! Yeah I prefer baking in blender for sure. In unity, how are you setting up your shader? With the default unlit? Have you checked out "the lightmapper"? You can get it free at Blenderender.com or github, you can make lightmap for blender, but I haven't been able to test how it would work with unity yet.

    • @HATL201
      @HATL201 3 ปีที่แล้ว

      @@AlexPearce3d Sorry for late response, thanks a lot for the Lightmapper suggestion, I had no idea about it. I tried it, it seems to work really well, however I'm having some UV overlapping/artifacts issues even with newly generated UVs. And yes, I'm using the unlit/diffuse shader in Unity, depending upon when I need lighting or not :)

  • @sahibdyal8230
    @sahibdyal8230 3 ปีที่แล้ว +9

    You can actually Denoise the image by going to composition.

  • @ChrisSeilerLFD
    @ChrisSeilerLFD 3 ปีที่แล้ว +3

    Exactly what I was looking for. Thank you so much.

  • @humanharddrive1
    @humanharddrive1 5 หลายเดือนก่อน

    now i wish i knew how to bring that into unity with the right texture/material and what the setup would need to be

  • @DarkSwordsman
    @DarkSwordsman ปีที่แล้ว +2

    How is it that every single tutorial I come across for this always only shows the Blender side, and NEVER how to actually import it into Unity?

    • @anothercastle17
      @anothercastle17 3 หลายเดือนก่อน

      Don't you just have to import the model with baked textures? I feel like otherwise it wouldn't be any different than any other model import.

  • @jlewwis1995
    @jlewwis1995 3 ปีที่แล้ว +7

    Is it possible to just bake the color information? Often in game engines it seems like the UV2 layer is used for lightmap baking and the diffuse is multiplied by the color information in the lightmap to get the final color, this just looks like it's rendering out a texture with lighting which could be useful when doing the art for your game depending on what exactly you're doing but you don't just want to use big pre rendered 4k textures for every unique surface in your scene :/

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Yes, you can definitely just bake the diffuse map. This method is pretty use case specific.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Do you need to know how to bake the diffuse? I recommend an addon called simplebake if so.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Yes! I've tested lightmapper too. So you're using it to bake light, and keep it in Blender, yeah? I was mainly baking light into the textures for web distribution mainly, so lightmapper wasn't exactly what I needed.

    • @jlewwis1995
      @jlewwis1995 3 ปีที่แล้ว +2

      @@AlexPearce3d well no I was wanting to bake lighting in blender and use it in godot (a game engine(, godot has its own lightmapper but imo blenders is better, basically I wanted to have the lightmap atlas and texture materials be separate and blend them in engine with a shader, I don't want to bake the actual textures with lighting, I only want the lighting itself separate from the textures. Does that lightmapper plugin not do that?

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Got it, yeah that makes sense. There should be a way to do it, I was looking into doing that with Unity. The developer said it should be possible but he hadn't done it, so you may reach out to him, but you might have to figure it out yourself.

  • @himanshuagarwal1068
    @himanshuagarwal1068 2 ปีที่แล้ว +2

    Great video! I learnt a lot.
    Guys although I have one query- I followed along. But when I connect image texture of baked image to material output, my object looks completely black.
    What might be wrong?

  • @briansullivan2664
    @briansullivan2664 4 ปีที่แล้ว +1

    Best video on baking seriously SUBSCRIBED BBOOOIIII !!!!!!!!!!!!!!!!!

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว

      Thanks Brian!

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว

      Have you checked out simplebake yet? It's my favorite baking addon.

    • @briansullivan2664
      @briansullivan2664 4 ปีที่แล้ว

      @@AlexPearce3d Hell yeah dude, use it to bake the majority of my materials that varying attributes on roughness materials etc. I am trying to figure out though how to get materials into unity that will look like the final renders. For instance unity's metallic attribute and roughness attributes tend to look way different. Me and my twin brother are building games, and he does know much about the graphics aspect, so if I could find a workflow that makes sense, I could supply him assets that look really good straight from blender. Trying to find a better way of doing this rather than playing in unity regarding materials and their properties

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว

      Are you guys using static meshes or rigged/animated? If static meshes, have you checked out my add-on AP GameTools? I am biased, but I think it's a really good pipeline from Blender to Unity. Only works well with non-rigged models, but for archviz and stuff like that, it's really great. blendermarket.com/products/ap-gametools

    • @briansullivan2664
      @briansullivan2664 4 ปีที่แล้ว

      @@AlexPearce3dNot yet, I will check it out now for sure. Looks like there are videos that explain the process which is awesome

  • @odinleee
    @odinleee ปีที่แล้ว

    Does this work with animations?

  • @shuxilin9385
    @shuxilin9385 ปีที่แล้ว

    you save me, bro! great tutorial!

  • @TheosTechTime
    @TheosTechTime 2 ปีที่แล้ว

    Good video now I know how to bake lights

  • @DonnaPinciot
    @DonnaPinciot 3 ปีที่แล้ว +1

    I don't know what I'm doing wrong here.
    I'm in cycles, CPU, I've got an image selected in the shader that's applied to the object, the object is selected and unwrapped, but when I press 'bake', it says that there's 'no active image found in material'.
    I've double-checked that I don't have a duplicate-named material, and it's very clear that I don't.
    Is it a problem if it's parented to something, maybe?

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Hmm. And the image node, it's not a blank image node? Like if you add an blank image node, then you'd need to create a new image first before baking. Another thing could be maybe you have multiple materials in the same object? Shouldn't matter. Have you tried on different versions of Blender and the same thing happens?

    • @DonnaPinciot
      @DonnaPinciot 3 ปีที่แล้ว +1

      @@AlexPearce3d Yeah, I made a new image that's selected in the node. It's also not connected to anything.
      There's only one material listed in the object's 'Material Properties' tag, so I don't _think_ I've got multiple materials on it.
      Does it matter if the material is shared between objects, maybe? Although making them unique just now didn't do it.
      While writing this, I found that I didn't tick 'Use Nodes' in the material editor, and now it baked properly, so...

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว +1

      @@DonnaPinciot ah yes. Why it doesn't do that by default I don't understand

    • @DonnaPinciot
      @DonnaPinciot 3 ปีที่แล้ว

      @@AlexPearce3d
      It's just as well. The exporter I need for my project doesn't support nodes directly, so I have to turn it off anyway before exporting.
      Still, a very good lesson to learn, and the results are quite promising!

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      What exporter are you using or what is not supported?

  • @eyepatch6726
    @eyepatch6726 4 ปีที่แล้ว

    Hi im trying to bake but after bake the object pooked so much washed up no gloss amd reflections showing up in combined pls help

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว

      You're baking a combined pass, yes? I recommend trying on the latest version of 2.83 LTS, they fixed some baking issues in the last update. On 2.83.7 it seems to be working for me. Make sure if you're trying to bake the lighting with a metallic or gloss setting, use combined and make sure that Glossy is checked.

  • @sherlockhomes9919
    @sherlockhomes9919 3 ปีที่แล้ว +1

    Why didnt you use simplebake here?

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      I probably just wanted to show the process for people who didn't have it? It's been a while so I don't really remember haha.

  • @LoydID
    @LoydID 4 ปีที่แล้ว +3

    Hey Alex,
    thank you for the tutorial, it helped me getting started with baking (again...). I have a question though... why does Cycles have to be set to CPU? I just tried GPU and it appears to have worked, so I'm wondering if I'm somehow running into long term problems?
    Thanks and best regards.

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว +3

      I figured this out after that video was posted and made a different video for it but baking does not work with Optix, but it does work with CUDA. I have to click CUDA and deselect cpu when I bake on gpu

    • @LoydID
      @LoydID 4 ปีที่แล้ว

      @@AlexPearce3d Thank you for the quick reply!

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว +1

      Yeah man! I'm not always on top of it, but I try.

  • @Kimanox
    @Kimanox 4 ปีที่แล้ว

    Thanks, Top Video. Too bad there is no denoising for baking. Do you know if it's possible to do this with tiled textures?

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว +1

      Hmm probably not with tiled textures unfortunately, can't have overlapping uvs. Have you checked out simplebake addon? It has a denoising feature built in! I asked the creator about it and he made that feature, it's pretty awesome and it automates a lot of the baking process.

  • @WillhemTier
    @WillhemTier 4 ปีที่แล้ว

    Thanks, that helped me a lot! Subscribed!

  • @HarpreetSingh-cz2zh
    @HarpreetSingh-cz2zh 3 ปีที่แล้ว

    do we have to create a new UVMap instance for the bake?

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Not necessarily. If you are not combining multiple objects, and you do not have overlapping uvs, you might be able to use the existing uv map. You could try to bake with just a few samples and see what the result is, and if it's good raise the samples, if bad, then yeah you might need to add a new uv map, pack and/or unwrap, and try again.

    • @HarpreetSingh-cz2zh
      @HarpreetSingh-cz2zh 3 ปีที่แล้ว +1

      @@AlexPearce3d okay thanks, I'm stuck with a project right now. Is there any way to get one on one help? like tutoring?

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      I'm super busy these days, between work and family. I don't even have time to make tutorials :( I am happy to try though, if you have discord you can join my server, discord.gg/jg8d2kNCan

    • @HarpreetSingh-cz2zh
      @HarpreetSingh-cz2zh 3 ปีที่แล้ว

      @@AlexPearce3d yes I do but when I click on the link it says: invalid invite.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      discord.gg/jg8d2kNCan

  • @navsimmer
    @navsimmer 3 ปีที่แล้ว +2

    Great tutorial. Too bad we have to deal with that ton of connecting things, I can never understand those nodes.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว +1

      Tell me about it! I'm much more comfortable with nodes now, but yeah still gets me.

  • @mishraka
    @mishraka 3 ปีที่แล้ว

    Alex, can we use SimpleBake addon to bake lighting? Manually creating an image texture node for each material can be pretty exhausting.

    • @mishraka
      @mishraka 3 ปีที่แล้ว

      I think selecting "Cycles Bake Mode" in SimpleBake and choosing Combined in Baking option will do it.

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว +1

      Yes! That's the main reason I got it originally

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Yes, basically whatever settings you set up in cycles, simplebake will use with that option

    • @mishraka
      @mishraka 3 ปีที่แล้ว

      @@AlexPearce3d if there's a reflecting surface like a shiny coffee table in the scene, with baked lighting texture looking at that table from a different viewpoint wouldn't change its appearance at all. Right?

  • @OneGhastlyGhoul
    @OneGhastlyGhoul ปีที่แล้ว

    I know that one's a bit older by now and blew up without you expecting that, but I'd like to point out that the title is a bit misleading. The results don't resemble the baking results in engines. In this tutorial, you don't actually bake light for the engine. You bake the final color information that would just be slapped on an Unlit Shader. In engines, you usually only bake indirect light information, while objects still react to direct light. Implementing that in the engine sadly isn't as trivial and usually poorly documented. I get you couldn't do that, because I can't either, but it's somehow what I expected when I clicked on the name.

  • @kurogami5143
    @kurogami5143 4 ปีที่แล้ว +1

    Nice tutorial! I have the perfect scene to bake some object, but Im on eevee....is there any way to bake light into objects on Eevee? thanks!

    • @AlexPearce3d
      @AlexPearce3d  4 ปีที่แล้ว

      No unfortunately eevee doesnt have baking support yet, though I think I read it is in the road map.

  • @docbadwrench-cdmg
    @docbadwrench-cdmg 4 ปีที่แล้ว +2

    My potato computer thanks you in advance.

  • @zhang9508
    @zhang9508 2 ปีที่แล้ว

    7:24

  • @TRIMRKR
    @TRIMRKR 3 ปีที่แล้ว

    Gunna be honest here man this works for a cube and a plane yeah but most game scenes contain thousands pf objects with hundreds of materials. Clicking on each object, creating a texture, selecting it baking…, its just not feasible for an actual scene. This process would take forever

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว

      Yeah for sure man. I've learned a bit since I released this video and its one thing I can't stand about all the material libraries for blender... They are too complex to just export straight to game engines.

  • @grimmimsy7159
    @grimmimsy7159 3 ปีที่แล้ว +1

    7:00... is the worst explination I have ever heard. I hate to say it but you would be better not talking and using music. its called a loop. A LOOP, you need to look it up and not try to define technical terms for other people... ever

    • @AlexPearce3d
      @AlexPearce3d  3 ปีที่แล้ว +1

      Worst explination you have every heard haha! Yeah I actually agree with you, it's pretty bad, I had good intentions, I swear :)
      When I made these tutorials I was doing them for a few specific people, didn't realize there would be this many views and such.
      Haha yeah it's honestly a little embarrassing for me to look at this tutorial now, I cringe at all the ums and uhs and trying to explain everything. Hopefully it still helps a little bit. Sorry for that, I am trying to be better now!

  • @mattg7053
    @mattg7053 2 ปีที่แล้ว

    Having a "tutorial" on how to bake textures in Blender without showing the very simple steps of how to do UV Unwrapping is a very incomplete tutorial. UV Unwrapping is a very critical piece of this puzzle.

  • @streak171
    @streak171 3 ปีที่แล้ว +2

    I created a simple wall but i am having in issue with it used a base color white when i bake it the edges of wall having an issue some strange baking is happening and the simple plane is not baking properly i have to solidify it then it is baking , please help.