PDA

View Full Version : Limited Region Tool



faulknermano
05-03-2010, 03:37 AM
In an effort to get some nicer, faster, and less-clunkier tools for rendering regions, I thought of writing this simple tool script. To use, simply go to a camera view, activate the script, then click-drag on the viewport a box around your area of interest. The render region will activate, and then place the region based on your marquee.

http://thespread.faulknermano.com/lscripts/LimitedRegionTool.zip

Note, when you use the script but Limited Regions are off, it will activate it, causing the LimitedRegionTool to drop. You'd have to reactivate the tool when that happens; if Limited Region was turned on to begin with, then this behavior does not happen.

faulknermano
05-03-2010, 04:04 AM
Btw, good ol' evenflcw has reminded me: yes, there is a bug in there regarding going out of bounds. Script still WIP. :)

erikals
05-04-2010, 05:56 AM
hi, wonder, can you give animated limited region a go?
the DPont one produces some crashes...

http://www.newtek.com/forums/showthread.php?t=106912

faulknermano
05-04-2010, 08:09 PM
I could try, but I'm curious as to where it places along with other methods like exporting scenes that have limited regions 'baked' and then rendered via LWSN (either mode 2 or 3). Isn't that method more efficient and reliable?

faulknermano
05-04-2010, 08:11 PM
Btw: Updated the Limited Region Tool. http://thespread.faulknermano.com/lscripts/LimitedRegionTool.zip

adk
05-04-2010, 08:36 PM
:thumbsup: cheers faulknermano. Nice work. The out of bounds seems to work for the right hand + bottom edge but not the others ?

faulknermano
05-04-2010, 11:02 PM
hmm.... it seem ok on my part. Can you make sure you got the right version? Time stamp is May 03, 2010, 11:01:18 PM.

erikals
05-05-2010, 12:00 AM
...methods like exporting scenes that have limited regions 'baked' and then rendered via LWSN
um, i'm not familiar with this, how do you bake it?
i have another idea, mapping a clip map to the cam, but it is more effort.

adk
05-05-2010, 12:06 AM
I must have done something silly & grabbed the wrong link I think , even tho I could have sworn I didn't. The newest one works perfectly :thumbsup:

Just thinking out loud here... if the cursor is inside the defined region is it possible for the rmb to be used to move the region once it's dragged out ?

faulknermano
05-05-2010, 02:28 AM
um, i'm not familiar with this, how do you bake it?
i have another idea, mapping a clip map to the cam, but it is more effort.

Clip map sounds interesting... as for 'bake', what I really meant was breaking out a scene that has limited region set up so that each scene renders only a specific part. For example, Al Street has made this:

http://www.flay.com/GetDetail.cfm?ID=1470

DStorm as well:

http://www.flay.com/GetDetail.cfm?ID=1266

faulknermano
05-05-2010, 02:35 AM
Just thinking out loud here... if the cursor is inside the defined region is it possible for the rmb to be used to move the region once it's dragged out ?

That is indeed possible. :) I'd probably have it so that the RMB would immediately render out the frame. But I could have it as an option. :hey:

faulknermano
05-15-2010, 07:42 AM
updated: http://thespread.faulknermano.com/lscripts/LimitedRegionTool.zip

RMB now will offset and reposition the render region.....

faulknermano
06-02-2013, 06:15 PM
Updated Limited Region Tool (same link as above). The update is that now you can marquee on the perspective view and a "PView" camera will be created for that view automatically.

Some notes:
-crashes can happen if the tool is used on a freshly-open LW session when nothing has yet been selected. To avoid the crash, just make sure you've selected your camera at least once before using the tool.
-does not yet work properly with orthos; that's a future to-do.
-if you have changed your perspective viewport zoom settings from the default zoom factor (4.0), the resulting PVRC camera will not match up; PVRC zoom factor is fixed.

dee
06-03-2013, 04:11 AM
Thanks but it doesn't work for me, I'm getting an error:
114684

Current view was Perspective and camera was selected.


System Information:
Operating System: Win 7 64Bit German
CPU Type: Intel Core I7-875, 3.2GHz
Number of CPUs: 1 QuadCore
RAM: 16GB
Graphics Card: NVIDIA GTX 660TI 2GB
Display Driver Version: 311.06
Lightwave 11.5 64bit

faulknermano
06-03-2013, 04:40 AM
This script is a tool: add the script as you would a plugin. Then assign it to a hotkey; the script should register itself as a Tool (eg Edit Shortcut > Tools > Limited Region Tool).

(The error refers to you not executing the script in the architecture it was designed to be in (eg Layout Tool).)

dee
06-03-2013, 05:10 AM
Thanks, but strange things happen. ;) Lightwave crashes when I click in the viewport to start dragging. You've mentioned the problem with a freshly opened Layout in your notes, so I selected the camera, selected the light or an object, selected the camera again - still crashes. So I started Camtasia to record the problem and guess what - it works fine. Even if Camtasia is minimized to the background it works. :D

Anyway, I use PViewGN which works great, thanks for that.

faulknermano
06-03-2013, 05:39 AM
I've had similar experiences; the workaround about selecting the camera first may not be the solution that I originally thought would work reliably.

Now I'm thinking: what if we should enter camera view first, use the tool, and then LW 'stablises'. Right now, I crashed LW using the tool. I fire up another LW session, and then go to camera view, use the tool (dragging a box), then go back to perspective, drag again, and no crash.

It's weird indeed. And it doesn't seem like a script bug; more like a Layout bug, imo.

dee
06-03-2013, 06:28 AM
go to camera view, use the tool (dragging a box), then go back to perspective, drag again, and no crash.

This works, thanks.