ZOOM LIMITED REGION LSCRIPT

DOWNLOAD: zoom_limited_region_v1.ls

 
 

 

by Chris Peterson and Joe Lertola
chrisepeterson.com
joelertola.com

I was frustrated when using limited region to help texture small things in a scene because the vpr view, while a great help, can be very small. It occurred to me that the view through the limited region box should correspond to some shift camera. With the help of Chris Peterson who wrote most of the code I was able to create a script that creates a new shift camera that duplicates the view through the limited region. This is a very handy script that makes it easy to get a close up view of portions of your camera view. It's a great help for texturing small or distant objects as seen from the camera’s point of view.

Us the “Add Plugins…” command to load the script into Layout. You should see a confirming window that says “1 Plug-in found in 1 file”. Next you should create a keyboard shortcut for the script. Choose the “Edit Keyboard Shortcuts…” command from the “Edit” pop-out menu in the upper left corner of Layout’s interface. Use the search command to locate the “zoom_limited_region” plugin and assign it a shortcut on the right side of the window. I set mine to shift-z.

To use the script turn on limited region and use the limited region corner handles to select the limited region area. Then click the zoom_limited_region keyboard shortcut. A new shift camera will be created that matches the limited region view and limited region will be turned off.

This script works with the classic camera, perspective camera and shift camera. Repeated use of the script allows you to zoom in on a very small region of your camera’s view. After you zoom in really tight open GL stops showing the mesh and textures. But VPR still works. The new shift camera is not a clone of the current camera so it does not have anything more than the default render settings and it does not copy the camera’s animation. The new camera is static and it is in the same position and orientation as the current camera at the current frame.

If you zoom several times you end up with cameras that have very small pixel dimensions. If the zoom results in a camera with pixel dimensions less than 16 in the width or height Lighwave resets the dimensions to 16 pixels. This results in the camera having an incorrect view for these very small dimension cameras.

I want to thank Chris again for writing most of this script. I muddled my way through writing the code that did math of converting the limited region to a shift camera. But the bulk of the code is his. Thanks Chris. Check out Chris’ script massive script collection: http://www.chrisepeterson.com/v2/lscripts.

Joe Lertola
March 2, 2014

joelertola.com