CROP COP: cannot be animated!

   7323   9   1
User Avatar
Member
387 posts
Joined: July 2005
Offline
Hey,
I've got a CROP COP which has just gone yellow … Huh? Clicking on it tells me:
Warning: Parameter ‘Horizontal Crop’ cannot be animated or time dependent.
Whaaaaat???? Nooo? I can barely believe my eyes: Cannot be animated? CANNOT be animated!?!
Surely you jest Mister Houdini? Cannot be bothered to animate perhaps? <snicker> :-)

A similar warning appears on a Window COP!
Okay. I'm putting down a Crop Cop with constant values for every single frame and then i'll wire them all into a Sequence Cop!
eg.
cd /img/img1
opadd sequence sequence_all
for i = 1 to $NFRAMES
opadd crop crop_$i
set left=`eval(0+($i-1)/23)`
set right=`eval(0.2+($i-1)/23)`
opparm crop_$i hcrop ( $left $right)
opwire crop_$i -$i sequence_all
end
echo just kidding
''You're always doing this: reducing it to science. Why can't it be real?'' – Jackie Tyler
User Avatar
Staff
5161 posts
Joined: July 2005
Offline
The resolution of images in a sequence in COPs is always constant. So, even your rather time consuming workaround won't work.

However, you can animate the Offset parameter of the Crop & Window COPs, if you need to pan through the original image (you can also append a Transform COP to the Window COP and do more advanced transformations on the original image).

If all you want to do is clip the image data, without changing the resolution, you can use a Border COP with “Increase Resolution of Image by Borders” toggle off.
User Avatar
Member
311 posts
Joined: July 2005
Offline
I thought i had a crappy workaround, but it seems you can't animate any of the scales or sizes to try and fool it. Eh??

There doesn't seem to be any easy way to do this. In fact when you try, COPs doesn't seem to make any sense at all. hmmm

sequnce COP it is then!
User Avatar
Member
387 posts
Joined: July 2005
Offline
The sequence cop was a joke.. Not a very funny joke. I wasn't really going to do that..

I'm having a very bad day with COPS. Sorry - but they're still flakey.. I am getting varying results from file cops. Sometimes the file is there, sometimes not. I'll middle-mouse on the cop and it has the right filename, or i'll run echo `chs()` on the parm and it reports the right string, but nooo - no image, and no composite.

The input files are there alright. I know COPS uses threads - I'm beginning to wonder if there's missing mutex's in the threaded code - eg. the errors are random. Perhaps it's linked with libraries which are not thread safe? Driving me nuts.. Scrubbing forwards and backwards on the time-line is like playing roulette with the file cop. I press “detect” on one file cop, and the image from another disappears. Awesome. I won't press that again.

All i'm doing is trying to composite a single frame of text onto 24 frames of a turntable render. This is not the crop problem mentioned earlier, but i'm venting so don't stop me now! :-) I've got about 100 models, each model has 24frame turntable. There's one image (of text) per model. So, I have an expression in the filename of the FILE COP, for the text image file essentially:

$JOB/thing/text_`floor(1+($F-1)/24)`_legend_v008.0001.exr

Every text image ends with “v008.0001.exr”. Setting “override frame range” and “still image” on seems to be the fix. I'm fine with that.

The 24-image File Cop has this expression:

$JOB/thing/model_`floor(1+($F-1)/24)`_v008.`padzero(4,(($F-1)%24)+1)`.exr

which at frame-1 evaluates to:
$JOB/thing/model_1_v008.0001.exr

but it won't display. Then! I flip the toggles “override frame range” and “still image” both off and both on and Hey! There's my image! It's back… Most of the RAM is chewed up, and scrubbing through the timeline means lots of “Incomplete press Shift+F” messages. Shift+F must be pressed if you ever want to see another image. Changing the current frame to frame-1 doesn't help.

I render to /tmp/a.pic and my model is missing. RMB Saving an image doesn't force it to cook. Toggling “still image” off and on seems to help. Results are unpredictable. Quite frustrating..
Edited by - Oct. 15, 2006 10:34:26
''You're always doing this: reducing it to science. Why can't it be real?'' – Jackie Tyler
User Avatar
Staff
5161 posts
Joined: July 2005
Offline
As you've noticed, expressions in the Filename parameter and automatic frame range detection do not work very well together. They're sort of incompatible, and generally you have to go to manual sequence control when you use complex $F expressions. I'm pretty sure this is causing all your grief - you're being too clever

