Baltor Get started

Gallery / Mesh algorithms

Capsule with hemispherical caps

In your harnessMesh algorithmMIT

Build a capsule (a cylinder capped by two hemispheres) along Y with unit normals and UVs that follow the profile length. Use it for character colliders, pills and rounded rods.

Render of Capsule with hemispherical caps
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Entry points
capsule_profile, capsule, main
Parameters
radius, length, segments, cap_rings
Complexity
O(segments * cap_rings)
Axes
+Y up, metres

Limits. The equator rows are doubled (one ring for each hemisphere), so the straight part has exactly one row of quads. The seam and the pole vertices are duplicated for texture coordinates, so the mesh is closed after welding.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 202.3 KB
Licence
MIT
Declared effects
reads files, runs commands, writes files
Checked with
Godot 4.7.2, gl_compatibility, OpenGL 3 driver, Mesa llvmpipe under Xvfb
Checks
generator runs system python, generator runs verifier python, gltf strict structure, interpreters agree, example matches generator, godot headless gltf load, godot compatibility render
Techniques
Quarter-circle profile revolution, Arc-length texture parameter
Tags
primitive, capsule, collider, pill, hemisphere, texture coordinates
Identity
library.supply.creative_originals.de1a52a223ce40b40a15eba3.c79dab8f0c0eaff3
Version
c79dab8f0c0eaff3dc54bee00e426e36bf99599f2a7581806b3350dc5fd17a3f

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.