Surface Lab

Hands-on lesson covering textures, materials, and UV mapping on a hard-surface robot. Swap texture sets, tweak PBR parameters, and paint directly on the model.

0 / 12

YOUR EXPERIMENT

LIVE MATERIAL PREVIEW
ATLAS—07TRAINING UNIT / SHELL + FIXED TRIM
Drag to orbit · Scroll to zoom · Click to find a texel
— trianglesGeometry stays the same

The 3D view needs WebGL.

Open this page in a browser with graphics acceleration enabled.

Swap the character's texture set

Field guide

Mesh = shapeVertices and triangles describe the surface. A texture swap leaves those positions intact.
UVs = addressesEach mesh corner has a 2D coordinate. The renderer interpolates it across a triangle to look up texture data.
Textures = stored dataImages can hold color, directions, masks or other values—not just a photograph.
Material + shader = interpretationA material binds maps and settings; shader code uses them with lighting to produce the visible surface.

Game-asset workflow

01
Build a mesh and unwrap its UVs.

Mark suitable seams, flatten the surface into UV islands, reduce stretching, then pack the islands with padding.

02
Author a compatible texture set.

Paint base color and author normal, roughness and metalness maps against the same intended UV layout.

03
Connect the maps to their correct material inputs.

Base-color RGB uses sRGB; normal, roughness and metalness are data, not sRGB color. Check normal-map Y convention.

04
Import, assign and test in the target engine.

Verify scale, UV set, material slots, channel packing, transparency and texture compression.

05
Swap only what the new appearance needs.

A recolor may change only base color. Wet or worn variants may also need new surface maps.

What a texture swap cannot do

A painted buckle does not become protruding geometry. A normal map cannot extend the silhouette. A truly thicker coat or different hairstyle requires another mesh.

Troubleshooting

Eyes appear on the torsoThe atlas layout or selected UV set does not match.
Paint looks like bare chromeCheck the metalness mask, its channel, and any multiplier.
Dents look like bumpsCheck the tangent basis and normal-map Y/green convention.
Color is dark or washed outCheck color-space conversion and lighting.
Edges show colored seamsInspect UV padding, texture filtering, mip levels.
Every character changes at onceCheck whether they share the same mutable material or texture.

Sources & implementation

The lesson follows the metallic–roughness workflow. The teaching model, texture art, shaders and interface were created for this lesson. Everything runs locally with no external libraries.

Real 3D, real texture lookupsWebGL, or a CPU fallback, rasterizes actual rounded-box triangles. UVs address real generated image textures. Clicking uses ray–triangle intersections; painting updates the base-color image.
A deliberately simple atlasFour rows × six faces: head, body, arms, legs. Parts in the same row reuse UV space.
Lighting is a teaching approximationGGX-style direct lighting, metallic–roughness inputs and tangent-space normal mapping. Ambient/reflection is simplified.
Not a production pipelineNo skeletal rig, displacement, normal baking, UV editing, seamless 3D brush, GLB import or model export.

References

  1. Three.js — MeshStandardMaterial
  2. Khronos — A Simple Texture
  3. Khronos — Materials
  4. Khronos — glTF 2.0 spec, Materials
  5. Blender Manual — UV Operators
  6. Blender Manual — Texture Paint
  7. Khronos — Skins
  8. Three.js — Cleanup

Controls

On the focused 3D canvas: ← → orbit sideways; ↑ ↓ tilt; + − zoom; R reset camera; W toggle wireframe; P toggle paint.

Drag to orbit. Scroll or pinch to zoom. In Paint mode, drag to paint; hold Shift and drag to orbit instead.