8
$\begingroup$

How can I control the colour of the lines in the grid?

So far I've figured out how to change the colour of the darker lines, but there are a set of lighter lines that appear every ten spaces.

Blender User Preferences - 3D View

As shown in the screenshot there is a way to control the colour of the grid lines, I've experimented with this a little and the colour of the lighter grid lines appears to be linked to the colour that you set for the darker grid lines, but I would like to control this independently, perhaps making it a much brighter shade than the darker grid lines. Is this possible? I would hope that one of the other colours in there would control it, but I don't know which one.

$\endgroup$
3
$\begingroup$

You can't control the smaller grid-spacing values, these use an alpha value which is automatically calculated based on zoom level and the lightness of the grid-color (in orthographic mode).

Blender is calculating the color automatically and isn't giving you control.

$\endgroup$
  • $\begingroup$ I can't see how zoom level influences the the alpha value, how does that work? are you refering to the viewport zoom level that is controllable via the mouse wheel? I've found a way to make the lighter grid lines lighter by experimenting with the grid colour value, but i'm not sure what the rules are, setting it to hex 333333 give good results for me $\endgroup$ – user1595 Aug 6 '13 at 5:49
  • $\begingroup$ Changing the zoom level of the viewport doesn't make any difference to the colour of the grid lines $\endgroup$ – user1595 Aug 6 '13 at 6:26
  • $\begingroup$ It does in orthographic mode, edited answer. $\endgroup$ – ideasman42 Aug 6 '13 at 6:46
3
$\begingroup$

I've found that the only way to get the lighter grid lines to have a greater contrast to the darker ones is to experiment with the the grid colour until it looks right.

After playing with the colour picker I found that the hex value 2C2C2C causes the contrast to go the other way and make the lighter grid lines black, but this was not to my tastes so I settled with the hex value 333333.

333333 results in the darker grid lines being not so dark as to be invisible and the lighter grid lines to have a higher contrast to the darker ones. The default was 404040.

User Preferences - 3D View grid set to hex 33333

Below is what the grid looks like with that grid colour set to hex 333333

Blender - 3D View grid set to hex 33333

In the scaled screenshot it's hard to see the darker grid lines, but they are visible if you look at the image at full size.

Here is what the grid looks like with the grid colour set to 2C2C2C

Blender - 3D View grid set to hex 2C2C2C

$\endgroup$
  • 1
    $\begingroup$ Since you are going into a lot of effort to find how this works, the C source code is source/blender/editors/space_view3d/view3d_draw.c, drawfloor() function. See how col_grid_emphasise is calculated. $\endgroup$ – ideasman42 Aug 6 '13 at 7:15
  • $\begingroup$ @ideasman42 heres a link to the file used in the version of blender I have installed view3d_draw.c what would I need to do if I wanted to change the way that works and get it included in the official release? $\endgroup$ – user1595 Aug 6 '13 at 13:27
  • $\begingroup$ first you should let us know the problem that you try to solve. Why the current behavior is not good. Making the change is fairly simple on its own. $\endgroup$ – ideasman42 Aug 6 '13 at 17:08
  • $\begingroup$ @ideasman42 how does that work? is there a form on the blender site that needs to be filled out, or does one need to send an email to someone? Who decides which features are added to blender, is it possible for a random person to make a change to the source code and submit it for review and possible inclusion in the release? $\endgroup$ – user1595 Aug 7 '13 at 0:09
  • 1
    $\begingroup$ We don't have a formal process: see, blender.stackexchange.com/questions/1190/… $\endgroup$ – ideasman42 Aug 7 '13 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy