Align to side in over node.

   604   6   2
User Avatar
Member
536 posts
Joined: Dec. 2013
Offline
Hi all,
I'd like to create a simple slate/overlay for a bunch of renders I'm kicking off, but I'm having trouble aligning that information to one side with cops. The over stretches the fg completely over the bg and it doesn't seem like there are any transform options in the blend nodes. Is there a way to get this working?



I'm trying to get it to align here -


This is all I can seem to get :/


Thanks,
Pete
Edited by peteski - Nov. 23, 2025 19:18:29

Attachments:
networkView.png (210.6 KB)
alignExample.png (577.2 KB)
result.png (628.4 KB)

User Avatar
Staff
6792 posts
Joined: July 2005
Offline
Blend in 21.0 only operates in "world" space. All images loaded created have the same "size" in world space by default, regardless of their resolution. Thus they exactly line up on top of each other.

This is a reasonable thing with texture synthesis where you are often working resolution independent, so don't want to have to rescale things if you swap from 2k to 4k textures. But less useful if you are doing pixel-padding with images.

Transform 2d has a "Rasterize" toggle. If you turn this off, it moves the image in world space so you can line things up where you want them to go.

The Blend COP has a Border override. Note that copernicus defaults to "Wrap" border which is rarely what you want for doing slates or overlays, so you can override at the blend cop or maybe just at the network level.

You also need to convert to RGBA or the composite is done in RGB which lacks alpha, so you get a full overwrite.

Attachments:
overblend.hip (83.5 KB)

User Avatar
Member
536 posts
Joined: Dec. 2013
Offline
Awesome!
I had a quick mess around and I managed to get it working for what I need.


Image Not Found


Thanks for the help
Pete

Attachments:
Aspect_Tweak.gif (90.7 KB)
scene.hiplc (115.8 KB)

User Avatar
Member
17 posts
Joined: March 2025
Offline
jlait
Transform 2d has a "Rasterize" toggle. If you turn this off, it moves the image in world space so you can line things up where you want them to go.
Indeed, disabling rasterize saves the situation, but it's so unintuitive that you absolutely need to explain it in the help. I'm sure 99% of users don't know how to use it. The main problem there is scaling. I spent several evenings (!) experimenting with this and still didn't understand rasterize. But after your explanation, I checked it again and finally understood.

Below is an explanation for beginners.
So, the task is: we have a small icon, say 20x20, and we want to place it on a 1024 canvas. A simple blend will stretch the icon to fill the canvas and resample it to 1024 resolution. That is, we need to scale it down by a factor of 50. If we decide to scale it down first, the default transform with rasterize enabled will turn your icon into a blur of a couple of pixels. And then the blend will scale that blur up by a factor of 50. A complete failure.
Disabling rasterization will preserve accuracy when scaling (similar to vector vs. raster), and decreasing the scaling before blending will preserve detail. However, this raises the issue of antialiasing at the edges after resampling within the blend. For a precisely drawn icon at a low resolution, this will unacceptably degrade the image.
Then it's better to enlarge the empty icon canvas before blending. Use crop, set the pixels, and set the right edge to the desired resolution and "discard and reframe" mode—the canvas will stretch. Now the canvases will overlap and fold without resampling, and the icon size will remain unchanged in pixels, eliminating antialiasing or transformation artifacts. The downside is that the transform handle will be in the center, while the icon is in the corner—this is very inconvenient. Instead of 0 and 1024, you should use -512 and +512 for the corners. Or an expression with a reference to a reference node and its resx and resy resolutions. And so we come to the point where, although the problem has a solution, it's so convoluted and labor-intensive that it's unviable.
An obvious, user-friendly solution would be to insert a crop wire from the reference image into the node, and our image would automatically add/crop canvas pixels to the sides (not resample), syncing the resolution to the background. Then the blend would work as expected, and our icon would immediately be centered along with the handle. And we wouldn't have to do any calculations for this simple operation or worry about changing the reference image's resolution. Everything would be procedural, just the way we like it.
The crop node already has a size_ref input, and I was hoping it was used for automatic cropping, but no, it doesn't work at all and has no effect on the resolution. Whether this is a bug or intended, I don't understand.
User Avatar
Staff
6792 posts
Joined: July 2005
Offline
Thank you for the detailed assessment. Trying to put a fixed size logo on top of a plate is something that should be easy, and isn't.

I'm going have to look into crop's size_ref, I had imagined setting units to Pixels would have done what you wanted, but it seems not!
User Avatar
Member
17 posts
Joined: March 2025
Offline
jlait
I would even suggest you give users a separate node, let's call it Compose, for example, which will have crop, transform, blend inside, and on the outside, the user simply plugs the BG into one input, the FG into the second input, by default, the "use mono as alpha" mode is enabled for mono and immediately has a centered FG with alpha on top of the BG and a transform manipulator for moving the FG. Everything is familiar to everyone in all programs, and this covers the needs of most users without learning all the nuances of cropping, transforming, and blending. Those who need more sophisticated controls can do it manually, right? But most users will be happy. A simple operation has become simple.
User Avatar
Member
536 posts
Joined: Dec. 2013
Offline
Yeah, something like this would be great!
I think it would be really useful and save everyone having to reinvent the wheel for their case. It's a pretty general tool that could be used in any situation where you need to align something to the image.
Edited by peteski - Dec. 16, 2025 18:43:13
  • Quick Links