Gradient Skybox

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By djmick

How would I create a gradient skybox, with stars such as this one:

:bust_in_silhouette: Reply From: sash-rc

As a simplest option, draw skybox in painting application (with panoramic projection) and use it in Environment - background - sky - panorama.

The problem with that though is that it creates a massive line in the sky. Do you know how to write a shader for the sky maybe?

djmick | 2021-08-19 16:33

Can you take a screenshot of the line in the sky, upload it to a website like Imgur and paste the link as a comment here?

Do you know how to write a shader for the sky maybe?

Sky shaders will only be supported in Godot 4.0, not Godot 3.x.

Calinou | 2021-08-20 01:16

:bust_in_silhouette: Reply From: 廉价喵

Create a WorldEnvironment node, set property Background - Sky - Sky Material = PanoramaSkyMaterial

Then set property PanoramaSkyMaterial - panorama = GradientTexture2D, set your custom gradient, finished.

As for stars, i think you can draw some animated sprites, then place several animated sprites on high pos with billboard shader.

Version: v4.0.rc2.official [d2699dc7a]

:bust_in_silhouette: Reply From: magicalogic

To create the panorama sky texture without any stretching at the top or bottom or any seams, you can create it procedurally in blender using the shader node editor and apply it to a sphere then render it in cycles using a panoramic camera of type equirectangular to an output image with an aspect ratio of 2:1, like 2048*1024.

If anyone is interested in this workflow and need full explanation, comment below.