# Clay Pot

> A lathe-turned terracotta vessel in three shapes: a tall two-handled amphora, a bulbous vase with a flared lip, or a squat lidded storage jar. Optional painted bands add an ancient Greek or Mediterranean touch. Great breakable loot pots for dungeons, temples, markets and villages.

![Clay Pot preview](https://codels.download/m/clay-pot.png)

Multi-view sheet (3/4, front, side, top): https://codels.download/m/clay-pot.sheet.png

## Facts

- Category: Props › Containers
- Size (W × H × D): 0.43 × 0.78 × 0.43 m — units are meters, +Y up, front faces +Z
- Origin: center of the base (y = 0)
- Triangles: 840 · Meshes: 6 · Materials: 3
- License: CC0-1.0 (Codels built-in)
- Tags: jar, pot, low-poly, stylized, ancient, egyptian, fantasy, medieval, desert, dungeon, village, adventure, rpg, container, decoration, prop, ceramic, round, mobile-friendly, parametric, color-orange, size-small, poly-low
- Page: https://codels.download/models/clay-pot

## Files

| Format | URL |
|---|---|
| three.js ES module (`createClayPot()`) | https://codels.download/m/clay-pot.js |
| React Three Fiber component (`<ClayPot />`) | https://codels.download/m/clay-pot.jsx |
| Instancing module (`createClayPotInstances(count, place)`, one draw call per material) | https://codels.download/m/clay-pot.instanced.js |
| Standalone HTML demo | https://codels.download/m/clay-pot.html |
| glTF binary | https://codels.download/m/clay-pot.glb |
| glTF binary, Meshopt-compressed (2–3× smaller; GLTFLoader needs `setMeshoptDecoder(MeshoptDecoder)`) | https://codels.download/m/clay-pot.glb?compress=meshopt |
| glTF JSON | https://codels.download/m/clay-pot.gltf |
| OBJ (vertex colors) + MTL | https://codels.download/m/clay-pot.obj · https://codels.download/m/clay-pot.mtl |
| STL | https://codels.download/m/clay-pot.stl |
| CodelSpec JSON | https://codels.download/m/clay-pot.json |

## Parameters

Append them as query parameters to any URL above to get a customized variant (e.g. `?shape=...`).

| Param | Type | Range / options | Default | Current |
|---|---|---|---|---|
| `shape` | select | amphora \| vase \| jar | amphora | amphora |
| `clay` | color | #rrggbb | #c0643a | #c0643a |
| `pattern` | boolean | true \| false | true | true |
| `paint` | color | #rrggbb | #2e2220 | #2e2220 |

## Parts

- body (lathe · clay)
- interior (lathe · inner)
- band1 (lathe · paint)
- band2 (lathe · paint)
- handleL (tube · clay)
- handleR (tube · clay)

## How to use

Save the code below as `clay-pot.js`, then:

```js
import { createClayPot } from './clay-pot.js';
const model = createClayPot();
scene.add(model);
```

## Code

```js
/**
 * Clay Pot — Codels 3D model library (https://codels.download/models/clay-pot)
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 840 · Size (W × H × D): 0.43 × 0.78 × 0.43 m
 *
 * Usage:
 *   import { createClayPot } from './clay-pot.js';
 *   
 *   const model = createClayPot();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

// Revolve a 2D profile [[radius, y], ...] around the Y axis.
function lathe(points, segments, phiStart = 0, phiLength = Math.PI * 2) {
  return new THREE.LatheGeometry(points.map(([x, y]) => new THREE.Vector2(x, y)), segments, phiStart, phiLength);
}

// Tube along a smooth curve through the given points.
function tube(path, radius, tubularSegments, radialSegments, closed = false) {
  const curve = new THREE.CatmullRomCurve3(path.map(([x, y, z]) => new THREE.Vector3(x, y, z)), closed);
  return new THREE.TubeGeometry(curve, tubularSegments, radius, radialSegments, closed);
}

export function createClayPot() {
  const root = new THREE.Group();
  root.name = 'ClayPot';

  // Materials
  const clayMat = new THREE.MeshStandardMaterial({ name: 'clay', color: 0xc0643a, roughness: 0.85, flatShading: true });
  const innerMat = new THREE.MeshStandardMaterial({ name: 'inner', color: 0x492616, roughness: 1, flatShading: true });
  const paintMat = new THREE.MeshStandardMaterial({ name: 'paint', color: 0x2e2220, roughness: 0.7, flatShading: true });

  // Parts
  const body = new THREE.Mesh(lathe([[0, 0.004], [0.075, 0], [0.078, 0.025], [0.05, 0.05], [0.07, 0.1], [0.15, 0.2], [0.2, 0.32], [0.215, 0.42], [0.2, 0.51], [0.14, 0.59], [0.08, 0.63], [0.068, 0.7], [0.075, 0.74], [0.098, 0.765], [0.09, 0.777], [0.078, 0.769]], 12), clayMat);
  body.name = 'body';
  root.add(body);
  const interior = new THREE.Mesh(lathe([[0.078, 0.769], [0.052, 0.725], [0.048, 0.645], [0, 0.645]], 12), innerMat);
  interior.name = 'interior';
  root.add(interior);
  const band1 = new THREE.Mesh(lathe([[0.1897, 0.3], [0.1957, 0.3], [0.204, 0.32], [0.2048, 0.325], [0.1988, 0.325]], 12), paintMat);
  band1.name = 'band1';
  root.add(band1);
  const band2 = new THREE.Mesh(lathe([[0.2047, 0.47], [0.2107, 0.47], [0.2057, 0.5], [0.1997, 0.5]], 12), paintMat);
  band2.name = 'band2';
  root.add(band2);
  const handleL = new THREE.Mesh(tube([[-0.07, 0.705, 0], [-0.15, 0.715, 0], [-0.19, 0.66, 0], [-0.185, 0.56, 0], [-0.165, 0.54, 0]], 0.017, 12, 5), clayMat);
  handleL.name = 'handleL';
  root.add(handleL);
  const handleR = new THREE.Mesh(tube([[0.07, 0.705, 0], [0.15, 0.715, 0], [0.19, 0.66, 0], [0.185, 0.56, 0], [0.165, 0.54, 0]], 0.017, 12, 5), clayMat);
  handleR.name = 'handleR';
  root.add(handleR);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createClayPot;
```

---
Codels — 3D models as code for three.js. Search more: https://codels.download/api/v1/models?q=<query> · Guide: https://codels.download/llms.txt
