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

  Рет қаралды 34,702

Alex Pearce

Alex Pearce

4 жыл бұрын

Get all of my add-ons at BLENDERender.co/ap-blendertoo...
In this tutorial, I'll show you the basics of baking lighting in Blender.
EDIT: You can use GPU to bake, and you might want to bake combined instead of just Direct and Indirect lighting, it just depends on your workflow.

Пікірлер: 71
@HATL201
@HATL201 3 жыл бұрын
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 жыл бұрын
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 :)
@ChrisSeilerLFD
@ChrisSeilerLFD 2 жыл бұрын
Exactly what I was looking for. Thank you so much.
@AlexPearce3d
@AlexPearce3d 2 жыл бұрын
Yeah man!
@sahibdyal8230
@sahibdyal8230 3 жыл бұрын
You can actually Denoise the image by going to composition.
@WillhemTier
@WillhemTier 3 жыл бұрын
Thanks, that helped me a lot! Subscribed!
@shuxilin9385
@shuxilin9385 Жыл бұрын
you save me, bro! great tutorial!
@TheosTechTime
@TheosTechTime Жыл бұрын
Good video now I know how to bake lights
@briansullivan2664
@briansullivan2664 3 жыл бұрын
Best video on baking seriously SUBSCRIBED BBOOOIIII !!!!!!!!!!!!!!!!!
@AlexPearce3d
@AlexPearce3d 3 жыл бұрын
Thanks Brian!
@AlexPearce3d
@AlexPearce3d 3 жыл бұрын
Have you checked out simplebake yet? It's my favorite baking addon.
@briansullivan2664
@briansullivan2664 3 жыл бұрын
@@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 3 жыл бұрын
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 3 жыл бұрын
@@AlexPearce3dNot yet, I will check it out now for sure. Looks like there are videos that explain the process which is awesome
@himanshuagarwal1068
@himanshuagarwal1068 Жыл бұрын
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?
@AshishSharma-yj1nb
@AshishSharma-yj1nb 3 жыл бұрын
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.
@LoydID
@LoydID 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 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 3 жыл бұрын
@@AlexPearce3d Thank you for the quick reply!
@AlexPearce3d
@AlexPearce3d 3 жыл бұрын
Yeah man! I'm not always on top of it, but I try.
@jlewwis1995
@jlewwis1995 2 жыл бұрын
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 2 жыл бұрын
Yes, you can definitely just bake the diffuse map. This method is pretty use case specific.
@AlexPearce3d
@AlexPearce3d 2 жыл бұрын
Do you need to know how to bake the diffuse? I recommend an addon called simplebake if so.
@AlexPearce3d
@AlexPearce3d 2 жыл бұрын
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 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 2 жыл бұрын
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.
@Kimanox
@Kimanox 3 жыл бұрын
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 3 жыл бұрын
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.
@DarkSwordsman
@DarkSwordsman Жыл бұрын
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?
@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 жыл бұрын
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?
@DonnaPinciot
@DonnaPinciot 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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 2 жыл бұрын
@@DonnaPinciot ah yes. Why it doesn't do that by default I don't understand
@DonnaPinciot
@DonnaPinciot 2 жыл бұрын
@@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 2 жыл бұрын
What exporter are you using or what is not supported?
@eyepatch6726
@eyepatch6726 3 жыл бұрын
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 3 жыл бұрын
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.
@navsimmer
@navsimmer 3 жыл бұрын
Great tutorial. Too bad we have to deal with that ton of connecting things, I can never understand those nodes.
@AlexPearce3d
@AlexPearce3d 3 жыл бұрын
Tell me about it! I'm much more comfortable with nodes now, but yeah still gets me.
@odinlee7715
@odinlee7715 Жыл бұрын
Does this work with animations?
@docbadwrench792
@docbadwrench792 3 жыл бұрын
My potato computer thanks you in advance.
@kurogami5143
@kurogami5143 3 жыл бұрын
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 3 жыл бұрын
No unfortunately eevee doesnt have baking support yet, though I think I read it is in the road map.
@OneGhastlyGhoul
@OneGhastlyGhoul 7 ай бұрын
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.
@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 жыл бұрын
@@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
@sherlockhomes9919
@sherlockhomes9919 3 жыл бұрын
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.
@zhang9508
@zhang9508 Жыл бұрын
7:24
@TRIMRKR
@TRIMRKR 2 жыл бұрын
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 2 жыл бұрын
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 жыл бұрын
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 жыл бұрын
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.
How to bake textures in Blender with your GPU!
4:31
Alex Pearce
Рет қаралды 12 М.
How to Bake Textures in Blender and Export to Unity
15:16
UGuruz
Рет қаралды 132 М.
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 77 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 9 МЛН
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 6 МЛН
Why Rendering your Blender Project in Unreal Engine 5 is a Game-Changer!
12:29
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 566 М.
06. Baked Lighting with Blender in BabylonJS
31:45
Code-Small
Рет қаралды 12 М.
How I Remade MW2 with Unreal Engine 5
12:37
reubs
Рет қаралды 3 МЛН
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,3 МЛН
How to Unwrap and Bake Textures in Blender 2.8, 2.9, 3.0, 3.1 and 3.2?
12:18
Wild Tricks for Greenscreen in Blender
9:51
IanHubert
Рет қаралды 1,9 МЛН
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 518 М.
Baking Multiple Textures onto One Map | No Plugins
9:15
Grant Abbitt
Рет қаралды 269 М.
Gymrat CAT is a CHEATER?! 🙀 #kitten #cat #cute #aicat
0:45
Stunning Cat Stories
Рет қаралды 10 МЛН
Утонуть НЕВОЗМОЖНО 😱 #Shorts
0:19
ФАКТОГРАФ
Рет қаралды 3,6 МЛН
😬 Мам Дай Хлеб 🍞 #shorts
0:38
AOneCool
Рет қаралды 966 М.
Rabbit doesn't know who hit her#Short #Officer Rabbit #angel
0:46
兔子警官
Рет қаралды 11 МЛН