This is an old revision of the document!
Remapping and Baking
Blender's Cycles rendering engine allows any material to be baked to any UV map. This allows remapping, vertex painting, generative materials, and more to be rendered to a mapping that works in game. Follow the steps in one of the subsections under "Create a new material", then the steps in "Bake"
Getting Started
It is recommended that you follow the Preparation tutorial or open this start file for Blender 2.80 and later, then import your OBJ before continuing with this tutorial.
Create a new material
Remap
Remapping is creating a new UV map. This allows removing discontinuities or changing/removing warping/curling/nonlinearity that exist in the template.
The UV Map
- With the 3D object to be remapped selected, in the
properties
panel,Data
tab, press the plus icon in theUV Maps
section to create a new UV map. - Press
tab
to switch to edit mode. Pressu
to bring up the unwrap menu.- One simple and useful remap is to use a standard viewport (numpad numbers), ortho view (numpad 5 toggles) and
project from view
in the unwrap menu. - Another is to select an area that is discontinuous or warped on the template,
alt M
(blender 2.80: selectby distance
) to merge duplicate vertices, andunwrap
from the unwrap menu - For other unwrapping methods, there are many existing tutorials that cover UV mapping in more detail
- Before following the steps in
Bake
, select the first UV map from theproperties
panel,Data
tab
The template
This part is optional, but it is generally useful to export a template so that you can create a texture that aligns with your remap.
- switch to the
UV/Image Editor
(2.79) orUV Editor
(2.80) from the drop-down icon in the corner of the 3D view - Press
a
to select all - In the
UVs
menu, selectExport UV Layout
- Set the file name, size, format, and fill opacity as desired, and press
Export UV Layout
- Create a texture using the exported UV layout as a template, as you would a livery using the standard template
The Material
If you are using the start file linked above, you can start with bake uv.001
to bake UVMap.001 (or duplicate this material to bake aditional UV maps). view uv.001
can be used to preview a texture on the remap, and view composite
can be used to preview the combined texture on the standard map and the texture on the remap.
- If you are using blender 2.79 or earlier, make sure you are using the ''Cycles Render'' engine (drop down menu at the top of the window) - in the ''properties'' panel, ''Material'' tab, press the plus (2.79) or two pages (2.80) in the material selection drop-down to create a new material. - Switch to the ''node editor'' (2.79) or ''Shader Editor'' (2.80) using the drop-down icon in the corner of the 3D view. - Create the material shown (instructions below) {{ :contributing:blender:uv1material.png?direct&400|}} - If any unneeded nodes are present, select them (click for single select or press b to box select) and press delete - Select from the menus ''add > texture > image texture'' and click to place - Press ''Shift-D'' to duplicate the ''image texture'' node and click to place - Select from the menus ''add > input > UV Map'' and click to place - Select from the menus ''add > shader > emission'' (any shader that takes a color input can be used, but emission makes baking faster) and click to place - click and drag from circle to circle as shown - Select the new UV map in the ''UV Map'' text area - click ''open'' on the ''image texture'' that is connected to the ''UV Map'' and ''Emission'' - click ''new'' on the ''image texture'' that is not connected to other nodes; set the name, width and height; click ''OK'' - Make sure the disconnected ''image texture'' is selected (this makes it the target of the texture bake)
Other Material
For any other materials, just add a disconnected image texture
as the texture bake target
- Switch to the
node editor
(2.79) orShader Editor
(2.80) using the drop-down icon in the corner of the 3D view.- Select from the menus
add > texture > image texture
and click to place - click
new
on thisimage texture
; set the name, width and height; clickOK
- Make sure this
image texture
is selected (this makes it the target of the texture bake)
Bake
Once you have a material with a disconnected image texture
selected
- Select the
properties
panel,Render
tab - If you are using Blender 2.80 or later, select
Cycles
from theRender Engine
drop-down - In the
Bake
section, set theBake Type
toEmit
(unless you are using a material that uses shaders incompatible with this render type, in which case select the matching type orCombined
) - Press
Bake
- Switch to the
UV/Image Editor
(2.79) orImage Editor
(2.80) - Select the image from the selected and disconnected
image texture
- In the
Image
menu, selectSave
,Save as..
orSave as Image
- Select a location and file name, then click
Save