2

I am rendering a multiple-views of an object in blender-python API. I am able to render multiple views by moving the camera in a circular path. I would like to know how to get the camera poses for the rendered multiple views. I would want to save the camera pose information for each rendered view.

I am new to blender and blender-python. Any quick help is appreciated?

Thank you!

batFINGER
  • 84,216
  • 10
  • 108
  • 233
akes
  • 51
  • 4
  • 1
    There are literally hundreds of answers on here that answer your question – WhatAMesh Feb 11 '21 at 23:57
  • Sorry, I think I did not make it clear. Basically, I would like to know how to get the camera pose using script? or for any arbitrary camera location and direction, what is the script to get the camera pose in blender -python? I hope it is clear now :) – akes Feb 12 '21 at 00:09
  • 1
    Global transform is camera_object.matrix_world Somewhat related https://blender.stackexchange.com/a/176762/15543 – batFINGER Feb 12 '21 at 01:06
  • what do you mean by global transform?Is this the projection matrix? Can this be taken as the pose of the camera? – akes Feb 12 '21 at 07:16
  • The camera matrix and the camera objects world matrix ie how it is aligned in global space are distinctly different . AFAICT from question you want the world matrix. Where it is where its pointing. Perhaps it may be an idea to post your code. – batFINGER Feb 12 '21 at 08:53
  • @akes I think trying to find the projection matrix is going deeper than necessary. The camera's global transform (or position and rotation) should be enough unless you're doing something really, really fancy. – HISEROD Feb 12 '21 at 08:58
  • Thank you all, I used cam.world_matrix – akes Feb 13 '21 at 09:33

0 Answers0