The most efficient OpenGL Lights panel (with presets system)

Hello everyone,
Simple and effective access to Solid OpenGL Lights for your viewport. Comes with clean in simple interface and endless possibilities. No more fiddling with preferences and other similar confusing, complex and view obscuring addons!

Get it here while it’s fresh: https://raw.githubusercontent.com/uhlik/bpy/master/2.7x/space_view3d_opengl_lights.py

update: presets are now included with addon, they are created upon first activation, or when you delete all presets after restart.
j.

# change log:
# 2014.08.26 one more preset
# 2014.08.25 even more presets
# 2014.08.25 more presets
# 2014.08.24 added defaults, created when no presets are available
# 2014.08.19 first release

4 Likes

Excellent add-on carbon2, like I love them: clear and efficiante UI.
Congratulations
Spirou4D

EDIT: Thks carbon2 for the release yet more pro!

Wow! Such a nice, contrast presets!!
Now I can actually see my models in 3D viewports )))

Thank you so much for this!!




BTW, I’ve saved an empty default, and it gave me directory

C:\Users{Name}\AppData\Roaming\Blender Foundation\Blender
2.70\scripts\presets\opengl_lights_presets\

So, if you can’t find proper path, you need just to save default

@Sanctuary
yes, you’re right, i find QuickPrefs obtrusive, so i wrote this, i like simple standardized tools. And it is not a lite version, but competitor :slight_smile:
also i updated as you suggested, when activated for a fist time, presets are added. if you delete them all, defaults will be also added when blender is restarted. initially i wanted to include preset files with addon, but haven’t found a way to let them move to proper destination. now it works.
and also i included the real blender default, my fault, i am using this for such a long time (since 2.4x times) i forgot it differ a bit :slight_smile:

@1D_Inc
you’re welcome :slight_smile:
can you please explain it a bit more? how you saved empty default? what do you mean by that? no name for preset? you can’t do that, i am sure, preset system is blender own.

for everybody else, see first post for update.
j.

Thanks for the update, here are 3 additional light presets if you’re interested

warmshade.py
http://i.imgur.com/47V4PTCs.jpg


import bpy
l0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]

l0.use = True
l0.diffuse_color = (0.2734818160533905, 0.2734818160533905, 0.2734818160533905)
l0.specular_color = (0.24918273091316223, 0.24918273091316223, 0.24918273091316223)
l0.direction = (0.014084506779909134, 0.30985915660858154, 0.9506781101226807)
l1.use = True
l1.diffuse_color = (0.5999999046325684, 0.32110559940338135, 0.12558528780937195)
l1.specular_color = (0.12526345252990723, 0.12526345252990723, 0.12526345252990723)
l1.direction = (0.056338027119636536, 0.014084506779909134, 0.9983123540878296)
l2.use = True
l2.diffuse_color = (0.13792702555656433, 0.4015263617038727, 0.6601572036743164)
l2.specular_color = (0.06728240847587585, 0.0, 0.0)
l2.direction = (-0.2957746386528015, 0.7605633735656738, 0.5779798030853271)

bluedawn.py
http://i.imgur.com/u3o2KzBs.jpg


import bpy
l0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]

l0.use = True
l0.diffuse_color = (0.26847368478775024, 0.42352432012557983, 0.5927237272262573)
l0.specular_color = (0.4590410590171814, 0.4590410590171814, 0.4590410590171814)
l0.direction = (-0.4225352108478546, 0.2816901206970215, 0.8614607453346252)
l1.use = True
l1.diffuse_color = (0.5999999046325684, 0.4565461277961731, 0.28016602993011475)
l1.specular_color = (0.11451194435358047, 0.11451194435358047, 0.11451194435358047)
l1.direction = (0.3239436447620392, 0.6760563254356384, 0.6618219614028931)
l2.use = True
l2.diffuse_color = (0.2477761209011078, 0.259685754776001, 0.3079513609409332)
l2.specular_color = (0.10956870764493942, 0.0, 0.0)
l2.direction = (0.5099194645881653, -0.7052077651023865, -0.49260953068733215)

duskrain.py
http://i.imgur.com/EeQRcTts.jpg


import bpy
l0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]

l0.use = True
l0.diffuse_color = (0.5436685681343079, 0.32369518280029297, 0.20761273801326752)
l0.specular_color = (0.45796120166778564, 0.45796120166778564, 0.45796120166778564)
l0.direction = (-0.07042253017425537, 0.6760563254356384, 0.733476996421814)
l1.use = True
l1.diffuse_color = (0.47794559597969055, 0.5305657386779785, 0.6605422496795654)
l1.specular_color = (0.41900360584259033, 0.41900360584259033, 0.41900360584259033)
l1.direction = (-0.09859155118465424, 0.07042253017425537, 0.9926329851150513)
l2.use = False
l2.diffuse_color = (0.2861774265766144, 0.35667064785957336, 0.3350117802619934)
l2.specular_color = (0.3956288695335388, 0.36276519298553467, 0.38725683093070984)
l2.direction = (0.881772518157959, 0.2502327561378479, -0.39982590079307556)

Thanks for update!
Well, there was missing paths by default, but you could press “+” button to save default lighting with any name.
This action creates directory with default lighting preset (Win7 x64, B_2.70)
I just called it “empty default” instead “default” here)

@Sanctuary
Whoa)
Especially love your Warmshade setup. It is like an evening beach, sunset.
I feel myself like in Zbrush =)


Aww… that Gorgeous warm-cool shading^^
This addon is beautiful =)
I just feel how it saves my eyes…
I hope we’ll get it in the TrunkЪ!


