SS UV Unwrapper

User guide — from a 3D model (.3ds or .obj from Blender, 3ds Max, Rhinoceros or any other 3D program) to a textured model in Serious Modeler (Serious Sam engine 1).

1. What the program does

Serious Modeler reads the texture mapping of a model in a special way: within one surface (material), every 3D position may have only one texture position. Models from ordinary 3D programs do not follow that rule, so in the Modeler you get blank faces (.obj) or strange overlapping faces (.3ds).

This program:

2. Quick start

  1. In your 3D program: export the model as .3ds (or .obj with “Y Up”). The program has mainly been tested with exports from Rhinoceros 2.0.
  2. File > New project from model (Ctrl+N), or drag the file onto the UV view.
  3. Choose the mapping (Unwrap exact for houses, crates, barrels; Unwrap smooth for characters) and the texture size.
  4. View > 3D preview / paint (Ctrl+3) and paint.
  5. File > Save project (Ctrl+S).
  6. File > Export to Serious Sam (Ctrl+E) into a subfolder of your Serious Sam folder, e.g. D:\Serious Sam TSE\MyModels\House\.
  7. In Serious Modeler: File > New, choose the .scr; then File > Add texture and choose the .tex.

3. The main window

On the left are the settings, on the right the UV view: the texture with the unfolded pieces. Every colour is a separate surface in Serious Modeler.

Mapping

Keep the UVs from the modelUses the mapping made in your 3D program and only splits it into surfaces.
Unwrap exact (hard-surface)Lays every group of faces flat at its real size. Best for angular models: houses, crates, barrels, cylinders.
Unwrap smooth (organic, LSCM)Unfolds round shapes with a little stretching, without holes. Best for characters and organic shapes.

Texture

Width and height of the texture in pixels (32 to 2048). Below it the size in meters that the model gets in the Modeler (the longest side is 2.00 m).

Unwrap

Max. angle between facesNeighbouring faces that bend less than this stay together in one piece; sharper bends become a seam.
Margin (pixels)Space between the pieces, so colours do not bleed into each other.
Max. stretch % (smooth)How much distortion a piece may have. Lower = less distortion but more pieces.
Rotate piecesNo / Lying pieces only (standing pieces keep “up” pointing up) / All (best use of the texture, slower).
MirrorNo / Left - right / Front - back / Up - down. For a symmetric model: only one half is unwrapped, the other half uses the same part of the texture, mirrored. See below.

Mirror (symmetric models)

Many models are the same on both sides: a character, a torch, a barrel, a car. With Mirror both halves share the same part of the texture:

Things to know:

Model

Up axisZ up for .3ds (Rhinoceros and 3ds Max write .3ds with Z up), Y up for .obj exported with “Y Up”. Is the model lying on its side or upside down? Choose the other option.
Combine pieces into fewer surfacesPuts pieces together in one surface where that is allowed, so you get fewer surfaces in the Modeler.
Unwrap per layerThe layers decide the layout: seams on layer borders, and every layer becomes a surface with the layer name.

Layout

As soon as you paint, the layout is locked: changing a setting would otherwise move the pieces under your painting. Change layout... unlocks it. Change the settings, then Lock layout: the painting is moved to the new layout automatically. Cancel goes back to the old layout.

Info

Number of triangles, pieces and surfaces, how much of the texture is used, and the largest distortion.

4. Projects and files

A project (.ssuv) holds everything: the original model from your 3D program, the settings, the locked layout, the texture, the layers, the stencil and the pattern. With File > Open you continue where you stopped.

Texture menu

5. The 3D window

Open it with View > 3D preview / paint (Ctrl+3).

Navigation (as in Serious Editor)

Top row

ViewTest pattern (shows stretching), Texture (your painting), Surface colours, Unwrap pieces, Layer colours.
New...New texture: one colour, a test pattern, or every surface in its own colour.
Import... / Export...Load or save the texture (same as the Texture menu).
Show edgesShows the triangle edges.

6. Painting and filling

Left mouse button paints, right mouse button picks a colour from the model (pipette). Ctrl+Z / Ctrl+Y = undo / redo (20 steps).

Tools

BrushPaint freely. Size in screen pixels, Opacity (coverage), Hardness (soft or sharp edge) and Tip:
  • Round — a normal round brush.
  • Sponge — porous blots, as if you dab with a sponge. Every dab is turned at random, so there is no visible repetition. Good for dirt, rust, moss.
  • Splatter — random drops of different sizes within the brush circle. Good for blood, paint spatter, mud. Hardness has no effect here.
  • Chalk — a grainy stroke, like chalk on rough paper. The grain stays in place on the screen, so the small gaps stay open when you paint over it again. Good for worn paint and stone.
Tip: use a low Opacity and paint several times for a natural build-up.
Fill triangleFills one triangle.
Fill flat faceFills a flat face (all touching triangles with the same direction).
Fill surfaceFills a whole surface.
Fill layerFills a whole layer (part of the model).
Assign layer: ...Puts triangles in the chosen layer: per triangle, flat face, connected part or with a brush. See Layers.

The highlighted (yellow) part shows what a fill tool will fill. A stroke over a seam paints on both sides, even when they lie far apart in the texture.

Paint with chooses where the colour comes from: Colour (the brush colour), Stencil or Pattern.

7. Layers

Layers are the parts of the model (e.g. head, shirt, trousers). They come from the objects in a .3ds or the groups in an .obj; otherwise everything is in “Default”. The list is on the right of the 3D window.

8. Stencil

A stencil is an image (logo, photo, text) that lies over the 3D view, as if you hold it in front of the model. With Paint with: Stencil the brush and fill tools take their colours from it; transparent parts are skipped.

