程序化星空生成器
Space 3D,Rye Terrell (wwwtyro),2015 年

正在布展…
它是怎么做的
- 第 1 步种子决定随机数序列,保证同一种子结果一致
- 第 2 步先在立方体的六个面上用点精灵渲染大量暗星
- 第 3 步星云用多层三维噪声在着色器中按方向采样并上色叠加
- 第 4 步少量亮星用带光晕的着色器绘制
- 第 5 步结果烘焙到立方体贴图,用作可旋转的天空盒或导出 PNG
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Use a seeded PRNG so a text seed always yields the same sky. For each of the six cube faces, render into a framebuffer: first thousands of tiny point stars at random directions, then several additive nebula layers computed in a fragment shader from 3D fractal noise sampled by the view direction with a random colour and offset, then a handful of bright stars with soft radial falloff. Store the six textures as a cubemap and display it on a skybox the user can orbit, with an export button that saves each face.
档案
能不能拿来用
原作以 Unlicense 许可开源:可以阅读源码学习,按许可证条款使用;在自己的项目里引用时保留原作者署名。
性能开销
视觉强度
实现难度
尺度为策展判断(1 到 5),用于比较和推荐。
核实记录:Opened https://wwwtyro.github.io/space-3d (200); repo wwwtyro/space-3d exists, licence Unlicense via GitHub API.


