Viewport background gradient

Hi all. I know I shouldn’t do this because silly UI debates have been going on forever, but I made a little eyecandy feature for you to try if you wish.

Code is at https://github.com/Psy-Fi/psy-fi_blender/tree/bg_gradient

Here’s a video demonstrating the feature.

The gradient is currently static, no zenith/nadir information is used. Not knowing how it is usually implemented I could use some feedback there.

Nice! But having another checkbox in User Prefs could be avoided by using the same color for up and down. Or maybe moving it to theme panel…

I’ll patch my blender right now, thanks!

PD: can I extract the a patch from github, or do I have to checkout whole blender?

You can surely check the code of the commit (and copy it to a patch file, if you are feeling brave) here https://github.com/Psy-Fi/psy-fi_blender/commit/c50e9cac5b16b5e4117f9a7813806a6f8586beaf
I’m not sure you can take the diff without cloning the whole repository somehow.

Having a checkbox is a matter of performance (depth buffer is cleaned alongside the colour buffer if the option is off and separately when it is on). Also getting the same colour for both boxes can be tedious.

Edit: made an svn patch here: http://www.pasteall.org/38562/diff

Hey man Thanks! :slight_smile: Love it!

LOL, you even added a smiley-face. While at the very same time I was arguing against it (sort of) on the mailing list:

This idea always seems to evolve in the same way…

There are many people that will argue that there is an ergonomic benefit to having a gradient background. This might be true or it could just be that it just looks cooler or reminds of us of other apps. So we try it with a gradient and it looks cool and seems better somehow.

But then someone says “Hey, shouldn’t the gradient change as you change and tilt the view?” And that seems logical too. And that also seems better somehow, and cooler, and might help in giving a better sense of orientation.

But I think that the second idea negates the first. If the assertion is that the gradient helps with modelling then it shouldn’t get lighter, stronger, or reverse depending on the orientation. In fact there wouldn’t be a gradient at all if you are looking straight down.

And this will cause people to divide into three camps: those who want the ergonomic benefit, those that want the more realistic view, and those that see no real benefit in any of this. And since there isn’t a real winner between these we’ll discuss it to death until we all get tired of it and move onto something else.

yayyyyyy nice, beautiull thanks Psi-Fi, :yes:

what a shame that I can not compile, so wait for someone else to do

It’s building fine by me. It’s nice when we navigate but for front view, side view, … it’s not readable I think, there always a color in the gradian BG that is the same as the grid color.
Maybe disable the gradient in this view??

If you run Windows and just want to test this you can use this build:
http://www.hacheson.com/files/_hidden/blender-gradient.zip

It is bare-bones 32-bit Windows build from trunk (yesterday I think) plus @Psy-Fi’s patch

Seems the implementation for this thing on other software differs. Silo seems to have it locked so it’s really just a cosmetic thing. Modo uses it more to fake having a distant horizon, which is probably useful since you can kind of change the ground plane or whatever. I kind of like Modo’s implementation better. Some video examples I snagged randomly:

Don’t forget that modo is made by Digital Domain…

Modo is made by Luxolgy/The Foundry

Nice job Psy-Fi, this definitely deserves to be in Blender, assuming the code is up to snuff and all. I really like it a lot. :slight_smile:

This is an old patch that does gradient/background.
http://www.graphicall.org/ftp/ideasman42/blender_gradient_orientation.png

Patch:
http://projects.blender.org/tracker/?func=detail&aid=22747

Edit:
Committed, works with ‘Only Render’
http://markmail.org/message/j33badj6vwwe6noa

Combo attack. Cosmetic gradient committed too, enable in user preferences under themes->3D view->Theme Gradient Color. Only used when ‘Only Render’ is off

This is great. I love that the two things are separated: cosmetic gradient from proper horizon display.

For the cosmetic gradient my only comment is that it is not obvious that it goes from “Window Background” (TH_BACK) on top to “Gradient Color” (TH_BACK_GRAD) at the bottom. On the Theme preference page these two colors are in different sections. So a casual user would just turn on “use gradient”, select a color and get a gradient from dark grey to the color they’ve picked, not realizing that it can be from red to blue (or blue to red) or any other gradation.

On the Theme preference page could we not just have two color preferences close together: “3D background top” and “3D background bottom”? By default they could be the same so there would be no gradient. It would then be obvious how it works and would eliminate the need for the “use gradient” checkbox.

Use gradient option is lenient to turn on/off quickly (like blend mode for sky) but I agree that the two colours could be closer together. The problem is designish. The theme colours are shown automatically and if i put gradient next to the window background colour, then both will be shown for every editor. Current solution is made so that only 3D editor has the option but it can be extended to more editors in the future. A solution for this quirk is that gradient could use its own colours entirely.

I just tried one of the newest builds with this option. I really like it! Thank you.
I have one small request. I use two colors which are quite close together and this causes some banding. Is it possible to add some dithering to prevent this? Or would this slow blender down too much?

Cool!
What would be also sweet for the future, texture background (ie for rotation of hdr environment).:wink:

Very nice! I hope it gets included into trunk.