Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concept-art/default-art-design-v1/source/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
WEB = PACK.parent.parent / "web" / "skins" / "guild"
BRAND = PACK.parent.parent / "web" / "brand"
GEN = Path("E:/projects/local-image-studio/scripts/gen.py")
PROVIDERS = ["anthropic", "docker", "google", "openai", "shell", "xai", "terminal-ai-chat"]
PROVIDERS = ["anthropic", "docker", "google", "openai", "shell", "xai", "terminal-ai-chat", "hermes"]
STATES = ["idle", "working", "locked"]
CHARACTER_WIDTH = 640
PROPS = {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concept-art/gnomeland-skin/source/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PACK = Path(__file__).resolve().parent.parent
WEB = PACK.parent.parent / "web" / "skins" / "gnomeland"
GEN = Path("E:/projects/local-image-studio/scripts/gen.py")
PROVIDERS = {"anthropic": "#dd7a3e", "openai": "#36b86f", "google": "#4d84e6", "xai": "#2cc3d3", "shell": "#9a6cf0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A"}
PROVIDERS = {"anthropic": "#dd7a3e", "openai": "#36b86f", "google": "#4d84e6", "xai": "#2cc3d3", "shell": "#9a6cf0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A", "hermes": "#0000F2"}
STATES = ["idle", "working", "locked"]
CHARACTER_WIDTH = 640
# The square around each provider's head in its idle art (1056×1408), for the provider icon.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concept-art/goblinville-skin/source/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PACK = Path(__file__).resolve().parent.parent
WEB = PACK.parent.parent / "web" / "skins" / "goblinville"
GEN = Path("E:/projects/local-image-studio/scripts/gen.py")
PROVIDERS = {"anthropic": "#dd7a3e", "openai": "#36b86f", "google": "#4d84e6", "xai": "#2cc3d3", "shell": "#9a6cf0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A"}
PROVIDERS = {"anthropic": "#dd7a3e", "openai": "#36b86f", "google": "#4d84e6", "xai": "#2cc3d3", "shell": "#9a6cf0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A", "hermes": "#0000F2"}
STATES = ["idle", "working", "locked"]
CHARACTER_WIDTH = 640
# The square around each provider's head in its idle art (1056×1408), for the provider icon.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concept-art/grove-skin/source/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PACK = Path(__file__).resolve().parent.parent
WEB = PACK.parent.parent / "web" / "skins" / "grove"
GEN = Path("E:/projects/local-image-studio/scripts/gen.py")
PROVIDERS = {"anthropic": "#d97757", "openai": "#4caf6e", "google": "#4a9be8", "xai": "#2fb8c6", "shell": "#9a7ae0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A"}
PROVIDERS = {"anthropic": "#d97757", "openai": "#4caf6e", "google": "#4a9be8", "xai": "#2fb8c6", "shell": "#9a7ae0", "docker": "#2496ed", "terminal-ai-chat": "#C8983A", "hermes": "#0000F2"}
STATES = ["idle", "working", "locked"]
CHARACTER_WIDTH = 640
# The square around each provider's head in its idle art (1056×1408), for the provider icon.
Expand Down
18 changes: 18 additions & 0 deletions concept-art/hermes-yard/ART.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Hermes Agent's wings

In every Yard, Hermes Agent's hall and character are the Shell's, finished
in white and Hermes blue (`#0000f2`) by the renderer, and the character wears
the wings of Hermes on its head. The wings are `web/yard/assets/hermes_wings.glb`.

They come from the Winged Orbital Hacker, the Shell piece of the Mount
Olympus community theme, made in Agent Guild: Builders and Agent Guild:
Studio (CC BY 4.0). `wings.mjs` cuts its head wings out, leaves the ankle
wings, colours the trim Hermes blue and records the head they were made for:

```sh
node concept-art/hermes-yard/wings.mjs <winged-hacker/character.glb>
```

The Yard fits them to each character's `Head` bone when it loads, measured
from the vertices that follow the head in the bind pose, so any world, and
any Shell piece with a `Head` bone, gets them without a model of its own.
97 changes: 97 additions & 0 deletions concept-art/hermes-yard/wings.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Cuts the head wings out of the Winged Orbital Hacker (the Mount Olympus
// theme's Shell piece) into web/yard/assets/hermes_wings.glb, the wings the
// Yard fits to the head of Hermes Agent's character in every world:
// node concept-art/hermes-yard/wings.mjs <winged-hacker/character.glb>
// The wings keep the positions they had on the hacker, in its bind pose, and
// the file records that head's bounds (extras.head) so the Yard can fit them
// to another head. The trim takes Hermes Agent's blue.
import { NodeIO, Document } from '@gltf-transform/core';
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
import { fileURLToPath } from 'node:url';

const source = process.argv[2];
if (!source) throw new Error('Usage: node concept-art/hermes-yard/wings.mjs <winged-hacker/character.glb>');
const out = fileURLToPath(new URL('../../web/yard/assets/hermes_wings.glb', import.meta.url));
const COLORS = { hermes_white: [0.893, 0.873, 0.813], hermes_trim: [0, 0, 0.887] }; // #0000f2, linear
const HEAD_WEIGHT = 0.5;

const io = new NodeIO().registerExtensions(ALL_EXTENSIONS);
const doc = await io.read(source);
const root = doc.getRoot();
const node = root.listNodes().find((n) => n.getMesh() && n.getSkin());
const skin = node.getSkin();
const head = skin.listJoints().findIndex((joint) => joint.getName() === 'Head');
if (head < 0) throw new Error('The character has no Head bone.');
const world = node.getWorldMatrix();
const apply = (m, [x, y, z], w = 1) => [
m[0] * x + m[4] * y + m[8] * z + m[12] * w,
m[1] * x + m[5] * y + m[9] * z + m[13] * w,
m[2] * x + m[6] * y + m[10] * z + m[14] * w,
];
// The share of a vertex that follows the head.
const onHead = (prim, i) => {
const joints = prim.getAttribute('JOINTS_0').getElement(i, []), weights = prim.getAttribute('WEIGHTS_0').getElement(i, []);
return joints.reduce((sum, joint, k) => sum + (joint === head ? weights[k] : 0), 0);
};

const box = { min: [Infinity, Infinity, Infinity], max: [-Infinity, -Infinity, -Infinity] };
const wings = [];
for (const prim of node.getMesh().listPrimitives()) {
const name = prim.getMaterial()?.getName();
const position = prim.getAttribute('POSITION');
if (name in COLORS) {
// Only wings that ride on the head; the ankle wings stay behind.
if (onHead(prim, 0) >= HEAD_WEIGHT) wings.push({ prim, name });
continue;
}
for (let i = 0; i < position.getCount(); i++) {
if (onHead(prim, i) < HEAD_WEIGHT) continue;
const p = apply(world, position.getElement(i, []));
for (let k = 0; k < 3; k++) { box.min[k] = Math.min(box.min[k], p[k]); box.max[k] = Math.max(box.max[k], p[k]); }
}
}
if (!wings.length) throw new Error('No head wings found.');

const outDoc = new Document();
const buffer = outDoc.createBuffer();
const materials = {};
for (const [name, color] of Object.entries(COLORS)) {
materials[name] = outDoc.createMaterial(name).setBaseColorFactor([...color, 1]).setMetallicFactor(0)
.setRoughnessFactor(name === 'hermes_trim' ? 0.5 : 0.75).setDoubleSided(true);
}
// One anchor for each side, an empty node placed at the wing's root (its point
// nearest the head's middle, at its own height and depth) so the Yard and the
// Professional render can move the root and scale the wing about it. The
// geometry hangs from the anchor on a child node, as each hall's does: the
// Yard optimizer rewrites a mesh node's transform when it quantizes it, and
// leaves the anchor as it is.
const wingRoot = outDoc.createNode('hermes_wings').setExtras({ head: box });
const mid = box.min.map((v, k) => (v + box.max[k]) / 2);
for (const side of [1, -1]) {
const parts = wings.filter(({ prim }) => Math.sign(apply(world, prim.getAttribute('POSITION').getElement(0, []))[0] - mid[0]) === side);
const lo = [Infinity, Infinity, Infinity], hi = [-Infinity, -Infinity, -Infinity];
for (const { prim } of parts) {
const position = prim.getAttribute('POSITION');
for (let i = 0; i < position.getCount(); i++) apply(world, position.getElement(i, [])).forEach((v, k) => { lo[k] = Math.min(lo[k], v); hi[k] = Math.max(hi[k], v); });
}
const anchor = [side > 0 ? lo[0] : hi[0], (lo[1] + hi[1]) / 2, (lo[2] + hi[2]) / 2];
const mesh = outDoc.createMesh(side > 0 ? 'wing_left' : 'wing_right');
for (const { prim, name } of parts) {
const copy = (attribute, map) => {
const array = new Float32Array(attribute.getCount() * 3);
for (let i = 0; i < attribute.getCount(); i++) array.set(map(attribute.getElement(i, [])), i * 3);
return outDoc.createAccessor().setType('VEC3').setArray(array).setBuffer(buffer);
};
const out = outDoc.createPrimitive().setMaterial(materials[name])
.setAttribute('POSITION', copy(prim.getAttribute('POSITION'), (p) => apply(world, p).map((v, k) => v - anchor[k])));
const normal = prim.getAttribute('NORMAL');
if (normal) out.setAttribute('NORMAL', copy(normal, (n) => { const v = apply(world, n, 0), l = Math.hypot(...v) || 1; return v.map((c) => c / l); }));
const indices = prim.getIndices();
if (indices) out.setIndices(outDoc.createAccessor().setType('SCALAR').setArray(new Uint32Array(indices.getArray())).setBuffer(buffer));
mesh.addPrimitive(out);
}
wingRoot.addChild(outDoc.createNode(mesh.getName()).setTranslation(anchor).addChild(outDoc.createNode(mesh.getName() + '_mesh').setMesh(mesh)));
}
outDoc.createScene('hermes_wings').addChild(wingRoot);
await io.write(out, outDoc);
console.log(`${wings.length} wing parts; head ${box.min.map((v) => v.toFixed(3))} to ${box.max.map((v) => v.toFixed(3))}; wrote ${out}`);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concept-art/orbital-skin/source/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PACK = Path(__file__).resolve().parent.parent
WEB = PACK.parent.parent / "web" / "skins" / "orbital"
GEN = Path("E:/projects/local-image-studio/scripts/gen.py")
PROVIDERS = {"anthropic": "#e0835f", "openai": "#1fd08f", "google": "#5b9cff", "xai": "#38d6e8", "shell": "#a67cf6", "docker": "#2496ed", "terminal-ai-chat": "#C8983A"}
PROVIDERS = {"anthropic": "#e0835f", "openai": "#1fd08f", "google": "#5b9cff", "xai": "#38d6e8", "shell": "#a67cf6", "docker": "#2496ed", "terminal-ai-chat": "#C8983A", "hermes": "#0000F2"}
STATES = ["idle", "working", "locked"]
CHARACTER_WIDTH = 640
# The square around each provider's head in its idle art (1056×1408), for the provider icon.
Expand Down
66 changes: 58 additions & 8 deletions concept-art/professional-skin/source/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
EXTRA = {'empty': '#a3adbd'}
# Polished metal instead of glass; locked is tarnished instead of frosted.
METAL = {'terminal-ai-chat': {'color': '#ffd98a', 'locked': '#8a744a'}}
# White porcelain that glows Hermes blue, with the wings of Hermes (the Yard's, from
# web/yard/assets/hermes_wings.glb); locked is dull grey and glows nothing.
PORCELAIN = {'hermes': {'color': '#f2f4f8', 'glow': '#0000f2', 'locked': '#aeb3bd'}}
WINGS = PACK.parent.parent / 'web' / 'yard' / 'assets' / 'hermes_wings.glb'
WING_COLORS = {'hermes_white': (0.893, 0.873, 0.813), 'hermes_trim': (0, 0, 0.887)}
# The world is not seen, but the glass reflects it: bright and white for light, deep slate for dark.
THEMES = {
'light': {'top': '#ffffff', 'bottom': '#e9edf3', 'tint': 0.08, 'world': 1.0, 'key': 1400, 'fill': 350, 'rim': 500, 'glass': 1.0},
Expand Down Expand Up @@ -122,6 +127,30 @@ def hero_shell():
hero_terminal_ai_chat = hero_shell


def hero_hermes():
# The shell's cube with a wing on each upper side, swept up and back.
parts = hero_shell()
before = set(bpy.data.objects)
bpy.ops.import_scene.gltf(filepath=str(WINGS))
imported = [o for o in bpy.data.objects if o not in before]
# Each wing's anchor (an empty) is placed; its mesh hangs below it with the
# transform the Yard optimizer may have given it, which stays as it is.
anchors = [o for o in imported if o.type == 'EMPTY' and o.name.startswith(('wing_left', 'wing_right'))]
for o in anchors:
side = 1 if o.name.startswith('wing_left') else -1
o.parent = None
# Turned to face the camera, so each wing sweeps out to its side.
o.location = (side * 0.8, 0.1, 1.5)
o.rotation_mode = 'XYZ'
o.rotation_euler = (0, math.radians(side * 10), math.radians(side * -62))
o.scale = (2.4, 2.4, 2.4)
parts += [o, *o.children_recursive]
for o in imported:
if o not in parts:
bpy.data.objects.remove(o)
return parts


def hero_empty():
# A blank tile standing at a slant.
return [cube((2.1, 0.12, 1.4), (0, 0, 0.72), (0, 0, -22), bevel=0.05)]
Expand All @@ -133,7 +162,7 @@ def hero_docker():


heroes = {}
for tool in {**TOOLS, **EXTRA, **METAL}:
for tool in {**TOOLS, **EXTRA, **METAL, **PORCELAIN}:
col = bpy.data.collections.new(tool)
scene.collection.children.link(col)
for o in globals()[f'hero_{tool.replace("-", "_")}']():
Expand All @@ -152,7 +181,8 @@ def hero_docker():
gnode = glass.node_tree.nodes['Principled BSDF']
for col in heroes.values():
for o in col.objects:
o.data.materials.append(glass)
if o.type == 'MESH' and not o.data.materials:
o.data.materials.append(glass)
fmat = bpy.data.materials.new('floor')
fmat.use_nodes = True
fnode = fmat.node_tree.nodes['Principled BSDF']
Expand Down Expand Up @@ -199,14 +229,17 @@ def light(name, loc, size):

def render(tool, theme, state):
th, st = THEMES[theme], STATES[state]
metal = METAL.get(tool)
color = rgb(metal[state if state == 'locked' else 'color'] if metal else LOCKED if state == 'locked' else {**TOOLS, **EXTRA}[tool])
metal, porcelain = METAL.get(tool), PORCELAIN.get(tool)
finish = metal or porcelain
color = rgb(finish[state if state == 'locked' else 'color'] if finish else LOCKED if state == 'locked' else {**TOOLS, **EXTRA}[tool])
# The colour the world, floor and rim light take on: the glow for porcelain.
light_color = rgb(porcelain['glow']) if porcelain and state != 'locked' else color
for name, col in heroes.items():
col.hide_render = col.hide_viewport = name != tool
ramp.color_ramp.elements[0].color = (*mix(rgb(th['bottom']), color, th['tint']), 1)
ramp.color_ramp.elements[1].color = (*mix(rgb(th['top']), color, th['tint'] * 0.5), 1)
ramp.color_ramp.elements[0].color = (*mix(rgb(th['bottom']), light_color, th['tint']), 1)
ramp.color_ramp.elements[1].color = (*mix(rgb(th['top']), light_color, th['tint'] * 0.5), 1)
wbg.inputs['Strength'].default_value = th['world']
fnode.inputs['Base Color'].default_value = (*mix(rgb(th['bottom']), color, th['tint']), 1)
fnode.inputs['Base Color'].default_value = (*mix(rgb(th['bottom']), light_color, th['tint']), 1)
fnode.inputs['Roughness'].default_value = 0.5 if theme == 'light' else 0.4
frosted = state == 'locked'
gnode.inputs['Base Color'].default_value = (*color, 1)
Expand All @@ -222,12 +255,29 @@ def render(tool, theme, state):
gnode.inputs['Roughness'].default_value = 0.45 if frosted else 0.18
gnode.inputs['Coat Weight'].default_value = 0 if frosted else 0.4
gnode.inputs['Emission Strength'].default_value *= 0.5
if porcelain:
# Locked, the wings go the same dull grey as the cube.
for wing in ('hermes_white', 'hermes_trim'):
bsdf = bpy.data.materials[wing].node_tree.nodes['Principled BSDF']
bsdf.inputs['Base Color'].default_value = (*(color if frosted else WING_COLORS[wing]), 1)
gnode.inputs['Transmission Weight'].default_value = 0
gnode.inputs['Roughness'].default_value = 0.5 if frosted else 0.22
gnode.inputs['Coat Weight'].default_value = 0 if frosted else 0.8
gnode.inputs['Subsurface Weight'].default_value = 0.15
gnode.inputs['Emission Color'].default_value = (*light_color, 1)
gnode.inputs['Emission Strength'].default_value = st['glow'] * (0.6 if theme == 'light' else 1.6)
key.data.energy = th['key'] * (1.8 if metal and theme == 'dark' else 1)
fill.data.energy = th['fill']
if metal and theme == 'light':
wbg.inputs['Strength'].default_value = th['world'] * 0.3
if porcelain and theme == 'light':
# White on a white card needs the world dimmer, so its sides shade.
wbg.inputs['Strength'].default_value = th['world'] * 0.45
rim.data.energy = th['rim'] * (min(st['rim'], 1.4) if theme == 'light' else st['rim'])
rim.data.color = mix([1, 1, 1], color, 0.6)
rim.data.color = mix([1, 1, 1], light_color, 0.6)
if porcelain:
# The rim light is Hermes blue, strong enough to edge the white in blue.
rim.data.energy *= 1.6
out = out_dir / tool / f'{theme}-{state}.png'
out.parent.mkdir(parents=True, exist_ok=True)
scene.render.filepath = str(out)
Expand Down
2 changes: 1 addition & 1 deletion config/providers.optional.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"homeVar": "HERMES_HOME",
"profiles": "hermes",
"resumeArgs": ["--resume", "{id}"],
"color": "#8B5CF6",
"color": "#0000F2",
"monogram": "H",
"install": "curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash",
"docs": "https://hermes-agent.nousresearch.com/docs",
Expand Down
Loading
Loading