0
$\begingroup$

This is a Game-Dev related question.

Let's say we modeled a simple piece of floor in Blender and applied a wood texture to it. From this plain texture, often referred to the base texture, we usually create some other maps, like:

  • A bump/normal map.
  • A specular map.
  • A displacement map.
  • An ambient occlusion (AO) map.
  • And some more...

Finally, right before exporting this model, we usually bake all textures into a master texture (which is a single .jpg or .png file that contains all of the aforementioned textures combined). And voilà. We have a master texture and ready to be used in Unity (or Unreal Engine, or the game engine of your liking).

However, the more I dig into this designing/game-dev world, the more confused I get. This is so because Game Engines generally give you the possibility to attach all of the previously mentioned maps (normal, spec, displ, AO, ...) separately to the model. For example, in Unity 5, you can do that right into the shader:

Unity-5-texturing-options

So, I can come up with two ways of texturing a complex model (for example, a WWII tank): wwii-tank

1. First way of doing it: Baking all maps (normal, spec, displ, AO, ...) into a MASTER TEXTURE. Then using this master texture right inside of the Game Engine.

2. Second way of doing it: Importing all maps (normal, spec, displ, AO, ...) into the Game Engine. Then importing the model as well, and tell the shader what texture corresponds to what map (i.e. manually select all maps; see the first image).

All in all, what is the "most correct" way to apply texturing to a model inside of a game engine, out of the two I mentioned right above?

Thanks.

$\endgroup$

2 Answers 2

2
$\begingroup$

Those two workflows you describe are not alternatives to the same end.

Baking is generally used to achieve effects that are either too complex, too expensive or unnecessary to be calculated in real time. However, downside is after baking they become static, that means they no longer vary or react to user input.

You can't really bake a 'Master Texture' of all that, if you do you will be losing information. If you bake the specularity, bump and reflections they will become static, as if painted onto the object and will no longer react to in-game light changes or different user view angle.

Baking is more often used in an earlier stage of game creation, when transforming a high resolution model into a low poly version ready for consumption that the game engine can deal with in real time.

In your case without further info, I'd say you should use all those textures directly in game, which seems like what they were created for in the first place.

$\endgroup$
3
  • $\begingroup$ But that is exactly what I want. I am baking those maps into a "master map" because my models are static into the game. And because my games are supposed to be played on mobile devices, which more often than not run low on memory. I could have a model with 10 million tris in Blender, but that's not going to be useful in my game. What I usually do is baking all textures into a "master texture", and applying it to a low-poly version of the complex model. $\endgroup$ Commented Oct 5, 2016 at 23:13
  • $\begingroup$ What confuses me is that the Game Engine allows me to add each map individually to an imported model (inside of the shader). But why? I already have a "master texture" upon which I have baked all the complex details. It should suffice with applying this "master texture" to my newly-imported model inside of the game engine. I don't know if I'm being clear enough? Thanks. $\endgroup$ Commented Oct 5, 2016 at 23:16
  • $\begingroup$ Well then I don't know this sounds like a Unity question, not Blender., I am not in the game making industry, but either those are for more performant platforms where baking is not needed, or it serves as some sort of Level of Detail, and the engine only fetches necessary textures when needed $\endgroup$ Commented Oct 5, 2016 at 23:31
0
$\begingroup$

I could sum it up by saying that baking is optimization at the expense of accuracy of visuals.

The correct way is to use the normal, specularity, ambient occlusion etc maps in Unity material. That way the shaders will take them into account when they are rendering the object in the game scene with the scene's lighting.

If you bake everything into the texture (the term is Combined bake) your game object will not fit in with the real time lighting in the game scene. Your game object will have the lighting you had in Blender when you baked it. If you shine light into a crevice of your baked object it will not show as normal surface color, it will show as dark grey / black because you have baked the ambient occlusion and/or shadows and the original surface color (diffuse / albedo) is lost under it. However if you use the various maps in Unity material the material lights up when you shine light into it's crevices and show the real diffuse color as it's supposed to. This is one of the epitomes of Physics Based Render pipelines.

For mobile games the modern graphics approach is a bit less relevant, however. The GPU is much much more limited and you can forget about normal maps and indirect lighting. For mobile games you bake whatever you can get away with because you don't have the VRAM to store in all the separate textures. You also don't have the GPU power to run complex shaders or many pixel lights with shadows real time. Drawcalls are also more limited on mobile so you're further encouraged to batch all the static models together into one material that has everything baked and atlas characters that are likely to be on the screen at the same time.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .