Skip to content

Skybox 天空盒

基本用法

通过SkyBox构建天空盒

制作天空盒步骤

1. 获取HDR资源

前往 https://polyhaven.com/zh/a/rustig_koppie 下载HDR资源,也可以到其它网站获取 也可以使用NVIDIA提供的AI工具生成HDR:https://www.nvidia.cn/studio/canvas/

2. 将HDR资源拆分为盒子资源

前往 HDRI to CubeMap备用地址】将HDR资源拆分为盒子资源

3. 对盒子资源进行二次处理

字段名别名旋转角度
pxRight逆时针90
nxLeft顺时针90
pyBack不变
nyFront顺时针180
pzUp不变
nzDown顺时针180

API

Options

属性名说明类型默认值
sources天空盒资源ISkyboxSource-
visible显示状态(true显示 false隐藏)booleantrue

Static Options

属性名说明类型默认值
baseURL基础目录string-

ISkyboxSource

方法名说明类型
positiveXstring
negativeXstring
positiveYstring
negativeYstring
positiveZstring
negativeZstring