跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
视频与音频

assets-pipeline

Use when importing and managing assets — image compression, 3D scene import, audio formats, resource formats, and import configuration

jame581 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add jame581/GodotPrompter --skill assets-pipeline

技能说明


name: assets-pipeline description: Use when importing and managing assets — image compression, 3D scene import, audio formats, resource formats, and import configuration

Assets Pipeline in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.

Related skills: audio-system for audio playback and bus architecture, 3d-essentials for 3D materials and lighting, 2d-essentials for 2D rendering and sprites, animation-system for imported animations, godot-optimization for asset-related performance, multithreading for threaded resource loading.


1. How Importing Works

The Import System

When you add a file to res://, Godot auto-imports it based on its type. Import settings are stored in .import sidecar files alongside the original.

project/
├── textures/
│   ├── player.png           ← original file (committed to VCS)
│   └── player.png.import    ← import settings (committed to VCS)
└── .godot/
    └── imported/            ← compiled cache (NOT committed — .gitignore it)

Key Rules

  • Never modify files in .godot/imported/ — they are regenerated from originals
  • Commit .import files to version control — they store your settings
  • Reimport after changing settings: select file → Import dock → click Reimport
  • .godot/ should be in your .gitignore

Changing Import Settings

  1. Select the file in the FileSystem dock
  2. Open the Import dock (next to Scene dock by default)
  3. Change settings
  4. Click Reimport (or Reimport All for batch changes)

Import settings can also be set via Advanced Import Settings for 3D scenes (double-click the .glb/.gltf file).


2. Image Import

Compression Modes

ModeQualityVRAMFile SizeUse For
LosslessPerfectHighLargePixel art, UI elements
LossyGoodHighSmallLarge photos, backgrounds
VRAM CompressedReducedLowSmall3D textures, large 2D sprites
VRAM UncompressedPerfectHighLargeWhen VRAM compression artifacts are unacceptable
Basis UniversalReducedLowVery smallCross-platform, multiple GPU formats

When to Use Each

Pixel art / UI icons       → Lossless (no artifacts, crisp pixels)
2D game sprites            → Lossless (small sprites) or VRAM Compressed (large sprites)
3D textures (albedo, normal) → VRAM Compressed (saves GPU memory)
Large backgrounds          → Lossy or VRAM Compressed
Mobile targets             → VRAM Compressed (essential for memory)

Key Import Settings

SettingDescriptionDefault
Compress > ModeCompression algorithm (see table above)VRAM Compressed
Mipmaps > GenerateGenerate mipmaps for distance renderingOff
Process > Fix Alpha BorderPrevents dark outlines on transparent spritesOn
Process > Premult AlphaPre-multiply alpha (avoids dark halos)Off
Flags > FilterBilinear filtering (smooth) vs nearest (crisp)Linear
Flags > RepeatEnable texture tilingDisabled

Pixel Art Setup

For crisp pixel art, set these project-wide:

Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter → Nearest

Or per-image in Import dock: Filter → Nearest

Enabling Mipmaps

Mipmaps prevent shimmering on textures viewed at an angle or from a distance. Required for 3D textures; optional for 2D.

  • 3D textures: Always enable mipmaps (Import dock → Mipmaps → Generate → On)
  • 2D sprites: Usually off (unless you use Camera2D zoom)
  • UI textures: Off (rendered at fixed scale)

Godot 4.7+: DDS import supports the R8 and R8G8 texture formats. (GH-116307)


3. 3D Scene Import

Supported Formats

FormatExtensionRecommendation
glTF.gltf, .glbRecommended — open standard, best support
Blend.blendDirect Blender import (requires Blender installed)
FBX.fbxGood for legacy pipelines
Collada.daeOlder format, use glTF if possible
OBJ.objStatic meshes only — no animations/rigs

glTF is the recommended format. It has the best Godot support, is an open standard, and preserves materials, animations, and rigs accurately.

Node Naming Conventions

Godot auto-creates appropriate node types based on suffixes in your 3D model's object names:

SuffixGenerated NodeExample Name
-colStaticBody3D + collisionWall-col
-convcolConvexPolygonShape3DRock-convcol
-rigidRigidBody3DBarrel-rigid
-navmeshNavigationRegion3DFloor-navmesh
-occluderOccluderInstance3DBigWall-occluder
In Blender:                  In Godot (after import):
Wall-col                  →  StaticBody3D
├── Wall (mesh)           →    ├── MeshInstance3D
                          →    └── CollisionShape3D (auto-generated)

Import Dock Settings

Select the imported .glb/.gltf in FileSystem, then in the Import dock:

SettingDescription
Root TypeOverride root node type (Node3D, RigidBody3D, etc.)
Root NameCustom name for the root node
Meshes > Generate LODAuto-generate LOD levels (on by default)
Meshes > Light BakingStatic or Dynamic for lightmap baking
Animation > ImportEnable/disable animation import
Animation > FPSBake animation at this framerate

**Godot

阅读完整来源 ↗