Hot answers tagged

17

To run Blender on a machine without OpenGl support, you would need to: Download the opengl32.dll or opengl64.dll from this link: http://download.blender.org/ftp/sergey/softwaregl/ Copy and paste the dll next to your blender.exe (the directory would typically be: C:\Program Files\Blender Foundation\Blender) Run Blender This enables Blender to open with ...


15

It is possible, in a round-about way. Operator render.opengl() needs OpenGL display context, i.e. Blender's window, to be opened. Hence, we can't do UI-less rendering using -b command switch. We'll need to do it through a script: import bpy import sys # read argument from sys.argv from bpy.app.handlers import persistent @persistent def ...


14

Blender requires OpenGL 3.3, however we may take advantage of newer OpenGL versions too. So while Blender depends on 3.3, it may use newer features when available and fail gracefully if they are not (as opposed to crashing or not starting at all). Note that some features are user preferences too since we can't always rely on asking the driver if a certain ...


10

This can be solved relatively easily, but you may have to make minor changes elsewhere to keep the crisp shadow edge as pictured here, only without the anti-aliasing This is the type of shadow that you have now. and I assume this is closer to what you want. You can achieve this simply be changing the shadow casting setting on your shadow emitting lamps ...


10

just go to: view--viewport render


9

All the available OpenGL calls exposed in the bgl API are: https://www.blender.org/api/blender_python_api_current/bgl.html (or in https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/python/generic/bgl.c without the gl prefix) It has a few OpenGL 2.0 calls, but not even all I think. It's easy to extend it to specific functions, but we ...


9

In Blender 2.76 or later you can render a Scene Strip in the VSE using OpenGL by hitting one of the two Buttons next to "Use Backdrop". The left one will render a single frame, the right one the entire animation. In case you want to have transparency for the VSE OpenGL render, it seems you have to set the alpha mode of the OpenGL render options to ...


9

As you have noticed, drawing bgl is relative easy. For trivial stuff many settle for immediate mode, because the overhead in their drawing routine is never noticed (either a really fast processor, or simply minimal drawing instructions). As soon as you crank up the amount of geometry and complexity of the drawing call, you will need to think about ...


9

Your method makes a new instance. What you want to do is make some kind of global variable for dc. Could declare a global variable, make a get set property on some blender class. Another way to do this is to use the driver_namespace import bpy import blf class DrawingClass: def __init__(self, context, prop): self.prop = prop self....


8

Blender uses OpenGL for (basically all drawing)... Drawing the 3D view-port. Drawing all parts of the interface (buttons, color wheel, menus etc). Off screen OpenGL rendering is used for 3D view-port render and preview rendering scenes in the sequencer and view-port lamp-shadows. Shader nodes display as OpenGL GLSL shaders in the view-port. The GameEngine ...


8

You have to call Scene.frame_set() instead of setting the property Scene.frame_current: bpy.context.scene.frame_set(234) Only frame_set() updates animation data correctly. frame_current is mostly intended for reading access to determine the current frame. Following example renders frame 0, 230, 99 and writes them to the disk as test_000.png, test_099.png ...


8

Here is a basic bgl and blf example based on this answer: import bpy import bgl import blf import math # based on http://slabode.exofire.net/circle_draw.shtml def draw_circle_2d(color, cx, cy, r, num_segments): theta = 2 * 3.1415926 / num_segments c = math.cos(theta) #precalculate the sine and cosine s = math.sin(theta) x = r # we start at ...


7

The main problem is that baking with Cycles is still fairly new, less than one year at the time of writing. Blender's various exporters were designed before this and they are built upon the older Blender Render(Internal) Material system. Here is a print-screen of the main Blender Render Material System. Although BI has nodes as well, I'm not so sure they ...


6

Blender has no ties to a specific version of OpenGL. For the entire GUI it even still sticks to the OpenGL 1.4 standard, which is now over 12 years old and can be expected to run fine on all modern 3d hardware.


6

Blender 2.77 is the first version to require OpenGL 2.1. Blender 2.8 (planned for 2016) will be the first to require GL 3.2 core profile. Like ideasman42 explained, Blender can use GPU features higher than the required minimum, but it must check first at run-time. This has been true for a long time and will continue to be true. Regarding the ES part of ...


6

