COPs sequence with varying resolution

   1069   7   1
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
Hi,

does anybody know a way to force COPs to accept varying resolutions? This recently drove me crazy.

The file node sticks to whichever resolution the first frame of the sequence has. One workaround I found was to put each file of the sequence into a separate subfolder, that way you can trick Houdini into thinking that it's just a single file.
filepath/sequence.$F4.exr
turns into:
filepath/sequence.$F4/sequence.exr

But this didn't solve the problem, because I needed to do randomized cropping. And the crop node will not accept a $F expression. Neither will the resolution of a color node, or the size parameter of a scale node. You are simply not allowed to vary the output resolution per frame at all.

I ended up running the "sequence" through my COP network and write it out all at the same resolution. Then I made a second COP network that read in these intermediate files and used a Python script to randomize the crop parameter and write each frame out one by one through Python, which is a tiny little bit (a heck of a lot) slower than TOPs.

I had also tried to do this slow Python workaround directly with the first network, but that first network has a lot of $F expressions on many nodes, and when modifying the File and ROP nodes through Python, it wouldn't update any of those animated COP nodes or would do it in an erratic fashion. The whole thing was pure frustration.
User Avatar
Member
7771 posts
Joined: 9月 2011
Offline
Digipiction
You are simply not allowed to vary the output resolution per frame at all.

you cannot. My workaround was to drive the cop network with remote control using a shell rop to 'pressButton' on the composite rop and have all the input COP nodes have 'still image' mode hard coded.
User Avatar
Member
1738 posts
Joined: 5月 2006
Offline
Digipiction
The whole thing was pure frustration.

Welcome to cops. :/
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
8555 posts
Joined: 7月 2007
Online
you can execute COP network through TOPs, then you can have different image resolution per frame since @pdg_input will contain full path to a single image
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
tamte
you can execute COP network through TOPs, then you can have different image resolution per frame since @pdg_input will contain full path to a single image
I always run these through TOPs, and initially I thought that it worked, but the crop node gave problems. I had had the crop randomized with a $F expression, and most of the output images ended up with the same crop, not a random one per frame. Every now and then, an output image would have a different crop, it seemed quite erratic. I tried a batch size of 1 to spawn a new instance for each frame, which didn't fix the issue.

Maybe a wedge attribute could be used, although I seem to recall that I tried this at one point and COPs refused to read it.
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
I've attached a small test project with three COP networks.

- The first one uses a static image and applies a randomized crop to it. Running through TOPs outputs the same crop every time, no randomization
- The second one uses an image sequence of varying resolution. Running through TOPs outputs all frames at the resolution of the sequence's first image, so they end up stretched
- The third one uses the workaround I described. Running through TOPs correctly outputs a different resolution each frame that matches the input resolution

I just realized that for my upcoming project I won't need to do random cropping, so I'm fine with the workaround for the moment. Although it's one of many, many things I hope will get overhauled in COPs.

Attachments:
VariedResolution.zip (162.0 KB)

User Avatar
Member
8555 posts
Joined: 7月 2007
Online
your cop networks are loading the sequences using $F which I suppose locks COPs into certain resolution

what I meant by @pdg_input containing just a single image would be something like generating workitems for your files using File Range top or File Pattern TOP
here is an example

Attachments:
ts_variable_size_cops.hipnc (206.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
Thank you, that's a good one to have in the bag.
  • Quick Links