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.
COPs sequence with varying resolution
1016 7 1- Digipiction
- Member
- 166 posts
- Joined: 3月 2014
- Offline
- jsmack
- Member
- 7659 posts
- Joined: 9月 2011
- Offline
- mestela
- Member
- 1716 posts
- Joined: 5月 2006
- Offline
- tamte
- Member
- 8449 posts
- Joined: 7月 2007
- Offline
- Digipiction
- Member
- 166 posts
- Joined: 3月 2014
- Offline
tamteI 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.
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
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.
- Digipiction
- 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.
- 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.
- tamte
- Member
- 8449 posts
- Joined: 7月 2007
- Offline
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
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
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Digipiction
- Member
- 166 posts
- Joined: 3月 2014
- Offline
-
- Quick Links