This is very nice, thank you for working this up and sharing!

A bit of saturation tweaks of Warmshade preset gave this neutral Silver theme, similar to Mshade5, but with adjusted normals:

 import bpyl0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]


l0.use = True
l0.diffuse_color = (0.13286477327346802, 0.13286477327346802, 0.13286477327346802)
l0.specular_color = (0.24918273091316223, 0.24918273091316223, 0.24918273091316223)
l0.direction = (0.014084506779909134, 0.30985915660858154, 0.9506781101226807)
l1.use = True
l1.diffuse_color = (0.5551280975341797, 0.46653956174850464, 0.4044328033924103)
l1.specular_color = (0.12526345252990723, 0.12526345252990723, 0.12526345252990723)
l1.direction = (0.056338027119636536, 0.014084506779909134, 0.9983123540878296)
l2.use = True
l2.diffuse_color = (0.5526410937309265, 0.6069087982177734, 0.6601572036743164)
l2.specular_color = (0.06728240847587585, 0.0, 0.0)
l2.direction = (-0.2957746386528015, 0.7605633735656738, 0.5779798030853271)




for some reason it wont save my 2.XX’ish settings(blender 2.71) when i reload and choose them it reverts to blenders orig settings instead!

That’s normal behaviour.
Ctrl+Alt+U -> [Save User settings]

That’s normal behaviour.
Ctrl+Alt+U -> [Save User settings]

as 1D_Inc said, that’s normal and it is meant to like this, since main purpose for this addon (or i made it with this in my mind) is you can quickly change lights during sculpting to something else which fits to your current work. like matcaps. but they slows viewport with high resolution meshes. i am working with 3d scanned meshes, making cleanup work, and they have 5m+ of polygons…

update: more presets
Sanctuary and 1D_Inc, hope you don’t mind, i’ve included yours in default set of presets… (and added one more by myself :))

for everyone:
to update, if don’t want to lose your presets, the best would be move presets directory somewhere else, then put back only presets you want to keep, ‘opengl_lights_presets’ directory will be recreated on next launch. preset directory paths are:
OSX: /Users/{user}/Library/Application Support/Blender/2.71/scripts/presets/opengl_lights_presets/
Windows: C:\Documents and Settings{username}\AppData\Roaming\Blender Foundation\Blender\2.71\scripts\presets\opengl_lig hts_presets
Linux: $HOME/.config/blender/2.71/scripts/presets/opengl_lights_presets/
read more here: http://wiki.blender.org/index.php/Doc:2.6/Manual/Introduction/Installing_Blender/DirectoryLayout

hope i will not be responsible for messed up blender instalations :slight_smile:

Happy to see if my presets can be useful to anyone, nice silver 1D_Inc , the new bronze looks good too.
Thanks for the update, i noticed you forgot the warmshade preset, unless it’s intentional of course (no problem with me if you prefer not include it).
In sculpting i use the opengl lights change all the time to see better where i’m sculpting and the stroke effects, this addon is very helpful in that, as OpenGL lights are much faster than matcap when it comes to your sculpt reaching high poly.

This is great !!

If it can be useful to anyone, an attempt at trying a terracotta-like preset :
terralite.py
http://i.imgur.com/ZIAOhums.jpg


import bpy
l0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]

l0.use = True
l0.diffuse_color = (0.6399589776992798, 0.3488071858882904, 0.21334367990493774)
l0.specular_color = (0.21683719754219055, 0.21683719754219055, 0.21683719754219055)
l0.direction = (-0.028169013559818268, 0.563380241394043, 0.8257173895835876)
l1.use = True
l1.diffuse_color = (0.4103834629058838, 0.2880929708480835, 0.2370610237121582)
l1.specular_color = (0.13870155811309814, 0.19451864063739777, 0.27916958928108215)
l1.direction = (-0.43661969900131226, -0.3661971688270569, 0.8217437267303467)
l2.use = False
l2.diffuse_color = (0.47395893931388855, 0.19372320175170898, 0.144014373421669)
l2.specular_color = (0.3966449797153473, 0.41162633895874023, 0.3569863736629486)
l2.direction = (-0.2816901206970215, 0.11267605423927307, 0.9528665542602539)

ehm, no, just forgot on it… fixed now

Cool, thanks for the update :slight_smile:

A last one from me :
Fairclay.py
http://i.imgur.com/aV7X1XAs.jpg

import bpy
l0 = bpy.context.user_preferences.system.solid_lights[0]
l1 = bpy.context.user_preferences.system.solid_lights[1]
l2 = bpy.context.user_preferences.system.solid_lights[2]

l0.use = True
l0.diffuse_color = (0.6658555269241333, 0.6269639730453491, 0.5960634350776672)
l0.specular_color = (0.09707079082727432, 0.08657605946063995, 0.06600376963615417)
l0.direction = (0.5492957830429077, 0.3380281627178192, 0.7642061710357666)
l1.use = True
l1.diffuse_color = (0.2996516525745392, 0.2382955253124237, 0.16581720113754272)
l1.specular_color = (0.18277807533740997, 0.15225152671337128, 0.13868144154548645)
l1.direction = (-0.1267605572938919, 0.14084506034851074, 0.9818830490112305)
l2.use = True
l2.diffuse_color = (0.3464010953903198, 0.27249836921691895, 0.1859419196844101)
l2.specular_color = (0.1282370686531067, 0.10586366057395935, 0.09842190891504288)
l2.direction = (-0.7183098196983337, 0.3802816867828369, 0.5825948715209961)