Modifying Skybox effect

Hi

Is it possible to edit the effect being used to render skybox during runtime and beforehand?

For example to change the diffuse color of the skybox.

I’m afraid it’s not supported yet, it will be possible after the post effect process planed for v3.2.

Maybe you can try to wrap the whole scene in a sphere, and set the sphere with a semi transparent material to give the skybox an additional effect, remember the cull mode should be inversed.

Thanks for the info.

I guess I could also wrap the scene in a Cube/Sphere to create my own skybox. Probably not the optimal way though.

Is it possible yet to change the whole skybox texture during runtime?

yes, you can access to it by

director.getScene().globals.skybox.envmap = newTexCube;

Related APIs

https://docs.cocos.com/creator/3.0/api/en/classes/scene_graph.scene-1.html#globals
https://docs.cocos.com/creator/3.0/api/en/classes/scene_graph.sceneglobals.html#skybox
https://docs.cocos.com/creator/3.0/api/en/classes/scene_graph.skyboxinfo.html#envmap

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.