2

Given a pixel on the rendered image, is there any easy way to get the 3D location that the pixel corresponds to in the scene using python? i would really like to know before I go through trying to do the math to get it myself.

In case it makes a difference, I'm using an orthographic camera.

Andrew Tapia
  • 133
  • 6

1 Answers1

2

There are utility functions to convert 2d region coordinates to 3d:

bpy_extras.view3d_utils

There's also a method to cast a ray in the scene:

Scene.ray_cast

... but it might not work with orthographic view.

CodeManX
  • 29,298
  • 3
  • 89
  • 128