Skip to content
Ciwb

Build

Detail

Once the big shapes are in, this is where a model gets its character: worn stone, moss in the corners, snow on the roof, a tidy symmetric hull. Ciwb has three ways to do it:

  • Operations, a stack of effects you preview and then apply (right panel).
  • Effect brushes, which paint a few of those effects exactly where you brush (left panel, Terrain brush).
  • Shaders, small programs that rewrite the voxels of an object (left panel).

Everything here is one undo step. Ctrl+Z puts it back.

Apply an operation

The Operations panel lives in the right panel, in the Model tab.

  1. Pick what it should change with the switch at the top: This object (it reads Selection when you have voxels selected) or All objects.
  2. Click Add operation.
  3. Browse by group (All, Shape, Transform, Colour, Weather, Generate) or type in the search box, for example "rotate", "mirror" or "noise". Hovering a tile shows a before and after picture, what it does and what you can adjust.
  4. Click the tile, or Add at the bottom of the preview. Pressing Enter in the search box adds the first match.
  5. With Preview in viewport on, you see the result on the model straight away. Nothing changes until you apply. "Updating…" shows while a big preview is worked out.
  6. Adjust the settings, then click Apply. Clear empties the stack without applying.

The Operations panel with two steps in the stack

The Add operation window with a before and after preview

The small label at the top right of the panel tells you exactly what Apply will change.

Build a stack

You can add several steps. They run top to bottom, each working on the result of the one before.

  • Drag a step by its grip to reorder it, or use Move up and Move down in its More menu (the three dots, or right-click the step).
  • The eye button turns a step off without removing it, so you can compare.
  • More also has Duplicate, Reset settings and Remove. The cross removes a step at once.

Strength and Fine-tune

The simpler effects (Erode, Grow, Smooth, Hollow, Remove floating bits, Noise shading, Height gradient, Crevices & edges, Darken, Lighten) show a five-dot Strength control instead of a page of sliders. Three dots is the default.

  • Click Fine-tune to see the detailed settings underneath.
  • The dice button picks a different random Variation. Effects with randomness have it; it's the quickest way to get a pattern you like.

Pick-one settings (such as From or Direction) always show, even without Fine-tune.

Do it again

  • After applying, the panel offers Reuse: … with the stack you just used. Click it to load the same steps back in to tweak.
  • Repeat Last Operation (Ctrl+Shift+R) applies the last applied stack again straight away. Handy for growing moss a bit further, or eroding in stages.
  • Repeat Last Action (Shift+R) repeats whatever you last did, operations included.

Save a recipe

A recipe is a named stack you can use again in any project, so the same weathering (moss, rust, snow, grime) can be reused on every model. It keeps the colours each step paints with.

  1. Build a stack.
  2. On the Recipes shelf, click the Save tile and type a name, for example "Mossy stone". Press Enter.
  3. Click a recipe's picture to open its steps in the stack. The play button on it applies it straight away.

Each recipe's picture is the recipe applied to a small stone block, so you can see what it does at a glance. Right-click a recipe (or use its More button) for Apply now, Open in stack (replace), Add to stack, Rename, Duplicate, Export… and Delete. Double-click a name to rename it.

Recipes are files: each one is a .ciwb-recipe in Documents\Ciwb\Recipes, so they're backed up and synced with the rest of your documents. The folder button on the shelf opens it. To share one, send the file, or use Export…. The import button reads recipe files, and you can also drag one onto the window or copy it into the folder.

Recipes list with its right-click menu

Shape operations

