This guide explains how the mascot and lyrics positioning works in the Semantic Foragecast Engine, and how to debug positioning issues.
The scene uses Blender's coordinate system:
- X-axis: Left (-) to Right (+)
- Y-axis: Back (+) to Front (-)
- Z-axis: Down (-) to Up (+)
| Element | Position (X, Y, Z) | Description |
|---|---|---|
| Mascot | (0, 0, 1) | Center of scene, 1 unit above origin |
| Camera | (0, -6, 1) | 6 units in front, looking back at mascot |
| Lyrics Text | (0, -2, 0.2) | 2 units in front of mascot, lower on screen |
| Origin | (0, 0, 0) | World center |
[Camera at Y=-6]
|
| (looking this direction)
v
[Text at Y=-2, Z=0.2]
[Mascot at Y=0, Z=1]
----- [Stage at Z=0] -----
Previous Issue:
- Lyrics were positioned at
(0, 0, -0.5) - This put them behind the mascot and often off-screen
Current Fix:
- Lyrics now positioned at
(0, -2, 0.2) - Y=-2: Closer to camera than mascot (better visibility)
- Z=0.2: In lower third of frame (subtitle position)
- Camera at Y=-6 looks toward positive Y direction
- Text at Y=-2 is between camera and mascot
- Text appears "in front" from camera's perspective
- Lower Z value (0.2) places text in lower screen area
Add this to your config.yaml:
advanced:
debug_mode: trueWhen enabled, colored sphere markers appear at key positions:
- 🔴 Red Sphere: Camera position
- 🟢 Green Sphere: Mascot position
- 🔵 Blue Sphere: Text zone position
- 🟡 Yellow Sphere: World origin
Each marker includes a text label for easy identification.
- Enable
debug_mode: truein config - Run the pipeline:
python main.py - Check the first rendered frame
- Verify all elements are positioned correctly
- Disable debug mode for final render
Edit blender_script.py line ~567:
y_position = -2.0 # More negative = closer to camera-1.5: Very close to camera (large text)-2.0: Default (good visibility)-3.0: Further from camera (smaller text)
Edit blender_script.py line ~568:
z_position = 0.2 # Higher = moves up on screen0.5: Middle of screen0.2: Lower third (subtitle position) - DEFAULT-0.2: Bottom of screen
Add X-offset to text creation:
bpy.ops.object.text_add(location=(x_offset, y_position, z_position))- Negative X: Left
- Positive X: Right
- 0: Center (default)
- Audio File → Analyzed by Phase 1 (
prep_audio.py) - Phonemes → Extracted via Rhubarb or mock generation
- Timing Data → Stored in
prep_data.json - Blender → Applies phoneme shape keys to mascot mesh
- Result → Mascot mouth moves in sync with audio
- Lyrics File (
lyrics.txt) → Manually timed by you - Format:
START-END word|word|word - Phase 1 → Parses timing and words
- Blender → Creates text objects with timed visibility
- Result → Words appear/disappear at specified times
You must manually ensure:
- Lyrics timestamps match when words are actually sung
- Format:
0:00-0:03 Hello|world|test - Each word gets equal time in its range
0:00-0:03 Welcome|to|the|show
0:03-0:06 Dancing|in|the|lights
0:06-0:09 Music|brings|us|together
Symptoms: Text doesn't appear in rendered frames
Solutions:
- Enable
debug_mode: trueto see text zone marker - Check lyrics file exists and has content
- Verify
enable_lyrics: truein config - Ensure text timing overlaps with rendered frames
Symptoms: Text is blocked by mascot
Solution:
- Already fixed in latest version
- Text now at Y=-2 (in front of mascot at Y=0)
Symptoms: Mascot mouth doesn't move
Solutions:
- Check
enable_lipsync: truein config - Verify phoneme data in
prep_data.json - Ensure mascot has shape keys (check Blender output)
- For 3D mode: Requires actual mesh deformation (currently stub)
Symptoms: Words appear at wrong time
Solution:
- Edit
lyrics.txtmanually to match audio timing - Use audio editor to find exact timestamps
- Format:
MM:SS-MM:SS word|word|word
Default text configuration:
- Size: 0.6-0.8 units (0.8 for professional style)
- Alignment: Centered X and Y
- Material: Emission shader (glows)
- Extrusion: 0.1-0.15 units (3D depth)
- Animation: Scale bounce or professional fade
Professional style:
- 70% Emission (glow)
- 30% Glossy (reflective)
- Accent color from config
- Emission strength: 2.0
Lyrics animation phases:
- Appear (frames 1-5): Scale from 0.1 to 1.0
- Display (bulk of duration): Visible at scale 1.0
- Pulse (mid-point): Brief scale to 1.1
- Disappear (last 3 frames): Hide
- Always test with debug mode first when changing positions
- Use preview mode (
preview_mode: true) for fast iteration - Check first frame to verify positioning before full render
- Match lyrics timing carefully to audio for best results
- Use professional style for production-quality text rendering
blender_script.py- Main positioning code (lines 563-570, 1046-1117)grease_pencil.py- 2D mode text positioning (lines 590-650)config.yaml- Configuration including debug_modeassets/lyrics.txt- Lyrics timing file
- v1.0: Initial implementation (text behind mascot)
- v1.1: Fixed positioning (text in front at Y=-2, Z=0.2)
- v1.1: Added debug visualization mode
Last Updated: 2025-11-18 Related: See README.md for full pipeline documentation