You could fake it with 3 additional ortho cameras layered in the VSE with scale transform effects arranged in a quad display. It renders super quick.


6

You would have to render a Freestyle pass with the Line Set Silhouette selected on the left and Crease selected on the right, and change to Logical AND on the right. This would trace a border stroke around the visible perimeter of the object, like tracing the alpha edge. You'd have to composite this over your OpenGL render, as you can't generate Freestyle ...


5

To render just your model without any lights, cameras, empties, or armatures getting in the render; simply turn on Only Render. The Only Render checkbox is in the Properties panel N under the Display category.


5

You can print the current settings to a console with a simple script: import bpy def round_vec3(vec): return tuple(map(lambda c: round(c, 3), vec)) solid_lights = bpy.context.user_preferences.system.solid_lights for i, light in enumerate(solid_lights): print() print("Light %i:" % i) print(" Use:", light.use) print(" Direction:", ...


5

All the game properties stored in the object that calls the Filter 2D are passed to the shader as uniforms. So if you have a width and a height float game properties you can set their values at run-time to match the window size. However, be aware that the window size (which you get from render.getWindowWidth() or render.getWindowHeight()) is not the buffer ...


5

AFAIK netrender doesn't support this, as there is no opengl "render engine" defined in blender (as you noted). There is an opengl render operator, but it is not defined as a formal render engine. However there is a simple alternative approach you might be able to use. See the following questions: Render on more than one computer? Cycles Netrender Returning ...


5

bgl callbacks The modal part of your operator needs to return something each time it's called, in the case of an exception that is probably return {'CANCELLED'}. Most exceptions are not fatal, but exceptions in bgl callbacks can be. One crash is one too many, you might have to stick in a try/except (with traceback), at least until you find the cause of the ...


5

Viewport speed: The final displayed mesh is the same regardless of if you apply the modifier or not. Applying it will cost you the ability to have different settings for viewport and render for modifiers that do that, such as on the subsurf modifier. Scene update (opening file, changing frames, etc): Applying bakes in the modifier, so it doesn't need to be ...


5

here an example about how you can use the glReadPixels + mouse events; I did some changes to code from https://blenderartists.org/forum/showthread.php?362427-3D-coordinates-of-the-mouse import bpy import bgl from bpy_extras import view3d_utils import mathutils """Functions for the mouse_coords_to_3D_view""" def get_viewport(): view = bgl.Buffer(bgl....


5

Blender doesn't have way to directly interpret GLSL shaders. You can, however, use a BGE python script that tells blender to use a particular shader during a game's runtime. To do this you will need two things: your GLSL shader formatted in the following way (inside of a text datablock)... import bge cont = bge.logic.getCurrentController() VertexShader = ...


5

According to the API, Area.region collection holds all "regions of the screen area" as well as their dimensions. In case of the 3d Viewport: Header, Transform Panel and N-Panel. The following code is based on this answer, extended with a simple calculation to get the correct position of the text in the 3d Viewport. Notice that you can also iterate through ...


5

It appears they are now where all the render options are - in the Properties Editor, Render Tab: It seems you can also set different settings for the viewport when in 'Solid'mode and have different ones for 'Rendered' mode only. You can do that from the header of the 3d Viewport: OpenGL render is now accessible from the header of 3d Viewport, Viev menu:


5

Update your graphics card drivers, if Blender works, your graphics card supports required OpenGL version if not, it doesn't. In this particular case a quick Google search reveals that Intel HD Graphics 2000 Adapter supports only OpenGL 3.1. This means the graphics card will not be suitable for running Blender 2.80. The good news is that pretty much any ...


5

I don't think the Blender Voronoi has access to quite the same parameter as the one illustrated. Typical shader-Voronoi is based on the distances between randomly placed points, one to a cell, in a regular grid of rectangular cells. I think the specific 'wobble' effect you show is based on smoothly varying the positions of those points within the cells, ...


4

Blender Internal BI never had any kind of GPU rendering support, and as development on BI has stopped, probably never will. Cycles Cycles only supports cuda at the moment, due to issues with amd/ati drivers. (also see the wiki) However, there are some experimental tests using the "leaked beta version of what might be AMD's next official drivers" ...


Only top voted, non community-wiki answers of a minimum length are eligible