More scripts! Move and rotate camera to face a face

It's an impaled camera!!
Sometimes when I UV, I really wished there is an option to move the camera so it is perpendicularly pointing at the face I'm unwrapping, while centred at the face's centre.

This will help when UV planar project from the axis does not yield and fiddling around trying to get the camera perfect sucks.

Unfortunately there don't seem to be there by default, so after a day of planning and scripting, here it is!

Have to revert to A Level maths mechanics about the centre of mass of a lamina and a spreadsheet to plan and check the values before I started scripting, but it's done!

All you have to do is:

  1. Select a face
  2. Edit 1 word of the script to the name of the camera you want to move
  3. Run the whole script
Few flaws though:
  • You will have to dolly out to view the face 
    • The viewFit command (hotkey f) sometimes messes up the face centring
    • I haven't got around to implementing something that translates the camera's local z until the face is fully in view
  • Orthographic cameras might have a very clipped view 
    • Require another camera to translate it

Comments

Popular posts from this blog

Debugging Maya using Visual Studio Code

More nParticle Butterfly Tests

Vray Non-Photorealistic shading Splur