ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

scripting for ROI (Region of Interest)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dean Gregory
scripting for ROI (Region of Interest)
on Aug 3, 2011 at 8:45:59 pm

Hi there ,

Am posting this here as I'm not sure if script based queries go into the expressions forum, but just needed to know if we could script ROI or Region of Interest properties.

What I want to do is to divide a comp into several areas that I need to render out. Normally I do this by setting up multiple comps of the same animation and then creating different render regions in each one.

Then in the output module I check 'Crop' and then "Region of Interest' so that the comp renders out to the ROI's settings.

If i could access these properties via a script, I could then set the bounding box of the various ROI's and automate the process for every animation I create. It get's tedious and time-consuming plus the human error of 1-2 pixels here and there while adjusting the ROI by hand.

Can't seem to find any documentation on anything online. Anyone know anything?

Thanks,

Dean



Return to posts index

Dave LaRonde
Re: scripting for ROI (Region of Interest)
on Aug 3, 2011 at 9:25:55 pm

[Dean Gregory] "It get's tedious and time-consuming plus the human error of 1-2 pixels here and there while adjusting the ROI by hand."

That's why a lot of people make comps in the size of the screen, nest the much larger master comp in them, and just let AE snap to the corners and center. If you need any other positions, you do a little arithmetic and type in the position, and it's all down-to-the-pixel perfect.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Darby Edelen
Re: scripting for ROI (Region of Interest)
on Aug 3, 2011 at 9:29:26 pm

[Dean Gregory] "What I want to do is to divide a comp into several areas that I need to render out. Normally I do this by setting up multiple comps of the same animation and then creating different render regions in each one."

I might recommend using a different method. For example, creating a composition at the resolution you need your comp cropped to, dropping the comp in to it and duplicating the "cropped comp" as many times as necessary.

You can then layout your cropping mathematically and you can be entirely pixel accurate on your comp's cropping.

I would recommend setting the larger master comp's anchor point and position to [0,0] in the first cropped comp, then you can set the anchor point to [(your cropped comp's width),0] for the second cropped comp, and on from there. That way you can be sure that you're getting a pixel perfect iteration of cropped tiles.

All of that said, yes a script would be easier ;)

Darby Edelen


Return to posts index


Walter Soyka
Re: scripting for ROI (Region of Interest)
on Aug 4, 2011 at 2:20:17 pm

I always use the "multiple output-sized comps as windows into the master comp" method, myself.


[Darby Edelen] "All of that said, yes a script would be easier ;)"

I'd think it'd be more straightforward for the user if the script created the comps as you and Dave have described, rather than fiddled with the ROI.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Dean Gregory
Re: scripting for ROI (Region of Interest)
on Aug 4, 2011 at 4:46:17 pm

Hi there,

A big thank you to Dave, Darby and Walter for replying to my query. Yes, as of now that is what I've been doing especially for triple-wide projects (simpler) and even 3D projection mapping and other multi-screen 'Watchout' projects where we have surfaces of different screen resolutions.

The reason I was interested in this is that in the overall project working with several animators, some do get confused or make a mistake in creating and rendering the screen-splits.

If we are able to script with ROI, then this is how I might choose to work.

Work in one large mega-comp. All animators work this way in the team. Several animations are created and then the script is run on each through a scriptUI panel.

It then divides the mega-comp into sub-comps based on inputs from the user (or hard coded for regular jobs). Inputs could range from number of screens, resolution for each screen, etc.

The script then adds all the sub-comps to the render queue for processing/batch.

Do you think this is a viable option. Would people like to work this way? A lot of artists like to see one canvas and not get confused with screen splits and spacing between LED panels, etc used in events.

My thought was to let the artist think creatively and leave the Math to the script.

But most importantly and work methods aside, can one really access ROI through scripting?

Do let me know what your ideas are. Thanks!

Cheers,

Dean



Return to posts index

Walter Soyka
Re: scripting for ROI (Region of Interest)
on Aug 4, 2011 at 5:33:46 pm

[Dean Gregory] "Would people like to work this way? A lot of artists like to see one canvas and not get confused with screen splits and spacing between LED panels, etc used in events."

When I do WATCHOUT or multi-screen shows, I first make a template that all the artists on the project will use.

I create one folder named ---WORKING and another folder named --RENDER (adding the dashes as I do allows me to specify the order the appear in the project panel).

The WORKING folder gets the single canvas comp (with mask guide layer, if necessary).

The RENDER folder gets the pre-split output comps at their own respective native sizes. I nest the master comp from WORKING into each of the RENDER comps and correctly position it for each one. This only takes a few minutes.

After a quick alignment test, I distribute and explain the template. I've never had any trouble with someone not understand to work in the WORKING comp, and render the pre-split RENDER comps. It's very artist-friendly with no need for scripting.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index


