Intro to Baking

🛑⚠️🚧Content not yet finished 🚧⚠️🛑

Everything below represents notes for Sepha to finish the YouTube vid and article with.

Baking

Baking is deep concept, but we need to touch on it briefly before we can begin texturing with Substance Painter or Marmoset Toolbag.

I will try and keep this chapter as approachable as I can, and split the more complicated stuff into the intermediate chapter.

However, this will be heavily Theory Based.

But please keep in mind we're starting to get a little advanced. If you don't fully understand it, that is ok. As you get into the habbit of baking and texturing with those bakes, the concepts will slowly crystalize in your mind. It's ok not to get it immediately.

What is baking?

  • Baking is a loose term that sort of means to calculate or cache something complex down to data.

  • In this context, we're specifically talking about Texture Baking, from our Highpoly to our Lowpoly.

  • We created our Highpoly dense in detail, and a corresponding lowpoly sparse in detail, and unwrapped it.

  • We can now bake that detail across from the high to the low, and store those details in texture space.

  • This will be much cheaper than the triangles of our highpoly to render, as our highpoly may be 10 million + polygons, and the lowpoly only a few tens of thousands

The Fundamental map types

When we're done with Baking, we will have created (baked) these textures:

  • Normal (Tangent Space) Map

  • Normal (World Space) Map

  • ID Map

  • Ambient Occlusion Map

  • Curvature Map

  • Position Map

  • Thickness Map

There are many more than this, but these default seven will almost always be used in anything we make.

These maps will significantly speed up our texturing process, AND increase the quality of our work in general.

Normal Map (Tangent Space)

A tangent space normal map, taken from https://en.wikipedia.org/wiki/Normal_mapping
  • Represents "Surface Directionality" - it is quite literally a map of surface normal (surface directions)

  • We touched on Vertex and Face normals before. We can store these in pixels, into this map.

  • When combined with our Lowpoly, our game engine can use this map to rebuild the surface directionality (and therefore shading) of our highpoly

  • Does not store depth. Only direction.

Baking these flawlessly is hard. Even artists in the AAA space routinely make mistakes at this step. We will explore this deeply in a dedicated section later.

Normal Map (World Space)

World space normal map, taken from https://github.com/ray-cast/ray-mmd/issues/40

Same as above, but instead represents directionality relative to the scene (world), not the tangent space.

We will use this to calculate when a polygon is looking Up/Down, Left/Right, Forward/Back.

Useful for when we want dirt or blood to only be on the front of our character, or for snow / moss to be on the tops of props etc.

Ambient Occlusion Map

Ambient occlusion is subtle darkening in creases, corners, and contact points - even without direct shadows.

Light bounces around from all directions, but some spots naturally get less bounced light. Where your keyboard meets your desk, or where walls meet the ceiling - these areas appear darker because the geometry limits ambient light reaching them.

This is a visualization of a scenes Ambient Occlusion. Taken from https://en.wikipedia.org/wiki/Ambient_occlusion

Regular shadows happen when objects block direct light. Ambient occlusion happens where geometry creates tight spaces that bounced light can't penetrate easily.

It's about the absence of bounced light in recessed areas, not blocked direct light.

We will use this map for:

  • Subtle darkening and shadowing

  • Buildup of grime and grunge, etc (places where light struggles to penetrate are also places where dust and gunk remain uncleaned)

When baked into a texture, it will look something like this:

Curvature Map

This map will store the Curvature of our highpoly, and it will store it in two forms, Convexity, and Concavity.

  • Marmoset toolbag lets us bake Curvature and Convexity as two seperate maps, but more often than not, they are combined into one singular "Curvature" map.

We use Curvature to concentrate detail onto the bumps and ridgets that come away from our flat surfaces, as well as within cracks and crevaces.

Concavity is very similar to Ambient Occlusion, but on a very fine scale, and seperate math is used to calculate each one, producing slightly different results.

Position Map

Literally stores the Position of polygons relative to the meshes pivot point.

Useful if for example we wanted mud and gunk to only be located on the bottom half of a character or prop, but not the top.

Thickness Map

Stores how thick or thin the highpoly is at that location.

So for example, if you were texturing a candle, maybe you would want certain areas to be lighter or darker to simulate light penetrating through the thin areas, but not the thick areas.

ID Map

Sometimes called a Clown map.

Allows us to encode an "ID" for sections of our Highpolymesh, and to use that to determine where texture detail goes in the lowpoly.

You would give each important area, or surface type (rubber, metal, chrome etc) its own ID color, which lets us ensure our Metal or Rust won't bleed over onto our Wood or Rubber areas.

It's purely a quality of life map that gives us masking utility while texturing.

The Cage.

The cage is the third and final mesh, usually hidden to the user, that extends out from the lowpoly object. The cage is typically generated by the baking program.

The translucent wireframe mesh is the Cage.

Only Highpoly mesh contained within this cage will be baked, everything outside of it will produce an error. If this cage is too shallow, some highpoly mesh will be missed, indicated here in red:

If the cage is too large, then sections of the mesh will project into areas of the Unwrap they are not supposed to. In this example, the arm will project its highpoly detail down onto the characters hips, and vice versa:

Keep your cage as small thin as you can. Not so thin that it cuts off elements of the highpoly, nor too large that it inersects with itself.

Substance Painter

When we load our Highpoly and Lowpoly into substance painter, and enter the Bake screen, Painter will do a pretty decent job of baking these seven maps by default.

Homework

Last updated