@@ -1653,6 +1653,28 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
16531653 camera->set_attributes (camera_attributes);
16541654 }
16551655
1656+ // Use a grayscale gradient sky to avoid skewing the preview towards a specific color,
1657+ // but still allow shaded areas to be easily distinguished (using the ambient and reflected light).
1658+ // This also helps the user orient themselves in the preview, since the bottom of the sky is black
1659+ // and the top of the sky is white.
1660+ procedural_sky_material.instantiate ();
1661+ procedural_sky_material->set_sky_top_color (Color (1 , 1 , 1 ));
1662+ procedural_sky_material->set_sky_horizon_color (Color (0.5 , 0.5 , 0.5 ));
1663+ procedural_sky_material->set_ground_horizon_color (Color (0.5 , 0.5 , 0.5 ));
1664+ procedural_sky_material->set_ground_bottom_color (Color (0 , 0 , 0 ));
1665+ procedural_sky_material->set_sky_curve (2.0 );
1666+ procedural_sky_material->set_ground_curve (0.5 );
1667+ // Hide the sun from the sky.
1668+ procedural_sky_material->set_sun_angle_max (0.0 );
1669+ sky.instantiate ();
1670+ sky->set_material (procedural_sky_material);
1671+ environment.instantiate ();
1672+ environment->set_background (Environment::BG_SKY );
1673+ environment->set_sky (sky);
1674+ // A custom FOV must be specified, as an orthogonal camera is used for the preview.
1675+ environment->set_sky_custom_fov (50.0 );
1676+ camera->set_environment (environment);
1677+
16561678 light = memnew (DirectionalLight3D);
16571679 light->set_transform (Transform3D ().looking_at (Vector3 (-1 , -2 , -0.6 ), Vector3 (0 , 1 , 0 )));
16581680 base_viewport->add_child (light);
0 commit comments