What is baking??

Question Materials and Textures

Hi, everyone!

This might be a dumb question, sorry, but I can't seem to understand what baking is and why it's needed? 

I've read about it and tried to watch some videos, but still a bit lost.

So, if we want to texture and paint our model in another software, like substance painter, do we need to bake parts of the model in Blender (the UV map after unwrapping the model?)? Is it other map types too that need to be baked, like normal maps, id maps, height maps etc?

Why not just paint on the UV map? 

How would you know which ones you would need to bake. And why is that a process that is necessary in the first place?

I'd really appreciate it if anyone have the time to try to explain in simple terms how this works and why do it.

Thank you :)


1 love
Reply
  • Omar Domenech replied

    I think you bake for two reasons, you need to save up on resources and you need to export your shaders to use on another software.

    For the saving up resources part, when you make a render, Blender has to calculate all the lights, shadows, textures, etc., and that takes time. But you can bake all that information down to an image and have all the lights and shadows and all that stuff captured on a texture and fake the rendered look. You may think it's overkill if you're doing just one render, but if you are doing an animation and Blender has to render thousands of frames, if it doesn't have to calculate anything because all the info is baked on textures, your renders will go lightning fast.

    And since each software has different ways to create materials, if you have created a great material on Blender but you need to use it on a another software, you can also bake you material in different maps so it can be used on any software. 

    2 loves
  • 546_student replied

    So, am I understanding you correctly that if you have a scene with lot of objcets that have materials, and you want to render it in let's say cycles, it is smart to bake the textures? (not the whole material) before rendering the final image. Even if it's not for exporting to another software, but just for a render of a single image? Cause that makes the rendering of the scene go faster?

    But if you have an animation and you need to bake the textures for the objects in your scene, will you then have to bake for every single frame? Cause I imagine if you baked shadows, textures and lights on one frame, wouldn't that possibly change in an animation over time? Like the light would look different, the shadows etc, depending on where they were in the scene?

    Is textures the thing you bake, or is it always a map? Like a texture map, lighting map, shadow map?

    Hope that was understandable.

    1 love
  • Dwayne Savage(dillenbata3) replied

    First, let's define a few terms. Texture is a 2D image. Mapping is how a texture is applied in the shader's calcultaion. Textures made for a specific type of mapping is usually referred to by the mapping type. Like a normal map, AO map, shadow map, etc. The shader is the part that determines what types of mapping is available and handles the calculations for a material. EEVEE and Cycles can combine different shaders for a single material. 

    Second, If you have a complex node setup for a material like textures(Images) layered on top of each other then you can bake them to a single image texture. Same is true if you have a procedural texture node setup. This simplifies all those calculations and steps into 1 image. If you're already using a single image or you are painting directly on that single image then there is no need to bake. A common texture to bake is normal maps. The most common situation(Not the only one) is if you have a high poly count mesh and a low poly count mesh and want to make the low poly look like it is the high poly count mesh, by baking those details to an image. This is quite difficult to try and paint those kinds of details manually. 

    Hope that helps clear up some things

    1 love
  • 546_student replied

    Making a low poly mesh look like a high poly mesh makes sense so I think I understand that one.  

    So if you have a complex node setup for a material, or a simple like a noise texture mixed with a checker texture etc, you connect them to the shader and then in the render options click bake? And then the result of those two textures are "forever" saved to an image that doesn't have to be calculated by the shader several times? Cause now it just looks like a finished image? So when it comes time to render, Blender's render engine looks at the baked file and not the material made in the shader editor, if that makes sense?

    And if you need to bake like a normal map, would you do as in the picture? And then press baking in the render options, and then you would have baked a normal map? Or does it need to involve a texture?

    whatisbaking.png

    Is this closer to understanding it? :)

    1 love
  • Martin Bergwerf replied

    Hi Student,

    You are correct up till the last sentence of your second paragraph:

    This kind of baking produces image files, but they still need to be used in a Material (plugged into a BSDF, for instance).

    Baking a Roughness and Normal Map example (just to be clear, these were done one after the other, not at the same time)::

    Baking.png

    They are Baked to Images and can then be plugged directly into a Shader Node (or, in the case of the Normals, through a Normal Map Node) ...Instead of having to calculate those values at each shading point, Blender can just take those values from the images.

    Have a look at Chapter 3 of this (older) Course, that explains what Baking is and why we'd want to do it::

    https://cgcookie.com/courses/fundamentals-of-texturing

    (Mostly the Cycles part, probably.)

    The process of Baking will be explained each time when it is done in a Course, so don't try to get it all now.

    2 loves
  • 546_student replied

    Hi!

    Am I correct in understanding that you make a 3D model (like the monkey head), and in the shader editor you make a roughness map of the object's surface using several nodes (I suppose there are many tutorials on how to do this), and then bake them, and then connect the finished bake/product to the shader? If this is correct I might have understood some of it, I think.

    And that all types of baked maps are all completed before the final render, and no baking takes place when the final reder is being made?

    The nodes above the baked ones in the image you provided is not related to the baked maps underneath are they?

    Would you always use baking on complex scenes for less render time, or is there some negatives to this? 

    I'll take a look at that course :)

    Thank you!

    1 love
  • Martin Bergwerf replied

    "The nodes above the baked ones in the image you provided is not related to the baked maps underneath are they?"

    Those Nodes are what is being Baked; what goes into the Roughness socket of the Principled Shader, is being Baked into the Roughness Image Texture and what goes into the Normal Socket is being Baked into the Normal Image Texture...

    Myself, I rarely Bake Textures, to be honest...I only use Blender and do not make things that need to be exported (like for games).

    I don't know if it makes a difference in the actual Render time, but it does in the Renderer's 'preparation time'...The Render Engine calculates all those Nodes first and then starts Rendering vs. loading the image textures and start Rendering...With Cycles, the actual Render time is often much longer than the preparation, so it is often not a big win to Bake...

    There are many good reasons to Bake, but it is not always better...




    2 loves
  • 546_student replied

    Oh, I misunderstood about the nodes, thanks for explaining that :)


    1 love
  • Omar Domenech replied

    Yes, baking the light and shadow info for an animation has the drawback that you can't move anything or the illusion will break. That is more for static elements. 

    2 loves