clay
A warm putty surface with soft light, a little subsurface glow and darker creases. The clay render look.
Add the script once, then use the tags anywhere.
<script type="module" src="https://mmaxence.github.io/solids/solids.js"></script>
Or copy the library into your project: download solids.js from the repo and serve it yourself. No build step, no other files.
Options
| Attribute | Type | Default | Range | Description |
|---|---|---|---|---|
clay-light | number | 120 | 0 to 360 | Light azimuth (degrees) |
clay-warmth | number | 0.5 | 0 to 1 | Subsurface warmth |
Notes
The look of a clay render: the color is pulled toward a warm putty, light wraps softly around the shape, a warm glow shows through at the back and on thin edges, and creases darken with a cheap occlusion along the normal.
light(0 to 360, default 120): where the key light comes from, around the view.warmth(0 to 1, default 0.5): how much warm light shows through the material.
<sd-scene shading="clay">
<sd-shell color="color(display-p3 1 0.8 0.5)"></sd-shell>
</sd-scene>Put shading="clay" on a scene to shade every object in it, or on one object. Compare all shades on the Shades page.
License
MIT. Use it anywhere, credit appreciated.