Try this instead: press ` (backtick) in the network editor to pop up the image file browser. It'll have all your sequences listed. Multiple-select all of them and Accept. This will create 1 File COP per sequence in your network (in a nice column). Now, plunk down a sequence COP. Select all the File COPs, and wire the first one into the sequence COP (this wires them all). This will combine all your separate sequences into 1 sequence, and you can happily apply whatever text & effects after that.

Incidently, if you suspect a threading problem, try turning off threading in the main preferences (Settings->Main Pref->Compositing). They're pretty few & far between these days, though (courtesy of running stress tests with 32 threads, large networks and very small tiles).
User Avatar
Member
311 posts
Joined: July 2005
Offline
yeah, COPs is annoying. I don't know anyone who has a good thing to say about it.
If you just dive in to do a simple composite, nothing tooo fancy, it's like pulling teeth. And I'm doing stuff at NTSC res which should be a doddle.

I tried playing with the preferences but never managed to find something that made much of a difference.

It's a shame, because having it all in the same package would be perfect and I'm not a huge aftereffects fan. But at least with that you can get results without too much of a headache.

I mean if you use a transform COP to scale your image, does it scale. Does it heck? Apart from it's seeming bugginess, it's just counter intuitive in a lot of places. Of course that does bring into question my intuition, but that's for another time and place.
User Avatar
Member
387 posts
Joined: July 2005
Offline
Hey Twod, Jesta,

thanks for the feedback. I think I was losing patience there… Sorry. :-)
Wow - i didn't know about the image file browser (Backtick or Equals in the network editor). Well well.. Something new!

While i'm on the Cops topic, i think it's strange that I can't use $F in the COP ROP. I want to output a sequence, and I noticed it wants $N instead. Err? Ok… So guess what I did? … I made a short test using $N and rendered frames 1 to 50. That worked. Then I changed the range to 51 to 100 (just to see some more) and Well Clobber Me! Arrrgh! The 1-50 got over-written by the 51-100. $N always starts from 1. Awesome, again.

What's going on with $N anyway? I'm at frame 1 right now, and if I check $N it's 78:
/img/img1 -> cd /img/img1/rop_comp1
/img/img1/rop_comp1 -> echo `ch(“f1”)`
51
/img/img1/rop_comp1 -> echo `$N+ch(“f1”)`
129
/img/img1/rop_comp1 -> echo `$N`
78 As you can probably see, I was thinking of just adding in the start-frame value. Uh.. Is there some reason why $F is not allowed in the “output picture” parm of the Composite ROP? I feel like i'm fighting the cops parameters to get some standard houdini behaviour.
… Cannot animate crop parms, can't use $F in output fileName, images randomly won't load from File! gaaaaaaahhh! :-)

cheers,
b.

PS. Fun with N/img/img1/rop_comp1 -> set N=3
/img/img1/rop_comp1 -> echo `$N`
78
/img/img1/rop_comp1 -> set N
N = 3
/img/img1/rop_comp1 -> set -g N=6
/img/img1/rop_comp1 -> set N
N = 6
/img/img1/rop_comp1 -> echo $N
78
/img/img1/rop_comp1 -> cd /obj
/obj -> set N
N = 6
/obj -> echo $N
6
/obj -> cd /img
/img -> echo $N
6
/img -> cd img1
/img/img1 -> echo $N
6
/img/img1 -> cd rop_comp1
/img/img1/rop_comp1 -> echo $N
78
''You're always doing this: reducing it to science. Why can't it be real?'' – Jackie Tyler
User Avatar
Staff
5161 posts
Joined: July 2005
Offline
$F is allowed in the output picture parm of the ROP. $N is simply the number of frames currently rendered (or something) - it's a global ROP variable.

Now, if you're doing some sort of $F expression in the ROP, you'll have to do something like this:

Preframe:
set $FRAME = `$F*2-1`

outputpic:
foo$FRAME.jpg

This has been addressed in H9 with better string expression handling, but for 8.1, you have to use this small workaround for any $F expressions in the ROP. Of course, if you're just outputing foo$F.jpg, you can use that normally - you only need to do the above if you have a backtick expression.
User Avatar
Member
387 posts
Joined: July 2005
Offline
Ah - pre-frame workaround. Very cool. $N is fickle Thanks Twod! b.


PS. your suggestion actually makes a ‘cleaner’ representation of the output filename.
I'm tempted to do this from now on!

eg. Preframe Script is:
set MODEL=`padzero(3,floor(($F-1)/24)+1)` ; set FRAME=`padzero(4,(($F-1)%24)+1)`
And then Output Picture is:
$JOB/blah/turntable_${MODEL}.${FRAME}.jpg
''You're always doing this: reducing it to science. Why can't it be real?'' – Jackie Tyler
User Avatar
Member
2199 posts
Joined: July 2005
Online
jesta
yeah, COPs is annoying. I don't know anyone who has a good thing to say about it.
If you just dive in to do a simple composite, nothing tooo fancy, it's like pulling teeth. And I'm doing stuff at NTSC res which should be a doddle.

I tried playing with the preferences but never managed to find something that made much of a difference.

Hey jesta, are you using H8.1 for this? The difference in cops handling between H8 and H8.1 is massive. H8 can't use, H8.1 all smooth and lovely.
Just talking about speed and responsiveness that is.
The trick is finding just the right hammer for every screw
  • Quick Links