0
$\begingroup$

I'm working on a task that requires me to render 2D images of a 3D object from various angles.I've managed to write a script to move the camera around and render the images along with that. What I wanted to add was that the light object should be a fixed distance from the camera and should have a similar orientation as that of the camera(i.e the direction should be the same as the camera's optical axis). Is there any way in Blender to do this?

$\endgroup$
1
$\begingroup$

Use constraints. On the light object use a "Child of" constraint using the Camera as target.

enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ or.. just parent it? $\endgroup$ – Robin Betts Jun 3 '20 at 18:51
  • 1
    $\begingroup$ Constraints will give you more options to choose from. I'm not sure exactly if the OP means with the Optical axis requirement. $\endgroup$ – Pullup Jun 3 '20 at 18:54
  • $\begingroup$ Sure.. not meant to be a criticism! $\endgroup$ – Robin Betts Jun 3 '20 at 18:55
  • $\begingroup$ sorry for the misunderstanding. Yes, parenting would work as well. $\endgroup$ – Pullup Jun 3 '20 at 18:56
  • $\begingroup$ @Pullup I did try this, but I can't set the distance between the light source and the camera. I want it to be specifically a fixed distance, which I set along with the orientation. What I meant regarding the Optical axis was that the point source must be facing in the same direction as that of the camera $\endgroup$ – cronin Jun 3 '20 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.