OBJ and MTL

OBJ is the plainest 3D format there is: text, read by nearly every 3D program. Its materials live in an MTL file beside it.

What WebUVs reads from an OBJ

  • Vertices (v) and UVs (vt).
  • Faces (f) of any number of corners. A quad, or a polygon of more sides, stays one face: it's split into triangles inside, but its inside edges are hidden and it's saved as the polygon it was.
  • Objects (o, or g groups), for the Objects list.
  • Materials (usemtl) for each face, and the MTL file it names (mtllib).

Normals, smoothing groups and lines aren't read, and aren't saved: WebUVs works on the UVs, and the model's shape stays as it is.

A file whose faces don't all have UVs opens with none, ready to unwrap: UVs on some faces only can't be laid out as one layout.

What it reads from an MTL

  • newmtl: each material, by name.
  • Kd: its color.
  • map_Kd: its texture's file name, and where it lies (the -o offset and -s scale options).
  • map_d: its opacity map.

Everything else in it, such as shine and bump maps, is passed over.

Saving

OBJ and MTL, under Download As, saves both: the OBJ with the UVs as they are now, each face's polygon as it was, by object and material; the MTL with each material's color, texture and opacity map. Open the textures beside them, as their names don't change.

An OBJ stands Y up. A model from a .3ds or .i3d is turned to stand so, at the animation's frame showing.