This commit is contained in:
2026-03-09 20:43:30 -07:00
parent 44926b751d
commit 1b13072412
14 changed files with 23 additions and 5 deletions

View File

@@ -11,18 +11,25 @@ This skill creates alpha masks from images based on user requests. Use this when
### 0. Extract layer (conditional)
If the user provided a layer name from an ora file, you should use the ora-editing skill to extract a png of that layer. First use the inspect to list the layers, then use the extract.
### 1. Draw Polygon Outline
Use the `polygon-drawer` skill to draw a polygon outline around the identified object. Save the output to `./tmp/` with a sensible filename:
### 1. Draw Polygon Outline (optional, default)
Use the `polygon-drawer` skill to draw a polygon outline around the identified object. If the user asks to bypass the polygon, do so. Save the output to `./tmp/` with a sensible filename:
- Format: `<original_name>.<object>.png`
- Example: If the user wants a door mask from `room_010.png`, name it `room_010.door.png`
### 2. Extract Mask
Run the `extract_mask` script to generate the alpha mask:
Run the `extract_mask` script to generate the alpha mask. If a polygon was added, make sure to include "with the <color> outline", or "outlined in <color>". You can also explicitly omit things:
```bash
source ./tools/venv/bin/activate
python tools/extract_mask.py "the door with the red outline" ./tmp/<original_name>.<object>.png ./tmp/<original_name>.<object>.mask.png
```
Examples:
- The boulder outlined in red
- The door with the blue polygon around it
- The fence, excluding the bushes behind it
- The house, including the windows and chimney, outlined in blue
- The mailbox, including the flag, omitting the house behind it
### 3. Quality Check
Examine the generated mask using the `image-expert` agent:
- Check if the mask is precise and accurate

View File

@@ -24,7 +24,7 @@ Use this skill when:
First, examine the scene image to identify all elements. You should ask the @image-expert agent to do this, giving it the filename to read:
1. **Foreground elements** - Objects closest to camera that would obscure player. Examples would include:
1. **Foreground elements** - Objects closest to camera that would obscure player. Most of the time foreground elements should be put together if they overlap one another. Examples would include:
- Large trees extending into frame
- Foreground framing, like in a room, sometimes the foreground is all black
- Foreground bushes and plants
@@ -62,7 +62,7 @@ For each foreground/mid-ground element identified, note:
### Step 3: Create Alpha Masks
Use the alpha-mask-creator skill to create a new mask. The user may ask for a certain number of variations (default 2). Check that the mask properly isolates the element. In those case
just use the skill multiple times and it will create a different variation of the mask.
just use the skill multiple times and it will create a different variation of the mask. Always do these one at a time, because the system might get overwhelmed if they are done in parallel.
### Step 4: Create ORA File