ue-mcp-tripo 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -4
- package/dist/shared/glb.d.ts +55 -0
- package/dist/shared/glb.js +107 -0
- package/dist/shared/glb.js.map +1 -0
- package/dist/shared/loadouts.d.ts +1 -1
- package/dist/shared/loadouts.js +1 -0
- package/dist/shared/loadouts.js.map +1 -1
- package/dist/shared/pricing.d.ts +51 -0
- package/dist/shared/pricing.js +153 -0
- package/dist/shared/pricing.js.map +1 -0
- package/dist/tasks/Generate.d.ts +87 -0
- package/dist/tasks/Generate.js +321 -25
- package/dist/tasks/Generate.js.map +1 -1
- package/knowledge/tripo.md +7 -2
- package/package.json +1 -1
- package/skills/cli/SKILL.md +7 -2
- package/ue-mcp.plugin.yml +12 -4
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ tripo make "a stylized knight in plate armor" --for anim
|
|
|
50
50
|
|
|
51
51
|
Defaults are the cheapest the CLI can price: model H3.1, GLB output and no PBR (`pbr=true` turns it on), the same as Tripo's own guidance. The plugin deliberately does not follow the Tripo skill's rule of defaulting to P2. A premium model, `texture_quality=detailed` or `geometry_quality=detailed` is used only when you pass it through `model` or `params`. GLB is the default because the FBX conversion produced tiny scale and cracked meshes that the same task as GLB did not have.
|
|
52
52
|
|
|
53
|
-
The result lists the settings used
|
|
53
|
+
The result lists the settings used, the credit estimate, the Tripo task ids and the credits spent. `creditEstimate.credits` is the total for every step the job runs: generation as the CLI prices it, and smartsegment, rig, retarget, texture and convert at Tripo's [list prices](https://developers.tripo3d.com/en/pricing). `creditEstimate.steps` gives each step's price, and a step without a known price (such as `decimate`) appears there as `{ step, credits: null, unpriced: true }`, which makes the total a minimum, as the message says. For example, a rigged, segmented character from a turnaround with the `humanoid` loadout costs 120 credits: 40 for generation, 55 for smartsegment and 25 for the rig. The finished result's `creditsBreakdown` lists every task that was billed, with its step and the estimate for that step beside what it cost. The raw GLB and `preview.png` are saved to the job folder with `tripo task get --download`, and the result gives their paths and when Tripo's download links expire. If the import cannot run, for example when ue-mcp does not give the plugin access to `asset(import_model)`, the call still succeeds with `status=generated` and the ready `asset(action="import_model", ...)` call to make next.
|
|
54
54
|
|
|
55
55
|
| Option | Effect |
|
|
56
56
|
|---|---|
|
|
@@ -60,8 +60,9 @@ The result lists the settings used and the credit estimate (generation only; rig
|
|
|
60
60
|
| `animation` | One preset animation, such as `walk`. |
|
|
61
61
|
| `format=fbx` | Adds `convert:fbx` as the last step. The default is `glb`. |
|
|
62
62
|
| `params`, `model`, `then` | Extra `-p key=value` pairs, a generation model, or a replacement `--then` chain. |
|
|
63
|
-
| `dryRun=true` | Returns the settings and the credit estimate without spending anything. |
|
|
63
|
+
| `dryRun=true` | Returns the settings and the job's total credit estimate without spending anything. |
|
|
64
64
|
| `prepareImages=false` | Sends multiview images as they are instead of preparing them. |
|
|
65
|
+
| `fitTo` | Fits the rigged model onto a project skeleton instead of importing it on its own. See [Fitting to a project skeleton](#fitting-to-a-project-skeleton). |
|
|
65
66
|
| `place`, `location`, `destination`, `name`, ... | Passed to `asset(import_model)`. |
|
|
66
67
|
|
|
67
68
|
### Loadouts
|
|
@@ -92,11 +93,36 @@ ue-mcp:
|
|
|
92
93
|
environment: null
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
Fields: `model`, `rig`, `rigType`, `spec`, `animation`, `pbr`, `format`, `segmentHint`, `faceLimit`, `textureQuality`, `params`, `then`, and the import options `kind`, `destination`, `importMaterials`, `importTextures`, `importAnimations`, `createPhysicsAsset`, `nanite`, `place`, `onConflict` and `save`, plus `description` and `guidance` text. Loadouts need ue-mcp 1.4.16-beta.12 or later.
|
|
96
|
+
Fields: `model`, `rig`, `rigType`, `spec`, `animation`, `pbr`, `format`, `segmentHint`, `fitTo`, `faceLimit`, `textureQuality`, `params`, `then`, and the import options `kind`, `destination`, `importMaterials`, `importTextures`, `importAnimations`, `createPhysicsAsset`, `nanite`, `place`, `onConflict` and `save`, plus `description` and `guidance` text. Loadouts need ue-mcp 1.4.16-beta.12 or later.
|
|
96
97
|
|
|
97
98
|
### Separating garments
|
|
98
99
|
|
|
99
|
-
`segmentHint="poncho, body"` (also a loadout field) separates parts that generation fused. make's `--then` chain has no smartsegment step, so after generating, the plugin runs `tripo mesh smartsegment` on the raw GLB with the hint, then rigs the segmented model with the usual chain. Plain `mesh segment` fused a poncho that smartsegment separated. It costs 55 credits at list price
|
|
100
|
+
`segmentHint="poncho, body"` (also a loadout field) separates parts that generation fused. make's `--then` chain has no smartsegment step, so after generating, the plugin runs `tripo mesh smartsegment` on the raw GLB with the hint, then rigs the segmented model with the usual chain. Plain `mesh segment` fused a poncho that smartsegment separated. It costs 55 credits at list price, which the estimate includes along with the rig of the segmented model. It is off by default, and cannot be combined with `task` or `then`. The result's `segmentation` block has the hint, task id, credits and smartsegment's part labels (`labels`). The result's `parts` lists each part of the imported model as `{ node, label, material, bounds, verts, tris }`, with bounds in meters on glTF axes (Y up). Tripo names the parts `tripo_part_0` onwards and keeps those names and their order through the rig. smartsegment does not say which label belongs to which part, and in real jobs the label order differed from the part order, so the plugin leaves the nodes named as they are and sets each `label` to null. Match labels to parts by their bounds, and find a part's Unreal section by its material. Tripo rescales a file it re-imports for rigging; the result warns with the factor when it is not 1. If a stage fails, the call still succeeds with the model it has and a warning.
|
|
101
|
+
|
|
102
|
+
### Fitting to a project skeleton
|
|
103
|
+
|
|
104
|
+
A `spec=unreal` rig has the mannequin's bone names but its own bone frames, size (1 m) and forward axis (+X), so it cannot play the project's mannequin animations or join the project skeleton as it is. `fitTo` fixes that after rigging: generate passes the rigged model to ue-mcp's `asset(fit_rigged_mesh_to_skeleton)`, which imports it as SkeletalMeshes on the project skeleton in place of `asset(import_model)`.
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
tripo(action="generate", loadout="humanoid", views={...}, segmentHint="poncho, body",
|
|
108
|
+
fitTo={ referenceMesh: "/Game/Characters/Mannequins/Meshes/SKM_Manny",
|
|
109
|
+
targetSkeleton: "/Game/Characters/Mannequins/Meshes/SK_Mannequin",
|
|
110
|
+
targetHeight: "match" })
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
| Field | Meaning |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `referenceMesh` | A SkeletalMesh on the project skeleton. Required. |
|
|
116
|
+
| `targetSkeleton` | That mesh's Skeleton, which the fitted meshes use. Required. |
|
|
117
|
+
| `targetHeight` | `"match"` (default) takes the reference mesh's height, `"source"` keeps the model's, and a number is the height in cm. |
|
|
118
|
+
| `pieceNodes` | Splits the model into several meshes: `{ Body: ["tripo_part_0"], Poncho: ["tripo_part_3", "tripo_part_4"] }`. Leave it out for one mesh. |
|
|
119
|
+
| `destination` | Content folder for the fitted meshes. Defaults to generate's `destination`. |
|
|
120
|
+
| `namePrefix` | Defaults to `SKM_`, which names one mesh `SKM_<name>`, or `SKM_<name>_` with pieces, which gives `SKM_<name>_Body`. |
|
|
121
|
+
| `replaceExisting` | Replaces a mesh already at an output path when nothing references it. Defaults to false. |
|
|
122
|
+
|
|
123
|
+
`pieceNodes` names each part by its GLB node (`tripo_part_N`) or its material slot (`Material_tripo_part_N`). smartsegment's labels cannot be used there, because nothing in its output ties a label to a part. The node numbers differ between jobs, so the usual route is to generate without `pieceNodes`, identify the parts from their bounds in the result's `parts` (hair highest, feet lowest), and run the result's `fit.call` again with `pieceNodes` added. A fit job lists `parts` even when it was not segmented. The dry run warns about a name that does not look like a part name, and the fit refuses a name the model does not have, so check the names before spending credits.
|
|
124
|
+
|
|
125
|
+
The fit runs in the editor and costs no Tripo credits; the dry run lists it as a step at 0 credits along with the call it will make. The result's `fit` block has the fitted `assets` (each with its `piece`, `assetPath` and `skeleton`), `finalHeightCm` and the fit `report`, which includes `jointErrorSummary.maxErrorCm`, `unmatchedWeightGroups` and `placedBones`. The fit needs ue-mcp 1.4.16-beta.16 or later. When it cannot run, because ue-mcp is older or the fit refused the input, the rigged model is imported as it is and the call still succeeds, with a warning and the ready call in `fitCall`. `fitTo` also works as a loadout field, so a project can name its skeleton once.
|
|
100
126
|
|
|
101
127
|
### Garments as cloth
|
|
102
128
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface GlbPart {
|
|
2
|
+
/** The node's name, e.g. tripo_part_3. */
|
|
3
|
+
node: string;
|
|
4
|
+
/** The material of the node's first primitive; Unreal names the mesh section after it. */
|
|
5
|
+
material?: string;
|
|
6
|
+
/** Model-space bounds in meters, glTF axes (Y up). */
|
|
7
|
+
bounds: {
|
|
8
|
+
min: [number, number, number];
|
|
9
|
+
max: [number, number, number];
|
|
10
|
+
};
|
|
11
|
+
verts: number;
|
|
12
|
+
tris: number;
|
|
13
|
+
}
|
|
14
|
+
interface GltfNode {
|
|
15
|
+
name?: string;
|
|
16
|
+
mesh?: number;
|
|
17
|
+
skin?: number;
|
|
18
|
+
children?: number[];
|
|
19
|
+
matrix?: number[];
|
|
20
|
+
translation?: number[];
|
|
21
|
+
rotation?: number[];
|
|
22
|
+
scale?: number[];
|
|
23
|
+
}
|
|
24
|
+
interface Gltf {
|
|
25
|
+
scenes?: Array<{
|
|
26
|
+
nodes?: number[];
|
|
27
|
+
}>;
|
|
28
|
+
scene?: number;
|
|
29
|
+
nodes?: GltfNode[];
|
|
30
|
+
meshes?: Array<{
|
|
31
|
+
name?: string;
|
|
32
|
+
primitives: Array<{
|
|
33
|
+
attributes: Record<string, number>;
|
|
34
|
+
indices?: number;
|
|
35
|
+
material?: number;
|
|
36
|
+
mode?: number;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
accessors?: Array<{
|
|
40
|
+
count: number;
|
|
41
|
+
min?: number[];
|
|
42
|
+
max?: number[];
|
|
43
|
+
}>;
|
|
44
|
+
materials?: Array<{
|
|
45
|
+
name?: string;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
/** The glTF JSON of a .glb file. */
|
|
49
|
+
export declare function readGltfJson(file: string): Gltf;
|
|
50
|
+
/**
|
|
51
|
+
* Every mesh node of the GLB's scene, in node order. A skinned node's own
|
|
52
|
+
* transform is ignored, as glTF specifies, so its bounds are the bind pose.
|
|
53
|
+
*/
|
|
54
|
+
export declare function readGlbParts(file: string): GlbPart[];
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the parts of a GLB: each node that carries a mesh, with its material,
|
|
3
|
+
* vertex and triangle counts and its bounds. Only the JSON chunk is read; the
|
|
4
|
+
* counts and bounds come from the accessors' count, min and max, which glTF
|
|
5
|
+
* requires on POSITION.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
/** The glTF JSON of a .glb file. */
|
|
9
|
+
export function readGltfJson(file) {
|
|
10
|
+
const buf = readFileSync(file);
|
|
11
|
+
if (buf.length < 20 || buf.readUInt32LE(0) !== 0x46546c67)
|
|
12
|
+
throw new Error(`${file} is not a GLB`);
|
|
13
|
+
const len = buf.readUInt32LE(12);
|
|
14
|
+
if (buf.readUInt32LE(16) !== 0x4e4f534a)
|
|
15
|
+
throw new Error(`${file} has no JSON chunk first`);
|
|
16
|
+
return JSON.parse(buf.subarray(20, 20 + len).toString("utf8"));
|
|
17
|
+
}
|
|
18
|
+
const IDENTITY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
19
|
+
/** Column-major 4x4 multiply, a * b. */
|
|
20
|
+
function mul(a, b) {
|
|
21
|
+
const o = new Array(16).fill(0);
|
|
22
|
+
for (let c = 0; c < 4; c++)
|
|
23
|
+
for (let r = 0; r < 4; r++)
|
|
24
|
+
for (let k = 0; k < 4; k++)
|
|
25
|
+
o[c * 4 + r] += a[k * 4 + r] * b[c * 4 + k];
|
|
26
|
+
return o;
|
|
27
|
+
}
|
|
28
|
+
function localMatrix(n) {
|
|
29
|
+
if (n.matrix?.length === 16)
|
|
30
|
+
return n.matrix;
|
|
31
|
+
const [tx, ty, tz] = n.translation ?? [0, 0, 0];
|
|
32
|
+
const [x, y, z, w] = n.rotation ?? [0, 0, 0, 1];
|
|
33
|
+
const [sx, sy, sz] = n.scale ?? [1, 1, 1];
|
|
34
|
+
return [
|
|
35
|
+
(1 - 2 * (y * y + z * z)) * sx, 2 * (x * y + z * w) * sx, 2 * (x * z - y * w) * sx, 0,
|
|
36
|
+
2 * (x * y - z * w) * sy, (1 - 2 * (x * x + z * z)) * sy, 2 * (y * z + x * w) * sy, 0,
|
|
37
|
+
2 * (x * z + y * w) * sz, 2 * (y * z - x * w) * sz, (1 - 2 * (x * x + y * y)) * sz, 0,
|
|
38
|
+
tx, ty, tz, 1,
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
const round = (v) => Math.round(v * 1e4) / 1e4 + 0; // + 0 turns -0 into 0
|
|
42
|
+
function transformBox(m, min, max) {
|
|
43
|
+
const lo = [Infinity, Infinity, Infinity];
|
|
44
|
+
const hi = [-Infinity, -Infinity, -Infinity];
|
|
45
|
+
for (let i = 0; i < 8; i++) {
|
|
46
|
+
const p = [i & 1 ? max[0] : min[0], i & 2 ? max[1] : min[1], i & 4 ? max[2] : min[2]];
|
|
47
|
+
for (let r = 0; r < 3; r++) {
|
|
48
|
+
const v = m[r] * p[0] + m[4 + r] * p[1] + m[8 + r] * p[2] + m[12 + r];
|
|
49
|
+
lo[r] = Math.min(lo[r], v);
|
|
50
|
+
hi[r] = Math.max(hi[r], v);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return { min: lo.map(round), max: hi.map(round) };
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Every mesh node of the GLB's scene, in node order. A skinned node's own
|
|
57
|
+
* transform is ignored, as glTF specifies, so its bounds are the bind pose.
|
|
58
|
+
*/
|
|
59
|
+
export function readGlbParts(file) {
|
|
60
|
+
const j = readGltfJson(file);
|
|
61
|
+
const nodes = j.nodes ?? [];
|
|
62
|
+
const parts = [];
|
|
63
|
+
const roots = j.scenes?.[j.scene ?? 0]?.nodes ?? nodes.map((_, i) => i);
|
|
64
|
+
const world = new Map();
|
|
65
|
+
const walk = (i, parent) => {
|
|
66
|
+
const m = mul(parent, localMatrix(nodes[i]));
|
|
67
|
+
world.set(i, m);
|
|
68
|
+
for (const c of nodes[i].children ?? [])
|
|
69
|
+
walk(c, m);
|
|
70
|
+
};
|
|
71
|
+
for (const r of roots)
|
|
72
|
+
walk(r, IDENTITY);
|
|
73
|
+
nodes.forEach((n, i) => {
|
|
74
|
+
if (n.mesh == null || !world.has(i))
|
|
75
|
+
return;
|
|
76
|
+
const mesh = j.meshes?.[n.mesh];
|
|
77
|
+
if (!mesh)
|
|
78
|
+
return;
|
|
79
|
+
let verts = 0;
|
|
80
|
+
let tris = 0;
|
|
81
|
+
const lo = [Infinity, Infinity, Infinity];
|
|
82
|
+
const hi = [-Infinity, -Infinity, -Infinity];
|
|
83
|
+
for (const p of mesh.primitives) {
|
|
84
|
+
const pos = j.accessors?.[p.attributes.POSITION];
|
|
85
|
+
if (!pos)
|
|
86
|
+
continue;
|
|
87
|
+
verts += pos.count;
|
|
88
|
+
// Triangles only (mode 4, the default); other modes add no triangles.
|
|
89
|
+
if ((p.mode ?? 4) === 4)
|
|
90
|
+
tris += Math.floor((p.indices != null ? j.accessors?.[p.indices]?.count ?? 0 : pos.count) / 3);
|
|
91
|
+
for (let k = 0; k < 3; k++) {
|
|
92
|
+
lo[k] = Math.min(lo[k], pos.min?.[k] ?? Infinity);
|
|
93
|
+
hi[k] = Math.max(hi[k], pos.max?.[k] ?? -Infinity);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const matIndex = mesh.primitives[0]?.material;
|
|
97
|
+
parts.push({
|
|
98
|
+
node: n.name ?? mesh.name ?? `node_${i}`,
|
|
99
|
+
material: matIndex != null ? j.materials?.[matIndex]?.name : undefined,
|
|
100
|
+
bounds: transformBox(n.skin != null ? IDENTITY : world.get(i), lo, hi),
|
|
101
|
+
verts,
|
|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QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS;YACtE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAE,EAAE,EAAE,EAAE,EAAE,CAAC;YACvE,KAAK;YACL,IAAI;SACL,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* resolved field remembers where it came from.
|
|
12
12
|
*/
|
|
13
13
|
/** The generate options a loadout may set. */
|
|
14
|
-
export declare const LOADOUT_FIELDS: readonly ["model", "rig", "rigType", "spec", "animation", "pbr", "format", "segmentHint", "faceLimit", "textureQuality", "params", "then", "kind", "destination", "importMaterials", "importTextures", "importAnimations", "createPhysicsAsset", "nanite", "place", "onConflict", "save"];
|
|
14
|
+
export declare const LOADOUT_FIELDS: readonly ["model", "rig", "rigType", "spec", "animation", "pbr", "format", "segmentHint", "fitTo", "faceLimit", "textureQuality", "params", "then", "kind", "destination", "importMaterials", "importTextures", "importAnimations", "createPhysicsAsset", "nanite", "place", "onConflict", "save"];
|
|
15
15
|
export type LoadoutField = (typeof LOADOUT_FIELDS)[number];
|
|
16
16
|
export interface Loadout {
|
|
17
17
|
description?: string;
|
package/dist/shared/loadouts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadouts.js","sourceRoot":"","sources":["../../src/shared/loadouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,8CAA8C;AAC9C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,KAAK;IACL,SAAS;IACT,MAAM;IACN,WAAW;IACX,KAAK;IACL,QAAQ;IACR,a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,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credit prices for every step a generate job runs, so the estimate is the
|
|
3
|
+
* job's total and not only its generation step.
|
|
4
|
+
*
|
|
5
|
+
* The CLI prices the generation step itself (generation_credits_estimate in
|
|
6
|
+
* its dry run). Every other step is priced here from Tripo's published API
|
|
7
|
+
* price list (developers.tripo3d.com/en/pricing), which quotes yuan; one
|
|
8
|
+
* credit is 0.07 yuan there, the rate at which the CLI's own generation table
|
|
9
|
+
* matches that page (H3.1 text-to-model without texture: 0.70 yuan, 10
|
|
10
|
+
* credits). A step the list does not price, or prices by options this module
|
|
11
|
+
* does not read, is reported unpriced, and the total becomes a minimum.
|
|
12
|
+
*/
|
|
13
|
+
export interface PricedStep {
|
|
14
|
+
/** The chain step name (rig, retarget, ...) or the generation task type. */
|
|
15
|
+
step: string;
|
|
16
|
+
/** The Tripo task type the step creates, as credits_breakdown names it. */
|
|
17
|
+
type?: string;
|
|
18
|
+
credits: number | null;
|
|
19
|
+
unpriced?: true;
|
|
20
|
+
/** Where the price comes from: the CLI's own estimate, Tripo's list, a billed job, or a step that runs in the editor for nothing. */
|
|
21
|
+
basis?: "cli" | "list" | "observed" | "editor";
|
|
22
|
+
note?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreditEstimate {
|
|
25
|
+
/** The sum of every priced step. */
|
|
26
|
+
credits: number;
|
|
27
|
+
/** True when a step has no known price, so the job costs at least `credits`. */
|
|
28
|
+
minimum: boolean;
|
|
29
|
+
steps: PricedStep[];
|
|
30
|
+
notes: string[];
|
|
31
|
+
scope: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const ESTIMATE_SCOPE: string;
|
|
34
|
+
/** The chain step a task type belongs to, or the type itself for a generation task. */
|
|
35
|
+
export declare function stepOfType(type: string | undefined): string | undefined;
|
|
36
|
+
/** The list price of one chain step from its payload. */
|
|
37
|
+
export declare function priceStep(name: string, payload?: Record<string, unknown>): PricedStep;
|
|
38
|
+
/** Splits a --then chain the way the CLI does: a part with a known step name starts a step, a bare k=v continues it. */
|
|
39
|
+
export declare function parseChain(chain: string): Array<{
|
|
40
|
+
name: string;
|
|
41
|
+
payload: Record<string, unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
/** Sums the steps into an estimate. */
|
|
44
|
+
export declare function totalOf(steps: PricedStep[], notes: string[]): CreditEstimate;
|
|
45
|
+
/** "120 credits (multiview_to_model 40, smartsegment 55, rig 25)", or "at least ..." with the unpriced steps named. */
|
|
46
|
+
export declare function describeEstimate(e: CreditEstimate): string;
|
|
47
|
+
/**
|
|
48
|
+
* credits_breakdown with each entry named by its step and set beside the
|
|
49
|
+
* estimate's price for that step, so actual and estimate can be compared.
|
|
50
|
+
*/
|
|
51
|
+
export declare function annotateBreakdown(breakdown: Array<Record<string, unknown>>, estimate: CreditEstimate | undefined): Array<Record<string, unknown>>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credit prices for every step a generate job runs, so the estimate is the
|
|
3
|
+
* job's total and not only its generation step.
|
|
4
|
+
*
|
|
5
|
+
* The CLI prices the generation step itself (generation_credits_estimate in
|
|
6
|
+
* its dry run). Every other step is priced here from Tripo's published API
|
|
7
|
+
* price list (developers.tripo3d.com/en/pricing), which quotes yuan; one
|
|
8
|
+
* credit is 0.07 yuan there, the rate at which the CLI's own generation table
|
|
9
|
+
* matches that page (H3.1 text-to-model without texture: 0.70 yuan, 10
|
|
10
|
+
* credits). A step the list does not price, or prices by options this module
|
|
11
|
+
* does not read, is reported unpriced, and the total becomes a minimum.
|
|
12
|
+
*/
|
|
13
|
+
export const ESTIMATE_SCOPE = "The estimate is the total of every step the job runs, at Tripo's list prices: generation as the CLI prices it, " +
|
|
14
|
+
"then segmentation, rig, retarget, texture and convert. A step with no published price is listed with credits null " +
|
|
15
|
+
"and unpriced true, and then the total is a minimum.";
|
|
16
|
+
/** The task type each chain step creates. */
|
|
17
|
+
const STEP_TYPE = {
|
|
18
|
+
texture: "texture_model",
|
|
19
|
+
convert: "convert_model",
|
|
20
|
+
import: "import_model",
|
|
21
|
+
"rig-check": "animate_prerigcheck",
|
|
22
|
+
rig: "animate_rig",
|
|
23
|
+
retarget: "animate_retarget",
|
|
24
|
+
segment: "mesh_segmentation",
|
|
25
|
+
complete: "mesh_completion",
|
|
26
|
+
decimate: "highpoly_to_lowpoly",
|
|
27
|
+
uv: "mesh_uv",
|
|
28
|
+
edit: "mesh_edit",
|
|
29
|
+
smartsegment: "smartsegment_model",
|
|
30
|
+
};
|
|
31
|
+
const ALIASES = { check: "rig-check", rigcheck: "rig-check", animate: "retarget", lowpoly: "decimate" };
|
|
32
|
+
/** The chain step a task type belongs to, or the type itself for a generation task. */
|
|
33
|
+
export function stepOfType(type) {
|
|
34
|
+
if (!type)
|
|
35
|
+
return undefined;
|
|
36
|
+
if (type.startsWith("smartsegment_"))
|
|
37
|
+
return "smartsegment";
|
|
38
|
+
return Object.keys(STEP_TYPE).find((k) => STEP_TYPE[k] === type) ?? type;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The convert options that bill the advanced tier (the price list, mirrored by
|
|
42
|
+
* the CLI): any face limit, or a non-default value of one of these.
|
|
43
|
+
*/
|
|
44
|
+
const ADVANCED_CONVERT_DEFAULTS = {
|
|
45
|
+
quad: false,
|
|
46
|
+
flatten_bottom: false,
|
|
47
|
+
flatten_bottom_threshold: 0.01,
|
|
48
|
+
texture_size: 4096,
|
|
49
|
+
texture_format: "JPEG",
|
|
50
|
+
pivot_to_center_bottom: false,
|
|
51
|
+
scale_factor: 1,
|
|
52
|
+
};
|
|
53
|
+
function advancedConvert(p) {
|
|
54
|
+
return p.face_limit !== undefined || p.quadface_limit !== undefined ||
|
|
55
|
+
Object.entries(ADVANCED_CONVERT_DEFAULTS).some(([k, d]) => p[k] !== undefined && String(p[k]).toUpperCase() !== String(d).toUpperCase());
|
|
56
|
+
}
|
|
57
|
+
const unpriced = (step, note) => ({ step, type: STEP_TYPE[step], credits: null, unpriced: true, note });
|
|
58
|
+
/** The list price of one chain step from its payload. */
|
|
59
|
+
export function priceStep(name, payload = {}) {
|
|
60
|
+
const step = ALIASES[name] ?? name;
|
|
61
|
+
const list = (credits, note) => ({ step, type: STEP_TYPE[step], credits, basis: "list", ...(note ? { note } : {}) });
|
|
62
|
+
switch (step) {
|
|
63
|
+
case "rig-check":
|
|
64
|
+
return list(0);
|
|
65
|
+
case "rig":
|
|
66
|
+
return list(25);
|
|
67
|
+
case "retarget": {
|
|
68
|
+
const n = Array.isArray(payload.animations) ? payload.animations.length : 1;
|
|
69
|
+
return list(10 * n, n > 1 ? `${n} animations at 10 each` : undefined);
|
|
70
|
+
}
|
|
71
|
+
case "texture": {
|
|
72
|
+
const q = String(payload.texture_quality ?? "standard");
|
|
73
|
+
const credits = q === "extreme" ? 30 : q === "detailed" ? 20 : 10;
|
|
74
|
+
return list(credits, payload.pbr === true ? "The list prices the texture step by quality only; PBR has no separate price on it." : undefined);
|
|
75
|
+
}
|
|
76
|
+
case "convert":
|
|
77
|
+
return advancedConvert(payload) ? list(10, "non-default convert options bill the advanced tier") : list(5);
|
|
78
|
+
case "segment":
|
|
79
|
+
return list(40);
|
|
80
|
+
case "uv":
|
|
81
|
+
return list(20);
|
|
82
|
+
case "smartsegment":
|
|
83
|
+
return payload.seg_type === "image"
|
|
84
|
+
? { ...list(85), type: "smartsegment_image" }
|
|
85
|
+
: list(55);
|
|
86
|
+
case "import":
|
|
87
|
+
// Not on the price list. A rigged, segmented job billed 40 + 55 + 25 with
|
|
88
|
+
// the segmented file's import in it, so the import itself cost nothing.
|
|
89
|
+
return { step, type: STEP_TYPE.import, credits: 0, basis: "observed", note: "not on the price list; billed 0 in observed jobs" };
|
|
90
|
+
case "decimate":
|
|
91
|
+
return unpriced(step, "priced by retopology version and face type, which the plugin does not read");
|
|
92
|
+
case "complete":
|
|
93
|
+
return unpriced(step, "priced by completion mode, which the plugin does not read");
|
|
94
|
+
default:
|
|
95
|
+
return unpriced(step, "no published price");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/** Splits a --then chain the way the CLI does: a part with a known step name starts a step, a bare k=v continues it. */
|
|
99
|
+
export function parseChain(chain) {
|
|
100
|
+
const out = [];
|
|
101
|
+
for (const part of chain.split(",").map((p) => p.trim()).filter(Boolean)) {
|
|
102
|
+
const [head, ...rest] = part.split(":");
|
|
103
|
+
const name = ALIASES[head.trim().toLowerCase()] ?? head.trim().toLowerCase();
|
|
104
|
+
const known = name in STEP_TYPE;
|
|
105
|
+
if (!known && part.includes("=") && out.length) {
|
|
106
|
+
assign(out[out.length - 1].payload, part);
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const payload = {};
|
|
110
|
+
for (const token of rest.join(":").split(/[,;]/).map((t) => t.trim()).filter(Boolean)) {
|
|
111
|
+
if (token.includes("="))
|
|
112
|
+
assign(payload, token);
|
|
113
|
+
else if (name === "convert")
|
|
114
|
+
payload.format = token;
|
|
115
|
+
else if (name === "retarget")
|
|
116
|
+
payload.animation = token;
|
|
117
|
+
}
|
|
118
|
+
out.push({ name, payload });
|
|
119
|
+
}
|
|
120
|
+
return out;
|
|
121
|
+
}
|
|
122
|
+
function assign(payload, token) {
|
|
123
|
+
const eq = token.indexOf("=");
|
|
124
|
+
const raw = token.slice(eq + 1).trim();
|
|
125
|
+
payload[token.slice(0, eq).trim()] = raw === "true" ? true : raw === "false" ? false : /^-?\d+(\.\d+)?$/.test(raw) ? Number(raw) : raw;
|
|
126
|
+
}
|
|
127
|
+
/** Sums the steps into an estimate. */
|
|
128
|
+
export function totalOf(steps, notes) {
|
|
129
|
+
const credits = steps.reduce((sum, s) => sum + (s.credits ?? 0), 0);
|
|
130
|
+
return { credits, minimum: steps.some((s) => s.unpriced), steps, notes, scope: ESTIMATE_SCOPE };
|
|
131
|
+
}
|
|
132
|
+
/** "120 credits (multiview_to_model 40, smartsegment 55, rig 25)", or "at least ..." with the unpriced steps named. */
|
|
133
|
+
export function describeEstimate(e) {
|
|
134
|
+
const parts = e.steps.filter((s) => s.credits !== 0).map((s) => `${s.step} ${s.credits ?? "unpriced"}`).join(", ");
|
|
135
|
+
const missing = e.steps.filter((s) => s.unpriced).map((s) => s.step);
|
|
136
|
+
return e.minimum
|
|
137
|
+
? `at least ${e.credits} credits (${parts}); ${missing.join(" and ")} ${missing.length > 1 ? "have" : "has"} no known price, so the total is a minimum`
|
|
138
|
+
: `${e.credits} credits (${parts})`;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* credits_breakdown with each entry named by its step and set beside the
|
|
142
|
+
* estimate's price for that step, so actual and estimate can be compared.
|
|
143
|
+
*/
|
|
144
|
+
export function annotateBreakdown(breakdown, estimate) {
|
|
145
|
+
const left = [...(estimate?.steps ?? [])];
|
|
146
|
+
return breakdown.map((b) => {
|
|
147
|
+
const type = b.type;
|
|
148
|
+
const i = left.findIndex((s) => s.type === type);
|
|
149
|
+
const match = i >= 0 ? left.splice(i, 1)[0] : undefined;
|
|
150
|
+
return { ...b, step: match?.step ?? stepOfType(type), ...(estimate ? { estimated: match ? match.credits : null } : {}) };
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/shared/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAwBH,MAAM,CAAC,MAAM,cAAc,GACzB,iHAAiH;IACjH,oHAAoH;IACpH,qDAAqD,CAAC;AAExD,6CAA6C;AAC7C,MAAM,SAAS,GAA2B;IACxC,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,cAAc;IACtB,WAAW,EAAE,qBAAqB;IAClC,GAAG,EAAE,aAAa;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,mBAAmB;IAC5B,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,EAAE,EA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AG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC3H,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/tasks/Generate.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UeMcpTask, type TaskResult } from "ue-mcp/task";
|
|
2
|
+
import { type CreditEstimate } from "../shared/pricing.js";
|
|
2
3
|
/**
|
|
3
4
|
* The generation model when the caller names none. H3.1 is the cheapest model
|
|
4
5
|
* the CLI can price (its dry run estimates it), and no --for scenario is used
|
|
@@ -52,6 +53,58 @@ interface Options {
|
|
|
52
53
|
segmentHint?: string;
|
|
53
54
|
faceLimit?: number;
|
|
54
55
|
textureQuality?: string;
|
|
56
|
+
fitTo?: FitTo;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Fit the rigged model onto a project skeleton after rigging, through core's
|
|
60
|
+
* asset(fit_rigged_mesh_to_skeleton). Field names are that action's own, so a
|
|
61
|
+
* fitTo block and the fit call it becomes read the same.
|
|
62
|
+
*/
|
|
63
|
+
export interface FitTo {
|
|
64
|
+
/** A SkeletalMesh on the project skeleton, e.g. /Game/Characters/Mannequins/Meshes/SKM_Manny. */
|
|
65
|
+
referenceMesh: string;
|
|
66
|
+
/** That mesh's Skeleton, which the fitted pieces are built on. */
|
|
67
|
+
targetSkeleton: string;
|
|
68
|
+
/** "match" (default) takes referenceMesh's height, "source" keeps the model's, a number is cm. */
|
|
69
|
+
targetHeight?: "match" | "source" | number;
|
|
70
|
+
/**
|
|
71
|
+
* Piece name to the GLB node names (tripo_part_N) or material slot names
|
|
72
|
+
* (Material_tripo_part_N) that make it up. Omit it for one mesh. smartsegment's
|
|
73
|
+
* labels cannot be used here: they are not tied to any node.
|
|
74
|
+
*/
|
|
75
|
+
pieceNodes?: Record<string, string[]>;
|
|
76
|
+
/** Content folder for the fitted meshes (default generate's destination). */
|
|
77
|
+
destination?: string;
|
|
78
|
+
/** Asset name prefix (default SKM_<name>_ with pieceNodes, else SKM_, giving SKM_<name>). */
|
|
79
|
+
namePrefix?: string;
|
|
80
|
+
/** Replace a mesh already at an output path when nothing references it (default false). */
|
|
81
|
+
replaceExisting?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/** The core action fitTo calls, and the first ue-mcp version that has it. */
|
|
84
|
+
export declare const FIT_ACTION = "asset.fit_rigged_mesh_to_skeleton";
|
|
85
|
+
export declare const FIT_MIN_SERVER = "1.4.16-beta.16";
|
|
86
|
+
/**
|
|
87
|
+
* Checks a fitTo block before anything is spent. Throws on a block the fit
|
|
88
|
+
* action would refuse; returns warnings for piece names that do not look like
|
|
89
|
+
* Tripo part names, since smartsegment's labels match no node.
|
|
90
|
+
*/
|
|
91
|
+
export declare function checkFitTo(raw: unknown, o: {
|
|
92
|
+
rig?: boolean;
|
|
93
|
+
}): {
|
|
94
|
+
fit: FitTo;
|
|
95
|
+
warnings: string[];
|
|
96
|
+
};
|
|
97
|
+
interface PlanSummary {
|
|
98
|
+
model?: string;
|
|
99
|
+
steps: Array<{
|
|
100
|
+
name: string;
|
|
101
|
+
task_type?: string;
|
|
102
|
+
payload: Record<string, unknown>;
|
|
103
|
+
}>;
|
|
104
|
+
/** The CLI's estimate for the generation step alone. */
|
|
105
|
+
creditEstimate: number | null;
|
|
106
|
+
notes: string[];
|
|
107
|
+
warnings: string[];
|
|
55
108
|
}
|
|
56
109
|
export declare function sanitizeAssetName(raw: string): string;
|
|
57
110
|
/** "walk" -> "preset:walk"; anything already prefixed passes through. */
|
|
@@ -78,14 +131,46 @@ export declare function linkExpiry(output: unknown, now?: number): {
|
|
|
78
131
|
expiresAt: string;
|
|
79
132
|
fromApi: boolean;
|
|
80
133
|
};
|
|
134
|
+
/**
|
|
135
|
+
* Every step the job runs, priced: the CLI's plan (generation, then its
|
|
136
|
+
* chain), and with segmentHint the smartsegment task and the second make that
|
|
137
|
+
* imports the segmented file and runs the rig chain on it.
|
|
138
|
+
*/
|
|
139
|
+
export declare function estimateFor(o: Options, plan: PlanSummary): CreditEstimate;
|
|
140
|
+
/** smartsegment's comma-separated labels as a list, or undefined when it returned none. */
|
|
141
|
+
export declare function labelsOf(prompt: unknown): string[] | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* smartsegment returns its labels in one list and the parts as GLB nodes
|
|
144
|
+
* named tripo_part_N, with nothing that ties one to the other. In real jobs
|
|
145
|
+
* the node order differed from the label order (for "hair, head, shirt, arms,
|
|
146
|
+
* hands, leggings, feet", tripo_part_2 was the feet and tripo_part_4 the
|
|
147
|
+
* shirt), so the plugin does not rename nodes or guess a label per part.
|
|
148
|
+
*/
|
|
149
|
+
export declare const LABEL_ORDER_NOTE: string;
|
|
81
150
|
/** The asset(import_model) call that imports a file, ready to run. */
|
|
82
151
|
export declare function importCallFor(params: Record<string, unknown>): string;
|
|
152
|
+
/** The asset(fit_rigged_mesh_to_skeleton) call fitTo makes, ready to run. */
|
|
153
|
+
export declare function fitCallFor(params: Record<string, unknown>): string;
|
|
154
|
+
/**
|
|
155
|
+
* The fit action's parameters for fitTo. Without pieceNodes the action names
|
|
156
|
+
* its one mesh after the source file, so the caller passes a copy named after
|
|
157
|
+
* the job (giving SKM_<name>); with pieces the prefix carries the job name.
|
|
158
|
+
*/
|
|
159
|
+
export declare function fitParamsFor(fit: FitTo, sourceFile: string, name: string, importParams: Record<string, unknown>): Record<string, unknown>;
|
|
83
160
|
export default class Generate extends UeMcpTask<Options> {
|
|
84
161
|
get taskName(): string;
|
|
85
162
|
execute(): Promise<TaskResult>;
|
|
86
163
|
private resume;
|
|
87
164
|
private pending;
|
|
88
165
|
private finish;
|
|
166
|
+
/** What the dry run says the fit will do: the call it makes once the rigged model exists. */
|
|
167
|
+
private fitPlan;
|
|
168
|
+
/**
|
|
169
|
+
* Runs the fit on the rigged model. Never throws: credits are spent by now,
|
|
170
|
+
* so a fit that cannot run comes back as status not_fitted (or skipped) with
|
|
171
|
+
* the reason and the ready call, and the caller imports the model as it is.
|
|
172
|
+
*/
|
|
173
|
+
private fitStage;
|
|
89
174
|
/**
|
|
90
175
|
* Garment separation. make's --then chain has no smartsegment step, so it runs
|
|
91
176
|
* as its own CLI calls: `mesh smartsegment` on the generated GLB, then a make
|
|
@@ -93,6 +178,8 @@ export default class Generate extends UeMcpTask<Options> {
|
|
|
93
178
|
* so a failure here returns what exists instead of throwing.
|
|
94
179
|
*/
|
|
95
180
|
private segmentStage;
|
|
181
|
+
/** smartsegment's part labels (its output.prompt), or undefined when task get cannot say. */
|
|
182
|
+
private segmentLabels;
|
|
96
183
|
/** `tripo task get <id> --download` into dir. Never throws: the run already succeeded. */
|
|
97
184
|
private saveRaw;
|
|
98
185
|
}
|