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 ...
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 ...
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? ...
0 votes
1 answer
777 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 ...
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 ...
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: ...
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 ...
3 votes
2 answers
3k views

How to draw shapes in the node editor with python bgl

I want to draw a diagram using shapes such as triangles and squares in the node editor. How can I do this?
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 ...
1 vote
2 answers
821 views

How to align modal draw to the middle of the 3d viewport?

I have a question about the opengl modal draw : How to align text from a modal draw to the middle of the viewport and and keep it automatic between Tool Shelf and Property Shelf, when i changing them?...
8 votes
2 answers
3k views

How to get screen color under mouse cursor?

I'm trying to figure out how to get the color of the screen pixel under the mouse with python like in this video: Python-scripted color picker I tried importing bgl and adding bgl.glReadPixels in to ...
0 votes
1 answer
326 views

How to force draw_handler_add?

I have a draw function inspired from this answer: ...
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 ...
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
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 ...

15 30 50 per page
1
2 3 4 5 6