[Bf-committers] Background gradient for 3D viewport

Campbell Barton ideasman42 at gmail.com
Sun Jan 6 12:35:34 CET 2013


On Sun, Jan 6, 2013 at 12:45 PM, Antony Riakiotakis <kalast at gmail.com> wrote:
> Hey Campbell, nice :)
>
> I tested the sphere case and it needs a lot of subdivisions to make
> gouraud artifacts invisible (To check this quickly you can add a
> sphere and a simple gradient texture).

Not sure how this applies, the patch I posted doesn't use a sphere, at
some points you can notice that its a 16x16 grid, though the camera
angle has to be set wide for this and looking up/down, in practice I
dont think its much of a problem.

>  My suggestion would be to
> either use a shader for this or 3 quads (one nadir colour, one zenith
> colour and one with blend between them) and draw based on angle of
> viewport z axis with world z.

Shader is probably best, drawing a gradient on a quad has the problem
that you cant properly draw the top or bottom of the sky (if I
understand your suggestion)

> The patch you posted is oriented towards drawing the world settings in
> the viewport. So a question is: Is this simply a cosmetic and
> orientation indication, or something more tied to the world settings?
> Possibly all three can be added but we'd better define this.

The reason I was interested in this patch was because it does help a
bit with orientation & view navigation, however its problematic since
high contrast between horizon/zenith means there will be some parts of
the view that don't contrast enough with
wire-frame,selection,groups... etc.

Basically if the horizon is contrasting enough to be useful for
navigation then it makes it hard to see what you work on at certain
view angles.

In that case it could be used only when `Only Render` is enabled -
since this option already assumes you want to view your scene without
overlay data... but it makes the option less appealing to me to have
added which is why I didnt follow up on the patch in the tracker.

-- 
- Campbell


More information about the Bf-committers mailing list