Linked Questions

19
votes
3answers
9k views

3x4 camera matrix from blender camera

In computer vision, the transformation from 3D world coordinates to pixel coordinates is often represented by a 3x4 (3 rows by 4 cols) matrix P as detailed below. Given a camera in Blender, I need ...
4
votes
1answer
1k views

Alternative to redraw_timer()

I have a script whose goal is to find all the visible vertices from the camera view. The simplest solution should work as follows: Go Into Camera View Update the view with ...
4
votes
1answer
599 views

Blender scripting: Circle Selectiong in the “3D View”

In Blender2.74, I want to circle-select the vertices in the "3D View", using this: circle_select(x = 300, y = 400, radius = 30). I found this question. So I know ...
3
votes
4answers
1k views

Mesh silhouette as a polygon or pixels surrounded by the silhouette on the rendered image?

Here is my target application. The rendered image with rendered meshes is used in an interactive application. A user may click or point the cursor to an object on the image. Information related to ...
3
votes
1answer
1k views

Python: Check if vertex is on camera field of view [duplicate]

Suppose I have the following camera perspective. As you can see some of the Cube vertices are visible from the camera, others are not. Is there a way from python to detect if a certain vertex is in ...
3
votes
0answers
377 views

3D Mesh Vertex to 2D Pixel Coordinates [duplicate]

I can obtain the coordinate of a mesh vertex with python via wco = mesh.vertices[mesh_vert_idx].co Further, it is possible to convert this coordinate system to ...
2
votes
1answer
961 views

blender camera from 3x4 matrix

In computer vision, the transformation from 3D world coordinates to pixel coordinates is often represented by a 3x4 (3 rows by 4 cols) matrix P as detailed below. Given P I need code to return a ...
2
votes
2answers
1k views

Python: Obtaining Object Contour Pixels

I would like to obtain the pixel coordinates of an object's outline in the currently-rendered scene, using the bpy module. I found this, which is related, but I'm still not sure how to do it. Has ...
2
votes
1answer
159 views

using python to find object with the pixel information from the render

I wanted to know if anyone had to find a object by only knowing the pixel (x: 300, y: 300)information in a final render say like (essentially using camera view) Is there a way to find the correct ...
2
votes
0answers
635 views

How to find if the vertex of an object is occluded by another vertex/face in front of it from a given viewpoint?

I can use the recipes on this page: How to find image coordinates of the rendered vertex?. But is there a way to know if a point is being occluded by some point/face in front of it from the viewpoint ...
1
vote
1answer
221 views

AttributeError: 'Mesh' object has no attribute 'view_frame'

I am trying to get the pixel coordinates of the object in the rendered image in blender using the How to find image coordinates of the rendered vertex? But I get the error AttributeError: 'Mesh' ...
1
vote
0answers
105 views

How to get objects and mesh object vertices from camera view with Python in Blender 2.8 [duplicate]

What I want to do I want to change the power of only the light object visible in the camera view. I want to remove vertices to mesh objects in visible in the camera view. Not remove mesh objects, ...
1
vote
0answers
466 views

RayCasting from Perspective Camera View into 3D Scene?

I am using Templates->Python->Operator Modal View3D Raycast template script which uses event.mouse_region_x, event.mouse_region_y to create raycasts into the ...
1
vote
0answers
299 views

How can I get a list with the 2D screen coordinates of visible Vertices in 3D view without having to convert 3D to 2D? [duplicate]

The bgl module allows us to obtain various information displayed in 3D Blender view. For example, I made a script that gets the 3D coordinate where the mouse cursor hits a object: ...
0
votes
1answer
148 views

Compute object's foreground mask in screen coordinates

For a research project I am using Blender's Python API to generate some simple random scenes. In addition to the generated renders, I need to acquire a 'foreground mask' in screen (image) coordinates ...

15 30 50 per page