@genex-ai/cli-demo 0.93.0 → 0.94.0-dev.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -5
- package/package.json +1 -1
- package/templates/skills/genex-ai-model/SKILL.md +3 -2
- package/templates/skills/genex-ai-skybox/SKILL.md +4 -4
- package/templates/skills/genex-ai-texture/SKILL.md +1 -1
- package/templates/skills/genex-ai-video/SKILL.md +1 -1
- package/templates/skills/genex-game-director/SKILL.md +321 -411
- package/templates/skills/genex-game-director/references/design-contract.md +130 -179
- package/templates/skills/genex-game-director/references/routing-map.md +242 -362
- package/templates/skills/genex-getting-started/SKILL.md +2 -2
- package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +3 -7
- package/templates/skills/genex-threejs-multiplayer/SKILL.md +19 -2
- package/templates/skills/genex-threejs-procedural-assets/SKILL.md +112 -0
- package/templates/skills/genex-threejs-procedural-materials/SKILL.md +3 -7
- package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +6 -11
- package/templates/skills/genex-threejs-shadow-systems/SKILL.md +2 -3
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +0 -4
- package/templates/skills/genex-updates/SKILL.md +1 -1
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +0 -46
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +0 -213
- package/templates/skills/genex-threejs-bloom/SKILL.md +0 -44
- package/templates/skills/genex-threejs-bloom/references/bloom.md +0 -187
- package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +0 -205
- package/templates/skills/genex-threejs-game-content/SKILL.md +0 -198
- package/templates/skills/genex-threejs-game-content/references/content-tables.md +0 -269
- package/templates/skills/genex-threejs-image-pipeline/SKILL.md +0 -56
- package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +0 -197
- package/templates/skills/genex-threejs-lighting-design/SKILL.md +0 -144
- package/templates/skills/genex-threejs-lighting-design/references/light-recipes.md +0 -137
- package/templates/skills/genex-threejs-open-world/SKILL.md +0 -149
- package/templates/skills/genex-threejs-open-world/references/terrain-streaming.md +0 -215
- package/templates/skills/genex-threejs-precipitation-surfaces/SKILL.md +0 -59
- package/templates/skills/genex-threejs-precipitation-surfaces/references/precipitation-surfaces.md +0 -181
- package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +0 -50
- package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +0 -509
- package/templates/skills/genex-threejs-procedural-fields/SKILL.md +0 -61
- package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +0 -232
- package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +0 -39
- package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +0 -202
- package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +0 -198
- package/templates/skills/genex-threejs-procedural-planets/SKILL.md +0 -48
- package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +0 -498
- package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +0 -52
- package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +0 -314
- package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +0 -218
- package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +0 -37
- package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +0 -194
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +0 -35
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +0 -441
- package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +0 -52
- package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +0 -473
- package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +0 -41
- package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +0 -207
- package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +0 -427
- package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +0 -49
- package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +0 -579
- package/templates/skills/genex-threejs-water-optics/SKILL.md +0 -57
- package/templates/skills/genex-threejs-water-optics/references/water-optics.md +0 -195
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# Analytic water surface system
|
|
2
|
-
|
|
3
|
-
Use this reference for bounded or analytic water with shared displacement and normals, derivative-filtered detail, analytic reflection, heuristic refraction, absorption, and crest foam. Use `$genex-threejs-spectral-ocean` for stochastic FFT seas.
|
|
4
|
-
|
|
5
|
-
> **Renderer note:** this reference assumes `WebGPURenderer` + TSL node materials. Check the project's actual renderer first — the Genex scaffold ships vanilla WebGL three.js. On WebGL, adapt the technique with standard materials / `EffectComposer` passes or pick a simpler alternative; never switch renderers mid-project. Either way the effect obeys the device tier (`$genex-threejs-adaptive-quality`): expensive passes are desktop-tier, and on WebGPU the per-target MSAA sample count is a runtime knob the governor may drive.
|
|
6
|
-
|
|
7
|
-
## Contents
|
|
8
|
-
|
|
9
|
-
- cinematic implementation displaced ocean
|
|
10
|
-
- Shared displacement/normal contract
|
|
11
|
-
- cinematic implementation optical hierarchy
|
|
12
|
-
- atlas-based renderer normal-only wave bundle
|
|
13
|
-
- atlas-based renderer refraction and absorption
|
|
14
|
-
- Foam and distance response
|
|
15
|
-
- Objective limits
|
|
16
|
-
- Diagnostics
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## cinematic implementation displaced ocean
|
|
20
|
-
|
|
21
|
-
The shallow-sea demo scene uses five authored Gerstner-style components:
|
|
22
|
-
|
|
23
|
-
| Direction X/Z | Amplitude | Wavelength | Steepness |
|
|
24
|
-
| --- | ---: | ---: | ---: |
|
|
25
|
-
| `0.94, 0.32` | 0.38 | 28.0 | 0.50 |
|
|
26
|
-
| `-0.42, 0.91` | 0.24 | 18.0 | 0.46 |
|
|
27
|
-
| `0.78, -0.52` | 0.16 | 12.0 | 0.42 |
|
|
28
|
-
| `-0.35, -0.78` | 0.10 | 10.0 | 0.35 |
|
|
29
|
-
| `0.55, 0.62` | 0.06 | 9.5 | 0.28 |
|
|
30
|
-
|
|
31
|
-
For every wave:
|
|
32
|
-
|
|
33
|
-
```text
|
|
34
|
-
k = 2π / wavelength
|
|
35
|
-
omega = sqrt(9.81 * k)
|
|
36
|
-
phase = k * dot(direction, xz) - omega * time
|
|
37
|
-
horizontal offset = direction * steepness * amplitude * cos(phase)
|
|
38
|
-
vertical offset = amplitude * sin(phase)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The ocean is a `1200 x 1200` plane with `256 x 256` segments. A CPU height
|
|
42
|
-
function evaluates the same five vertical sine terms for camera clearance.
|
|
43
|
-
|
|
44
|
-
## Shared displacement/normal contract
|
|
45
|
-
|
|
46
|
-
The TSL normal function evaluates the same directions, amplitudes,
|
|
47
|
-
wavelengths, and phases as displacement:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
Nx += direction.x * k * amplitude * sin(phase)
|
|
51
|
-
Ny += steepness * k * amplitude * cos(phase)
|
|
52
|
-
Nz += direction.y * k * amplitude * sin(phase)
|
|
53
|
-
normal = normalize((-Nx, 1 - Ny, -Nz))
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
This exact parameter sharing is the defining mechanism. If a wave changes,
|
|
57
|
-
both geometry and normal evaluation change together.
|
|
58
|
-
|
|
59
|
-
## cinematic implementation optical hierarchy
|
|
60
|
-
|
|
61
|
-
The surface adds four smaller sinusoidal normal bands after the displaced
|
|
62
|
-
normal, with spatial scales `0.44`, `0.8`, `1.55`, and `2.8` and decreasing
|
|
63
|
-
strength.
|
|
64
|
-
|
|
65
|
-
Water response:
|
|
66
|
-
|
|
67
|
-
```text
|
|
68
|
-
F0 = 0.02
|
|
69
|
-
F = F0 + (1 - F0) * (1 - NdotV)^5
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Reflection samples the same analytic sky used by the sky dome. Sun response:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
reflection disc = dot(reflection, sun)^2500 * 22
|
|
76
|
-
reflection halo = dot(reflection, sun)^14 * 1.5
|
|
77
|
-
surface specular = dot(normal, halfVector)^1200 * 22
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
The transmitted body is a deep/shallow blue mix. A forward-scatter term uses
|
|
81
|
-
`dot(view, -sun)^4`, scaled by `0.42 * (1 - Fresnel)`. Crest foam derives from
|
|
82
|
-
`(1 - normal.y)`, and distance haze uses:
|
|
83
|
-
|
|
84
|
-
```text
|
|
85
|
-
1 - exp(-distance * 0.0026)
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## atlas-based renderer normal-only wave bundle
|
|
89
|
-
|
|
90
|
-
atlas-based renderer’s water mesh is not displaced by the material. It computes a normal
|
|
91
|
-
and crest from six world-XZ wave bands:
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
wavelengths = 12, 6, 2.5, 5.25, 3.0, 1.5
|
|
95
|
-
relative amplitudes = 1, 0.55, 0.22, 0.12, 0.08, 0.05
|
|
96
|
-
directions = wind, cross-wind, 45°, +30°, -30°, +60°
|
|
97
|
-
dispersion = sqrt(9.8 * k)
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
High-frequency bands are attenuated from screen derivatives:
|
|
101
|
-
|
|
102
|
-
```text
|
|
103
|
-
aa3 = 1 - smoothstep(0, 2.0, footprint * k3)
|
|
104
|
-
aa4 = 1 - smoothstep(0, 1.5, footprint * k4)
|
|
105
|
-
aa5 = 1 - smoothstep(0, 1.0, footprint * k5)
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Two low-amplitude noise gradients add wind-aligned micro-turbulence. The crest
|
|
109
|
-
metric combines slope with phase alignment from all six waves.
|
|
110
|
-
|
|
111
|
-
Use this only when normal-only water is appropriate. Do not claim geometry and
|
|
112
|
-
normal parity because the geometry remains flat.
|
|
113
|
-
|
|
114
|
-
## atlas-based renderer refraction and absorption
|
|
115
|
-
|
|
116
|
-
Defaults:
|
|
117
|
-
|
|
118
|
-
```text
|
|
119
|
-
air/water eta = 1 / 1.333
|
|
120
|
-
extra Fresnel bias = 0.035
|
|
121
|
-
absorption = (0.20, 0.06, 0.02) per meter
|
|
122
|
-
fallback depth = 4 m
|
|
123
|
-
refraction strength = 0.18
|
|
124
|
-
roughness control = 0.35
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
The shader is side-aware:
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
above water: eta = air / water
|
|
131
|
-
underwater: eta = water / air
|
|
132
|
-
F0 = ((1 - eta) / (1 + eta))^2 + artistic bias
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
When scene color exists, it samples two clamped screen offsets from the
|
|
136
|
-
refracted direction and procedural noise. When scene depth is absent, path
|
|
137
|
-
length is approximated from fallback thickness and the refracted vertical
|
|
138
|
-
component:
|
|
139
|
-
|
|
140
|
-
```text
|
|
141
|
-
path = fallbackDepth / abs(refractedDirection.y)
|
|
142
|
-
transmittance = exp(-absorption * path)
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
This produces depth-dependent color but not actual object thickness.
|
|
146
|
-
|
|
147
|
-
## Foam and distance response
|
|
148
|
-
|
|
149
|
-
atlas-based renderer foam:
|
|
150
|
-
|
|
151
|
-
```text
|
|
152
|
-
foamSeed = noise(xz * 0.9 + wind * time * foamDrift)
|
|
153
|
-
foam = smoothstep(
|
|
154
|
-
threshold,
|
|
155
|
-
1,
|
|
156
|
-
crest * noisy modulation
|
|
157
|
-
)
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
It is causally attached to the crest output, then broken up by noise.
|
|
161
|
-
|
|
162
|
-
The material also increases opacity over a configured distance range
|
|
163
|
-
(`25–140` world units) and treats underwater alpha separately. This helps a
|
|
164
|
-
bounded transparent surface meet a far-ocean horizon.
|
|
165
|
-
|
|
166
|
-
## Objective limits
|
|
167
|
-
|
|
168
|
-
- cinematic implementation uses an authored five-wave sea, not a directional spectrum.
|
|
169
|
-
- atlas-based renderer is normal-only and cannot produce crest silhouette or geometric
|
|
170
|
-
parallax.
|
|
171
|
-
- atlas-based renderer refraction has no depth rejection and can sample foreground objects.
|
|
172
|
-
- Its thickness is a fallback estimate, not reconstructed scene thickness.
|
|
173
|
-
- The demonstrated paths use artistic sky reflection rather than environment
|
|
174
|
-
prefiltering or planar reflection.
|
|
175
|
-
- Crest foam is instantaneous and lacks persistent build/decay.
|
|
176
|
-
- Route to `$genex-threejs-spectral-ocean` when the target is implementation-level
|
|
177
|
-
spectral open water rather than a bounded authored-wave surface.
|
|
178
|
-
|
|
179
|
-
## Diagnostics
|
|
180
|
-
|
|
181
|
-
Expose:
|
|
182
|
-
|
|
183
|
-
```text
|
|
184
|
-
each authored wave band
|
|
185
|
-
displaced position and analytic normal
|
|
186
|
-
normal-only versus displaced comparison
|
|
187
|
-
derivative attenuation per micro band
|
|
188
|
-
crest metric before noise
|
|
189
|
-
Fresnel and side classification
|
|
190
|
-
raw refraction UV and validity
|
|
191
|
-
fallback path length and transmittance
|
|
192
|
-
reflection, body scatter, glint, and foam separately
|
|
193
|
-
distance haze/opacity
|
|
194
|
-
CPU versus GPU surface height at camera position
|
|
195
|
-
```
|