Communitygithub.com

SamuelChien/mega-skills-collection

3D 遊戲開發原則:渲染、著色器、物理、攝影機。

mega-skills-collection 是什麼?

此技能提供一套完整的 3D 遊戲開發原則,涵蓋渲染管線、著色器、物理系統、攝影機機制與光照設計等核心領域。開發者可透過結構化的指引快速理解頂點處理、光柵化、片段著色等管線階段,並掌握視錐剔除、遮擋剔除、LOD 與批次處理等最佳化技巧。在著色器與物理方面,技能列出常見碰撞形狀的適用場景、自訂著色器的時機,以及物理層過濾與射線檢測的應用。此外,針對不同遊戲類型(第三人稱、第一人稱、等距視角等),提供攝影機跟隨演算法與視角設計的實務建議。此技能適用於任何支援 Git 工作流程的 AI 代理環境(如 Claude Code、Cursor 或 Codex),能協助開發者在缺乏即時環境驗證的情況下,仍能建構高效的 3D 遊戲雛形或進行快速原型設計。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/3d-games

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

3D 遊戲開發

3D 遊戲系統的原則。


1. 渲染管線

階段

1. 頂點處理 → 變換幾何形狀
2. 光柵化 → 轉換為像素
3. 片段處理 → 對像素著色
4. 輸出 → 至螢幕

最佳化原則

技術目的
視錐剔除不渲染畫面外物件
遮擋剔除不渲染隱藏物件
LOD距離越遠細節越少
批次處理合併繪圖呼叫

2. 著色器原則

著色器類型

類型目的
頂點位置、法線
片段/像素顏色、光照
計算通用計算

何時撰寫自訂著色器

  • 特殊效果(水、火、傳送門)
  • 風格化渲染(卡通、素描)
  • 效能最佳化
  • 獨特的視覺識別

3. 3D 物理

碰撞形狀

形狀使用案例
盒子建築物、箱子
球體球類、快速檢測
膠囊角色
網格地形(耗費資源)

原則

  • 簡單碰撞體,複雜視覺
  • 基於圖層的過濾
  • 射線檢測用於視線判斷

4. 攝影機系統

攝影機類型

類型用途
第三人稱動作、冒險
第一人稱沉浸式、FPS
等距視角策略、RPG
軌道式檢視、編輯器

攝影機手感

  • 平滑跟隨(lerp)
  • 碰撞避免
  • 移動時預先看向前方
  • 根據速度改變視野

5. 光照

光源類型

類型用途
方向光太陽、月亮
點光源燈具、火炬
聚光燈手電筒、舞台
環境光基礎照明

效能考量

  • 即時陰影耗費資源
  • 盡可能烘焙
  • 大型世界使用陰影級聯

6. 細節層級 (LOD)

LOD 策略

距離模型
近距離完整細節
中距離50% 三角形
遠距離25% 或廣告牌

7. 反模式

❌ 不要✅ 應該
到處使用網格碰撞體使用簡單形狀
在手機上使用即時陰影使用烘焙或模糊陰影
所有距離使用同一 LOD根據距離切換 LOD
未最佳化的著色器分析並簡化

記住: 3D 是關於幻覺。創造細節的印象,而非細節本身。

使用時機

此技能適用於執行概述中所描述的工作流程或動作。

限制

  • 僅在任務與上述範圍明確匹配時使用此技能。
  • 請勿將輸出視為環境特定驗證、測試或專家審查的替代品。
  • 如果缺少必要的輸入、權限、安全邊界或成功標準,請停下並要求釐清。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

2D game development principles. Sprites, tilemaps, physics, camera.

SamuelChien/mega-skills-collection

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

SamuelChien/mega-skills-collection

Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

相關技能