Skip to content

Revert "[3D] Add gradient background to 3D scene"#65933

Open
wonder-sk wants to merge 12 commits intomasterfrom
revert-65820-add-gradient-background
Open

Revert "[3D] Add gradient background to 3D scene"#65933
wonder-sk wants to merge 12 commits intomasterfrom
revert-65820-add-gradient-background

Conversation

@wonder-sk
Copy link
Copy Markdown
Member

Reverts #65820 per Nyall's request

This reverts commit f011ca5.
…be, rename camera and skybox to just camera"

This reverts commit d15b34d.
This reverts commit e1924de.
This reverts commit 41de612.
… the gradient and skybox entities - gui modifications, use combobox to switch between skybox and gradient background - shader mixes top bottom colors"

This reverts commit 8da2a92.
@github-actions github-actions Bot added this to the 4.2.0 milestone Apr 26, 2026
@github-actions github-actions Bot added GUI/UX Related to QGIS application GUI or User Experience 3D Relates to QGIS' 3D engine or rendering labels Apr 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit f6bfdbf)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit f6bfdbf)

@nyalldawson
Copy link
Copy Markdown
Collaborator

@wonder-sk Sorry for the hassle - let's avoid the revert here, I think we can do the cleanups as follow ups.

My outstanding issues are:

  1. From an API perspective, I would really like to see the background settings exposed as a subclass of QgsSkyboxSettings (or just settings within that class, since it's a messy class anyway at the moment!). In https://github.com/nyalldawson/QGIS/tree/asset_3d I'm moving toward replacing Material settings with more generic "3d assets" in the style library, in order to allow us to store skybox setups in the style library. And it would be very nice if this also allowed storage of the background gradient settings too!
  2. I would really love us to use QgsGradientColorRamp here instead of the limiting 2-color gradient approach. We have very nice widgets for configuring gradient ramps, and I can definitely see a use case for more than 2 color background gradients (eg fake sunsets)

@nirvn
Copy link
Copy Markdown
Contributor

nirvn commented Apr 27, 2026

Big +1 on point nb 2 :)

@uclaros
Copy link
Copy Markdown
Contributor

uclaros commented Apr 27, 2026

Please keep in mind that the gradient background is not a skybox. It's supposed to be just a background to make working with the 3d view more comfortable. It does not follow the camera and should not be used to stylize the 3d view for presentation, that's what the skybox is for.

My take would be to keep the gradient background as a simple 2 color gradient and move its setting to a project wide setting. To me it is a slight extension to the existing background color project setting and should be treated the same. So no per 3d view configuration of colors. In the 3d view's settings one would only pick whether he needs a skybox rendered on top or not. Bonus is we keep the project xml tidier - less items in the 3d views' xml.

For stylizing a 3d scene we should guide users into using the skybox instead. I know finding and tweaking a sunset skybox is much more complicated than picking a few colors and ramp, so instead of "abusing" the background gradient for that, we could add a "dynamic skybox" option.
User would define a QgsGradientColorRamp and the skybox image would be generated on the fly for it.

@ViperMiniQ
Copy link
Copy Markdown
Contributor

Sorry if it hasn't been communicated clearly, but it is a static background, not a texture that is applied on the Skybox, like @nyalldawson you showed in your working branch for the color ramp approach.

Screencast_20260427_121546.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3D Relates to QGIS' 3D engine or rendering GUI/UX Related to QGIS application GUI or User Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants