Skip to main content

All Questions

Tagged with
0 votes
0 answers
13 views

Save an image of an area by it's index [duplicate]

General Question: Is there a way to capture a raw image, so no overlay or gizmo, of an area within Blender only by its index? I would need a script that writes the pixels of the area to an image ...
Erasers45-Studios's user avatar
0 votes
0 answers
29 views

Copy framebuffer of 3D View into image

General Question: How can I copy the frame buffer of the currently active viewport to an image within Blender? The following link already addressed the question, however it utilizes a modal operator ...
Erasers45-Studios's user avatar
1 vote
1 answer
52 views

Unable to read depth from buffer when offscreen rendering

I'm trying to read the depth buffer from a frame buffer during offscreen rendering using the gpu.types.GPUFrameBuffer.read_depth() function from the gpu module. No ...
Sandroid's user avatar
2 votes
1 answer
95 views

Drawing a circle that faces towards the view with GPU/BGL?

Im trying to draw a circle using the GPU/BGL module that appears on a given certain 3D position (in my example, the cursor's location) and, when drawing, it points towards the current view. I'm using: ...
Ommadawn's user avatar
  • 648
4 votes
3 answers
422 views

How to draw a specific color with gpu shader

This is a bulid-in shader of gpu module to display a 2D rectangle in viewport, if you check the color of the rectangle via photoshop/MSpaint or use ...
X Y's user avatar
  • 6,213
1 vote
0 answers
218 views

Custom render engine - creating material previews with OpenGL?

I'm working on a custom render engine through a Python addon that uses the bgl module for most of its rendering. bl_use_preview ...
hayden0729's user avatar
0 votes
1 answer
326 views

How to force draw_handler_add?

I have a draw function inspired from this answer: ...
cak3_lover's user avatar
0 votes
0 answers
78 views

How to directly store Blender File Images Externally?

I'm using this answer to generate images from view port but is there a way to directly externally store/generate this image? and by that I mean NOT having to manually save them through Image Editor
cak3_lover's user avatar
2 votes
1 answer
545 views

Drawing to multiple render targets using the GPU module

Is there a way to draw to multiple render targets at once using the Blender's GPU module? I am looking for something similar to glDrawBuffers in OpenGL. Say, for example, my fragment shader looks like ...
QuantumCoderQC's user avatar
2 votes
0 answers
597 views

Dashed Lines GLSL Even Sizing

I'm working on a dashed line shader in a Blender add-on and my aim is to get all lines, regardless of length, to have the same sized dashes and dash spacing. GPU shaders are relatively new to me so I ...
Dan's user avatar
  • 83
0 votes
1 answer
778 views

How to get a list of faces with corresponding indices?

I am trying to get a list of faces that has each index of the 3 vertices that go with it. I thought about just doing it from scratch but they are kinda in random order. I am looking for a list that's ...
CloudlessStudio's user avatar
1 vote
0 answers
172 views

How can I make objects created with the GPU Module visible in the final render?

I used the code example for creating a triangle with custom shader from the official docs: ...
Squis's user avatar
  • 111
0 votes
0 answers
355 views

Rendering opengl image and then saving to a filepath

Need help solving how to render an image and then save to a filepath while in a loop. The following takes a photo and exports; however it isn't rendered. ...
Fano Fano's user avatar
3 votes
3 answers
1k views

How to make rounded corners for 2d rectangle with a custom shader?

Does anyone know how to make rounded corners for a 2d rectangle with a custom shader? ...
Karan's user avatar
  • 2,381
1 vote
0 answers
557 views

Drawing a rectangle using opengl in blender

I'm learning opengl in blender and successfully drew a triangle in 3d viewport. Now I'm trying to draw a rectangle using Element Object. Here is what I've tried. But it draws nothing. ...
Me BMan's user avatar
  • 175
4 votes
2 answers
2k views

Fastest way copying from bgl.Buffer() to numpy array

I have some rendered or processed pixel data in a bgl.Buffer() object and need it in a numpy array but that proccess seems to take very long. Here is what I have tried so far: ...
Gottfried Hofmann's user avatar
9 votes
1 answer
781 views

Anti-Aliasing in GPU shader Module(OpenGL)

How to smooth the bound of the shape? If you run the following script in blender, you can see the Jagged Edge in that shape. ...
X Y's user avatar
  • 6,213
0 votes
1 answer
87 views

why bgl meshes flip when nothing is selected?

As described in API the following script will create a mesh from active object using bgl module: ...
MohammadHossein Jamshidi's user avatar
0 votes
0 answers
407 views

capture data from different cameras

I need this for my video game that I want to start on in Blender Game Engine. I have not figured out how to use multiple cameras and make them give data out without them being active cams or without ...
user104998's user avatar
10 votes
2 answers
2k views

Copy framebuffer of 3D View into custom frame buffer

General question: Is there a reliable way to directly access the OpenGL framebuffer of a View3D for copying? (Please see the end of the post for more detailed questions) I need a very fast way to copy ...
reg.cs's user avatar
  • 488
5 votes
0 answers
322 views

Custom shader script in compositor (de-linearize depth buffer)

Some months ago I wrote a minimal opengl 2.5d game engine with pre-rendered backgrounds (such old Resident evil, Alone in the dark and Final fantasy games). Depth is managed through a grayscale image ...
NickRay1184's user avatar
1 vote
1 answer
709 views

Fast streaming camera view to video for linux (v4l) system device

What i'm trying to achieve is to stream an arbitrary camera view in blender to a v4l device. What i've done so far After reading the community post about streaming the Eevee view on Windows and linux, ...
g3n35i5's user avatar
  • 63
4 votes
1 answer
1k views

Is there a way to render depth buffer into a texture with GPU/bgl python modules?

I need to render depth buffer of Blender's scene into a texture to further use it my shaders. I tried using the common OpenGL recipes for doing that, but none of them worked as it seems there is ...
D. Skarn's user avatar
  • 695
2 votes
0 answers
205 views

Rendering depth buffer to texture using BGL fails on FBO drawing

I am writing a custom render engine for a level editor addon with GPU / bgl modules. I need to render a depth buffer to texture to later use in my shaders. I tried the way it is usually done with ...
D. Skarn's user avatar
  • 695
1 vote
0 answers
210 views

I need a handler for render_complete but with OpenGL render

Is there a handler to execute a function after an OpenGL render (after the whole animation is rendered). Because this script ...
mugnozzo's user avatar
  • 1,237
2 votes
1 answer
644 views

How to draw RGBA 2D image in 3d_view with gpu module (or without)?

I just copied and pasted from https://docs.blender.org/api/current/gpu.html#d-image: ...
Cyril Blake's user avatar
1 vote
0 answers
351 views

Render order of triangles is wrong with custom draw handler

Example code from GPU Shader Module (gpu) "Mesh with Random Vertex Colors" renders faces in wrong/weird order, what might be the cause? ...
KJS's user avatar
  • 237
6 votes
1 answer
507 views

How to make voronoi move like living ants?

In Twitter link below, I saw this work by Joe Gatling a few days ago. His voronoi moves like live bugs. How do you create that in Blender? Moving ants with voronoi. Edit. I'm back. I've just ...
Rita Geraghty's user avatar
4 votes
1 answer
357 views

2D 'POST_VIEW' drawing with gpu.types.GPUShader(vertex_shader, fragment_shader)

I can use gpu.shader.from_builtin("2D_UNIFORM_COLOR") to draw a square to a view (the nodeview), and give it a single color, but I want to use a custom shader. Does ...
zeffii's user avatar
  • 39.7k
0 votes
1 answer
313 views

How to highlight a polygon or a vertex under the pointer in Python?

I am trying to figure out how to highlight a polygon or a vertex that could be under the mouse pointer in Python for 2.80. The highlighting is just a visual indication. I realize that I will be ...
yarun can's user avatar
  • 428

15 30 50 per page