1---
2name: 3d-games
3description: "3D game development principles. Rendering, shaders, physics, cameras."
4risk: unknown
5source: community
6date_added: "2026-02-27"
7metadata:
8 source: https://skillmd.com/skills/bouclem/3d-games
9---
10
11# 3D Game Development
12
13> Principles for 3D game systems.
14
15---
16
17## 1. Rendering Pipeline
18
19### Stages
20
21```
221. Vertex Processing → Transform geometry
232. Rasterization → Convert to pixels
243. Fragment Processing → Color pixels
254. Output → To screen
26```
27
28### Optimization Principles
29
30| Technique | Purpose |
31|-----------|---------|
32| **Frustum culling** | Don't render off-screen |
33| **Occlusion culling** | Don't render hidden |
34| **LOD** | Less detail at distance |
35| **Batching** | Combine draw calls |
36
37---
38
39## 2. Shader Principles
40
41### Shader Types
42
43| Type | Purpose |
44|------|---------|
45| **Vertex** | Position, normals |
46| **Fragment/Pixel** | Color, lighting |
47| **Compute** | General computation |
48
49### When to Write Custom Shaders
50
51- Special effects (water, fire, portals)
52- Stylized rendering (toon, sketch)
53- Performance optimization
54- Unique visual identity
55
56---
57
58## 3. 3D Physics
59
60### Collision Shapes
61
62| Shape | Use Case |
63|-------|----------|
64| **Box** | Buildings, crates |
65| **Sphere** | Balls, quick checks |
66| **Capsule** | Characters |
67| **Mesh** | Terrain (expensive) |
68
69### Principles
70
71- Simple colliders, complex visuals
72- Layer-based filtering
73- Raycasting for line-of-sight
74
75---
76
77## 4. Camera Systems
78
79### Camera Types
80
81| Type | Use |
82|------|-----|
83| **Third-person** | Action, adventure |
84| **First-person** | Immersive, FPS |
85| **Isometric** | Strategy, RPG |
86| **Orbital** | Inspection, editors |
87
88### Camera Feel
89
90- Smooth following (lerp)
91- Collision avoidance
92- Look-ahead for movement
93- FOV changes for speed
94
95---
96
97## 5. Lighting
98
99### Light Types
100
101| Type | Use |
102|------|-----|
103| **Directional** | Sun, moon |
104| **Point** | Lamps, torches |
105| **Spot** | Flashlight, stage |
106| **Ambient** | Base illumination |
107
108### Performance Consideration
109
110- Real-time shadows are expensive
111- Bake when possible
112- Shadow cascades for large worlds
113
114---
115
116## 6. Level of Detail (LOD)
117
118### LOD Strategy
119
120| Distance | Model |
121|----------|-------|
122| Near | Full detail |
123| Medium | 50% triangles |
124| Far | 25% or billboard |
125
126---
127
128## 7. Anti-Patterns
129
130| ❌ Don't | ✅ Do |
131|----------|-------|
132| Mesh colliders everywhere | Simple shapes |
133| Real-time shadows on mobile | Baked or blob shadows |
134| One LOD for all distances | Distance-based LOD |
135| Unoptimized shaders | Profile and simplify |
136
137---
138
139> **Remember:** 3D is about illusion. Create the impression of detail, not the detail itself.
140
141## When to Use
142This skill is applicable to execute the workflow or actions described in the overview.
143
144## Limitations
145- Use this skill only when the task clearly matches the scope described above.
146- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
147- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.