9. Pattern

A pattern is a small seamless tile (denim, stone, wood) that repeats over the model. Load pattern..., then Paint with: Pattern.

Tile size (cm)The width of one tile on the model (1 Serious Sam unit = 1 meter). The height follows the proportions of the image, so a 128×64 image with tile size 50 cm becomes 50 × 25 cm.
RotateTurn the pattern 0°, 90°, 180° or 270°.
Pattern offset (right panel)Moves the pattern X % of a tile to the right and Y % up (negative = left / down), e.g. to centre a pattern on a long narrow face. Works for Triplanar and Anchor, after rotating too. Reset sets both back to 0.
Tint with brush colourColours the pattern with the brush colour (e.g. a grey weave becomes blue denim).
TriplanarThe pattern is projected from three sides (front, side, top) and blended. Runs without seams over the whole model: best for fabric, stone, wood. On slopes of 45° two projections mix.
Anchor (Shift+click)Shift+click on the model: the pattern is centred there and rolled out over the surface like a label on a bottle. “Up” is the top of the screen at the moment you click. Best for images on cylinders, barrels and curved parts. An orange cross marks the anchor. The roll-out stops at bends sharper than about 70° (e.g. the lid of a cylinder): set a new anchor there.

Settings only change what you paint or fill next; what is already painted stays as it is. To try another offset: Ctrl+Z, change the value, and fill again.

10. Export to Serious Sam

File > Export to Serious Sam (Ctrl+E). Save into a subfolder of the Serious Sam folder; this may be several folders deep, e.g. D:\Serious Sam TSE\MyFirstGame\Buildings\House\.

FileWhat
name.3dsThe model, with the surfaces and the mapping.
name.scrScript for Serious Modeler, with TEXTURE_DIM (size in meters).
name.tgaThe texture at full size.
name.texThe texture as a Serious Sam texture, with exactly the size the model expects (max. 1024 pixels).
name_uv.pngOptional: the UV layout as an image.

Which files are written is set in Tools > Preferences, together with the Serious Sam folder and autosave.

Padding: in the exported .tga and .tex the empty space between the pieces is filled with the edge colours of the pieces. Serious Sam blends neighbouring pixels (filtering, and smaller versions of the texture at a distance); without padding the background would leak into the edges as white seams. The texture in your project is not changed.

In Serious Modeler

  1. File > New and choose the .scr (not the .3ds, otherwise the Modeler asks to overwrite the script).
  2. File > Add texture and choose the .tex.
  3. Do not move surfaces separately in the Modeler: the layout is already done.
Without the .tex you can still use the old way: Create new texture from the .tga, with Size in meters equal to the size shown under Texture in the main window.

11. Mouse and keyboard

Main window

Ctrl+NNew project from model
Ctrl+OOpen
Ctrl+S / Shift+Ctrl+SSave project / save as
Ctrl+EExport to Serious Sam
Ctrl+33D preview / paint
Ctrl+PPreferences
F1 / Ctrl+HThis user guide
Ctrl+QQuit

3D window

Space + left dragRotate
Space + right dragMove
WheelZoom
Left mouse buttonPaint / fill / assign
Right mouse buttonPick colour (pipette)
Shift + clickSet the pattern anchor
Ctrl + drag / wheel / right dragMove / size / rotate the stencil
Ctrl+Z / Ctrl+YUndo / redo
Ctrl+SSave project

12. Tips and problems

13. Background: file formats

.3ds — Autodesk 3D Studio

The format of 3D Studio for DOS (Release 1, 1990 to Release 4, 1994). Rhinoceros, for example, writes version 3 (the header of the file says so), the format of 3D Studio Release 3 (1993); Release 4 uses the same format. From 3D Studio MAX (1996) on, Autodesk used its own .max format, but .3ds stayed as import/export format, and it still is in 3ds Max today.

The limits of that DOS era explain much of what this program does:

Serious Sam 1 (2001) reads .3ds through the Exploration3D library, so version 3 fits exactly.

.obj — Wavefront

The format of The Advanced Visualizer from Wavefront Technologies (late 1980s), described as “Object Files (.obj)” version 3.0. Wavefront merged with Alias in 1995 (Alias|Wavefront, which made Maya in 1998); Autodesk bought Alias in 2006. The format never changed after version 3.0.

OBJ is not really outdated: it is plain text, supports polygons with any number of corners, texture positions per face corner (seams without tricks), normals, groups and materials (.mtl). It is still used everywhere (Blender, Maya, 3ds Max, ZBrush, 3D printing).

The problem is not OBJ itself: the OBJ reader of Serious Modeler ignores the texture coordinates. That is why this program always exports .3ds.

.tex — Serious Sam 1 texture

Version 4 of the Serious Engine 1 texture format. Sizes are powers of 2, at most 1024 pixels. Serious Sam measures in mex: 1 meter = 1024 mex. The model calculates its mapping from TEXTURE_DIM in the .scr (2.0 m = 2048 mex) and divides it by the mex size of the texture when drawing. The two must be exactly equal; the exported .tex takes care of that.

How Serious Modeler reads the mapping

The Modeler finds the texture position of each corner by looking for the same 3D position within the same material. If one position has two texture positions in one material (a seam), it picks one of them and faces get stretched or overlap. That is why this program puts every seam on a border between two surfaces.

FormatOriginVersionStill common?
.3dsAutodesk 3D Studio (DOS)3 = Release 3/4, 1993–1994As exchange format only
.objWavefront Advanced Visualizer3.0, late 1980sYes, very much
.texCroteam, Serious Engine 14, 2001Serious Sam 1 only