Dave LaRonde
Re: scripting for ROI (Region of Interest)
on Aug 4, 2011 at 5:45:46 pm

Here's a question, Walter...

How do you overcome the issue of multiple artists working on the same AE project file simultaneously?

....other than issuing a hard-and-fast rule: ONLY ONE ARTIST AT A TIME works on the project file.
I'm going to guess that's the only way to do it.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Walter Soyka
Re: scripting for ROI (Region of Interest)
on Aug 4, 2011 at 6:29:39 pm

[Dave LaRonde] "How do you overcome the issue of multiple artists working on the same AE project file simultaneously? ....other than issuing a hard-and-fast rule: ONLY ONE ARTIST AT A TIME works on the project file."

That's it. For a workflow like this, we'll generally do one comp per project. When it makes more sense to keep multiple comps in the same project file, we just import additional copies of the template as necessary.

In multi-artist workflows, I find it helps to enforce some organization and naming conventions on the artists so they can easily pass work back and forth. Art direction is also critical to keeping visual and animation styles consistent. I'll also try to keep work with the artist that created it whenever possible.

The hardest part is tracking back changed assets (for example, if a logo changes midstream). I probably ought to take another look at Gridiron Flow.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Dean Gregory
Re: scripting for ROI (Region of Interest)
on Aug 5, 2011 at 8:55:08 am

Very interesting stuff here... I guess it's about how you manage a project effectively. The current way we all follow seems to be the best tried and tested way.

We all want to work faster and better, so it would be interesting to find out better workflows. I have a few practices I have been following and they do help. Will share them in the next few days. However, if they are universally best practice methods, I do not know. Maybe I will start another thread and initiate a discussion there.

Scripts do help to relieve the tedium of doing things over and over again. I was able to do a little more research and find out that ROI is not accessible via scripting as of yet. Infact, a few others have put it on their AE wishlist on the Adobe site. So, I guess that matter ends things here itself.

A few years ago i.e. 2004, I was working on a project that had a mega-comp that had 9 SD rez screens in one. The output was then sent to 9 Plasma screens that were sync'ed together.

There were a lot of heavy effects so I could not render out the master for preview and then the sub-comps as it was taking up a lot of system time on the older machines.

A friend of mine then helped me with a Python script. What we did was to run the Py script on an 'average machine' and it divided the mega-comp sequences into their sub-comp sequences and into respective folders.

So you would have a Megacomp called Logo_anim and then subcomp folders called Logo_anim_screen01. The subcomp file names would read like Logo_anim_screen01_file#####.tga for a Targa sequence.

These would then be sent to an editing set up (the studio was using the ol' Velocity edit system) to line up and check/preview in real time.

It worked well and we were able to meet the deadline.

So, Walter my question to you and the rest would be... would you consider using this sort of script idea (a post render script)? It does it pretty fast with no quality loss. I'm sure Python has developed its Imaging Libraries a bit more since 2004. Would like to know your take on this. Maybe if it makes sense, I could try and develop something like this for the community. (time permitting of course ;-) lol

Cheers,

Dean



Return to posts index


Walter Soyka
Re: scripting for ROI (Region of Interest)
on Aug 5, 2011 at 2:46:28 pm

[Dean Gregory] "So, Walter my question to you and the rest would be... would you consider using this sort of script idea (a post render script)? It does it pretty fast with no quality loss. I'm sure Python has developed its Imaging Libraries a bit more since 2004. Would like to know your take on this. Maybe if it makes sense, I could try and develop something like this for the community. (time permitting of course ;-) "

I usually do essentially this, all within After Effects. I'll add the main comp to the render queue as a full-quality image sequence, then set the post-render action to Set Proxy. I set the individual display comps' render settings to allow proxy use. They will read the frames from disk, crop them, then write them back out -- no need to recalculate all effects every time. The larger the total raster is, though, the more important a fast disk subsystem is.

Your compression application of choice may also be able to take in a large image sequence, then compress directly to cropped views for the playback system with different presets.

I suppose another approach is to use an output module template with a series of customized output modules with the correct crop settings built in, then add multiple output modules to the one master render. This won't automatically name files well like proxy-using render comps would, but it would probably be a little bit faster since it won't have to read each frame from disk before writing it.

I'm not trying to talk you out of writing a script -- maybe it will suit your workflow better -- but I think a lot of this can be accomplished directly in the application with about the same amount of setup time.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Dean Gregory
Re: scripting for ROI (Region of Interest)
on Aug 6, 2011 at 8:03:26 am

Thanks Walter, this discussion has been quite enlightening. Will keep these points in mind. Tc.

Cheers,

Dean



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]