OperationWhat it doesSettings
ErodeWears away surface voxels at random, like weathered stone.From (All, Top, Bottom, Left, Right, Front, Back), Amount 0–100 %, Depth 1–6, Variation
GrowThickens the model by adding a layer around the surface.Direction (All, Up, Down, Left, Right, Front, Back), Layers 1–8, Coverage 5–100 %, Variation
SmoothRounds off blocky corners and fills small dents.Passes 1–6, Strength 1–5
HollowRemoves the inside, keeping a shell.Shell 1–16 voxels thick
Fill holesFills fully enclosed empty spaces inside the model.None
Remove floating bitsDeletes small loose clumps not connected to the main shape.Smaller than 1–500 voxels
EncaseWraps the model in a shell of the current colour.Thickness 1–4, Gap 0–4
Invert solid and emptyEmpty space becomes solid and solid becomes empty, inside the space box (or the selection's box). Good for moulds and caves.None
Fill the space boxFills every empty cell in the space box (or the selection's box) with the current colour. Start solid, then carve.None

Transform operations

These act on the selection if you have one, otherwise on the whole object.

OperationWhat it doesSettings
Make symmetricCopies one half onto the other so the model is perfectly symmetric.Axis, Keep (+ side or − side), Around (Space centre or Model centre)
Diagonal symmetryCopies the model across a diagonal, for example to make a corner piece match on both sides.Swap (X ↔ Z, X ↔ Y, Y ↔ Z)
RotateTurns the model by any angle around an axis.Axis, Angle −180° to 180° in 15° steps
ScaleResizes the model, evenly or stretched in one direction.Width, Height, Depth, each 10–400 %
FlipMirrors the model back-to-front along an axis.Axis
Shift with wrap-aroundSlides the model; whatever leaves one side of the space box comes back on the other. Good for tiling textures.Axis, Distance −128 to 128 voxels
RepeatPlaces copies side by side, like a fence or a tiled floor.Axis, Copies 2–16, Gap −16 to 32 voxels, Copies are (Same or Mirrored: every other copy flipped)

Scale and Repeat stop at 2 million voxels, so a slip of the slider can't freeze your computer. See Troubleshooting for the other limits.

Make a fence

  1. Model one post and rail section.
  2. Add operation → Repeat.
  3. Set Axis to X, Copies to 8 and Gap to 0, then Apply.

Colour operations

OperationWhat it doesSettings
Noise shadingVaries voxels lighter and darker for a hand-painted look.Strength 1–4, Blotch size 1–8, Variation
Height gradientDarker at the bottom, lighter at the top. A negative strength turns it the other way round.Strength −4 to 4
Crevices & edgesDarkens tucked-in voxels and lightens exposed edges, for depth.Crevices 0–4, Edges 0–4
DarkenShades voxels darker, like painting shadow.Shades 1–6
LightenShades voxels lighter, like painting highlights.Shades 1–6
OutlineLines colour borders in the current colour, or adds an outer shell.Mode (Inside line or Outer shell), Thickness 1–4

Darken and Lighten step through neighbouring shades in your palette, so they look best with a palette that has ramps of each colour. See Colour and materials.

Weather

Weather effects age and dress a model. They read the shape: moss sits on top faces, drips run from edges, snow settles on flat ground.

EffectWhat it doesSettings
RustRusty patches on exposed surfaces, strongest on edges and in creases.Amount 0–100 %, Patch size 1–8, Edge bias 0–100 %, Variation
Patina / GrimeDarkens or tints creases, undersides and tucked-away spots.Amount 0–100 %, Darkness 1–4, Colour (Darken or Tint), Spread 1–4
MossMoss on upward faces and low, shaded spots.Amount 0–100 %, Mode (Recolour or Add layer), Up bias 0–100 %, Variation
VinesHanging strands that creep down walls from top edges and overhangs.Density 1–100 %, Max length 1–40, Wiggle 0–100 %, Variation
SnowA blanket on top faces, deeper on flat ground. Skips water and glass.Depth 1–6, Coverage 0–100 %, Smoothness 0–100 %, Variation
GrassShort blades growing up from top faces.Density 1–100 %, Height 1–8, Height variation 0–100 %, Grow on (Any colour or Current colour), Variation
DripsDamp streaks running down from top edges.Count 1–100 %, Length 1–30, Colour (Darken or Paint), Variation
PlasterA coat of the current colour on walls, with worn gaps.Coverage 0–100 %, Variation
Gravity settleUnsupported voxels drop straight down until they land.Drop (Every voxel or Floating bits)

Age a stone wall

  1. Select the wall, or work on the whole object.
  2. Add operation → Erode, Strength 2.
  3. Add Patina / Grime, then Moss with Mode set to Add layer.
  4. Watch the preview, roll the dice on Moss until the patches sit nicely, then Apply.
  5. Save the stack as a recipe so the next wall matches.

Snow on a roof

  1. Add operation → Snow.
  2. Set Depth to 2 and Smoothness to about 70 % for soft drifts.
  3. Apply. Glass and water are left clear.

Make Grass or Moss only grow on the lawn

Pick the lawn colour in the palette first, then set Grass's Grow on to Current colour.

Generate operations

These build new voxels inside the space box (or the selection's box).

OperationWhat it doesSettings
Noise blobsSoft random blobs, like clouds, rock or terrain.Mode (Add, Carve or Keep inside), Blob size 2–32, Amount 1–99 %, Variation
MazeA random maze of walls across the floor of the space box, in the current colour.Path width 1–8, Wall height 1–64, Floor (No floor or With floor), Variation

Carve a cave

  1. Add Fill the space box to make a solid block.
  2. Add Noise blobs with Mode set to Carve and a large Blob size.
  3. Add Remove floating bits to tidy up, then Apply.

Paint an effect with a brush

Sometimes you want weathering in one spot, not everywhere. The Terrain brush has three actions that paint an effect where you brush:

ActionEffect
RoughenErode: wears the surface away, like weathered stone.
DarkenPaints shadows into cracks.
LightenPaints highlights, like sun-bleached edges.
  1. Pick the Terrain brush (key 6) in the left panel.
  2. Choose Roughen, Darken or Lighten.
  3. Set Size (1–64, or use [ and ]) and Strength (1–5). Roughen has a dice button for a new variation.
  4. Brush over the model. The effect is applied where you brushed when you let go.

The other Terrain actions are covered in Terrain and water.

Shaders

Shaders are small programs that look at every voxel of an object and decide what goes there. They can do things the built-in operations can't: grow terrain, run the Game of Life, slice a model, cover it in brick patterns. Ciwb reads the .txt voxel shader format, so the many shaders people have already written for it work here too.

The Shaders panel is in the left panel of the Model tab, below the brush settings. It starts folded; click its title to open it. It isn't shown in the World view.

Run a shader

  1. Open the Shaders panel.
  2. Pick a pack from the drop-down, or type in Search shaders. Searching looks through every pack and folder at once.
  3. Click a shader. Its settings appear underneath, named after the file's arguments.
  4. Turn on Live preview to see the result in the viewport before applying. On big objects you get a quick coarse preview first, then the full one once you stop moving sliders.
  5. Set Iterations (1–64) to run the shader several times, each pass working on the last one's result. Useful for growth and erosion shaders.
  6. Click Apply. It runs on the active object, or only the selection if you have one, as one undo step.

Defaults puts every value back to what the file says. If a shader has a problem, the error shows in red under the settings.

A heavy shader shows a progress bar while it runs. Click Cancel or press Esc to stop it.

The line at the bottom credits the shader's author and licence. Hover it to see the pack's web address.

The Shaders panel with Bricks selected and its settings showing

Which colours a shader uses

Many shaders paint with "the current colour". That's the colour picked in the palette. Some, like the Knife shaders, work on a set of chosen colours: those are your Vary colours if you've picked any, otherwise just the current colour. See Colour and materials for Vary.

The built-in packs

Three MIT-licensed packs come with Ciwb. In the drop-down they show as "Built in · …".

PackByGood for
Lachlan McDonaldLachlan McDonald (@lmcdx)Brush patterns (Bricks, Tiles, Weave, Truchet, Zigzag, Grid and more), Knife and Slice per axis, Flood, Erode, Encase, Cover, Heightmap
voxelShaderPatrick Seeber (@rubikow)Coating, outlines and other surface clean-ups
Eric's ShadersTianyu Huang (CodingEric)Terrain, Caves, Flow, Drop, Project down, Game of Life

File names are tidied for you, so brush_bricks_vert.txt shows as "Bricks (vertical)".

Keep favourites

Click the star beside any shader to add it to ★ Favourites. Once you have one, Favourites appears at the top of the drop-down and opens first next time. Click the star again to remove it.

Use your own shader folder

On the desktop app, Ciwb looks for shaders in Documents\Ciwb\Shaders. It makes the folder for you the first time.

  1. Drop .txt shader files into that folder. Sub-folders work too, up to three levels deep.
  2. Click the reload button in the Shaders panel header.
  3. Your files appear under My shaders in the drop-down, with sub-folders as "My shaders/Folder name".

To try a single file without copying it anywhere, click the folder button in the panel header (Open shader file (.txt)…). It shows under Opened for the rest of the session. A file without a map() function is turned away with a message.

Write your own shader

A shader file is plain text: a short header, then a GLSL function called map that returns the palette colour for one voxel. Ciwb calls it once for every cell in the object's space box. Return 0.0 for empty.

Here is the bundled Flood shader, which fills empty cells below a height with the current colour:

// xs flood [Height]
//
// xs_begin
// author : 'Your name'
// arg : { name = 'Height'  var = 'm_height'  range = '1 256'  value = '1'  step = '1'  precision = '0' }
// xs_end

float map(vec3 v) {
	float index = voxel(v);

	if (index == 0.0) {
		if (v.z < m_height) {
			return i_color_index;
		}
	}

	return index;
}

The header sits between // xs_begin and // xs_end:

  • author : '...' is shown in the credit line.
  • Each arg : { ... } line becomes a slider. name is its label, var is the variable name you use in the code, range is the minimum and maximum, value the default, step the slider step and precision the number of decimals. Older files that use id = '0' instead of var read the value from iArgs[0].
  • A copyright comment above the header mentioning "MIT License" or "CC BY-NC" is picked up as the licence.

What you can use in map:

NameWhat it is
vThe centre of the cell being worked out. Note that z is up in shader files.
voxel(v)The palette index already at a position (0 means empty; outside the box is 0).
palette(i)The colour of palette index i, as a vec4.
i_volume_sizeThe size of the space box.
i_color_indexThe current colour.
color_sel(n), i_num_color_selsThe chosen colours (see above) and how many there are.
i_iterWhich iteration is running.
i_mirror, i_axisWhether Mirror and Axis are on for X, Y and Z (1 or 0).
i_args[n]Argument values by index, for older files.

The older camel-case names (iVolumeSize, iColorIndex, iArgs and so on) work too.

Tips:

  • Write numbers as floats (1.0, not 1) where you can. Ciwb tries to fix bare whole numbers if the shader won't compile, but it's tidier not to rely on it.
  • Keep Live preview on while you write. Save the file, reload the folder, click the shader again, and you'll see the change.
  • Errors give a line number, counted from the top of your file.