Is there a way to render an animation that looks like as if it is rendered with the OpenGL lights (View-port lights)? The view-port lighting is very useful for me for viewing objects and I like its lighting system, which made me wanting to replicate it into my animation renders. For example, I would use this when I want to render a scene with view-port lighting results and at the same time if I want to display some features from the blender internal or cycles render engine. For view-port render there is a view-port render button -  

However, the view-port rendering does not feature features from both render engines. 


Is there a way to replicate the view-port rendering so that an animation looks as if it is rendered with the view-port rendering button?
Can you tell which part is Cycles and which is viewport render? ;)



Unfortunately blenders normal ball widgets don't have any way to set values numerically (yet), so you'll have to use some python to get and set the values.


Get the default openGL lights from the user-preferences. To do this, run the following in the python console:

for light in bpy.context.user_preferences.system.solid_lights:
    print(light.direction)


It should print something like

&lt;Vector (-0.8920, 0.3000, 0.9000)&gt;
&lt;Vector (0.5880, 0.4600, 0.2480)&gt;
&lt;Vector (0.2160, -0.3920, -0.2160)&gt;

Create a material and add three normal nodes, then run

bpy.data.materials['openGL'].node_tree.nodes['Normal.001'].outputs[0].default_value = (0.5880, 0.4600, 0.2480)


Where openGL is the name of the material, Normal.001 is the name of your normal node, and (0.5880, 0.4600, 0.2480) is the direction you want to set it too. Do this three times, changing the the node and direction until your three normal nodes look like the light widgets in the user preferences.
Copy/paste the diffuse colors from the user prefs into RGB nodes in your setup:



Note that you can copy/paste colors by pressing &#9096; CtrlC/&#9096; CtrlV while hovering over a color field, but make sure the correct window is focused when going between multiple windows.
Setup the rest of the nodes, and enjoy your path-traced openGL renders :P