Skip to content

3D Modelling & Material Design: A Tutorial

David Mansolino edited this page Nov 7, 2018 · 3 revisions

Aim: Create a single mesh per Solid with PBR and all the required maps.

Workflow

The following tasks must be done in order. Fixing something that went wrong in the first steps often means having to re-do the later parts from scratch.

Create a high- and a low-poly mesh => Create UV map => Bake occlusion and normal map => Export UV layout and create color, roughness and metalness maps in Gimp / Substance Designer => Export the model

1. Create meshes

Aim: Create a high- and a low-poly mesh, at the same location.

  • These two meshes may be created together or not.
  • Note: it could be interesting to explore the multires modifier (for Multi-resolution) for this section.

1.a. Create a high-poly mesh

Create a mesh with as many vertices as needed (e.g. > 100k vertices) to look perfect.

  • Curved surfaces should be high-res.
  • To have nice-looking details in the normal map at the end, the model may contain scratches, slight deformations, grooves, beveled edges. To do so, sculpt mode and dyntopo are interesting tools.
  • The high-poly mesh should render well in Object mode / Solid viewport shading. Particularly, curved surfaces should look good. This can be achieved activating smooth shading (3D View / Transform tools / Edit / Shading / Smooth) and appropriate crease angles through Properties / Object data tab / Normals / [Auto Smooth | Angle]). It may be interesting to split vertices to mark wrongly auto-smoothed objects in a sharp way.

1.b. Create a low-poly mesh

Create a mesh with limited number of vertices (e.g. < 5k vertices).

  • If you're going to bevel with a normal map, edges must be sharp (not beveled).

2. Export UV

From the low-poly mesh, project the UV map on the texture.

  • Use the "UV smart project" technique (with a small island margin, like 0.0005) is a good way, because it generates simply an homogenous result. Mark some edges as seams may help, or not! It's worth to try first without.
  • Some circle-like UV islands may not be oriented in a clever way. Changing their orientation in the UV editor at this stage is worth.

3. Bake normal and occlusion maps

  • In the Properties / Material tab, create a material.
  • In the Outliner, associate this material with the low-poly mesh.
  • In the UV / Image editor, create 2 images (e.g one called Normal and one called Occlusion).
  • In the Node editor:
    • Select the low-poly mesh material.
    • Create at least one ImageTexture node for each images.
    • these image nodes should be selected to bake on the correct image!
  • Set the rendering engine to Cycle Render
  • In the Outliner, select the high-poly node and the low-poly node in this order.
  • Enable the world ambient occlusion from the Properties / World tab / Ambient Occlusion
  • In the Properties / Render tab / Bake:
    • Select Bake type: Normal, Space: Tangent, Swizzle: +X, -Y, +Z, Selected to Active. It's capital to set well the RayDistance (distance from which the low-poly model is doing the ray tracing on the high-poly model). Click on Bake (wait few minutes).
    • Select Bake type: Ambient Occlusion, click on Bake (wait few minutes).

4. Create color, roughness and metalness maps

  • Export UV layout to an image: In UV/Image Editor, select the UV map, hit on Export UV layout in a high resolution (e.g. 2048x2048).
  • Create a Gimp project with this image as background layer, and eventually the normal and occlusion maps.
    • Use Gimp layers to create color, roughness and metalness maps.

Otherwise, you can also use Substance Designer to create your material in simple cases. Texture painting in Blender is great for this too, but more advanced.

5. Export to Webots

  • In my point of view, the simplest is to create a PROTO file with the templated IndexedFaceSet, to export the low-poly mesh from Blender in X3D, and to copy the coord and texCoord sets.
Clone this wiki locally