I am new to python and blender and learning a lot.
I want to render a simple scene to png image 800x600 size. png image has 2d (u,v) pixel based coordinate system such that top left corner is (0,0) and moving right u increases and moving down v increases so that u and v is always 0 or positive integer. I want to write a python script that would generate 3d mapping table that looks like:
(0,0) -> (-11.23, 20.34, 5.24)
(0,1) -> (-11.13, 18.20, 5.11)
…
(799,599) (2.24, 4.56, -3.56)
Basically what I want is to find the point in 3d space in the scene that maps to the 2d pixel coordinate given above in the image that was rendered matching to the same scene.
Can any one help to provide outline of such a script or pointers that can lead me to solution?
Maybe there is already python API that would give me what I want that I am not aware of ?
.